Comparing version 4.0.1 to 5.0.0
18
cli.js
#!/usr/bin/env node | ||
import process from 'node:process'; | ||
import meow from 'meow'; | ||
import del from 'del'; | ||
import {deleteAsync} from 'del'; | ||
@@ -30,14 +31,11 @@ const cli = meow(` | ||
(async () => { | ||
if (cli.input.length === 0) { | ||
console.error('Specify at least one path'); | ||
process.exitCode = 1; | ||
return; | ||
} | ||
if (cli.input.length === 0) { | ||
console.error('Specify at least one path'); | ||
process.exitCode = 1; | ||
} else { | ||
const files = await deleteAsync(cli.input, cli.flags); | ||
const files = await del(cli.input, cli.flags); | ||
if (cli.flags.dryRun) { | ||
console.log(files.join('\n')); | ||
} | ||
})(); | ||
} |
{ | ||
"name": "del-cli", | ||
"version": "4.0.1", | ||
"version": "5.0.0", | ||
"description": "Delete files and directories - Cross-platform", | ||
@@ -19,3 +19,3 @@ "license": "MIT", | ||
"engines": { | ||
"node": ">=12.20" | ||
"node": ">=14.16" | ||
}, | ||
@@ -54,11 +54,11 @@ "scripts": { | ||
"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" | ||
} | ||
} |
@@ -11,5 +11,5 @@ # del-cli | ||
```sh | ||
npm install --global del-cli | ||
``` | ||
$ npm install --global del-cli | ||
``` | ||
@@ -35,2 +35,8 @@ ## Usage | ||
## Comparison | ||
Benefits over `rimraf` CLI: Supports globbing (even on Windows), safer by default as it doesn't allow deleting parent directories, and has a dry-run mode. | ||
Benefits over `rm -rf`: Cross-platform, safer by default as it doesn't allow deleting parent directories, and has a dry-run mode. | ||
## Related | ||
@@ -37,0 +43,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4160
322669
45
35
+ Addedaggregate-error@4.0.1(transitive)
+ Addedclean-stack@4.2.0(transitive)
+ Addeddel@7.1.0(transitive)
+ Addedescape-string-regexp@5.0.0(transitive)
+ Addedglobby@13.2.2(transitive)
+ Addedis-path-cwd@3.0.0(transitive)
+ Addedis-path-inside@4.0.0(transitive)
+ Addedp-map@5.5.0(transitive)
+ Addedslash@4.0.0(transitive)
- Removedaggregate-error@3.1.0(transitive)
- Removedarray-union@2.1.0(transitive)
- Removedclean-stack@2.2.0(transitive)
- Removeddel@6.1.1(transitive)
- Removedglobby@11.1.0(transitive)
- Removedindent-string@4.0.0(transitive)
- Removedis-path-cwd@2.2.0(transitive)
- Removedis-path-inside@3.0.3(transitive)
- Removedp-map@4.0.0(transitive)
- Removedslash@3.0.0(transitive)
Updateddel@^7.0.0
Updatedmeow@^10.1.3