escover 6.4.0 → 6.5.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/ChangeLog +8 -0
- package/lib/cli/cli.js +28 -17
- package/package.json +1 -1
package/ChangeLog
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
2026.05.19, v6.5.0
|
|
2
|
+
|
|
3
|
+
feature:
|
|
4
|
+
- c196e66 escover: cli: execute: quotes
|
|
5
|
+
- aef2e3c @escover/formatter-responsive: move out table
|
|
6
|
+
- e283240 @escover/formatter-responsive: parser: move out
|
|
7
|
+
- 166b21b @escover: formatter-responsive: calculator
|
|
8
|
+
|
|
1
9
|
2026.05.16, v6.4.0
|
|
2
10
|
|
|
3
11
|
feature:
|
package/lib/cli/cli.js
CHANGED
|
@@ -50,7 +50,9 @@ export const cli = async ({argv, exit, readCoverage}) => {
|
|
|
50
50
|
const cmd = argv.slice(2);
|
|
51
51
|
|
|
52
52
|
if (cmd.length)
|
|
53
|
-
execute(
|
|
53
|
+
execute(cmd, {
|
|
54
|
+
exit,
|
|
55
|
+
});
|
|
54
56
|
|
|
55
57
|
const coverage = readCoverage();
|
|
56
58
|
|
|
@@ -60,28 +62,37 @@ export const cli = async ({argv, exit, readCoverage}) => {
|
|
|
60
62
|
skipFull,
|
|
61
63
|
});
|
|
62
64
|
|
|
63
|
-
/*
|
|
64
|
-
if (args.format === 'lines')
|
|
65
|
-
output = reportLines(coverage);
|
|
66
|
-
else if (args.format === 'responsive')
|
|
67
|
-
output = reportResponsive(coverage, {
|
|
68
|
-
skipFull: args.skipFull,
|
|
69
|
-
});
|
|
70
|
-
else if (args.format === 'istanbul')
|
|
71
|
-
output = reportIstanbul(coverage);
|
|
72
|
-
else
|
|
73
|
-
output = reportFiles(coverage);
|
|
74
|
-
*/
|
|
75
65
|
process.stdout.write(output);
|
|
76
66
|
};
|
|
77
67
|
|
|
78
68
|
export const isSuccess = (error) => !error || error?.status === Number(process.env.ESCOVER_SUCCESS_EXIT_CODE);
|
|
79
69
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
70
|
+
const maybeAddQuotes = (a) => {
|
|
71
|
+
let start = '';
|
|
72
|
+
let end = '';
|
|
73
|
+
|
|
74
|
+
if (a.at(0) !== '"')
|
|
75
|
+
start = '"';
|
|
76
|
+
|
|
77
|
+
if (a.at(-1) !== '"')
|
|
78
|
+
end = '"';
|
|
79
|
+
|
|
80
|
+
return [start, a, end].join('');
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export function execute(cmd, overrides) {
|
|
84
|
+
const {
|
|
85
|
+
exit,
|
|
86
|
+
run = execSync,
|
|
87
|
+
env = process.env,
|
|
88
|
+
} = overrides;
|
|
89
|
+
|
|
90
|
+
const safeCmd = maybeAddQuotes(cmd.join('" "'));
|
|
91
|
+
|
|
92
|
+
const [error] = tryCatch(run, safeCmd, {
|
|
93
|
+
stdio: 'inherit',
|
|
83
94
|
env: {
|
|
84
|
-
...
|
|
95
|
+
...env,
|
|
85
96
|
NODE_OPTIONS: createNodeOptions(),
|
|
86
97
|
},
|
|
87
98
|
});
|
package/package.json
CHANGED