@code-pushup/cli 0.70.0 → 0.72.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -7
- package/package.json +4 -4
- package/src/lib/compare/compare-command.d.ts +2 -1
- package/src/lib/compare/compare-command.js +1 -1
- package/src/lib/compare/compare-command.js.map +1 -1
- package/src/lib/implementation/compare.options.d.ts +1 -1
- package/src/lib/implementation/compare.options.js +0 -2
- package/src/lib/implementation/compare.options.js.map +1 -1
- package/src/lib/implementation/compare.model.d.ts +0 -4
- package/src/lib/implementation/compare.model.js +0 -2
- package/src/lib/implementation/compare.model.js.map +0 -1
package/README.md
CHANGED
|
@@ -279,7 +279,7 @@ Refer to the [Common Command Options](#common-command-options) for the list of a
|
|
|
279
279
|
| **`--from`** | `string` | n/a | Hash to start in history |
|
|
280
280
|
| **`--to`** | `string` | n/a | Hash to end in history |
|
|
281
281
|
|
|
282
|
-
|
|
282
|
+
#### `compare` command
|
|
283
283
|
|
|
284
284
|
Usage:
|
|
285
285
|
`code-pushup compare --before SOURCE_PATH --after TARGET_PATH [options]`
|
|
@@ -289,11 +289,15 @@ Compare 2 reports and produce a report diff file.
|
|
|
289
289
|
|
|
290
290
|
In addition to the [Common Command Options](#common-command-options), the following options are recognized by the `compare` command:
|
|
291
291
|
|
|
292
|
-
| Option |
|
|
293
|
-
| -------------- |
|
|
294
|
-
| **`--before`** |
|
|
295
|
-
| **`--after`** |
|
|
296
|
-
| **`--label`** |
|
|
292
|
+
| Option | Type | Default | Description |
|
|
293
|
+
| -------------- | -------- | -------------------------------------- | ----------------------------------- |
|
|
294
|
+
| **`--before`** | `string` | `.code-pushup/report-before.json` [^1] | Path to source `report.json`. |
|
|
295
|
+
| **`--after`** | `string` | `.code-pushup/report-after.json` [^1] | Path to target `report.json`. |
|
|
296
|
+
| **`--label`** | `string` | n/a [^2] | Label for diff (e.g. project name). |
|
|
297
|
+
|
|
298
|
+
[^1]: Uses `persist` config to determine report paths, so default file paths are actually `${persist.outputDir}/${persist.filename}-before.json` and `${persist.outputDir}/${persist.filename}-after.json`.
|
|
299
|
+
|
|
300
|
+
[^2]: Uses `label` from input `report.json` files is they both have the same value.
|
|
297
301
|
|
|
298
302
|
#### `print-config` command
|
|
299
303
|
|
|
@@ -309,7 +313,7 @@ In addition to the [Common Command Options](#common-command-options), the follow
|
|
|
309
313
|
| -------------- | :------: | -------- | -------------------------------------------------------- |
|
|
310
314
|
| **`--output`** | no | `string` | Path to output file to print config (default is stdout). |
|
|
311
315
|
|
|
312
|
-
|
|
316
|
+
#### `merge-diffs` command
|
|
313
317
|
|
|
314
318
|
Usage:
|
|
315
319
|
`code-pushup merge-diffs --files PATH_1 PATH_2 ... [options]`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code-pushup/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.72.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "A CLI to run all kinds of code quality measurements to align your team with company goals",
|
|
6
6
|
"homepage": "https://code-pushup.dev",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"node": ">=20"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@code-pushup/models": "0.
|
|
49
|
-
"@code-pushup/core": "0.
|
|
50
|
-
"@code-pushup/utils": "0.
|
|
48
|
+
"@code-pushup/models": "0.72.0",
|
|
49
|
+
"@code-pushup/core": "0.72.0",
|
|
50
|
+
"@code-pushup/utils": "0.72.0",
|
|
51
51
|
"yargs": "^17.7.2",
|
|
52
52
|
"ansis": "^3.3.0",
|
|
53
53
|
"simple-git": "^3.20.0"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { type CompareOptions } from '@code-pushup/core';
|
|
1
2
|
export declare function yargsCompareCommandObject(): {
|
|
2
3
|
command: string;
|
|
3
4
|
describe: string;
|
|
4
|
-
builder: Record<keyof
|
|
5
|
+
builder: Record<keyof CompareOptions, import("yargs").Options>;
|
|
5
6
|
handler: (args: unknown) => Promise<void>;
|
|
6
7
|
};
|
|
@@ -14,7 +14,7 @@ export function yargsCompareCommandObject() {
|
|
|
14
14
|
ui().logger.info(gray(`Run ${command}...`));
|
|
15
15
|
const options = args;
|
|
16
16
|
const { before, after, label, persist, upload } = options;
|
|
17
|
-
const outputPaths = await compareReportFiles({
|
|
17
|
+
const outputPaths = await compareReportFiles({ persist, upload }, { before, after, label });
|
|
18
18
|
ui().logger.info(`Reports diff written to ${outputPaths
|
|
19
19
|
.map(path => bold(path))
|
|
20
20
|
.join(' and ')}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compare-command.js","sourceRoot":"","sources":["../../../../../../packages/cli/src/lib/compare/compare-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,
|
|
1
|
+
{"version":3,"file":"compare-command.js","sourceRoot":"","sources":["../../../../../../packages/cli/src/lib/compare/compare-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAuB,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5E,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,6BAA6B,EAAE,MAAM,sCAAsC,CAAC;AAErF,MAAM,UAAU,yBAAyB;IACvC,MAAM,OAAO,GAAG,SAAS,CAAC;IAC1B,OAAO;QACL,OAAO;QACP,QAAQ,EAAE,+CAA+C;QACzD,OAAO,EAAE,6BAA6B,EAAE;QACxC,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;YAC/B,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChC,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,OAAO,KAAK,CAAC,CAAC,CAAC;YAE5C,MAAM,OAAO,GAAG,IAGf,CAAC;YAEF,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;YAE1D,MAAM,WAAW,GAAG,MAAM,kBAAkB,CAC1C,EAAE,OAAO,EAAE,MAAM,EAAE,EACnB,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,CACzB,CAAC;YAEF,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CACd,2BAA2B,WAAW;iBACnC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;iBACvB,IAAI,CAAC,OAAO,CAAC,EAAE,CACnB,CAAC;QACJ,CAAC;KACsB,CAAC;AAC5B,CAAC"}
|
|
@@ -3,12 +3,10 @@ export function yargsCompareOptionsDefinition() {
|
|
|
3
3
|
before: {
|
|
4
4
|
describe: 'Path to source report.json',
|
|
5
5
|
type: 'string',
|
|
6
|
-
demandOption: true,
|
|
7
6
|
},
|
|
8
7
|
after: {
|
|
9
8
|
describe: 'Path to target report.json',
|
|
10
9
|
type: 'string',
|
|
11
|
-
demandOption: true,
|
|
12
10
|
},
|
|
13
11
|
label: {
|
|
14
12
|
describe: 'Label for diff (e.g. project name)',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compare.options.js","sourceRoot":"","sources":["../../../../../../packages/cli/src/lib/implementation/compare.options.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,6BAA6B;IAI3C,OAAO;QACL,MAAM,EAAE;YACN,QAAQ,EAAE,4BAA4B;YACtC,IAAI,EAAE,QAAQ;
|
|
1
|
+
{"version":3,"file":"compare.options.js","sourceRoot":"","sources":["../../../../../../packages/cli/src/lib/implementation/compare.options.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,6BAA6B;IAI3C,OAAO;QACL,MAAM,EAAE;YACN,QAAQ,EAAE,4BAA4B;YACtC,IAAI,EAAE,QAAQ;SACf;QACD,KAAK,EAAE;YACL,QAAQ,EAAE,4BAA4B;YACtC,IAAI,EAAE,QAAQ;SACf;QACD,KAAK,EAAE;YACL,QAAQ,EAAE,oCAAoC;YAC9C,IAAI,EAAE,QAAQ;SACf;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compare.model.js","sourceRoot":"","sources":["../../../../../../packages/cli/src/lib/implementation/compare.model.ts"],"names":[],"mappings":""}
|