diff --git a/benchmarks/node_modules/balanced-match/index.js b/benchmarks/node_modules/balanced-match/index.js index e8d85870..1685a762 100644 --- a/benchmarks/node_modules/balanced-match/index.js +++ b/benchmarks/node_modules/balanced-match/index.js @@ -1,3 +1,4 @@ +'use strict'; module.exports = balanced; function balanced(a, b, str) { if (a instanceof RegExp) a = maybeMatch(a, str); diff --git a/benchmarks/node_modules/balanced-match/package.json b/benchmarks/node_modules/balanced-match/package.json index 8ec4c8c5..dc208685 100644 --- a/benchmarks/node_modules/balanced-match/package.json +++ b/benchmarks/node_modules/balanced-match/package.json @@ -1,33 +1,32 @@ { - "_from": "balanced-match@^0.4.1", - "_id": "balanced-match@0.4.2", - "_integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "_from": "balanced-match@^1.0.0", + "_id": "balanced-match@1.0.0", + "_inBundle": false, + "_integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "_location": "/balanced-match", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "balanced-match@^0.4.1", + "raw": "balanced-match@^1.0.0", "name": "balanced-match", "escapedName": "balanced-match", - "rawSpec": "^0.4.1", + "rawSpec": "^1.0.0", "saveSpec": null, - "fetchSpec": "^0.4.1" + "fetchSpec": "^1.0.0" }, "_requiredBy": [ "/brace-expansion" ], - "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", - "_shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838", - "_shrinkwrap": null, - "_spec": "balanced-match@^0.4.1", + "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "_shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767", + "_spec": "balanced-match@^1.0.0", "_where": "/Users/isaacs/dev/js/tar/benchmarks/node_modules/brace-expansion", "author": { "name": "Julian Gruber", "email": "mail@juliangruber.com", "url": "http://juliangruber.com" }, - "bin": null, "bugs": { "url": "https://github.com/juliangruber/balanced-match/issues" }, @@ -36,6 +35,7 @@ "deprecated": false, "description": "Match balanced character pairs, like \"{\" and \"}\"", "devDependencies": { + "matcha": "^0.7.0", "tape": "^4.6.0" }, "homepage": "https://github.com/juliangruber/balanced-match", @@ -49,13 +49,12 @@ "license": "MIT", "main": "index.js", "name": "balanced-match", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/juliangruber/balanced-match.git" }, "scripts": { + "bench": "make bench", "test": "make test" }, "testling": { @@ -74,5 +73,5 @@ "android-browser/4.2..latest" ] }, - "version": "0.4.2" + "version": "1.0.0" } diff --git a/benchmarks/node_modules/brace-expansion/README.md b/benchmarks/node_modules/brace-expansion/README.md index ed2ec1fd..6b4e0e16 100644 --- a/benchmarks/node_modules/brace-expansion/README.md +++ b/benchmarks/node_modules/brace-expansion/README.md @@ -63,7 +63,7 @@ Valid expansions are: // {a,b,...} ``` -A comma seperated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. +A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. ```js /^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ @@ -98,6 +98,12 @@ npm install brace-expansion - [Julian Gruber](https://github.com/juliangruber) - [Isaac Z. Schlueter](https://github.com/isaacs) +## Sponsors + +This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)! + +Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)! + ## License (MIT) diff --git a/benchmarks/node_modules/brace-expansion/package.json b/benchmarks/node_modules/brace-expansion/package.json index 52b2baef..26587e47 100644 --- a/benchmarks/node_modules/brace-expansion/package.json +++ b/benchmarks/node_modules/brace-expansion/package.json @@ -1,39 +1,38 @@ { - "_from": "brace-expansion@^1.0.0", - "_id": "brace-expansion@1.1.7", - "_integrity": "sha1-Pv/DxQ4ABTH7cg6v+A8K6O8jz1k=", + "_from": "brace-expansion@^1.1.7", + "_id": "brace-expansion@1.1.11", + "_inBundle": false, + "_integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "_location": "/brace-expansion", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "brace-expansion@^1.0.0", + "raw": "brace-expansion@^1.1.7", "name": "brace-expansion", "escapedName": "brace-expansion", - "rawSpec": "^1.0.0", + "rawSpec": "^1.1.7", "saveSpec": null, - "fetchSpec": "^1.0.0" + "fetchSpec": "^1.1.7" }, "_requiredBy": [ "/minimatch" ], - "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", - "_shasum": "3effc3c50e000531fb720eaff80f0ae8ef23cf59", - "_shrinkwrap": null, - "_spec": "brace-expansion@^1.0.0", + "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "_shasum": "3c7fcbf529d87226f3d2f52b966ff5271eb441dd", + "_spec": "brace-expansion@^1.1.7", "_where": "/Users/isaacs/dev/js/tar/benchmarks/node_modules/minimatch", "author": { "name": "Julian Gruber", "email": "mail@juliangruber.com", "url": "http://juliangruber.com" }, - "bin": null, "bugs": { "url": "https://github.com/juliangruber/brace-expansion/issues" }, "bundleDependencies": false, "dependencies": { - "balanced-match": "^0.4.1", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" }, "deprecated": false, @@ -47,8 +46,6 @@ "license": "MIT", "main": "index.js", "name": "brace-expansion", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/juliangruber/brace-expansion.git" @@ -74,5 +71,5 @@ "android-browser/4.2..latest" ] }, - "version": "1.1.7" + "version": "1.1.11" } diff --git a/benchmarks/node_modules/fstream/.npmignore b/benchmarks/node_modules/fstream/.npmignore deleted file mode 100644 index 494272a8..00000000 --- a/benchmarks/node_modules/fstream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -.*.swp -node_modules/ -examples/deep-copy/ -examples/path/ -examples/filter-copy/ diff --git a/benchmarks/node_modules/fstream/lib/writer.js b/benchmarks/node_modules/fstream/lib/writer.js index 140e449e..3f105478 100644 --- a/benchmarks/node_modules/fstream/lib/writer.js +++ b/benchmarks/node_modules/fstream/lib/writer.js @@ -147,7 +147,7 @@ Writer.prototype._stat = function (current) { // if it's a type change, then we need to clobber or error. // if it's not a type change, then let the impl take care of it. - if (currentType !== self.type) { + if (currentType !== self.type || self.type === 'File' && current.nlink > 1) { return rimraf(self._path, function (er) { if (er) return self.error(er) self._old = null diff --git a/benchmarks/node_modules/fstream/package.json b/benchmarks/node_modules/fstream/package.json index 63fc2fff..fb48fdc2 100644 --- a/benchmarks/node_modules/fstream/package.json +++ b/benchmarks/node_modules/fstream/package.json @@ -1,33 +1,32 @@ { - "_from": "fstream@^1.0.2", - "_id": "fstream@1.0.11", - "_integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "_from": "fstream@^1.0.12", + "_id": "fstream@1.0.12", + "_inBundle": false, + "_integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", "_location": "/fstream", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "fstream@^1.0.2", + "raw": "fstream@^1.0.12", "name": "fstream", "escapedName": "fstream", - "rawSpec": "^1.0.2", + "rawSpec": "^1.0.12", "saveSpec": null, - "fetchSpec": "^1.0.2" + "fetchSpec": "^1.0.12" }, "_requiredBy": [ "/tar" ], - "_resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "_shasum": "5c1fb1f117477114f0632a0eb4b71b3cb0fd3171", - "_shrinkwrap": null, - "_spec": "fstream@^1.0.2", + "_resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", + "_shasum": "4e8ba8ee2d48be4f7d0de505455548eae5932045", + "_spec": "fstream@^1.0.12", "_where": "/Users/isaacs/dev/js/tar/benchmarks/node_modules/tar", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, - "bin": null, "bugs": { "url": "https://github.com/npm/fstream/issues" }, @@ -51,8 +50,6 @@ "license": "ISC", "main": "fstream.js", "name": "fstream", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git+https://github.com/npm/fstream.git" @@ -60,5 +57,5 @@ "scripts": { "test": "standard && tap examples/*.js" }, - "version": "1.0.11" + "version": "1.0.12" } diff --git a/benchmarks/node_modules/glob/LICENSE b/benchmarks/node_modules/glob/LICENSE index 19129e31..42ca266d 100644 --- a/benchmarks/node_modules/glob/LICENSE +++ b/benchmarks/node_modules/glob/LICENSE @@ -13,3 +13,9 @@ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +## Glob Logo + +Glob's logo created by Tanya Brassie , licensed +under a Creative Commons Attribution-ShareAlike 4.0 International License +https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/benchmarks/node_modules/glob/README.md b/benchmarks/node_modules/glob/README.md index baa1d1ba..e71b967e 100644 --- a/benchmarks/node_modules/glob/README.md +++ b/benchmarks/node_modules/glob/README.md @@ -7,7 +7,7 @@ Match files using the patterns the shell uses, like stars and stuff. This is a glob implementation in JavaScript. It uses the `minimatch` library to do its matching. -![](oh-my-glob.gif) +![](logo/glob.png) ## Usage @@ -347,6 +347,11 @@ Users are thus advised not to use a glob result as a guarantee of filesystem state in the face of rapid changes. For the vast majority of operations, this is never a problem. +## Glob Logo +Glob's logo was created by [Tanya Brassie](http://tanyabrassie.com/). Logo files can be found [here](https://github.com/isaacs/node-glob/tree/master/logo). + +The logo is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/). + ## Contributing Any change to behavior (including bugfixes) must come with a test. diff --git a/benchmarks/node_modules/glob/glob.js b/benchmarks/node_modules/glob/glob.js index bfdd7a11..58dec0f6 100644 --- a/benchmarks/node_modules/glob/glob.js +++ b/benchmarks/node_modules/glob/glob.js @@ -153,9 +153,7 @@ function Glob (pattern, options, cb) { } var self = this - var n = this.minimatch.set.length this._processing = 0 - this.matches = new Array(n) this._emitQueue = [] this._processQueue = [] diff --git a/benchmarks/node_modules/glob/package.json b/benchmarks/node_modules/glob/package.json index e1dc4e02..1df6c1c2 100644 --- a/benchmarks/node_modules/glob/package.json +++ b/benchmarks/node_modules/glob/package.json @@ -1,33 +1,32 @@ { - "_from": "glob@^7.0.5", - "_id": "glob@7.1.1", - "_integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=", + "_from": "glob@^7.1.3", + "_id": "glob@7.1.4", + "_inBundle": false, + "_integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", "_location": "/glob", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "glob@^7.0.5", + "raw": "glob@^7.1.3", "name": "glob", "escapedName": "glob", - "rawSpec": "^7.0.5", + "rawSpec": "^7.1.3", "saveSpec": null, - "fetchSpec": "^7.0.5" + "fetchSpec": "^7.1.3" }, "_requiredBy": [ "/rimraf" ], - "_resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", - "_shasum": "805211df04faaf1c63a3600306cdf5ade50b2ec8", - "_shrinkwrap": null, - "_spec": "glob@^7.0.5", + "_resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "_shasum": "aa608a2f6c577ad357e1ae5a5c26d9a8d1969255", + "_spec": "glob@^7.1.3", "_where": "/Users/isaacs/dev/js/tar/benchmarks/node_modules/rimraf", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, - "bin": null, "bugs": { "url": "https://github.com/isaacs/node-glob/issues" }, @@ -36,7 +35,7 @@ "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.2", + "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, @@ -45,7 +44,7 @@ "devDependencies": { "mkdirp": "0", "rimraf": "^2.2.8", - "tap": "^7.1.2", + "tap": "^12.0.1", "tick": "0.0.6" }, "engines": { @@ -60,8 +59,6 @@ "license": "ISC", "main": "glob.js", "name": "glob", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/isaacs/node-glob.git" @@ -75,5 +72,5 @@ "test": "tap test/*.js --cov", "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js" }, - "version": "7.1.1" + "version": "7.1.4" } diff --git a/benchmarks/node_modules/graceful-fs/fs.js b/benchmarks/node_modules/graceful-fs/fs.js deleted file mode 100644 index 8ad4a383..00000000 --- a/benchmarks/node_modules/graceful-fs/fs.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict' - -var fs = require('fs') - -module.exports = clone(fs) - -function clone (obj) { - if (obj === null || typeof obj !== 'object') - return obj - - if (obj instanceof Object) - var copy = { __proto__: obj.__proto__ } - else - var copy = Object.create(null) - - Object.getOwnPropertyNames(obj).forEach(function (key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) - }) - - return copy -} diff --git a/benchmarks/node_modules/graceful-fs/graceful-fs.js b/benchmarks/node_modules/graceful-fs/graceful-fs.js index 33b30d2e..ac206757 100644 --- a/benchmarks/node_modules/graceful-fs/graceful-fs.js +++ b/benchmarks/node_modules/graceful-fs/graceful-fs.js @@ -1,6 +1,8 @@ var fs = require('fs') var polyfills = require('./polyfills.js') var legacy = require('./legacy-streams.js') +var clone = require('./clone.js') + var queue = [] var util = require('util') @@ -24,17 +26,17 @@ if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { }) } -module.exports = patch(require('./fs.js')) -if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH) { - module.exports = patch(fs) +module.exports = patch(clone(fs)) +if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { + module.exports = patch(fs) + fs.__patched = true; } // Always patch fs.close/closeSync, because we want to // retry() whenever a close happens *anywhere* in the program. // This is essential when multiple graceful-fs instances are // in play at the same time. -module.exports.close = -fs.close = (function (fs$close) { return function (fd, cb) { +module.exports.close = (function (fs$close) { return function (fd, cb) { return fs$close.call(fs, fd, function (err) { if (!err) retry() @@ -44,8 +46,7 @@ fs.close = (function (fs$close) { return function (fd, cb) { }) }})(fs.close) -module.exports.closeSync = -fs.closeSync = (function (fs$closeSync) { return function (fd) { +module.exports.closeSync = (function (fs$closeSync) { return function (fd) { // Note that graceful-fs also retries when fs.closeSync() fails. // Looks like a bug to me, although it's probably a harmless one. var rval = fs$closeSync.apply(fs, arguments) @@ -53,6 +54,17 @@ fs.closeSync = (function (fs$closeSync) { return function (fd) { return rval }})(fs.closeSync) +// Only patch fs once, otherwise we'll run into a memory leak if +// graceful-fs is loaded multiple times, such as in test environments that +// reset the loaded modules between tests. +// We look for the string `graceful-fs` from the comment above. This +// way we are not adding any extra properties and it will detect if older +// versions of graceful-fs are installed. +if (!/\bgraceful-fs\b/.test(fs.closeSync.toString())) { + fs.closeSync = module.exports.closeSync; + fs.close = module.exports.close; +} + function patch (fs) { // Everything that references the open() function needs to be in here polyfills(fs) @@ -144,6 +156,7 @@ function patch (fs) { if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) enqueue([go$readdir, [args]]) + else { if (typeof cb === 'function') cb.apply(this, arguments) @@ -163,12 +176,16 @@ function patch (fs) { } var fs$ReadStream = fs.ReadStream - ReadStream.prototype = Object.create(fs$ReadStream.prototype) - ReadStream.prototype.open = ReadStream$open + if (fs$ReadStream) { + ReadStream.prototype = Object.create(fs$ReadStream.prototype) + ReadStream.prototype.open = ReadStream$open + } var fs$WriteStream = fs.WriteStream - WriteStream.prototype = Object.create(fs$WriteStream.prototype) - WriteStream.prototype.open = WriteStream$open + if (fs$WriteStream) { + WriteStream.prototype = Object.create(fs$WriteStream.prototype) + WriteStream.prototype.open = WriteStream$open + } fs.ReadStream = ReadStream fs.WriteStream = WriteStream diff --git a/benchmarks/node_modules/graceful-fs/package.json b/benchmarks/node_modules/graceful-fs/package.json index b81becf6..abe85bec 100644 --- a/benchmarks/node_modules/graceful-fs/package.json +++ b/benchmarks/node_modules/graceful-fs/package.json @@ -1,7 +1,8 @@ { "_from": "graceful-fs@^4.1.2", - "_id": "graceful-fs@4.1.11", - "_integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "_id": "graceful-fs@4.1.15", + "_inBundle": false, + "_integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", "_location": "/graceful-fs", "_phantomChildren": {}, "_requested": { @@ -17,35 +18,31 @@ "_requiredBy": [ "/fstream" ], - "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "_shasum": "0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658", - "_shrinkwrap": null, + "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "_shasum": "ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00", "_spec": "graceful-fs@^4.1.2", "_where": "/Users/isaacs/dev/js/tar/benchmarks/node_modules/fstream", - "bin": null, "bugs": { "url": "https://github.com/isaacs/node-graceful-fs/issues" }, "bundleDependencies": false, - "dependencies": {}, "deprecated": false, "description": "A drop-in replacement for fs, making various improvements.", "devDependencies": { + "import-fresh": "^2.0.0", "mkdirp": "^0.5.0", "rimraf": "^2.2.8", - "tap": "^5.4.2" + "tap": "^12.0.1" }, "directories": { "test": "test" }, - "engines": { - "node": ">=0.4.0" - }, "files": [ "fs.js", "graceful-fs.js", "legacy-streams.js", - "polyfills.js" + "polyfills.js", + "clone.js" ], "homepage": "https://github.com/isaacs/node-graceful-fs#readme", "keywords": [ @@ -67,14 +64,15 @@ "license": "ISC", "main": "graceful-fs.js", "name": "graceful-fs", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git+https://github.com/isaacs/node-graceful-fs.git" }, "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", "test": "node test.js | tap -" }, - "version": "4.1.11" + "version": "4.1.15" } diff --git a/benchmarks/node_modules/graceful-fs/polyfills.js b/benchmarks/node_modules/graceful-fs/polyfills.js index 4c6aca78..b964ed08 100644 --- a/benchmarks/node_modules/graceful-fs/polyfills.js +++ b/benchmarks/node_modules/graceful-fs/polyfills.js @@ -1,4 +1,3 @@ -var fs = require('./fs.js') var constants = require('constants') var origCwd = process.cwd @@ -145,73 +144,36 @@ function patch (fs) { } } }})(fs.readSync) -} - -function patchLchmod (fs) { - fs.lchmod = function (path, mode, callback) { - fs.open( path - , constants.O_WRONLY | constants.O_SYMLINK - , mode - , function (err, fd) { - if (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) { - if (callback) callback(err || err2) - }) - }) - }) - } - - fs.lchmodSync = function (path, mode) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) - - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - var threw = true - var ret - try { - ret = fs.fchmodSync(fd, mode) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } -} -function patchLutimes (fs) { - if (constants.hasOwnProperty("O_SYMLINK")) { - fs.lutimes = function (path, at, mt, cb) { - fs.open(path, constants.O_SYMLINK, function (er, fd) { - if (er) { - if (cb) cb(er) + function patchLchmod (fs) { + fs.lchmod = function (path, mode, callback) { + fs.open( path + , constants.O_WRONLY | constants.O_SYMLINK + , mode + , function (err, fd) { + if (err) { + if (callback) callback(err) return } - fs.futimes(fd, at, mt, function (er) { - fs.close(fd, function (er2) { - if (cb) cb(er || er2) + // 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) { + if (callback) callback(err || err2) }) }) }) } - fs.lutimesSync = function (path, at, mt) { - var fd = fs.openSync(path, constants.O_SYMLINK) - var ret + fs.lchmodSync = function (path, mode) { + var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) + + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. var threw = true + var ret try { - ret = fs.futimesSync(fd, at, mt) + ret = fs.fchmodSync(fd, mode) threw = false } finally { if (threw) { @@ -224,107 +186,144 @@ function patchLutimes (fs) { } return ret } + } + + function patchLutimes (fs) { + if (constants.hasOwnProperty("O_SYMLINK")) { + fs.lutimes = function (path, at, mt, cb) { + fs.open(path, constants.O_SYMLINK, function (er, fd) { + if (er) { + if (cb) cb(er) + return + } + fs.futimes(fd, at, mt, function (er) { + fs.close(fd, function (er2) { + if (cb) cb(er || er2) + }) + }) + }) + } + + fs.lutimesSync = function (path, at, mt) { + var fd = fs.openSync(path, constants.O_SYMLINK) + var ret + var threw = true + try { + ret = fs.futimesSync(fd, at, mt) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } - } else { - fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } - fs.lutimesSync = function () {} + } else { + 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) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) + function chmodFix (orig) { + if (!orig) return orig + return function (target, mode, cb) { + return orig.call(fs, target, mode, function (er) { + if (chownErOk(er)) er = null + if (cb) cb.apply(this, arguments) + }) + } } -} -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 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) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) + function chownFix (orig) { + if (!orig) return orig + return function (target, uid, gid, cb) { + return orig.call(fs, target, uid, gid, function (er) { + if (chownErOk(er)) er = null + if (cb) cb.apply(this, arguments) + }) + } } -} -function chownFixSync (orig) { - if (!orig) return orig - return function (target, uid, gid) { - try { - return orig.call(fs, target, uid, gid) - } catch (er) { - if (!chownErOk(er)) throw er + function chownFixSync (orig) { + if (!orig) return orig + return function (target, uid, gid) { + try { + return orig.call(fs, target, uid, gid) + } catch (er) { + if (!chownErOk(er)) throw er + } } } -} -function statFix (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target, cb) { - return orig.call(fs, target, function (er, stats) { - if (!stats) return cb.apply(this, arguments) + function statFix (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target, cb) { + return orig.call(fs, target, function (er, stats) { + if (!stats) return cb.apply(this, arguments) + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + if (cb) cb.apply(this, arguments) + }) + } + } + + function statFixSync (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target) { + var stats = orig.call(fs, target) if (stats.uid < 0) stats.uid += 0x100000000 if (stats.gid < 0) stats.gid += 0x100000000 - if (cb) cb.apply(this, arguments) - }) + return stats; + } } -} -function statFixSync (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target) { - var stats = orig.call(fs, target) - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 - return stats; - } -} + // ENOSYS means that the fs doesn't support the op. Just ignore + // that, because it doesn't matter. + // + // if there's no getuid, or if getuid() is something other + // than 0, and the error is EINVAL or EPERM, then just ignore + // it. + // + // This specific case is a silent failure in cp, install, tar, + // and most other unix tools that manage permissions. + // + // When running as root, or if other types of errors are + // encountered, then it's strict. + function chownErOk (er) { + if (!er) + return true -// ENOSYS means that the fs doesn't support the op. Just ignore -// that, because it doesn't matter. -// -// if there's no getuid, or if getuid() is something other -// than 0, and the error is EINVAL or EPERM, then just ignore -// it. -// -// This specific case is a silent failure in cp, install, tar, -// and most other unix tools that manage permissions. -// -// When running as root, or if other types of errors are -// encountered, then it's strict. -function chownErOk (er) { - if (!er) - return true - - if (er.code === "ENOSYS") - return true - - var nonroot = !process.getuid || process.getuid() !== 0 - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") + if (er.code === "ENOSYS") return true - } - return false + var nonroot = !process.getuid || process.getuid() !== 0 + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true + } + + return false + } } diff --git a/benchmarks/node_modules/minimatch/package.json b/benchmarks/node_modules/minimatch/package.json index f8a4ef30..4f29eb4d 100644 --- a/benchmarks/node_modules/minimatch/package.json +++ b/benchmarks/node_modules/minimatch/package.json @@ -1,45 +1,43 @@ { - "_from": "minimatch@^3.0.2", - "_id": "minimatch@3.0.3", - "_integrity": "sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q=", + "_from": "minimatch@^3.0.4", + "_id": "minimatch@3.0.4", + "_inBundle": false, + "_integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "_location": "/minimatch", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "minimatch@^3.0.2", + "raw": "minimatch@^3.0.4", "name": "minimatch", "escapedName": "minimatch", - "rawSpec": "^3.0.2", + "rawSpec": "^3.0.4", "saveSpec": null, - "fetchSpec": "^3.0.2" + "fetchSpec": "^3.0.4" }, "_requiredBy": [ "/glob" ], - "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", - "_shasum": "2a4e4090b96b2db06a9d7df01055a62a77c9b774", - "_shrinkwrap": null, - "_spec": "minimatch@^3.0.2", + "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "_shasum": "5166e286457f03306064be5497e8dbb0c3d32083", + "_spec": "minimatch@^3.0.4", "_where": "/Users/isaacs/dev/js/tar/benchmarks/node_modules/glob", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me" }, - "bin": null, "bugs": { "url": "https://github.com/isaacs/minimatch/issues" }, "bundleDependencies": false, "dependencies": { - "brace-expansion": "^1.0.0" + "brace-expansion": "^1.1.7" }, "deprecated": false, "description": "a glob matcher in javascript", "devDependencies": { - "standard": "^3.7.2", - "tap": "^5.6.0" + "tap": "^10.3.2" }, "engines": { "node": "*" @@ -51,15 +49,15 @@ "license": "ISC", "main": "minimatch.js", "name": "minimatch", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/isaacs/minimatch.git" }, "scripts": { - "posttest": "standard minimatch.js test/*.js", - "test": "tap test/*.js" + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --cov" }, - "version": "3.0.3" + "version": "3.0.4" } diff --git a/benchmarks/node_modules/rimraf/package.json b/benchmarks/node_modules/rimraf/package.json index 551aa27b..1eef864a 100644 --- a/benchmarks/node_modules/rimraf/package.json +++ b/benchmarks/node_modules/rimraf/package.json @@ -1,7 +1,8 @@ { "_from": "rimraf@2", - "_id": "rimraf@2.6.1", - "_integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", + "_id": "rimraf@2.6.3", + "_inBundle": false, + "_integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "_location": "/rimraf", "_phantomChildren": {}, "_requested": { @@ -17,9 +18,8 @@ "_requiredBy": [ "/fstream" ], - "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", - "_shasum": "c2338ec643df7a1b7fe5c54fa86f57428a55f33d", - "_shrinkwrap": null, + "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "_shasum": "b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab", "_spec": "rimraf@2", "_where": "/Users/isaacs/dev/js/tar/benchmarks/node_modules/fstream", "author": { @@ -35,13 +35,13 @@ }, "bundleDependencies": false, "dependencies": { - "glob": "^7.0.5" + "glob": "^7.1.3" }, "deprecated": false, "description": "A deep deletion module for node (like `rm -rf`)", "devDependencies": { "mkdirp": "^0.5.1", - "tap": "^10.1.2" + "tap": "^12.1.1" }, "files": [ "LICENSE", @@ -53,14 +53,15 @@ "license": "ISC", "main": "rimraf.js", "name": "rimraf", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/isaacs/rimraf.git" }, "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", "test": "tap test/*.js" }, - "version": "2.6.1" + "version": "2.6.3" } diff --git a/benchmarks/node_modules/rimraf/rimraf.js b/benchmarks/node_modules/rimraf/rimraf.js index c2633126..e80dd106 100644 --- a/benchmarks/node_modules/rimraf/rimraf.js +++ b/benchmarks/node_modules/rimraf/rimraf.js @@ -5,6 +5,7 @@ var assert = require("assert") var path = require("path") var fs = require("fs") var glob = require("glob") +var _0666 = parseInt('666', 8) var defaultGlobOpts = { nosort: true, @@ -165,7 +166,7 @@ function fixWinEPERM (p, options, er, cb) { if (er) assert(er instanceof Error) - options.chmod(p, 666, function (er2) { + options.chmod(p, _0666, function (er2) { if (er2) cb(er2.code === "ENOENT" ? null : er) else @@ -187,7 +188,7 @@ function fixWinEPERMSync (p, options, er) { assert(er instanceof Error) try { - options.chmodSync(p, 666) + options.chmodSync(p, _0666) } catch (er2) { if (er2.code === "ENOENT") return diff --git a/benchmarks/node_modules/tar/.npmignore b/benchmarks/node_modules/tar/.npmignore deleted file mode 100644 index c167ad5b..00000000 --- a/benchmarks/node_modules/tar/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -.*.swp -node_modules -examples/extract/ -test/tmp/ -test/fixtures/ diff --git a/benchmarks/node_modules/tar/lib/parse.js b/benchmarks/node_modules/tar/lib/parse.js index 600ad782..1c66ebda 100644 --- a/benchmarks/node_modules/tar/lib/parse.js +++ b/benchmarks/node_modules/tar/lib/parse.js @@ -38,6 +38,7 @@ function Parse () { me._stream = new BlockStream(512) me.position = 0 me._ended = false + me._hardLinks = {} me._stream.on("error", function (e) { me.emit("error", e) @@ -251,6 +252,11 @@ Parse.prototype._startEntry = function (c) { if (onend) entry.on("end", onend) this._entry = entry + + if (entry.type === "Link") { + this._hardLinks[entry.path] = entry + } + var me = this entry.on("pause", function () { diff --git a/benchmarks/node_modules/tar/package.json b/benchmarks/node_modules/tar/package.json index 0d8d0982..c9c694c0 100644 --- a/benchmarks/node_modules/tar/package.json +++ b/benchmarks/node_modules/tar/package.json @@ -1,41 +1,40 @@ { - "_from": "tar@latest", - "_id": "tar@2.2.1", - "_integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "_from": "tar@2.2.2", + "_id": "tar@2.2.2", + "_inBundle": false, + "_integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", "_location": "/tar", "_phantomChildren": {}, "_requested": { - "type": "tag", + "type": "version", "registry": true, - "raw": "tar@latest", + "raw": "tar@2.2.2", "name": "tar", "escapedName": "tar", - "rawSpec": "latest", + "rawSpec": "2.2.2", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "2.2.2" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "_shasum": "8e4d2a256c0e2185c6b18ad694aec968b83cb1d1", - "_shrinkwrap": null, - "_spec": "tar@latest", + "_resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", + "_shasum": "0ca8848562c7299b8b446ff6a4d60cdbb23edc40", + "_spec": "tar@2.2.2", "_where": "/Users/isaacs/dev/js/tar/benchmarks", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, - "bin": null, "bugs": { "url": "https://github.com/isaacs/node-tar/issues" }, "bundleDependencies": false, "dependencies": { "block-stream": "*", - "fstream": "^1.0.2", + "fstream": "^1.0.12", "inherits": "2" }, "deprecated": false, @@ -50,8 +49,6 @@ "license": "ISC", "main": "tar.js", "name": "tar", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/isaacs/node-tar.git" @@ -59,5 +56,5 @@ "scripts": { "test": "tap test/*.js" }, - "version": "2.2.1" + "version": "2.2.2" } diff --git a/benchmarks/package-lock.json b/benchmarks/package-lock.json index b1f88c0f..f24ac944 100644 --- a/benchmarks/package-lock.json +++ b/benchmarks/package-lock.json @@ -1,19 +1,30 @@ { + "name": "benchmarks", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, "dependencies": { "balanced-match": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", - "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "block-stream": { "version": "0.0.9", "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=" + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "requires": { + "inherits": "~2.0.0" + } }, "brace-expansion": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", - "integrity": "sha1-Pv/DxQ4ABTH7cg6v+A8K6O8jz1k=" + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } }, "concat-map": { "version": "0.0.1", @@ -26,24 +37,42 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fstream": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=" + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", + "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", + "requires": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + } }, "glob": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", - "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=" + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } }, "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==" }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=" + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } }, "inherits": { "version": "2.0.3", @@ -51,9 +80,12 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q=" + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } }, "minimist": { "version": "0.0.8", @@ -63,12 +95,18 @@ "mkdirp": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=" + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + } }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=" + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } }, "path-is-absolute": { "version": "1.0.1", @@ -76,14 +114,22 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, "rimraf": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", - "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=" + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "requires": { + "glob": "^7.1.3" + } }, "tar": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=" + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", + "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", + "requires": { + "block-stream": "*", + "fstream": "^1.0.12", + "inherits": "2" + } }, "wrappy": { "version": "1.0.2", diff --git a/benchmarks/package.json b/benchmarks/package.json new file mode 100644 index 00000000..78dfdbc8 --- /dev/null +++ b/benchmarks/package.json @@ -0,0 +1,7 @@ +{ + "name": "benchmarks", + "version": "1.0.0", + "dependencies": { + "tar": "^2.2.2" + } +}