@zkochan/rimraf
Advanced tools
Comparing version 2.0.0 to 2.1.0
11
index.js
@@ -1,2 +0,2 @@ | ||
const { promises: fs } = require('fs') | ||
const { promises: fs, rmdirSync } = require('fs') | ||
@@ -11,1 +11,10 @@ module.exports = async (p) => { | ||
} | ||
module.exports.sync = (p) => { | ||
try { | ||
rmdirSync(p, { recursive: true, maxRetries: 3 }) | ||
} catch (err) { | ||
if (err.code === 'ENOTDIR' || err.code === 'ENOENT') return | ||
throw err | ||
} | ||
} |
{ | ||
"name": "@zkochan/rimraf", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "rm -rf for Node. Similar to rimraf but returns a promise", | ||
@@ -15,3 +15,3 @@ "main": "index.js", | ||
"engines": { | ||
"node": ">=8.15" | ||
"node": ">=12.10" | ||
}, | ||
@@ -27,4 +27,4 @@ "repository": "https://github.com/zkochan/packages/tree/master/rimraf", | ||
"devDependencies": { | ||
"standard": "^16.0.1" | ||
"standard": "^16.0.3" | ||
} | ||
} |
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
2841
6
19