escover 3.2.4 → 3.3.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 +13 -0
- package/lib/cli/cli.js +2 -5
- package/lib/escover.js +31 -22
- package/package.json +2 -2
package/ChangeLog
CHANGED
package/lib/cli/cli.js
CHANGED
|
@@ -5,12 +5,9 @@ import {version} from './version.js';
|
|
|
5
5
|
import reportLines from '../formatters/lines.js';
|
|
6
6
|
import reportFiles from '../formatters/files.js';
|
|
7
7
|
|
|
8
|
-
const {
|
|
9
|
-
ESCOVER_FORMAT,
|
|
10
|
-
NODE_OPTIONS = '',
|
|
11
|
-
} = process.env;
|
|
8
|
+
const {ESCOVER_FORMAT} = process.env;
|
|
12
9
|
|
|
13
|
-
export const ESCOVER_NODE_OPTIONS =
|
|
10
|
+
export const ESCOVER_NODE_OPTIONS = '--no-warnings --loader zenload';
|
|
14
11
|
|
|
15
12
|
export const cli = ({argv, exit, readCoverage}) => {
|
|
16
13
|
const args = yargsParser(argv.slice(2), {
|
package/lib/escover.js
CHANGED
|
@@ -32,8 +32,13 @@ export function globalPreload({port}) {
|
|
|
32
32
|
url,
|
|
33
33
|
line,
|
|
34
34
|
column,
|
|
35
|
+
loader,
|
|
35
36
|
} = data;
|
|
36
37
|
|
|
38
|
+
console.log(loader);
|
|
39
|
+
if (loader !== 'escover')
|
|
40
|
+
return;
|
|
41
|
+
|
|
37
42
|
const c4 = createFileEntry(url);
|
|
38
43
|
|
|
39
44
|
if (type === 'set')
|
|
@@ -43,28 +48,32 @@ export function globalPreload({port}) {
|
|
|
43
48
|
return c4.init(line, column);
|
|
44
49
|
};
|
|
45
50
|
|
|
46
|
-
return
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
51
|
+
return `(${escover})();`;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function escover() {
|
|
55
|
+
const loader = 'escover';
|
|
56
|
+
|
|
57
|
+
global.__createC4 = (url) => ({
|
|
58
|
+
'🧨': (line, column) => {
|
|
59
|
+
port.postMessage({
|
|
60
|
+
type: 'set',
|
|
61
|
+
url,
|
|
62
|
+
line,
|
|
63
|
+
column,
|
|
64
|
+
loader,
|
|
65
|
+
});
|
|
66
|
+
},
|
|
67
|
+
'init': (line, column) => {
|
|
68
|
+
port.postMessage({
|
|
69
|
+
type: 'init',
|
|
70
|
+
url,
|
|
71
|
+
line,
|
|
72
|
+
column,
|
|
73
|
+
loader,
|
|
74
|
+
});
|
|
75
|
+
},
|
|
76
|
+
});
|
|
68
77
|
}
|
|
69
78
|
|
|
70
79
|
export async function load(url, context, defaultLoad) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "escover",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.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",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"c8": "^7.8.0",
|
|
65
65
|
"escover": "^3.2.0",
|
|
66
66
|
"eslint": "^8.3.0",
|
|
67
|
-
"eslint-plugin-n": "^
|
|
67
|
+
"eslint-plugin-n": "^16.0.0",
|
|
68
68
|
"eslint-plugin-putout": "^17.5.1",
|
|
69
69
|
"madrun": "^9.0.0",
|
|
70
70
|
"supertape": "^8.0.1"
|