escover 2.5.3 → 3.0.0
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 +6 -0
- package/lib/cli/cli.js +1 -1
- package/lib/instrument/index.js +4 -7
- package/lib/instrument/plugin-mark/index.js +2 -1
- package/lib/transform.js +1 -0
- package/package.json +3 -1
package/ChangeLog
CHANGED
package/lib/cli/cli.js
CHANGED
package/lib/instrument/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
transform,
|
|
5
|
-
} from 'putout';
|
|
1
|
+
import {transform} from 'putout';
|
|
2
|
+
import {parse} from '@babel/parser';
|
|
3
|
+
import {print} from '@putout/printer';
|
|
6
4
|
import * as mark from './plugin-mark/index.js';
|
|
7
5
|
|
|
8
6
|
export const instrument = (url, source) => {
|
|
@@ -23,8 +21,7 @@ export const instrument = (url, source) => {
|
|
|
23
21
|
const ast = parse(source);
|
|
24
22
|
|
|
25
23
|
transform(ast, source, options);
|
|
26
|
-
const {code} = generate(ast);
|
|
27
24
|
|
|
28
|
-
return
|
|
25
|
+
return print(ast);
|
|
29
26
|
};
|
|
30
27
|
|
|
@@ -28,6 +28,7 @@ const buildLineNode = template(LINE, {
|
|
|
28
28
|
});
|
|
29
29
|
|
|
30
30
|
function getLineNode(c4, {line, column}) {
|
|
31
|
+
debugger;
|
|
31
32
|
c4.init(line, column);
|
|
32
33
|
|
|
33
34
|
return buildLineNode({
|
|
@@ -40,7 +41,7 @@ export const report = () => 'Mark line';
|
|
|
40
41
|
|
|
41
42
|
export const fix = (path, {options}) => {
|
|
42
43
|
const {node} = path;
|
|
43
|
-
const {start} = path.node.loc
|
|
44
|
+
const {start} = path.node.loc;
|
|
44
45
|
|
|
45
46
|
const {
|
|
46
47
|
c4 = {
|
package/lib/transform.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "escover",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
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,6 +39,8 @@
|
|
|
39
39
|
"prewisdom": "madrun prewisdom"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
+
"@babel/parser": "^7.21.8",
|
|
43
|
+
"@putout/printer": "^1.80.3",
|
|
42
44
|
"chalk": "^5.0.0",
|
|
43
45
|
"find-cache-dir": "^4.0.0",
|
|
44
46
|
"find-up": "^6.2.0",
|