Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

del-cli

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

del-cli - npm Package Compare versions

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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc