escover 3.3.0 → 3.3.2

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,13 @@
1
+ 2023.06.08, v3.3.2
2
+
3
+ fix:
4
+ - 2792d33 drop console.log
5
+
6
+ 2023.05.31, v3.3.1
7
+
8
+ feature:
9
+ - 9c0b9bb escover: loader: add
10
+
1
11
  2023.05.26, v3.3.0
2
12
 
3
13
  fix:
package/lib/cli/cli.js CHANGED
@@ -9,7 +9,6 @@ const {ESCOVER_FORMAT} = process.env;
9
9
 
10
10
  export const ESCOVER_NODE_OPTIONS = '--no-warnings --loader zenload';
11
11
 
12
- // ${NODE_OPTIONS}'`;
13
12
  export const cli = ({argv, exit, readCoverage}) => {
14
13
  const args = yargsParser(argv.slice(2), {
15
14
  string: [
package/lib/escover.js CHANGED
@@ -32,8 +32,12 @@ export function globalPreload({port}) {
32
32
  url,
33
33
  line,
34
34
  column,
35
+ loader,
35
36
  } = data;
36
37
 
38
+ if (loader !== 'escover')
39
+ return;
40
+
37
41
  const c4 = createFileEntry(url);
38
42
 
39
43
  if (type === 'set')
@@ -43,28 +47,32 @@ export function globalPreload({port}) {
43
47
  return c4.init(line, column);
44
48
  };
45
49
 
46
- return montag`
47
- global.__createC4 = (url) => {
48
- return {
49
- '🧨': (line, column) => {
50
- port.postMessage({
51
- type: 'set',
52
- url,
53
- line,
54
- column,
55
- });
56
- },
57
- 'init': (line, column) => {
58
- port.postMessage({
59
- type: 'init',
60
- url,
61
- line,
62
- column,
63
- });
64
- },
65
- };
66
- };
67
- `;
50
+ return `(${escover})();`;
51
+ }
52
+
53
+ function escover() {
54
+ const loader = 'escover';
55
+
56
+ global.__createC4 = (url) => ({
57
+ '🧨': (line, column) => {
58
+ port.postMessage({
59
+ type: 'set',
60
+ url,
61
+ line,
62
+ column,
63
+ loader,
64
+ });
65
+ },
66
+ 'init': (line, column) => {
67
+ port.postMessage({
68
+ type: 'init',
69
+ url,
70
+ line,
71
+ column,
72
+ loader,
73
+ });
74
+ },
75
+ });
68
76
  }
69
77
 
70
78
  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.0",
3
+ "version": "3.3.2",
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",