escover 3.2.0 → 3.2.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,14 @@
1
+ 2023.05.05, v3.2.2
2
+
3
+ feature:
4
+ - 1123033 escover: improve node v20 support
5
+
6
+ 2023.05.05, v3.2.1
7
+
8
+ feature:
9
+ - 0c86858 escover: rm unused deps
10
+ - 98ff5ae package: escover v3.2.0
11
+
1
12
  2023.05.05, v3.2.0
2
13
 
3
14
  feature:
@@ -1,7 +1,5 @@
1
1
  import {readFileSync} from 'fs';
2
-
3
2
  const {parse} = JSON;
4
-
5
3
  const packageJson = new URL('../../package.json', import.meta.url);
6
4
 
7
5
  export const version = () => {
package/lib/escover.js CHANGED
@@ -25,12 +25,46 @@ const EXCLUDE = [
25
25
  ];
26
26
 
27
27
  export function globalPreload({port}) {
28
- port.onmessage = createFileEntry;
28
+ port.onmessage = ({data}) => {
29
+ const {
30
+ type,
31
+ url,
32
+ line,
33
+ column,
34
+ } = data;
35
+
36
+ const c4 = createFileEntry(url);
37
+
38
+ if (type === 'set')
39
+ return c4['🧨'](line, column);
40
+
41
+ if (type === 'init')
42
+ return c4.init(line, column);
43
+ };
44
+
29
45
  return montag`
30
- global.__createC4 = port.postMessage.bind(port);
46
+ global.__createC4 = (url) => {
47
+ return {
48
+ '🧨': (line, column) => {
49
+ port.postMessage({
50
+ type: 'set',
51
+ url,
52
+ line,
53
+ column,
54
+ });
55
+ },
56
+ 'init': (line, column) => {
57
+ port.postMessage({
58
+ type: 'init',
59
+ url,
60
+ line,
61
+ column,
62
+ });
63
+ },
64
+ };
65
+ };
31
66
  `;
32
67
  }
33
-
34
68
  export async function load(url, context, defaultLoad) {
35
69
  const {
36
70
  format,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "escover",
3
- "version": "3.2.0",
3
+ "version": "3.2.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",
@@ -39,8 +39,6 @@
39
39
  "prewisdom": "madrun prewisdom"
40
40
  },
41
41
  "dependencies": {
42
- "@babel/parser": "^7.21.8",
43
- "@babel/plugin-proposal-optional-chaining": "^7.21.0",
44
42
  "@putout/plugin-convert-optional-to-logical": "^1.0.0",
45
43
  "@putout/printer": "^1.80.3",
46
44
  "chalk": "^5.0.0",
@@ -64,7 +62,7 @@
64
62
  "devDependencies": {
65
63
  "@putout/test": "^6.4.0",
66
64
  "c8": "^7.8.0",
67
- "escover": "^2.0.1",
65
+ "escover": "^3.2.0",
68
66
  "eslint": "^8.3.0",
69
67
  "eslint-plugin-n": "^15.2.4",
70
68
  "eslint-plugin-putout": "^17.5.1",