File tree 5 files changed +20
-22
lines changed
5 files changed +20
-22
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,12 @@ jobs:
10
10
fail-fast : false
11
11
matrix :
12
12
node-version :
13
+ - 18
13
14
- 16
14
15
- 14
15
- - 12
16
16
steps :
17
- - uses : actions/checkout@v2
18
- - uses : actions/setup-node@v2
17
+ - uses : actions/checkout@v3
18
+ - uses : actions/setup-node@v3
19
19
with :
20
20
node-version : ${{ matrix.node-version }}
21
21
- run : npm install
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env node
2
+ import process from 'node:process' ;
2
3
import meow from 'meow' ;
3
- import del from 'del' ;
4
+ import { deleteAsync } from 'del' ;
4
5
5
6
const cli = meow ( `
6
7
Usage
@@ -27,16 +28,13 @@ const cli = meow(`
27
28
} ,
28
29
} ) ;
29
30
30
- ( async ( ) => {
31
- if ( cli . input . length === 0 ) {
32
- console . error ( 'Specify at least one path' ) ;
33
- process . exitCode = 1 ;
34
- return ;
35
- }
36
-
37
- const files = await del ( cli . input , cli . flags ) ;
31
+ if ( cli . input . length === 0 ) {
32
+ console . error ( 'Specify at least one path' ) ;
33
+ process . exitCode = 1 ;
34
+ } else {
35
+ const files = await deleteAsync ( cli . input , cli . flags ) ;
38
36
39
37
if ( cli . flags . dryRun ) {
40
38
console . log ( files . join ( '\n' ) ) ;
41
39
}
42
- } ) ( ) ;
40
+ }
Original file line number Diff line number Diff line change 16
16
"del-cli" : " ./cli.js"
17
17
},
18
18
"engines" : {
19
- "node" : " >=12.20 "
19
+ "node" : " >=14.16 "
20
20
},
21
21
"scripts" : {
22
22
"test" : " xo && ava"
50
50
" cross-platform"
51
51
],
52
52
"dependencies" : {
53
- "del" : " ^6 .0.0" ,
54
- "meow" : " ^10.1.0 "
53
+ "del" : " ^7 .0.0" ,
54
+ "meow" : " ^10.1.3 "
55
55
},
56
56
"devDependencies" : {
57
- "ava" : " ^3.15.0 " ,
58
- "execa" : " ^5 .1.1 " ,
57
+ "ava" : " ^4.3.1 " ,
58
+ "execa" : " ^6 .1.0 " ,
59
59
"temp-write" : " ^5.0.0" ,
60
- "xo" : " ^0.41 .0"
60
+ "xo" : " ^0.50 .0"
61
61
}
62
62
}
Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ Useful for use in build scripts and automated things.
8
8
9
9
## Install
10
10
11
- ```
12
- $ npm install --global del-cli
11
+ ``` sh
12
+ npm install --global del-cli
13
13
```
14
14
15
15
## Usage
Original file line number Diff line number Diff line change 1
1
import fs from 'node:fs' ;
2
2
import test from 'ava' ;
3
3
import tempWrite from 'temp-write' ;
4
- import execa from 'execa' ;
4
+ import { execa } from 'execa' ;
5
5
6
6
test ( 'main' , async t => {
7
7
const filename = tempWrite . sync ( 'foo' ) ;
You can’t perform that action at this time.
0 commit comments