escover 3.2.1 → 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 +5 -0
- package/lib/cli/version.js +0 -2
- package/lib/escover.js +37 -2
- package/package.json +1 -1
package/ChangeLog
CHANGED
package/lib/cli/version.js
CHANGED
package/lib/escover.js
CHANGED
|
@@ -25,9 +25,44 @@ const EXCLUDE = [
|
|
|
25
25
|
];
|
|
26
26
|
|
|
27
27
|
export function globalPreload({port}) {
|
|
28
|
-
port.onmessage =
|
|
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 =
|
|
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
68
|
export async function load(url, context, defaultLoad) {
|