escover 6.4.0 → 6.5.1

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.
Files changed (3) hide show
  1. package/ChangeLog +13 -0
  2. package/lib/cli/cli.js +22 -17
  3. package/package.json +1 -1
package/ChangeLog CHANGED
@@ -1,3 +1,16 @@
1
+ 2026.05.19, v6.5.1
2
+
3
+ fix:
4
+ - 68e799c escover: cli: improve support
5
+
6
+ 2026.05.19, v6.5.0
7
+
8
+ feature:
9
+ - c196e66 escover: cli: execute: quotes
10
+ - aef2e3c @escover/formatter-responsive: move out table
11
+ - e283240 @escover/formatter-responsive: parser: move out
12
+ - 166b21b @escover: formatter-responsive: calculator
13
+
1
14
  2026.05.16, v6.4.0
2
15
 
3
16
  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(`"${cmd.join('" "')}"`, exit);
53
+ execute(cmd, {
54
+ exit,
55
+ });
54
56
 
55
57
  const coverage = readCoverage();
56
58
 
@@ -60,28 +62,31 @@ 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
- function execute(cmd, exit) {
81
- const [error] = tryCatch(execSync, cmd, {
82
- stdio: [0, 1, 2],
70
+ const makeCmdSafe = (cmd) => {
71
+ if (cmd.length === 1)
72
+ return cmd.join('');
73
+
74
+ return `"${cmd.join('" "')}"`;
75
+ };
76
+
77
+ export function execute(cmd, overrides) {
78
+ const {
79
+ exit,
80
+ run = execSync,
81
+ env = process.env,
82
+ } = overrides;
83
+
84
+ const safeCmd = makeCmdSafe(cmd);
85
+
86
+ const [error] = tryCatch(run, safeCmd, {
87
+ stdio: 'inherit',
83
88
  env: {
84
- ...process.env,
89
+ ...env,
85
90
  NODE_OPTIONS: createNodeOptions(),
86
91
  },
87
92
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "escover",
3
- "version": "6.4.0",
3
+ "version": "6.5.1",
4
4
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
5
5
  "description": "Coverage for EcmaScript Modules",
6
6
  "main": "packages/escover/lib/escover.js",