File tree Expand file tree Collapse file tree 3 files changed +33
-11
lines changed Expand file tree Collapse file tree 3 files changed +33
-11
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ jobs:
10
10
fail-fast : false
11
11
matrix :
12
12
node-version :
13
+ - 24
13
14
- 20
14
- - 18
15
15
steps :
16
- - uses : actions/checkout@v4
17
- - uses : actions/setup-node@v4
16
+ - uses : actions/checkout@v5
17
+ - uses : actions/setup-node@v5
18
18
with :
19
19
node-version : ${{ matrix.node-version }}
20
20
- run : npm install
Original file line number Diff line number Diff line change 12
12
},
13
13
"type" : " module" ,
14
14
"exports" : " ./index.js" ,
15
+ "sideEffects" : false ,
15
16
"engines" : {
16
- "node" : " >=18 "
17
+ "node" : " >=20 "
17
18
},
18
19
"scripts" : {
19
20
"test" : " xo && ava"
39
40
" esprima"
40
41
],
41
42
"dependencies" : {
42
- "@babel/core" : " ^7.23.2 " ,
43
- "gulp-plugin-extras" : " ^0.3 .0" ,
44
- "strip-debug" : " ^7 .0.0"
43
+ "@babel/core" : " ^7.28.4 " ,
44
+ "gulp-plugin-extras" : " ^1.1 .0" ,
45
+ "strip-debug" : " ^8 .0.0"
45
46
},
46
47
"devDependencies" : {
47
- "ava" : " ^5.3 .1" ,
48
- "p-event" : " ^6 .0.0" ,
49
- "vinyl" : " ^3.0.0 " ,
50
- "xo" : " ^0.56.0 "
48
+ "ava" : " ^6.4 .1" ,
49
+ "p-event" : " ^7 .0.0" ,
50
+ "vinyl" : " ^3.0.1 " ,
51
+ "xo" : " ^1.2.2 "
51
52
},
52
53
"peerDependencies" : {
53
54
"gulp" : " >=4"
Original file line number Diff line number Diff line change @@ -27,3 +27,24 @@ test('strips `console.log()` statements', async t => {
27
27
const file = await promise ;
28
28
t . is ( file . contents . toString ( ) , 'function test() {\n void 0;\n}' ) ;
29
29
} ) ;
30
+
31
+ test ( 'works with ES module import/export statements' , async t => {
32
+ const stream = stripDebug ( ) ;
33
+ const promise = pEvent ( stream , 'data' ) ;
34
+
35
+ stream . end ( new Vinyl ( {
36
+ contents : Buffer . from ( `import {foo} from './foo.js';
37
+ export function test() {
38
+ console.log('debug info');
39
+ debugger;
40
+ return foo();
41
+ }` ) ,
42
+ } ) ) ;
43
+
44
+ const file = await promise ;
45
+ t . is ( file . contents . toString ( ) , `import { foo } from './foo.js';
46
+ export function test() {
47
+ void 0;
48
+ return foo();
49
+ }` ) ;
50
+ } ) ;
You can’t perform that action at this time.
0 commit comments