Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update the bundled "rimraf" to v2.0.2.

  • Loading branch information...
commit 0cea8417d07f075c2dff7c964752760a56048a87 1 parent 0b9b825
@TooTallNate authored
Showing with 18 additions and 18 deletions.
  1. +6 −14 node_modules/rimraf/package.json
  2. +12 −4 node_modules/rimraf/rimraf.js
View
20 node_modules/rimraf/package.json
@@ -1,6 +1,6 @@
{
"name": "rimraf",
- "version": "2.0.1",
+ "version": "2.0.2",
"main": "rimraf.js",
"description": "A deep deletion module for node (like `rm -rf`)",
"author": {
@@ -22,11 +22,6 @@
"scripts": {
"test": "cd test && bash run.sh"
},
- "_npmUser": {
- "name": "tootallnate",
- "email": "nathan@tootallnate.net"
- },
- "_id": "rimraf@2.0.1",
"contributors": [
{
"name": "Isaac Z. Schlueter",
@@ -50,16 +45,13 @@
"email": "yosefd@microsoft.com"
}
],
+ "readme": "A `rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one. Certain\nerrors are handled for you:\n\n* `EBUSY` - rimraf will back off a maximum of opts.maxBusyTries times\n before giving up.\n* `EMFILE` - If too many file descriptors get opened, rimraf will\n patiently wait until more become available.\n\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too. But that's not so good. Use\nthe async API. It's better.\n",
+ "_id": "rimraf@2.0.2",
"dependencies": {
"graceful-fs": "~1.1"
},
- "devDependencies": {},
- "engines": {
- "node": "*"
+ "dist": {
+ "shasum": "2c0bf9288ae49b2a7bd7f491dca3c34db89e6bd6"
},
- "_engineSupported": true,
- "_npmVersion": "1.1.10",
- "_nodeVersion": "v0.6.13",
- "_defaultsLoaded": true,
- "_from": "rimraf@2"
+ "_from": "rimraf@2.0.2"
}
View
16 node_modules/rimraf/rimraf.js
@@ -11,8 +11,16 @@ try {
fs = require("fs")
}
-var lstat = process.platform === "win32" ? "stat" : "lstat"
- , lstatSync = lstat + "Sync"
+var lstat = "lstat"
+if (process.platform === "win32") {
+ // not reliable on windows prior to 0.7.9
+ var v = process.version.replace(/^v/, '').split(/\.|-/).map(Number)
+ if (v[0] === 0 && (v[1] < 7 || v[1] == 7 && v[2] < 9)) {
+ lstat = "stat"
+ }
+}
+if (!fs[lstat]) lstat = "stat"
+var lstatSync = lstat + "Sync"
// for EMFILE handling
var timeout = 0
@@ -28,12 +36,12 @@ function rimraf (p, cb) {
rimraf_(p, function CB (er) {
if (er) {
if (er.code === "EBUSY" && busyTries < exports.BUSYTRIES_MAX) {
- var time = (exports.BUSYTRIES_MAX - busyTries) * 100
busyTries ++
+ var time = busyTries * 100
// try again, with the same exact callback as this one.
return setTimeout(function () {
rimraf_(p, CB)
- })
+ }, time)
}
// this one won't happen if graceful-fs is used.
Please sign in to comment.
Something went wrong with that request. Please try again.