diff options
author | isaacs <i@izs.me> | 2012-06-09 02:15:40 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-06-09 02:15:40 +0400 |
commit | e832e71c0d959eee7473e1f1eeebbfa7b0638738 (patch) | |
tree | d1320e30d14745f04281dc45e238413c8609ad7a /node_modules | |
parent | 636a58720df364a88e8fe8ed2afc780239d320dc (diff) |
Upgrade rimraf
Diffstat (limited to 'node_modules')
-rw-r--r-- | node_modules/rimraf/package.json | 75 | ||||
-rw-r--r-- | node_modules/rimraf/rimraf.js | 16 |
2 files changed, 77 insertions, 14 deletions
diff --git a/node_modules/rimraf/package.json b/node_modules/rimraf/package.json index 952bc8af9..c8aa86f55 100644 --- a/node_modules/rimraf/package.json +++ b/node_modules/rimraf/package.json @@ -1,10 +1,65 @@ -{"name":"rimraf" -,"version":"2.0.1" -,"main":"rimraf.js" -,"description":"A deep deletion module for node (like `rm -rf`)" -,"author":"Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)" -,"license": - {"type":"MIT", "url": "https://github.com/isaacs/rimraf/raw/master/LICENSE"} -,"optionalDependencies":{"graceful-fs":"~1.1"} -,"repository":"git://github.com/isaacs/rimraf.git" -,"scripts":{"test":"cd test && bash run.sh"}} +{ + "name": "rimraf", + "version": "2.0.2", + "main": "rimraf.js", + "description": "A deep deletion module for node (like `rm -rf`)", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": { + "type": "MIT", + "url": "https://github.com/isaacs/rimraf/raw/master/LICENSE" + }, + "optionalDependencies": { + "graceful-fs": "~1.1" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/rimraf.git" + }, + "scripts": { + "test": "cd test && bash run.sh" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_id": "rimraf@2.0.2", + "contributors": [ + { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + { + "name": "Wayne Larsen", + "email": "wayne@larsen.st", + "url": "http://github.com/wvl" + }, + { + "name": "ritch", + "email": "skawful@gmail.com" + }, + { + "name": "Marcel Laverdet" + }, + { + "name": "Yosef Dinerstein", + "email": "yosefd@microsoft.com" + } + ], + "dependencies": { + "graceful-fs": "~1.1" + }, + "devDependencies": {}, + "engines": { + "node": "*" + }, + "_engineSupported": true, + "_npmVersion": "1.1.24", + "_nodeVersion": "v0.7.10-pre", + "_defaultsLoaded": true, + "_from": "rimraf@2" +} diff --git a/node_modules/rimraf/rimraf.js b/node_modules/rimraf/rimraf.js index 67d018ab4..bb1bb8cc2 100644 --- a/node_modules/rimraf/rimraf.js +++ b/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. |