escover 6.5.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.
package/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ 2026.05.19, v6.5.1
2
+
3
+ fix:
4
+ - 68e799c escover: cli: improve support
5
+
1
6
  2026.05.19, v6.5.0
2
7
 
3
8
  feature:
package/lib/cli/cli.js CHANGED
@@ -67,17 +67,11 @@ export const cli = async ({argv, exit, readCoverage}) => {
67
67
 
68
68
  export const isSuccess = (error) => !error || error?.status === Number(process.env.ESCOVER_SUCCESS_EXIT_CODE);
69
69
 
70
- const maybeAddQuotes = (a) => {
71
- let start = '';
72
- let end = '';
70
+ const makeCmdSafe = (cmd) => {
71
+ if (cmd.length === 1)
72
+ return cmd.join('');
73
73
 
74
- if (a.at(0) !== '"')
75
- start = '"';
76
-
77
- if (a.at(-1) !== '"')
78
- end = '"';
79
-
80
- return [start, a, end].join('');
74
+ return `"${cmd.join('" "')}"`;
81
75
  };
82
76
 
83
77
  export function execute(cmd, overrides) {
@@ -87,7 +81,7 @@ export function execute(cmd, overrides) {
87
81
  env = process.env,
88
82
  } = overrides;
89
83
 
90
- const safeCmd = maybeAddQuotes(cmd.join('" "'));
84
+ const safeCmd = makeCmdSafe(cmd);
91
85
 
92
86
  const [error] = tryCatch(run, safeCmd, {
93
87
  stdio: 'inherit',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "escover",
3
- "version": "6.5.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",