Skip to content

Commit

Permalink
Require Node.js 14
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jul 19, 2022
1 parent 1f012a4 commit b977982
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 22 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
fail-fast: false
matrix:
node-version:
- 18
- 16
- 14
- 12
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install
Expand Down
18 changes: 8 additions & 10 deletions cli.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env node
import process from 'node:process';
import meow from 'meow';
import del from 'del';
import {deleteAsync} from 'del';

const cli = meow(`
Usage
Expand All @@ -27,16 +28,13 @@ const cli = meow(`
},
});

(async () => {
if (cli.input.length === 0) {
console.error('Specify at least one path');
process.exitCode = 1;
return;
}

const files = await del(cli.input, cli.flags);
if (cli.input.length === 0) {
console.error('Specify at least one path');
process.exitCode = 1;
} else {
const files = await deleteAsync(cli.input, cli.flags);

if (cli.flags.dryRun) {
console.log(files.join('\n'));
}
})();
}
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"del-cli": "./cli.js"
},
"engines": {
"node": ">=12.20"
"node": ">=14.16"
},
"scripts": {
"test": "xo && ava"
Expand Down Expand Up @@ -50,13 +50,13 @@
"cross-platform"
],
"dependencies": {
"del": "^6.0.0",
"meow": "^10.1.0"
"del": "^7.0.0",
"meow": "^10.1.3"
},
"devDependencies": {
"ava": "^3.15.0",
"execa": "^5.1.1",
"ava": "^4.3.1",
"execa": "^6.1.0",
"temp-write": "^5.0.0",
"xo": "^0.41.0"
"xo": "^0.50.0"
}
}
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Useful for use in build scripts and automated things.

## Install

```
$ npm install --global del-cli
```sh
npm install --global del-cli
```

## Usage
Expand Down
2 changes: 1 addition & 1 deletion test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fs from 'node:fs';
import test from 'ava';
import tempWrite from 'temp-write';
import execa from 'execa';
import {execa} from 'execa';

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

0 comments on commit b977982

Please sign in to comment.