Skip to content

Commit b977982

Browse files
committedJul 19, 2022
Require Node.js 14
1 parent 1f012a4 commit b977982

File tree

5 files changed

+20
-22
lines changed

5 files changed

+20
-22
lines changed
 

‎.github/workflows/main.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
node-version:
13+
- 18
1314
- 16
1415
- 14
15-
- 12
1616
steps:
17-
- uses: actions/checkout@v2
18-
- uses: actions/setup-node@v2
17+
- uses: actions/checkout@v3
18+
- uses: actions/setup-node@v3
1919
with:
2020
node-version: ${{ matrix.node-version }}
2121
- run: npm install

‎cli.js

+8-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env node
2+
import process from 'node:process';
23
import meow from 'meow';
3-
import del from 'del';
4+
import {deleteAsync} from 'del';
45

56
const cli = meow(`
67
Usage
@@ -27,16 +28,13 @@ const cli = meow(`
2728
},
2829
});
2930

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);
3836

3937
if (cli.flags.dryRun) {
4038
console.log(files.join('\n'));
4139
}
42-
})();
40+
}

‎package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"del-cli": "./cli.js"
1717
},
1818
"engines": {
19-
"node": ">=12.20"
19+
"node": ">=14.16"
2020
},
2121
"scripts": {
2222
"test": "xo && ava"
@@ -50,13 +50,13 @@
5050
"cross-platform"
5151
],
5252
"dependencies": {
53-
"del": "^6.0.0",
54-
"meow": "^10.1.0"
53+
"del": "^7.0.0",
54+
"meow": "^10.1.3"
5555
},
5656
"devDependencies": {
57-
"ava": "^3.15.0",
58-
"execa": "^5.1.1",
57+
"ava": "^4.3.1",
58+
"execa": "^6.1.0",
5959
"temp-write": "^5.0.0",
60-
"xo": "^0.41.0"
60+
"xo": "^0.50.0"
6161
}
6262
}

‎readme.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Useful for use in build scripts and automated things.
88

99
## Install
1010

11-
```
12-
$ npm install --global del-cli
11+
```sh
12+
npm install --global del-cli
1313
```
1414

1515
## Usage

‎test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import fs from 'node:fs';
22
import test from 'ava';
33
import tempWrite from 'temp-write';
4-
import execa from 'execa';
4+
import {execa} from 'execa';
55

66
test('main', async t => {
77
const filename = tempWrite.sync('foo');

0 commit comments

Comments
 (0)
Please sign in to comment.