Skip to content

Commit 0fef0c3

Browse files
committed
fix(core): include package.json data
1 parent 0c4a75c commit 0fef0c3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/core/src/lib/collect-and-persist.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
import { pluginReportSchema } from '@code-pushup/models';
1+
import { Report, pluginReportSchema } from '@code-pushup/models';
2+
import { name, version } from '../../package.json';
23
import { CollectOptions, collect } from './commands/collect';
34
import { logPersistedResults, persistReport } from './implementation/persist';
45

56
export async function collectAndPersistReports(
67
config: CollectOptions,
78
): Promise<void> {
8-
const report = await collect(config);
9+
const report: Report = {
10+
packageName: name,
11+
version,
12+
...(await collect(config)),
13+
};
914

1015
const persistResults = await persistReport(report, config);
1116
logPersistedResults(persistResults);

0 commit comments

Comments
 (0)