diff options
author | Kat Marchán <kzm@sykosomatic.org> | 2017-06-05 16:31:14 -0700 |
---|---|---|
committer | Jeremiah Senkpiel <fishrock123@rocketmail.com> | 2017-06-06 14:27:48 -0400 |
commit | a4444c546211cac0f5efba8b03a681546e3e184f (patch) | |
tree | a378b37fefd4fac786850c41f32eee8d07e339c7 /deps/npm/node_modules | |
parent | df46fcb61a6f64cebffd26c8dbd4f24c8058fe25 (diff) | |
download | node-new-a4444c546211cac0f5efba8b03a681546e3e184f.tar.gz |
deps: upgrade npm to 5.0.3
PR-URL: https://github.com/nodejs/node/pull/13487
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'deps/npm/node_modules')
72 files changed, 1203 insertions, 732 deletions
diff --git a/deps/npm/node_modules/aproba/README.md b/deps/npm/node_modules/aproba/README.md index a9d38222a7..79e865924d 100644 --- a/deps/npm/node_modules/aproba/README.md +++ b/deps/npm/node_modules/aproba/README.md @@ -20,17 +20,17 @@ myfunc('test', 23, function () {}, true) // too many args error Valid types are: -type | description ----- | ----------- -* | matches any type -A | Array.isArray OR an arguments object -S | typeof == string -N | typeof == number -F | typeof == function -O | typeof == object and not type A and not type E -B | typeof == boolean -E | instanceof Error OR null **(special: see below)** -Z | == null +| type | description +| :--: | :---------- +| * | matches any type +| A | `Array.isArray` OR an `arguments` object +| S | typeof == string +| N | typeof == number +| F | typeof == function +| O | typeof == object and not type A and not type E +| B | typeof == boolean +| E | `instanceof Error` OR `null` **(special: see below)** +| Z | == `null` Validation failures throw one of three exception types, distinguished by a `code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`. diff --git a/deps/npm/node_modules/aproba/index.js b/deps/npm/node_modules/aproba/index.js index bc6ed1f17b..4f8c1fc7d8 100644 --- a/deps/npm/node_modules/aproba/index.js +++ b/deps/npm/node_modules/aproba/index.js @@ -16,6 +16,11 @@ var types = { Z: {label: 'null', check: function (thingy) { return thingy == null }} } +function addSchema (schema, arity) { + var group = arity[schema.length] = arity[schema.length] || [] + if (group.indexOf(schema) === -1) group.push(schema) +} + var validate = module.exports = function (rawSchemas, args) { if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length) if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas') @@ -24,21 +29,18 @@ var validate = module.exports = function (rawSchemas, args) { if (!types.A.check(args)) throw invalidType(1, ['array'], args) var schemas = rawSchemas.split('|') var arity = {} - function addSchema (schema) { - var group = arity[schema.length] = arity[schema.length] || [] - if (group.indexOf(schema) === -1) group.push(schema) - } + schemas.forEach(function (schema) { for (var ii = 0; ii < schema.length; ++ii) { var type = schema[ii] if (!types[type]) throw unknownType(ii, type) } if (/E.*E/.test(schema)) throw moreThanOneError(schema) - addSchema(schema) + addSchema(schema, arity) if (/E/.test(schema)) { - addSchema(schema.replace(/E.*$/, 'E')) - addSchema(schema.replace(/E/, 'Z')) - if (schema.length === 1) addSchema('') + addSchema(schema.replace(/E.*$/, 'E'), arity) + addSchema(schema.replace(/E/, 'Z'), arity) + if (schema.length === 1) addSchema('', arity) } }) var matching = arity[args.length] diff --git a/deps/npm/node_modules/aproba/package.json b/deps/npm/node_modules/aproba/package.json index ba6cb1385d..e3a85f4066 100644 --- a/deps/npm/node_modules/aproba/package.json +++ b/deps/npm/node_modules/aproba/package.json @@ -1,36 +1,36 @@ { - "_from": "aproba@~1.1.1", - "_id": "aproba@1.1.1", - "_integrity": "sha1-ldNgDwdxCqDpKYxyatXs8urLq6s=", + "_from": "aproba@1.1.2", + "_id": "aproba@1.1.2", + "_inBundle": false, + "_integrity": "sha512-ZpYajIfO0j2cOFTO955KUMIKNmj6zhX8kVztMAxFsDaMwz+9Z9SV0uou2pC9HJqcfpffOsjnbrDMvkNy+9RXPw==", "_location": "/aproba", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "aproba@~1.1.1", + "raw": "aproba@1.1.2", "name": "aproba", "escapedName": "aproba", - "rawSpec": "~1.1.1", + "rawSpec": "1.1.2", "saveSpec": null, - "fetchSpec": "~1.1.1" + "fetchSpec": "1.1.2" }, "_requiredBy": [ + "#USER", "/", "/move-concurrently", "/move-concurrently/copy-concurrently", "/move-concurrently/run-queue", "/npmlog/gauge" ], - "_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.1.tgz", - "_shasum": "95d3600f07710aa0e9298c726ad5ecf2eacbabab", - "_shrinkwrap": null, - "_spec": "aproba@~1.1.1", - "_where": "/Users/zkat/Documents/code/npm", + "_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.2.tgz", + "_shasum": "45c6629094de4e96f693ef7eab74ae079c240fc1", + "_spec": "aproba@1.1.2", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Rebecca Turner", "email": "me@re-becca.org" }, - "bin": null, "bugs": { "url": "https://github.com/iarna/aproba/issues" }, @@ -56,8 +56,6 @@ "license": "ISC", "main": "index.js", "name": "aproba", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git+https://github.com/iarna/aproba.git" @@ -65,5 +63,5 @@ "scripts": { "test": "standard && tap -j3 test/*.js" }, - "version": "1.1.1" + "version": "1.1.2" } diff --git a/deps/npm/node_modules/cacache/CHANGELOG.md b/deps/npm/node_modules/cacache/CHANGELOG.md index 8235212ade..802257622e 100644 --- a/deps/npm/node_modules/cacache/CHANGELOG.md +++ b/deps/npm/node_modules/cacache/CHANGELOG.md @@ -2,6 +2,36 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +<a name="9.2.8"></a> +## [9.2.8](https://github.com/zkat/cacache/compare/v9.2.7...v9.2.8) (2017-06-05) + + +### Bug Fixes + +* **ssri:** bump ssri for bugfix ([c3232ea](https://github.com/zkat/cacache/commit/c3232ea)) + + + +<a name="9.2.7"></a> +## [9.2.7](https://github.com/zkat/cacache/compare/v9.2.6...v9.2.7) (2017-06-05) + + +### Bug Fixes + +* **content:** make verified content completely read-only (#96) ([4131196](https://github.com/zkat/cacache/commit/4131196)) + + + +<a name="9.2.6"></a> +## [9.2.6](https://github.com/zkat/cacache/compare/v9.2.5...v9.2.6) (2017-05-31) + + +### Bug Fixes + +* **node:** update ssri to prevent old node 4 crash ([5209ffe](https://github.com/zkat/cacache/commit/5209ffe)) + + + <a name="9.2.5"></a> ## [9.2.5](https://github.com/zkat/cacache/compare/v9.2.4...v9.2.5) (2017-05-25) diff --git a/deps/npm/node_modules/cacache/lib/util/move-file.js b/deps/npm/node_modules/cacache/lib/util/move-file.js index 422c8294e3..e12e98188c 100644 --- a/deps/npm/node_modules/cacache/lib/util/move-file.js +++ b/deps/npm/node_modules/cacache/lib/util/move-file.js @@ -2,6 +2,8 @@ const fs = require('graceful-fs') const BB = require('bluebird') +const chmod = BB.promisify(fs.chmod) +const unlink = BB.promisify(fs.unlink) let move let pinflight @@ -27,8 +29,11 @@ function moveFile (src, dest) { return cb(err) } } - return fs.unlink(src, cb) + return cb() }) + }).then(() => { + // content should never change for any reason, so make it read-only + return BB.join(unlink(src), process.platform !== 'win32' && chmod(dest, '0444')) }).catch(err => { if (process.platform !== 'win32') { throw err diff --git a/deps/npm/node_modules/cacache/package.json b/deps/npm/node_modules/cacache/package.json index 26b8e826f2..b55c3ba689 100644 --- a/deps/npm/node_modules/cacache/package.json +++ b/deps/npm/node_modules/cacache/package.json @@ -1,19 +1,19 @@ { - "_from": "cacache@9.2.5", - "_id": "cacache@9.2.5", + "_from": "cacache@9.2.8", + "_id": "cacache@9.2.8", "_inBundle": false, - "_integrity": "sha512-mURsTvkjbCSFRTdkuPhHUp9sbEHn3AVrvM4mveg/bhlKKYolfRm23TsFUVAssC9p622lwmh7pgpb+H5mSVpYcA==", + "_integrity": "sha512-nA3gmaDPEsFWqI5eYAe35IfvW54yGJ3ns2wDopWf4iDA3fkhBNsdvnYp4NrL+L7ysMt0/isM84Mwi+b4l8/pMQ==", "_location": "/cacache", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "cacache@9.2.5", + "raw": "cacache@9.2.8", "name": "cacache", "escapedName": "cacache", - "rawSpec": "9.2.5", + "rawSpec": "9.2.8", "saveSpec": null, - "fetchSpec": "9.2.5" + "fetchSpec": "9.2.8" }, "_requiredBy": [ "#USER", @@ -21,10 +21,10 @@ "/pacote", "/pacote/make-fetch-happen" ], - "_resolved": "https://registry.npmjs.org/cacache/-/cacache-9.2.5.tgz", - "_shasum": "cb401d0e59858532062de1f104097cb40c71c3bf", - "_spec": "cacache@9.2.5", - "_where": "/Users/rebecca/code/npm", + "_resolved": "https://registry.npmjs.org/cacache/-/cacache-9.2.8.tgz", + "_shasum": "2e38b51161a3904e3b9fb35c0869b751f7d0bcf4", + "_spec": "cacache@9.2.8", + "_where": "/Users/zkat/Documents/code/npm", "author": { "name": "Kat Marchán", "email": "kzm@sykosomatic.org" @@ -66,7 +66,7 @@ "move-concurrently": "^1.0.1", "promise-inflight": "^1.0.1", "rimraf": "^2.6.1", - "ssri": "^4.1.3", + "ssri": "^4.1.5", "unique-filename": "^1.1.0", "y18n": "^3.2.1" }, @@ -76,13 +76,13 @@ "benchmark": "^2.1.4", "chalk": "^1.1.3", "cross-env": "^5.0.0", - "nyc": "^10.3.2", + "nyc": "^11.0.2", "require-inject": "^1.4.0", - "safe-buffer": "^5.0.1", + "safe-buffer": "^5.1.0", "standard": "^10.0.2", "standard-version": "^4.0.0", "tacks": "^1.2.2", - "tap": "^10.3.2", + "tap": "^10.3.3", "weallbehave": "^1.2.0", "weallcontribute": "^1.0.8" }, @@ -125,5 +125,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "9.2.5" + "version": "9.2.8" } diff --git a/deps/npm/node_modules/node-gyp/CHANGELOG.md b/deps/npm/node_modules/node-gyp/CHANGELOG.md index e727128350..70aca6bc9e 100644 --- a/deps/npm/node_modules/node-gyp/CHANGELOG.md +++ b/deps/npm/node_modules/node-gyp/CHANGELOG.md @@ -1,3 +1,13 @@ +v3.6.2 2017-06-01 +================= + +* [[`72afdd62cd`](https://github.com/nodejs/node-gyp/commit/72afdd62cd)] - **build**: rename copyNodeLib() to doBuild() (Liu Chao) [#1206](https://github.com/nodejs/node-gyp/pull/1206) +* [[`bad903ac70`](https://github.com/nodejs/node-gyp/commit/bad903ac70)] - **win**: more robust parsing of SDK version (Refael Ackermann) [#1198](https://github.com/nodejs/node-gyp/pull/1198) +* [[`241752f381`](https://github.com/nodejs/node-gyp/commit/241752f381)] - Log dist-url. (Ben Noordhuis) [#1170](https://github.com/nodejs/node-gyp/pull/1170) +* [[`386746c7d1`](https://github.com/nodejs/node-gyp/commit/386746c7d1)] - **configure**: use full path in node_lib_file GYP var (Pavel Medvedev) [#964](https://github.com/nodejs/node-gyp/pull/964) +* [[`0913b2dd99`](https://github.com/nodejs/node-gyp/commit/0913b2dd99)] - **build, win**: use target_arch to link with node.lib (Pavel Medvedev) [#964](https://github.com/nodejs/node-gyp/pull/964) +* [[`c307b302f7`](https://github.com/nodejs/node-gyp/commit/c307b302f7)] - **doc**: blorb about setting `npm_config_OPTION_NAME` (Refael Ackermann) [#1185](https://github.com/nodejs/node-gyp/pull/1185) + v3.6.1 2017-04-30 ================= diff --git a/deps/npm/node_modules/node-gyp/README.md b/deps/npm/node_modules/node-gyp/README.md index d5443080dd..a5c1325c71 100644 --- a/deps/npm/node_modules/node-gyp/README.md +++ b/deps/npm/node_modules/node-gyp/README.md @@ -192,6 +192,23 @@ Command Options | `--solution=$solution` | Set Visual Studio Solution version (win) +Configuration +-------- + +__`node-gyp` responds to environment variables or `npm` configuration__ +1. Environment variables take the form `npm_config_OPTION_NAME` for any of the + options listed above (dashes in option names should be replaced by underscores). + These work also when `node-gyp` is invoked directly: + `$ export npm_config_devdir=/tmp/.gyp` + or on Windows + `> set npm_config_devdir=c:\temp\.gyp` +2. As `npm` configuration, variables take the form `OPTION_NAME`. + This way only works when `node-gyp` is executed by `npm`: + `$ npm config set [--global] devdir /tmp/.gyp` + `$ npm i buffertools` + + + License ------- diff --git a/deps/npm/node_modules/node-gyp/addon.gypi b/deps/npm/node_modules/node-gyp/addon.gypi index 1422900390..f2f6a7925e 100644 --- a/deps/npm/node_modules/node-gyp/addon.gypi +++ b/deps/npm/node_modules/node-gyp/addon.gypi @@ -109,7 +109,7 @@ '-luuid.lib', '-lodbc32.lib', '-lDelayImp.lib', - '-l"<(node_root_dir)/$(ConfigurationName)/<(node_lib_file)"' + '-l"<(node_lib_file)"' ], 'msvs_disabled_warnings': [ # warning C4251: 'node::ObjectWrap::handle_' : class 'v8::Persistent<T>' diff --git a/deps/npm/node_modules/node-gyp/lib/Find-VS2017.cs b/deps/npm/node_modules/node-gyp/lib/Find-VS2017.cs index a41a354f61..87e0a9c9bb 100644 --- a/deps/npm/node_modules/node-gyp/lib/Find-VS2017.cs +++ b/deps/npm/node_modules/node-gyp/lib/Find-VS2017.cs @@ -228,9 +228,12 @@ namespace VisualStudioConfiguration hasMSBuild = true; else if (id == "Microsoft.VisualStudio.Component.VC.Tools.x86.x64") hasVCTools = true; - else if (id.StartsWith(Win10SDKPrefix)) - Win10SDKVer = Math.Max(Win10SDKVer, UInt32.Parse(id.Substring(Win10SDKPrefix.Length))); - else if (id == "Microsoft.VisualStudio.Component.Windows81SDK") + else if (id.StartsWith(Win10SDKPrefix)) { + string[] parts = id.Substring(Win10SDKPrefix.Length).Split('.'); + if (parts.Length > 1 && parts[1] != "Desktop") + continue; + Win10SDKVer = Math.Max(Win10SDKVer, UInt32.Parse(parts[0])); + } else if (id == "Microsoft.VisualStudio.Component.Windows81SDK") hasWin8SDK = true; else continue; diff --git a/deps/npm/node_modules/node-gyp/lib/build.js b/deps/npm/node_modules/node-gyp/lib/build.js index 5253109857..0445fb6452 100644 --- a/deps/npm/node_modules/node-gyp/lib/build.js +++ b/deps/npm/node_modules/node-gyp/lib/build.js @@ -11,7 +11,6 @@ var fs = require('graceful-fs') , glob = require('glob') , log = require('npmlog') , which = require('which') - , mkdirp = require('mkdirp') , exec = require('child_process').exec , processRelease = require('./process-release') , win = process.platform === 'win32' @@ -36,7 +35,6 @@ function build (gyp, argv, callback) { , config , arch , nodeDir - , copyDevLib loadConfigGypi() @@ -60,7 +58,6 @@ function build (gyp, argv, callback) { buildType = config.target_defaults.default_configuration arch = config.variables.target_arch nodeDir = config.variables.nodedir - copyDevLib = config.variables.copy_dev_lib == 'true' if ('debug' in gyp.opts) { buildType = gyp.opts.debug ? 'Debug' : 'Release' @@ -115,7 +112,7 @@ function build (gyp, argv, callback) { return } log.verbose('`which` succeeded for `' + command + '`', execPath) - copyNodeLib() + doBuild() }) } @@ -127,7 +124,7 @@ function build (gyp, argv, callback) { if (config.variables.msbuild_path) { command = config.variables.msbuild_path log.verbose('using MSBuild:', command) - copyNodeLib() + doBuild() return } @@ -180,36 +177,12 @@ function build (gyp, argv, callback) { return } command = msbuildPath - copyNodeLib() + doBuild() }) })() }) } - /** - * Copies the node.lib file for the current target architecture into the - * current proper dev dir location. - */ - - function copyNodeLib () { - if (!win || !copyDevLib) return doBuild() - - var buildDir = path.resolve(nodeDir, buildType) - , archNodeLibPath = path.resolve(nodeDir, arch, release.name + '.lib') - , buildNodeLibPath = path.resolve(buildDir, release.name + '.lib') - - mkdirp(buildDir, function (err, isNew) { - if (err) return callback(err) - log.verbose('"' + buildType + '" dir needed to be created?', isNew) - var rs = fs.createReadStream(archNodeLibPath) - , ws = fs.createWriteStream(buildNodeLibPath) - log.verbose('copying "' + release.name + '.lib" for ' + arch, buildNodeLibPath) - rs.pipe(ws) - rs.on('error', callback) - ws.on('error', callback) - rs.on('end', doBuild) - }) - } /** * Actually spawn the process and compile the module. diff --git a/deps/npm/node_modules/node-gyp/lib/configure.js b/deps/npm/node_modules/node-gyp/lib/configure.js index 4bad1bffd1..1351576d12 100644 --- a/deps/npm/node_modules/node-gyp/lib/configure.js +++ b/deps/npm/node_modules/node-gyp/lib/configure.js @@ -144,9 +144,6 @@ function configure (gyp, argv, callback) { // set the node development directory variables.nodedir = nodeDir - // don't copy dev libraries with nodedir option - variables.copy_dev_lib = !gyp.opts.nodedir - // disable -T "thin" static archives by default variables.standalone_static_library = gyp.opts.thin ? 0 : 1 @@ -286,6 +283,9 @@ function configure (gyp, argv, callback) { output_dir = buildDir } var nodeGypDir = path.resolve(__dirname, '..') + var nodeLibFile = path.join(nodeDir, + !gyp.opts.nodedir ? '<(target_arch)' : '$(Configuration)', + release.name + '.lib') argv.push('-I', addon_gypi) argv.push('-I', common_gypi) @@ -296,7 +296,7 @@ function configure (gyp, argv, callback) { argv.push('-Dnode_exp_file=' + node_exp_file) } argv.push('-Dnode_gyp_dir=' + nodeGypDir) - argv.push('-Dnode_lib_file=' + release.name + '.lib') + argv.push('-Dnode_lib_file=' + nodeLibFile) argv.push('-Dmodule_root_dir=' + process.cwd()) argv.push('-Dnode_engine=' + (gyp.opts.node_engine || process.jsEngine || 'v8')) diff --git a/deps/npm/node_modules/node-gyp/lib/process-release.js b/deps/npm/node_modules/node-gyp/lib/process-release.js index 89eaf9be36..0d177f1c93 100644 --- a/deps/npm/node_modules/node-gyp/lib/process-release.js +++ b/deps/npm/node_modules/node-gyp/lib/process-release.js @@ -74,6 +74,8 @@ function processRelease (argv, gyp, defaultVersion, defaultRelease) { } } + if (overrideDistUrl) + log.verbose('download', 'using dist-url', overrideDistUrl) if (overrideDistUrl) distBaseUrl = overrideDistUrl.replace(/\/+$/, '') diff --git a/deps/npm/node_modules/node-gyp/package.json b/deps/npm/node_modules/node-gyp/package.json index 9a3664d910..ce58e31b95 100644 --- a/deps/npm/node_modules/node-gyp/package.json +++ b/deps/npm/node_modules/node-gyp/package.json @@ -1,29 +1,29 @@ { - "_from": "node-gyp@latest", - "_id": "node-gyp@3.6.1", + "_from": "node-gyp@3.6.2", + "_id": "node-gyp@3.6.2", "_inBundle": false, - "_integrity": "sha1-GVYQZ/8YVGSt7UeCEmgfR/1XjLw=", + "_integrity": "sha1-m/vlRWIoYoSDjnUOrAUpWFP6HGA=", "_location": "/node-gyp", "_phantomChildren": { "abbrev": "1.1.0" }, "_requested": { - "type": "tag", + "type": "version", "registry": true, - "raw": "node-gyp@latest", + "raw": "node-gyp@3.6.2", "name": "node-gyp", "escapedName": "node-gyp", - "rawSpec": "latest", + "rawSpec": "3.6.2", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "3.6.2" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.6.1.tgz", - "_shasum": "19561067ff185464aded478212681f47fd578cbc", - "_spec": "node-gyp@latest", + "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.6.2.tgz", + "_shasum": "9bfbe54562286284838e750eac05295853fa1c60", + "_spec": "node-gyp@3.6.2", "_where": "/Users/zkat/Documents/code/npm", "author": { "name": "Nathan Rajlich", @@ -85,5 +85,5 @@ "scripts": { "test": "tape test/test-*" }, - "version": "3.6.1" + "version": "3.6.2" } diff --git a/deps/npm/node_modules/npm-package-arg/CHANGELOG.md b/deps/npm/node_modules/npm-package-arg/CHANGELOG.md deleted file mode 100644 index 339ef8793a..0000000000 --- a/deps/npm/node_modules/npm-package-arg/CHANGELOG.md +++ /dev/null @@ -1,23 +0,0 @@ -## new - -* New properties: - * `from` indicates how we parsed this specifier, values are: - localArgument, local, hosted, url and registry. - - _localArgument_ differs from _local_ in that it means the argument - parsing rules were used instead of the dependency parsing rules. That is, the - rules for `npm install /foo` instead of those for `"dependencies": - {"foo": "file:/foo"}`. - -* Changed properties: - * `type` indicates what sort of specifier this is, values are: file, directory, git, remote, version, range, tag. - -* Local specifiers: - * Trailing spaces on local specifiers are no longer trimmed. - * The `spec` field for local specifiers is now a fully resolved path. - * The type is now _file_ or _directory, never _local_. -* Git specifiers: - * The leading `git+` is no longer stripped. This makes the behavior match - `hosted-git-info`. -* Hosted git specifiers: - * The `type` is now _git_. You can check if something is hosted by looking at the `hosted` property or checking to see if `from` is _hosted_. diff --git a/deps/npm/node_modules/npm-package-arg/npa.js b/deps/npm/node_modules/npm-package-arg/npa.js index a94c54abbd..e359958a38 100644 --- a/deps/npm/node_modules/npm-package-arg/npa.js +++ b/deps/npm/node_modules/npm-package-arg/npa.js @@ -192,6 +192,22 @@ function unsupportedURLType (protocol, spec) { return err } +function matchGitScp (spec) { + // git ssh specifiers are overloaded to also use scp-style git + // specifiers, so we have to parse those out and treat them special. + // They are NOT true URIs, so we can't hand them to `url.parse`. + // + // This regex looks for things that look like: + // git+ssh://git@my.custom.git.com:username/project.git#deadbeef + // + // ...and various combinations. The username in the beginning is *required*. + const matched = spec.match(/^git\+ssh:\/\/([^:]+:[^#]+(?:\.git)?)(?:#(.*))$/i) + return matched && !matched[1].match(/:[0-9]+\/?.*$/i) && { + fetchSpec: matched[1], + gitCommittish: matched[2] + } +} + function fromURL (res) { if (!url) url = require('url') const urlparse = url.parse(res.rawSpec) @@ -203,15 +219,20 @@ function fromURL (res) { case 'git+https:': case 'git+rsync:': case 'git+ftp:': - case 'git+ssh:': case 'git+file:': + case 'git+ssh:': res.type = 'git' - setGitCommittish(res, urlparse.hash != null ? urlparse.hash.slice(1) : '') - urlparse.protocol = urlparse.protocol.replace(/^git[+]/, '') - delete urlparse.hash - res.fetchSpec = url.format(urlparse) + const match = urlparse.protocol === 'git+ssh:' && matchGitScp(res.rawSpec) + if (match) { + res.fetchSpec = match.fetchSpec + res.gitCommittish = match.gitCommittish + } else { + setGitCommittish(res, urlparse.hash != null ? urlparse.hash.slice(1) : '') + urlparse.protocol = urlparse.protocol.replace(/^git[+]/, '') + delete urlparse.hash + res.fetchSpec = url.format(urlparse) + } break - case 'http:': case 'https:': res.type = 'remote' diff --git a/deps/npm/node_modules/npm-package-arg/package.json b/deps/npm/node_modules/npm-package-arg/package.json index d8ef6979cb..b8afefc577 100644 --- a/deps/npm/node_modules/npm-package-arg/package.json +++ b/deps/npm/node_modules/npm-package-arg/package.json @@ -1,37 +1,37 @@ { - "_from": "npm-package-arg@~5.0.1", - "_id": "npm-package-arg@5.0.1", - "_integrity": "sha1-CagW4/RaVJ492vM+m65eezEHeHI=", + "_from": "npm-package-arg@latest", + "_id": "npm-package-arg@5.1.1", + "_inBundle": false, + "_integrity": "sha512-67wPa1moaLvn9YAVLLECpGe+v3jL82pBDTE2jMxLOQHd0kWBLnmtCqbxrFagp5pVNFukqmtYRruK3wfoeVTZ2g==", "_location": "/npm-package-arg", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "tag", "registry": true, - "raw": "npm-package-arg@~5.0.1", + "raw": "npm-package-arg@latest", "name": "npm-package-arg", "escapedName": "npm-package-arg", - "rawSpec": "~5.0.1", + "rawSpec": "latest", "saveSpec": null, - "fetchSpec": "~5.0.1" + "fetchSpec": "latest" }, "_requiredBy": [ + "#USER", "/", "/init-package-json", "/npm-registry-client", "/pacote", "/pacote/npm-pick-manifest" ], - "_resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-5.0.1.tgz", - "_shasum": "09a816e3f45a549e3ddaf33e9bae5e7b31077872", - "_shrinkwrap": null, - "_spec": "npm-package-arg@~5.0.1", + "_resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-5.1.1.tgz", + "_shasum": "a3d09053f2d8a0bfa562624507baa597737fc3bf", + "_spec": "npm-package-arg@latest", "_where": "/Users/zkat/Documents/code/npm", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, - "bin": null, "bugs": { "url": "https://github.com/npm/npm-package-arg/issues" }, @@ -58,8 +58,6 @@ "license": "ISC", "main": "npa.js", "name": "npm-package-arg", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git+https://github.com/npm/npm-package-arg.git" @@ -67,5 +65,5 @@ "scripts": { "test": "standard && tap -J --coverage test/*.js" }, - "version": "5.0.1" + "version": "5.1.1" } diff --git a/deps/npm/node_modules/npm-user-validate/.npmignore b/deps/npm/node_modules/npm-user-validate/.npmignore deleted file mode 100644 index 39747c08b4..0000000000 --- a/deps/npm/node_modules/npm-user-validate/.npmignore +++ /dev/null @@ -1,13 +0,0 @@ -*.swp -.*.swp - -.DS_Store -*~ -.project -.settings -npm-debug.log -coverage.html -.idea -lib-cov - -node_modules
\ No newline at end of file diff --git a/deps/npm/node_modules/npm-user-validate/.travis.yml b/deps/npm/node_modules/npm-user-validate/.travis.yml deleted file mode 100644 index 6ff074b748..0000000000 --- a/deps/npm/node_modules/npm-user-validate/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -before_install: -- npm install -g npm@latest -sudo: false -node_js: - - "0.8" - - "0.10" diff --git a/deps/npm/node_modules/npm-user-validate/npm-user-validate.js b/deps/npm/node_modules/npm-user-validate/npm-user-validate.js index 3a645ec932..9250ce33a4 100644 --- a/deps/npm/node_modules/npm-user-validate/npm-user-validate.js +++ b/deps/npm/node_modules/npm-user-validate/npm-user-validate.js @@ -1,19 +1,23 @@ exports.email = email exports.pw = pw exports.username = username - var requirements = exports.requirements = { username: { length: 'Name length must be less than or equal to 214 characters long', lowerCase: 'Name must be lowercase', urlSafe: 'Name may not contain non-url-safe chars', - dot: 'Name may not start with "."' + dot: 'Name may not start with "."', + illegal: 'Name may not contain illegal character' }, password: {}, email: { valid: 'Email must be an email address' } -}; +} + +var illegalCharacterRe = new RegExp('([' + [ + "'" +].join() + '])') function username (un) { if (un !== un.toLowerCase()) { @@ -32,6 +36,11 @@ function username (un) { return new Error(requirements.username.length) } + var illegal = un.match(illegalCharacterRe) + if (illegal) { + return new Error(requirements.username.illegal + ' "' + illegal[0] + '"') + } + return null } diff --git a/deps/npm/node_modules/npm-user-validate/package.json b/deps/npm/node_modules/npm-user-validate/package.json index d6e30bd545..df646cd055 100644 --- a/deps/npm/node_modules/npm-user-validate/package.json +++ b/deps/npm/node_modules/npm-user-validate/package.json @@ -1,42 +1,46 @@ { - "_from": "npm-user-validate@~0.1.5", - "_id": "npm-user-validate@0.1.5", - "_integrity": "sha1-UkZdUMLSApSlcSW5lrrtv1bFAEs=", + "_from": "npm-user-validate@latest", + "_id": "npm-user-validate@1.0.0", + "_inBundle": false, + "_integrity": "sha1-jOyg9c6gTU6TUZ73LQVXp1Ei6VE=", "_location": "/npm-user-validate", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "tag", "registry": true, - "raw": "npm-user-validate@~0.1.5", + "raw": "npm-user-validate@latest", "name": "npm-user-validate", "escapedName": "npm-user-validate", - "rawSpec": "~0.1.5", + "rawSpec": "latest", "saveSpec": null, - "fetchSpec": "~0.1.5" + "fetchSpec": "latest" }, "_requiredBy": [ + "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.1.5.tgz", - "_shasum": "52465d50c2d20294a57125b996baedbf56c5004b", - "_shrinkwrap": null, - "_spec": "npm-user-validate@~0.1.5", + "_resolved": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-1.0.0.tgz", + "_shasum": "8ceca0f5cea04d4e93519ef72d0557a75122e951", + "_spec": "npm-user-validate@latest", "_where": "/Users/zkat/Documents/code/npm", "author": { "name": "Robert Kowalski", "email": "rok@kowalski.gd" }, - "bin": null, "bugs": { "url": "https://github.com/npm/npm-user-validate/issues" }, "bundleDependencies": false, - "dependencies": {}, "deprecated": false, "description": "User validations for npm", "devDependencies": { - "tap": "^1.2.0" + "standard": "^8.4.0", + "standard-version": "^3.0.0", + "tap": "^7.1.2" }, + "files": [ + "npm-user-validate.js" + ], "homepage": "https://github.com/npm/npm-user-validate#readme", "keywords": [ "npm", @@ -46,14 +50,13 @@ "license": "BSD-2-Clause", "main": "npm-user-validate.js", "name": "npm-user-validate", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/npm/npm-user-validate.git" }, "scripts": { - "test": "tap test/*.js" + "pretest": "standard", + "test": "tap --100 test/*.js" }, - "version": "0.1.5" + "version": "1.0.0" } diff --git a/deps/npm/node_modules/npm-user-validate/test/email.test.js b/deps/npm/node_modules/npm-user-validate/test/email.test.js deleted file mode 100644 index 1060a9354d..0000000000 --- a/deps/npm/node_modules/npm-user-validate/test/email.test.js +++ /dev/null @@ -1,26 +0,0 @@ -var test = require('tap').test -var v = require('../npm-user-validate.js').email - -test('email misses an @', function (t) { - err = v('namedomain') - t.type(err, 'object') - t.end() -}) - -test('email misses a dot', function (t) { - err = v('name@domain') - t.type(err, 'object') - t.end() -}) - -test('email misses a string before the @', function (t) { - err = v('@domain') - t.type(err, 'object') - t.end() -}) - -test('email is ok', function (t) { - err = v('name@domain.com') - t.type(err, 'null') - t.end() -})
\ No newline at end of file diff --git a/deps/npm/node_modules/npm-user-validate/test/pw.test.js b/deps/npm/node_modules/npm-user-validate/test/pw.test.js deleted file mode 100644 index d57401da0b..0000000000 --- a/deps/npm/node_modules/npm-user-validate/test/pw.test.js +++ /dev/null @@ -1,32 +0,0 @@ -var test = require('tap').test -var v = require('../npm-user-validate.js').pw - -test('pw contains a \'', function (t) { - err = v('\'') - t.type(err, 'null') - t.end() -}) - -test('pw contains a :', function (t) { - err = v(':') - t.type(err, 'null') - t.end() -}) - -test('pw contains a @', function (t) { - err = v('@') - t.notOk(err, 'null') - t.end() -}) - -test('pw contains a "', function (t) { - err = v('"') - t.type(err, 'null') - t.end() -}) - -test('pw is ok', function (t) { - err = v('duck') - t.type(err, 'null') - t.end() -}) diff --git a/deps/npm/node_modules/npm-user-validate/test/username.test.js b/deps/npm/node_modules/npm-user-validate/test/username.test.js deleted file mode 100644 index aa0e6b33de..0000000000 --- a/deps/npm/node_modules/npm-user-validate/test/username.test.js +++ /dev/null @@ -1,42 +0,0 @@ -var test = require('tap').test -var v = require('../npm-user-validate.js').username - -test('username must be lowercase', function (t) { - var err = v('ERRR') - t.type(err, 'object') - t.match(err.message, /lowercase/) - t.end() -}) - -test('username may not contain non-url-safe chars', function (t) { - var err = v('f ') - t.type(err, 'object') - t.match(err.message, /url-safe/) - t.end() -}) - -test('username may not start with "."', function (t) { - var err = v('.username') - t.type(err, 'object') - t.match(err.message, /start with.*\./) - t.end() -}) - -test('username may not be longer than 214 characters', function (t) { - var err = v('bacon-ipsum-dolor-amet-tongue-short-loin-landjaeger-tenderloin-ball-tip-pork-loin-porchetta-pig-pork-chop-beef-ribs-pork-belly--shankle-t-bone-turducken-tongue-landjaeger-pork-loin-beef-chicken-short-loin-and-pickle') - t.type(err, 'object') - t.match(err.message, /less than or equal to 214/) - t.end() -}); - -test('username may be as long as 214 characters', function (t) { - var err = v('bacon-ipsum-dolor-amet-tongue-short-loin-landjaeger-tenderloin-ball-tip-pork-loin-porchetta-pig-pork-chop-beef-ribs-pork-belly--shankle-t-bone-turducken-tongue-landjaeger-pork-loin-beef-chicken-short-loin-porchetta') - t.type(err, 'null') - t.end() -}); - -test('username is ok', function (t) { - var err = v('ente') - t.type(err, 'null') - t.end() -}) diff --git a/deps/npm/node_modules/pacote/CHANGELOG.md b/deps/npm/node_modules/pacote/CHANGELOG.md index 55c0cda686..7f7eac282d 100644 --- a/deps/npm/node_modules/pacote/CHANGELOG.md +++ b/deps/npm/node_modules/pacote/CHANGELOG.md @@ -2,6 +2,100 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +<a name="2.7.30"></a> +## [2.7.30](https://github.com/zkat/pacote/compare/v2.7.29...v2.7.30) (2017-06-05) + + +### Bug Fixes + +* **ssri:** bump ssri for bugfix ([70a859c](https://github.com/zkat/pacote/commit/70a859c)) + + + +<a name="2.7.29"></a> +## [2.7.29](https://github.com/zkat/pacote/compare/v2.7.28...v2.7.29) (2017-06-05) + + +### Bug Fixes + +* **registry:** use cert instead of certfile opt ([a45880d](https://github.com/zkat/pacote/commit/a45880d)) + + + +<a name="2.7.28"></a> +## [2.7.28](https://github.com/zkat/pacote/compare/v2.7.27...v2.7.28) (2017-06-05) + + +### Bug Fixes + +* **git:** limit ls-remote output to heads/tags (#97) ([c1e3dcd](https://github.com/zkat/pacote/commit/c1e3dcd)) +* **proxy:** send certificate authority, key and other options (#95) ([c4b6128](https://github.com/zkat/pacote/commit/c4b6128)) +* **registry:** add support for global auth and _auth token (#96) ([7919fb7](https://github.com/zkat/pacote/commit/7919fb7)) +* **registry:** emit npm-session header (#98) ([9816b18](https://github.com/zkat/pacote/commit/9816b18)) + + + +<a name="2.7.27"></a> +## [2.7.27](https://github.com/zkat/pacote/compare/v2.7.26...v2.7.27) (2017-06-01) + + +### Bug Fixes + +* **git:** fix semver range detection. oops ([76d9233](https://github.com/zkat/pacote/commit/76d9233)) + + + +<a name="2.7.26"></a> +## [2.7.26](https://github.com/zkat/pacote/compare/v2.7.25...v2.7.26) (2017-06-01) + + +### Bug Fixes + +* **git:** hash was not being replaced/appended correctly ([6fcbed5](https://github.com/zkat/pacote/commit/6fcbed5)) + + + +<a name="2.7.25"></a> +## [2.7.25](https://github.com/zkat/pacote/compare/v2.7.24...v2.7.25) (2017-05-31) + + +### Bug Fixes + +* **git:** git deps were getting _resolved without shasums ([96f0675](https://github.com/zkat/pacote/commit/96f0675)) + + + +<a name="2.7.24"></a> +## [2.7.24](https://github.com/zkat/pacote/compare/v2.7.23...v2.7.24) (2017-05-31) + + +### Bug Fixes + +* **deps:** update dep versions with new patches ([dc2e4ff](https://github.com/zkat/pacote/commit/dc2e4ff)) + + + +<a name="2.7.23"></a> +## [2.7.23](https://github.com/zkat/pacote/compare/v2.7.22...v2.7.23) (2017-05-31) + + +### Bug Fixes + +* **git:** fix ls-remote command and throw away ^{} junk ([62ba84d](https://github.com/zkat/pacote/commit/62ba84d)) +* **git:** use the parsed git committish from npa ([77a676a](https://github.com/zkat/pacote/commit/77a676a)) + + + +<a name="2.7.22"></a> +## [2.7.22](https://github.com/zkat/pacote/compare/v2.7.21...v2.7.22) (2017-05-31) + + +### Bug Fixes + +* **git:** accept shortened git hashes (#91) ([4466388](https://github.com/zkat/pacote/commit/4466388)) + + + <a name="2.7.21"></a> ## [2.7.21](https://github.com/zkat/pacote/compare/v2.7.20...v2.7.21) (2017-05-25) diff --git a/deps/npm/node_modules/pacote/lib/fetchers/git.js b/deps/npm/node_modules/pacote/lib/fetchers/git.js index d8af769364..9da6a6438a 100644 --- a/deps/npm/node_modules/pacote/lib/fetchers/git.js +++ b/deps/npm/node_modules/pacote/lib/fetchers/git.js @@ -15,7 +15,6 @@ const PassThrough = require('stream').PassThrough const path = require('path') const pipe = BB.promisify(require('mississippi').pipe) const rimraf = BB.promisify(require('rimraf')) -const semver = require('semver') const uniqueFilename = require('unique-filename') // `git` dependencies are fetched from git repositories and packed up. @@ -50,7 +49,7 @@ Fetcher.impl(fetchGit, { opts = optCheck(opts) let streamError const stream = new PassThrough().on('error', e => { streamError = e }) - const cacheName = manifest._resolved || spec.saveSpec || spec.fetchSpec + const cacheName = manifest._uniqueResolved || manifest._resolved || '' const cacheStream = ( opts.cache && cacache.get.stream( @@ -69,11 +68,9 @@ Fetcher.impl(fetchGit, { manifest._repo, manifest._ref, manifest._rawRef, tmp, opts ).then(HEAD => { if (streamError) { throw streamError } - if (!manifest._resolved) { - manifest._resolved = spec.saveSpec.replace(/#.*/, `#${HEAD}`) - manifest._uniqueResolved = manifest._resolved - } - return packDir(manifest, cacheName, tmp, stream, opts) + manifest._resolved = spec.saveSpec.replace(/(:?#.*)?$/, `#${HEAD}`) + manifest._uniqueResolved = manifest._resolved + return packDir(manifest, manifest._uniqueResolved, tmp, stream, opts) }) }).catch(err => stream.emit('error', err)) } @@ -102,9 +99,9 @@ function hostedManifest (spec, opts) { } function plainManifest (repo, spec, opts) { - const rawRef = spec.gitCommittish + const rawRef = spec.gitCommittish || spec.gitRange return resolve( - repo, rawRef, spec.name, opts + repo, spec, spec.name, opts ).then(ref => { if (ref) { const resolved = spec.saveSpec.replace(/(?:#.*)?$/, `#${ref.sha}`) @@ -113,7 +110,7 @@ function plainManifest (repo, spec, opts) { _resolved: resolved, _spec: spec, _ref: ref, - _rawRef: rawRef, + _rawRef: spec.gitCommittish || spec.gitRange, _uniqueResolved: resolved } } else { @@ -132,19 +129,18 @@ function plainManifest (repo, spec, opts) { }) } -function resolve (url, rawRef, name, opts) { - const semverMatch = rawRef.match(/^semver:v?(.*)/) - const isSemver = semverMatch && semver.validRange(semverMatch[1]) +function resolve (url, spec, name, opts) { + const isSemver = !!spec.gitRange return git.revs(url, opts).then(remoteRefs => { return isSemver ? pickManifest({ versions: remoteRefs.versions, 'dist-tags': remoteRefs['dist-tags'], name: name - }, semverMatch[1], opts) + }, spec.gitRange, opts) : remoteRefs ? BB.resolve( - remoteRefs.refs[rawRef] || remoteRefs.refs[remoteRefs.shas[rawRef]] + remoteRefs.refs[spec.gitCommittish] || remoteRefs.refs[remoteRefs.shas[spec.gitCommittish]] ) : null }) diff --git a/deps/npm/node_modules/pacote/lib/fetchers/registry/fetch.js b/deps/npm/node_modules/pacote/lib/fetchers/registry/fetch.js index 46a926a1a1..1c6c8e8d6e 100644 --- a/deps/npm/node_modules/pacote/lib/fetchers/registry/fetch.js +++ b/deps/npm/node_modules/pacote/lib/fetchers/registry/fetch.js @@ -16,14 +16,19 @@ function regFetch (uri, registry, opts) { algorithms: opts.algorithms, cache: getCacheMode(opts), cacheManager: opts.cache, + ca: opts.ca, + cert: opts.cert, headers: getHeaders(uri, registry, opts), integrity: opts.integrity, + key: opts.key, + localAddress: opts.localAddress, memoize: opts.memoize, noProxy: opts.noProxy, Promise: BB, proxy: opts.proxy, referer: opts.refer, retry: opts.retry, + strictSSL: !!opts.strictSSL, timeout: opts.timeout, uid: opts.uid, gid: opts.gid @@ -74,13 +79,15 @@ function getHeaders (uri, registry, opts) { const headers = Object.assign({ 'npm-in-ci': opts.isFromCI, 'npm-scope': opts.projectScope, + 'npm-session': opts.npmSession, 'user-agent': opts.userAgent, 'referer': opts.refer }, opts.headers) - const auth = ( + // check for auth settings specific to this registry + let auth = ( opts.auth && opts.auth[registryKey(registry)] - ) + ) || opts.auth // If a tarball is hosted on a different place than the manifest, only send // credentials on `alwaysAuth` const shouldAuth = auth && ( @@ -94,6 +101,8 @@ function getHeaders (uri, registry, opts) { `${auth.username}:${auth.password}`, 'utf8' ).toString('base64') headers.authorization = `Basic ${encoded}` + } else if (shouldAuth && auth._auth) { + headers.authorization = `Basic ${auth._auth}` } return headers } diff --git a/deps/npm/node_modules/pacote/lib/util/git.js b/deps/npm/node_modules/pacote/lib/util/git.js index dc189b5418..fc3d158fa7 100644 --- a/deps/npm/node_modules/pacote/lib/util/git.js +++ b/deps/npm/node_modules/pacote/lib/util/git.js @@ -105,7 +105,7 @@ function revs (repo, opts) { return BB.resolve(cached) } return pinflight(`ls-remote:${repo}`, () => { - return spawnGit(['ls-remote', repo, '-t', '-h', '*'], { + return spawnGit(['ls-remote', '-h', '-t', repo], { env: gitEnv() }, opts).then(child => { let stdout = '' @@ -117,6 +117,7 @@ function revs (repo, opts) { const sha = split[0].trim() const ref = split[1].trim().match(/(?:refs\/[^/]+\/)?(.*)/)[1] if (!ref) { return revs } // ??? + if (ref.match(/\^\{\}$/)) { return revs } // refs/tags/x^{} crap const type = refType(line) const doc = {sha, ref, type} diff --git a/deps/npm/node_modules/pacote/lib/util/opt-check.js b/deps/npm/node_modules/pacote/lib/util/opt-check.js index dd8aa518dc..a2692836a3 100644 --- a/deps/npm/node_modules/pacote/lib/util/opt-check.js +++ b/deps/npm/node_modules/pacote/lib/util/opt-check.js @@ -12,7 +12,11 @@ function PacoteOptions (opts) { this.scopeTargets = opts.scopeTargets || {} this.defaultTag = opts.defaultTag || 'latest' this.cache = opts.cache + this.ca = opts.ca + this.cert = opts.cert this.integrity = opts.integrity + this.key = opts.key + this.localAddress = opts.localAddress this.log = opts.log || silentlog this.memoize = opts.memoize this.maxSockets = opts.maxSockets || 10 @@ -26,6 +30,7 @@ function PacoteOptions (opts) { this.userAgent = opts.userAgent || `${pkg.name}@${pkg.version}/node@${process.version}+${process.arch} (${process.platform})` this.where = opts.where this.preferOnline = opts.preferOnline + this.strictSSL = !!opts.strictSSL this.isFromCI = !!( opts.isFromCI || process.env['CI'] === 'true' || @@ -33,6 +38,7 @@ function PacoteOptions (opts) { process.env['JENKINS_URL'] || process.env['bamboo.buildKey'] ) + this.npmSession = opts.npmSession this.refer = opts.referer || opts.refer this.projectScope = opts.projectScope this.fullMetadata = opts.fullMetadata diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/CHANGELOG.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/CHANGELOG.md index 854388027b..54d88f3391 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/CHANGELOG.md +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/CHANGELOG.md @@ -2,6 +2,27 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +<a name="2.4.11"></a> +## [2.4.11](https://github.com/zkat/make-fetch-happen/compare/v2.4.10...v2.4.11) (2017-06-05) + + +### Bug Fixes + +* **deps:** bump deps with ssri fix ([bef1994](https://github.com/zkat/make-fetch-happen/commit/bef1994)) + + + +<a name="2.4.10"></a> +## [2.4.10](https://github.com/zkat/make-fetch-happen/compare/v2.4.9...v2.4.10) (2017-05-31) + + +### Bug Fixes + +* **deps:** bump dep versions with bugfixes ([0af4003](https://github.com/zkat/make-fetch-happen/commit/0af4003)) +* **proxy:** use auth parameter for proxy authentication (#30) ([c687306](https://github.com/zkat/make-fetch-happen/commit/c687306)) + + + <a name="2.4.9"></a> ## [2.4.9](https://github.com/zkat/make-fetch-happen/compare/v2.4.8...v2.4.9) (2017-05-25) diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/agent.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/agent.js index 0100498947..a3c910eb93 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/agent.js +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/agent.js @@ -126,6 +126,7 @@ function getProxy (proxyUrl, opts, isHttps) { port: proxyUrl.port, protocol: proxyUrl.protocol, path: proxyUrl.path, + auth: proxyUrl.auth, ca: opts.ca, cert: opts.cert, key: opts.key, diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.travis.yml index 85a50123c6..20b794051c 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.travis.yml +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.travis.yml @@ -1,8 +1,29 @@ +sudo: false + language: node_js + node_js: - "0.8" - "0.10" - "0.12" -before_install: - - '[ "${TRAVIS_NODE_VERSION}" != "0.8" ] || npm install -g npm@1.4.28' - - npm install -g npm@latest + - "1" + - "2" + - "3" + - "4" + - "5" + - "6" + - "7" + +install: + - PATH="`npm bin`:`npm bin -g`:$PATH" + # Node 0.8 comes with a too obsolete npm + - if [[ "`node --version`" =~ ^v0\.8\. ]]; then npm install -g npm@1.4.28 ; fi + # Install dependencies and build + - npm install + +script: + # Output useful info for debugging + - node --version + - npm --version + # Run tests + - npm test diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/History.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/History.md index 0ceef6c13f..2191a9e801 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/History.md +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/History.md @@ -1,4 +1,22 @@ +2.1.1 / 2017-05-30 +================== + + * Revert [fe2162e0ba18123f5b301cba4de1e9dd74e437cd](https://github.com/TooTallNate/node-agent-base/commit/fe2162e0ba18123f5b301cba4de1e9dd74e437cd) and [270bdc92eb8e3bd0444d1e5266e8e9390aeb3095](https://github.com/TooTallNate/node-agent-base/commit/270bdc92eb8e3bd0444d1e5266e8e9390aeb3095) (fixes #7) + +2.1.0 / 2017-05-26 +================== + + * unref is not supported for node < 0.9.1 (@pi0) + * add tests to dangling socket (@pi0) + * check unref() is supported (@pi0) + * fix dangling sockets problem (@pi0) + * add basic "ws" module tests + * make `Agent` be subclassable + * turn `addRequest()` into a named function + * test: Node.js v4 likes to call `cork` on the stream (#3, @tomhughes) + * travis: test node v4, v5, v6 and v7 + 2.0.1 / 2015-09-10 ================== diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/agent.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/agent.js index 4005ebc0ef..7ea91f886c 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/agent.js +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/agent.js @@ -24,12 +24,17 @@ module.exports = Agent; function Agent (callback) { if (!(this instanceof Agent)) return new Agent(callback); - if ('function' != typeof callback) throw new Error('Must pass a "callback function"'); EventEmitter.call(this); - this.callback = callback; + if ('function' === typeof callback) { + this.callback = callback; + } } inherits(Agent, EventEmitter); +Agent.prototype.callback = function callback (req, opts, fn) { + fn(new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')); +}; + /** * Called by node-core's "_http_client.js" module when creating * a new HTTP request with this Agent instance. @@ -37,7 +42,7 @@ inherits(Agent, EventEmitter); * @api public */ -Agent.prototype.addRequest = function (req, host, port, localAddress) { +Agent.prototype.addRequest = function addRequest (req, host, port, localAddress) { var opts; if ('object' == typeof host) { // >= v0.11.x API diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/package.json index 0e296ced06..f74df4fcb7 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/package.json +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/package.json @@ -1,7 +1,8 @@ { "_from": "agent-base@2", - "_id": "agent-base@2.0.1", - "_integrity": "sha1-vY+ehqjrIh//oHvRS+/VXfFCgV4=", + "_id": "agent-base@2.1.1", + "_inBundle": false, + "_integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", "_location": "/pacote/make-fetch-happen/http-proxy-agent/agent-base", "_phantomChildren": {}, "_requested": { @@ -17,9 +18,8 @@ "_requiredBy": [ "/pacote/make-fetch-happen/http-proxy-agent" ], - "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.0.1.tgz", - "_shasum": "bd8f9e86a8eb221fffa07bd14befd55df142815e", - "_shrinkwrap": null, + "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", + "_shasum": "d6de10d5af6132d5bd692427d46fc538539094c7", "_spec": "agent-base@2", "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent", "author": { @@ -27,7 +27,6 @@ "email": "nathan@tootallnate.net", "url": "http://n8.io/" }, - "bin": null, "bugs": { "url": "https://github.com/TooTallNate/node-agent-base/issues" }, @@ -39,7 +38,8 @@ "deprecated": false, "description": "Turn a function into an `http.Agent` instance", "devDependencies": { - "mocha": "2" + "mocha": "2", + "ws": "0.8.0" }, "homepage": "https://github.com/TooTallNate/node-agent-base#readme", "keywords": [ @@ -52,8 +52,6 @@ "license": "MIT", "main": "agent.js", "name": "agent-base", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/TooTallNate/node-agent-base.git" @@ -61,5 +59,5 @@ "scripts": { "test": "mocha --reporter spec" }, - "version": "2.0.1" + "version": "2.1.1" } diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/test/test.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/test/test.js index f87d308f8e..7d8dee66ce 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/test/test.js +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/test/test.js @@ -9,13 +9,45 @@ var net = require('net'); var tls = require('tls'); var http = require('http'); var https = require('https'); +var WebSocket = require('ws'); var assert = require('assert'); var events = require('events'); +var inherits = require('util').inherits; +var semver = require('semver'); var Agent = require('../'); describe('Agent', function () { + describe('subclass', function () { + it('should be subclassable', function (done) { + function MyAgent () { + Agent.call(this); + } + inherits(MyAgent, Agent); + + MyAgent.prototype.callback = function (req, opts, fn) { + assert.equal(req.path, '/foo'); + assert.equal(req.getHeader('host'), '127.0.0.1:1234'); + assert.equal(opts.secureEndpoint, true); + done(); + }; + + var info = url.parse('https://127.0.0.1:1234/foo'); + info.agent = new MyAgent; + https.get(info); + }); + }); describe('"error" event', function () { - it('should be invoked on `http.ClientRequest` instance if passed to callback function on the first tick', function (done) { + it('should be invoked on `http.ClientRequest` instance if `callback()` has not been defined', function (done) { + var agent = new Agent(); + var info = url.parse('http://127.0.0.1/foo'); + info.agent = agent; + var req = http.get(info); + req.on('error', function (err) { + assert.equal('"agent-base" has no default implementation, you must subclass and override `callback()`', err.message); + done(); + }); + }); + it('should be invoked on `http.ClientRequest` instance if Error passed to callback function on the first tick', function (done) { var agent = new Agent(function (req, opts, fn) { fn(new Error('is this caught?')); }); @@ -27,7 +59,7 @@ describe('Agent', function () { done(); }); }); - it('should be invoked on `http.ClientRequest` instance if passed to callback function after the first tick', function (done) { + it('should be invoked on `http.ClientRequest` instance if Error passed to callback function after the first tick', function (done) { var agent = new Agent(function (req, opts, fn) { setTimeout(function () { fn(new Error('is this caught?')); @@ -54,6 +86,10 @@ describe('Agent', function () { done(); }; + // needed for `http` module in Node.js 4 + stream.cork = function () { + }; + var opts = { method: 'GET', host: '127.0.0.1', @@ -298,3 +334,118 @@ describe('"https" module', function () { }); }); }); + +describe('"ws" server', function () { + var wss; + var server; + var port; + + // setup test HTTP server + before(function (done) { + server = http.createServer() + wss = new WebSocket.Server({ server: server }); + server.listen(0, function () { + port = server.address().port; + done(); + }); + }); + + // shut down test HTTP server + after(function (done) { + server.once('close', function () { + done(); + }); + server.close(); + }); + + it('should work for basic WebSocket connections', function (done) { + function onconnection(ws) { + ws.on('message', function (data) { + assert.equal('ping', data); + ws.send('pong'); + }); + } + wss.on('connection', onconnection); + + var agent = new Agent(function (req, opts, fn) { + var socket = net.connect(opts); + fn(null, socket); + }); + + var client = new WebSocket('ws://127.0.0.1:' + port + '/', { + agent: agent + }); + + client.on('open', function () { + client.send('ping'); + }); + + client.on('message', function (data) { + assert.equal('pong', data); + client.close(); + wss.removeListener('connection', onconnection); + done(); + }); + }); + +}); + +describe('"wss" server', function () { + var wss; + var server; + var port; + + // setup test HTTP server + before(function (done) { + var options = { + key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'), + cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem') + }; + server = https.createServer(options); + wss = new WebSocket.Server({ server: server }); + server.listen(0, function () { + port = server.address().port; + done(); + }); + }); + + // shut down test HTTP server + after(function (done) { + server.once('close', function () { + done(); + }); + server.close(); + }); + + it('should work for secure WebSocket connections', function (done) { + function onconnection(ws) { + ws.on('message', function (data) { + assert.equal('ping', data); + ws.send('pong'); + }); + } + wss.on('connection', onconnection); + + var agent = new Agent(function (req, opts, fn) { + var socket = tls.connect(opts); + fn(null, socket); + }); + + var client = new WebSocket('wss://127.0.0.1:' + port + '/', { + agent: agent, + rejectUnauthorized: false + }); + + client.on('open', function () { + client.send('ping'); + }); + + client.on('message', function (data) { + assert.equal('pong', data); + client.close(); + wss.removeListener('connection', onconnection); + done(); + }); + }); + +}); diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.travis.yml index 85a50123c6..20b794051c 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.travis.yml +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.travis.yml @@ -1,8 +1,29 @@ +sudo: false + language: node_js + node_js: - "0.8" - "0.10" - "0.12" -before_install: - - '[ "${TRAVIS_NODE_VERSION}" != "0.8" ] || npm install -g npm@1.4.28' - - npm install -g npm@latest + - "1" + - "2" + - "3" + - "4" + - "5" + - "6" + - "7" + +install: + - PATH="`npm bin`:`npm bin -g`:$PATH" + # Node 0.8 comes with a too obsolete npm + - if [[ "`node --version`" =~ ^v0\.8\. ]]; then npm install -g npm@1.4.28 ; fi + # Install dependencies and build + - npm install + +script: + # Output useful info for debugging + - node --version + - npm --version + # Run tests + - npm test diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/History.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/History.md index 0ceef6c13f..2191a9e801 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/History.md +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/History.md @@ -1,4 +1,22 @@ +2.1.1 / 2017-05-30 +================== + + * Revert [fe2162e0ba18123f5b301cba4de1e9dd74e437cd](https://github.com/TooTallNate/node-agent-base/commit/fe2162e0ba18123f5b301cba4de1e9dd74e437cd) and [270bdc92eb8e3bd0444d1e5266e8e9390aeb3095](https://github.com/TooTallNate/node-agent-base/commit/270bdc92eb8e3bd0444d1e5266e8e9390aeb3095) (fixes #7) + +2.1.0 / 2017-05-26 +================== + + * unref is not supported for node < 0.9.1 (@pi0) + * add tests to dangling socket (@pi0) + * check unref() is supported (@pi0) + * fix dangling sockets problem (@pi0) + * add basic "ws" module tests + * make `Agent` be subclassable + * turn `addRequest()` into a named function + * test: Node.js v4 likes to call `cork` on the stream (#3, @tomhughes) + * travis: test node v4, v5, v6 and v7 + 2.0.1 / 2015-09-10 ================== diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/agent.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/agent.js index 4005ebc0ef..7ea91f886c 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/agent.js +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/agent.js @@ -24,12 +24,17 @@ module.exports = Agent; function Agent (callback) { if (!(this instanceof Agent)) return new Agent(callback); - if ('function' != typeof callback) throw new Error('Must pass a "callback function"'); EventEmitter.call(this); - this.callback = callback; + if ('function' === typeof callback) { + this.callback = callback; + } } inherits(Agent, EventEmitter); +Agent.prototype.callback = function callback (req, opts, fn) { + fn(new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')); +}; + /** * Called by node-core's "_http_client.js" module when creating * a new HTTP request with this Agent instance. @@ -37,7 +42,7 @@ inherits(Agent, EventEmitter); * @api public */ -Agent.prototype.addRequest = function (req, host, port, localAddress) { +Agent.prototype.addRequest = function addRequest (req, host, port, localAddress) { var opts; if ('object' == typeof host) { // >= v0.11.x API diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/package.json index b57e81b1b4..9dedd7231d 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/package.json +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/package.json @@ -1,7 +1,8 @@ { "_from": "agent-base@2", - "_id": "agent-base@2.0.1", - "_integrity": "sha1-vY+ehqjrIh//oHvRS+/VXfFCgV4=", + "_id": "agent-base@2.1.1", + "_inBundle": false, + "_integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", "_location": "/pacote/make-fetch-happen/https-proxy-agent/agent-base", "_phantomChildren": {}, "_requested": { @@ -17,9 +18,8 @@ "_requiredBy": [ "/pacote/make-fetch-happen/https-proxy-agent" ], - "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.0.1.tgz", - "_shasum": "bd8f9e86a8eb221fffa07bd14befd55df142815e", - "_shrinkwrap": null, + "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", + "_shasum": "d6de10d5af6132d5bd692427d46fc538539094c7", "_spec": "agent-base@2", "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent", "author": { @@ -27,7 +27,6 @@ "email": "nathan@tootallnate.net", "url": "http://n8.io/" }, - "bin": null, "bugs": { "url": "https://github.com/TooTallNate/node-agent-base/issues" }, @@ -39,7 +38,8 @@ "deprecated": false, "description": "Turn a function into an `http.Agent` instance", "devDependencies": { - "mocha": "2" + "mocha": "2", + "ws": "0.8.0" }, "homepage": "https://github.com/TooTallNate/node-agent-base#readme", "keywords": [ @@ -52,8 +52,6 @@ "license": "MIT", "main": "agent.js", "name": "agent-base", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/TooTallNate/node-agent-base.git" @@ -61,5 +59,5 @@ "scripts": { "test": "mocha --reporter spec" }, - "version": "2.0.1" + "version": "2.1.1" } diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/test/test.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/test/test.js index f87d308f8e..7d8dee66ce 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/test/test.js +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/test/test.js @@ -9,13 +9,45 @@ var net = require('net'); var tls = require('tls'); var http = require('http'); var https = require('https'); +var WebSocket = require('ws'); var assert = require('assert'); var events = require('events'); +var inherits = require('util').inherits; +var semver = require('semver'); var Agent = require('../'); describe('Agent', function () { + describe('subclass', function () { + it('should be subclassable', function (done) { + function MyAgent () { + Agent.call(this); + } + inherits(MyAgent, Agent); + + MyAgent.prototype.callback = function (req, opts, fn) { + assert.equal(req.path, '/foo'); + assert.equal(req.getHeader('host'), '127.0.0.1:1234'); + assert.equal(opts.secureEndpoint, true); + done(); + }; + + var info = url.parse('https://127.0.0.1:1234/foo'); + info.agent = new MyAgent; + https.get(info); + }); + }); describe('"error" event', function () { - it('should be invoked on `http.ClientRequest` instance if passed to callback function on the first tick', function (done) { + it('should be invoked on `http.ClientRequest` instance if `callback()` has not been defined', function (done) { + var agent = new Agent(); + var info = url.parse('http://127.0.0.1/foo'); + info.agent = agent; + var req = http.get(info); + req.on('error', function (err) { + assert.equal('"agent-base" has no default implementation, you must subclass and override `callback()`', err.message); + done(); + }); + }); + it('should be invoked on `http.ClientRequest` instance if Error passed to callback function on the first tick', function (done) { var agent = new Agent(function (req, opts, fn) { fn(new Error('is this caught?')); }); @@ -27,7 +59,7 @@ describe('Agent', function () { done(); }); }); - it('should be invoked on `http.ClientRequest` instance if passed to callback function after the first tick', function (done) { + it('should be invoked on `http.ClientRequest` instance if Error passed to callback function after the first tick', function (done) { var agent = new Agent(function (req, opts, fn) { setTimeout(function () { fn(new Error('is this caught?')); @@ -54,6 +86,10 @@ describe('Agent', function () { done(); }; + // needed for `http` module in Node.js 4 + stream.cork = function () { + }; + var opts = { method: 'GET', host: '127.0.0.1', @@ -298,3 +334,118 @@ describe('"https" module', function () { }); }); }); + +describe('"ws" server', function () { + var wss; + var server; + var port; + + // setup test HTTP server + before(function (done) { + server = http.createServer() + wss = new WebSocket.Server({ server: server }); + server.listen(0, function () { + port = server.address().port; + done(); + }); + }); + + // shut down test HTTP server + after(function (done) { + server.once('close', function () { + done(); + }); + server.close(); + }); + + it('should work for basic WebSocket connections', function (done) { + function onconnection(ws) { + ws.on('message', function (data) { + assert.equal('ping', data); + ws.send('pong'); + }); + } + wss.on('connection', onconnection); + + var agent = new Agent(function (req, opts, fn) { + var socket = net.connect(opts); + fn(null, socket); + }); + + var client = new WebSocket('ws://127.0.0.1:' + port + '/', { + agent: agent + }); + + client.on('open', function () { + client.send('ping'); + }); + + client.on('message', function (data) { + assert.equal('pong', data); + client.close(); + wss.removeListener('connection', onconnection); + done(); + }); + }); + +}); + +describe('"wss" server', function () { + var wss; + var server; + var port; + + // setup test HTTP server + before(function (done) { + var options = { + key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'), + cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem') + }; + server = https.createServer(options); + wss = new WebSocket.Server({ server: server }); + server.listen(0, function () { + port = server.address().port; + done(); + }); + }); + + // shut down test HTTP server + after(function (done) { + server.once('close', function () { + done(); + }); + server.close(); + }); + + it('should work for secure WebSocket connections', function (done) { + function onconnection(ws) { + ws.on('message', function (data) { + assert.equal('ping', data); + ws.send('pong'); + }); + } + wss.on('connection', onconnection); + + var agent = new Agent(function (req, opts, fn) { + var socket = tls.connect(opts); + fn(null, socket); + }); + + var client = new WebSocket('wss://127.0.0.1:' + port + '/', { + agent: agent, + rejectUnauthorized: false + }); + + client.on('open', function () { + client.send('ping'); + }); + + client.on('message', function (data) { + assert.equal('pong', data); + client.close(); + wss.removeListener('connection', onconnection); + done(); + }); + }); + +}); diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.travis.yml index 85a50123c6..20b794051c 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.travis.yml +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.travis.yml @@ -1,8 +1,29 @@ +sudo: false + language: node_js + node_js: - "0.8" - "0.10" - "0.12" -before_install: - - '[ "${TRAVIS_NODE_VERSION}" != "0.8" ] || npm install -g npm@1.4.28' - - npm install -g npm@latest + - "1" + - "2" + - "3" + - "4" + - "5" + - "6" + - "7" + +install: + - PATH="`npm bin`:`npm bin -g`:$PATH" + # Node 0.8 comes with a too obsolete npm + - if [[ "`node --version`" =~ ^v0\.8\. ]]; then npm install -g npm@1.4.28 ; fi + # Install dependencies and build + - npm install + +script: + # Output useful info for debugging + - node --version + - npm --version + # Run tests + - npm test diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/History.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/History.md index 0ceef6c13f..2191a9e801 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/History.md +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/History.md @@ -1,4 +1,22 @@ +2.1.1 / 2017-05-30 +================== + + * Revert [fe2162e0ba18123f5b301cba4de1e9dd74e437cd](https://github.com/TooTallNate/node-agent-base/commit/fe2162e0ba18123f5b301cba4de1e9dd74e437cd) and [270bdc92eb8e3bd0444d1e5266e8e9390aeb3095](https://github.com/TooTallNate/node-agent-base/commit/270bdc92eb8e3bd0444d1e5266e8e9390aeb3095) (fixes #7) + +2.1.0 / 2017-05-26 +================== + + * unref is not supported for node < 0.9.1 (@pi0) + * add tests to dangling socket (@pi0) + * check unref() is supported (@pi0) + * fix dangling sockets problem (@pi0) + * add basic "ws" module tests + * make `Agent` be subclassable + * turn `addRequest()` into a named function + * test: Node.js v4 likes to call `cork` on the stream (#3, @tomhughes) + * travis: test node v4, v5, v6 and v7 + 2.0.1 / 2015-09-10 ================== diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/agent.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/agent.js index 4005ebc0ef..7ea91f886c 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/agent.js +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/agent.js @@ -24,12 +24,17 @@ module.exports = Agent; function Agent (callback) { if (!(this instanceof Agent)) return new Agent(callback); - if ('function' != typeof callback) throw new Error('Must pass a "callback function"'); EventEmitter.call(this); - this.callback = callback; + if ('function' === typeof callback) { + this.callback = callback; + } } inherits(Agent, EventEmitter); +Agent.prototype.callback = function callback (req, opts, fn) { + fn(new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')); +}; + /** * Called by node-core's "_http_client.js" module when creating * a new HTTP request with this Agent instance. @@ -37,7 +42,7 @@ inherits(Agent, EventEmitter); * @api public */ -Agent.prototype.addRequest = function (req, host, port, localAddress) { +Agent.prototype.addRequest = function addRequest (req, host, port, localAddress) { var opts; if ('object' == typeof host) { // >= v0.11.x API diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/package.json index 81950940bb..e204131537 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/package.json +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/package.json @@ -1,7 +1,8 @@ { "_from": "agent-base@2", - "_id": "agent-base@2.0.1", - "_integrity": "sha1-vY+ehqjrIh//oHvRS+/VXfFCgV4=", + "_id": "agent-base@2.1.1", + "_inBundle": false, + "_integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", "_location": "/pacote/make-fetch-happen/socks-proxy-agent/agent-base", "_phantomChildren": {}, "_requested": { @@ -17,9 +18,8 @@ "_requiredBy": [ "/pacote/make-fetch-happen/socks-proxy-agent" ], - "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.0.1.tgz", - "_shasum": "bd8f9e86a8eb221fffa07bd14befd55df142815e", - "_shrinkwrap": null, + "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", + "_shasum": "d6de10d5af6132d5bd692427d46fc538539094c7", "_spec": "agent-base@2", "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent", "author": { @@ -27,7 +27,6 @@ "email": "nathan@tootallnate.net", "url": "http://n8.io/" }, - "bin": null, "bugs": { "url": "https://github.com/TooTallNate/node-agent-base/issues" }, @@ -39,7 +38,8 @@ "deprecated": false, "description": "Turn a function into an `http.Agent` instance", "devDependencies": { - "mocha": "2" + "mocha": "2", + "ws": "0.8.0" }, "homepage": "https://github.com/TooTallNate/node-agent-base#readme", "keywords": [ @@ -52,8 +52,6 @@ "license": "MIT", "main": "agent.js", "name": "agent-base", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/TooTallNate/node-agent-base.git" @@ -61,5 +59,5 @@ "scripts": { "test": "mocha --reporter spec" }, - "version": "2.0.1" + "version": "2.1.1" } diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js index f87d308f8e..7d8dee66ce 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js @@ -9,13 +9,45 @@ var net = require('net'); var tls = require('tls'); var http = require('http'); var https = require('https'); +var WebSocket = require('ws'); var assert = require('assert'); var events = require('events'); +var inherits = require('util').inherits; +var semver = require('semver'); var Agent = require('../'); describe('Agent', function () { + describe('subclass', function () { + it('should be subclassable', function (done) { + function MyAgent () { + Agent.call(this); + } + inherits(MyAgent, Agent); + + MyAgent.prototype.callback = function (req, opts, fn) { + assert.equal(req.path, '/foo'); + assert.equal(req.getHeader('host'), '127.0.0.1:1234'); + assert.equal(opts.secureEndpoint, true); + done(); + }; + + var info = url.parse('https://127.0.0.1:1234/foo'); + info.agent = new MyAgent; + https.get(info); + }); + }); describe('"error" event', function () { - it('should be invoked on `http.ClientRequest` instance if passed to callback function on the first tick', function (done) { + it('should be invoked on `http.ClientRequest` instance if `callback()` has not been defined', function (done) { + var agent = new Agent(); + var info = url.parse('http://127.0.0.1/foo'); + info.agent = agent; + var req = http.get(info); + req.on('error', function (err) { + assert.equal('"agent-base" has no default implementation, you must subclass and override `callback()`', err.message); + done(); + }); + }); + it('should be invoked on `http.ClientRequest` instance if Error passed to callback function on the first tick', function (done) { var agent = new Agent(function (req, opts, fn) { fn(new Error('is this caught?')); }); @@ -27,7 +59,7 @@ describe('Agent', function () { done(); }); }); - it('should be invoked on `http.ClientRequest` instance if passed to callback function after the first tick', function (done) { + it('should be invoked on `http.ClientRequest` instance if Error passed to callback function after the first tick', function (done) { var agent = new Agent(function (req, opts, fn) { setTimeout(function () { fn(new Error('is this caught?')); @@ -54,6 +86,10 @@ describe('Agent', function () { done(); }; + // needed for `http` module in Node.js 4 + stream.cork = function () { + }; + var opts = { method: 'GET', host: '127.0.0.1', @@ -298,3 +334,118 @@ describe('"https" module', function () { }); }); }); + +describe('"ws" server', function () { + var wss; + var server; + var port; + + // setup test HTTP server + before(function (done) { + server = http.createServer() + wss = new WebSocket.Server({ server: server }); + server.listen(0, function () { + port = server.address().port; + done(); + }); + }); + + // shut down test HTTP server + after(function (done) { + server.once('close', function () { + done(); + }); + server.close(); + }); + + it('should work for basic WebSocket connections', function (done) { + function onconnection(ws) { + ws.on('message', function (data) { + assert.equal('ping', data); + ws.send('pong'); + }); + } + wss.on('connection', onconnection); + + var agent = new Agent(function (req, opts, fn) { + var socket = net.connect(opts); + fn(null, socket); + }); + + var client = new WebSocket('ws://127.0.0.1:' + port + '/', { + agent: agent + }); + + client.on('open', function () { + client.send('ping'); + }); + + client.on('message', function (data) { + assert.equal('pong', data); + client.close(); + wss.removeListener('connection', onconnection); + done(); + }); + }); + +}); + +describe('"wss" server', function () { + var wss; + var server; + var port; + + // setup test HTTP server + before(function (done) { + var options = { + key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'), + cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem') + }; + server = https.createServer(options); + wss = new WebSocket.Server({ server: server }); + server.listen(0, function () { + port = server.address().port; + done(); + }); + }); + + // shut down test HTTP server + after(function (done) { + server.once('close', function () { + done(); + }); + server.close(); + }); + + it('should work for secure WebSocket connections', function (done) { + function onconnection(ws) { + ws.on('message', function (data) { + assert.equal('ping', data); + ws.send('pong'); + }); + } + wss.on('connection', onconnection); + + var agent = new Agent(function (req, opts, fn) { + var socket = tls.connect(opts); + fn(null, socket); + }); + + var client = new WebSocket('wss://127.0.0.1:' + port + '/', { + agent: agent, + rejectUnauthorized: false + }); + + client.on('open', function () { + client.send('ping'); + }); + + client.on('message', function (data) { + assert.equal('pong', data); + client.close(); + wss.removeListener('connection', onconnection); + done(); + }); + }); + +}); diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/package.json index 8b8e2cd878..3760722354 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/package.json +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/package.json @@ -1,28 +1,28 @@ { - "_from": "make-fetch-happen@^2.4.9", - "_id": "make-fetch-happen@2.4.9", + "_from": "make-fetch-happen@^2.4.11", + "_id": "make-fetch-happen@2.4.11", "_inBundle": false, - "_integrity": "sha512-/qh6T1E2gBD31bhutxeFehcHDwbBJJ7F+7w8bNAzPbacqfTwEpeo7W5SVQqciCSfNex51SjnEyw1XuK4zDn+Fw==", + "_integrity": "sha512-3dbl9CVS9Y0hqVzcD5HBYnaNUGw3XWpmeTqGT6ACRrmKS7WKwSDfv5+Gd1K0X/Mt52hsvZwtOH8hrNIulYkhag==", "_location": "/pacote/make-fetch-happen", "_phantomChildren": { - "safe-buffer": "5.0.1" + "safe-buffer": "5.1.0" }, "_requested": { "type": "range", "registry": true, - "raw": "make-fetch-happen@^2.4.9", + "raw": "make-fetch-happen@^2.4.11", "name": "make-fetch-happen", "escapedName": "make-fetch-happen", - "rawSpec": "^2.4.9", + "rawSpec": "^2.4.11", "saveSpec": null, - "fetchSpec": "^2.4.9" + "fetchSpec": "^2.4.11" }, "_requiredBy": [ "/pacote" ], - "_resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-2.4.9.tgz", - "_shasum": "245b799e35da3ec05a45e6ef31f9c34df7d1e0c1", - "_spec": "make-fetch-happen@^2.4.9", + "_resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-2.4.11.tgz", + "_shasum": "0b29967da2dc995e88f778dd0c673855ec7613e3", + "_spec": "make-fetch-happen@^2.4.11", "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote", "author": { "name": "Kat Marchán", @@ -34,7 +34,7 @@ "bundleDependencies": false, "dependencies": { "agentkeepalive": "^3.1.0", - "cacache": "^9.2.4", + "cacache": "^9.2.7", "http-cache-semantics": "^3.7.3", "http-proxy-agent": "^1.0.0", "https-proxy-agent": "^1.0.0", @@ -42,8 +42,8 @@ "mississippi": "^1.2.0", "node-fetch-npm": "^2.0.1", "promise-retry": "^1.1.1", - "socks-proxy-agent": "^2.0.0", - "ssri": "^4.1.3" + "socks-proxy-agent": "^2.1.0", + "ssri": "^4.1.5" }, "deprecated": false, "description": "Opinionated, caching, retrying fetch client", @@ -52,13 +52,13 @@ "mkdirp": "^0.5.1", "nock": "^9.0.6", "npmlog": "^4.1.0", - "nyc": "^10.3.2", + "nyc": "^11.0.2", "rimraf": "^2.5.4", - "safe-buffer": "^5.0.1", + "safe-buffer": "^5.1.0", "standard": "^10.0.1", "standard-version": "^4.0.0", "tacks": "^1.2.6", - "tap": "^10.2.0", + "tap": "^10.3.3", "weallbehave": "^1.0.0", "weallcontribute": "^1.0.7" }, @@ -92,5 +92,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "2.4.9" + "version": "2.4.11" } diff --git a/deps/npm/node_modules/pacote/package.json b/deps/npm/node_modules/pacote/package.json index c27683d0d2..44e5b7eca0 100644 --- a/deps/npm/node_modules/pacote/package.json +++ b/deps/npm/node_modules/pacote/package.json @@ -1,40 +1,40 @@ { - "_from": "pacote@2.7.21", - "_id": "pacote@2.7.21", + "_from": "pacote@2.7.30", + "_id": "pacote@2.7.30", "_inBundle": false, - "_integrity": "sha512-ksTHJiAkJxLmcOGxO6iGMk1cVMTTtIC051ZUqvWbckICIhzScOSBgGRBc4CHRhd62NuqAL082RuOOmb1Mi6o6Q==", + "_integrity": "sha512-xFxozbxytemyfNPZmkL2seTD15mozK8ghov9npjBO4YTs3SnA8I55aiN94eZJ+XhLKzbN8yXqQMr9ti4c3WIDw==", "_location": "/pacote", "_phantomChildren": { - "cacache": "9.2.5", + "cacache": "9.2.8", "chownr": "1.0.1", "lru-cache": "4.0.2", "mississippi": "1.3.0", "mkdirp": "0.5.1", - "npm-package-arg": "5.0.1", + "npm-package-arg": "5.1.1", "once": "1.4.0", - "readable-stream": "2.2.9", + "readable-stream": "2.2.10", "retry": "0.10.1", - "safe-buffer": "5.0.1", + "safe-buffer": "5.1.0", "semver": "5.3.0", - "ssri": "4.1.3" + "ssri": "4.1.5" }, "_requested": { "type": "version", "registry": true, - "raw": "pacote@2.7.21", + "raw": "pacote@2.7.30", "name": "pacote", "escapedName": "pacote", - "rawSpec": "2.7.21", + "rawSpec": "2.7.30", "saveSpec": null, - "fetchSpec": "2.7.21" + "fetchSpec": "2.7.30" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/pacote/-/pacote-2.7.21.tgz", - "_shasum": "e909e8a0559940053300e1127297e92a1302d244", - "_spec": "pacote@2.7.21", + "_resolved": "https://registry.npmjs.org/pacote/-/pacote-2.7.30.tgz", + "_shasum": "f31678e0a40161b592498688c1e2c8d7918eac7e", + "_spec": "pacote@2.7.30", "_where": "/Users/zkat/Documents/code/npm", "author": { "name": "Kat Marchán", @@ -56,22 +56,22 @@ ], "dependencies": { "bluebird": "^3.5.0", - "cacache": "^9.2.5", + "cacache": "^9.2.8", "glob": "^7.1.2", "lru-cache": "^4.0.2", - "make-fetch-happen": "^2.4.9", + "make-fetch-happen": "^2.4.11", "minimatch": "^3.0.4", "mississippi": "^1.2.0", "normalize-package-data": "^2.3.6", - "npm-package-arg": "^5.0.0", + "npm-package-arg": "^5.1.1", "npm-pick-manifest": "^1.0.3", "osenv": "^0.1.4", "promise-inflight": "^1.0.1", "promise-retry": "^1.1.1", "protoduck": "^4.0.0", - "safe-buffer": "^5.0.1", + "safe-buffer": "^5.1.0", "semver": "^5.3.0", - "ssri": "^4.1.3", + "ssri": "^4.1.5", "tar-fs": "^1.15.1", "tar-stream": "^1.5.4", "unique-filename": "^1.1.0", @@ -83,13 +83,13 @@ "mkdirp": "^0.5.1", "nock": "^9.0.13", "npmlog": "^4.1.0", - "nyc": "^10.3.2", + "nyc": "^11.0.2", "require-inject": "^1.4.0", "rimraf": "^2.5.4", "standard": "^10.0.1", "standard-version": "^4.0.0", "tacks": "^1.2.6", - "tap": "^10.2.0", + "tap": "^10.3.3", "weallbehave": "^1.2.0", "weallcontribute": "^1.0.7" }, @@ -120,5 +120,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "2.7.21" + "version": "2.7.30" } diff --git a/deps/npm/node_modules/read-package-tree/README.md b/deps/npm/node_modules/read-package-tree/README.md index b3cda81f7f..d2248f82b5 100644 --- a/deps/npm/node_modules/read-package-tree/README.md +++ b/deps/npm/node_modules/read-package-tree/README.md @@ -35,7 +35,7 @@ mutate package.json data objects (beyond what doesn't limit its search to include/exclude `devDependencies`, or anything else. -Just follows the links in the `node_modules` heirarchy and reads the +Just follows the links in the `node_modules` hierarchy and reads the package.json files it finds therein. ## Symbolic Links diff --git a/deps/npm/node_modules/read-package-tree/package.json b/deps/npm/node_modules/read-package-tree/package.json index f9fa362241..55513a9394 100644 --- a/deps/npm/node_modules/read-package-tree/package.json +++ b/deps/npm/node_modules/read-package-tree/package.json @@ -1,33 +1,33 @@ { - "_from": "read-package-tree@~5.1.5", - "_id": "read-package-tree@5.1.5", - "_integrity": "sha1-rOfmOBx2hPlwqqmPx8XStmat2rY=", + "_from": "read-package-tree@5.1.6", + "_id": "read-package-tree@5.1.6", + "_inBundle": false, + "_integrity": "sha512-FCX1aT3GWyY658wzDICef4p+n0dB+ENRct8E/Qyvppj6xVpOYerBHfUu7OP5Rt1/393Tdglguf5ju5DEX4wZNg==", "_location": "/read-package-tree", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "read-package-tree@~5.1.5", + "raw": "read-package-tree@5.1.6", "name": "read-package-tree", "escapedName": "read-package-tree", - "rawSpec": "~5.1.5", + "rawSpec": "5.1.6", "saveSpec": null, - "fetchSpec": "~5.1.5" + "fetchSpec": "5.1.6" }, "_requiredBy": [ + "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.1.5.tgz", - "_shasum": "ace7e6381c7684f970aaa98fc7c5d2b666addab6", - "_shrinkwrap": null, - "_spec": "read-package-tree@~5.1.5", - "_where": "/Users/zkat/Documents/code/npm", + "_resolved": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.1.6.tgz", + "_shasum": "4f03e83d0486856fb60d97c94882841c2a7b1b7a", + "_spec": "read-package-tree@5.1.6", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, - "bin": null, "bugs": { "url": "https://github.com/npm/read-package-tree/issues" }, @@ -42,9 +42,10 @@ "deprecated": false, "description": "Read the contents of node_modules.", "devDependencies": { - "archy": "0", + "archy": "^1.0.0", + "mkdirp": "^0.5.1", "tacks": "^1.2.1", - "tap": "^1.2.0" + "tap": "^6.3.0" }, "directories": { "test": "test" @@ -56,8 +57,6 @@ "license": "ISC", "main": "rpt.js", "name": "read-package-tree", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git+https://github.com/npm/read-package-tree.git" @@ -65,5 +64,5 @@ "scripts": { "test": "tap test/*.js" }, - "version": "5.1.5" + "version": "5.1.6" } diff --git a/deps/npm/node_modules/read-package-tree/rpt.js b/deps/npm/node_modules/read-package-tree/rpt.js index 8a6a89b085..96f1520120 100644 --- a/deps/npm/node_modules/read-package-tree/rpt.js +++ b/deps/npm/node_modules/read-package-tree/rpt.js @@ -37,25 +37,27 @@ rpt.Node = Node rpt.Link = Link var ID = 0 -function Node (pkg, logical, physical, er, cache) { - if (cache[physical]) return cache[physical] - +function Node (pkg, logical, physical, er, cache, fromLink) { if (!(this instanceof Node)) { return new Node(pkg, logical, physical, er, cache) } - cache[physical] = this + var node = cache[physical] || this + if (fromLink && cache[physical]) return cache[physical] - debug(this.constructor.name, dpath(physical), pkg && pkg._id) + debug(node.constructor.name, dpath(physical), pkg && pkg._id) - this.id = ID++ - this.package = pkg || {} - this.path = logical - this.realpath = physical - this.parent = null - this.isLink = false - this.children = [] - this.error = er + node.path = logical + node.realpath = physical + node.error = er + if (!cache[physical]) { + node.id = ID++ + node.package = pkg || {} + node.parent = null + node.isLink = false + node.children = [] + } + return cache[physical] = node } Node.prototype.package = null @@ -80,7 +82,7 @@ function Link (pkg, logical, physical, realpath, er, cache) { this.realpath = realpath this.package = pkg || {} this.parent = null - this.target = new Node(this.package, logical, realpath, er, cache) + this.target = new Node(this.package, logical, realpath, er, cache, true) this.isLink = true this.children = this.target.children this.error = er diff --git a/deps/npm/node_modules/readable-stream/.travis.yml b/deps/npm/node_modules/readable-stream/.travis.yml index 76b4b0cfcb..0c5d2bc262 100644 --- a/deps/npm/node_modules/readable-stream/.travis.yml +++ b/deps/npm/node_modules/readable-stream/.travis.yml @@ -2,26 +2,40 @@ sudo: false language: node_js before_install: - npm install -g npm@2 - - npm install -g npm + - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g notifications: email: false matrix: fast_finish: true include: - node_js: '0.8' - env: TASK=test + env: + - TASK=test + - NPM_LEGACY=true - node_js: '0.10' - env: TASK=test + env: + - TASK=test + - NPM_LEGACY=true - node_js: '0.11' - env: TASK=test + env: + - TASK=test + - NPM_LEGACY=true - node_js: '0.12' - env: TASK=test + env: + - TASK=test + - NPM_LEGACY=true - node_js: 1 - env: TASK=test + env: + - TASK=test + - NPM_LEGACY=true - node_js: 2 - env: TASK=test + env: + - TASK=test + - NPM_LEGACY=true - node_js: 3 - env: TASK=test + env: + - TASK=test + - NPM_LEGACY=true - node_js: 4 env: TASK=test - node_js: 5 @@ -30,17 +44,19 @@ matrix: env: TASK=test - node_js: 7 env: TASK=test - - node_js: 5 + - node_js: 8 + env: TASK=test + - node_js: 6 env: TASK=browser BROWSER_NAME=ie BROWSER_VERSION="9..latest" - - node_js: 5 + - node_js: 6 env: TASK=browser BROWSER_NAME=opera BROWSER_VERSION="11..latest" - - node_js: 5 + - node_js: 6 env: TASK=browser BROWSER_NAME=chrome BROWSER_VERSION="-3..latest" - - node_js: 5 + - node_js: 6 env: TASK=browser BROWSER_NAME=firefox BROWSER_VERSION="-3..latest" - - node_js: 5 + - node_js: 6 env: TASK=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest" - - node_js: 5 + - node_js: 6 env: TASK=browser BROWSER_NAME=microsoftedge BROWSER_VERSION=latest script: "npm run $TASK" env: diff --git a/deps/npm/node_modules/readable-stream/README.md b/deps/npm/node_modules/readable-stream/README.md index 8b6e5d39bd..3024d77c69 100644 --- a/deps/npm/node_modules/readable-stream/README.md +++ b/deps/npm/node_modules/readable-stream/README.md @@ -18,7 +18,7 @@ npm install --save readable-stream This package is a mirror of the Streams2 and Streams3 implementations in Node-core. -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v7.8.0/docs/api/). +Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v7.10.0/docs/api/stream.html). If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/readable-stream/lib/_stream_readable.js index b19b2088b9..a01012e3cf 100644 --- a/deps/npm/node_modules/readable-stream/lib/_stream_readable.js +++ b/deps/npm/node_modules/readable-stream/lib/_stream_readable.js @@ -28,9 +28,8 @@ var EElistenerCount = function (emitter, type) { var Stream = require('./internal/streams/stream'); /*</replacement>*/ -var Buffer = require('buffer').Buffer; /*<replacement>*/ -var bufferShim = require('buffer-shims'); +var Buffer = require('safe-buffer').Buffer; /*</replacement>*/ /*<replacement>*/ @@ -163,7 +162,7 @@ Readable.prototype.push = function (chunk, encoding) { if (!state.objectMode && typeof chunk === 'string') { encoding = encoding || state.defaultEncoding; if (encoding !== state.encoding) { - chunk = bufferShim.from(chunk, encoding); + chunk = Buffer.from(chunk, encoding); encoding = ''; } } @@ -483,7 +482,7 @@ Readable.prototype.pipe = function (dest, pipeOpts) { var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - var endFn = doEnd ? onend : cleanup; + var endFn = doEnd ? onend : unpipe; if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn); dest.on('unpipe', onunpipe); @@ -516,7 +515,7 @@ Readable.prototype.pipe = function (dest, pipeOpts) { dest.removeListener('error', onerror); dest.removeListener('unpipe', onunpipe); src.removeListener('end', onend); - src.removeListener('end', cleanup); + src.removeListener('end', unpipe); src.removeListener('data', ondata); cleanedUp = true; @@ -873,7 +872,7 @@ function copyFromBufferString(n, list) { // This function is designed to be inlinable, so please take care when making // changes to the function body. function copyFromBuffer(n, list) { - var ret = bufferShim.allocUnsafe(n); + var ret = Buffer.allocUnsafe(n); var p = list.head; var c = 1; p.data.copy(ret); diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/readable-stream/lib/_stream_writable.js index 15db038683..e9701f5007 100644 --- a/deps/npm/node_modules/readable-stream/lib/_stream_writable.js +++ b/deps/npm/node_modules/readable-stream/lib/_stream_writable.js @@ -35,9 +35,8 @@ var internalUtil = { var Stream = require('./internal/streams/stream'); /*</replacement>*/ -var Buffer = require('buffer').Buffer; /*<replacement>*/ -var bufferShim = require('buffer-shims'); +var Buffer = require('safe-buffer').Buffer; /*</replacement>*/ util.inherits(Writable, Stream); @@ -293,7 +292,7 @@ Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { function decodeChunk(state, chunk, encoding) { if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = bufferShim.from(chunk, encoding); + chunk = Buffer.from(chunk, encoding); } return chunk; } diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/BufferList.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/BufferList.js index e4bfcf02dc..82598c8521 100644 --- a/deps/npm/node_modules/readable-stream/lib/internal/streams/BufferList.js +++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/BufferList.js @@ -1,8 +1,8 @@ 'use strict'; -var Buffer = require('buffer').Buffer; /*<replacement>*/ -var bufferShim = require('buffer-shims'); + +var Buffer = require('safe-buffer').Buffer; /*</replacement>*/ module.exports = BufferList; @@ -50,9 +50,9 @@ BufferList.prototype.join = function (s) { }; BufferList.prototype.concat = function (n) { - if (this.length === 0) return bufferShim.alloc(0); + if (this.length === 0) return Buffer.alloc(0); if (this.length === 1) return this.head.data; - var ret = bufferShim.allocUnsafe(n >>> 0); + var ret = Buffer.allocUnsafe(n >>> 0); var p = this.head; var i = 0; while (p) { diff --git a/deps/npm/node_modules/readable-stream/node_modules/buffer-shims/index.js b/deps/npm/node_modules/readable-stream/node_modules/buffer-shims/index.js deleted file mode 100644 index 1cab4c05e1..0000000000 --- a/deps/npm/node_modules/readable-stream/node_modules/buffer-shims/index.js +++ /dev/null @@ -1,108 +0,0 @@ -'use strict'; - -var buffer = require('buffer'); -var Buffer = buffer.Buffer; -var SlowBuffer = buffer.SlowBuffer; -var MAX_LEN = buffer.kMaxLength || 2147483647; -exports.alloc = function alloc(size, fill, encoding) { - if (typeof Buffer.alloc === 'function') { - return Buffer.alloc(size, fill, encoding); - } - if (typeof encoding === 'number') { - throw new TypeError('encoding must not be number'); - } - if (typeof size !== 'number') { - throw new TypeError('size must be a number'); - } - if (size > MAX_LEN) { - throw new RangeError('size is too large'); - } - var enc = encoding; - var _fill = fill; - if (_fill === undefined) { - enc = undefined; - _fill = 0; - } - var buf = new Buffer(size); - if (typeof _fill === 'string') { - var fillBuf = new Buffer(_fill, enc); - var flen = fillBuf.length; - var i = -1; - while (++i < size) { - buf[i] = fillBuf[i % flen]; - } - } else { - buf.fill(_fill); - } - return buf; -} -exports.allocUnsafe = function allocUnsafe(size) { - if (typeof Buffer.allocUnsafe === 'function') { - return Buffer.allocUnsafe(size); - } - if (typeof size !== 'number') { - throw new TypeError('size must be a number'); - } - if (size > MAX_LEN) { - throw new RangeError('size is too large'); - } - return new Buffer(size); -} -exports.from = function from(value, encodingOrOffset, length) { - if (typeof Buffer.from === 'function' && (!global.Uint8Array || Uint8Array.from !== Buffer.from)) { - return Buffer.from(value, encodingOrOffset, length); - } - if (typeof value === 'number') { - throw new TypeError('"value" argument must not be a number'); - } - if (typeof value === 'string') { - return new Buffer(value, encodingOrOffset); - } - if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { - var offset = encodingOrOffset; - if (arguments.length === 1) { - return new Buffer(value); - } - if (typeof offset === 'undefined') { - offset = 0; - } - var len = length; - if (typeof len === 'undefined') { - len = value.byteLength - offset; - } - if (offset >= value.byteLength) { - throw new RangeError('\'offset\' is out of bounds'); - } - if (len > value.byteLength - offset) { - throw new RangeError('\'length\' is out of bounds'); - } - return new Buffer(value.slice(offset, offset + len)); - } - if (Buffer.isBuffer(value)) { - var out = new Buffer(value.length); - value.copy(out, 0, 0, value.length); - return out; - } - if (value) { - if (Array.isArray(value) || (typeof ArrayBuffer !== 'undefined' && value.buffer instanceof ArrayBuffer) || 'length' in value) { - return new Buffer(value); - } - if (value.type === 'Buffer' && Array.isArray(value.data)) { - return new Buffer(value.data); - } - } - - throw new TypeError('First argument must be a string, Buffer, ' + 'ArrayBuffer, Array, or array-like object.'); -} -exports.allocUnsafeSlow = function allocUnsafeSlow(size) { - if (typeof Buffer.allocUnsafeSlow === 'function') { - return Buffer.allocUnsafeSlow(size); - } - if (typeof size !== 'number') { - throw new TypeError('size must be a number'); - } - if (size >= MAX_LEN) { - throw new RangeError('size is too large'); - } - return new SlowBuffer(size); -} diff --git a/deps/npm/node_modules/readable-stream/node_modules/buffer-shims/license.md b/deps/npm/node_modules/readable-stream/node_modules/buffer-shims/license.md deleted file mode 100644 index 01cfaefe2f..0000000000 --- a/deps/npm/node_modules/readable-stream/node_modules/buffer-shims/license.md +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2016 Calvin Metcalf - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE.** diff --git a/deps/npm/node_modules/readable-stream/node_modules/buffer-shims/package.json b/deps/npm/node_modules/readable-stream/node_modules/buffer-shims/package.json deleted file mode 100644 index 8e4af6603b..0000000000 --- a/deps/npm/node_modules/readable-stream/node_modules/buffer-shims/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "_from": "buffer-shims@~1.0.0", - "_id": "buffer-shims@1.0.0", - "_integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=", - "_location": "/readable-stream/buffer-shims", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "buffer-shims@~1.0.0", - "name": "buffer-shims", - "escapedName": "buffer-shims", - "rawSpec": "~1.0.0", - "saveSpec": null, - "fetchSpec": "~1.0.0" - }, - "_requiredBy": [ - "/readable-stream", - "/readable-stream/string_decoder" - ], - "_resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", - "_shasum": "9978ce317388c649ad8793028c3477ef044a8b51", - "_shrinkwrap": null, - "_spec": "buffer-shims@~1.0.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/readable-stream", - "bin": null, - "bugs": { - "url": "https://github.com/calvinmetcalf/buffer-shims/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "some shims for node buffers", - "devDependencies": { - "tape": "^4.5.1" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/calvinmetcalf/buffer-shims#readme", - "license": "MIT", - "main": "index.js", - "name": "buffer-shims", - "optionalDependencies": {}, - "peerDependencies": {}, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/calvinmetcalf/buffer-shims.git" - }, - "scripts": { - "test": "tape test/*.js" - }, - "version": "1.0.0" -} diff --git a/deps/npm/node_modules/readable-stream/node_modules/buffer-shims/readme.md b/deps/npm/node_modules/readable-stream/node_modules/buffer-shims/readme.md deleted file mode 100644 index 7ea6475e28..0000000000 --- a/deps/npm/node_modules/readable-stream/node_modules/buffer-shims/readme.md +++ /dev/null @@ -1,21 +0,0 @@ -buffer-shims -=== - -functions to make sure the new buffer methods work in older browsers. - -```js -var bufferShim = require('buffer-shims'); -bufferShim.from('foo'); -bufferShim.alloc(9, 'cafeface', 'hex'); -bufferShim.allocUnsafe(15); -bufferShim.allocUnsafeSlow(21); -``` - -should just use the original in newer nodes and on older nodes uses fallbacks. - -Known Issues -=== -- this does not patch the buffer object, only the constructor stuff -- it's actually a polyfill - -![](https://i.imgur.com/zxII3jJ.gif) diff --git a/deps/npm/node_modules/readable-stream/node_modules/string_decoder/README.md b/deps/npm/node_modules/readable-stream/node_modules/string_decoder/README.md index 13d827d894..dc3a2d2160 100644 --- a/deps/npm/node_modules/readable-stream/node_modules/string_decoder/README.md +++ b/deps/npm/node_modules/readable-stream/node_modules/string_decoder/README.md @@ -7,8 +7,6 @@ [![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) -[![Sauce Test Status](https://saucelabs.com/browser-matrix/string_decoder.svg)](https://saucelabs.com/u/string_decoder) - ```bash npm install --save string_decoder ``` diff --git a/deps/npm/node_modules/readable-stream/node_modules/string_decoder/lib/string_decoder.js b/deps/npm/node_modules/readable-stream/node_modules/string_decoder/lib/string_decoder.js index 696d7ab613..26fb94c349 100644 --- a/deps/npm/node_modules/readable-stream/node_modules/string_decoder/lib/string_decoder.js +++ b/deps/npm/node_modules/readable-stream/node_modules/string_decoder/lib/string_decoder.js @@ -1,7 +1,6 @@ 'use strict'; -var Buffer = require('buffer').Buffer; -var bufferShim = require('buffer-shims'); +var Buffer = require('safe-buffer').Buffer; var isEncoding = Buffer.isEncoding || function (encoding) { encoding = '' + encoding; @@ -78,7 +77,7 @@ function StringDecoder(encoding) { } this.lastNeed = 0; this.lastTotal = 0; - this.lastChar = bufferShim.allocUnsafe(nb); + this.lastChar = Buffer.allocUnsafe(nb); } StringDecoder.prototype.write = function (buf) { diff --git a/deps/npm/node_modules/readable-stream/node_modules/string_decoder/package.json b/deps/npm/node_modules/readable-stream/node_modules/string_decoder/package.json index fb2958ba2c..cb5868eced 100644 --- a/deps/npm/node_modules/readable-stream/node_modules/string_decoder/package.json +++ b/deps/npm/node_modules/readable-stream/node_modules/string_decoder/package.json @@ -1,7 +1,8 @@ { "_from": "string_decoder@~1.0.0", - "_id": "string_decoder@1.0.0", - "_integrity": "sha1-8G9BFXtmTYYGn4S9vcmw2KsoFmc=", + "_id": "string_decoder@1.0.1", + "_inBundle": false, + "_integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=", "_location": "/readable-stream/string_decoder", "_phantomChildren": {}, "_requested": { @@ -17,18 +18,16 @@ "_requiredBy": [ "/readable-stream" ], - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.0.tgz", - "_shasum": "f06f41157b664d86069f84bdbdc9b0d8ab281667", - "_shrinkwrap": null, + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz", + "_shasum": "62e200f039955a6810d8df0a33ffc0f013662d98", "_spec": "string_decoder@~1.0.0", "_where": "/Users/zkat/Documents/code/npm/node_modules/readable-stream", - "bin": null, "bugs": { "url": "https://github.com/rvagg/string_decoder/issues" }, "bundleDependencies": false, "dependencies": { - "buffer-shims": "~1.0.0" + "safe-buffer": "^5.0.1" }, "deprecated": false, "description": "The string_decoder module from Node core", @@ -46,8 +45,6 @@ "license": "MIT", "main": "lib/string_decoder.js", "name": "string_decoder", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/rvagg/string_decoder.git" @@ -55,5 +52,5 @@ "scripts": { "test": "tap test/parallel/*.js" }, - "version": "1.0.0" + "version": "1.0.1" } diff --git a/deps/npm/node_modules/readable-stream/package.json b/deps/npm/node_modules/readable-stream/package.json index d1bf299d05..5308555f49 100644 --- a/deps/npm/node_modules/readable-stream/package.json +++ b/deps/npm/node_modules/readable-stream/package.json @@ -1,20 +1,24 @@ { - "_from": "readable-stream@~2.2.9", - "_id": "readable-stream@2.2.9", - "_integrity": "sha1-z3jsb0ptHrQ9JkiMrJfwQudLf8g=", + "_from": "readable-stream@2.2.10", + "_id": "readable-stream@2.2.10", + "_inBundle": false, + "_integrity": "sha512-HQEnnoV404e0EtwB9yNiuk2tJ+egeVC8Y9QBAxzDg8DBJt4BzRp+yQuIb/t3FIWkSTmIi+sgx7yVv/ZM0GNoqw==", "_location": "/readable-stream", - "_phantomChildren": {}, + "_phantomChildren": { + "safe-buffer": "5.0.1" + }, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "readable-stream@~2.2.9", + "raw": "readable-stream@2.2.10", "name": "readable-stream", "escapedName": "readable-stream", - "rawSpec": "~2.2.9", + "rawSpec": "2.2.10", "saveSpec": null, - "fetchSpec": "~2.2.9" + "fetchSpec": "2.2.10" }, "_requiredBy": [ + "#USER", "/", "/fs-write-stream-atomic", "/mississippi/concat-stream", @@ -34,12 +38,10 @@ "/tap/tap-mocha-reporter", "/tap/tap-parser" ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz", - "_shasum": "cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8", - "_shrinkwrap": null, - "_spec": "readable-stream@~2.2.9", + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.10.tgz", + "_shasum": "effe72bb7c884c0dd335e2379d526196d9d011ee", + "_spec": "readable-stream@2.2.10", "_where": "/Users/zkat/Documents/code/npm", - "bin": null, "browser": { "util": false, "./readable.js": "./readable-browser.js", @@ -52,11 +54,11 @@ }, "bundleDependencies": false, "dependencies": { - "buffer-shims": "~1.0.0", "core-util-is": "~1.0.0", "inherits": "~2.0.1", "isarray": "~1.0.0", "process-nextick-args": "~1.0.6", + "safe-buffer": "^5.0.1", "string_decoder": "~1.0.0", "util-deprecate": "~1.0.1" }, @@ -85,8 +87,6 @@ "lib/**.js" ] }, - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/nodejs/readable-stream.git" @@ -99,5 +99,5 @@ "test": "tap test/parallel/*.js test/ours/*.js", "write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml" }, - "version": "2.2.9" + "version": "2.2.10" } diff --git a/deps/npm/node_modules/safe-buffer/README.md b/deps/npm/node_modules/safe-buffer/README.md index 96eb387aa0..e9a81afd04 100644 --- a/deps/npm/node_modules/safe-buffer/README.md +++ b/deps/npm/node_modules/safe-buffer/README.md @@ -1,17 +1,20 @@ -# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][npm-url] +# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] -#### Safer Node.js Buffer API - -**Use the new Node.js v6 Buffer APIs (`Buffer.from`, `Buffer.alloc`, -`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in Node.js v0.10, v0.12, v4.x, and v5.x.** - -**Uses the built-in implementations when available.** - -[travis-image]: https://img.shields.io/travis/feross/safe-buffer.svg +[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg [travis-url]: https://travis-ci.org/feross/safe-buffer [npm-image]: https://img.shields.io/npm/v/safe-buffer.svg [npm-url]: https://npmjs.org/package/safe-buffer [downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg +[downloads-url]: https://npmjs.org/package/safe-buffer +[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg +[standard-url]: https://standardjs.com + +#### Safer Node.js Buffer API + +**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, +`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** + +**Uses the built-in implementation when available.** ## install diff --git a/deps/npm/node_modules/safe-buffer/browser.js b/deps/npm/node_modules/safe-buffer/browser.js deleted file mode 100644 index 0bd12027d3..0000000000 --- a/deps/npm/node_modules/safe-buffer/browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('buffer') diff --git a/deps/npm/node_modules/safe-buffer/index.js b/deps/npm/node_modules/safe-buffer/index.js index 74a7358ee8..ea87b099d8 100644 --- a/deps/npm/node_modules/safe-buffer/index.js +++ b/deps/npm/node_modules/safe-buffer/index.js @@ -1,4 +1,6 @@ +/* eslint-disable node/no-deprecated-api */ var buffer = require('buffer') +var Buffer = buffer.Buffer if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { module.exports = buffer diff --git a/deps/npm/node_modules/safe-buffer/package.json b/deps/npm/node_modules/safe-buffer/package.json index d866dd9580..8bce3da125 100644 --- a/deps/npm/node_modules/safe-buffer/package.json +++ b/deps/npm/node_modules/safe-buffer/package.json @@ -1,34 +1,36 @@ { - "_from": "safe-buffer@~5.0.1", - "_id": "safe-buffer@5.0.1", + "_from": "safe-buffer@latest", + "_id": "safe-buffer@5.1.0", "_inBundle": false, - "_integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=", + "_integrity": "sha512-aSLEDudu6OoRr/2rU609gRmnYboRLxgDG1z9o2Q0os7236FwvcqIOO8r8U5JUEwivZOhDaKlFO4SbPTJYyBEyQ==", "_location": "/safe-buffer", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "tag", "registry": true, - "raw": "safe-buffer@~5.0.1", + "raw": "safe-buffer@latest", "name": "safe-buffer", "escapedName": "safe-buffer", - "rawSpec": "~5.0.1", + "rawSpec": "latest", "saveSpec": null, - "fetchSpec": "~5.0.1" + "fetchSpec": "latest" }, "_requiredBy": [ "#USER", - "/" + "/", + "/readable-stream", + "/readable-stream/string_decoder", + "/ssri" ], - "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", - "_shasum": "d263ca54696cd8a306b5ca6551e92de57918fbe7", - "_spec": "safe-buffer@~5.0.1", + "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.0.tgz", + "_shasum": "fe4c8460397f9eaaaa58e73be46273408a45e223", + "_spec": "safe-buffer@latest", "_where": "/Users/zkat/Documents/code/npm", "author": { "name": "Feross Aboukhadijeh", "email": "feross@feross.org", "url": "http://feross.org" }, - "browser": "./browser.js", "bugs": { "url": "https://github.com/feross/safe-buffer/issues" }, @@ -36,7 +38,7 @@ "deprecated": false, "description": "Safer Node.js Buffer API", "devDependencies": { - "standard": "^7.0.0", + "standard": "*", "tape": "^4.0.0", "zuul": "^3.0.0" }, @@ -60,5 +62,5 @@ "scripts": { "test": "standard && tape test.js" }, - "version": "5.0.1" + "version": "5.1.0" } diff --git a/deps/npm/node_modules/safe-buffer/test.js b/deps/npm/node_modules/safe-buffer/test.js index 7da8ad761e..4925059c5c 100644 --- a/deps/npm/node_modules/safe-buffer/test.js +++ b/deps/npm/node_modules/safe-buffer/test.js @@ -1,3 +1,5 @@ +/* eslint-disable node/no-deprecated-api */ + var test = require('tape') var SafeBuffer = require('./').Buffer diff --git a/deps/npm/node_modules/ssri/CHANGELOG.md b/deps/npm/node_modules/ssri/CHANGELOG.md index 46a0093e00..c03bb4174e 100644 --- a/deps/npm/node_modules/ssri/CHANGELOG.md +++ b/deps/npm/node_modules/ssri/CHANGELOG.md @@ -2,6 +2,26 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +<a name="4.1.5"></a> +## [4.1.5](https://github.com/zkat/ssri/compare/v4.1.4...v4.1.5) (2017-06-05) + + +### Bug Fixes + +* **integrityStream:** stop crashing if opts.algorithms and opts.integrity have an algo mismatch ([fb1293e](https://github.com/zkat/ssri/commit/fb1293e)) + + + +<a name="4.1.4"></a> +## [4.1.4](https://github.com/zkat/ssri/compare/v4.1.3...v4.1.4) (2017-05-31) + + +### Bug Fixes + +* **node:** older versions of node[@4](https://github.com/4) do not support base64buffer string parsing ([513df4e](https://github.com/zkat/ssri/commit/513df4e)) + + + <a name="4.1.3"></a> ## [4.1.3](https://github.com/zkat/ssri/compare/v4.1.2...v4.1.3) (2017-05-24) diff --git a/deps/npm/node_modules/ssri/index.js b/deps/npm/node_modules/ssri/index.js index f01986fa51..6ec0d73df6 100644 --- a/deps/npm/node_modules/ssri/index.js +++ b/deps/npm/node_modules/ssri/index.js @@ -1,5 +1,7 @@ 'use strict' +const Buffer = require('safe-buffer').Buffer + const crypto = require('crypto') const Transform = require('stream').Transform @@ -31,7 +33,7 @@ class Hash { this.options = rawOpts ? rawOpts.slice(1).split('?') : [] } hexDigest () { - return this.digest && bufFrom(this.digest, 'base64').toString('hex') + return this.digest && Buffer.from(this.digest, 'base64').toString('hex') } toJSON () { return this.toString() @@ -154,7 +156,7 @@ function fromHex (hexDigest, algorithm, opts) { : '' return parse( `${algorithm}-${ - bufFrom(hexDigest, 'hex').toString('base64') + Buffer.from(hexDigest, 'hex').toString('base64') }${optString}`, opts ) } @@ -257,6 +259,7 @@ function integrityStream (opts) { const match = ( // Integrity verification mode opts.integrity && + newSri[algorithm] && digests && digests.find(hash => { return newSri[algorithm].find(newhash => { @@ -332,7 +335,3 @@ function getPrioritizedHash (algo1, algo2) { ? algo1 : algo2 } - -function bufFrom (data, enc) { - return Buffer.from ? Buffer.from(data, enc) : new Buffer(data, enc) -} diff --git a/deps/npm/node_modules/ssri/package.json b/deps/npm/node_modules/ssri/package.json index fae62d7c52..b004400f38 100644 --- a/deps/npm/node_modules/ssri/package.json +++ b/deps/npm/node_modules/ssri/package.json @@ -1,19 +1,19 @@ { - "_from": "ssri@4.1.3", - "_id": "ssri@4.1.3", + "_from": "ssri@4.1.5", + "_id": "ssri@4.1.5", "_inBundle": false, - "_integrity": "sha512-vDXK4C5lxEMlMXyUvsaNAqyYkoMaScW8r6jUTg3uwUOMnvbMmNRSw3Cal0iiWHtMsQxga7NG4GShS0CKt3Pt1w==", + "_integrity": "sha512-TaLitc/pZH1UF8LCgZWdbssPiOUcPjBmIJsYJa+YltP77mY2qQ0Y2b+VS4C9RbZRH1GPMt4zckqqBd7GE/61ew==", "_location": "/ssri", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "ssri@4.1.3", + "raw": "ssri@4.1.5", "name": "ssri", "escapedName": "ssri", - "rawSpec": "4.1.3", + "rawSpec": "4.1.5", "saveSpec": null, - "fetchSpec": "4.1.3" + "fetchSpec": "4.1.5" }, "_requiredBy": [ "#USER", @@ -23,9 +23,9 @@ "/pacote", "/pacote/make-fetch-happen" ], - "_resolved": "https://registry.npmjs.org/ssri/-/ssri-4.1.3.tgz", - "_shasum": "ec8b5585cbfc726a5f9aad829efce238de831935", - "_spec": "ssri@4.1.3", + "_resolved": "https://registry.npmjs.org/ssri/-/ssri-4.1.5.tgz", + "_shasum": "e3844770b5379ced69b512e70a28d86d86abd43a", + "_spec": "ssri@4.1.5", "_where": "/Users/zkat/Documents/code/npm", "author": { "name": "Kat Marchán", @@ -43,7 +43,9 @@ ] } }, - "dependencies": {}, + "dependencies": { + "safe-buffer": "^5.0.1" + }, "deprecated": false, "description": "Standard Subresource Integrity library -- parses, serializes, generates, and verifies integrity metadata according to the SRI spec.", "devDependencies": { @@ -88,5 +90,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "4.1.3" + "version": "4.1.5" } |