escover 6.3.2 → 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 CHANGED
@@ -1,3 +1,17 @@
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
+
9
+ 2026.05.16, v6.4.0
10
+
11
+ feature:
12
+ - 0a8db2e escover: plugin-mark: UnaryExpression
13
+ - 1107970 @escover/converter-istanbul: simplify
14
+
1
15
  2026.05.15, v6.3.2
2
16
 
3
17
  fix:
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,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
- function execute(cmd, exit) {
81
- const [error] = tryCatch(execSync, cmd, {
82
- stdio: [0, 1, 2],
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
- ...process.env,
95
+ ...env,
85
96
  NODE_OPTIONS: createNodeOptions(),
86
97
  },
87
98
  });
@@ -108,6 +108,13 @@ export const fix = (path, {options}) => {
108
108
  path.node,
109
109
  ]);
110
110
 
111
+ if (path.isExpressionStatement()) {
112
+ const expressionPath = path.get('expression');
113
+ replaceWith(expressionPath, sequenceExpression([lineNode, expressionPath.node]));
114
+
115
+ return;
116
+ }
117
+
111
118
  if (path.isExpression()) {
112
119
  const {node} = path;
113
120
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "escover",
3
- "version": "6.3.2",
3
+ "version": "6.5.0",
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",
@@ -58,11 +58,11 @@
58
58
  "devDependencies": {
59
59
  "@putout/eslint-flat": "^4.0.0",
60
60
  "@putout/test": "^15.1.1",
61
- "c8": "^11.0.0",
62
61
  "escover": "file:.",
63
62
  "eslint": "^10.0.0",
64
63
  "eslint-plugin-putout": "^31.0.0",
65
64
  "madrun": "^13.0.0",
65
+ "superc8": "^12.7.0",
66
66
  "supertape": "^13.1.1"
67
67
  }
68
68
  }