escover 6.1.0 → 6.1.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.07, v6.1.1
2
+
3
+ fix:
4
+ - 2797fee escover: cli: keep NODE_OPTIONS
5
+
1
6
  2026.05.07, v6.1.0
2
7
 
3
8
  feature:
package/lib/cli/cli.js CHANGED
@@ -6,11 +6,18 @@ import {version} from './version.js';
6
6
  import reportLines from '../formatters/lines.js';
7
7
  import reportFiles from '../formatters/files.js';
8
8
 
9
+ const {env} = process;
10
+
9
11
  const noop = () => {};
10
12
 
11
- const {ESCOVER_FORMAT} = process.env;
13
+ const {NODE_OPTIONS, ESCOVER_FORMAT} = env;
12
14
 
13
- export const ESCOVER_NODE_OPTIONS = '--import escover/register';
15
+ export const createNodeOptions = (options = NODE_OPTIONS) => {
16
+ if (!options.includes('escover/register'))
17
+ return `--import escover/register ${options}`;
18
+
19
+ return options;
20
+ };
14
21
 
15
22
  export const cli = ({argv, exit, readCoverage}) => {
16
23
  const args = yargsParser(argv.slice(2), {
@@ -50,11 +57,12 @@ export const cli = ({argv, exit, readCoverage}) => {
50
57
  export const isSuccess = (error) => !error || error?.status === Number(process.env.ESCOVER_SUCCESS_EXIT_CODE);
51
58
 
52
59
  function execute(cmd, exit) {
60
+ console.log(createNodeOptions());
53
61
  const [error] = tryCatch(execSync, cmd, {
54
62
  stdio: [0, 1, 2],
55
63
  env: {
56
64
  ...process.env,
57
- NODE_OPTIONS: ESCOVER_NODE_OPTIONS,
65
+ NODE_OPTIONS: createNodeOptions(),
58
66
  },
59
67
  });
60
68
 
@@ -66,3 +74,4 @@ function execute(cmd, exit) {
66
74
  return exit(1);
67
75
  }
68
76
  }
77
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "escover",
3
- "version": "6.1.0",
3
+ "version": "6.1.1",
4
4
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
5
5
  "description": "Coverage for EcmaScript Modules",
6
6
  "main": "lib/escover.js",