Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSakthipriyan Vairamani <thechargingvolcano@gmail.com>2016-07-27 09:29:16 +0300
committerRebecca Turner <me@re-becca.org>2016-08-12 01:25:56 +0300
commit7e0cdff04714709f6dc056b19422d3f937502f1c (patch)
tree9000dc4fb5f20d02017f490409d43ad72b596610 /node_modules/graceful-fs
parentc23af21d4cedd7fedcb4168672044db76ad054a8 (diff)
graceful-fs@4.1.5
graceful-fs had a bug fix, https://github.com/isaacs/node-graceful-fs/pull/71, which would fix the problem in Node.js https://github.com/nodejs/node/pull/7846 PR-URL: https://github.com/npm/npm/pull/13497 Credit: @thefourtheye Reviewed-By: @iarna
Diffstat (limited to 'node_modules/graceful-fs')
-rw-r--r--node_modules/graceful-fs/README.md2
-rw-r--r--node_modules/graceful-fs/package.json54
-rw-r--r--node_modules/graceful-fs/polyfills.js55
3 files changed, 71 insertions, 40 deletions
diff --git a/node_modules/graceful-fs/README.md b/node_modules/graceful-fs/README.md
index d0dcd4925..5273a50ad 100644
--- a/node_modules/graceful-fs/README.md
+++ b/node_modules/graceful-fs/README.md
@@ -7,7 +7,7 @@ The improvements are meant to normalize behavior across different
platforms and environments, and to make filesystem access more
resilient to errors.
-## Improvements over [fs module](http://api.nodejs.org/fs.html)
+## Improvements over [fs module](https://nodejs.org/api/fs.html)
* Queues up `open` and `readdir` calls, and retries them once
something closes if there is an EMFILE error from too many file
diff --git a/node_modules/graceful-fs/package.json b/node_modules/graceful-fs/package.json
index cca5d89f6..f185e44af 100644
--- a/node_modules/graceful-fs/package.json
+++ b/node_modules/graceful-fs/package.json
@@ -1,35 +1,45 @@
{
"_args": [
[
- "graceful-fs@~4.1.3",
+ {
+ "raw": "graceful-fs@~4.1.4",
+ "scope": null,
+ "escapedName": "graceful-fs",
+ "name": "graceful-fs",
+ "rawSpec": "~4.1.4",
+ "spec": ">=4.1.4 <4.2.0",
+ "type": "range"
+ },
"/Users/rebecca/code/npm"
]
],
- "_from": "graceful-fs@>=4.1.3 <4.2.0",
- "_id": "graceful-fs@4.1.4",
+ "_from": "graceful-fs@>=4.1.4 <4.2.0",
+ "_id": "graceful-fs@4.1.5",
"_inCache": true,
"_installable": true,
"_location": "/graceful-fs",
- "_nodeVersion": "5.6.0",
+ "_nodeVersion": "4.4.4",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/graceful-fs-4.1.4.tgz_1462474854900_0.9423982477746904"
+ "tmp": "tmp/graceful-fs-4.1.5.tgz_1469558843062_0.986795610981062"
},
"_npmUser": {
- "email": "i@izs.me",
- "name": "isaacs"
+ "name": "isaacs",
+ "email": "i@izs.me"
},
- "_npmVersion": "3.8.9",
+ "_npmVersion": "3.10.6",
"_phantomChildren": {},
"_requested": {
- "name": "graceful-fs",
- "raw": "graceful-fs@~4.1.3",
- "rawSpec": "~4.1.3",
+ "raw": "graceful-fs@~4.1.4",
"scope": null,
- "spec": ">=4.1.3 <4.2.0",
+ "escapedName": "graceful-fs",
+ "name": "graceful-fs",
+ "rawSpec": "~4.1.4",
+ "spec": ">=4.1.4 <4.2.0",
"type": "range"
},
"_requiredBy": [
+ "#USER",
"/",
"/cmd-shim",
"/fs-vacuum",
@@ -45,14 +55,12 @@
"/standard/eslint/file-entry-cache/flat-cache",
"/standard/eslint/file-entry-cache/flat-cache/read-json-sync",
"/tacks",
- "/tap/nyc/read-pkg/load-json-file",
- "/tap/nyc/read-pkg/path-type",
"/write-file-atomic"
],
- "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.4.tgz",
- "_shasum": "ef089d2880f033b011823ce5c8fae798da775dbd",
+ "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.5.tgz",
+ "_shasum": "f4745e8caed5e0dd2ef21bb5e2d229a32e8093c0",
"_shrinkwrap": null,
- "_spec": "graceful-fs@~4.1.3",
+ "_spec": "graceful-fs@~4.1.4",
"_where": "/Users/rebecca/code/npm",
"bugs": {
"url": "https://github.com/isaacs/node-graceful-fs/issues"
@@ -68,8 +76,8 @@
"test": "test"
},
"dist": {
- "shasum": "ef089d2880f033b011823ce5c8fae798da775dbd",
- "tarball": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.4.tgz"
+ "shasum": "f4745e8caed5e0dd2ef21bb5e2d229a32e8093c0",
+ "tarball": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.5.tgz"
},
"engines": {
"node": ">=0.4.0"
@@ -80,7 +88,7 @@
"legacy-streams.js",
"polyfills.js"
],
- "gitHead": "fe8f05ccc2779d1dfa6db6173f3ed64f1e9aa72c",
+ "gitHead": "d170f3f2ceb56adb4d6bd50df4b535bed54120c0",
"homepage": "https://github.com/isaacs/node-graceful-fs#readme",
"keywords": [
"fs",
@@ -102,8 +110,8 @@
"main": "graceful-fs.js",
"maintainers": [
{
- "email": "i@izs.me",
- "name": "isaacs"
+ "name": "isaacs",
+ "email": "i@izs.me"
}
],
"name": "graceful-fs",
@@ -116,5 +124,5 @@
"scripts": {
"test": "node test.js | tap -"
},
- "version": "4.1.4"
+ "version": "4.1.5"
}
diff --git a/node_modules/graceful-fs/polyfills.js b/node_modules/graceful-fs/polyfills.js
index 5e4f48046..1cc74c823 100644
--- a/node_modules/graceful-fs/polyfills.js
+++ b/node_modules/graceful-fs/polyfills.js
@@ -44,28 +44,28 @@ function patch (fs) {
fs.fchown = chownFix(fs.fchown)
fs.lchown = chownFix(fs.lchown)
- fs.chmod = chownFix(fs.chmod)
- fs.fchmod = chownFix(fs.fchmod)
- fs.lchmod = chownFix(fs.lchmod)
+ fs.chmod = chmodFix(fs.chmod)
+ fs.fchmod = chmodFix(fs.fchmod)
+ fs.lchmod = chmodFix(fs.lchmod)
fs.chownSync = chownFixSync(fs.chownSync)
fs.fchownSync = chownFixSync(fs.fchownSync)
fs.lchownSync = chownFixSync(fs.lchownSync)
- fs.chmodSync = chownFix(fs.chmodSync)
- fs.fchmodSync = chownFix(fs.fchmodSync)
- fs.lchmodSync = chownFix(fs.lchmodSync)
+ fs.chmodSync = chmodFixSync(fs.chmodSync)
+ fs.fchmodSync = chmodFixSync(fs.fchmodSync)
+ fs.lchmodSync = chmodFixSync(fs.lchmodSync)
// if lchmod/lchown do not exist, then make them no-ops
if (!fs.lchmod) {
fs.lchmod = function (path, mode, cb) {
- process.nextTick(cb)
+ if (cb) process.nextTick(cb)
}
fs.lchmodSync = function () {}
}
if (!fs.lchown) {
fs.lchown = function (path, uid, gid, cb) {
- process.nextTick(cb)
+ if (cb) process.nextTick(cb)
}
fs.lchownSync = function () {}
}
@@ -121,20 +121,19 @@ function patch (fs) {
function patchLchmod (fs) {
fs.lchmod = function (path, mode, callback) {
- callback = callback || noop
fs.open( path
, constants.O_WRONLY | constants.O_SYMLINK
, mode
, function (err, fd) {
if (err) {
- callback(err)
+ if (callback) callback(err)
return
}
// prefer to return the chmod error, if one occurs,
// but still try to close, and report closing errors if they occur.
fs.fchmod(fd, mode, function (err) {
fs.close(fd, function(err2) {
- callback(err || err2)
+ if (callback) callback(err || err2)
})
})
})
@@ -167,11 +166,13 @@ function patchLutimes (fs) {
if (constants.hasOwnProperty("O_SYMLINK")) {
fs.lutimes = function (path, at, mt, cb) {
fs.open(path, constants.O_SYMLINK, function (er, fd) {
- cb = cb || noop
- if (er) return cb(er)
+ if (er) {
+ if (cb) cb(er)
+ return
+ }
fs.futimes(fd, at, mt, function (er) {
fs.close(fd, function (er2) {
- return cb(er || er2)
+ if (cb) cb(er || er2)
})
})
})
@@ -197,17 +198,39 @@ function patchLutimes (fs) {
}
} else {
- fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) }
+ fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) }
fs.lutimesSync = function () {}
}
}
+function chmodFix (orig) {
+ if (!orig) return orig
+ return function (target, mode, cb) {
+ return orig.call(fs, target, mode, function (er, res) {
+ if (chownErOk(er)) er = null
+ if (cb) cb(er, res)
+ })
+ }
+}
+
+function chmodFixSync (orig) {
+ if (!orig) return orig
+ return function (target, mode) {
+ try {
+ return orig.call(fs, target, mode)
+ } catch (er) {
+ if (!chownErOk(er)) throw er
+ }
+ }
+}
+
+
function chownFix (orig) {
if (!orig) return orig
return function (target, uid, gid, cb) {
return orig.call(fs, target, uid, gid, function (er, res) {
if (chownErOk(er)) er = null
- cb(er, res)
+ if (cb) cb(er, res)
})
}
}