From b5362b5e111c671f84b0af11b04ccd45a6412706 Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Thu, 4 Feb 2016 16:27:22 -0800 Subject: [PATCH] deps: upgrade npm to 3.7.1 PR-URL: https://github.com/nodejs/node/pull/5097 --- deps/npm/.mailmap | 1 + deps/npm/.travis.yml | 3 +- deps/npm/AUTHORS | 7 + deps/npm/CHANGELOG.md | 164 +++++ deps/npm/doc/cli/npm-install.md | 9 +- deps/npm/doc/cli/npm-update.md | 47 +- deps/npm/doc/cli/npm-view.md | 5 + deps/npm/doc/files/package.json.md | 2 +- deps/npm/html/doc/README.html | 2 +- deps/npm/html/doc/cli/npm-access.html | 2 +- deps/npm/html/doc/cli/npm-adduser.html | 2 +- deps/npm/html/doc/cli/npm-bin.html | 2 +- deps/npm/html/doc/cli/npm-bugs.html | 2 +- deps/npm/html/doc/cli/npm-build.html | 2 +- deps/npm/html/doc/cli/npm-bundle.html | 2 +- deps/npm/html/doc/cli/npm-cache.html | 2 +- deps/npm/html/doc/cli/npm-completion.html | 2 +- deps/npm/html/doc/cli/npm-config.html | 2 +- deps/npm/html/doc/cli/npm-dedupe.html | 2 +- deps/npm/html/doc/cli/npm-deprecate.html | 2 +- deps/npm/html/doc/cli/npm-dist-tag.html | 2 +- deps/npm/html/doc/cli/npm-docs.html | 2 +- deps/npm/html/doc/cli/npm-edit.html | 2 +- deps/npm/html/doc/cli/npm-explore.html | 2 +- deps/npm/html/doc/cli/npm-help-search.html | 2 +- deps/npm/html/doc/cli/npm-help.html | 2 +- deps/npm/html/doc/cli/npm-init.html | 2 +- deps/npm/html/doc/cli/npm-install-test.html | 2 +- deps/npm/html/doc/cli/npm-install.html | 10 +- deps/npm/html/doc/cli/npm-link.html | 2 +- deps/npm/html/doc/cli/npm-logout.html | 2 +- deps/npm/html/doc/cli/npm-ls.html | 4 +- deps/npm/html/doc/cli/npm-outdated.html | 2 +- deps/npm/html/doc/cli/npm-owner.html | 2 +- deps/npm/html/doc/cli/npm-pack.html | 2 +- deps/npm/html/doc/cli/npm-ping.html | 2 +- deps/npm/html/doc/cli/npm-prefix.html | 2 +- deps/npm/html/doc/cli/npm-prune.html | 2 +- deps/npm/html/doc/cli/npm-publish.html | 2 +- deps/npm/html/doc/cli/npm-rebuild.html | 2 +- deps/npm/html/doc/cli/npm-repo.html | 2 +- deps/npm/html/doc/cli/npm-restart.html | 2 +- deps/npm/html/doc/cli/npm-root.html | 2 +- deps/npm/html/doc/cli/npm-run-script.html | 2 +- deps/npm/html/doc/cli/npm-search.html | 2 +- deps/npm/html/doc/cli/npm-shrinkwrap.html | 2 +- deps/npm/html/doc/cli/npm-star.html | 2 +- deps/npm/html/doc/cli/npm-stars.html | 2 +- deps/npm/html/doc/cli/npm-start.html | 2 +- deps/npm/html/doc/cli/npm-stop.html | 2 +- deps/npm/html/doc/cli/npm-tag.html | 2 +- deps/npm/html/doc/cli/npm-team.html | 2 +- deps/npm/html/doc/cli/npm-test.html | 2 +- deps/npm/html/doc/cli/npm-uninstall.html | 2 +- deps/npm/html/doc/cli/npm-unpublish.html | 2 +- deps/npm/html/doc/cli/npm-update.html | 49 +- deps/npm/html/doc/cli/npm-version.html | 2 +- deps/npm/html/doc/cli/npm-view.html | 5 +- deps/npm/html/doc/cli/npm-whoami.html | 2 +- deps/npm/html/doc/cli/npm.html | 10 +- deps/npm/html/doc/files/npm-folders.html | 2 +- deps/npm/html/doc/files/npm-global.html | 2 +- deps/npm/html/doc/files/npm-json.html | 4 +- deps/npm/html/doc/files/npmrc.html | 2 +- deps/npm/html/doc/files/package.json.html | 4 +- deps/npm/html/doc/index.html | 2 +- deps/npm/html/doc/misc/npm-coding-style.html | 2 +- deps/npm/html/doc/misc/npm-config.html | 2 +- deps/npm/html/doc/misc/npm-developers.html | 2 +- deps/npm/html/doc/misc/npm-disputes.html | 8 +- deps/npm/html/doc/misc/npm-index.html | 2 +- deps/npm/html/doc/misc/npm-orgs.html | 2 +- deps/npm/html/doc/misc/npm-registry.html | 2 +- deps/npm/html/doc/misc/npm-scope.html | 2 +- deps/npm/html/doc/misc/npm-scripts.html | 2 +- deps/npm/html/doc/misc/removing-npm.html | 2 +- deps/npm/html/doc/misc/semver.html | 2 +- deps/npm/lib/cache/add-remote-git.js | 18 + deps/npm/lib/install/deps.js | 7 +- deps/npm/lib/install/save.js | 4 +- deps/npm/lib/ls.js | 1 - deps/npm/lib/npm.js | 7 +- deps/npm/lib/utils/deep-sort-object.js | 6 +- deps/npm/lib/utils/lifecycle.js | 11 +- deps/npm/man/man1/npm-README.1 | 2 +- deps/npm/man/man1/npm-access.1 | 2 +- deps/npm/man/man1/npm-adduser.1 | 2 +- deps/npm/man/man1/npm-bin.1 | 2 +- deps/npm/man/man1/npm-bugs.1 | 2 +- deps/npm/man/man1/npm-build.1 | 2 +- deps/npm/man/man1/npm-bundle.1 | 2 +- deps/npm/man/man1/npm-cache.1 | 2 +- deps/npm/man/man1/npm-completion.1 | 2 +- deps/npm/man/man1/npm-config.1 | 2 +- deps/npm/man/man1/npm-dedupe.1 | 2 +- deps/npm/man/man1/npm-deprecate.1 | 2 +- deps/npm/man/man1/npm-dist-tag.1 | 2 +- deps/npm/man/man1/npm-docs.1 | 2 +- deps/npm/man/man1/npm-edit.1 | 2 +- deps/npm/man/man1/npm-explore.1 | 2 +- deps/npm/man/man1/npm-help-search.1 | 2 +- deps/npm/man/man1/npm-help.1 | 2 +- deps/npm/man/man1/npm-init.1 | 2 +- deps/npm/man/man1/npm-install-test.1 | 2 +- deps/npm/man/man1/npm-install.1 | 10 +- deps/npm/man/man1/npm-link.1 | 2 +- deps/npm/man/man1/npm-logout.1 | 2 +- deps/npm/man/man1/npm-ls.1 | 4 +- deps/npm/man/man1/npm-outdated.1 | 2 +- deps/npm/man/man1/npm-owner.1 | 2 +- deps/npm/man/man1/npm-pack.1 | 2 +- deps/npm/man/man1/npm-ping.1 | 2 +- deps/npm/man/man1/npm-prefix.1 | 2 +- deps/npm/man/man1/npm-prune.1 | 2 +- deps/npm/man/man1/npm-publish.1 | 2 +- deps/npm/man/man1/npm-rebuild.1 | 2 +- deps/npm/man/man1/npm-repo.1 | 2 +- deps/npm/man/man1/npm-restart.1 | 2 +- deps/npm/man/man1/npm-root.1 | 2 +- deps/npm/man/man1/npm-run-script.1 | 2 +- deps/npm/man/man1/npm-search.1 | 2 +- deps/npm/man/man1/npm-shrinkwrap.1 | 2 +- deps/npm/man/man1/npm-star.1 | 2 +- deps/npm/man/man1/npm-stars.1 | 2 +- deps/npm/man/man1/npm-start.1 | 2 +- deps/npm/man/man1/npm-stop.1 | 2 +- deps/npm/man/man1/npm-tag.1 | 2 +- deps/npm/man/man1/npm-team.1 | 2 +- deps/npm/man/man1/npm-test.1 | 2 +- deps/npm/man/man1/npm-uninstall.1 | 2 +- deps/npm/man/man1/npm-unpublish.1 | 2 +- deps/npm/man/man1/npm-update.1 | 49 +- deps/npm/man/man1/npm-version.1 | 2 +- deps/npm/man/man1/npm-view.1 | 11 +- deps/npm/man/man1/npm-whoami.1 | 2 +- deps/npm/man/man1/npm.1 | 4 +- deps/npm/man/man5/npm-folders.5 | 2 +- deps/npm/man/man5/npm-global.5 | 2 +- deps/npm/man/man5/npm-json.5 | 4 +- deps/npm/man/man5/npmrc.5 | 2 +- deps/npm/man/man5/package.json.5 | 4 +- deps/npm/man/man7/npm-coding-style.7 | 2 +- deps/npm/man/man7/npm-config.7 | 2 +- deps/npm/man/man7/npm-developers.7 | 2 +- deps/npm/man/man7/npm-disputes.7 | 2 +- deps/npm/man/man7/npm-index.7 | 2 +- deps/npm/man/man7/npm-orgs.7 | 2 +- deps/npm/man/man7/npm-registry.7 | 2 +- deps/npm/man/man7/npm-scope.7 | 2 +- deps/npm/man/man7/npm-scripts.7 | 2 +- deps/npm/man/man7/removing-npm.7 | 2 +- deps/npm/man/man7/semver.7 | 2 +- .../node_modules/lodash.clonedeep/README.md | 4 +- .../node_modules/lodash.clonedeep/index.js | 16 +- .../lodash.clonedeep/package.json | 26 +- .../node_modules/retry/.npmignore | 2 + .../node_modules/retry/License | 21 + .../node_modules/retry/Makefile | 21 + .../node_modules/retry/README.md | 195 ++++++ .../node_modules/retry/equation.gif | Bin 0 -> 1209 bytes .../node_modules/retry/example/dns.js | 31 + .../node_modules/retry/index.js | 1 + .../node_modules/retry/lib/retry.js | 94 +++ .../node_modules/retry/lib/retry_operation.js | 120 ++++ .../node_modules/retry/package.json | 79 +++ .../node_modules/retry/test/common.js | 10 + .../test/integration/test-retry-operation.js | 106 +++ .../retry/test/integration/test-retry-wrap.js | 77 +++ .../retry/test/integration/test-timeouts.js | 69 ++ .../node_modules/retry/test/runner.js | 5 + .../node_modules/are-we-there-yet/.npmignore | 2 + .../node_modules/are-we-there-yet/index.js | 38 +- .../node_modules/delegates/History.md | 6 + .../node_modules/delegates/License | 20 + .../node_modules/delegates/package.json | 82 ++- .../are-we-there-yet/package.json | 33 +- .../gauge/node_modules/lodash.pad/README.md | 4 +- .../gauge/node_modules/lodash.pad/index.js | 23 +- .../node_modules/lodash.repeat/README.md | 4 +- .../node_modules/lodash.repeat/index.js | 10 +- .../node_modules/lodash.repeat/package.json | 12 +- .../node_modules/lodash.pad/package.json | 12 +- .../node_modules/lodash.repeat/README.md | 4 +- .../node_modules/lodash.repeat/index.js | 10 +- .../node_modules/lodash.repeat/package.json | 8 +- .../node_modules/lodash.repeat/README.md | 4 +- .../node_modules/lodash.repeat/index.js | 10 +- .../node_modules/lodash.repeat/package.json | 8 +- .../npmlog/node_modules/gauge/package.json | 28 +- .../npmlog/node_modules/gauge/progress-bar.js | 9 +- .../node_modules/gauge/test/progress-bar.js | 2 +- deps/npm/node_modules/npmlog/package.json | 99 ++- ...nore~8d21794... deps: upgrade npm to 3.6.0 | 5 - .../readable-stream/.npmignore~HEAD | 5 - ...ENSE~8d21794... deps: upgrade npm to 3.6.0 | 18 - ...SE~8d21794... deps: upgrade npm to 3.6.0_0 | 18 - .../node_modules/readable-stream/LICENSE~HEAD | 18 - .../readable-stream/LICENSE~HEAD_0 | 18 - .../readable-stream/README.md~HEAD | 14 - ...x.js~8d21794... deps: upgrade npm to 3.6.0 | 1 - .../readable-stream/duplex.js~HEAD | 1 - .../lib/_stream_duplex.js~HEAD | 89 --- .../lib/_stream_passthrough.js~HEAD | 46 -- .../lib/_stream_transform.js~HEAD | 210 ------ .../lib/_stream_writable.js~HEAD | 386 ----------- ...E.md~8d21794... deps: upgrade npm to 3.6.0 | 3 - .../node_modules/core-util-is/README.md~HEAD | 3 - ...atch~8d21794... deps: upgrade npm to 3.6.0 | 604 ------------------ .../core-util-is/float.patch~HEAD | 604 ------------------ ...l.js~8d21794... deps: upgrade npm to 3.6.0 | 107 ---- .../core-util-is/lib/util.js~HEAD | 107 ---- .../node_modules/isarray/README.md~HEAD | 54 -- ...json~8d21794... deps: upgrade npm to 3.6.0 | 19 - .../node_modules/isarray/component.json~HEAD | 19 - ...x.js~8d21794... deps: upgrade npm to 3.6.0 | 3 - .../node_modules/isarray/index.js~HEAD | 3 - ...nore~8d21794... deps: upgrade npm to 3.6.0 | 2 - .../string_decoder/.npmignore~HEAD | 2 - ...ENSE~8d21794... deps: upgrade npm to 3.6.0 | 20 - .../node_modules/string_decoder/LICENSE~HEAD | 20 - ...E.md~8d21794... deps: upgrade npm to 3.6.0 | 7 - .../string_decoder/README.md~HEAD | 7 - ...x.js~8d21794... deps: upgrade npm to 3.6.0 | 221 ------- .../node_modules/string_decoder/index.js~HEAD | 221 ------- ...h.js~8d21794... deps: upgrade npm to 3.6.0 | 1 - .../readable-stream/passthrough.js~HEAD | 1 - .../readable-stream/readable.js~HEAD | 8 - ...m.js~8d21794... deps: upgrade npm to 3.6.0 | 1 - .../readable-stream/transform.js~HEAD | 1 - ...e.js~8d21794... deps: upgrade npm to 3.6.0 | 1 - .../readable-stream/writable.js~HEAD | 1 - deps/npm/node_modules/request/CHANGELOG.md | 17 +- deps/npm/node_modules/request/README.md | 2 +- deps/npm/node_modules/request/lib/har.js | 5 +- .../npm/node_modules/request/lib/multipart.js | 3 + deps/npm/node_modules/request/lib/tunnel.js | 2 - .../request/node_modules/aws4/.npmignore | 3 + .../request/node_modules/aws4/.tern-port | 1 + .../request/node_modules/aws4/.travis.yml | 5 + .../node_modules/aws4/LICENSE} | 37 +- .../request/node_modules/aws4/README.md | 509 +++++++++++++++ .../request/node_modules/aws4/aws4.js | 313 +++++++++ .../request/node_modules/aws4/example.js | 371 +++++++++++ .../aws4/node_modules/lru-cache/.npmignore | 1 + .../aws4/node_modules/lru-cache/.travis.yml | 8 + .../aws4/node_modules/lru-cache/CONTRIBUTORS | 14 + .../aws4/node_modules/lru-cache/LICENSE | 15 + .../aws4/node_modules/lru-cache/README.md | 137 ++++ .../node_modules/lru-cache/lib/lru-cache.js | 334 ++++++++++ .../aws4/node_modules/lru-cache/package.json | 84 +++ .../aws4/node_modules/lru-cache/test/basic.js | 396 ++++++++++++ .../node_modules/lru-cache/test/foreach.js | 120 ++++ .../lru-cache/test/memory-leak.js | 51 ++ .../node_modules/lru-cache/test/serialize.js | 215 +++++++ .../request/node_modules/aws4/package.json | 130 ++++ .../request/node_modules/hawk/dist/client.js | 5 +- .../request/node_modules/hawk/lib/server.js | 12 +- .../request/node_modules/hawk/lib/utils.js | 30 +- .../request/node_modules/hawk/package.json | 20 +- .../request/node_modules/hawk/test/server.js | 27 + .../request/node_modules/hawk/test/utils.js | 28 + .../node_modules/http-signature/CHANGES.md | 7 + .../http-signature/http_signing.md | 74 ++- .../node_modules/http-signature/lib/signer.js | 5 + .../node_modules => }/assert-plus/AUTHORS | 0 .../node_modules => }/assert-plus/CHANGES.md | 0 .../node_modules/assert-plus/README.md | 71 +- .../node_modules/assert-plus/assert.js | 375 +++++------ .../node_modules/assert-plus/package.json | 115 +++- .../sshpk/node_modules/assert-plus/README.md | 155 ----- .../sshpk/node_modules/assert-plus/assert.js | 206 ------ .../node_modules/assert-plus/package.json | 107 ---- .../node_modules/http-signature/package.json | 24 +- .../request/node_modules/qs/.travis.yml | 71 +- .../request/node_modules/qs/CHANGELOG.md | 161 ++--- .../request/node_modules/qs/README.md | 166 ++--- .../request/node_modules/qs/bower.json | 2 +- .../request/node_modules/qs/component.json | 2 +- .../request/node_modules/qs/dist/qs.js | 285 ++++----- .../request/node_modules/qs/lib/index.js | 8 +- .../request/node_modules/qs/lib/parse.js | 75 +-- .../request/node_modules/qs/lib/stringify.js | 68 +- .../request/node_modules/qs/lib/utils.js | 118 ++-- .../request/node_modules/qs/package.json | 132 ++-- .../request/node_modules/qs/test/index.js | 5 + .../request/node_modules/qs/test/parse.js | 557 +++++++--------- .../request/node_modules/qs/test/stringify.js | 336 ++++------ .../request/node_modules/qs/test/utils.js | 31 +- deps/npm/node_modules/request/package.json | 57 +- deps/npm/node_modules/request/request.js | 76 ++- deps/npm/node_modules/retry/Readme.md | 30 +- deps/npm/node_modules/retry/lib/retry.js | 7 +- .../node_modules/retry/lib/retry_operation.js | 20 +- deps/npm/node_modules/retry/package.json | 90 ++- deps/npm/node_modules/rimraf/README.md | 2 +- deps/npm/node_modules/rimraf/package.json | 38 +- deps/npm/node_modules/which/.npmignore | 3 + .../which/node_modules/isexe/.npmignore | 2 + .../which/node_modules/isexe/README.md | 51 ++ .../which/node_modules/isexe/access.js | 15 + .../which/node_modules/isexe/index.js | 59 ++ .../which/node_modules/isexe/mode.js | 37 ++ .../which/node_modules/isexe/package.json | 80 +++ .../which/node_modules/isexe/test/basic.js | 211 ++++++ .../which/node_modules/isexe/windows.js | 36 ++ deps/npm/node_modules/which/package.json | 38 +- deps/npm/node_modules/which/test/basic.js | 33 +- deps/npm/node_modules/which/test/windows.js | 10 + deps/npm/node_modules/which/which.js | 58 +- deps/npm/package.json | 16 +- deps/npm/test/fixtures/onload.js | 1 + deps/npm/test/tap/add-remote-git-file.js | 23 + deps/npm/test/tap/add-remote-git-submodule.js | 145 +++++ deps/npm/test/tap/lifecycle-path.js | 3 +- deps/npm/test/tap/lifecycle.js | 32 + deps/npm/test/tap/ls-production-and-dev.js | 150 +++++ deps/npm/test/tap/onload.js | 39 ++ deps/npm/test/tap/uninstall-save.js | 110 ++++ 318 files changed, 7038 insertions(+), 5375 deletions(-) create mode 100644 deps/npm/node_modules/npm-registry-client/node_modules/retry/.npmignore create mode 100644 deps/npm/node_modules/npm-registry-client/node_modules/retry/License create mode 100644 deps/npm/node_modules/npm-registry-client/node_modules/retry/Makefile create mode 100644 deps/npm/node_modules/npm-registry-client/node_modules/retry/README.md create mode 100644 deps/npm/node_modules/npm-registry-client/node_modules/retry/equation.gif create mode 100644 deps/npm/node_modules/npm-registry-client/node_modules/retry/example/dns.js create mode 100644 deps/npm/node_modules/npm-registry-client/node_modules/retry/index.js create mode 100644 deps/npm/node_modules/npm-registry-client/node_modules/retry/lib/retry.js create mode 100644 deps/npm/node_modules/npm-registry-client/node_modules/retry/lib/retry_operation.js create mode 100644 deps/npm/node_modules/npm-registry-client/node_modules/retry/package.json create mode 100644 deps/npm/node_modules/npm-registry-client/node_modules/retry/test/common.js create mode 100644 deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-retry-operation.js create mode 100644 deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-retry-wrap.js create mode 100644 deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-timeouts.js create mode 100644 deps/npm/node_modules/npm-registry-client/node_modules/retry/test/runner.js create mode 100644 deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/License delete mode 100644 deps/npm/node_modules/readable-stream/.npmignore~8d21794... deps: upgrade npm to 3.6.0 delete mode 100644 deps/npm/node_modules/readable-stream/.npmignore~HEAD delete mode 100644 deps/npm/node_modules/readable-stream/LICENSE~8d21794... deps: upgrade npm to 3.6.0 delete mode 100644 deps/npm/node_modules/readable-stream/LICENSE~8d21794... deps: upgrade npm to 3.6.0_0 delete mode 100644 deps/npm/node_modules/readable-stream/LICENSE~HEAD delete mode 100644 deps/npm/node_modules/readable-stream/LICENSE~HEAD_0 delete mode 100644 deps/npm/node_modules/readable-stream/README.md~HEAD delete mode 100644 deps/npm/node_modules/readable-stream/duplex.js~8d21794... deps: upgrade npm to 3.6.0 delete mode 100644 deps/npm/node_modules/readable-stream/duplex.js~HEAD delete mode 100644 deps/npm/node_modules/readable-stream/lib/_stream_duplex.js~HEAD delete mode 100644 deps/npm/node_modules/readable-stream/lib/_stream_passthrough.js~HEAD delete mode 100644 deps/npm/node_modules/readable-stream/lib/_stream_transform.js~HEAD delete mode 100644 deps/npm/node_modules/readable-stream/lib/_stream_writable.js~HEAD delete mode 100644 deps/npm/node_modules/readable-stream/node_modules/core-util-is/README.md~8d21794... deps: upgrade npm to 3.6.0 delete mode 100644 deps/npm/node_modules/readable-stream/node_modules/core-util-is/README.md~HEAD delete mode 100644 deps/npm/node_modules/readable-stream/node_modules/core-util-is/float.patch~8d21794... deps: upgrade npm to 3.6.0 delete mode 100644 deps/npm/node_modules/readable-stream/node_modules/core-util-is/float.patch~HEAD delete mode 100644 deps/npm/node_modules/readable-stream/node_modules/core-util-is/lib/util.js~8d21794... deps: upgrade npm to 3.6.0 delete mode 100644 deps/npm/node_modules/readable-stream/node_modules/core-util-is/lib/util.js~HEAD delete mode 100644 deps/npm/node_modules/readable-stream/node_modules/isarray/README.md~HEAD delete mode 100644 deps/npm/node_modules/readable-stream/node_modules/isarray/component.json~8d21794... deps: upgrade npm to 3.6.0 delete mode 100644 deps/npm/node_modules/readable-stream/node_modules/isarray/component.json~HEAD delete mode 100644 deps/npm/node_modules/readable-stream/node_modules/isarray/index.js~8d21794... deps: upgrade npm to 3.6.0 delete mode 100644 deps/npm/node_modules/readable-stream/node_modules/isarray/index.js~HEAD delete mode 100644 deps/npm/node_modules/readable-stream/node_modules/string_decoder/.npmignore~8d21794... deps: upgrade npm to 3.6.0 delete mode 100644 deps/npm/node_modules/readable-stream/node_modules/string_decoder/.npmignore~HEAD delete mode 100644 deps/npm/node_modules/readable-stream/node_modules/string_decoder/LICENSE~8d21794... deps: upgrade npm to 3.6.0 delete mode 100644 deps/npm/node_modules/readable-stream/node_modules/string_decoder/LICENSE~HEAD delete mode 100644 deps/npm/node_modules/readable-stream/node_modules/string_decoder/README.md~8d21794... deps: upgrade npm to 3.6.0 delete mode 100644 deps/npm/node_modules/readable-stream/node_modules/string_decoder/README.md~HEAD delete mode 100644 deps/npm/node_modules/readable-stream/node_modules/string_decoder/index.js~8d21794... deps: upgrade npm to 3.6.0 delete mode 100644 deps/npm/node_modules/readable-stream/node_modules/string_decoder/index.js~HEAD delete mode 100644 deps/npm/node_modules/readable-stream/passthrough.js~8d21794... deps: upgrade npm to 3.6.0 delete mode 100644 deps/npm/node_modules/readable-stream/passthrough.js~HEAD delete mode 100644 deps/npm/node_modules/readable-stream/readable.js~HEAD delete mode 100644 deps/npm/node_modules/readable-stream/transform.js~8d21794... deps: upgrade npm to 3.6.0 delete mode 100644 deps/npm/node_modules/readable-stream/transform.js~HEAD delete mode 100644 deps/npm/node_modules/readable-stream/writable.js~8d21794... deps: upgrade npm to 3.6.0 delete mode 100644 deps/npm/node_modules/readable-stream/writable.js~HEAD create mode 100644 deps/npm/node_modules/request/node_modules/aws4/.npmignore create mode 100644 deps/npm/node_modules/request/node_modules/aws4/.tern-port create mode 100644 deps/npm/node_modules/request/node_modules/aws4/.travis.yml rename deps/npm/node_modules/{readable-stream/node_modules/isarray/README.md~8d21794... deps: upgrade npm to 3.6.0 => request/node_modules/aws4/LICENSE} (65%) create mode 100644 deps/npm/node_modules/request/node_modules/aws4/README.md create mode 100644 deps/npm/node_modules/request/node_modules/aws4/aws4.js create mode 100644 deps/npm/node_modules/request/node_modules/aws4/example.js create mode 100644 deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/.npmignore create mode 100644 deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/.travis.yml create mode 100644 deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/CONTRIBUTORS create mode 100644 deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/LICENSE create mode 100644 deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/README.md create mode 100644 deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/lib/lru-cache.js create mode 100644 deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/package.json create mode 100644 deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/test/basic.js create mode 100644 deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/test/foreach.js create mode 100644 deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/test/memory-leak.js create mode 100644 deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/test/serialize.js create mode 100644 deps/npm/node_modules/request/node_modules/aws4/package.json rename deps/npm/node_modules/request/node_modules/http-signature/node_modules/{sshpk/node_modules => }/assert-plus/AUTHORS (100%) rename deps/npm/node_modules/request/node_modules/http-signature/node_modules/{sshpk/node_modules => }/assert-plus/CHANGES.md (100%) delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/README.md delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/assert.js delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/package.json mode change 100644 => 100755 deps/npm/node_modules/request/node_modules/qs/lib/index.js mode change 100644 => 100755 deps/npm/node_modules/request/node_modules/qs/lib/parse.js mode change 100644 => 100755 deps/npm/node_modules/request/node_modules/qs/lib/stringify.js mode change 100644 => 100755 deps/npm/node_modules/request/node_modules/qs/lib/utils.js create mode 100644 deps/npm/node_modules/request/node_modules/qs/test/index.js mode change 100644 => 100755 deps/npm/node_modules/request/node_modules/qs/test/parse.js mode change 100644 => 100755 deps/npm/node_modules/request/node_modules/qs/test/stringify.js mode change 100644 => 100755 deps/npm/node_modules/request/node_modules/qs/test/utils.js create mode 100644 deps/npm/node_modules/which/.npmignore create mode 100644 deps/npm/node_modules/which/node_modules/isexe/.npmignore create mode 100644 deps/npm/node_modules/which/node_modules/isexe/README.md create mode 100644 deps/npm/node_modules/which/node_modules/isexe/access.js create mode 100644 deps/npm/node_modules/which/node_modules/isexe/index.js create mode 100644 deps/npm/node_modules/which/node_modules/isexe/mode.js create mode 100644 deps/npm/node_modules/which/node_modules/isexe/package.json create mode 100644 deps/npm/node_modules/which/node_modules/isexe/test/basic.js create mode 100644 deps/npm/node_modules/which/node_modules/isexe/windows.js create mode 100644 deps/npm/node_modules/which/test/windows.js create mode 100644 deps/npm/test/fixtures/onload.js create mode 100644 deps/npm/test/tap/add-remote-git-submodule.js create mode 100644 deps/npm/test/tap/ls-production-and-dev.js create mode 100644 deps/npm/test/tap/onload.js create mode 100644 deps/npm/test/tap/uninstall-save.js diff --git a/deps/npm/.mailmap b/deps/npm/.mailmap index 0f8c98985cd8f6..8cf192015c3541 100644 --- a/deps/npm/.mailmap +++ b/deps/npm/.mailmap @@ -11,6 +11,7 @@ Cedric Nelson Charlie Robbins Dalmais Maxence Danila Gerasimov +Dave Galbraith David Beitey Domenic Denicola Einar Otto Stangvik diff --git a/deps/npm/.travis.yml b/deps/npm/.travis.yml index d6974e29e7f43d..07c64af858ad41 100644 --- a/deps/npm/.travis.yml +++ b/deps/npm/.travis.yml @@ -11,7 +11,8 @@ env: before_install: - "npm config set spin false" - "node . install -g ." - - "sudo mkdir -p /var/run/couchdb" + - "mkdir -p /var/run/couchdb" +sudo: false script: "npm run-script test-all" notifications: slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8 diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index e2ad3de1bd30de..396f1efdb5d285 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -352,3 +352,10 @@ Jimb Esser Alexis Campailla Chris Chua Beau Gunderson +Dave Galbraith +s100 +Sergey Simonchik +Vanja Radovanović +Jonathan Persson +Vedat Mahir YILMAZ +Samuel Reed diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index 65054767217567..df807f4d7f00e8 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,3 +1,167 @@ +### v3.7.1 (2016-02-01): + +Super quick Monday patch on last week's release. + +If you ever wondered why we release things to the `npm@next` tag for a week +before promoting them to `npm@latest`, this is it! + +#### RELEASE TRAIN VINDICATED (again) + +* [`adcaf04`](adcaf047811dcc475ab1984fc93fe34540fc03d7) + [#11349](https://github.com/npm/npm/issues/11349) + Revert last weeks change to use JSON clone instead of `lodash.cloneDeep`. + ([@iarna](https://github.com/iarna)) + +### v3.7.0 (2016-01-20): + +Hi all! This week brings us some important performance improvements, +support for git submodules(!) and a bunch of bug fixes. + +#### PERFORMANCE + +`gauge`, the module responsible for drawing `npm`'s progress bars, had an +embarrassing bug in its debounce implementation that resulted in it, on many +systems, actually being _slower_ than if it hadn't been debouncing. This was +due to it destroying and then creating a timer object any time it got an +update while waiting on its minimum update period to elapse. This only was +a measurable slowdown when sending thousands of updates a second, but +unfortunately parts of `npm`'s logging do exactly that. This has been patched +to eliminate that churn, and our testing shows the progress bar as being +eliminated as a source of slow down. + +Meanwhile, `are-we-there-yet` is the module that tracks just how complete +our big asynchronous install process is. [@STRML](https://github.com/STRML) +spent some time auditing its source and made a few smaller performance +improvements to it. Most impactful was eliminating a bizarre bit of code +that was both binding to AND closing over the current object. I don't have +any explanation for how that crept in. =D + +* [`c680fa9`](https://github.com/npm/npm/commit/c680fa9f8135759eb5512f4b86e47fa265733f79) + `npmlog@2.0.2`: New `are-we-there-yet` with performance patches from + [@STRML](https://github.com/STRML). New `gauge` with timer churn + performance patch. + ([@iarna](https://github.com/iarna)) + +We were also using `lodash`'s `cloneDeep` on `package.json` data which is +definitely overkill, seeing as `package.json` data has all the restrictions +of being `json`. The fix for this is just swapping that out for something +that does a pair of `JSON.stringify`/`JSON.parse`, which is distinctly more +speedy. + +* [`1d1ea7e`](https://github.com/npm/npm/commit/1d1ea7eeb958034878eb6573149aeecc686888d3) + [#11306](https://github.com/npm/npm/pull/11306) + Use JSON clone instead of `lodash.cloneDeep`. + ([@STRML](https://github.com/STRML)) + +#### NEW FEATURE: GIT SUBMODULE SUPPORT + +Long, long requested– the referenced issue is from 2011– we're finally +getting rudimentary git submodule support. + +* [`39dea9c`](https://github.com/npm/npm/commit/39dea9ca4216c6ea628f5ca47d2b34a4b251a1ed) + [#1876](https://github.com/npm/npm/issues/1876) + Add support for git submodules in git remotes. This is a fairly simple + approach, which does not leverage the git caching mechanism to cache + submodules. It also doesn't provide a means to disable automatic + initialization, e.g. via a setting in the `.gitmodules` file. + ([@gagern](https://github.com/gagern)) + +#### ROBUSTNESS + +* [`5dec02a`](https://github.com/npm/npm/commit/5dec02a3d0e82202c021e27aff9d006283fdc25a) + [#10347](https://github.com/npm/npm/issues/10347) + There is an obscure feature that lets you monkey-patch npm when it starts + up. If the module being required with this feature failed, it would + previously just make `npm` error out– this reduces that to a warning. + ([@evanlucas](https://github.com/evanlucas)) + +#### BUG FIXES + +* [`9ab8b8d`](https://github.com/npm/npm/commit/9ab8b8d047792612ae7f9a6079745d51d5283a53) + [#10820](https://github.com/npm/npm/issues/10820) + Fix a bug with `npm ls` where if you asked for ONLY production dependencies in output + it would exclude dependencies that were BOTH production AND development dependencies. + ([@davidvgalbraith](https://github.com/davidvgalbraith)) +* [`6803fed`](https://github.com/npm/npm/commit/6803fedadb8f9b36cd85f7338ecf75d1d183c833) + [#8982](https://github.com/npm/npm/issues/8982) + Fix a bug where, under some circumstances, if you had a path that + contained the name of a package being installed somewhere in it, `npm` + would incorrectly refuse to run lifecycle scripts. + ([@elvanja](https://github.com/elvanja)) +* [`3eae40b`](https://github.com/npm/npm/commit/3eae40b7a681aa067dfe4fea8c9a76da5b508b48) + [#9253](https://github.com/npm/npm/issues/9253) + Fix a bug where, when running lifecycle scripts, if the Node.js binary you ran + `npm` with wasn't in your `PATH`, `npm` wouldn't use it to run your scripts. + ([@segrey](https://github.com/segrey)) +* [`61daa6a`](https://github.com/npm/npm/commit/61daa6ae8cbc041d3a0d8a6f8f268b47dd8176eb) + [#11014](https://github.com/npm/npm/issues/11014) + Fix a bug where running `rimraf node_modules/` followed by `npm + rm --save ` would fail. `npm` now correctly removes the module + from your `package.json` even though it doesn't exist on disk. + ([@davidvgalbraith](https://github.com/davidvgalbraith)) +* [`a605586`](https://github.com/npm/npm/commit/a605586df134ee97c95f89c4b4bd6bc73f7aa439) + [#9679](https://github.com/npm/npm/issues/9679) + Fix a bug where `npm install --save git+https://…` would save a `https://` + url to your `package.json` which was a problem because `npm` wouldn't then + know that it was a git repo. + ([@gagern](https://github.com/gagern)) +* [`bbdc700`](https://github.com/npm/npm/commit/bbdc70024467c365cc4e06b8410947c04b6f145b) + [#10063](https://github.com/npm/npm/issues/10063) + Fix a bug where `npm` would change the order of array properties in the + `package.json` files of dependencies. `npm` adds a bunch of stuff to + `package.json` files in your `node_modules` folder for debugging and + bookkeeping purposes. As a part of this process it sorts the object to + reduce file churn when it does updates. This fixes a bug where the arrays + in the object were also getting sorted. This wasn't a problem for + properties that `npm` itself maintains, but _is_ a problem for properties + used by other packages. + ([@substack](https://github.com/substack)) + +#### DOCS IMPROVEMENTS + +* [`2609a29`](https://github.com/npm/npm/commit/2609a2950704f577ac888668e81ba514568fab44) + [#11273](https://github.com/npm/npm/pull/11273) + Include an example of viewing package version history in the `npm view` documentation. + ([@vedatmahir](https://github.com/vedatmahir)) +* [`719ea9c`](https://github.com/npm/npm/commit/719ea9c45a5c3233f3afde043b89824aad2df0a7) + [#11272](https://github.com/npm/npm/pull/11272) + Fix typographical issue in `npm update` documentation. + ([@jonathanp](https://github.com/jonathanp)) +* [`cb9df5a`](https://github.com/npm/npm/commit/cb9df5a37091e06071d8704b629e7ebaa41c37fe) + [#11215](https://github.com/npm/npm/pull/11215) + Do not call `SEE LICENSE IN ` an _SPDX expression_, as it's not. + ([@kemitchell](https://github.com/kemitchell)) +* [`f427934`](https://github.com/npm/npm/commit/f4279346c368da4bca09385f773e8eed1d389e5e) + [#11196](https://github.com/npm/npm/pull/11196) + Correct the `package.json` examples in the `npm update` documentation to actually be + valid JSON and not just JavaScript object literals. + ([@s100](https://github.com/s100)) + +#### DEPENDENCY UPDATES + +* [`a7b2407`](https://github.com/npm/npm/commit/a7b24074cb59a1ab17c0d8eff1498047e6a123e5) + `retry@0.9.0`: New features and interface agnostic refactoring. + ([@tim-kos](https://github.com/tim-kos)) +* [`220fc77`](https://github.com/npm/npm/commit/220fc7702ae3e5d601dfefd3e95c14e9b32327de) + `request@2.69.0`: + A bunch of small bug fixes and module updates. + ([@simov](https://github.com/simov)) +* [`9e5c84f`](https://github.com/npm/npm/commit/9e5c84f1903748897e54f8ff099729ff744eab0f) + `which@1.2.4`: + Update `isexe` and fix bug in `pathExt`, in which files without extensions + would sometimes be preferred to files with extensions on Windows, even though + those without extensions aren't executable. + `pathExt` is a list of extensions that are considered executable (exe, cmd, + bat, com on Windows). + ([@isaacs](https://github.com/isaacs)) +* [`375b9c4`](https://github.com/npm/npm/commit/375b9c42fe0c6de47ac2f92527354b2ea79b7968) + `rimraf@2.5.1`: Minor doc formatting fixes. + ([@isaacs](https://github.com/isaacs)) +* [`ef1971e`](https://github.com/npm/npm/commit/ef1971e6270c2bc72e6392b51a8b84f52708f7e7) + `lodash.clonedeep@4.0.2`: + Misc minor code cleanup. No functional changes. + ([@jdalton](https://github.com/jdalton)) + ### v3.6.0 (2016-01-20): Hi all! This is a bigger release, in part 'cause we didn't have one last diff --git a/deps/npm/doc/cli/npm-install.md b/deps/npm/doc/cli/npm-install.md index 36566af0df829a..eca4e2c3bf8de6 100644 --- a/deps/npm/doc/cli/npm-install.md +++ b/deps/npm/doc/cli/npm-install.md @@ -169,9 +169,12 @@ after packing it up into a tarball (b). ://[[:]@][:][:][/][#] - `` is one of `git`, `git+ssh`, `git+http`, or - `git+https`. If no `` is specified, then `master` is - used. + `` is one of `git`, `git+ssh`, `git+http`, `git+https`, + or `git+file`. + If no `` is specified, then `master` is used. + + If the repository makes use of submodules, those submodules will + be cloned as well. The following git environment variables are recognized by npm and will be added to the environment when running git: diff --git a/deps/npm/doc/cli/npm-update.md b/deps/npm/doc/cli/npm-update.md index f79752fae9897a..0a7cd97a6c54ac 100644 --- a/deps/npm/doc/cli/npm-update.md +++ b/deps/npm/doc/cli/npm-update.md @@ -44,16 +44,17 @@ on dependencies, `dep1` (`dep2`, .. etc.). The published versions of `dep1` are ``` { - dist-tags: { latest: "1.2.2" }, - versions: { "1.2.2", - "1.2.1", - "1.2.0", - "1.1.2", - "1.1.1", - "1.0.0", - "0.4.1", - "0.4.0", - "0.2.0" + "dist-tags": { "latest": "1.2.2" }, + "versions": { + "1.2.2", + "1.2.1", + "1.2.0", + "1.1.2", + "1.1.1", + "1.0.0", + "0.4.1", + "0.4.0", + "0.2.0" } } ``` @@ -63,8 +64,8 @@ on dependencies, `dep1` (`dep2`, .. etc.). The published versions of `dep1` are If `app`'s `package.json` contains: ``` -dependencies: { - dep1: "^1.1.1" +"dependencies": { + "dep1": "^1.1.1" } ``` @@ -76,8 +77,8 @@ Then `npm update` will install `dep1@1.2.2`, because `1.2.2` is `latest` and However, if `app`'s `package.json` contains: ``` -dependencies: { - dep1: "~1.1.1" +"dependencies": { + "dep1": "~1.1.1" } ``` @@ -91,8 +92,8 @@ which is `1.1.2`. Suppose `app` has a caret dependency on a version below `1.0.0`, for example: ``` -dependencies: { - dep1: "^0.2.0" +"dependencies": { + "dep1": "^0.2.0" } ``` @@ -102,8 +103,8 @@ versions which satisfy `^0.2.0`. If the dependence were on `^0.4.0`: ``` -dependencies: { - dep1: "^0.4.0" +"dependencies": { + "dep1": "^0.4.0" } ``` @@ -118,8 +119,8 @@ the minimum required dependency in `package.json`, you can use `package.json` contains: ``` -dependencies: { - dep1: "^1.1.1" +"dependencies": { + "dep1": "^1.1.1" } ``` @@ -127,8 +128,8 @@ Then `npm update --save` will install `dep1@1.2.2` (i.e., `latest`), and `package.json` will be modified: ``` -dependencies: { - dep1: "^1.2.2" +"dependencies": { + "dep1": "^1.2.2" } ``` @@ -137,7 +138,7 @@ if it installs a new package. ### Updating Globally-Installed Packages -`npm update -g` will apply the `update` action to each globally- installed +`npm update -g` will apply the `update` action to each globally installed package that is `outdated` -- that is, has a version that is different from `latest`. diff --git a/deps/npm/doc/cli/npm-view.md b/deps/npm/doc/cli/npm-view.md index 2215818a457d89..35e42adf9af8f5 100644 --- a/deps/npm/doc/cli/npm-view.md +++ b/deps/npm/doc/cli/npm-view.md @@ -67,6 +67,11 @@ was required by each matching version of yui3: npm view yui3@'>0.5.4' dependencies.jsdom +To show the `connect` package version history, you can do +this: + + npm view connect versions + ## OUTPUT If only a single string field for a single version is output, then it diff --git a/deps/npm/doc/files/package.json.md b/deps/npm/doc/files/package.json.md index 4b278e13242747..cebcc29b7ba930 100644 --- a/deps/npm/doc/files/package.json.md +++ b/deps/npm/doc/files/package.json.md @@ -113,7 +113,7 @@ expression syntax version 2.0 string](https://npmjs.com/package/spdx), like this { "license" : "(ISC OR GPL-3.0)" } If you are using a license that hasn't been assigned an SPDX identifier, or if -you are using a custom license, use the following valid SPDX expression: +you are using a custom license, use a string value like this one: { "license" : "SEE LICENSE IN " } diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html index 6160d3b09d79c5..5e062105d33bdd 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -127,5 +127,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-access.html b/deps/npm/html/doc/cli/npm-access.html index 425cf637440baa..38fd0a01e34c80 100644 --- a/deps/npm/html/doc/cli/npm-access.html +++ b/deps/npm/html/doc/cli/npm-access.html @@ -84,5 +84,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html index 9e06fc99e18b59..d6859f97feb651 100644 --- a/deps/npm/html/doc/cli/npm-adduser.html +++ b/deps/npm/html/doc/cli/npm-adduser.html @@ -68,5 +68,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html index 165e0e29fd7364..23626f1d481198 100644 --- a/deps/npm/html/doc/cli/npm-bin.html +++ b/deps/npm/html/doc/cli/npm-bin.html @@ -35,5 +35,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html index dc9c7cd8e61240..4590ef84fcab0b 100644 --- a/deps/npm/html/doc/cli/npm-bugs.html +++ b/deps/npm/html/doc/cli/npm-bugs.html @@ -53,5 +53,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html index 3ec57f9184278d..d9dc2bfb73bb62 100644 --- a/deps/npm/html/doc/cli/npm-build.html +++ b/deps/npm/html/doc/cli/npm-build.html @@ -40,5 +40,5 @@

DESCRIPTION

       - + diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html index 2247408a5560e0..de0e22c30bb704 100644 --- a/deps/npm/html/doc/cli/npm-bundle.html +++ b/deps/npm/html/doc/cli/npm-bundle.html @@ -31,5 +31,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-cache.html b/deps/npm/html/doc/cli/npm-cache.html index bf766ef426f00a..542c6600a826b7 100644 --- a/deps/npm/html/doc/cli/npm-cache.html +++ b/deps/npm/html/doc/cli/npm-cache.html @@ -81,5 +81,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html index 84cde0e6bb3f91..00958d60d9cc21 100644 --- a/deps/npm/html/doc/cli/npm-completion.html +++ b/deps/npm/html/doc/cli/npm-completion.html @@ -44,5 +44,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html index c7d2b1ce7ed85a..bb00c2847e86cd 100644 --- a/deps/npm/html/doc/cli/npm-config.html +++ b/deps/npm/html/doc/cli/npm-config.html @@ -65,5 +65,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html index 2f03cd836dab4c..7fb31d2aa9bd8d 100644 --- a/deps/npm/html/doc/cli/npm-dedupe.html +++ b/deps/npm/html/doc/cli/npm-dedupe.html @@ -59,5 +59,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html index c1d82e4ab47bb1..16d93204501bdc 100644 --- a/deps/npm/html/doc/cli/npm-deprecate.html +++ b/deps/npm/html/doc/cli/npm-deprecate.html @@ -38,5 +38,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-dist-tag.html b/deps/npm/html/doc/cli/npm-dist-tag.html index d066b8dcd71362..d916b602a9dccb 100644 --- a/deps/npm/html/doc/cli/npm-dist-tag.html +++ b/deps/npm/html/doc/cli/npm-dist-tag.html @@ -85,5 +85,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html index e783d27864c5cf..645cb7649b1dca 100644 --- a/deps/npm/html/doc/cli/npm-docs.html +++ b/deps/npm/html/doc/cli/npm-docs.html @@ -56,5 +56,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html index 18b2d3ef5c1ffd..03852d56aec939 100644 --- a/deps/npm/html/doc/cli/npm-edit.html +++ b/deps/npm/html/doc/cli/npm-edit.html @@ -49,5 +49,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html index 5773991f8cc775..86eadbb6e0e498 100644 --- a/deps/npm/html/doc/cli/npm-explore.html +++ b/deps/npm/html/doc/cli/npm-explore.html @@ -49,5 +49,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html index 6d27bf377ab314..2a7fbe6f342022 100644 --- a/deps/npm/html/doc/cli/npm-help-search.html +++ b/deps/npm/html/doc/cli/npm-help-search.html @@ -46,5 +46,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html index a104ea129a64d9..fe4766b1ada557 100644 --- a/deps/npm/html/doc/cli/npm-help.html +++ b/deps/npm/html/doc/cli/npm-help.html @@ -51,5 +51,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html index 84b40ea1763e1d..af39e88ea7580f 100644 --- a/deps/npm/html/doc/cli/npm-init.html +++ b/deps/npm/html/doc/cli/npm-init.html @@ -48,5 +48,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-install-test.html b/deps/npm/html/doc/cli/npm-install-test.html index 5d618fc18e2efd..f64f6e5303ddfe 100644 --- a/deps/npm/html/doc/cli/npm-install-test.html +++ b/deps/npm/html/doc/cli/npm-install-test.html @@ -42,4 +42,4 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html index 56f15253062e95..962861b1e48755 100644 --- a/deps/npm/html/doc/cli/npm-install.html +++ b/deps/npm/html/doc/cli/npm-install.html @@ -140,9 +140,11 @@

SYNOPSIS

Installs the package from the hosted git provider, cloning it with git. First it tries via the https (git with github) and if that fails, via ssh.

    <protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>[#<commit-ish>]
-

<protocol> is one of git, git+ssh, git+http, or - git+https. If no <commit-ish> is specified, then master is - used.

+

<protocol> is one of git, git+ssh, git+http, git+https, + or git+file. + If no <commit-ish> is specified, then master is used.

+

If the repository makes use of submodules, those submodules will + be cloned as well.

The following git environment variables are recognized by npm and will be added to the environment when running git:

    @@ -305,5 +307,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html index 63122bc8909c24..8487cdc6236b8c 100644 --- a/deps/npm/html/doc/cli/npm-link.html +++ b/deps/npm/html/doc/cli/npm-link.html @@ -73,5 +73,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/cli/npm-logout.html b/deps/npm/html/doc/cli/npm-logout.html index 7a496c4e27cb2f..a803f3cbb6ea3b 100644 --- a/deps/npm/html/doc/cli/npm-logout.html +++ b/deps/npm/html/doc/cli/npm-logout.html @@ -55,5 +55,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html index 8dcbe52bc8a2e8..3ab0f77ee2d0a2 100644 --- a/deps/npm/html/doc/cli/npm-ls.html +++ b/deps/npm/html/doc/cli/npm-ls.html @@ -21,7 +21,7 @@

    SYNOPSIS

    limit the results to only the paths to the packages named. Note that nested packages will also show the paths to the specified packages. For example, running npm ls promzard in npm's source tree will show:

    -
    npm@3.6.0 /path/to/npm
    +
    npm@3.7.1 /path/to/npm
     └─┬ init-package-json@0.0.4
       └── promzard@0.1.5
     

    It will print out extraneous, missing, and invalid packages.

    @@ -104,5 +104,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html index 0c007aa4b1e500..e6395f6e04a95b 100644 --- a/deps/npm/html/doc/cli/npm-outdated.html +++ b/deps/npm/html/doc/cli/npm-outdated.html @@ -116,5 +116,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html index ac7cef923a412e..21abdfe85faaea 100644 --- a/deps/npm/html/doc/cli/npm-owner.html +++ b/deps/npm/html/doc/cli/npm-owner.html @@ -49,5 +49,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html index 1970de10526904..f6b4e071eda9f0 100644 --- a/deps/npm/html/doc/cli/npm-pack.html +++ b/deps/npm/html/doc/cli/npm-pack.html @@ -41,5 +41,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-ping.html b/deps/npm/html/doc/cli/npm-ping.html index 7ebf981a2c27f9..97ffd51b1a23a8 100644 --- a/deps/npm/html/doc/cli/npm-ping.html +++ b/deps/npm/html/doc/cli/npm-ping.html @@ -32,4 +32,4 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html index c12a62a9ed2ceb..fb9589cc7b001d 100644 --- a/deps/npm/html/doc/cli/npm-prefix.html +++ b/deps/npm/html/doc/cli/npm-prefix.html @@ -38,5 +38,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html index dcd15a325c1d07..999963829e9e5a 100644 --- a/deps/npm/html/doc/cli/npm-prune.html +++ b/deps/npm/html/doc/cli/npm-prune.html @@ -40,5 +40,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html index 988de864b5d702..6595041ff19464 100644 --- a/deps/npm/html/doc/cli/npm-publish.html +++ b/deps/npm/html/doc/cli/npm-publish.html @@ -72,5 +72,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html index da082d5123b375..c11fcd916b6d10 100644 --- a/deps/npm/html/doc/cli/npm-rebuild.html +++ b/deps/npm/html/doc/cli/npm-rebuild.html @@ -35,5 +35,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html index d2209b214f905c..6bddc635bb5ae1 100644 --- a/deps/npm/html/doc/cli/npm-repo.html +++ b/deps/npm/html/doc/cli/npm-repo.html @@ -41,5 +41,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html index 42ba7f32d8d0b7..2de5b6055c76c5 100644 --- a/deps/npm/html/doc/cli/npm-restart.html +++ b/deps/npm/html/doc/cli/npm-restart.html @@ -53,5 +53,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html index 8466b90c0c8f90..25e9a262dea635 100644 --- a/deps/npm/html/doc/cli/npm-root.html +++ b/deps/npm/html/doc/cli/npm-root.html @@ -35,5 +35,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html index 60d0619557dd4b..c0d8e4d04f0dca 100644 --- a/deps/npm/html/doc/cli/npm-run-script.html +++ b/deps/npm/html/doc/cli/npm-run-script.html @@ -60,5 +60,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html index b68458788f7b24..158a4ef5c986e7 100644 --- a/deps/npm/html/doc/cli/npm-search.html +++ b/deps/npm/html/doc/cli/npm-search.html @@ -49,5 +49,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html index 8b550e04d49748..e4a75dd4c68863 100644 --- a/deps/npm/html/doc/cli/npm-shrinkwrap.html +++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html @@ -169,5 +169,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html index 0fd7720fa4fc19..17cedee5f03fa5 100644 --- a/deps/npm/html/doc/cli/npm-star.html +++ b/deps/npm/html/doc/cli/npm-star.html @@ -36,5 +36,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html index ed39de14658c94..aa3934f544e841 100644 --- a/deps/npm/html/doc/cli/npm-stars.html +++ b/deps/npm/html/doc/cli/npm-stars.html @@ -36,5 +36,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html index 0d4e6ed1112c5e..b9828307a1d698 100644 --- a/deps/npm/html/doc/cli/npm-start.html +++ b/deps/npm/html/doc/cli/npm-start.html @@ -39,5 +39,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html index 1b614a25f2ef81..6eb14a1c8d1f05 100644 --- a/deps/npm/html/doc/cli/npm-stop.html +++ b/deps/npm/html/doc/cli/npm-stop.html @@ -34,5 +34,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-tag.html b/deps/npm/html/doc/cli/npm-tag.html index e2291046fa9cff..46066c7765fea4 100644 --- a/deps/npm/html/doc/cli/npm-tag.html +++ b/deps/npm/html/doc/cli/npm-tag.html @@ -63,5 +63,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-team.html b/deps/npm/html/doc/cli/npm-team.html index 64ac7cf75df3c7..f97da39dc37ad3 100644 --- a/deps/npm/html/doc/cli/npm-team.html +++ b/deps/npm/html/doc/cli/npm-team.html @@ -67,4 +67,4 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html index 5f41acd1c319f5..0084f1bf59059f 100644 --- a/deps/npm/html/doc/cli/npm-test.html +++ b/deps/npm/html/doc/cli/npm-test.html @@ -37,5 +37,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html index 715c96954fdcee..207911e545ffa7 100644 --- a/deps/npm/html/doc/cli/npm-uninstall.html +++ b/deps/npm/html/doc/cli/npm-uninstall.html @@ -60,5 +60,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html index 4b6d4daddd8489..ae07ba221af559 100644 --- a/deps/npm/html/doc/cli/npm-unpublish.html +++ b/deps/npm/html/doc/cli/npm-unpublish.html @@ -47,5 +47,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html index fb5333422ed0d1..7431583f32187c 100644 --- a/deps/npm/html/doc/cli/npm-update.html +++ b/deps/npm/html/doc/cli/npm-update.html @@ -37,29 +37,30 @@

    SYNOPSIS

    For the examples below, assume that the current package is app and it depends on dependencies, dep1 (dep2, .. etc.). The published versions of dep1 are:

    {
    -  dist-tags: { latest: "1.2.2" },
    -  versions: { "1.2.2",
    -              "1.2.1",
    -              "1.2.0",
    -              "1.1.2",
    -              "1.1.1",
    -              "1.0.0",
    -              "0.4.1",
    -              "0.4.0",
    -              "0.2.0"
    +  "dist-tags": { "latest": "1.2.2" },
    +  "versions": {
    +    "1.2.2",
    +    "1.2.1",
    +    "1.2.0",
    +    "1.1.2",
    +    "1.1.1",
    +    "1.0.0",
    +    "0.4.1",
    +    "0.4.0",
    +    "0.2.0"
       }
     }
     

    Caret Dependencies

    If app's package.json contains:

    -
    dependencies: {
    -  dep1: "^1.1.1"
    +
    "dependencies": {
    +  "dep1": "^1.1.1"
     }
     

    Then npm update will install dep1@1.2.2, because 1.2.2 is latest and 1.2.2 satisfies ^1.1.1.

    Tilde Dependencies

    However, if app's package.json contains:

    -
    dependencies: {
    -  dep1: "~1.1.1"
    +
    "dependencies": {
    +  "dep1": "~1.1.1"
     }
     

    In this case, running npm update will install dep1@1.1.2. Even though the latest tag points to 1.2.2, this version does not satisfy ~1.1.1, which is equivalent @@ -67,14 +68,14 @@

    Tilde Dependencies

    which is 1.1.2.

    Caret Dependencies below 1.0.0

    Suppose app has a caret dependency on a version below 1.0.0, for example:

    -
    dependencies: {
    -  dep1: "^0.2.0"
    +
    "dependencies": {
    +  "dep1": "^0.2.0"
     }
     

    npm update will install dep1@0.2.0, because there are no other versions which satisfy ^0.2.0.

    If the dependence were on ^0.4.0:

    -
    dependencies: {
    -  dep1: "^0.4.0"
    +
    "dependencies": {
    +  "dep1": "^0.4.0"
     }
     

    Then npm update will install dep1@0.4.1, because that is the highest-sorting version that satisfies ^0.4.0 (>= 0.4.0 <0.5.0)

    @@ -83,18 +84,18 @@

    Recording Updates with --save the minimum required dependency in package.json, you can use npm update -S or npm update --save. For example if package.json contains:

    -
    dependencies: {
    -  dep1: "^1.1.1"
    +
    "dependencies": {
    +  "dep1": "^1.1.1"
     }
     

    Then npm update --save will install dep1@1.2.2 (i.e., latest), and package.json will be modified:

    -
    dependencies: {
    -  dep1: "^1.2.2"
    +
    "dependencies": {
    +  "dep1": "^1.2.2"
     }
     

    Note that npm will only write an updated version to package.json if it installs a new package.

    Updating Globally-Installed Packages

    -

    npm update -g will apply the update action to each globally- installed +

    npm update -g will apply the update action to each globally installed package that is outdated -- that is, has a version that is different from latest.

    NOTE: If a package has been upgraded to a version newer than latest, it will @@ -120,5 +121,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html index 5e9a7ee32639c8..031a0340a4355a 100644 --- a/deps/npm/html/doc/cli/npm-version.html +++ b/deps/npm/html/doc/cli/npm-version.html @@ -100,5 +100,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html index 0e3f034be30677..c9fc891d688ca8 100644 --- a/deps/npm/html/doc/cli/npm-view.html +++ b/deps/npm/html/doc/cli/npm-view.html @@ -53,6 +53,9 @@

    SYNOPSIS

    matching version of the package. This will show which version of jsdom was required by each matching version of yui3:

    npm view yui3@'>0.5.4' dependencies.jsdom
    +

    To show the connect package version history, you can do +this:

    +
    npm view connect versions
     

    OUTPUT

    If only a single string field for a single version is output, then it will not be colorized or quoted, so as to enable piping the output to @@ -83,5 +86,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html index dd98b1af77c85a..d137b03bd41c0a 100644 --- a/deps/npm/html/doc/cli/npm-whoami.html +++ b/deps/npm/html/doc/cli/npm-whoami.html @@ -33,5 +33,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html index 09836480beefb0..811502218bf5be 100644 --- a/deps/npm/html/doc/cli/npm.html +++ b/deps/npm/html/doc/cli/npm.html @@ -13,7 +13,7 @@

    npm

    javascript package manager

    SYNOPSIS

    npm <command> [args]
     

    VERSION

    -

    3.6.0

    +

    3.7.1

    DESCRIPTION

    npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency @@ -110,7 +110,7 @@

    CONTRIBUTIONS

    the issues list or ask on the mailing list.

    BUGS

    When you find issues, please report them:

    @@ -118,7 +118,7 @@

    BUGS

  • web: https://github.com/npm/npm/issues
  • email: -npm-@googlegroups.com
  • +npm-@googlegroups.com

Be sure to include all of the output from the npm command that didn't work as expected. The npm-debug.log file is also helpful to provide.

@@ -128,7 +128,7 @@

AUTHOR

Isaac Z. Schlueter :: isaacs :: @izs :: -i@izs.me

+i@izs.me

SEE ALSO

  • npm-help(1)
  • @@ -153,5 +153,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/npm-folders.html b/deps/npm/html/doc/files/npm-folders.html index 4dd7b317a2cb31..e6884af44cfff0 100644 --- a/deps/npm/html/doc/files/npm-folders.html +++ b/deps/npm/html/doc/files/npm-folders.html @@ -183,5 +183,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html index 4dd7b317a2cb31..e6884af44cfff0 100644 --- a/deps/npm/html/doc/files/npm-global.html +++ b/deps/npm/html/doc/files/npm-global.html @@ -183,5 +183,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html index 9c2bb70c63b8c7..427ecbe8e8c3af 100644 --- a/deps/npm/html/doc/files/npm-json.html +++ b/deps/npm/html/doc/files/npm-json.html @@ -90,7 +90,7 @@

    license

    expression syntax version 2.0 string, like this:

    { "license" : "(ISC OR GPL-3.0)" }
     

    If you are using a license that hasn't been assigned an SPDX identifier, or if -you are using a custom license, use the following valid SPDX expression:

    +you are using a custom license, use a string value like this one:

    { "license" : "SEE LICENSE IN <filename>" }
     

    Then include a file named <filename> at the top level of the package.

    Some old packages used license objects or a "licenses" property containing an @@ -559,5 +559,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html index 7ce572a4e7a228..76f733cb510ac0 100644 --- a/deps/npm/html/doc/files/npmrc.html +++ b/deps/npm/html/doc/files/npmrc.html @@ -83,5 +83,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html index 9c2bb70c63b8c7..427ecbe8e8c3af 100644 --- a/deps/npm/html/doc/files/package.json.html +++ b/deps/npm/html/doc/files/package.json.html @@ -90,7 +90,7 @@

    license

    expression syntax version 2.0 string, like this:

    { "license" : "(ISC OR GPL-3.0)" }
     

    If you are using a license that hasn't been assigned an SPDX identifier, or if -you are using a custom license, use the following valid SPDX expression:

    +you are using a custom license, use a string value like this one:

    { "license" : "SEE LICENSE IN <filename>" }
     

    Then include a file named <filename> at the top level of the package.

    Some old packages used license objects or a "licenses" property containing an @@ -559,5 +559,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html index b00cd30c96b157..ebdc2b6c1549ea 100644 --- a/deps/npm/html/doc/index.html +++ b/deps/npm/html/doc/index.html @@ -162,5 +162,5 @@

    semver(7)

           - + diff --git a/deps/npm/html/doc/misc/npm-coding-style.html b/deps/npm/html/doc/misc/npm-coding-style.html index b65041aca60674..d7009ef6094b53 100644 --- a/deps/npm/html/doc/misc/npm-coding-style.html +++ b/deps/npm/html/doc/misc/npm-coding-style.html @@ -154,5 +154,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html index 20e92a3981735d..890c2034100f94 100644 --- a/deps/npm/html/doc/misc/npm-config.html +++ b/deps/npm/html/doc/misc/npm-config.html @@ -849,5 +849,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html index d509c6edbc019d..a8df68473e7a86 100644 --- a/deps/npm/html/doc/misc/npm-developers.html +++ b/deps/npm/html/doc/misc/npm-developers.html @@ -195,5 +195,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html index 948cdbc973f3ce..0ee1df063b0345 100644 --- a/deps/npm/html/doc/misc/npm-disputes.html +++ b/deps/npm/html/doc/misc/npm-disputes.html @@ -13,7 +13,7 @@

    npm-disputes

    Handling Module

    SYNOPSIS

    1. Get the author email with npm owner ls <pkgname>
    2. -
    3. Email the author, CC support@npmjs.com
    4. +
    5. Email the author, CC support@npmjs.com
    6. After a few weeks, if there's no resolution, we'll sort it out.

    Don't squat on package names. Publish code or move out of the way.

    @@ -51,12 +51,12 @@

    DESCRIPTION

    owner (Bob).
  • Joe emails Bob, explaining the situation as respectfully as possible, and what he would like to do with the module name. He -adds the npm support staff support@npmjs.com to the CC list of +adds the npm support staff support@npmjs.com to the CC list of the email. Mention in the email that Bob can run npm owner add joe foo to add Joe as an owner of the foo package.
  • After a reasonable amount of time, if Bob has not responded, or if Bob and Joe can't come to any sort of resolution, email support -support@npmjs.com and we'll sort it out. ("Reasonable" is +support@npmjs.com and we'll sort it out. ("Reasonable" is usually at least 4 weeks, but extra time is allowed around common holidays.)
  • @@ -112,5 +112,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html index 2342f319d6ebdf..0a4c78043739c6 100644 --- a/deps/npm/html/doc/misc/npm-index.html +++ b/deps/npm/html/doc/misc/npm-index.html @@ -162,4 +162,4 @@

    semver(7)

           - + diff --git a/deps/npm/html/doc/misc/npm-orgs.html b/deps/npm/html/doc/misc/npm-orgs.html index 07a766ed892863..2a9652fb052943 100644 --- a/deps/npm/html/doc/misc/npm-orgs.html +++ b/deps/npm/html/doc/misc/npm-orgs.html @@ -86,4 +86,4 @@

    Team Admins create teams

           - + diff --git a/deps/npm/html/doc/misc/npm-registry.html b/deps/npm/html/doc/misc/npm-registry.html index 881a2bbae00837..cda7c39de64adf 100644 --- a/deps/npm/html/doc/misc/npm-registry.html +++ b/deps/npm/html/doc/misc/npm-registry.html @@ -70,5 +70,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-scope.html b/deps/npm/html/doc/misc/npm-scope.html index dd2895914d02ea..386825eca16d4c 100644 --- a/deps/npm/html/doc/misc/npm-scope.html +++ b/deps/npm/html/doc/misc/npm-scope.html @@ -91,5 +91,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html index 50a5c2f578b3d8..0dd23dc0d331f3 100644 --- a/deps/npm/html/doc/misc/npm-scripts.html +++ b/deps/npm/html/doc/misc/npm-scripts.html @@ -207,5 +207,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html index 96dc31259c443d..8e79b68beffd90 100644 --- a/deps/npm/html/doc/misc/removing-npm.html +++ b/deps/npm/html/doc/misc/removing-npm.html @@ -57,5 +57,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html index 616b09333fd452..dc4c4bd9ddf69d 100644 --- a/deps/npm/html/doc/misc/semver.html +++ b/deps/npm/html/doc/misc/semver.html @@ -302,5 +302,5 @@

    Ranges

           - + diff --git a/deps/npm/lib/cache/add-remote-git.js b/deps/npm/lib/cache/add-remote-git.js index 09096f9badae95..5fbd8dbeda201f 100644 --- a/deps/npm/lib/cache/add-remote-git.js +++ b/deps/npm/lib/cache/add-remote-git.js @@ -346,6 +346,24 @@ function checkoutTreeish (from, resolvedURL, resolvedTreeish, tmpdir, cb) { } log.verbose('checkoutTreeish', from, 'checkout', stdout) + updateSubmodules(from, resolvedURL, tmpdir, cb) + } + ) +} + +function updateSubmodules (from, resolvedURL, tmpdir, cb) { + var args = ['submodule', '-q', 'update', '--init', '--recursive'] + git.whichAndExec( + args, + { cwd: tmpdir, env: gitEnv() }, + function (er, stdout, stderr) { + stdout = (stdout + '\n' + stderr).trim() + if (er) { + log.error('git ' + args.join(' ') + ':', stderr) + return cb(er) + } + log.verbose('updateSubmodules', from, 'submodule update', stdout) + // convince addLocal that the checkout is a local dependency realizePackageSpecifier(tmpdir, function (er, spec) { if (er) { diff --git a/deps/npm/lib/install/deps.js b/deps/npm/lib/install/deps.js index e7153c2966cd83..e15403545caa20 100644 --- a/deps/npm/lib/install/deps.js +++ b/deps/npm/lib/install/deps.js @@ -231,10 +231,9 @@ exports.removeDeps = function (args, tree, saveToDependencies, log, next) { var pkgName = moduleName(pkg) if (saveToDependencies) { var toRemove = tree.children.filter(moduleNameMatches(pkgName)) - replaceModule(tree, 'removed', toRemove[0]) - toRemove.forEach(function (parent) { - parent.save = saveToDependencies - }) + var pkgToRemove = toRemove[0] || createChild({package: {name: pkgName}}) + replaceModule(tree, 'removed', pkgToRemove) + pkgToRemove.save = saveToDependencies } tree.children = tree.children.filter(noModuleNameMatches(pkgName)) }) diff --git a/deps/npm/lib/install/save.js b/deps/npm/lib/install/save.js index efe0e20ad7cfd7..acbe8c5bb3579f 100644 --- a/deps/npm/lib/install/save.js +++ b/deps/npm/lib/install/save.js @@ -180,8 +180,10 @@ function computeVersionSpec (child) { pathname: relativePath }) } - } else { + } else if (requested.type === 'hosted') { return requested.spec + } else { + return requested.rawSpec } } diff --git a/deps/npm/lib/ls.js b/deps/npm/lib/ls.js index 1c9292082808cc..dbaae5190e2d99 100644 --- a/deps/npm/lib/ls.js +++ b/deps/npm/lib/ls.js @@ -120,7 +120,6 @@ function filterByEnv (data) { var devDependencies = data.devDependencies || [] Object.keys(data.dependencies).forEach(function (name) { var keys = Object.keys(devDependencies) - if (production && !dev && keys.indexOf(name) !== -1) return if (dev && !production && keys.indexOf(name) === -1) return if (!dev && keys.indexOf(name) !== -1 && data.dependencies[name].missing) return dependencies[name] = data.dependencies[name] diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js index 145b4b3665da08..1912d02be28654 100644 --- a/deps/npm/lib/npm.js +++ b/deps/npm/lib/npm.js @@ -287,7 +287,12 @@ loadCb(loadErr = er) onload = onload && npm.config.get('onload-script') if (onload) { - require(onload) + try { + require(onload) + } catch (err) { + log.warn('onload-script', 'failed to require onload script', onload) + log.warn('onload-script', err) + } onload = false } } diff --git a/deps/npm/lib/utils/deep-sort-object.js b/deps/npm/lib/utils/deep-sort-object.js index c8003c207893a5..a9971506997013 100644 --- a/deps/npm/lib/utils/deep-sort-object.js +++ b/deps/npm/lib/utils/deep-sort-object.js @@ -3,7 +3,11 @@ var sortedObject = require('sorted-object') module.exports = function deepSortObject (obj, sortBy) { if (obj == null || typeof obj !== 'object') return obj - if (obj instanceof Array) return obj.sort(sortBy) + if (obj instanceof Array) { + return obj.map(function (x) { + return deepSortObject(x, sortBy) + }) + } obj = sortedObject(obj) Object.keys(obj).forEach(function (key) { obj[key] = deepSortObject(obj[key], sortBy) diff --git a/deps/npm/lib/utils/lifecycle.js b/deps/npm/lib/utils/lifecycle.js index 7c93cdfada61d8..7376787fabf16f 100644 --- a/deps/npm/lib/utils/lifecycle.js +++ b/deps/npm/lib/utils/lifecycle.js @@ -1,6 +1,7 @@ exports = module.exports = lifecycle exports.cmd = cmd exports.makeEnv = makeEnv +exports._incorrectWorkingDirectory = _incorrectWorkingDirectory var log = require('npmlog') var spawn = require('./spawn') @@ -52,8 +53,7 @@ function lifecycle (pkg, stage, wd, unsafe, failOk, cb) { unsafe = unsafe || npm.config.get('unsafe-perm') - if ((wd.indexOf(npm.dir) !== 0 || - wd.indexOf(pkg.name) !== wd.length - pkg.name.length) && + if ((wd.indexOf(npm.dir) !== 0 || _incorrectWorkingDirectory(wd, pkg)) && !unsafe && pkg.scripts[stage]) { log.warn('lifecycle', logid(pkg, stage), 'cannot run in wd', '%s %s (wd=%s)', pkg._id, pkg.scripts[stage], wd @@ -75,6 +75,10 @@ function lifecycle (pkg, stage, wd, unsafe, failOk, cb) { }) } +function _incorrectWorkingDirectory (wd, pkg) { + return wd.lastIndexOf(pkg.name) !== wd.length - pkg.name.length +} + function lifecycle_ (pkg, stage, wd, env, unsafe, failOk, cb) { var pathArr = [] var p = wd.split('node_modules') @@ -90,6 +94,9 @@ function lifecycle_ (pkg, stage, wd, env, unsafe, failOk, cb) { // the bundled one will be used for installing things. pathArr.unshift(path.join(__dirname, '..', '..', 'bin', 'node-gyp-bin')) + // prefer current node interpreter in child scripts + pathArr.push(path.dirname(process.execPath)) + if (env[PATH]) pathArr.push(env[PATH]) env[PATH] = pathArr.join(process.platform === 'win32' ? ';' : ':') diff --git a/deps/npm/man/man1/npm-README.1 b/deps/npm/man/man1/npm-README.1 index 7cf7be7dd7bd53..e0ec2d345d7b54 100644 --- a/deps/npm/man/man1/npm-README.1 +++ b/deps/npm/man/man1/npm-README.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "January 2016" "" "" +.TH "NPM" "1" "February 2016" "" "" .SH "NAME" \fBnpm\fR \- a JavaScript package manager .P diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1 index cda8c58af373bc..6af4ec3e1bc210 100644 --- a/deps/npm/man/man1/npm-access.1 +++ b/deps/npm/man/man1/npm-access.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ACCESS" "1" "January 2016" "" "" +.TH "NPM\-ACCESS" "1" "February 2016" "" "" .SH "NAME" \fBnpm-access\fR \- Set access level on published packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1 index 5db95ed23785b2..5d8afd8f6e0565 100644 --- a/deps/npm/man/man1/npm-adduser.1 +++ b/deps/npm/man/man1/npm-adduser.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ADDUSER" "1" "January 2016" "" "" +.TH "NPM\-ADDUSER" "1" "February 2016" "" "" .SH "NAME" \fBnpm-adduser\fR \- Add a registry user account .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-bin.1 b/deps/npm/man/man1/npm-bin.1 index a2d588a021146f..b124a8076043ca 100644 --- a/deps/npm/man/man1/npm-bin.1 +++ b/deps/npm/man/man1/npm-bin.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BIN" "1" "January 2016" "" "" +.TH "NPM\-BIN" "1" "February 2016" "" "" .SH "NAME" \fBnpm-bin\fR \- Display npm bin folder .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1 index 2a0a753ed9c5f9..8fb86cea0baf43 100644 --- a/deps/npm/man/man1/npm-bugs.1 +++ b/deps/npm/man/man1/npm-bugs.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUGS" "1" "January 2016" "" "" +.TH "NPM\-BUGS" "1" "February 2016" "" "" .SH "NAME" \fBnpm-bugs\fR \- Bugs for a package in a web browser maybe .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-build.1 b/deps/npm/man/man1/npm-build.1 index 51b4bc90cd568d..bbceb800867bd9 100644 --- a/deps/npm/man/man1/npm-build.1 +++ b/deps/npm/man/man1/npm-build.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUILD" "1" "January 2016" "" "" +.TH "NPM\-BUILD" "1" "February 2016" "" "" .SH "NAME" \fBnpm-build\fR \- Build a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-bundle.1 b/deps/npm/man/man1/npm-bundle.1 index 341e5485ca5884..2771791b07ccb0 100644 --- a/deps/npm/man/man1/npm-bundle.1 +++ b/deps/npm/man/man1/npm-bundle.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUNDLE" "1" "January 2016" "" "" +.TH "NPM\-BUNDLE" "1" "February 2016" "" "" .SH "NAME" \fBnpm-bundle\fR \- REMOVED .SH DESCRIPTION diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1 index e9fa3a254f8bcb..339a9aa2260d03 100644 --- a/deps/npm/man/man1/npm-cache.1 +++ b/deps/npm/man/man1/npm-cache.1 @@ -1,4 +1,4 @@ -.TH "NPM\-CACHE" "1" "January 2016" "" "" +.TH "NPM\-CACHE" "1" "February 2016" "" "" .SH "NAME" \fBnpm-cache\fR \- Manipulates packages cache .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1 index 14ffb07c779973..0355997a2f42cc 100644 --- a/deps/npm/man/man1/npm-completion.1 +++ b/deps/npm/man/man1/npm-completion.1 @@ -1,4 +1,4 @@ -.TH "NPM\-COMPLETION" "1" "January 2016" "" "" +.TH "NPM\-COMPLETION" "1" "February 2016" "" "" .SH "NAME" \fBnpm-completion\fR \- Tab Completion for npm .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1 index 1231de24b7e710..1f4a03a23f2a98 100644 --- a/deps/npm/man/man1/npm-config.1 +++ b/deps/npm/man/man1/npm-config.1 @@ -1,4 +1,4 @@ -.TH "NPM\-CONFIG" "1" "January 2016" "" "" +.TH "NPM\-CONFIG" "1" "February 2016" "" "" .SH "NAME" \fBnpm-config\fR \- Manage the npm configuration files .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1 index fac1bff7c9f358..e7dffc291b3746 100644 --- a/deps/npm/man/man1/npm-dedupe.1 +++ b/deps/npm/man/man1/npm-dedupe.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DEDUPE" "1" "January 2016" "" "" +.TH "NPM\-DEDUPE" "1" "February 2016" "" "" .SH "NAME" \fBnpm-dedupe\fR \- Reduce duplication .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1 index 0ebfb3a1a6d8de..74fe9e28ef5a15 100644 --- a/deps/npm/man/man1/npm-deprecate.1 +++ b/deps/npm/man/man1/npm-deprecate.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DEPRECATE" "1" "January 2016" "" "" +.TH "NPM\-DEPRECATE" "1" "February 2016" "" "" .SH "NAME" \fBnpm-deprecate\fR \- Deprecate a version of a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1 index 3c17975c4ea4e3..9962d8d27aba74 100644 --- a/deps/npm/man/man1/npm-dist-tag.1 +++ b/deps/npm/man/man1/npm-dist-tag.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DIST\-TAG" "1" "January 2016" "" "" +.TH "NPM\-DIST\-TAG" "1" "February 2016" "" "" .SH "NAME" \fBnpm-dist-tag\fR \- Modify package distribution tags .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1 index cdd9db71d76605..a0a3bae9ff51ca 100644 --- a/deps/npm/man/man1/npm-docs.1 +++ b/deps/npm/man/man1/npm-docs.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DOCS" "1" "January 2016" "" "" +.TH "NPM\-DOCS" "1" "February 2016" "" "" .SH "NAME" \fBnpm-docs\fR \- Docs for a package in a web browser maybe .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1 index 96e6e0171aecc7..ea807b904b2589 100644 --- a/deps/npm/man/man1/npm-edit.1 +++ b/deps/npm/man/man1/npm-edit.1 @@ -1,4 +1,4 @@ -.TH "NPM\-EDIT" "1" "January 2016" "" "" +.TH "NPM\-EDIT" "1" "February 2016" "" "" .SH "NAME" \fBnpm-edit\fR \- Edit an installed package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1 index ec7a1507bfadaf..11ed37655252a2 100644 --- a/deps/npm/man/man1/npm-explore.1 +++ b/deps/npm/man/man1/npm-explore.1 @@ -1,4 +1,4 @@ -.TH "NPM\-EXPLORE" "1" "January 2016" "" "" +.TH "NPM\-EXPLORE" "1" "February 2016" "" "" .SH "NAME" \fBnpm-explore\fR \- Browse an installed package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1 index 91aa5722497d07..748a8527da445f 100644 --- a/deps/npm/man/man1/npm-help-search.1 +++ b/deps/npm/man/man1/npm-help-search.1 @@ -1,4 +1,4 @@ -.TH "NPM\-HELP\-SEARCH" "1" "January 2016" "" "" +.TH "NPM\-HELP\-SEARCH" "1" "February 2016" "" "" .SH "NAME" \fBnpm-help-search\fR \- Search npm help documentation .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1 index d34aa175fe71b1..aeba2744a98949 100644 --- a/deps/npm/man/man1/npm-help.1 +++ b/deps/npm/man/man1/npm-help.1 @@ -1,4 +1,4 @@ -.TH "NPM\-HELP" "1" "January 2016" "" "" +.TH "NPM\-HELP" "1" "February 2016" "" "" .SH "NAME" \fBnpm-help\fR \- Get help on npm .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1 index 8d6ac74f59b3c8..5399b750601945 100644 --- a/deps/npm/man/man1/npm-init.1 +++ b/deps/npm/man/man1/npm-init.1 @@ -1,4 +1,4 @@ -.TH "NPM\-INIT" "1" "January 2016" "" "" +.TH "NPM\-INIT" "1" "February 2016" "" "" .SH "NAME" \fBnpm-init\fR \- Interactively create a package\.json file .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1 index 6b4f8adec740a8..8b99c9af98ac92 100644 --- a/deps/npm/man/man1/npm-install-test.1 +++ b/deps/npm/man/man1/npm-install-test.1 @@ -1,4 +1,4 @@ -.TH "NPM" "" "January 2016" "" "" +.TH "NPM" "" "February 2016" "" "" .SH "NAME" \fBnpm\fR .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1 index ea85578e0a2d47..527f7e94896b1d 100644 --- a/deps/npm/man/man1/npm-install.1 +++ b/deps/npm/man/man1/npm-install.1 @@ -1,4 +1,4 @@ -.TH "NPM\-INSTALL" "1" "January 2016" "" "" +.TH "NPM\-INSTALL" "1" "February 2016" "" "" .SH "NAME" \fBnpm-install\fR \- Install a package .SH SYNOPSIS @@ -195,9 +195,11 @@ fetch the package by name if it is not valid\. ://[[:]@][:][:][/][#] .fi .RE - \fB\fP is one of \fBgit\fP, \fBgit+ssh\fP, \fBgit+http\fP, or - \fBgit+https\fP\|\. If no \fB\fP is specified, then \fBmaster\fP is - used\. + \fB\fP is one of \fBgit\fP, \fBgit+ssh\fP, \fBgit+http\fP, \fBgit+https\fP, + or \fBgit+file\fP\|\. + If no \fB\fP is specified, then \fBmaster\fP is used\. + If the repository makes use of submodules, those submodules will + be cloned as well\. The following git environment variables are recognized by npm and will be added to the environment when running git: .RS 0 diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1 index d39e9dd0e39413..921b79e498da55 100644 --- a/deps/npm/man/man1/npm-link.1 +++ b/deps/npm/man/man1/npm-link.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LINK" "1" "January 2016" "" "" +.TH "NPM\-LINK" "1" "February 2016" "" "" .SH "NAME" \fBnpm-link\fR \- Symlink a package folder .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1 index 9428fe9a525946..57a2382f0b7da0 100644 --- a/deps/npm/man/man1/npm-logout.1 +++ b/deps/npm/man/man1/npm-logout.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LOGOUT" "1" "January 2016" "" "" +.TH "NPM\-LOGOUT" "1" "February 2016" "" "" .SH "NAME" \fBnpm-logout\fR \- Log out of the registry .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index f438a237604916..978b2e640e5083 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LS" "1" "January 2016" "" "" +.TH "NPM\-LS" "1" "February 2016" "" "" .SH "NAME" \fBnpm-ls\fR \- List installed packages .SH SYNOPSIS @@ -22,7 +22,7 @@ For example, running \fBnpm ls promzard\fP in npm's source tree will show: .P .RS 2 .nf -npm@3.6.0 /path/to/npm +npm@3.7.1 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 .fi diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1 index f8e2e9dbbfe58d..e34f64b7416c1c 100644 --- a/deps/npm/man/man1/npm-outdated.1 +++ b/deps/npm/man/man1/npm-outdated.1 @@ -1,4 +1,4 @@ -.TH "NPM\-OUTDATED" "1" "January 2016" "" "" +.TH "NPM\-OUTDATED" "1" "February 2016" "" "" .SH "NAME" \fBnpm-outdated\fR \- Check for outdated packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1 index f529198042e189..59bcfdae58628e 100644 --- a/deps/npm/man/man1/npm-owner.1 +++ b/deps/npm/man/man1/npm-owner.1 @@ -1,4 +1,4 @@ -.TH "NPM\-OWNER" "1" "January 2016" "" "" +.TH "NPM\-OWNER" "1" "February 2016" "" "" .SH "NAME" \fBnpm-owner\fR \- Manage package owners .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1 index e1154052cf5083..76d2970cbb0a6e 100644 --- a/deps/npm/man/man1/npm-pack.1 +++ b/deps/npm/man/man1/npm-pack.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PACK" "1" "January 2016" "" "" +.TH "NPM\-PACK" "1" "February 2016" "" "" .SH "NAME" \fBnpm-pack\fR \- Create a tarball from a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-ping.1 b/deps/npm/man/man1/npm-ping.1 index a51570bcf9f39c..b270a02cc8429d 100644 --- a/deps/npm/man/man1/npm-ping.1 +++ b/deps/npm/man/man1/npm-ping.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PING" "1" "January 2016" "" "" +.TH "NPM\-PING" "1" "February 2016" "" "" .SH "NAME" \fBnpm-ping\fR \- Ping npm registry .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1 index ca5cfbabc6656f..63da3d5204f00e 100644 --- a/deps/npm/man/man1/npm-prefix.1 +++ b/deps/npm/man/man1/npm-prefix.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PREFIX" "1" "January 2016" "" "" +.TH "NPM\-PREFIX" "1" "February 2016" "" "" .SH "NAME" \fBnpm-prefix\fR \- Display prefix .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1 index 042fa62374c095..0bc5001a173c31 100644 --- a/deps/npm/man/man1/npm-prune.1 +++ b/deps/npm/man/man1/npm-prune.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PRUNE" "1" "January 2016" "" "" +.TH "NPM\-PRUNE" "1" "February 2016" "" "" .SH "NAME" \fBnpm-prune\fR \- Remove extraneous packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1 index 8357efb794a6ff..62948c0198c287 100644 --- a/deps/npm/man/man1/npm-publish.1 +++ b/deps/npm/man/man1/npm-publish.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PUBLISH" "1" "January 2016" "" "" +.TH "NPM\-PUBLISH" "1" "February 2016" "" "" .SH "NAME" \fBnpm-publish\fR \- Publish a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1 index 8f57aa50c547c2..19ef8c9d45b59d 100644 --- a/deps/npm/man/man1/npm-rebuild.1 +++ b/deps/npm/man/man1/npm-rebuild.1 @@ -1,4 +1,4 @@ -.TH "NPM\-REBUILD" "1" "January 2016" "" "" +.TH "NPM\-REBUILD" "1" "February 2016" "" "" .SH "NAME" \fBnpm-rebuild\fR \- Rebuild a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1 index ec8acb8cc28efd..c995b82fbf0b11 100644 --- a/deps/npm/man/man1/npm-repo.1 +++ b/deps/npm/man/man1/npm-repo.1 @@ -1,4 +1,4 @@ -.TH "NPM\-REPO" "1" "January 2016" "" "" +.TH "NPM\-REPO" "1" "February 2016" "" "" .SH "NAME" \fBnpm-repo\fR \- Open package repository page in the browser .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1 index 5cdda9eff80295..073f41c31eceae 100644 --- a/deps/npm/man/man1/npm-restart.1 +++ b/deps/npm/man/man1/npm-restart.1 @@ -1,4 +1,4 @@ -.TH "NPM\-RESTART" "1" "January 2016" "" "" +.TH "NPM\-RESTART" "1" "February 2016" "" "" .SH "NAME" \fBnpm-restart\fR \- Restart a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1 index dea35d12fd0c13..424e103ad9350b 100644 --- a/deps/npm/man/man1/npm-root.1 +++ b/deps/npm/man/man1/npm-root.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ROOT" "1" "January 2016" "" "" +.TH "NPM\-ROOT" "1" "February 2016" "" "" .SH "NAME" \fBnpm-root\fR \- Display npm root .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1 index 86ef6b6c5678f2..e106808aa31378 100644 --- a/deps/npm/man/man1/npm-run-script.1 +++ b/deps/npm/man/man1/npm-run-script.1 @@ -1,4 +1,4 @@ -.TH "NPM\-RUN\-SCRIPT" "1" "January 2016" "" "" +.TH "NPM\-RUN\-SCRIPT" "1" "February 2016" "" "" .SH "NAME" \fBnpm-run-script\fR \- Run arbitrary package scripts .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1 index abfc09989d6def..613123ae9c3160 100644 --- a/deps/npm/man/man1/npm-search.1 +++ b/deps/npm/man/man1/npm-search.1 @@ -1,4 +1,4 @@ -.TH "NPM\-SEARCH" "1" "January 2016" "" "" +.TH "NPM\-SEARCH" "1" "February 2016" "" "" .SH "NAME" \fBnpm-search\fR \- Search for packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1 index a18b510f925870..e53acbd10bf6b9 100644 --- a/deps/npm/man/man1/npm-shrinkwrap.1 +++ b/deps/npm/man/man1/npm-shrinkwrap.1 @@ -1,4 +1,4 @@ -.TH "NPM\-SHRINKWRAP" "1" "January 2016" "" "" +.TH "NPM\-SHRINKWRAP" "1" "February 2016" "" "" .SH "NAME" \fBnpm-shrinkwrap\fR \- Lock down dependency versions .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1 index 08918444d03cda..ccfcaf6ca4e5bf 100644 --- a/deps/npm/man/man1/npm-star.1 +++ b/deps/npm/man/man1/npm-star.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STAR" "1" "January 2016" "" "" +.TH "NPM\-STAR" "1" "February 2016" "" "" .SH "NAME" \fBnpm-star\fR \- Mark your favorite packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1 index c256004ce3d82f..151dd00ef3be5a 100644 --- a/deps/npm/man/man1/npm-stars.1 +++ b/deps/npm/man/man1/npm-stars.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STARS" "1" "January 2016" "" "" +.TH "NPM\-STARS" "1" "February 2016" "" "" .SH "NAME" \fBnpm-stars\fR \- View packages marked as favorites .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1 index 344d8a4ce5395d..a1a6ae0e486218 100644 --- a/deps/npm/man/man1/npm-start.1 +++ b/deps/npm/man/man1/npm-start.1 @@ -1,4 +1,4 @@ -.TH "NPM\-START" "1" "January 2016" "" "" +.TH "NPM\-START" "1" "February 2016" "" "" .SH "NAME" \fBnpm-start\fR \- Start a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1 index 5c9c5376527d45..7fbb6e458a8cc8 100644 --- a/deps/npm/man/man1/npm-stop.1 +++ b/deps/npm/man/man1/npm-stop.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STOP" "1" "January 2016" "" "" +.TH "NPM\-STOP" "1" "February 2016" "" "" .SH "NAME" \fBnpm-stop\fR \- Stop a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-tag.1 b/deps/npm/man/man1/npm-tag.1 index 952500e5b6de9a..fe83a24fadfcb4 100644 --- a/deps/npm/man/man1/npm-tag.1 +++ b/deps/npm/man/man1/npm-tag.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TAG" "1" "January 2016" "" "" +.TH "NPM\-TAG" "1" "February 2016" "" "" .SH "NAME" \fBnpm-tag\fR \- Tag a published version .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-team.1 b/deps/npm/man/man1/npm-team.1 index 541ff90348b854..e3e818cc30cb4b 100644 --- a/deps/npm/man/man1/npm-team.1 +++ b/deps/npm/man/man1/npm-team.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TEAM" "1" "January 2016" "" "" +.TH "NPM\-TEAM" "1" "February 2016" "" "" .SH "NAME" \fBnpm-team\fR \- Manage organization teams and team memberships .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1 index ee076c79b969f7..1b73587db06010 100644 --- a/deps/npm/man/man1/npm-test.1 +++ b/deps/npm/man/man1/npm-test.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TEST" "1" "January 2016" "" "" +.TH "NPM\-TEST" "1" "February 2016" "" "" .SH "NAME" \fBnpm-test\fR \- Test a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1 index 88ef9ead20a25c..a60e59d446ca01 100644 --- a/deps/npm/man/man1/npm-uninstall.1 +++ b/deps/npm/man/man1/npm-uninstall.1 @@ -1,4 +1,4 @@ -.TH "NPM\-UNINSTALL" "1" "January 2016" "" "" +.TH "NPM\-UNINSTALL" "1" "February 2016" "" "" .SH "NAME" \fBnpm-uninstall\fR \- Remove a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1 index cf24af9fb2d1d1..00e54abbd45b25 100644 --- a/deps/npm/man/man1/npm-unpublish.1 +++ b/deps/npm/man/man1/npm-unpublish.1 @@ -1,4 +1,4 @@ -.TH "NPM\-UNPUBLISH" "1" "January 2016" "" "" +.TH "NPM\-UNPUBLISH" "1" "February 2016" "" "" .SH "NAME" \fBnpm-unpublish\fR \- Remove a package from the registry .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1 index 0aaa0487b9cd69..b604ba6fad61c9 100644 --- a/deps/npm/man/man1/npm-update.1 +++ b/deps/npm/man/man1/npm-update.1 @@ -1,4 +1,4 @@ -.TH "NPM\-UPDATE" "1" "January 2016" "" "" +.TH "NPM\-UPDATE" "1" "February 2016" "" "" .SH "NAME" \fBnpm-update\fR \- Update a package .SH SYNOPSIS @@ -49,16 +49,17 @@ on dependencies, \fBdep1\fP (\fBdep2\fP, \.\. etc\.)\. The published versions o .RS 2 .nf { - dist\-tags: { latest: "1\.2\.2" }, - versions: { "1\.2\.2", - "1\.2\.1", - "1\.2\.0", - "1\.1\.2", - "1\.1\.1", - "1\.0\.0", - "0\.4\.1", - "0\.4\.0", - "0\.2\.0" + "dist\-tags": { "latest": "1\.2\.2" }, + "versions": { + "1\.2\.2", + "1\.2\.1", + "1\.2\.0", + "1\.1\.2", + "1\.1\.1", + "1\.0\.0", + "0\.4\.1", + "0\.4\.0", + "0\.2\.0" } } .fi @@ -69,8 +70,8 @@ If \fBapp\fP\|'s \fBpackage\.json\fP contains: .P .RS 2 .nf -dependencies: { - dep1: "^1\.1\.1" +"dependencies": { + "dep1": "^1\.1\.1" } .fi .RE @@ -83,8 +84,8 @@ However, if \fBapp\fP\|'s \fBpackage\.json\fP contains: .P .RS 2 .nf -dependencies: { - dep1: "~1\.1\.1" +"dependencies": { + "dep1": "~1\.1\.1" } .fi .RE @@ -99,8 +100,8 @@ Suppose \fBapp\fP has a caret dependency on a version below \fB1\.0\.0\fP, for e .P .RS 2 .nf -dependencies: { - dep1: "^0\.2\.0" +"dependencies": { + "dep1": "^0\.2\.0" } .fi .RE @@ -112,8 +113,8 @@ If the dependence were on \fB^0\.4\.0\fP: .P .RS 2 .nf -dependencies: { - dep1: "^0\.4\.0" +"dependencies": { + "dep1": "^0\.4\.0" } .fi .RE @@ -129,8 +130,8 @@ the minimum required dependency in \fBpackage\.json\fP, you can use .P .RS 2 .nf -dependencies: { - dep1: "^1\.1\.1" +"dependencies": { + "dep1": "^1\.1\.1" } .fi .RE @@ -140,8 +141,8 @@ and \fBpackage\.json\fP will be modified: .P .RS 2 .nf -dependencies: { - dep1: "^1\.2\.2" +"dependencies": { + "dep1": "^1\.2\.2" } .fi .RE @@ -150,7 +151,7 @@ Note that \fBnpm\fP will only write an updated version to \fBpackage\.json\fP if it installs a new package\. .SS Updating Globally\-Installed Packages .P -\fBnpm update \-g\fP will apply the \fBupdate\fP action to each globally\- installed +\fBnpm update \-g\fP will apply the \fBupdate\fP action to each globally installed package that is \fBoutdated\fP \-\- that is, has a version that is different from \fBlatest\fP\|\. .P diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1 index 9d17a93871a380..7a4de4f2bc6343 100644 --- a/deps/npm/man/man1/npm-version.1 +++ b/deps/npm/man/man1/npm-version.1 @@ -1,4 +1,4 @@ -.TH "NPM\-VERSION" "1" "January 2016" "" "" +.TH "NPM\-VERSION" "1" "February 2016" "" "" .SH "NAME" \fBnpm-version\fR \- Bump a package version .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1 index 081b773c509f59..e3fc9a937fb76c 100644 --- a/deps/npm/man/man1/npm-view.1 +++ b/deps/npm/man/man1/npm-view.1 @@ -1,4 +1,4 @@ -.TH "NPM\-VIEW" "1" "January 2016" "" "" +.TH "NPM\-VIEW" "1" "February 2016" "" "" .SH "NAME" \fBnpm-view\fR \- View registry info .SH SYNOPSIS @@ -105,6 +105,15 @@ was required by each matching version of yui3: npm view yui3@'>0\.5\.4' dependencies\.jsdom .fi .RE +.P +To show the \fBconnect\fP package version history, you can do +this: +.P +.RS 2 +.nf +npm view connect versions +.fi +.RE .SH OUTPUT .P If only a single string field for a single version is output, then it diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1 index 8f013c985d4f23..e19a75106d83fe 100644 --- a/deps/npm/man/man1/npm-whoami.1 +++ b/deps/npm/man/man1/npm-whoami.1 @@ -1,4 +1,4 @@ -.TH "NPM\-WHOAMI" "1" "January 2016" "" "" +.TH "NPM\-WHOAMI" "1" "February 2016" "" "" .SH "NAME" \fBnpm-whoami\fR \- Display npm username .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index 59380364c19227..129b0eb9b7168b 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "January 2016" "" "" +.TH "NPM" "1" "February 2016" "" "" .SH "NAME" \fBnpm\fR \- javascript package manager .SH SYNOPSIS @@ -10,7 +10,7 @@ npm [args] .RE .SH VERSION .P -3.6.0 +3.7.1 .SH DESCRIPTION .P npm is the package manager for the Node JavaScript platform\. It puts diff --git a/deps/npm/man/man5/npm-folders.5 b/deps/npm/man/man5/npm-folders.5 index a95cd885ff2403..dc217dd4c603cc 100644 --- a/deps/npm/man/man5/npm-folders.5 +++ b/deps/npm/man/man5/npm-folders.5 @@ -1,4 +1,4 @@ -.TH "NPM\-FOLDERS" "5" "January 2016" "" "" +.TH "NPM\-FOLDERS" "5" "February 2016" "" "" .SH "NAME" \fBnpm-folders\fR \- Folder Structures Used by npm .SH DESCRIPTION diff --git a/deps/npm/man/man5/npm-global.5 b/deps/npm/man/man5/npm-global.5 index a95cd885ff2403..dc217dd4c603cc 100644 --- a/deps/npm/man/man5/npm-global.5 +++ b/deps/npm/man/man5/npm-global.5 @@ -1,4 +1,4 @@ -.TH "NPM\-FOLDERS" "5" "January 2016" "" "" +.TH "NPM\-FOLDERS" "5" "February 2016" "" "" .SH "NAME" \fBnpm-folders\fR \- Folder Structures Used by npm .SH DESCRIPTION diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5 index b9d6fabf9b4cb4..70fc9ccabbd28b 100644 --- a/deps/npm/man/man5/npm-json.5 +++ b/deps/npm/man/man5/npm-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE\.JSON" "5" "January 2016" "" "" +.TH "PACKAGE\.JSON" "5" "February 2016" "" "" .SH "NAME" \fBpackage.json\fR \- Specifics of npm's package\.json handling .SH DESCRIPTION @@ -130,7 +130,7 @@ expression syntax version 2\.0 string \fIhttps://npmjs\.com/package/spdx\fR, lik .RE .P If you are using a license that hasn't been assigned an SPDX identifier, or if -you are using a custom license, use the following valid SPDX expression: +you are using a custom license, use a string value like this one: .P .RS 2 .nf diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5 index 396504f96835f4..4dbd70e38e8cc3 100644 --- a/deps/npm/man/man5/npmrc.5 +++ b/deps/npm/man/man5/npmrc.5 @@ -1,4 +1,4 @@ -.TH "NPMRC" "5" "January 2016" "" "" +.TH "NPMRC" "5" "February 2016" "" "" .SH "NAME" \fBnpmrc\fR \- The npm config files .SH DESCRIPTION diff --git a/deps/npm/man/man5/package.json.5 b/deps/npm/man/man5/package.json.5 index b9d6fabf9b4cb4..70fc9ccabbd28b 100644 --- a/deps/npm/man/man5/package.json.5 +++ b/deps/npm/man/man5/package.json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE\.JSON" "5" "January 2016" "" "" +.TH "PACKAGE\.JSON" "5" "February 2016" "" "" .SH "NAME" \fBpackage.json\fR \- Specifics of npm's package\.json handling .SH DESCRIPTION @@ -130,7 +130,7 @@ expression syntax version 2\.0 string \fIhttps://npmjs\.com/package/spdx\fR, lik .RE .P If you are using a license that hasn't been assigned an SPDX identifier, or if -you are using a custom license, use the following valid SPDX expression: +you are using a custom license, use a string value like this one: .P .RS 2 .nf diff --git a/deps/npm/man/man7/npm-coding-style.7 b/deps/npm/man/man7/npm-coding-style.7 index c6e46d25df3858..70f8a129016123 100644 --- a/deps/npm/man/man7/npm-coding-style.7 +++ b/deps/npm/man/man7/npm-coding-style.7 @@ -1,4 +1,4 @@ -.TH "NPM\-CODING\-STYLE" "7" "January 2016" "" "" +.TH "NPM\-CODING\-STYLE" "7" "February 2016" "" "" .SH "NAME" \fBnpm-coding-style\fR \- npm's "funny" coding style .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-config.7 b/deps/npm/man/man7/npm-config.7 index 244acc7206c680..8f76c1b58cfccb 100644 --- a/deps/npm/man/man7/npm-config.7 +++ b/deps/npm/man/man7/npm-config.7 @@ -1,4 +1,4 @@ -.TH "NPM\-CONFIG" "7" "January 2016" "" "" +.TH "NPM\-CONFIG" "7" "February 2016" "" "" .SH "NAME" \fBnpm-config\fR \- More than you probably want to know about npm configuration .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-developers.7 b/deps/npm/man/man7/npm-developers.7 index 77fbb0360d8669..d85b86684adf0c 100644 --- a/deps/npm/man/man7/npm-developers.7 +++ b/deps/npm/man/man7/npm-developers.7 @@ -1,4 +1,4 @@ -.TH "NPM\-DEVELOPERS" "7" "January 2016" "" "" +.TH "NPM\-DEVELOPERS" "7" "February 2016" "" "" .SH "NAME" \fBnpm-developers\fR \- Developer Guide .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-disputes.7 b/deps/npm/man/man7/npm-disputes.7 index 888159cb8a7b38..15dd5ddbd85dca 100644 --- a/deps/npm/man/man7/npm-disputes.7 +++ b/deps/npm/man/man7/npm-disputes.7 @@ -1,4 +1,4 @@ -.TH "NPM\-DISPUTES" "7" "January 2016" "" "" +.TH "NPM\-DISPUTES" "7" "February 2016" "" "" .SH "NAME" \fBnpm-disputes\fR \- Handling Module Name Disputes .SH SYNOPSIS diff --git a/deps/npm/man/man7/npm-index.7 b/deps/npm/man/man7/npm-index.7 index 8479b3c6c22dc3..c40b926c9b59a2 100644 --- a/deps/npm/man/man7/npm-index.7 +++ b/deps/npm/man/man7/npm-index.7 @@ -1,4 +1,4 @@ -.TH "NPM\-INDEX" "7" "January 2016" "" "" +.TH "NPM\-INDEX" "7" "February 2016" "" "" .SH "NAME" \fBnpm-index\fR \- Index of all npm documentation .SS npm help README diff --git a/deps/npm/man/man7/npm-orgs.7 b/deps/npm/man/man7/npm-orgs.7 index 7bf5ba171e97fa..929c2c7d603f6a 100644 --- a/deps/npm/man/man7/npm-orgs.7 +++ b/deps/npm/man/man7/npm-orgs.7 @@ -1,4 +1,4 @@ -.TH "NPM\-ORGS" "7" "January 2016" "" "" +.TH "NPM\-ORGS" "7" "February 2016" "" "" .SH "NAME" \fBnpm-orgs\fR \- Working with Teams & Orgs .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-registry.7 b/deps/npm/man/man7/npm-registry.7 index b255de73f8549b..1d4e1041031213 100644 --- a/deps/npm/man/man7/npm-registry.7 +++ b/deps/npm/man/man7/npm-registry.7 @@ -1,4 +1,4 @@ -.TH "NPM\-REGISTRY" "7" "January 2016" "" "" +.TH "NPM\-REGISTRY" "7" "February 2016" "" "" .SH "NAME" \fBnpm-registry\fR \- The JavaScript Package Registry .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-scope.7 b/deps/npm/man/man7/npm-scope.7 index 131c18c3e6d9e5..f8c39625927a56 100644 --- a/deps/npm/man/man7/npm-scope.7 +++ b/deps/npm/man/man7/npm-scope.7 @@ -1,4 +1,4 @@ -.TH "NPM\-SCOPE" "7" "January 2016" "" "" +.TH "NPM\-SCOPE" "7" "February 2016" "" "" .SH "NAME" \fBnpm-scope\fR \- Scoped packages .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-scripts.7 b/deps/npm/man/man7/npm-scripts.7 index 09a0651ddef7f8..1581cf804256cd 100644 --- a/deps/npm/man/man7/npm-scripts.7 +++ b/deps/npm/man/man7/npm-scripts.7 @@ -1,4 +1,4 @@ -.TH "NPM\-SCRIPTS" "7" "January 2016" "" "" +.TH "NPM\-SCRIPTS" "7" "February 2016" "" "" .SH "NAME" \fBnpm-scripts\fR \- How npm handles the "scripts" field .SH DESCRIPTION diff --git a/deps/npm/man/man7/removing-npm.7 b/deps/npm/man/man7/removing-npm.7 index 4bf93d54ba08fa..0df2bf141ac8b8 100644 --- a/deps/npm/man/man7/removing-npm.7 +++ b/deps/npm/man/man7/removing-npm.7 @@ -1,4 +1,4 @@ -.TH "NPM\-REMOVAL" "1" "January 2016" "" "" +.TH "NPM\-REMOVAL" "1" "February 2016" "" "" .SH "NAME" \fBnpm-removal\fR \- Cleaning the Slate .SH SYNOPSIS diff --git a/deps/npm/man/man7/semver.7 b/deps/npm/man/man7/semver.7 index 600c968297ff7c..1f877f0b7b7fb9 100644 --- a/deps/npm/man/man7/semver.7 +++ b/deps/npm/man/man7/semver.7 @@ -1,4 +1,4 @@ -.TH "SEMVER" "7" "January 2016" "" "" +.TH "SEMVER" "7" "February 2016" "" "" .SH "NAME" \fBsemver\fR \- The semantic versioner for npm .SH Usage diff --git a/deps/npm/node_modules/lodash.clonedeep/README.md b/deps/npm/node_modules/lodash.clonedeep/README.md index 65176db360cca7..63dbb3fbb15438 100644 --- a/deps/npm/node_modules/lodash.clonedeep/README.md +++ b/deps/npm/node_modules/lodash.clonedeep/README.md @@ -1,4 +1,4 @@ -# lodash.clonedeep v4.0.1 +# lodash.clonedeep v4.0.2 The [lodash](https://lodash.com/) method `_.cloneDeep` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var cloneDeep = require('lodash.clonedeep'); ``` -See the [documentation](https://lodash.com/docs#cloneDeep) or [package source](https://github.com/lodash/lodash/blob/4.0.1-npm-packages/lodash.clonedeep) for more details. +See the [documentation](https://lodash.com/docs#cloneDeep) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.clonedeep) for more details. diff --git a/deps/npm/node_modules/lodash.clonedeep/index.js b/deps/npm/node_modules/lodash.clonedeep/index.js index c9082a6a5f2406..c50c62dcdc9951 100644 --- a/deps/npm/node_modules/lodash.clonedeep/index.js +++ b/deps/npm/node_modules/lodash.clonedeep/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.0.0 (Custom Build) + * lodash 4.0.2 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -98,14 +98,14 @@ function addSetEntry(set, value) { * @param {Array} array The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. - * @param {boolean} [initFromArray] Specify using the first element of `array` as the initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as the initial value. * @returns {*} Returns the accumulated value. */ -function arrayReduce(array, iteratee, accumulator, initFromArray) { +function arrayReduce(array, iteratee, accumulator, initAccum) { var index = -1, length = array.length; - if (initFromArray && length) { + if (initAccum && length) { accumulator = array[++index]; } while (++index < length) { @@ -189,7 +189,7 @@ var reIsNative = RegExp('^' + ); /** Built-in value references. */ -var _Symbol = global.Symbol, +var Symbol = global.Symbol, Uint8Array = global.Uint8Array, getOwnPropertySymbols = Object.getOwnPropertySymbols; @@ -202,8 +202,8 @@ var mapCtorString = Map ? funcToString.call(Map) : '', setCtorString = Set ? funcToString.call(Set) : ''; /** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol ? _Symbol.prototype : undefined, - symbolValueOf = _Symbol ? symbolProto.valueOf : undefined; +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = Symbol ? symbolProto.valueOf : undefined; /** * Assigns `value` to `key` of `object` if the existing value is not equivalent @@ -395,7 +395,7 @@ function cloneSet(set) { * @returns {Object} Returns the cloned symbol object. */ function cloneSymbol(symbol) { - return _Symbol ? Object(symbolValueOf.call(symbol)) : {}; + return Symbol ? Object(symbolValueOf.call(symbol)) : {}; } /** diff --git a/deps/npm/node_modules/lodash.clonedeep/package.json b/deps/npm/node_modules/lodash.clonedeep/package.json index 4591bbb548b903..e2bce3a040528b 100644 --- a/deps/npm/node_modules/lodash.clonedeep/package.json +++ b/deps/npm/node_modules/lodash.clonedeep/package.json @@ -1,12 +1,12 @@ { "_args": [ [ - "lodash.clonedeep@latest", + "lodash.clonedeep@~4.0.1", "/Users/rebecca/code/npm" ] ], - "_from": "lodash.clonedeep@latest", - "_id": "lodash.clonedeep@4.0.1", + "_from": "lodash.clonedeep@>=4.0.1 <4.1.0", + "_id": "lodash.clonedeep@4.0.2", "_inCache": true, "_installable": true, "_location": "/lodash.clonedeep", @@ -19,19 +19,19 @@ "_phantomChildren": {}, "_requested": { "name": "lodash.clonedeep", - "raw": "lodash.clonedeep@latest", - "rawSpec": "latest", + "raw": "lodash.clonedeep@~4.0.1", + "rawSpec": "~4.0.1", "scope": null, - "spec": "latest", - "type": "tag" + "spec": ">=4.0.1 <4.1.0", + "type": "range" }, "_requiredBy": [ "/" ], - "_resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.0.1.tgz", - "_shasum": "fc9873223ecc004c7e8b504a06f9a36e8a29637a", + "_resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.0.2.tgz", + "_shasum": "fd420b84287f962e9e0e8666eb6a614b9f9368e7", "_shrinkwrap": null, - "_spec": "lodash.clonedeep@latest", + "_spec": "lodash.clonedeep@~4.0.1", "_where": "/Users/rebecca/code/npm", "author": { "email": "john.david.dalton@gmail.com", @@ -68,8 +68,8 @@ "devDependencies": {}, "directories": {}, "dist": { - "shasum": "fc9873223ecc004c7e8b504a06f9a36e8a29637a", - "tarball": "http://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.0.1.tgz" + "shasum": "fd420b84287f962e9e0e8666eb6a614b9f9368e7", + "tarball": "http://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.0.2.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -105,5 +105,5 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, - "version": "4.0.1" + "version": "4.0.2" } diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/.npmignore b/deps/npm/node_modules/npm-registry-client/node_modules/retry/.npmignore new file mode 100644 index 00000000000000..e7726a071b7f39 --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/node_modules/retry/.npmignore @@ -0,0 +1,2 @@ +/node_modules/* +npm-debug.log diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/License b/deps/npm/node_modules/npm-registry-client/node_modules/retry/License new file mode 100644 index 00000000000000..0b58de379fb308 --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/node_modules/retry/License @@ -0,0 +1,21 @@ +Copyright (c) 2011: +Tim Koschützki (tim@debuggable.com) +Felix Geisendörfer (felix@debuggable.com) + + 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/npm-registry-client/node_modules/retry/Makefile b/deps/npm/node_modules/npm-registry-client/node_modules/retry/Makefile new file mode 100644 index 00000000000000..98e7167bbe359f --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/node_modules/retry/Makefile @@ -0,0 +1,21 @@ +SHELL := /bin/bash + +test: + @node test/runner.js + +release-major: test + npm version major -m "Release %s" + git push + npm publish + +release-minor: test + npm version minor -m "Release %s" + git push + npm publish + +release-patch: test + npm version patch -m "Release %s" + git push + npm publish + +.PHONY: test diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/README.md b/deps/npm/node_modules/npm-registry-client/node_modules/retry/README.md new file mode 100644 index 00000000000000..09d9c8a81bf121 --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/node_modules/retry/README.md @@ -0,0 +1,195 @@ +# retry + +Abstraction for exponential and custom retry strategies for failed operations. + +## Installation + + npm install retry + +## Current Status + +This module has been tested and is ready to be used. + +## Tutorial + +The example below will retry a potentially failing `dns.resolve` operation +`10` times using an exponential backoff strategy. With the default settings, this +means the last attempt is made after `17 minutes and 3 seconds`. + +``` javascript +var dns = require('dns'); +var retry = require('retry'); + +function faultTolerantResolve(address, cb) { + var operation = retry.operation(); + + operation.attempt(function(currentAttempt) { + dns.resolve(address, function(err, addresses) { + if (operation.retry(err)) { + return; + } + + cb(err ? operation.mainError() : null, addresses); + }); + }); +} + +faultTolerantResolve('nodejs.org', function(err, addresses) { + console.log(err, addresses); +}); +``` + +Of course you can also configure the factors that go into the exponential +backoff. See the API documentation below for all available settings. +currentAttempt is an int representing the number of attempts so far. + +``` javascript +var operation = retry.operation({ + retries: 5, + factor: 3, + minTimeout: 1 * 1000, + maxTimeout: 60 * 1000, + randomize: true, +}); +``` + +## API + +### retry.operation([options]) + +Creates a new `RetryOperation` object. See the `retry.timeouts()` function +below for available `options`. + +### retry.timeouts([options]) + +Returns an array of timeouts. All time `options` and return values are in +milliseconds. If `options` is an array, a copy of that array is returned. + +`options` is a JS object that can contain any of the following keys: + +* `retries`: The maximum amount of times to retry the operation. Default is `10`. +* `factor`: The exponential factor to use. Default is `2`. +* `minTimeout`: The number of milliseconds before starting the first retry. Default is `1000`. +* `maxTimeout`: The maximum number of milliseconds between two retries. Default is `Infinity`. +* `randomize`: Randomizes the timeouts by multiplying with a factor between `1` to `2`. Default is `false`. + +The formula used to calculate the individual timeouts is: + +``` +var Math.min(random * minTimeout * Math.pow(factor, attempt), maxTimeout); +``` + +Have a look at [this article][article] for a better explanation of approach. + +If you want to tune your `factor` / `times` settings to attempt the last retry +after a certain amount of time, you can use wolfram alpha. For example in order +to tune for `10` attempts in `5 minutes`, you can use this equation: + +![screenshot](https://github.com/tim-kos/node-retry/raw/master/equation.gif) + +Explaining the various values from left to right: + +* `k = 0 ... 9`: The `retries` value (10) +* `1000`: The `minTimeout` value in ms (1000) +* `x^k`: No need to change this, `x` will be your resulting factor +* `5 * 60 * 1000`: The desired total amount of time for retrying in ms (5 minutes) + +To make this a little easier for you, use wolfram alpha to do the calculations: + + + +[article]: http://dthain.blogspot.com/2009/02/exponential-backoff-in-distributed.html + +### retry.createTimeout(attempt, opts) + +Returns a new `timeout` (integer in milliseconds) based on the given parameters. + +`attempt` is an integer representing for which retry the timeout should be calculated. If your retry operation was executed 4 times you had one attempt and 3 retries. If you then want to calculate a new timeout, you should set `attempt` to 4 (attempts are zero-indexed). + +`opts` can include `factor`, `minTimeout`, `randomize` (boolean) and `maxTimeout`. They are documented above. + +`retry.createTimeout()` is used internally by `retry.timeouts()` and is public for you to be able to create your own timeouts for reinserting an item, see [issue #13](https://github.com/tim-kos/node-retry/issues/13). + +### retry.wrap(obj, [options], [methodNames]) + +Wrap all functions of the `obj` with retry. Optionally you can pass operation options and +an array of method names which need to be wrapped. + +``` +retry.wrap(obj) + +retry.wrap(obj, ['method1', 'method2']); + +retry.wrap(obj, {retries: 3}); + +retry.wrap(obj, {retries: 3}, ['method1', 'method2']); +``` +The `options` object can take any options that the usual call to `retry.operation` can take. + +### new RetryOperation(timeouts) + +Creates a new `RetryOperation` where `timeouts` is an array where each value is +a timeout given in milliseconds. + +#### retryOperation.errors() + +Returns an array of all errors that have been passed to +`retryOperation.retry()` so far. + +#### retryOperation.mainError() + +A reference to the error object that occured most frequently. Errors are +compared using the `error.message` property. + +If multiple error messages occured the same amount of time, the last error +object with that message is returned. + +If no errors occured so far, the value is `null`. + +#### retryOperation.attempt(fn, timeoutOps) + +Defines the function `fn` that is to be retried and executes it for the first +time right away. The `fn` function can receive an optional `currentAttempt` callback that represents the number of attempts to execute `fn` so far. + +Optionally defines `timeoutOps` which is an object having a property `timeout` in miliseconds and a property `cb` callback function. +Whenever your retry operation takes longer than `timeout` to execute, the timeout callback function `cb` is called. + + +#### retryOperation.try(fn) + +This is an alias for `retryOperation.attempt(fn)`. This is deprecated. + +#### retryOperation.start(fn) + +This is an alias for `retryOperation.attempt(fn)`. This is deprecated. + +#### retryOperation.retry(error) + +Returns `false` when no `error` value is given, or the maximum amount of retries +has been reached. + +Otherwise it returns `true`, and retries the operation after the timeout for +the current attempt number. + +#### retryOperation.attempts() + +Returns an int representing the number of attempts it took to call `fn` before it was successful. + +## License + +retry is licensed under the MIT license. + + +#Changelog + +0.7.0 Some bugfixes and made retry.createTimeout() public. Fixed issues [#10](https://github.com/tim-kos/node-retry/issues/10), [#12](https://github.com/tim-kos/node-retry/issues/12), and [#13](https://github.com/tim-kos/node-retry/issues/13). + +0.6.0 Introduced optional timeOps parameter for the attempt() function which is an object having a property timeout in miliseconds and a property cb callback function. Whenever your retry operation takes longer than timeout to execute, the timeout callback function cb is called. + +0.5.0 Some minor refactorings. + +0.4.0 Changed retryOperation.try() to retryOperation.attempt(). Deprecated the aliases start() and try() for it. + +0.3.0 Added retryOperation.start() which is an alias for retryOperation.try(). + +0.2.0 Added attempts() function and parameter to retryOperation.try() representing the number of attempts it took to call fn(). diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/equation.gif b/deps/npm/node_modules/npm-registry-client/node_modules/retry/equation.gif new file mode 100644 index 0000000000000000000000000000000000000000..97107237ba19f51997d8d76135bc7d1486d856f0 GIT binary patch literal 1209 zcmV;q1V;NuNk%w1VXpu&0M!5h000001ONyK2nY-a5D*X$6c88~7#JKFARr(hBp@j$ zDJd)|F)%SPG%-0iIXOHzK|n!4L_tbON=i&hQczM-RZ?16T3TINVqs!pWnyY+YHDq2 zb8&NXb#r@pdwYF*gMovCg@cQUi;Inml#!H_m6V*BoSdDUq@kpwrKGH?tgNoAw6e6c zwzR#vy}iD@#lpqK#>LIb&CSlu)za0~*45tH-rnBc=Hlk&=H~9|?(XjH_VV`j_V)k! z|NsC0EC2ui0IvWs000L6z@KnPEENVOfMTEH9c0Z7p9z3<`87kr4n!IH|Ew$buF^Tr6-3^@midQKv4UFk?fCD@~8E z@HgbfvLPrU7IV4gfp|8%C^H$l;qq zLJ;`y;|7BS2YlpEz->xcBQ#7@yHNtNkOmwQ1ek!X@sGzuLXR#jx2fyLw;309jQGe6 zL`?+$umPZ&50}J^BQGxGIN%{G2=u5hqw|pm*t2Ul0ssMk0vb%GI^lz~c)})l{~Qc?h2kCMJmBf=4KTfq+A}mV<6G&6wD3KiFu51s1j8f&fS0 zFaiqI41q&$@ZBIIl0*neBoe|cd1H+<3Zdf>DJ(#i62j@_f)Fj-_2my?IyGjQMd%>G z07WXH-J3lkxMd6n7?DE>JIL@P5d*{^#0>(>vA~&p4RL3ldlu2^8P z!OlGQ%z<|`+iWomtGr?~EJ7!(^wLZ>?ex=7N4-QZ)=BNMGD+xg!3P&;Y_%-ZByj;I zEWG$NFy8zC&JhLd@WT!ToDGaV{P^?c4^0Iv_b4i{ghbnK$GtZyTzMtL-DCey_TZ>w XwprD$S>S;MUNdg_<(OxVL=XTw-hl|W literal 0 HcmV?d00001 diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/example/dns.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/example/dns.js new file mode 100644 index 00000000000000..d6351e9d05bb33 --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/node_modules/retry/example/dns.js @@ -0,0 +1,31 @@ +var dns = require('dns'); +var retry = require('../lib/retry'); + +function faultTolerantResolve(address, cb) { + var opts = { + retries: 2, + factor: 2, + minTimeout: 1 * 1000, + maxTimeout: 2 * 1000, + randomize: true + }; + var operation = retry.operation(opts); + + operation.attempt(function(currentAttempt) { + dns.resolve(address, function(err, addresses) { + if (operation.retry(err)) { + return; + } + + cb(operation.mainError(), operation.errors(), addresses); + }); + }); +} + +faultTolerantResolve('nodejs.org', function(err, errors, addresses) { + console.warn('err:'); + console.log(err); + + console.warn('addresses:'); + console.log(addresses); +}); diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/index.js new file mode 100644 index 00000000000000..ee62f3a112c28b --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/node_modules/retry/index.js @@ -0,0 +1 @@ +module.exports = require('./lib/retry'); \ No newline at end of file diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/lib/retry.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/lib/retry.js new file mode 100644 index 00000000000000..94685652c426fd --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/node_modules/retry/lib/retry.js @@ -0,0 +1,94 @@ +var RetryOperation = require('./retry_operation'); + +exports.operation = function(options) { + var retryForever = false; + if (options && options.forever === true) retryForever = true; + var timeouts = exports.timeouts(options); + return new RetryOperation(timeouts, retryForever); +}; + +exports.timeouts = function(options) { + if (options instanceof Array) { + return [].concat(options); + } + + var opts = { + retries: 10, + factor: 2, + minTimeout: 1 * 1000, + maxTimeout: Infinity, + randomize: false + }; + for (var key in options) { + opts[key] = options[key]; + } + + if (opts.minTimeout > opts.maxTimeout) { + throw new Error('minTimeout is greater than maxTimeout'); + } + + var timeouts = []; + for (var i = 0; i < opts.retries; i++) { + timeouts.push(this.createTimeout(i, opts)); + } + + // sort the array numerically ascending + timeouts.sort(function(a,b) { + return a - b; + }); + + return timeouts; +}; + +exports.createTimeout = function(attempt, opts) { + var random = (opts.randomize) + ? (Math.random() + 1) + : 1; + + var timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt)); + timeout = Math.min(timeout, opts.maxTimeout); + + return timeout; +}; + +exports.wrap = function(obj, options, methods) { + if (options instanceof Array) { + methods = options; + options = null; + } + + if (!methods) { + methods = []; + for (var key in obj) { + if (typeof obj[key] === 'function') { + methods.push(key); + } + } + } + + for (var i = 0; i < methods.length; i++) { + var method = methods[i]; + var original = obj[method]; + + obj[method] = function retryWrapper() { + var op = exports.operation(options); + var args = Array.prototype.slice.call(arguments); + var callback = args.pop(); + + args.push(function(err) { + if (op.retry(err)) { + return; + } + if (err) { + arguments[0] = op.mainError(); + } + callback.apply(this, arguments); + }); + + op.attempt(function() { + original.apply(obj, args); + }); + }; + obj[method].options = options; + } +}; diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/lib/retry_operation.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/lib/retry_operation.js new file mode 100644 index 00000000000000..52b895544e6a58 --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/node_modules/retry/lib/retry_operation.js @@ -0,0 +1,120 @@ +function RetryOperation(timeouts, retryForever) { + this._timeouts = timeouts; + this._fn = null; + this._errors = []; + this._attempts = 1; + this._operationTimeout = null; + this._operationTimeoutCb = null; + this._timeout = null; + + if (!!retryForever) { + this._cachedTimeouts = this._timeouts.slice(0); + } +} +module.exports = RetryOperation; + +RetryOperation.prototype.retry = function(err) { + if (this._timeout) { + clearTimeout(this._timeout); + } + + if (!err) { + return false; + } + + this._errors.push(err); + + var timeout = this._timeouts.shift(); + if (timeout === undefined) { + if (this._cachedTimeouts) { + // retry forever, only keep last error + this._errors.splice(this._errors.length - 1, this._errors.length); + this._timeouts = this._cachedTimeouts.slice(0); + timeout = this._timeouts.shift(); + } else { + return false; + } + } + + var self = this; + setTimeout(function() { + self._attempts++; + + if (self._operationTimeoutCb) { + self._timeout = setTimeout(function() { + self._operationTimeoutCb(self._attempts); + }, self._operationTimeout); + } + + self._fn(self._attempts); + }, timeout); + + return true; +}; + +RetryOperation.prototype.attempt = function(fn, timeoutOps) { + this._fn = fn; + + if (timeoutOps) { + if (timeoutOps.timeout) { + this._operationTimeout = timeoutOps.timeout; + } + if (timeoutOps.cb) { + this._operationTimeoutCb = timeoutOps.cb; + } + } + + var self = this; + if (this._operationTimeoutCb) { + this._timeout = setTimeout(function() { + self._operationTimeoutCb(); + }, self._operationTimeout); + } + + this._fn(this._attempts); +}; + +RetryOperation.prototype.try = function(fn) { + console.log('Using RetryOperation.try() is deprecated'); + this.attempt(fn); +}; + +RetryOperation.prototype.start = function(fn) { + console.log('Using RetryOperation.start() is deprecated'); + this.attempt(fn); +}; + +RetryOperation.prototype.start = RetryOperation.prototype.try; + +RetryOperation.prototype.errors = function() { + return this._errors; +}; + +RetryOperation.prototype.attempts = function() { + return this._attempts; +}; + +RetryOperation.prototype.mainError = function() { + if (this._errors.length === 0) { + return null; + } + + var counts = {}; + var mainError = null; + var mainErrorCount = 0; + + for (var i = 0; i < this._errors.length; i++) { + var error = this._errors[i]; + var message = error.message; + var count = (counts[message] || 0) + 1; + + counts[message] = count; + + if (count >= mainErrorCount) { + mainError = error; + mainErrorCount = count; + } + } + + return mainError; +}; diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/retry/package.json new file mode 100644 index 00000000000000..c274f9d6a7047c --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/node_modules/retry/package.json @@ -0,0 +1,79 @@ +{ + "_args": [ + [ + "retry@^0.8.0", + "/Users/rebecca/code/npm/node_modules/npm-registry-client" + ] + ], + "_from": "retry@>=0.8.0 <0.9.0", + "_id": "retry@0.8.0", + "_inCache": true, + "_installable": true, + "_location": "/npm-registry-client/retry", + "_nodeVersion": "0.10.33", + "_npmUser": { + "email": "tim@debuggable.com", + "name": "tim-kos" + }, + "_npmVersion": "2.1.7", + "_phantomChildren": {}, + "_requested": { + "name": "retry", + "raw": "retry@^0.8.0", + "rawSpec": "^0.8.0", + "scope": null, + "spec": ">=0.8.0 <0.9.0", + "type": "range" + }, + "_requiredBy": [ + "/npm-registry-client" + ], + "_resolved": "https://registry.npmjs.org/retry/-/retry-0.8.0.tgz", + "_shasum": "2367628dc0edb247b1eab649dc53ac8628ac2d5f", + "_shrinkwrap": null, + "_spec": "retry@^0.8.0", + "_where": "/Users/rebecca/code/npm/node_modules/npm-registry-client", + "author": { + "email": "tim@debuggable.com", + "name": "Tim Koschützki", + "url": "http://debuggable.com/" + }, + "bugs": { + "url": "https://github.com/tim-kos/node-retry/issues" + }, + "dependencies": {}, + "description": "Abstraction for exponential and custom retry strategies for failed operations.", + "devDependencies": { + "fake": "0.2.0", + "far": "0.0.1" + }, + "directories": { + "lib": "./lib" + }, + "dist": { + "shasum": "2367628dc0edb247b1eab649dc53ac8628ac2d5f", + "tarball": "http://registry.npmjs.org/retry/-/retry-0.8.0.tgz" + }, + "engines": { + "node": "*" + }, + "gitHead": "9446e803d6a41ae08732a4a215ae5bf1ff1ccfdd", + "homepage": "https://github.com/tim-kos/node-retry", + "license": "MIT", + "main": "index", + "maintainers": [ + { + "name": "tim-kos", + "email": "tim@debuggable.com" + } + ], + "name": "retry", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/tim-kos/node-retry.git" + }, + "scripts": {}, + "version": "0.8.0" +} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/common.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/common.js new file mode 100644 index 00000000000000..224720696ebac8 --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/common.js @@ -0,0 +1,10 @@ +var common = module.exports; +var path = require('path'); + +var rootDir = path.join(__dirname, '..'); +common.dir = { + lib: rootDir + '/lib' +}; + +common.assert = require('assert'); +common.fake = require('fake'); \ No newline at end of file diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-retry-operation.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-retry-operation.js new file mode 100644 index 00000000000000..cecfa3b7310013 --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-retry-operation.js @@ -0,0 +1,106 @@ +var common = require('../common'); +var assert = common.assert; +var fake = common.fake.create(); +var retry = require(common.dir.lib + '/retry'); + +(function testErrors() { + var operation = retry.operation(); + + var error = new Error('some error'); + var error2 = new Error('some other error'); + operation._errors.push(error); + operation._errors.push(error2); + + assert.deepEqual(operation.errors(), [error, error2]); +})(); + +(function testMainErrorReturnsMostFrequentError() { + var operation = retry.operation(); + var error = new Error('some error'); + var error2 = new Error('some other error'); + + operation._errors.push(error); + operation._errors.push(error2); + operation._errors.push(error); + + assert.strictEqual(operation.mainError(), error); +})(); + +(function testMainErrorReturnsLastErrorOnEqualCount() { + var operation = retry.operation(); + var error = new Error('some error'); + var error2 = new Error('some other error'); + + operation._errors.push(error); + operation._errors.push(error2); + + assert.strictEqual(operation.mainError(), error2); +})(); + +(function testAttempt() { + var operation = retry.operation(); + var fn = new Function(); + + var timeoutOpts = { + timeout: 1, + cb: function() {} + }; + operation.attempt(fn, timeoutOpts); + + assert.strictEqual(fn, operation._fn); + assert.strictEqual(timeoutOpts.timeout, operation._operationTimeout); + assert.strictEqual(timeoutOpts.cb, operation._operationTimeoutCb); +})(); + +(function testRetry() { + var times = 3; + var error = new Error('some error'); + var operation = retry.operation([1, 2, 3]); + var attempts = 0; + + var finalCallback = fake.callback('finalCallback'); + fake.expectAnytime(finalCallback); + + var fn = function() { + operation.attempt(function(currentAttempt) { + attempts++; + assert.equal(currentAttempt, attempts); + if (operation.retry(error)) { + return; + } + + assert.strictEqual(attempts, 4); + assert.strictEqual(operation.attempts(), attempts); + assert.strictEqual(operation.mainError(), error); + finalCallback(); + }); + }; + + fn(); +})(); + +(function testRetryForever() { + var error = new Error('some error'); + var operation = retry.operation({ retries: 3, forever: true }); + var attempts = 0; + + var finalCallback = fake.callback('finalCallback'); + fake.expectAnytime(finalCallback); + + var fn = function() { + operation.attempt(function(currentAttempt) { + attempts++; + assert.equal(currentAttempt, attempts); + if (attempts !== 6 && operation.retry(error)) { + return; + } + + assert.strictEqual(attempts, 6); + assert.strictEqual(operation.attempts(), attempts); + assert.strictEqual(operation.mainError(), error); + finalCallback(); + }); + }; + + fn(); +})(); diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-retry-wrap.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-retry-wrap.js new file mode 100644 index 00000000000000..7ca8bc7eb596b5 --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-retry-wrap.js @@ -0,0 +1,77 @@ +var common = require('../common'); +var assert = common.assert; +var fake = common.fake.create(); +var retry = require(common.dir.lib + '/retry'); + +function getLib() { + return { + fn1: function() {}, + fn2: function() {}, + fn3: function() {} + }; +} + +(function wrapAll() { + var lib = getLib(); + retry.wrap(lib); + assert.equal(lib.fn1.name, 'retryWrapper'); + assert.equal(lib.fn2.name, 'retryWrapper'); + assert.equal(lib.fn3.name, 'retryWrapper'); +}()); + +(function wrapAllPassOptions() { + var lib = getLib(); + retry.wrap(lib, {retries: 2}); + assert.equal(lib.fn1.name, 'retryWrapper'); + assert.equal(lib.fn2.name, 'retryWrapper'); + assert.equal(lib.fn3.name, 'retryWrapper'); + assert.equal(lib.fn1.options.retries, 2); + assert.equal(lib.fn2.options.retries, 2); + assert.equal(lib.fn3.options.retries, 2); +}()); + +(function wrapDefined() { + var lib = getLib(); + retry.wrap(lib, ['fn2', 'fn3']); + assert.notEqual(lib.fn1.name, 'retryWrapper'); + assert.equal(lib.fn2.name, 'retryWrapper'); + assert.equal(lib.fn3.name, 'retryWrapper'); +}()); + +(function wrapDefinedAndPassOptions() { + var lib = getLib(); + retry.wrap(lib, {retries: 2}, ['fn2', 'fn3']); + assert.notEqual(lib.fn1.name, 'retryWrapper'); + assert.equal(lib.fn2.name, 'retryWrapper'); + assert.equal(lib.fn3.name, 'retryWrapper'); + assert.equal(lib.fn2.options.retries, 2); + assert.equal(lib.fn3.options.retries, 2); +}()); + +(function runWrappedWithoutError() { + var callbackCalled; + var lib = {method: function(a, b, callback) { + assert.equal(a, 1); + assert.equal(b, 2); + assert.equal(typeof callback, 'function'); + callback(); + }}; + retry.wrap(lib); + lib.method(1, 2, function() { + callbackCalled = true; + }); + assert.ok(callbackCalled); +}()); + +(function runWrappedWithError() { + var callbackCalled; + var lib = {method: function(callback) { + callback(new Error('Some error')); + }}; + retry.wrap(lib, {retries: 1}); + lib.method(function(err) { + callbackCalled = true; + assert.ok(err instanceof Error); + }); + assert.ok(!callbackCalled); +}()); diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-timeouts.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-timeouts.js new file mode 100644 index 00000000000000..7206b0fb0b01d0 --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-timeouts.js @@ -0,0 +1,69 @@ +var common = require('../common'); +var assert = common.assert; +var retry = require(common.dir.lib + '/retry'); + +(function testDefaultValues() { + var timeouts = retry.timeouts(); + + assert.equal(timeouts.length, 10); + assert.equal(timeouts[0], 1000); + assert.equal(timeouts[1], 2000); + assert.equal(timeouts[2], 4000); +})(); + +(function testDefaultValuesWithRandomize() { + var minTimeout = 5000; + var timeouts = retry.timeouts({ + minTimeout: minTimeout, + randomize: true + }); + + assert.equal(timeouts.length, 10); + assert.ok(timeouts[0] > minTimeout); + assert.ok(timeouts[1] > timeouts[0]); + assert.ok(timeouts[2] > timeouts[1]); +})(); + +(function testPassedTimeoutsAreUsed() { + var timeoutsArray = [1000, 2000, 3000]; + var timeouts = retry.timeouts(timeoutsArray); + assert.deepEqual(timeouts, timeoutsArray); + assert.notStrictEqual(timeouts, timeoutsArray); +})(); + +(function testTimeoutsAreWithinBoundaries() { + var minTimeout = 1000; + var maxTimeout = 10000; + var timeouts = retry.timeouts({ + minTimeout: minTimeout, + maxTimeout: maxTimeout + }); + for (var i = 0; i < timeouts; i++) { + assert.ok(timeouts[i] >= minTimeout); + assert.ok(timeouts[i] <= maxTimeout); + } +})(); + +(function testTimeoutsAreIncremental() { + var timeouts = retry.timeouts(); + var lastTimeout = timeouts[0]; + for (var i = 0; i < timeouts; i++) { + assert.ok(timeouts[i] > lastTimeout); + lastTimeout = timeouts[i]; + } +})(); + +(function testTimeoutsAreIncrementalForFactorsLessThanOne() { + var timeouts = retry.timeouts({ + retries: 3, + factor: 0.5 + }); + + var expected = [250, 500, 1000]; + assert.deepEqual(expected, timeouts); +})(); + +(function testRetries() { + var timeouts = retry.timeouts({retries: 2}); + assert.strictEqual(timeouts.length, 2); +})(); diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/runner.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/runner.js new file mode 100644 index 00000000000000..e0ee2f570fe3c0 --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/runner.js @@ -0,0 +1,5 @@ +var far = require('far').create(); + +far.add(__dirname); +far.include(/\/test-.*\.js$/); +far.execute(); diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/.npmignore b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/.npmignore index 926ddf616c7c12..bc818974f8633f 100644 --- a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/.npmignore +++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/.npmignore @@ -1,3 +1,5 @@ *~ .#* node_modules +coverage +.nyc_output diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/index.js b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/index.js index 22f47ac8852b89..9e7711935a32c0 100644 --- a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/index.js +++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/index.js @@ -1,21 +1,21 @@ "use strict" -var stream = require("readable-stream"); +var stream = require("readable-stream") var EventEmitter = require("events").EventEmitter var util = require("util") var delegate = require("delegates") +function noteChange (trackerGroup) { + return function (name) { + trackerGroup.emit('change', name || trackerGroup.name); + } +} + var TrackerGroup = exports.TrackerGroup = function (name) { EventEmitter.call(this) this.name = name this.trackGroup = [] - var self = this this.totalWeight = 0 - var noteChange = this.noteChange = function (name) { - self.emit("change", name || this.name) - }.bind(this) - this.trackGroup.forEach(function(unit) { - unit.on("change", noteChange) - }) + this.noteChange = noteChange(this) } util.inherits(TrackerGroup, EventEmitter) @@ -23,9 +23,10 @@ TrackerGroup.prototype.completed = function () { if (this.trackGroup.length==0) return 0 var valPerWeight = 1 / this.totalWeight var completed = 0 - this.trackGroup.forEach(function(T) { - completed += valPerWeight * T.weight * T.completed() - }) + for (var i = 0, len = this.trackGroup.length; i < len; i++){ + var group = this.trackGroup[i]; + completed += valPerWeight * group.weight * group.completed() + } return completed } @@ -33,6 +34,7 @@ TrackerGroup.prototype.addUnit = function (unit, weight, noChange) { unit.weight = weight || 1 this.totalWeight += unit.weight this.trackGroup.push(unit) + // Bubble events back up unit.on("change", this.noteChange) if (! noChange) this.emit("change", this.name) return unit @@ -51,12 +53,12 @@ TrackerGroup.prototype.newStream = function (name, todo, weight) { } TrackerGroup.prototype.finish = function () { - if (! this.trackGroup.length) { this.addUnit(new Tracker(), 1, true) } - var self = this - this.trackGroup.forEach(function(T) { - T.removeListener("change", self.noteChange) - T.finish() - }) + if (! this.trackGroup.length) this.addUnit(new Tracker(), 1, true) + for (var i = 0, len = this.trackGroup.length; i < len; i++) { + var group = this.trackGroup[i] + group.removeListener("change", this.noteChange) + group.finish() + } this.emit("change", this.name) } @@ -85,7 +87,7 @@ var Tracker = exports.Tracker = function (name,todo) { util.inherits(Tracker, EventEmitter) Tracker.prototype.completed = function () { - return this.workTodo==0 ? 0 : this.workDone / this.workTodo + return this.workTodo === 0 ? 0 : this.workDone / this.workTodo } Tracker.prototype.addWork = function (work) { diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/History.md b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/History.md index aee31a4c35b7f3..25959eab67b840 100644 --- a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/History.md +++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/History.md @@ -1,4 +1,10 @@ +1.0.0 / 2015-12-14 +================== + + * Merge pull request #12 from kasicka/master + * Add license text + 0.1.0 / 2014-10-17 ================== diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/License b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/License new file mode 100644 index 00000000000000..60de60addbe7e9 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/License @@ -0,0 +1,20 @@ +Copyright (c) 2015 TJ Holowaychuk + +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/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json index ea3c1da0d490b2..a32bbf52b2bbca 100644 --- a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json +++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json @@ -1,33 +1,59 @@ { - "name": "delegates", - "version": "0.1.0", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/node-delegates.git" + "_args": [ + [ + "delegates@^1.0.0", + "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/are-we-there-yet" + ] + ], + "_from": "delegates@>=1.0.0 <2.0.0", + "_id": "delegates@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/npmlog/are-we-there-yet/delegates", + "_nodeVersion": "4.2.1", + "_npmUser": { + "email": "tj@vision-media.ca", + "name": "tjholowaychuk" }, - "description": "delegate methods and accessors to another property", - "keywords": [ - "delegate", - "delegation" + "_npmVersion": "3.3.12", + "_phantomChildren": {}, + "_requested": { + "name": "delegates", + "raw": "delegates@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/npmlog/are-we-there-yet" ], + "_resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "_shasum": "84c6e159b81904fdca59a0ef44cd870d31250f9a", + "_shrinkwrap": null, + "_spec": "delegates@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/are-we-there-yet", + "bugs": { + "url": "https://github.com/visionmedia/node-delegates/issues" + }, "dependencies": {}, + "description": "delegate methods and accessors to another property", "devDependencies": { "mocha": "*", "should": "*" }, - "license": "MIT", - "bugs": { - "url": "https://github.com/visionmedia/node-delegates/issues" - }, - "homepage": "https://github.com/visionmedia/node-delegates", - "_id": "delegates@0.1.0", - "_shasum": "b4b57be11a1653517a04b27f0949bdc327dfe390", - "_from": "delegates@>=0.1.0 <0.2.0", - "_npmVersion": "1.4.9", - "_npmUser": { - "name": "dominicbarnes", - "email": "dominic@dbarnes.info" + "directories": {}, + "dist": { + "shasum": "84c6e159b81904fdca59a0ef44cd870d31250f9a", + "tarball": "http://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz" }, + "gitHead": "c4dc07ef1ed51c2b2a63f3585e5ef949ee577a49", + "homepage": "https://github.com/visionmedia/node-delegates#readme", + "keywords": [ + "delegate", + "delegation" + ], + "license": "MIT", "maintainers": [ { "name": "tjholowaychuk", @@ -38,11 +64,13 @@ "email": "dominic@dbarnes.info" } ], - "dist": { - "shasum": "b4b57be11a1653517a04b27f0949bdc327dfe390", - "tarball": "http://registry.npmjs.org/delegates/-/delegates-0.1.0.tgz" + "name": "delegates", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/visionmedia/node-delegates.git" }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/delegates/-/delegates-0.1.0.tgz", - "readme": "ERROR: No README data found!" + "scripts": {}, + "version": "1.0.0" } diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/package.json b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/package.json index b2d2bea019f98a..fa2d7c62eb7e39 100644 --- a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/package.json +++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/package.json @@ -1,37 +1,36 @@ { "_args": [ [ - "are-we-there-yet@~1.0.0", + "are-we-there-yet@~1.0.6", "/Users/rebecca/code/npm/node_modules/npmlog" ] ], - "_from": "are-we-there-yet@>=1.0.0 <1.1.0", - "_id": "are-we-there-yet@1.0.5", + "_from": "are-we-there-yet@>=1.0.6 <1.1.0", + "_id": "are-we-there-yet@1.0.6", "_inCache": true, "_installable": true, "_location": "/npmlog/are-we-there-yet", - "_nodeVersion": "4.2.2", + "_nodeVersion": "5.4.0", "_npmUser": { "email": "me@re-becca.org", "name": "iarna" }, - "_npmVersion": "3.5.2", + "_npmVersion": "3.6.0", "_phantomChildren": {}, "_requested": { "name": "are-we-there-yet", - "raw": "are-we-there-yet@~1.0.0", - "rawSpec": "~1.0.0", + "raw": "are-we-there-yet@~1.0.6", + "rawSpec": "~1.0.6", "scope": null, - "spec": ">=1.0.0 <1.1.0", + "spec": ">=1.0.6 <1.1.0", "type": "range" }, "_requiredBy": [ "/npmlog" ], - "_resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.0.5.tgz", - "_shasum": "239f26706da902a2bffb72c33de66fdfd3798ac5", + "_shasum": "a2d28c93102aa6cc96245a26cb954de06ec53f0c", "_shrinkwrap": null, - "_spec": "are-we-there-yet@~1.0.0", + "_spec": "are-we-there-yet@~1.0.6", "_where": "/Users/rebecca/code/npm/node_modules/npmlog", "author": { "name": "Rebecca Turner", @@ -41,19 +40,19 @@ "url": "https://github.com/iarna/are-we-there-yet/issues" }, "dependencies": { - "delegates": "^0.1.0", + "delegates": "^1.0.0", "readable-stream": "^2.0.0 || ^1.1.13" }, "description": "Keep track of the overall completion of many dispirate processes", "devDependencies": { - "tap": "^0.4.13" + "tap": "^5.2.0" }, "directories": {}, "dist": { - "shasum": "239f26706da902a2bffb72c33de66fdfd3798ac5", - "tarball": "http://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.0.5.tgz" + "shasum": "a2d28c93102aa6cc96245a26cb954de06ec53f0c", + "tarball": "http://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.0.6.tgz" }, - "gitHead": "abaff79ae17e9397eae19d29d2d75778d18aab3a", + "gitHead": "5f19c8b6f9c5afb8b0b17308cb9d66f7027ae526", "homepage": "https://github.com/iarna/are-we-there-yet", "license": "ISC", "main": "index.js", @@ -73,5 +72,5 @@ "scripts": { "test": "tap test/*.js" }, - "version": "1.0.5" + "version": "1.0.6" } diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/README.md index 89c8deeafbddea..3e4c3c1990abff 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/README.md +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/README.md @@ -1,4 +1,4 @@ -# lodash.pad v3.2.0 +# lodash.pad v3.2.1 The [lodash](https://lodash.com/) method `_.pad` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var pad = require('lodash.pad'); ``` -See the [documentation](https://lodash.com/docs#pad) or [package source](https://github.com/lodash/lodash/blob/3.2.0-npm-packages/lodash.pad) for more details. +See the [documentation](https://lodash.com/docs#pad) or [package source](https://github.com/lodash/lodash/blob/3.2.1-npm-packages/lodash.pad) for more details. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/index.js index 4a32b912cb10f3..9ad6fab39d35a6 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/index.js +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.2.0 (Custom Build) + * lodash 3.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -32,13 +32,15 @@ var reIsOctal = /^0o[0-7]+$/i; /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', - rsComboRange = '\\u0300-\\u036f\\ufe20-\\ufe23', + rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', + rsComboSymbolsRange = '\\u20d0-\\u20f0', rsVarRange = '\\ufe0e\\ufe0f'; /** Used to compose unicode capture groups. */ var rsAstral = '[' + rsAstralRange + ']', - rsCombo = '[' + rsComboRange + ']', - rsModifier = '(?:\\ud83c[\\udffb-\\udfff])', + rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', rsNonAstral = '[^' + rsAstralRange + ']', rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', @@ -52,10 +54,10 @@ var reOptMod = rsModifier + '?', rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reComplexSymbol = RegExp(rsSymbol + rsSeq, 'g'); +var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ -var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); +var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']'); /** Built-in method references without a dependency on `global`. */ var freeParseInt = parseInt; @@ -63,6 +65,7 @@ var freeParseInt = parseInt; /** * Gets the number of symbols in `string`. * + * @private * @param {string} string The string to inspect. * @returns {number} Returns the string size. */ @@ -98,15 +101,15 @@ var objectProto = global.Object.prototype; var objectToString = objectProto.toString; /** Built-in value references. */ -var _Symbol = global.Symbol; +var Symbol = global.Symbol; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeCeil = Math.ceil, nativeFloor = Math.floor; /** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol ? _Symbol.prototype : undefined, - symbolToString = _Symbol ? symbolProto.toString : undefined; +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = Symbol ? symbolProto.toString : undefined; /** * Creates the padding for `string` based on `length`. The `chars` string @@ -339,7 +342,7 @@ function toString(value) { return ''; } if (isSymbol(value)) { - return _Symbol ? symbolToString.call(value) : ''; + return Symbol ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/README.md index a911d99092d3dc..134f8303b85839 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/README.md +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/README.md @@ -1,4 +1,4 @@ -# lodash.repeat v3.1.0 +# lodash.repeat v3.1.1 The [lodash](https://lodash.com/) method `_.repeat` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var repeat = require('lodash.repeat'); ``` -See the [documentation](https://lodash.com/docs#repeat) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.repeat) for more details. +See the [documentation](https://lodash.com/docs#repeat) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.repeat) for more details. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/index.js index 85a5a90b3b7d61..1103d1f165117c 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/index.js +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -43,14 +43,14 @@ var objectProto = global.Object.prototype; var objectToString = objectProto.toString; /** Built-in value references. */ -var _Symbol = global.Symbol; +var Symbol = global.Symbol; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeFloor = Math.floor; /** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol ? _Symbol.prototype : undefined, - symbolToString = _Symbol ? symbolProto.toString : undefined; +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = Symbol ? symbolProto.toString : undefined; /** * Checks if `value` is classified as a `Function` object. @@ -257,7 +257,7 @@ function toString(value) { return ''; } if (isSymbol(value)) { - return _Symbol ? symbolToString.call(value) : ''; + return Symbol ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/package.json index 7657b759a69a67..f0ba58bfaf6b55 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/package.json +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/package.json @@ -6,7 +6,7 @@ ] ], "_from": "lodash.repeat@>=3.0.0 <4.0.0", - "_id": "lodash.repeat@3.1.0", + "_id": "lodash.repeat@3.1.1", "_inCache": true, "_installable": true, "_location": "/npmlog/gauge/lodash.pad/lodash.repeat", @@ -28,8 +28,8 @@ "_requiredBy": [ "/npmlog/gauge/lodash.pad" ], - "_resolved": "https://registry.npmjs.org/lodash.repeat/-/lodash.repeat-3.1.0.tgz", - "_shasum": "a7bfe799b07c9a75dc010b65c61c1cfed3e18a96", + "_resolved": "https://registry.npmjs.org/lodash.repeat/-/lodash.repeat-3.1.1.tgz", + "_shasum": "71c0768468951e57f72425485150bce37ad89357", "_shrinkwrap": null, "_spec": "lodash.repeat@^3.0.0", "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad", @@ -63,8 +63,8 @@ "devDependencies": {}, "directories": {}, "dist": { - "shasum": "a7bfe799b07c9a75dc010b65c61c1cfed3e18a96", - "tarball": "http://registry.npmjs.org/lodash.repeat/-/lodash.repeat-3.1.0.tgz" + "shasum": "71c0768468951e57f72425485150bce37ad89357", + "tarball": "http://registry.npmjs.org/lodash.repeat/-/lodash.repeat-3.1.1.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -100,5 +100,5 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, - "version": "3.1.0" + "version": "3.1.1" } diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json index db5aefb1748814..c65f97e2e537bc 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json @@ -6,7 +6,7 @@ ] ], "_from": "lodash.pad@>=3.0.0 <4.0.0", - "_id": "lodash.pad@3.2.0", + "_id": "lodash.pad@3.2.1", "_inCache": true, "_installable": true, "_location": "/npmlog/gauge/lodash.pad", @@ -28,8 +28,8 @@ "_requiredBy": [ "/npmlog/gauge" ], - "_resolved": "https://registry.npmjs.org/lodash.pad/-/lodash.pad-3.2.0.tgz", - "_shasum": "d1d882526da12087ef8c6089173ec081717698a2", + "_resolved": "https://registry.npmjs.org/lodash.pad/-/lodash.pad-3.2.1.tgz", + "_shasum": "f71e5c1e2c6447c8e1c818dc3f74e5c02e716de3", "_shrinkwrap": null, "_spec": "lodash.pad@^3.0.0", "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge", @@ -65,8 +65,8 @@ "devDependencies": {}, "directories": {}, "dist": { - "shasum": "d1d882526da12087ef8c6089173ec081717698a2", - "tarball": "http://registry.npmjs.org/lodash.pad/-/lodash.pad-3.2.0.tgz" + "shasum": "f71e5c1e2c6447c8e1c818dc3f74e5c02e716de3", + "tarball": "http://registry.npmjs.org/lodash.pad/-/lodash.pad-3.2.1.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -102,5 +102,5 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, - "version": "3.2.0" + "version": "3.2.1" } diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md index a911d99092d3dc..134f8303b85839 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md @@ -1,4 +1,4 @@ -# lodash.repeat v3.1.0 +# lodash.repeat v3.1.1 The [lodash](https://lodash.com/) method `_.repeat` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var repeat = require('lodash.repeat'); ``` -See the [documentation](https://lodash.com/docs#repeat) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.repeat) for more details. +See the [documentation](https://lodash.com/docs#repeat) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.repeat) for more details. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js index 85a5a90b3b7d61..1103d1f165117c 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -43,14 +43,14 @@ var objectProto = global.Object.prototype; var objectToString = objectProto.toString; /** Built-in value references. */ -var _Symbol = global.Symbol; +var Symbol = global.Symbol; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeFloor = Math.floor; /** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol ? _Symbol.prototype : undefined, - symbolToString = _Symbol ? symbolProto.toString : undefined; +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = Symbol ? symbolProto.toString : undefined; /** * Checks if `value` is classified as a `Function` object. @@ -257,7 +257,7 @@ function toString(value) { return ''; } if (isSymbol(value)) { - return _Symbol ? symbolToString.call(value) : ''; + return Symbol ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json index b296bc209382b2..682bca742b0d17 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json @@ -10,7 +10,7 @@ ] ], "_from": "lodash.repeat@>=3.0.0 <4.0.0", - "_id": "lodash.repeat@3.1.0", + "_id": "lodash.repeat@3.1.1", "_inCache": true, "_installable": true, "_location": "/npmlog/gauge/lodash.padleft/lodash._createpadding/lodash.repeat", @@ -65,8 +65,8 @@ "devDependencies": {}, "directories": {}, "dist": { - "shasum": "a7bfe799b07c9a75dc010b65c61c1cfed3e18a96", - "tarball": "http://registry.npmjs.org/lodash.repeat/-/lodash.repeat-3.1.0.tgz" + "shasum": "71c0768468951e57f72425485150bce37ad89357", + "tarball": "http://registry.npmjs.org/lodash.repeat/-/lodash.repeat-3.1.1.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -102,5 +102,5 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, - "version": "3.1.0" + "version": "3.1.1" } diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md index a911d99092d3dc..134f8303b85839 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md @@ -1,4 +1,4 @@ -# lodash.repeat v3.1.0 +# lodash.repeat v3.1.1 The [lodash](https://lodash.com/) method `_.repeat` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var repeat = require('lodash.repeat'); ``` -See the [documentation](https://lodash.com/docs#repeat) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.repeat) for more details. +See the [documentation](https://lodash.com/docs#repeat) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.repeat) for more details. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js index 85a5a90b3b7d61..1103d1f165117c 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -43,14 +43,14 @@ var objectProto = global.Object.prototype; var objectToString = objectProto.toString; /** Built-in value references. */ -var _Symbol = global.Symbol; +var Symbol = global.Symbol; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeFloor = Math.floor; /** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol ? _Symbol.prototype : undefined, - symbolToString = _Symbol ? symbolProto.toString : undefined; +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = Symbol ? symbolProto.toString : undefined; /** * Checks if `value` is classified as a `Function` object. @@ -257,7 +257,7 @@ function toString(value) { return ''; } if (isSymbol(value)) { - return _Symbol ? symbolToString.call(value) : ''; + return Symbol ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json index e4fec38a146b2b..9cc6496f6cb356 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json @@ -10,7 +10,7 @@ ] ], "_from": "lodash.repeat@>=3.0.0 <4.0.0", - "_id": "lodash.repeat@3.1.0", + "_id": "lodash.repeat@3.1.1", "_inCache": true, "_installable": true, "_location": "/npmlog/gauge/lodash.padright/lodash._createpadding/lodash.repeat", @@ -65,8 +65,8 @@ "devDependencies": {}, "directories": {}, "dist": { - "shasum": "a7bfe799b07c9a75dc010b65c61c1cfed3e18a96", - "tarball": "http://registry.npmjs.org/lodash.repeat/-/lodash.repeat-3.1.0.tgz" + "shasum": "71c0768468951e57f72425485150bce37ad89357", + "tarball": "http://registry.npmjs.org/lodash.repeat/-/lodash.repeat-3.1.1.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -102,5 +102,5 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, - "version": "3.1.0" + "version": "3.1.1" } diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/package.json index 565d8a4de9dc7c..6f66ef146238b7 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/package.json +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/package.json @@ -1,36 +1,36 @@ { "_args": [ [ - "gauge@~1.2.0", + "gauge@~1.2.5", "/Users/rebecca/code/npm/node_modules/npmlog" ] ], - "_from": "gauge@>=1.2.0 <1.3.0", - "_id": "gauge@1.2.4", + "_from": "gauge@>=1.2.5 <1.3.0", + "_id": "gauge@1.2.5", "_inCache": true, "_installable": true, "_location": "/npmlog/gauge", - "_nodeVersion": "4.2.2", + "_nodeVersion": "5.4.0", "_npmUser": { "email": "me@re-becca.org", "name": "iarna" }, - "_npmVersion": "3.5.4", + "_npmVersion": "3.6.0", "_phantomChildren": {}, "_requested": { "name": "gauge", - "raw": "gauge@~1.2.0", - "rawSpec": "~1.2.0", + "raw": "gauge@~1.2.5", + "rawSpec": "~1.2.5", "scope": null, - "spec": ">=1.2.0 <1.3.0", + "spec": ">=1.2.5 <1.3.0", "type": "range" }, "_requiredBy": [ "/npmlog" ], - "_shasum": "b1d519758b3c77c7b45021d0ca4841548818bc41", + "_shasum": "b80f107dd1f7d3c5a85f5aa74f9e0124caac9da7", "_shrinkwrap": null, - "_spec": "gauge@~1.2.0", + "_spec": "gauge@~1.2.5", "_where": "/Users/rebecca/code/npm/node_modules/npmlog", "author": { "email": "me@re-becca.org", @@ -52,10 +52,10 @@ }, "directories": {}, "dist": { - "shasum": "b1d519758b3c77c7b45021d0ca4841548818bc41", - "tarball": "http://registry.npmjs.org/gauge/-/gauge-1.2.4.tgz" + "shasum": "b80f107dd1f7d3c5a85f5aa74f9e0124caac9da7", + "tarball": "http://registry.npmjs.org/gauge/-/gauge-1.2.5.tgz" }, - "gitHead": "a6af415c7e143fd8dd058c97f5f3ed3dbad872f3", + "gitHead": "bd0bb377d121e17d343bba156dd92fe6a8b21581", "homepage": "https://github.com/iarna/gauge", "keywords": [ "gauge", @@ -80,5 +80,5 @@ "scripts": { "test": "tap test/*.js" }, - "version": "1.2.4" + "version": "1.2.5" } diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/progress-bar.js b/deps/npm/node_modules/npmlog/node_modules/gauge/progress-bar.js index 16bdadc5103eee..00b3a77e19149b 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/progress-bar.js +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/progress-bar.js @@ -36,7 +36,7 @@ var ProgressBar = module.exports = function (options, cursor) { {type: "completionbar"}, {type: "endgroup"} ] - this.updatefreq = options.maxUpdateFrequency || 50 + this.updatefreq = options.maxUpdateFrequency == null ? 50 : options.maxUpdateFrequency this.lastName = "" this.lastCompleted = 0 this.spun = 0 @@ -132,13 +132,12 @@ ProgressBar.prototype.show = function(name, completed) { if (!isTTY()) return if (this.disabled) return if (! this.spun && ! completed) return - if (this.tryAgain) { - clearTimeout(this.tryAgain) - this.tryAgain = null - } + if (this.tryAgain) return var self = this + if (this.showing && new Date() - this.last < this.updatefreq) { this.tryAgain = setTimeout(function () { + self.tryAgain = null if (self.disabled) return if (! self.spun && ! completed) return drawBar() diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/test/progress-bar.js b/deps/npm/node_modules/npmlog/node_modules/gauge/test/progress-bar.js index 39939269f5b630..5d3e7e78fe000e 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/test/progress-bar.js +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/test/progress-bar.js @@ -4,7 +4,7 @@ var ProgressBar = require("../progress-bar.js") var cursor = [] var C -var bar = new ProgressBar({theme: ProgressBar.ascii}, C = { +var bar = new ProgressBar({theme: ProgressBar.ascii, maxUpdateFrequency: 0}, C = { show: function () { cursor.push(["show"]) return C diff --git a/deps/npm/node_modules/npmlog/package.json b/deps/npm/node_modules/npmlog/package.json index 40c1bc43ee7d62..a4ddff9891c478 100644 --- a/deps/npm/node_modules/npmlog/package.json +++ b/deps/npm/node_modules/npmlog/package.json @@ -1,37 +1,90 @@ { + "_args": [ + [ + "npmlog@~2.0.0", + "/Users/rebecca/code/npm" + ] + ], + "_from": "npmlog@>=2.0.0 <2.1.0", + "_id": "npmlog@2.0.2", + "_inCache": true, + "_installable": true, + "_location": "/npmlog", + "_nodeVersion": "5.4.0", + "_npmUser": { + "email": "me@re-becca.org", + "name": "iarna" + }, + "_npmVersion": "3.6.0", + "_phantomChildren": { + "has-unicode": "2.0.0", + "readable-stream": "2.0.5" + }, + "_requested": { + "name": "npmlog", + "raw": "npmlog@~2.0.0", + "rawSpec": "~2.0.0", + "scope": null, + "spec": ">=2.0.0 <2.1.0", + "type": "range" + }, + "_requiredBy": [ + "/", + "/npm-registry-client" + ], + "_shasum": "d0470238b9697b7c3c4d16bdea65a00b12a464ab", + "_shrinkwrap": null, + "_spec": "npmlog@~2.0.0", + "_where": "/Users/rebecca/code/npm", "author": { - "name": "Isaac Z. Schlueter", "email": "i@izs.me", + "name": "Isaac Z. Schlueter", "url": "http://blog.izs.me/" }, - "name": "npmlog", + "bugs": { + "url": "https://github.com/npm/npmlog/issues" + }, + "dependencies": { + "ansi": "~0.3.1", + "are-we-there-yet": "~1.0.6", + "gauge": "~1.2.5" + }, "description": "logger for npm", - "version": "2.0.0", + "devDependencies": { + "tap": "~5.1.2" + }, + "directories": {}, + "dist": { + "shasum": "d0470238b9697b7c3c4d16bdea65a00b12a464ab", + "tarball": "http://registry.npmjs.org/npmlog/-/npmlog-2.0.2.tgz" + }, + "gitHead": "79dc582bf1ce4d2010454d89738a0a4dbd113be9", + "homepage": "https://github.com/npm/npmlog#readme", + "license": "ISC", + "main": "log.js", + "maintainers": [ + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + } + ], + "name": "npmlog", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git+https://github.com/npm/npmlog.git" }, - "main": "log.js", "scripts": { "test": "tap test/*.js" }, - "dependencies": { - "ansi": "~0.3.0", - "are-we-there-yet": "~1.0.0", - "gauge": "~1.2.0" - }, - "devDependencies": { - "tap": "~2.2.0" - }, - "license": "ISC", - "readme": "# npmlog\n\nThe logger util that npm uses.\n\nThis logger is very basic. It does the logging for npm. It supports\ncustom levels and colored output.\n\nBy default, logs are written to stderr. If you want to send log messages\nto outputs other than streams, then you can change the `log.stream`\nmember, or you can just listen to the events that it emits, and do\nwhatever you want with them.\n\n# Basic Usage\n\n```\nvar log = require('npmlog')\n\n// additional stuff ---------------------------+\n// message ----------+ |\n// prefix ----+ | |\n// level -+ | | |\n// v v v v\n log.info('fyi', 'I have a kitty cat: %j', myKittyCat)\n```\n\n## log.level\n\n* {String}\n\nThe level to display logs at. Any logs at or above this level will be\ndisplayed. The special level `silent` will prevent anything from being\ndisplayed ever.\n\n## log.record\n\n* {Array}\n\nAn array of all the log messages that have been entered.\n\n## log.maxRecordSize\n\n* {Number}\n\nThe maximum number of records to keep. If log.record gets bigger than\n10% over this value, then it is sliced down to 90% of this value.\n\nThe reason for the 10% window is so that it doesn't have to resize a\nlarge array on every log entry.\n\n## log.prefixStyle\n\n* {Object}\n\nA style object that specifies how prefixes are styled. (See below)\n\n## log.headingStyle\n\n* {Object}\n\nA style object that specifies how the heading is styled. (See below)\n\n## log.heading\n\n* {String} Default: \"\"\n\nIf set, a heading that is printed at the start of every line.\n\n## log.stream\n\n* {Stream} Default: `process.stderr`\n\nThe stream where output is written.\n\n## log.enableColor()\n\nForce colors to be used on all messages, regardless of the output\nstream.\n\n## log.disableColor()\n\nDisable colors on all messages.\n\n## log.enableProgress()\n\nEnable the display of log activity spinner and progress bar\n\n## log.disableProgress()\n\nDisable the display of a progress bar\n\n## log.enableUnicode()\n\nForce the unicode theme to be used for the progress bar.\n\n## log.disableUnicode()\n\nDisable the use of unicode in the progress bar.\n\n## log.setGaugeTemplate(template)\n\nOverrides the default gauge template.\n\n## log.pause()\n\nStop emitting messages to the stream, but do not drop them.\n\n## log.resume()\n\nEmit all buffered messages that were written while paused.\n\n## log.log(level, prefix, message, ...)\n\n* `level` {String} The level to emit the message at\n* `prefix` {String} A string prefix. Set to \"\" to skip.\n* `message...` Arguments to `util.format`\n\nEmit a log message at the specified level.\n\n## log\\[level](prefix, message, ...)\n\nFor example,\n\n* log.silly(prefix, message, ...)\n* log.verbose(prefix, message, ...)\n* log.info(prefix, message, ...)\n* log.http(prefix, message, ...)\n* log.warn(prefix, message, ...)\n* log.error(prefix, message, ...)\n\nLike `log.log(level, prefix, message, ...)`. In this way, each level is\ngiven a shorthand, so you can do `log.info(prefix, message)`.\n\n## log.addLevel(level, n, style, disp)\n\n* `level` {String} Level indicator\n* `n` {Number} The numeric level\n* `style` {Object} Object with fg, bg, inverse, etc.\n* `disp` {String} Optional replacement for `level` in the output.\n\nSets up a new level with a shorthand function and so forth.\n\nNote that if the number is `Infinity`, then setting the level to that\nwill cause all log messages to be suppressed. If the number is\n`-Infinity`, then the only way to show it is to enable all log messages.\n\n## log.newItem(name, todo, weight)\n\n* `name` {String} Optional; progress item name.\n* `todo` {Number} Optional; total amount of work to be done. Default 0.\n* `weight` {Number} Optional; the weight of this item relative to others. Default 1.\n\nThis adds a new `are-we-there-yet` item tracker to the progress tracker. The\nobject returned has the `log[level]` methods but is otherwise an\n`are-we-there-yet` `Tracker` object.\n\n## log.newStream(name, todo, weight)\n\nThis adds a new `are-we-there-yet` stream tracker to the progress tracker. The\nobject returned has the `log[level]` methods but is otherwise an\n`are-we-there-yet` `TrackerStream` object.\n\n## log.newGroup(name, weight)\n\nThis adds a new `are-we-there-yet` tracker group to the progress tracker. The\nobject returned has the `log[level]` methods but is otherwise an\n`are-we-there-yet` `TrackerGroup` object.\n\n# Events\n\nEvents are all emitted with the message object.\n\n* `log` Emitted for all messages\n* `log.` Emitted for all messages with the `` level.\n* `` Messages with prefixes also emit their prefix as an event.\n\n# Style Objects\n\nStyle objects can have the following fields:\n\n* `fg` {String} Color for the foreground text\n* `bg` {String} Color for the background\n* `bold`, `inverse`, `underline` {Boolean} Set the associated property\n* `bell` {Boolean} Make a noise (This is pretty annoying, probably.)\n\n# Message Objects\n\nEvery log event is emitted with a message object, and the `log.record`\nlist contains all of them that have been created. They have the\nfollowing fields:\n\n* `id` {Number}\n* `level` {String}\n* `prefix` {String}\n* `message` {String} Result of `util.format()`\n* `messageRaw` {Array} Arguments to `util.format()`\n", - "readmeFilename": "README.md", - "gitHead": "6eaa3f8eec672bb7b56a4df9b55dbfff3b9c6a71", - "bugs": { - "url": "https://github.com/npm/npmlog/issues" - }, - "homepage": "https://github.com/npm/npmlog#readme", - "_id": "npmlog@2.0.0", - "_shasum": "4076c200a3dda51133e6f3cf052130105f78bbdf", - "_from": "npmlog@>=2.0.0 <2.1.0" + "version": "2.0.2" } diff --git a/deps/npm/node_modules/readable-stream/.npmignore~8d21794... deps: upgrade npm to 3.6.0 b/deps/npm/node_modules/readable-stream/.npmignore~8d21794... deps: upgrade npm to 3.6.0 deleted file mode 100644 index 38344f87a62766..00000000000000 --- a/deps/npm/node_modules/readable-stream/.npmignore~8d21794... deps: upgrade npm to 3.6.0 +++ /dev/null @@ -1,5 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js \ No newline at end of file diff --git a/deps/npm/node_modules/readable-stream/.npmignore~HEAD b/deps/npm/node_modules/readable-stream/.npmignore~HEAD deleted file mode 100644 index 38344f87a62766..00000000000000 --- a/deps/npm/node_modules/readable-stream/.npmignore~HEAD +++ /dev/null @@ -1,5 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js \ No newline at end of file diff --git a/deps/npm/node_modules/readable-stream/LICENSE~8d21794... deps: upgrade npm to 3.6.0 b/deps/npm/node_modules/readable-stream/LICENSE~8d21794... deps: upgrade npm to 3.6.0 deleted file mode 100644 index e3d4e695a4cff2..00000000000000 --- a/deps/npm/node_modules/readable-stream/LICENSE~8d21794... deps: upgrade npm to 3.6.0 +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -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/LICENSE~8d21794... deps: upgrade npm to 3.6.0_0 b/deps/npm/node_modules/readable-stream/LICENSE~8d21794... deps: upgrade npm to 3.6.0_0 deleted file mode 100644 index e3d4e695a4cff2..00000000000000 --- a/deps/npm/node_modules/readable-stream/LICENSE~8d21794... deps: upgrade npm to 3.6.0_0 +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -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/LICENSE~HEAD b/deps/npm/node_modules/readable-stream/LICENSE~HEAD deleted file mode 100644 index e3d4e695a4cff2..00000000000000 --- a/deps/npm/node_modules/readable-stream/LICENSE~HEAD +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -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/LICENSE~HEAD_0 b/deps/npm/node_modules/readable-stream/LICENSE~HEAD_0 deleted file mode 100644 index e3d4e695a4cff2..00000000000000 --- a/deps/npm/node_modules/readable-stream/LICENSE~HEAD_0 +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -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/README.md~HEAD b/deps/npm/node_modules/readable-stream/README.md~HEAD deleted file mode 100644 index 5c455f4205b8a3..00000000000000 --- a/deps/npm/node_modules/readable-stream/README.md~HEAD +++ /dev/null @@ -1,14 +0,0 @@ -# readable-stream - -***Node-core streams for userland*** - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - -This package is a mirror of the Streams2 and Streams3 implementations in Node-core. - -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. - -**readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12. - -**readable-stream** uses proper patch-level versioning so if you pin to `"~1.0.0"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `"~1.1.0"` diff --git a/deps/npm/node_modules/readable-stream/duplex.js~8d21794... deps: upgrade npm to 3.6.0 b/deps/npm/node_modules/readable-stream/duplex.js~8d21794... deps: upgrade npm to 3.6.0 deleted file mode 100644 index ca807af87620dd..00000000000000 --- a/deps/npm/node_modules/readable-stream/duplex.js~8d21794... deps: upgrade npm to 3.6.0 +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/deps/npm/node_modules/readable-stream/duplex.js~HEAD b/deps/npm/node_modules/readable-stream/duplex.js~HEAD deleted file mode 100644 index ca807af87620dd..00000000000000 --- a/deps/npm/node_modules/readable-stream/duplex.js~HEAD +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_duplex.js~HEAD b/deps/npm/node_modules/readable-stream/lib/_stream_duplex.js~HEAD deleted file mode 100644 index b513d61a963a40..00000000000000 --- a/deps/npm/node_modules/readable-stream/lib/_stream_duplex.js~HEAD +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -module.exports = Duplex; - -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) keys.push(key); - return keys; -} -/**/ - - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -forEach(objectKeys(Writable.prototype), function(method) { - if (!Duplex.prototype[method]) - Duplex.prototype[method] = Writable.prototype[method]; -}); - -function Duplex(options) { - if (!(this instanceof Duplex)) - return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) - this.readable = false; - - if (options && options.writable === false) - this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) - this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) - return; - - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(this.end.bind(this)); -} - -function forEach (xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_passthrough.js~HEAD b/deps/npm/node_modules/readable-stream/lib/_stream_passthrough.js~HEAD deleted file mode 100644 index 895ca50a1d208a..00000000000000 --- a/deps/npm/node_modules/readable-stream/lib/_stream_passthrough.js~HEAD +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) - return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function(chunk, encoding, cb) { - cb(null, chunk); -}; diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_transform.js~HEAD b/deps/npm/node_modules/readable-stream/lib/_stream_transform.js~HEAD deleted file mode 100644 index eb188df3e86b41..00000000000000 --- a/deps/npm/node_modules/readable-stream/lib/_stream_transform.js~HEAD +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - - -function TransformState(options, stream) { - this.afterTransform = function(er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) - return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (data !== null && data !== undefined) - stream.push(data); - - if (cb) - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - - -function Transform(options) { - if (!(this instanceof Transform)) - return new Transform(options); - - Duplex.call(this, options); - - var ts = this._transformState = new TransformState(options, this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - this.once('finish', function() { - if ('function' === typeof this._flush) - this._flush(function(er) { - done(stream, er); - }); - else - done(stream); - }); -} - -Transform.prototype.push = function(chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function(chunk, encoding, cb) { - throw new Error('not implemented'); -}; - -Transform.prototype._write = function(chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || - rs.needReadable || - rs.length < rs.highWaterMark) - this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function(n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - - -function done(stream, er) { - if (er) - return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var rs = stream._readableState; - var ts = stream._transformState; - - if (ws.length) - throw new Error('calling transform done when ws.length != 0'); - - if (ts.transforming) - throw new Error('calling transform done when still transforming'); - - return stream.push(null); -} diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_writable.js~HEAD b/deps/npm/node_modules/readable-stream/lib/_stream_writable.js~HEAD deleted file mode 100644 index 4bdaa4fa49188d..00000000000000 --- a/deps/npm/node_modules/readable-stream/lib/_stream_writable.js~HEAD +++ /dev/null @@ -1,386 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, cb), and it'll handle all -// the drain event emission and buffering. - -module.exports = Writable; - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Writable.WritableState = WritableState; - - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Stream = require('stream'); - -util.inherits(Writable, Stream); - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; -} - -function WritableState(options, stream) { - options = options || {}; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function(er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.buffer = []; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; -} - -function Writable(options) { - var Duplex = require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof Duplex)) - return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function() { - this.emit('error', new Error('Cannot pipe. Not readable.')); -}; - - -function writeAfterEnd(stream, state, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); - valid = false; - } - return valid; -} - -Writable.prototype.write = function(chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - else if (!encoding) - encoding = state.defaultEncoding; - - if (typeof cb !== 'function') - cb = function() {}; - - if (state.ended) - writeAfterEnd(this, state, cb); - else if (validChunk(this, state, chunk, cb)) - ret = writeOrBuffer(this, state, chunk, encoding, cb); - - return ret; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && - state.decodeStrings !== false && - typeof chunk === 'string') { - chunk = new Buffer(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) - state.needDrain = true; - - if (state.writing) - state.buffer.push(new WriteReq(chunk, encoding, cb)); - else - doWrite(stream, state, len, chunk, encoding, cb); - - return ret; -} - -function doWrite(stream, state, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - if (sync) - process.nextTick(function() { - cb(er); - }); - else - cb(er); - - stream._writableState.errorEmitted = true; - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) - onwriteError(stream, state, sync, er, cb); - else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(stream, state); - - if (!finished && !state.bufferProcessing && state.buffer.length) - clearBuffer(stream, state); - - if (sync) { - process.nextTick(function() { - afterWrite(stream, state, finished, cb); - }); - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) - onwriteDrain(stream, state); - cb(); - if (finished) - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - - for (var c = 0; c < state.buffer.length; c++) { - var entry = state.buffer[c]; - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, len, chunk, encoding, cb); - - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - c++; - break; - } - } - - state.bufferProcessing = false; - if (c < state.buffer.length) - state.buffer = state.buffer.slice(c); - else - state.buffer.length = 0; -} - -Writable.prototype._write = function(chunk, encoding, cb) { - cb(new Error('not implemented')); -}; - -Writable.prototype.end = function(chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (typeof chunk !== 'undefined' && chunk !== null) - this.write(chunk, encoding); - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) - endWritable(this, state, cb); -}; - - -function needFinish(stream, state) { - return (state.ending && - state.length === 0 && - !state.finished && - !state.writing); -} - -function finishMaybe(stream, state) { - var need = needFinish(stream, state); - if (need) { - state.finished = true; - stream.emit('finish'); - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) - process.nextTick(cb); - else - stream.once('finish', cb); - } - state.ended = true; -} diff --git a/deps/npm/node_modules/readable-stream/node_modules/core-util-is/README.md~8d21794... deps: upgrade npm to 3.6.0 b/deps/npm/node_modules/readable-stream/node_modules/core-util-is/README.md~8d21794... deps: upgrade npm to 3.6.0 deleted file mode 100644 index 5a76b4149c5eb5..00000000000000 --- a/deps/npm/node_modules/readable-stream/node_modules/core-util-is/README.md~8d21794... deps: upgrade npm to 3.6.0 +++ /dev/null @@ -1,3 +0,0 @@ -# core-util-is - -The `util.is*` functions introduced in Node v0.12. diff --git a/deps/npm/node_modules/readable-stream/node_modules/core-util-is/README.md~HEAD b/deps/npm/node_modules/readable-stream/node_modules/core-util-is/README.md~HEAD deleted file mode 100644 index 5a76b4149c5eb5..00000000000000 --- a/deps/npm/node_modules/readable-stream/node_modules/core-util-is/README.md~HEAD +++ /dev/null @@ -1,3 +0,0 @@ -# core-util-is - -The `util.is*` functions introduced in Node v0.12. diff --git a/deps/npm/node_modules/readable-stream/node_modules/core-util-is/float.patch~8d21794... deps: upgrade npm to 3.6.0 b/deps/npm/node_modules/readable-stream/node_modules/core-util-is/float.patch~8d21794... deps: upgrade npm to 3.6.0 deleted file mode 100644 index a06d5c05f75fd5..00000000000000 --- a/deps/npm/node_modules/readable-stream/node_modules/core-util-is/float.patch~8d21794... deps: upgrade npm to 3.6.0 +++ /dev/null @@ -1,604 +0,0 @@ -diff --git a/lib/util.js b/lib/util.js -index a03e874..9074e8e 100644 ---- a/lib/util.js -+++ b/lib/util.js -@@ -19,430 +19,6 @@ - // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - // USE OR OTHER DEALINGS IN THE SOFTWARE. - --var formatRegExp = /%[sdj%]/g; --exports.format = function(f) { -- if (!isString(f)) { -- var objects = []; -- for (var i = 0; i < arguments.length; i++) { -- objects.push(inspect(arguments[i])); -- } -- return objects.join(' '); -- } -- -- var i = 1; -- var args = arguments; -- var len = args.length; -- var str = String(f).replace(formatRegExp, function(x) { -- if (x === '%%') return '%'; -- if (i >= len) return x; -- switch (x) { -- case '%s': return String(args[i++]); -- case '%d': return Number(args[i++]); -- case '%j': -- try { -- return JSON.stringify(args[i++]); -- } catch (_) { -- return '[Circular]'; -- } -- default: -- return x; -- } -- }); -- for (var x = args[i]; i < len; x = args[++i]) { -- if (isNull(x) || !isObject(x)) { -- str += ' ' + x; -- } else { -- str += ' ' + inspect(x); -- } -- } -- return str; --}; -- -- --// Mark that a method should not be used. --// Returns a modified function which warns once by default. --// If --no-deprecation is set, then it is a no-op. --exports.deprecate = function(fn, msg) { -- // Allow for deprecating things in the process of starting up. -- if (isUndefined(global.process)) { -- return function() { -- return exports.deprecate(fn, msg).apply(this, arguments); -- }; -- } -- -- if (process.noDeprecation === true) { -- return fn; -- } -- -- var warned = false; -- function deprecated() { -- if (!warned) { -- if (process.throwDeprecation) { -- throw new Error(msg); -- } else if (process.traceDeprecation) { -- console.trace(msg); -- } else { -- console.error(msg); -- } -- warned = true; -- } -- return fn.apply(this, arguments); -- } -- -- return deprecated; --}; -- -- --var debugs = {}; --var debugEnviron; --exports.debuglog = function(set) { -- if (isUndefined(debugEnviron)) -- debugEnviron = process.env.NODE_DEBUG || ''; -- set = set.toUpperCase(); -- if (!debugs[set]) { -- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { -- var pid = process.pid; -- debugs[set] = function() { -- var msg = exports.format.apply(exports, arguments); -- console.error('%s %d: %s', set, pid, msg); -- }; -- } else { -- debugs[set] = function() {}; -- } -- } -- return debugs[set]; --}; -- -- --/** -- * Echos the value of a value. Trys to print the value out -- * in the best way possible given the different types. -- * -- * @param {Object} obj The object to print out. -- * @param {Object} opts Optional options object that alters the output. -- */ --/* legacy: obj, showHidden, depth, colors*/ --function inspect(obj, opts) { -- // default options -- var ctx = { -- seen: [], -- stylize: stylizeNoColor -- }; -- // legacy... -- if (arguments.length >= 3) ctx.depth = arguments[2]; -- if (arguments.length >= 4) ctx.colors = arguments[3]; -- if (isBoolean(opts)) { -- // legacy... -- ctx.showHidden = opts; -- } else if (opts) { -- // got an "options" object -- exports._extend(ctx, opts); -- } -- // set default options -- if (isUndefined(ctx.showHidden)) ctx.showHidden = false; -- if (isUndefined(ctx.depth)) ctx.depth = 2; -- if (isUndefined(ctx.colors)) ctx.colors = false; -- if (isUndefined(ctx.customInspect)) ctx.customInspect = true; -- if (ctx.colors) ctx.stylize = stylizeWithColor; -- return formatValue(ctx, obj, ctx.depth); --} --exports.inspect = inspect; -- -- --// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics --inspect.colors = { -- 'bold' : [1, 22], -- 'italic' : [3, 23], -- 'underline' : [4, 24], -- 'inverse' : [7, 27], -- 'white' : [37, 39], -- 'grey' : [90, 39], -- 'black' : [30, 39], -- 'blue' : [34, 39], -- 'cyan' : [36, 39], -- 'green' : [32, 39], -- 'magenta' : [35, 39], -- 'red' : [31, 39], -- 'yellow' : [33, 39] --}; -- --// Don't use 'blue' not visible on cmd.exe --inspect.styles = { -- 'special': 'cyan', -- 'number': 'yellow', -- 'boolean': 'yellow', -- 'undefined': 'grey', -- 'null': 'bold', -- 'string': 'green', -- 'date': 'magenta', -- // "name": intentionally not styling -- 'regexp': 'red' --}; -- -- --function stylizeWithColor(str, styleType) { -- var style = inspect.styles[styleType]; -- -- if (style) { -- return '\u001b[' + inspect.colors[style][0] + 'm' + str + -- '\u001b[' + inspect.colors[style][1] + 'm'; -- } else { -- return str; -- } --} -- -- --function stylizeNoColor(str, styleType) { -- return str; --} -- -- --function arrayToHash(array) { -- var hash = {}; -- -- array.forEach(function(val, idx) { -- hash[val] = true; -- }); -- -- return hash; --} -- -- --function formatValue(ctx, value, recurseTimes) { -- // Provide a hook for user-specified inspect functions. -- // Check that value is an object with an inspect function on it -- if (ctx.customInspect && -- value && -- isFunction(value.inspect) && -- // Filter out the util module, it's inspect function is special -- value.inspect !== exports.inspect && -- // Also filter out any prototype objects using the circular check. -- !(value.constructor && value.constructor.prototype === value)) { -- var ret = value.inspect(recurseTimes, ctx); -- if (!isString(ret)) { -- ret = formatValue(ctx, ret, recurseTimes); -- } -- return ret; -- } -- -- // Primitive types cannot have properties -- var primitive = formatPrimitive(ctx, value); -- if (primitive) { -- return primitive; -- } -- -- // Look up the keys of the object. -- var keys = Object.keys(value); -- var visibleKeys = arrayToHash(keys); -- -- if (ctx.showHidden) { -- keys = Object.getOwnPropertyNames(value); -- } -- -- // Some type of object without properties can be shortcutted. -- if (keys.length === 0) { -- if (isFunction(value)) { -- var name = value.name ? ': ' + value.name : ''; -- return ctx.stylize('[Function' + name + ']', 'special'); -- } -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } -- if (isDate(value)) { -- return ctx.stylize(Date.prototype.toString.call(value), 'date'); -- } -- if (isError(value)) { -- return formatError(value); -- } -- } -- -- var base = '', array = false, braces = ['{', '}']; -- -- // Make Array say that they are Array -- if (isArray(value)) { -- array = true; -- braces = ['[', ']']; -- } -- -- // Make functions say that they are functions -- if (isFunction(value)) { -- var n = value.name ? ': ' + value.name : ''; -- base = ' [Function' + n + ']'; -- } -- -- // Make RegExps say that they are RegExps -- if (isRegExp(value)) { -- base = ' ' + RegExp.prototype.toString.call(value); -- } -- -- // Make dates with properties first say the date -- if (isDate(value)) { -- base = ' ' + Date.prototype.toUTCString.call(value); -- } -- -- // Make error with message first say the error -- if (isError(value)) { -- base = ' ' + formatError(value); -- } -- -- if (keys.length === 0 && (!array || value.length == 0)) { -- return braces[0] + base + braces[1]; -- } -- -- if (recurseTimes < 0) { -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } else { -- return ctx.stylize('[Object]', 'special'); -- } -- } -- -- ctx.seen.push(value); -- -- var output; -- if (array) { -- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); -- } else { -- output = keys.map(function(key) { -- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); -- }); -- } -- -- ctx.seen.pop(); -- -- return reduceToSingleString(output, base, braces); --} -- -- --function formatPrimitive(ctx, value) { -- if (isUndefined(value)) -- return ctx.stylize('undefined', 'undefined'); -- if (isString(value)) { -- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') -- .replace(/'/g, "\\'") -- .replace(/\\"/g, '"') + '\''; -- return ctx.stylize(simple, 'string'); -- } -- if (isNumber(value)) { -- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, -- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . -- if (value === 0 && 1 / value < 0) -- return ctx.stylize('-0', 'number'); -- return ctx.stylize('' + value, 'number'); -- } -- if (isBoolean(value)) -- return ctx.stylize('' + value, 'boolean'); -- // For some reason typeof null is "object", so special case here. -- if (isNull(value)) -- return ctx.stylize('null', 'null'); --} -- -- --function formatError(value) { -- return '[' + Error.prototype.toString.call(value) + ']'; --} -- -- --function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { -- var output = []; -- for (var i = 0, l = value.length; i < l; ++i) { -- if (hasOwnProperty(value, String(i))) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- String(i), true)); -- } else { -- output.push(''); -- } -- } -- keys.forEach(function(key) { -- if (!key.match(/^\d+$/)) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- key, true)); -- } -- }); -- return output; --} -- -- --function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { -- var name, str, desc; -- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; -- if (desc.get) { -- if (desc.set) { -- str = ctx.stylize('[Getter/Setter]', 'special'); -- } else { -- str = ctx.stylize('[Getter]', 'special'); -- } -- } else { -- if (desc.set) { -- str = ctx.stylize('[Setter]', 'special'); -- } -- } -- if (!hasOwnProperty(visibleKeys, key)) { -- name = '[' + key + ']'; -- } -- if (!str) { -- if (ctx.seen.indexOf(desc.value) < 0) { -- if (isNull(recurseTimes)) { -- str = formatValue(ctx, desc.value, null); -- } else { -- str = formatValue(ctx, desc.value, recurseTimes - 1); -- } -- if (str.indexOf('\n') > -1) { -- if (array) { -- str = str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n').substr(2); -- } else { -- str = '\n' + str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n'); -- } -- } -- } else { -- str = ctx.stylize('[Circular]', 'special'); -- } -- } -- if (isUndefined(name)) { -- if (array && key.match(/^\d+$/)) { -- return str; -- } -- name = JSON.stringify('' + key); -- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { -- name = name.substr(1, name.length - 2); -- name = ctx.stylize(name, 'name'); -- } else { -- name = name.replace(/'/g, "\\'") -- .replace(/\\"/g, '"') -- .replace(/(^"|"$)/g, "'"); -- name = ctx.stylize(name, 'string'); -- } -- } -- -- return name + ': ' + str; --} -- -- --function reduceToSingleString(output, base, braces) { -- var numLinesEst = 0; -- var length = output.reduce(function(prev, cur) { -- numLinesEst++; -- if (cur.indexOf('\n') >= 0) numLinesEst++; -- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; -- }, 0); -- -- if (length > 60) { -- return braces[0] + -- (base === '' ? '' : base + '\n ') + -- ' ' + -- output.join(',\n ') + -- ' ' + -- braces[1]; -- } -- -- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; --} -- -- - // NOTE: These type checking functions intentionally don't use `instanceof` - // because it is fragile and can be easily faked with `Object.create()`. - function isArray(ar) { -@@ -522,166 +98,10 @@ function isPrimitive(arg) { - exports.isPrimitive = isPrimitive; - - function isBuffer(arg) { -- return arg instanceof Buffer; -+ return Buffer.isBuffer(arg); - } - exports.isBuffer = isBuffer; - - function objectToString(o) { - return Object.prototype.toString.call(o); --} -- -- --function pad(n) { -- return n < 10 ? '0' + n.toString(10) : n.toString(10); --} -- -- --var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', -- 'Oct', 'Nov', 'Dec']; -- --// 26 Feb 16:19:34 --function timestamp() { -- var d = new Date(); -- var time = [pad(d.getHours()), -- pad(d.getMinutes()), -- pad(d.getSeconds())].join(':'); -- return [d.getDate(), months[d.getMonth()], time].join(' '); --} -- -- --// log is just a thin wrapper to console.log that prepends a timestamp --exports.log = function() { -- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); --}; -- -- --/** -- * Inherit the prototype methods from one constructor into another. -- * -- * The Function.prototype.inherits from lang.js rewritten as a standalone -- * function (not on Function.prototype). NOTE: If this file is to be loaded -- * during bootstrapping this function needs to be rewritten using some native -- * functions as prototype setup using normal JavaScript does not work as -- * expected during bootstrapping (see mirror.js in r114903). -- * -- * @param {function} ctor Constructor function which needs to inherit the -- * prototype. -- * @param {function} superCtor Constructor function to inherit prototype from. -- */ --exports.inherits = function(ctor, superCtor) { -- ctor.super_ = superCtor; -- ctor.prototype = Object.create(superCtor.prototype, { -- constructor: { -- value: ctor, -- enumerable: false, -- writable: true, -- configurable: true -- } -- }); --}; -- --exports._extend = function(origin, add) { -- // Don't do anything if add isn't an object -- if (!add || !isObject(add)) return origin; -- -- var keys = Object.keys(add); -- var i = keys.length; -- while (i--) { -- origin[keys[i]] = add[keys[i]]; -- } -- return origin; --}; -- --function hasOwnProperty(obj, prop) { -- return Object.prototype.hasOwnProperty.call(obj, prop); --} -- -- --// Deprecated old stuff. -- --exports.p = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- console.error(exports.inspect(arguments[i])); -- } --}, 'util.p: Use console.error() instead'); -- -- --exports.exec = exports.deprecate(function() { -- return require('child_process').exec.apply(this, arguments); --}, 'util.exec is now called `child_process.exec`.'); -- -- --exports.print = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(String(arguments[i])); -- } --}, 'util.print: Use console.log instead'); -- -- --exports.puts = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(arguments[i] + '\n'); -- } --}, 'util.puts: Use console.log instead'); -- -- --exports.debug = exports.deprecate(function(x) { -- process.stderr.write('DEBUG: ' + x + '\n'); --}, 'util.debug: Use console.error instead'); -- -- --exports.error = exports.deprecate(function(x) { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stderr.write(arguments[i] + '\n'); -- } --}, 'util.error: Use console.error instead'); -- -- --exports.pump = exports.deprecate(function(readStream, writeStream, callback) { -- var callbackCalled = false; -- -- function call(a, b, c) { -- if (callback && !callbackCalled) { -- callback(a, b, c); -- callbackCalled = true; -- } -- } -- -- readStream.addListener('data', function(chunk) { -- if (writeStream.write(chunk) === false) readStream.pause(); -- }); -- -- writeStream.addListener('drain', function() { -- readStream.resume(); -- }); -- -- readStream.addListener('end', function() { -- writeStream.end(); -- }); -- -- readStream.addListener('close', function() { -- call(); -- }); -- -- readStream.addListener('error', function(err) { -- writeStream.end(); -- call(err); -- }); -- -- writeStream.addListener('error', function(err) { -- readStream.destroy(); -- call(err); -- }); --}, 'util.pump(): Use readableStream.pipe() instead'); -- -- --var uv; --exports._errnoException = function(err, syscall) { -- if (isUndefined(uv)) uv = process.binding('uv'); -- var errname = uv.errname(err); -- var e = new Error(syscall + ' ' + errname); -- e.code = errname; -- e.errno = errname; -- e.syscall = syscall; -- return e; --}; -+} \ No newline at end of file diff --git a/deps/npm/node_modules/readable-stream/node_modules/core-util-is/float.patch~HEAD b/deps/npm/node_modules/readable-stream/node_modules/core-util-is/float.patch~HEAD deleted file mode 100644 index a06d5c05f75fd5..00000000000000 --- a/deps/npm/node_modules/readable-stream/node_modules/core-util-is/float.patch~HEAD +++ /dev/null @@ -1,604 +0,0 @@ -diff --git a/lib/util.js b/lib/util.js -index a03e874..9074e8e 100644 ---- a/lib/util.js -+++ b/lib/util.js -@@ -19,430 +19,6 @@ - // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - // USE OR OTHER DEALINGS IN THE SOFTWARE. - --var formatRegExp = /%[sdj%]/g; --exports.format = function(f) { -- if (!isString(f)) { -- var objects = []; -- for (var i = 0; i < arguments.length; i++) { -- objects.push(inspect(arguments[i])); -- } -- return objects.join(' '); -- } -- -- var i = 1; -- var args = arguments; -- var len = args.length; -- var str = String(f).replace(formatRegExp, function(x) { -- if (x === '%%') return '%'; -- if (i >= len) return x; -- switch (x) { -- case '%s': return String(args[i++]); -- case '%d': return Number(args[i++]); -- case '%j': -- try { -- return JSON.stringify(args[i++]); -- } catch (_) { -- return '[Circular]'; -- } -- default: -- return x; -- } -- }); -- for (var x = args[i]; i < len; x = args[++i]) { -- if (isNull(x) || !isObject(x)) { -- str += ' ' + x; -- } else { -- str += ' ' + inspect(x); -- } -- } -- return str; --}; -- -- --// Mark that a method should not be used. --// Returns a modified function which warns once by default. --// If --no-deprecation is set, then it is a no-op. --exports.deprecate = function(fn, msg) { -- // Allow for deprecating things in the process of starting up. -- if (isUndefined(global.process)) { -- return function() { -- return exports.deprecate(fn, msg).apply(this, arguments); -- }; -- } -- -- if (process.noDeprecation === true) { -- return fn; -- } -- -- var warned = false; -- function deprecated() { -- if (!warned) { -- if (process.throwDeprecation) { -- throw new Error(msg); -- } else if (process.traceDeprecation) { -- console.trace(msg); -- } else { -- console.error(msg); -- } -- warned = true; -- } -- return fn.apply(this, arguments); -- } -- -- return deprecated; --}; -- -- --var debugs = {}; --var debugEnviron; --exports.debuglog = function(set) { -- if (isUndefined(debugEnviron)) -- debugEnviron = process.env.NODE_DEBUG || ''; -- set = set.toUpperCase(); -- if (!debugs[set]) { -- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { -- var pid = process.pid; -- debugs[set] = function() { -- var msg = exports.format.apply(exports, arguments); -- console.error('%s %d: %s', set, pid, msg); -- }; -- } else { -- debugs[set] = function() {}; -- } -- } -- return debugs[set]; --}; -- -- --/** -- * Echos the value of a value. Trys to print the value out -- * in the best way possible given the different types. -- * -- * @param {Object} obj The object to print out. -- * @param {Object} opts Optional options object that alters the output. -- */ --/* legacy: obj, showHidden, depth, colors*/ --function inspect(obj, opts) { -- // default options -- var ctx = { -- seen: [], -- stylize: stylizeNoColor -- }; -- // legacy... -- if (arguments.length >= 3) ctx.depth = arguments[2]; -- if (arguments.length >= 4) ctx.colors = arguments[3]; -- if (isBoolean(opts)) { -- // legacy... -- ctx.showHidden = opts; -- } else if (opts) { -- // got an "options" object -- exports._extend(ctx, opts); -- } -- // set default options -- if (isUndefined(ctx.showHidden)) ctx.showHidden = false; -- if (isUndefined(ctx.depth)) ctx.depth = 2; -- if (isUndefined(ctx.colors)) ctx.colors = false; -- if (isUndefined(ctx.customInspect)) ctx.customInspect = true; -- if (ctx.colors) ctx.stylize = stylizeWithColor; -- return formatValue(ctx, obj, ctx.depth); --} --exports.inspect = inspect; -- -- --// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics --inspect.colors = { -- 'bold' : [1, 22], -- 'italic' : [3, 23], -- 'underline' : [4, 24], -- 'inverse' : [7, 27], -- 'white' : [37, 39], -- 'grey' : [90, 39], -- 'black' : [30, 39], -- 'blue' : [34, 39], -- 'cyan' : [36, 39], -- 'green' : [32, 39], -- 'magenta' : [35, 39], -- 'red' : [31, 39], -- 'yellow' : [33, 39] --}; -- --// Don't use 'blue' not visible on cmd.exe --inspect.styles = { -- 'special': 'cyan', -- 'number': 'yellow', -- 'boolean': 'yellow', -- 'undefined': 'grey', -- 'null': 'bold', -- 'string': 'green', -- 'date': 'magenta', -- // "name": intentionally not styling -- 'regexp': 'red' --}; -- -- --function stylizeWithColor(str, styleType) { -- var style = inspect.styles[styleType]; -- -- if (style) { -- return '\u001b[' + inspect.colors[style][0] + 'm' + str + -- '\u001b[' + inspect.colors[style][1] + 'm'; -- } else { -- return str; -- } --} -- -- --function stylizeNoColor(str, styleType) { -- return str; --} -- -- --function arrayToHash(array) { -- var hash = {}; -- -- array.forEach(function(val, idx) { -- hash[val] = true; -- }); -- -- return hash; --} -- -- --function formatValue(ctx, value, recurseTimes) { -- // Provide a hook for user-specified inspect functions. -- // Check that value is an object with an inspect function on it -- if (ctx.customInspect && -- value && -- isFunction(value.inspect) && -- // Filter out the util module, it's inspect function is special -- value.inspect !== exports.inspect && -- // Also filter out any prototype objects using the circular check. -- !(value.constructor && value.constructor.prototype === value)) { -- var ret = value.inspect(recurseTimes, ctx); -- if (!isString(ret)) { -- ret = formatValue(ctx, ret, recurseTimes); -- } -- return ret; -- } -- -- // Primitive types cannot have properties -- var primitive = formatPrimitive(ctx, value); -- if (primitive) { -- return primitive; -- } -- -- // Look up the keys of the object. -- var keys = Object.keys(value); -- var visibleKeys = arrayToHash(keys); -- -- if (ctx.showHidden) { -- keys = Object.getOwnPropertyNames(value); -- } -- -- // Some type of object without properties can be shortcutted. -- if (keys.length === 0) { -- if (isFunction(value)) { -- var name = value.name ? ': ' + value.name : ''; -- return ctx.stylize('[Function' + name + ']', 'special'); -- } -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } -- if (isDate(value)) { -- return ctx.stylize(Date.prototype.toString.call(value), 'date'); -- } -- if (isError(value)) { -- return formatError(value); -- } -- } -- -- var base = '', array = false, braces = ['{', '}']; -- -- // Make Array say that they are Array -- if (isArray(value)) { -- array = true; -- braces = ['[', ']']; -- } -- -- // Make functions say that they are functions -- if (isFunction(value)) { -- var n = value.name ? ': ' + value.name : ''; -- base = ' [Function' + n + ']'; -- } -- -- // Make RegExps say that they are RegExps -- if (isRegExp(value)) { -- base = ' ' + RegExp.prototype.toString.call(value); -- } -- -- // Make dates with properties first say the date -- if (isDate(value)) { -- base = ' ' + Date.prototype.toUTCString.call(value); -- } -- -- // Make error with message first say the error -- if (isError(value)) { -- base = ' ' + formatError(value); -- } -- -- if (keys.length === 0 && (!array || value.length == 0)) { -- return braces[0] + base + braces[1]; -- } -- -- if (recurseTimes < 0) { -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } else { -- return ctx.stylize('[Object]', 'special'); -- } -- } -- -- ctx.seen.push(value); -- -- var output; -- if (array) { -- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); -- } else { -- output = keys.map(function(key) { -- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); -- }); -- } -- -- ctx.seen.pop(); -- -- return reduceToSingleString(output, base, braces); --} -- -- --function formatPrimitive(ctx, value) { -- if (isUndefined(value)) -- return ctx.stylize('undefined', 'undefined'); -- if (isString(value)) { -- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') -- .replace(/'/g, "\\'") -- .replace(/\\"/g, '"') + '\''; -- return ctx.stylize(simple, 'string'); -- } -- if (isNumber(value)) { -- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, -- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . -- if (value === 0 && 1 / value < 0) -- return ctx.stylize('-0', 'number'); -- return ctx.stylize('' + value, 'number'); -- } -- if (isBoolean(value)) -- return ctx.stylize('' + value, 'boolean'); -- // For some reason typeof null is "object", so special case here. -- if (isNull(value)) -- return ctx.stylize('null', 'null'); --} -- -- --function formatError(value) { -- return '[' + Error.prototype.toString.call(value) + ']'; --} -- -- --function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { -- var output = []; -- for (var i = 0, l = value.length; i < l; ++i) { -- if (hasOwnProperty(value, String(i))) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- String(i), true)); -- } else { -- output.push(''); -- } -- } -- keys.forEach(function(key) { -- if (!key.match(/^\d+$/)) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- key, true)); -- } -- }); -- return output; --} -- -- --function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { -- var name, str, desc; -- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; -- if (desc.get) { -- if (desc.set) { -- str = ctx.stylize('[Getter/Setter]', 'special'); -- } else { -- str = ctx.stylize('[Getter]', 'special'); -- } -- } else { -- if (desc.set) { -- str = ctx.stylize('[Setter]', 'special'); -- } -- } -- if (!hasOwnProperty(visibleKeys, key)) { -- name = '[' + key + ']'; -- } -- if (!str) { -- if (ctx.seen.indexOf(desc.value) < 0) { -- if (isNull(recurseTimes)) { -- str = formatValue(ctx, desc.value, null); -- } else { -- str = formatValue(ctx, desc.value, recurseTimes - 1); -- } -- if (str.indexOf('\n') > -1) { -- if (array) { -- str = str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n').substr(2); -- } else { -- str = '\n' + str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n'); -- } -- } -- } else { -- str = ctx.stylize('[Circular]', 'special'); -- } -- } -- if (isUndefined(name)) { -- if (array && key.match(/^\d+$/)) { -- return str; -- } -- name = JSON.stringify('' + key); -- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { -- name = name.substr(1, name.length - 2); -- name = ctx.stylize(name, 'name'); -- } else { -- name = name.replace(/'/g, "\\'") -- .replace(/\\"/g, '"') -- .replace(/(^"|"$)/g, "'"); -- name = ctx.stylize(name, 'string'); -- } -- } -- -- return name + ': ' + str; --} -- -- --function reduceToSingleString(output, base, braces) { -- var numLinesEst = 0; -- var length = output.reduce(function(prev, cur) { -- numLinesEst++; -- if (cur.indexOf('\n') >= 0) numLinesEst++; -- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; -- }, 0); -- -- if (length > 60) { -- return braces[0] + -- (base === '' ? '' : base + '\n ') + -- ' ' + -- output.join(',\n ') + -- ' ' + -- braces[1]; -- } -- -- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; --} -- -- - // NOTE: These type checking functions intentionally don't use `instanceof` - // because it is fragile and can be easily faked with `Object.create()`. - function isArray(ar) { -@@ -522,166 +98,10 @@ function isPrimitive(arg) { - exports.isPrimitive = isPrimitive; - - function isBuffer(arg) { -- return arg instanceof Buffer; -+ return Buffer.isBuffer(arg); - } - exports.isBuffer = isBuffer; - - function objectToString(o) { - return Object.prototype.toString.call(o); --} -- -- --function pad(n) { -- return n < 10 ? '0' + n.toString(10) : n.toString(10); --} -- -- --var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', -- 'Oct', 'Nov', 'Dec']; -- --// 26 Feb 16:19:34 --function timestamp() { -- var d = new Date(); -- var time = [pad(d.getHours()), -- pad(d.getMinutes()), -- pad(d.getSeconds())].join(':'); -- return [d.getDate(), months[d.getMonth()], time].join(' '); --} -- -- --// log is just a thin wrapper to console.log that prepends a timestamp --exports.log = function() { -- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); --}; -- -- --/** -- * Inherit the prototype methods from one constructor into another. -- * -- * The Function.prototype.inherits from lang.js rewritten as a standalone -- * function (not on Function.prototype). NOTE: If this file is to be loaded -- * during bootstrapping this function needs to be rewritten using some native -- * functions as prototype setup using normal JavaScript does not work as -- * expected during bootstrapping (see mirror.js in r114903). -- * -- * @param {function} ctor Constructor function which needs to inherit the -- * prototype. -- * @param {function} superCtor Constructor function to inherit prototype from. -- */ --exports.inherits = function(ctor, superCtor) { -- ctor.super_ = superCtor; -- ctor.prototype = Object.create(superCtor.prototype, { -- constructor: { -- value: ctor, -- enumerable: false, -- writable: true, -- configurable: true -- } -- }); --}; -- --exports._extend = function(origin, add) { -- // Don't do anything if add isn't an object -- if (!add || !isObject(add)) return origin; -- -- var keys = Object.keys(add); -- var i = keys.length; -- while (i--) { -- origin[keys[i]] = add[keys[i]]; -- } -- return origin; --}; -- --function hasOwnProperty(obj, prop) { -- return Object.prototype.hasOwnProperty.call(obj, prop); --} -- -- --// Deprecated old stuff. -- --exports.p = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- console.error(exports.inspect(arguments[i])); -- } --}, 'util.p: Use console.error() instead'); -- -- --exports.exec = exports.deprecate(function() { -- return require('child_process').exec.apply(this, arguments); --}, 'util.exec is now called `child_process.exec`.'); -- -- --exports.print = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(String(arguments[i])); -- } --}, 'util.print: Use console.log instead'); -- -- --exports.puts = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(arguments[i] + '\n'); -- } --}, 'util.puts: Use console.log instead'); -- -- --exports.debug = exports.deprecate(function(x) { -- process.stderr.write('DEBUG: ' + x + '\n'); --}, 'util.debug: Use console.error instead'); -- -- --exports.error = exports.deprecate(function(x) { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stderr.write(arguments[i] + '\n'); -- } --}, 'util.error: Use console.error instead'); -- -- --exports.pump = exports.deprecate(function(readStream, writeStream, callback) { -- var callbackCalled = false; -- -- function call(a, b, c) { -- if (callback && !callbackCalled) { -- callback(a, b, c); -- callbackCalled = true; -- } -- } -- -- readStream.addListener('data', function(chunk) { -- if (writeStream.write(chunk) === false) readStream.pause(); -- }); -- -- writeStream.addListener('drain', function() { -- readStream.resume(); -- }); -- -- readStream.addListener('end', function() { -- writeStream.end(); -- }); -- -- readStream.addListener('close', function() { -- call(); -- }); -- -- readStream.addListener('error', function(err) { -- writeStream.end(); -- call(err); -- }); -- -- writeStream.addListener('error', function(err) { -- readStream.destroy(); -- call(err); -- }); --}, 'util.pump(): Use readableStream.pipe() instead'); -- -- --var uv; --exports._errnoException = function(err, syscall) { -- if (isUndefined(uv)) uv = process.binding('uv'); -- var errname = uv.errname(err); -- var e = new Error(syscall + ' ' + errname); -- e.code = errname; -- e.errno = errname; -- e.syscall = syscall; -- return e; --}; -+} \ No newline at end of file diff --git a/deps/npm/node_modules/readable-stream/node_modules/core-util-is/lib/util.js~8d21794... deps: upgrade npm to 3.6.0 b/deps/npm/node_modules/readable-stream/node_modules/core-util-is/lib/util.js~8d21794... deps: upgrade npm to 3.6.0 deleted file mode 100644 index ff4c851c075a2f..00000000000000 --- a/deps/npm/node_modules/readable-stream/node_modules/core-util-is/lib/util.js~8d21794... deps: upgrade npm to 3.6.0 +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. - -function isArray(arg) { - if (Array.isArray) { - return Array.isArray(arg); - } - return objectToString(arg) === '[object Array]'; -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = Buffer.isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} diff --git a/deps/npm/node_modules/readable-stream/node_modules/core-util-is/lib/util.js~HEAD b/deps/npm/node_modules/readable-stream/node_modules/core-util-is/lib/util.js~HEAD deleted file mode 100644 index 9074e8ebcb61e9..00000000000000 --- a/deps/npm/node_modules/readable-stream/node_modules/core-util-is/lib/util.js~HEAD +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. -function isArray(ar) { - return Array.isArray(ar); -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return isObject(e) && - (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -function isBuffer(arg) { - return Buffer.isBuffer(arg); -} -exports.isBuffer = isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} \ No newline at end of file diff --git a/deps/npm/node_modules/readable-stream/node_modules/isarray/README.md~HEAD b/deps/npm/node_modules/readable-stream/node_modules/isarray/README.md~HEAD deleted file mode 100644 index 052a62b8d7b7ae..00000000000000 --- a/deps/npm/node_modules/readable-stream/node_modules/isarray/README.md~HEAD +++ /dev/null @@ -1,54 +0,0 @@ - -# isarray - -`Array#isArray` for older browsers. - -## Usage - -```js -var isArray = require('isarray'); - -console.log(isArray([])); // => true -console.log(isArray({})); // => false -``` - -## Installation - -With [npm](http://npmjs.org) do - -```bash -$ npm install isarray -``` - -Then bundle for the browser with -[browserify](https://github.com/substack/browserify). - -With [component](http://component.io) do - -```bash -$ component install juliangruber/isarray -``` - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -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/isarray/component.json~8d21794... deps: upgrade npm to 3.6.0 b/deps/npm/node_modules/readable-stream/node_modules/isarray/component.json~8d21794... deps: upgrade npm to 3.6.0 deleted file mode 100644 index 9e31b683889015..00000000000000 --- a/deps/npm/node_modules/readable-stream/node_modules/isarray/component.json~8d21794... deps: upgrade npm to 3.6.0 +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name" : "isarray", - "description" : "Array#isArray for older browsers", - "version" : "0.0.1", - "repository" : "juliangruber/isarray", - "homepage": "https://github.com/juliangruber/isarray", - "main" : "index.js", - "scripts" : [ - "index.js" - ], - "dependencies" : {}, - "keywords": ["browser","isarray","array"], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT" -} diff --git a/deps/npm/node_modules/readable-stream/node_modules/isarray/component.json~HEAD b/deps/npm/node_modules/readable-stream/node_modules/isarray/component.json~HEAD deleted file mode 100644 index 9e31b683889015..00000000000000 --- a/deps/npm/node_modules/readable-stream/node_modules/isarray/component.json~HEAD +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name" : "isarray", - "description" : "Array#isArray for older browsers", - "version" : "0.0.1", - "repository" : "juliangruber/isarray", - "homepage": "https://github.com/juliangruber/isarray", - "main" : "index.js", - "scripts" : [ - "index.js" - ], - "dependencies" : {}, - "keywords": ["browser","isarray","array"], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT" -} diff --git a/deps/npm/node_modules/readable-stream/node_modules/isarray/index.js~8d21794... deps: upgrade npm to 3.6.0 b/deps/npm/node_modules/readable-stream/node_modules/isarray/index.js~8d21794... deps: upgrade npm to 3.6.0 deleted file mode 100644 index 5f5ad45d46dda9..00000000000000 --- a/deps/npm/node_modules/readable-stream/node_modules/isarray/index.js~8d21794... deps: upgrade npm to 3.6.0 +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = Array.isArray || function (arr) { - return Object.prototype.toString.call(arr) == '[object Array]'; -}; diff --git a/deps/npm/node_modules/readable-stream/node_modules/isarray/index.js~HEAD b/deps/npm/node_modules/readable-stream/node_modules/isarray/index.js~HEAD deleted file mode 100644 index 5f5ad45d46dda9..00000000000000 --- a/deps/npm/node_modules/readable-stream/node_modules/isarray/index.js~HEAD +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = Array.isArray || function (arr) { - return Object.prototype.toString.call(arr) == '[object Array]'; -}; diff --git a/deps/npm/node_modules/readable-stream/node_modules/string_decoder/.npmignore~8d21794... deps: upgrade npm to 3.6.0 b/deps/npm/node_modules/readable-stream/node_modules/string_decoder/.npmignore~8d21794... deps: upgrade npm to 3.6.0 deleted file mode 100644 index 206320cc1d21b9..00000000000000 --- a/deps/npm/node_modules/readable-stream/node_modules/string_decoder/.npmignore~8d21794... deps: upgrade npm to 3.6.0 +++ /dev/null @@ -1,2 +0,0 @@ -build -test diff --git a/deps/npm/node_modules/readable-stream/node_modules/string_decoder/.npmignore~HEAD b/deps/npm/node_modules/readable-stream/node_modules/string_decoder/.npmignore~HEAD deleted file mode 100644 index 206320cc1d21b9..00000000000000 --- a/deps/npm/node_modules/readable-stream/node_modules/string_decoder/.npmignore~HEAD +++ /dev/null @@ -1,2 +0,0 @@ -build -test diff --git a/deps/npm/node_modules/readable-stream/node_modules/string_decoder/LICENSE~8d21794... deps: upgrade npm to 3.6.0 b/deps/npm/node_modules/readable-stream/node_modules/string_decoder/LICENSE~8d21794... deps: upgrade npm to 3.6.0 deleted file mode 100644 index 6de584a48f5c89..00000000000000 --- a/deps/npm/node_modules/readable-stream/node_modules/string_decoder/LICENSE~8d21794... deps: upgrade npm to 3.6.0 +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. - -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/string_decoder/LICENSE~HEAD b/deps/npm/node_modules/readable-stream/node_modules/string_decoder/LICENSE~HEAD deleted file mode 100644 index 6de584a48f5c89..00000000000000 --- a/deps/npm/node_modules/readable-stream/node_modules/string_decoder/LICENSE~HEAD +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. - -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/string_decoder/README.md~8d21794... deps: upgrade npm to 3.6.0 b/deps/npm/node_modules/readable-stream/node_modules/string_decoder/README.md~8d21794... deps: upgrade npm to 3.6.0 deleted file mode 100644 index 4d2aa001501107..00000000000000 --- a/deps/npm/node_modules/readable-stream/node_modules/string_decoder/README.md~8d21794... deps: upgrade npm to 3.6.0 +++ /dev/null @@ -1,7 +0,0 @@ -**string_decoder.js** (`require('string_decoder')`) from Node.js core - -Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. - -Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** - -The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/deps/npm/node_modules/readable-stream/node_modules/string_decoder/README.md~HEAD b/deps/npm/node_modules/readable-stream/node_modules/string_decoder/README.md~HEAD deleted file mode 100644 index 4d2aa001501107..00000000000000 --- a/deps/npm/node_modules/readable-stream/node_modules/string_decoder/README.md~HEAD +++ /dev/null @@ -1,7 +0,0 @@ -**string_decoder.js** (`require('string_decoder')`) from Node.js core - -Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. - -Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** - -The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/deps/npm/node_modules/readable-stream/node_modules/string_decoder/index.js~8d21794... deps: upgrade npm to 3.6.0 b/deps/npm/node_modules/readable-stream/node_modules/string_decoder/index.js~8d21794... deps: upgrade npm to 3.6.0 deleted file mode 100644 index b00e54fb790982..00000000000000 --- a/deps/npm/node_modules/readable-stream/node_modules/string_decoder/index.js~8d21794... deps: upgrade npm to 3.6.0 +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var Buffer = require('buffer').Buffer; - -var isBufferEncoding = Buffer.isEncoding - || function(encoding) { - switch (encoding && encoding.toLowerCase()) { - case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; - default: return false; - } - } - - -function assertEncoding(encoding) { - if (encoding && !isBufferEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. CESU-8 is handled as part of the UTF-8 encoding. -// -// @TODO Handling all encodings inside a single object makes it very difficult -// to reason about this code, so it should be split up in the future. -// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code -// points as used by CESU-8. -var StringDecoder = exports.StringDecoder = function(encoding) { - this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); - assertEncoding(encoding); - switch (this.encoding) { - case 'utf8': - // CESU-8 represents each of Surrogate Pair by 3-bytes - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - // UTF-16 represents each of Surrogate Pair by 2-bytes - this.surrogateSize = 2; - this.detectIncompleteChar = utf16DetectIncompleteChar; - break; - case 'base64': - // Base-64 stores 3 bytes in 4 chars, and pads the remainder. - this.surrogateSize = 3; - this.detectIncompleteChar = base64DetectIncompleteChar; - break; - default: - this.write = passThroughWrite; - return; - } - - // Enough space to store all bytes of a single character. UTF-8 needs 4 - // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). - this.charBuffer = new Buffer(6); - // Number of bytes received for the current incomplete multi-byte character. - this.charReceived = 0; - // Number of bytes expected for the current incomplete multi-byte character. - this.charLength = 0; -}; - - -// write decodes the given buffer and returns it as JS string that is -// guaranteed to not contain any partial multi-byte characters. Any partial -// character found at the end of the buffer is buffered up, and will be -// returned when calling write again with the remaining bytes. -// -// Note: Converting a Buffer containing an orphan surrogate to a String -// currently works, but converting a String to a Buffer (via `new Buffer`, or -// Buffer#write) will replace incomplete surrogates with the unicode -// replacement character. See https://codereview.chromium.org/121173009/ . -StringDecoder.prototype.write = function(buffer) { - var charStr = ''; - // if our last write ended with an incomplete multibyte character - while (this.charLength) { - // determine how many remaining bytes this buffer has to offer for this char - var available = (buffer.length >= this.charLength - this.charReceived) ? - this.charLength - this.charReceived : - buffer.length; - - // add the new bytes to the char buffer - buffer.copy(this.charBuffer, this.charReceived, 0, available); - this.charReceived += available; - - if (this.charReceived < this.charLength) { - // still not enough chars in this buffer? wait for more ... - return ''; - } - - // remove bytes belonging to the current character from the buffer - buffer = buffer.slice(available, buffer.length); - - // get the character that was split - charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); - - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - var charCode = charStr.charCodeAt(charStr.length - 1); - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - this.charLength += this.surrogateSize; - charStr = ''; - continue; - } - this.charReceived = this.charLength = 0; - - // if there are no more bytes in this buffer, just emit our char - if (buffer.length === 0) { - return charStr; - } - break; - } - - // determine and set charLength / charReceived - this.detectIncompleteChar(buffer); - - var end = buffer.length; - if (this.charLength) { - // buffer the incomplete character bytes we got - buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); - end -= this.charReceived; - } - - charStr += buffer.toString(this.encoding, 0, end); - - var end = charStr.length - 1; - var charCode = charStr.charCodeAt(end); - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - var size = this.surrogateSize; - this.charLength += size; - this.charReceived += size; - this.charBuffer.copy(this.charBuffer, size, 0, size); - buffer.copy(this.charBuffer, 0, 0, size); - return charStr.substring(0, end); - } - - // or just emit the charStr - return charStr; -}; - -// detectIncompleteChar determines if there is an incomplete UTF-8 character at -// the end of the given buffer. If so, it sets this.charLength to the byte -// length that character, and sets this.charReceived to the number of bytes -// that are available for this character. -StringDecoder.prototype.detectIncompleteChar = function(buffer) { - // determine how many bytes we have to check at the end of this buffer - var i = (buffer.length >= 3) ? 3 : buffer.length; - - // Figure out if one of the last i bytes of our buffer announces an - // incomplete char. - for (; i > 0; i--) { - var c = buffer[buffer.length - i]; - - // See http://en.wikipedia.org/wiki/UTF-8#Description - - // 110XXXXX - if (i == 1 && c >> 5 == 0x06) { - this.charLength = 2; - break; - } - - // 1110XXXX - if (i <= 2 && c >> 4 == 0x0E) { - this.charLength = 3; - break; - } - - // 11110XXX - if (i <= 3 && c >> 3 == 0x1E) { - this.charLength = 4; - break; - } - } - this.charReceived = i; -}; - -StringDecoder.prototype.end = function(buffer) { - var res = ''; - if (buffer && buffer.length) - res = this.write(buffer); - - if (this.charReceived) { - var cr = this.charReceived; - var buf = this.charBuffer; - var enc = this.encoding; - res += buf.slice(0, cr).toString(enc); - } - - return res; -}; - -function passThroughWrite(buffer) { - return buffer.toString(this.encoding); -} - -function utf16DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 2; - this.charLength = this.charReceived ? 2 : 0; -} - -function base64DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 3; - this.charLength = this.charReceived ? 3 : 0; -} diff --git a/deps/npm/node_modules/readable-stream/node_modules/string_decoder/index.js~HEAD b/deps/npm/node_modules/readable-stream/node_modules/string_decoder/index.js~HEAD deleted file mode 100644 index b00e54fb790982..00000000000000 --- a/deps/npm/node_modules/readable-stream/node_modules/string_decoder/index.js~HEAD +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var Buffer = require('buffer').Buffer; - -var isBufferEncoding = Buffer.isEncoding - || function(encoding) { - switch (encoding && encoding.toLowerCase()) { - case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; - default: return false; - } - } - - -function assertEncoding(encoding) { - if (encoding && !isBufferEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. CESU-8 is handled as part of the UTF-8 encoding. -// -// @TODO Handling all encodings inside a single object makes it very difficult -// to reason about this code, so it should be split up in the future. -// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code -// points as used by CESU-8. -var StringDecoder = exports.StringDecoder = function(encoding) { - this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); - assertEncoding(encoding); - switch (this.encoding) { - case 'utf8': - // CESU-8 represents each of Surrogate Pair by 3-bytes - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - // UTF-16 represents each of Surrogate Pair by 2-bytes - this.surrogateSize = 2; - this.detectIncompleteChar = utf16DetectIncompleteChar; - break; - case 'base64': - // Base-64 stores 3 bytes in 4 chars, and pads the remainder. - this.surrogateSize = 3; - this.detectIncompleteChar = base64DetectIncompleteChar; - break; - default: - this.write = passThroughWrite; - return; - } - - // Enough space to store all bytes of a single character. UTF-8 needs 4 - // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). - this.charBuffer = new Buffer(6); - // Number of bytes received for the current incomplete multi-byte character. - this.charReceived = 0; - // Number of bytes expected for the current incomplete multi-byte character. - this.charLength = 0; -}; - - -// write decodes the given buffer and returns it as JS string that is -// guaranteed to not contain any partial multi-byte characters. Any partial -// character found at the end of the buffer is buffered up, and will be -// returned when calling write again with the remaining bytes. -// -// Note: Converting a Buffer containing an orphan surrogate to a String -// currently works, but converting a String to a Buffer (via `new Buffer`, or -// Buffer#write) will replace incomplete surrogates with the unicode -// replacement character. See https://codereview.chromium.org/121173009/ . -StringDecoder.prototype.write = function(buffer) { - var charStr = ''; - // if our last write ended with an incomplete multibyte character - while (this.charLength) { - // determine how many remaining bytes this buffer has to offer for this char - var available = (buffer.length >= this.charLength - this.charReceived) ? - this.charLength - this.charReceived : - buffer.length; - - // add the new bytes to the char buffer - buffer.copy(this.charBuffer, this.charReceived, 0, available); - this.charReceived += available; - - if (this.charReceived < this.charLength) { - // still not enough chars in this buffer? wait for more ... - return ''; - } - - // remove bytes belonging to the current character from the buffer - buffer = buffer.slice(available, buffer.length); - - // get the character that was split - charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); - - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - var charCode = charStr.charCodeAt(charStr.length - 1); - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - this.charLength += this.surrogateSize; - charStr = ''; - continue; - } - this.charReceived = this.charLength = 0; - - // if there are no more bytes in this buffer, just emit our char - if (buffer.length === 0) { - return charStr; - } - break; - } - - // determine and set charLength / charReceived - this.detectIncompleteChar(buffer); - - var end = buffer.length; - if (this.charLength) { - // buffer the incomplete character bytes we got - buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); - end -= this.charReceived; - } - - charStr += buffer.toString(this.encoding, 0, end); - - var end = charStr.length - 1; - var charCode = charStr.charCodeAt(end); - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - var size = this.surrogateSize; - this.charLength += size; - this.charReceived += size; - this.charBuffer.copy(this.charBuffer, size, 0, size); - buffer.copy(this.charBuffer, 0, 0, size); - return charStr.substring(0, end); - } - - // or just emit the charStr - return charStr; -}; - -// detectIncompleteChar determines if there is an incomplete UTF-8 character at -// the end of the given buffer. If so, it sets this.charLength to the byte -// length that character, and sets this.charReceived to the number of bytes -// that are available for this character. -StringDecoder.prototype.detectIncompleteChar = function(buffer) { - // determine how many bytes we have to check at the end of this buffer - var i = (buffer.length >= 3) ? 3 : buffer.length; - - // Figure out if one of the last i bytes of our buffer announces an - // incomplete char. - for (; i > 0; i--) { - var c = buffer[buffer.length - i]; - - // See http://en.wikipedia.org/wiki/UTF-8#Description - - // 110XXXXX - if (i == 1 && c >> 5 == 0x06) { - this.charLength = 2; - break; - } - - // 1110XXXX - if (i <= 2 && c >> 4 == 0x0E) { - this.charLength = 3; - break; - } - - // 11110XXX - if (i <= 3 && c >> 3 == 0x1E) { - this.charLength = 4; - break; - } - } - this.charReceived = i; -}; - -StringDecoder.prototype.end = function(buffer) { - var res = ''; - if (buffer && buffer.length) - res = this.write(buffer); - - if (this.charReceived) { - var cr = this.charReceived; - var buf = this.charBuffer; - var enc = this.encoding; - res += buf.slice(0, cr).toString(enc); - } - - return res; -}; - -function passThroughWrite(buffer) { - return buffer.toString(this.encoding); -} - -function utf16DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 2; - this.charLength = this.charReceived ? 2 : 0; -} - -function base64DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 3; - this.charLength = this.charReceived ? 3 : 0; -} diff --git a/deps/npm/node_modules/readable-stream/passthrough.js~8d21794... deps: upgrade npm to 3.6.0 b/deps/npm/node_modules/readable-stream/passthrough.js~8d21794... deps: upgrade npm to 3.6.0 deleted file mode 100644 index 27e8d8a55165f9..00000000000000 --- a/deps/npm/node_modules/readable-stream/passthrough.js~8d21794... deps: upgrade npm to 3.6.0 +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/deps/npm/node_modules/readable-stream/passthrough.js~HEAD b/deps/npm/node_modules/readable-stream/passthrough.js~HEAD deleted file mode 100644 index 27e8d8a55165f9..00000000000000 --- a/deps/npm/node_modules/readable-stream/passthrough.js~HEAD +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/deps/npm/node_modules/readable-stream/readable.js~HEAD b/deps/npm/node_modules/readable-stream/readable.js~HEAD deleted file mode 100644 index 8b5337b5c500f3..00000000000000 --- a/deps/npm/node_modules/readable-stream/readable.js~HEAD +++ /dev/null @@ -1,8 +0,0 @@ -var Stream = require('stream'); // hack to fix a circular dependency issue when used with browserify -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = Stream; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/deps/npm/node_modules/readable-stream/transform.js~8d21794... deps: upgrade npm to 3.6.0 b/deps/npm/node_modules/readable-stream/transform.js~8d21794... deps: upgrade npm to 3.6.0 deleted file mode 100644 index 5d482f0780e993..00000000000000 --- a/deps/npm/node_modules/readable-stream/transform.js~8d21794... deps: upgrade npm to 3.6.0 +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/deps/npm/node_modules/readable-stream/transform.js~HEAD b/deps/npm/node_modules/readable-stream/transform.js~HEAD deleted file mode 100644 index 5d482f0780e993..00000000000000 --- a/deps/npm/node_modules/readable-stream/transform.js~HEAD +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/deps/npm/node_modules/readable-stream/writable.js~8d21794... deps: upgrade npm to 3.6.0 b/deps/npm/node_modules/readable-stream/writable.js~8d21794... deps: upgrade npm to 3.6.0 deleted file mode 100644 index e1e9efdf3c12e9..00000000000000 --- a/deps/npm/node_modules/readable-stream/writable.js~8d21794... deps: upgrade npm to 3.6.0 +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/deps/npm/node_modules/readable-stream/writable.js~HEAD b/deps/npm/node_modules/readable-stream/writable.js~HEAD deleted file mode 100644 index e1e9efdf3c12e9..00000000000000 --- a/deps/npm/node_modules/readable-stream/writable.js~HEAD +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/deps/npm/node_modules/request/CHANGELOG.md b/deps/npm/node_modules/request/CHANGELOG.md index 7dc85ea14d2c0d..86386a9ae5cba4 100644 --- a/deps/npm/node_modules/request/CHANGELOG.md +++ b/deps/npm/node_modules/request/CHANGELOG.md @@ -1,5 +1,20 @@ ## Change Log +### v2.68.0 (2016/01/27) +- [#2036](https://github.com/request/request/pull/2036) Add AWS Signature Version 4 (@simov, @mirkods) +- [#2022](https://github.com/request/request/pull/2022) Convert numeric multipart bodies to string (@simov, @feross) +- [#2024](https://github.com/request/request/pull/2024) Update har-validator dependency for nsp advisory #76 (@TylerDixon) +- [#2016](https://github.com/request/request/pull/2016) Update qs to version 6.0.2 🚀 (@greenkeeperio-bot) +- [#2007](https://github.com/request/request/pull/2007) Use the `extend` module instead of util._extend (@simov) +- [#2003](https://github.com/request/request/pull/2003) Update browserify to version 13.0.0 🚀 (@greenkeeperio-bot) +- [#1989](https://github.com/request/request/pull/1989) Update buffer-equal to version 1.0.0 🚀 (@greenkeeperio-bot) +- [#1956](https://github.com/request/request/pull/1956) Check form-data content-length value before setting up the header (@jongyoonlee) +- [#1958](https://github.com/request/request/pull/1958) Use IncomingMessage.destroy method (@simov) +- [#1952](https://github.com/request/request/pull/1952) Adds example for Tor proxy (@prometheansacrifice) +- [#1943](https://github.com/request/request/pull/1943) Update eslint to version 1.10.3 🚀 (@simov, @greenkeeperio-bot) +- [#1924](https://github.com/request/request/pull/1924) Update eslint to version 1.10.1 🚀 (@greenkeeperio-bot) +- [#1915](https://github.com/request/request/pull/1915) Remove content-length and transfer-encoding headers from defaultProxyHeaderWhiteList (@yaxia) + ### v2.67.0 (2015/11/19) - [#1913](https://github.com/request/request/pull/1913) Update http-signature to version 1.1.0 🚀 (@greenkeeperio-bot) @@ -455,7 +470,7 @@ - [#521](https://github.com/request/request/pull/521) Improving test-localAddress.js (@noway421) - [#529](https://github.com/request/request/pull/529) dependencies versions bump (@jodaka) -### v2.17.0 (2013/04/22) +### v2.18.0 (2013/04/22) - [#523](https://github.com/request/request/pull/523) Updating dependencies (@noway421) - [#520](https://github.com/request/request/pull/520) Fixing test-tunnel.js (@noway421) - [#519](https://github.com/request/request/pull/519) Update internal path state on post-creation QS changes (@jblebrun) diff --git a/deps/npm/node_modules/request/README.md b/deps/npm/node_modules/request/README.md index 77e30df5821d52..6ee45b205d5473 100644 --- a/deps/npm/node_modules/request/README.md +++ b/deps/npm/node_modules/request/README.md @@ -754,7 +754,7 @@ The first argument can be either a `url` or an `options` object. The only requir - `auth` - A hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). See documentation above. - `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above. - `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example). -- `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services) +- `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services). If you want to use AWS sign version 4 use the parameter `sign_version` with value `4` otherwise the default is version 2. **Note:** you need to `npm install aws4` first. - `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options. --- diff --git a/deps/npm/node_modules/request/lib/har.js b/deps/npm/node_modules/request/lib/har.js index ceb1cd1076e328..30595748781ad1 100644 --- a/deps/npm/node_modules/request/lib/har.js +++ b/deps/npm/node_modules/request/lib/har.js @@ -3,7 +3,7 @@ var fs = require('fs') var qs = require('querystring') var validate = require('har-validator') -var util = require('util') +var extend = require('extend') function Har (request) { this.request = request @@ -118,7 +118,8 @@ Har.prototype.options = function (options) { return options } - var har = util._extend({}, options.har) + var har = {} + extend(har, options.har) // only process the first entry if (har.log && har.log.entries) { diff --git a/deps/npm/node_modules/request/lib/multipart.js b/deps/npm/node_modules/request/lib/multipart.js index 03618588cc6320..c1281726187b6a 100644 --- a/deps/npm/node_modules/request/lib/multipart.js +++ b/deps/npm/node_modules/request/lib/multipart.js @@ -68,6 +68,9 @@ Multipart.prototype.build = function (parts, chunked) { var body = chunked ? new CombinedStream() : [] function add (part) { + if (typeof part === 'number') { + part = part.toString() + } return chunked ? body.append(part) : body.push(new Buffer(part)) } diff --git a/deps/npm/node_modules/request/lib/tunnel.js b/deps/npm/node_modules/request/lib/tunnel.js index 918aec69afbc21..bf96a8fec53361 100644 --- a/deps/npm/node_modules/request/lib/tunnel.js +++ b/deps/npm/node_modules/request/lib/tunnel.js @@ -12,7 +12,6 @@ var defaultProxyHeaderWhiteList = [ 'cache-control', 'content-encoding', 'content-language', - 'content-length', 'content-location', 'content-md5', 'content-range', @@ -24,7 +23,6 @@ var defaultProxyHeaderWhiteList = [ 'pragma', 'referer', 'te', - 'transfer-encoding', 'user-agent', 'via' ] diff --git a/deps/npm/node_modules/request/node_modules/aws4/.npmignore b/deps/npm/node_modules/request/node_modules/aws4/.npmignore new file mode 100644 index 00000000000000..ccafa6b412bff2 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/aws4/.npmignore @@ -0,0 +1,3 @@ +test +coverage +examples diff --git a/deps/npm/node_modules/request/node_modules/aws4/.tern-port b/deps/npm/node_modules/request/node_modules/aws4/.tern-port new file mode 100644 index 00000000000000..7fd1b5223deb90 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/aws4/.tern-port @@ -0,0 +1 @@ +62638 \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/aws4/.travis.yml b/deps/npm/node_modules/request/node_modules/aws4/.travis.yml new file mode 100644 index 00000000000000..61d06340455977 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/aws4/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - "0.10" + - "0.12" + - "4.2" diff --git a/deps/npm/node_modules/readable-stream/node_modules/isarray/README.md~8d21794... deps: upgrade npm to 3.6.0 b/deps/npm/node_modules/request/node_modules/aws4/LICENSE similarity index 65% rename from deps/npm/node_modules/readable-stream/node_modules/isarray/README.md~8d21794... deps: upgrade npm to 3.6.0 rename to deps/npm/node_modules/request/node_modules/aws4/LICENSE index 052a62b8d7b7ae..4f321e599569f4 100644 --- a/deps/npm/node_modules/readable-stream/node_modules/isarray/README.md~8d21794... deps: upgrade npm to 3.6.0 +++ b/deps/npm/node_modules/request/node_modules/aws4/LICENSE @@ -1,39 +1,4 @@ - -# isarray - -`Array#isArray` for older browsers. - -## Usage - -```js -var isArray = require('isarray'); - -console.log(isArray([])); // => true -console.log(isArray({})); // => false -``` - -## Installation - -With [npm](http://npmjs.org) do - -```bash -$ npm install isarray -``` - -Then bundle for the browser with -[browserify](https://github.com/substack/browserify). - -With [component](http://component.io) do - -```bash -$ component install juliangruber/isarray -``` - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> +Copyright 2013 Michael Hart (michael.hart.au@gmail.com) 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 diff --git a/deps/npm/node_modules/request/node_modules/aws4/README.md b/deps/npm/node_modules/request/node_modules/aws4/README.md new file mode 100644 index 00000000000000..068a07a8359617 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/aws4/README.md @@ -0,0 +1,509 @@ +aws4 +---- + +[![Build Status](https://secure.travis-ci.org/mhart/aws4.png?branch=master)](http://travis-ci.org/mhart/aws4) + +A small utility to sign vanilla node.js http(s) request options using Amazon's +[AWS Signature Version 4](http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html). + +This signature is supported by nearly all Amazon services, including +[S3](http://docs.aws.amazon.com/AmazonS3/latest/API/), +[EC2](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/), +[DynamoDB](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/API.html), +[Kinesis](http://docs.aws.amazon.com/kinesis/latest/APIReference/), +[Lambda](http://docs.aws.amazon.com/lambda/latest/dg/API_Reference.html), +[SQS](http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/), +[SNS](http://docs.aws.amazon.com/sns/latest/api/), +[IAM](http://docs.aws.amazon.com/IAM/latest/APIReference/), +[STS](http://docs.aws.amazon.com/STS/latest/APIReference/), +[RDS](http://docs.aws.amazon.com/AmazonRDS/latest/APIReference/), +[CloudWatch](http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/), +[CloudWatch Logs](http://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/), +[CodeDeploy](http://docs.aws.amazon.com/codedeploy/latest/APIReference/), +[CloudFront](http://docs.aws.amazon.com/AmazonCloudFront/latest/APIReference/), +[CloudTrail](http://docs.aws.amazon.com/awscloudtrail/latest/APIReference/), +[ElastiCache](http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/), +[EMR](http://docs.aws.amazon.com/ElasticMapReduce/latest/API/), +[Glacier](http://docs.aws.amazon.com/amazonglacier/latest/dev/amazon-glacier-api.html), +[CloudSearch](http://docs.aws.amazon.com/cloudsearch/latest/developerguide/APIReq.html), +[Elastic Load Balancing](http://docs.aws.amazon.com/ElasticLoadBalancing/latest/APIReference/), +[Elastic Transcoder](http://docs.aws.amazon.com/elastictranscoder/latest/developerguide/api-reference.html), +[CloudFormation](http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/), +[Elastic Beanstalk](http://docs.aws.amazon.com/elasticbeanstalk/latest/api/), +[Storage Gateway](http://docs.aws.amazon.com/storagegateway/latest/userguide/AWSStorageGatewayAPI.html), +[Data Pipeline](http://docs.aws.amazon.com/datapipeline/latest/APIReference/), +[Direct Connect](http://docs.aws.amazon.com/directconnect/latest/APIReference/), +[Redshift](http://docs.aws.amazon.com/redshift/latest/APIReference/), +[OpsWorks](http://docs.aws.amazon.com/opsworks/latest/APIReference/), +[SES](http://docs.aws.amazon.com/ses/latest/APIReference/), +[SWF](http://docs.aws.amazon.com/amazonswf/latest/apireference/), +[AutoScaling](http://docs.aws.amazon.com/AutoScaling/latest/APIReference/), +[Mobile Analytics](http://docs.aws.amazon.com/mobileanalytics/latest/ug/server-reference.html), +[Cognito Identity](http://docs.aws.amazon.com/cognitoidentity/latest/APIReference/), +[Cognito Sync](http://docs.aws.amazon.com/cognitosync/latest/APIReference/), +[Container Service](http://docs.aws.amazon.com/AmazonECS/latest/APIReference/), +[AppStream](http://docs.aws.amazon.com/appstream/latest/developerguide/appstream-api-rest.html), +[Key Management Service](http://docs.aws.amazon.com/kms/latest/APIReference/), +[Config](http://docs.aws.amazon.com/config/latest/APIReference/), +[CloudHSM](http://docs.aws.amazon.com/cloudhsm/latest/dg/api-ref.html), +[Route53](http://docs.aws.amazon.com/Route53/latest/APIReference/requests-rest.html) and +[Route53 Domains](http://docs.aws.amazon.com/Route53/latest/APIReference/requests-rpc.html). + +Indeed, the only AWS services that *don't* support v4 as of 2014-12-30 are +[Import/Export](http://docs.aws.amazon.com/AWSImportExport/latest/DG/api-reference.html) and +[SimpleDB](http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API.html) +(they only support [AWS Signature Version 2](https://github.com/mhart/aws2)). + +It also provides defaults for a number of core AWS headers and +request parameters, making it very easy to query AWS services, or +build out a fully-featured AWS library. + +Example +------- + +```javascript +var http = require('http'), + https = require('https'), + aws4 = require('aws4') + +// given an options object you could pass to http.request +var opts = {host: 'sqs.us-east-1.amazonaws.com', path: '/?Action=ListQueues'} + +// alternatively (as aws4 can infer the host): +opts = {service: 'sqs', region: 'us-east-1', path: '/?Action=ListQueues'} + +// alternatively (as us-east-1 is default): +opts = {service: 'sqs', path: '/?Action=ListQueues'} + +aws4.sign(opts) // assumes AWS credentials are available in process.env + +console.log(opts) +/* +{ + host: 'sqs.us-east-1.amazonaws.com', + path: '/?Action=ListQueues', + headers: { + Host: 'sqs.us-east-1.amazonaws.com', + 'X-Amz-Date': '20121226T061030Z', + Authorization: 'AWS4-HMAC-SHA256 Credential=ABCDEF/20121226/us-east-1/sqs/aws4_request, ...' + } +} +*/ + +// we can now use this to query AWS using the standard node.js http API +http.request(opts, function(res) { res.pipe(process.stdout) }).end() +/* + + +... +*/ +``` + +More options +------------ + +```javascript +// you can also pass AWS credentials in explicitly (otherwise taken from process.env) +aws4.sign(opts, {accessKeyId: '', secretAccessKey: ''}) + +// can also add the signature to query strings +aws4.sign({service: 's3', path: '/my-bucket?X-Amz-Expires=12345', signQuery: true}) + +// create a utility function to pipe to stdout (with https this time) +function request(o) { https.request(o, function(res) { res.pipe(process.stdout) }).end(o.body || '') } + +// aws4 can infer the HTTP method if a body is passed in +// method will be POST and Content-Type: 'application/x-www-form-urlencoded; charset=utf-8' +request(aws4.sign({service: 'iam', body: 'Action=ListGroups&Version=2010-05-08'})) +/* + +... +*/ + +// can specify any custom option or header as per usual +request(aws4.sign({ + service: 'dynamodb', + region: 'ap-southeast-2', + method: 'POST', + path: '/', + headers: { + 'Content-Type': 'application/x-amz-json-1.0', + 'X-Amz-Target': 'DynamoDB_20120810.ListTables' + }, + body: '{}' +})) +/* +{"TableNames":[]} +... +*/ + +// works with all other services that support Signature Version 4 + +request(aws4.sign({service: 's3', path: '/', signQuery: true})) +/* + +... +*/ + +request(aws4.sign({service: 'ec2', path: '/?Action=DescribeRegions&Version=2014-06-15'})) +/* + +... +*/ + +request(aws4.sign({service: 'sns', path: '/?Action=ListTopics&Version=2010-03-31'})) +/* + +... +*/ + +request(aws4.sign({service: 'sts', path: '/?Action=GetSessionToken&Version=2011-06-15'})) +/* + +... +*/ + +request(aws4.sign({service: 'cloudsearch', path: '/?Action=ListDomainNames&Version=2013-01-01'})) +/* + +... +*/ + +request(aws4.sign({service: 'ses', path: '/?Action=ListIdentities&Version=2010-12-01'})) +/* + +... +*/ + +request(aws4.sign({service: 'autoscaling', path: '/?Action=DescribeAutoScalingInstances&Version=2011-01-01'})) +/* + +... +*/ + +request(aws4.sign({service: 'elasticloadbalancing', path: '/?Action=DescribeLoadBalancers&Version=2012-06-01'})) +/* + +... +*/ + +request(aws4.sign({service: 'cloudformation', path: '/?Action=ListStacks&Version=2010-05-15'})) +/* + +... +*/ + +request(aws4.sign({service: 'elasticbeanstalk', path: '/?Action=ListAvailableSolutionStacks&Version=2010-12-01'})) +/* + +... +*/ + +request(aws4.sign({service: 'rds', path: '/?Action=DescribeDBInstances&Version=2012-09-17'})) +/* + +... +*/ + +request(aws4.sign({service: 'monitoring', path: '/?Action=ListMetrics&Version=2010-08-01'})) +/* + +... +*/ + +request(aws4.sign({service: 'redshift', path: '/?Action=DescribeClusters&Version=2012-12-01'})) +/* + +... +*/ + +request(aws4.sign({service: 'cloudfront', path: '/2014-05-31/distribution'})) +/* + +... +*/ + +request(aws4.sign({service: 'elasticache', path: '/?Action=DescribeCacheClusters&Version=2014-07-15'})) +/* + +... +*/ + +request(aws4.sign({service: 'elasticmapreduce', path: '/?Action=DescribeJobFlows&Version=2009-03-31'})) +/* + +... +*/ + +request(aws4.sign({service: 'route53', path: '/2013-04-01/hostedzone'})) +/* + +... +*/ + +request(aws4.sign({service: 'appstream', path: '/applications'})) +/* +{"_links":{"curie":[{"href":"http://docs.aws.amazon.com/appstream/latest/... +... +*/ + +request(aws4.sign({service: 'cognito-sync', path: '/identitypools'})) +/* +{"Count":0,"IdentityPoolUsages":[],"MaxResults":16,"NextToken":null} +... +*/ + +request(aws4.sign({service: 'elastictranscoder', path: '/2012-09-25/pipelines'})) +/* +{"NextPageToken":null,"Pipelines":[]} +... +*/ + +request(aws4.sign({service: 'lambda', path: '/2014-11-13/functions/'})) +/* +{"Functions":[],"NextMarker":null} +... +*/ + +request(aws4.sign({service: 'ecs', path: '/?Action=ListClusters&Version=2014-11-13'})) +/* + +... +*/ + +request(aws4.sign({service: 'glacier', path: '/-/vaults', headers: {'X-Amz-Glacier-Version': '2012-06-01'}})) +/* +{"Marker":null,"VaultList":[]} +... +*/ + +request(aws4.sign({service: 'storagegateway', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'StorageGateway_20120630.ListGateways' +}})) +/* +{"Gateways":[]} +... +*/ + +request(aws4.sign({service: 'datapipeline', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'DataPipeline.ListPipelines' +}})) +/* +{"hasMoreResults":false,"pipelineIdList":[]} +... +*/ + +request(aws4.sign({service: 'opsworks', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'OpsWorks_20130218.DescribeStacks' +}})) +/* +{"Stacks":[]} +... +*/ + +request(aws4.sign({service: 'route53domains', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'Route53Domains_v20140515.ListDomains' +}})) +/* +{"Domains":[]} +... +*/ + +request(aws4.sign({service: 'kinesis', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'Kinesis_20131202.ListStreams' +}})) +/* +{"HasMoreStreams":false,"StreamNames":[]} +... +*/ + +request(aws4.sign({service: 'cloudtrail', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'CloudTrail_20131101.DescribeTrails' +}})) +/* +{"trailList":[]} +... +*/ + +request(aws4.sign({service: 'logs', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'Logs_20140328.DescribeLogGroups' +}})) +/* +{"logGroups":[]} +... +*/ + +request(aws4.sign({service: 'codedeploy', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'CodeDeploy_20141006.ListApplications' +}})) +/* +{"applications":[]} +... +*/ + +request(aws4.sign({service: 'directconnect', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'OvertureService.DescribeConnections' +}})) +/* +{"connections":[]} +... +*/ + +request(aws4.sign({service: 'kms', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'TrentService.ListKeys' +}})) +/* +{"Keys":[],"Truncated":false} +... +*/ + +request(aws4.sign({service: 'config', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'StarlingDoveService.DescribeDeliveryChannels' +}})) +/* +{"DeliveryChannels":[]} +... +*/ + +request(aws4.sign({service: 'cloudhsm', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'CloudHsmFrontendService.ListAvailableZones' +}})) +/* +{"AZList":["us-east-1a","us-east-1b","us-east-1c"]} +... +*/ + +request(aws4.sign({ + service: 'swf', + body: '{"registrationStatus":"REGISTERED"}', + headers: { + 'Content-Type': 'application/x-amz-json-1.0', + 'X-Amz-Target': 'SimpleWorkflowService.ListDomains' + } +})) +/* +{"domainInfos":[]} +... +*/ + +request(aws4.sign({ + service: 'cognito-identity', + body: '{"MaxResults": 1}', + headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'AWSCognitoIdentityService.ListIdentityPools' + } +})) +/* +{"IdentityPools":[]} +... +*/ + +request(aws4.sign({ + service: 'mobileanalytics', + path: '/2014-06-05/events', + body: JSON.stringify({events:[{ + eventType: 'a', + timestamp: new Date().toISOString(), + session: {}, + }]}), + headers: { + 'Content-Type': 'application/json', + 'X-Amz-Client-Context': JSON.stringify({ + client: {client_id: 'a', app_title: 'a'}, + custom: {}, + env: {platform: 'a'}, + services: {}, + }), + } +})) +/* +(HTTP 202, empty response) +*/ +``` + +API +--- + +### aws4.sign(requestOptions, [credentials]) + +This calculates and populates the `Authorization` header of +`requestOptions`, and any other necessary AWS headers and/or request +options. Returns `requestOptions` as a convenience for chaining. + +`requestOptions` is an object holding the same options that the node.js +[http.request](http://nodejs.org/docs/latest/api/http.html#http_http_request_options_callback) +function takes. + +The following properties of `requestOptions` are used in the signing or +populated if they don't already exist: + +- `hostname` or `host` (will be determined from `service` and `region` if not given) +- `method` (will use `'GET'` if not given or `'POST'` if there is a `body`) +- `path` (will use `'/'` if not given) +- `body` (will use `''` if not given) +- `service` (will be calculated from `hostname` or `host` if not given) +- `region` (will be calculated from `hostname` or `host` or use `'us-east-1'` if not given) +- `headers['Host']` (will use `hostname` or `host` or be calculated if not given) +- `headers['Content-Type']` (will use `'application/x-www-form-urlencoded; charset=utf-8'` + if not given and there is a `body`) +- `headers['Date']` (used to calculate the signature date if given, otherwise `new Date` is used) + +Your AWS credentials (which can be found in your +[AWS console](https://portal.aws.amazon.com/gp/aws/securityCredentials)) +can be specified in one of two ways: + +- As the second argument, like this: + +```javascript +aws4.sign(requestOptions, { + secretAccessKey: "", + accessKeyId: "", + sessionToken: "" +}) +``` + +- From `process.env`, such as this: + +``` +export AWS_SECRET_ACCESS_KEY="" +export AWS_ACCESS_KEY_ID="" +export AWS_SESSION_TOKEN="" +``` + +(will also use `AWS_ACCESS_KEY` and `AWS_SECRET_KEY` if available) + +The `sessionToken` property and `AWS_SESSION_TOKEN` environment variable are optional for signing +with [IAM STS temporary credentials](http://docs.aws.amazon.com/STS/latest/UsingSTS/using-temp-creds.html). + +Installation +------------ + +With [npm](http://npmjs.org/) do: + +``` +npm install aws4 +``` + +Thanks +------ + +Thanks to [@jed](https://github.com/jed) for his +[dynamo-client](https://github.com/jed/dynamo-client) lib where I first +committed and subsequently extracted this code. + +Also thanks to the +[official node.js AWS SDK](https://github.com/aws/aws-sdk-js) for giving +me a start on implementing the v4 signature. diff --git a/deps/npm/node_modules/request/node_modules/aws4/aws4.js b/deps/npm/node_modules/request/node_modules/aws4/aws4.js new file mode 100644 index 00000000000000..3ef54a468fc904 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/aws4/aws4.js @@ -0,0 +1,313 @@ +var aws4 = exports, + url = require('url'), + querystring = require('querystring'), + crypto = require('crypto'), + lru = require('lru-cache'), + credentialsCache = lru(1000) + +// http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html + +function hmac(key, string, encoding) { + return crypto.createHmac('sha256', key).update(string, 'utf8').digest(encoding) +} + +function hash(string, encoding) { + return crypto.createHash('sha256').update(string, 'utf8').digest(encoding) +} + +// This function assumes the string has already been percent encoded +function encodeRfc3986(urlEncodedString) { + return urlEncodedString.replace(/[!'()*]/g, function(c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase() + }) +} + +// request: { path | body, [host], [method], [headers], [service], [region] } +// credentials: { accessKeyId, secretAccessKey, [sessionToken] } +function RequestSigner(request, credentials) { + + if (typeof request === 'string') request = url.parse(request) + + var headers = request.headers = (request.headers || {}), + hostParts = this.matchHost(request.hostname || request.host || headers.Host || headers.host) + + this.request = request + this.credentials = credentials || this.defaultCredentials() + + this.service = request.service || hostParts[0] || '' + this.region = request.region || hostParts[1] || 'us-east-1' + + // SES uses a different domain from the service name + if (this.service === 'email') this.service = 'ses' + + if (!request.method && request.body) + request.method = 'POST' + + if (!headers.Host && !headers.host) + headers.Host = request.hostname || request.host || this.createHost() + if (!request.hostname && !request.host) + request.hostname = headers.Host || headers.host +} + +RequestSigner.prototype.matchHost = function(host) { + var match = (host || '').match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com$/) + var hostParts = (match || []).slice(1, 3) + + // ES's hostParts are sometimes the other way round, if the value that is expected + // to be region equals ‘es’ switch them back + // e.g. search-cluster-name-aaaa00aaaa0aaa0aaaaaaa0aaa.us-east-1.es.amazonaws.com + if (hostParts[1] === 'es') + hostParts = hostParts.reverse() + + return hostParts +} + +// http://docs.aws.amazon.com/general/latest/gr/rande.html +RequestSigner.prototype.isSingleRegion = function() { + // Special case for S3 and SimpleDB in us-east-1 + if (['s3', 'sdb'].indexOf(this.service) >= 0 && this.region === 'us-east-1') return true + + return ['cloudfront', 'ls', 'route53', 'iam', 'importexport', 'sts'] + .indexOf(this.service) >= 0 +} + +RequestSigner.prototype.createHost = function() { + var region = this.isSingleRegion() ? '' : + (this.service === 's3' && this.region !== 'us-east-1' ? '-' : '.') + this.region, + service = this.service === 'ses' ? 'email' : this.service + return service + region + '.amazonaws.com' +} + +RequestSigner.prototype.prepareRequest = function() { + this.parsePath() + + var request = this.request, headers = request.headers, query + + if (request.signQuery) { + + this.parsedPath.query = query = this.parsedPath.query || {} + + if (this.credentials.sessionToken) + query['X-Amz-Security-Token'] = this.credentials.sessionToken + + if (this.service === 's3' && !query['X-Amz-Expires']) + query['X-Amz-Expires'] = 86400 + + if (query['X-Amz-Date']) + this.datetime = query['X-Amz-Date'] + else + query['X-Amz-Date'] = this.getDateTime() + + query['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256' + query['X-Amz-Credential'] = this.credentials.accessKeyId + '/' + this.credentialString() + query['X-Amz-SignedHeaders'] = this.signedHeaders() + + } else { + + if (!request.doNotModifyHeaders) { + if (request.body && !headers['Content-Type'] && !headers['content-type']) + headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8' + + if (request.body && !headers['Content-Length'] && !headers['content-length']) + headers['Content-Length'] = Buffer.byteLength(request.body) + + if (this.credentials.sessionToken) + headers['X-Amz-Security-Token'] = this.credentials.sessionToken + + if (this.service === 's3') + headers['X-Amz-Content-Sha256'] = hash(this.request.body || '', 'hex') + + if (headers['X-Amz-Date']) + this.datetime = headers['X-Amz-Date'] + else + headers['X-Amz-Date'] = this.getDateTime() + } + + delete headers.Authorization + delete headers.authorization + } +} + +RequestSigner.prototype.sign = function() { + if (!this.parsedPath) this.prepareRequest() + + if (this.request.signQuery) { + this.parsedPath.query['X-Amz-Signature'] = this.signature() + } else { + this.request.headers.Authorization = this.authHeader() + } + + this.request.path = this.formatPath() + + return this.request +} + +RequestSigner.prototype.getDateTime = function() { + if (!this.datetime) { + var headers = this.request.headers, + date = new Date(headers.Date || headers.date || new Date) + + this.datetime = date.toISOString().replace(/[:\-]|\.\d{3}/g, '') + } + return this.datetime +} + +RequestSigner.prototype.getDate = function() { + return this.getDateTime().substr(0, 8) +} + +RequestSigner.prototype.authHeader = function() { + return [ + 'AWS4-HMAC-SHA256 Credential=' + this.credentials.accessKeyId + '/' + this.credentialString(), + 'SignedHeaders=' + this.signedHeaders(), + 'Signature=' + this.signature(), + ].join(', ') +} + +RequestSigner.prototype.signature = function() { + var date = this.getDate(), + cacheKey = [this.credentials.secretAccessKey, date, this.region, this.service].join(), + kDate, kRegion, kService, kCredentials = credentialsCache.get(cacheKey) + if (!kCredentials) { + kDate = hmac('AWS4' + this.credentials.secretAccessKey, date) + kRegion = hmac(kDate, this.region) + kService = hmac(kRegion, this.service) + kCredentials = hmac(kService, 'aws4_request') + credentialsCache.set(cacheKey, kCredentials) + } + return hmac(kCredentials, this.stringToSign(), 'hex') +} + +RequestSigner.prototype.stringToSign = function() { + return [ + 'AWS4-HMAC-SHA256', + this.getDateTime(), + this.credentialString(), + hash(this.canonicalString(), 'hex'), + ].join('\n') +} + +RequestSigner.prototype.canonicalString = function() { + if (!this.parsedPath) this.prepareRequest() + + var pathStr = this.parsedPath.path, + query = this.parsedPath.query, + queryStr = '', + normalizePath = this.service !== 's3', + decodePath = this.service === 's3' || this.request.doNotEncodePath, + decodeSlashesInPath = this.service === 's3', + firstValOnly = this.service === 's3', + bodyHash = this.service === 's3' && this.request.signQuery ? + 'UNSIGNED-PAYLOAD' : hash(this.request.body || '', 'hex') + + if (query) { + queryStr = encodeRfc3986(querystring.stringify(Object.keys(query).sort().reduce(function(obj, key) { + if (!key) return obj + obj[key] = !Array.isArray(query[key]) ? query[key] : + (firstValOnly ? query[key][0] : query[key].slice().sort()) + return obj + }, {}))) + } + if (pathStr !== '/') { + if (normalizePath) pathStr = pathStr.replace(/\/{2,}/g, '/') + if (pathStr[0] === '/') pathStr = pathStr.slice(1) + pathStr = '/' + pathStr.split('/').reduce(function(path, piece) { + if (normalizePath && piece === '..') { + path.pop() + } else if (!normalizePath || piece !== '.') { + if (decodePath) piece = querystring.unescape(piece) + path.push(encodeRfc3986(querystring.escape(piece))) + } + return path + }, []).join('/') + if (decodeSlashesInPath) pathStr = pathStr.replace(/%2F/g, '/') + } + + return [ + this.request.method || 'GET', + pathStr, + queryStr, + this.canonicalHeaders() + '\n', + this.signedHeaders(), + bodyHash, + ].join('\n') +} + +RequestSigner.prototype.canonicalHeaders = function() { + var headers = this.request.headers + function trimAll(header) { + return header.toString().trim().replace(/\s+/g, ' ') + } + return Object.keys(headers) + .sort(function(a, b) { return a.toLowerCase() < b.toLowerCase() ? -1 : 1 }) + .map(function(key) { return key.toLowerCase() + ':' + trimAll(headers[key]) }) + .join('\n') +} + +RequestSigner.prototype.signedHeaders = function() { + return Object.keys(this.request.headers) + .map(function(key) { return key.toLowerCase() }) + .sort() + .join(';') +} + +RequestSigner.prototype.credentialString = function() { + return [ + this.getDate(), + this.region, + this.service, + 'aws4_request', + ].join('/') +} + +RequestSigner.prototype.defaultCredentials = function() { + var env = process.env + return { + accessKeyId: env.AWS_ACCESS_KEY_ID || env.AWS_ACCESS_KEY, + secretAccessKey: env.AWS_SECRET_ACCESS_KEY || env.AWS_SECRET_KEY, + sessionToken: env.AWS_SESSION_TOKEN, + } +} + +RequestSigner.prototype.parsePath = function() { + var path = this.request.path || '/', + queryIx = path.indexOf('?'), + query = null + + if (queryIx >= 0) { + query = querystring.parse(path.slice(queryIx + 1)) + path = path.slice(0, queryIx) + } + + // S3 doesn't always encode characters > 127 correctly and + // all services don't encode characters > 255 correctly + // So if there are non-reserved chars (and it's not already all % encoded), just encode them all + if (/[^0-9A-Za-z!'()*\-._~%/]/.test(path)) { + path = path.split('/').map(function(piece) { + return querystring.escape(querystring.unescape(piece)) + }).join('/') + } + + this.parsedPath = { + path: path, + query: query, + } +} + +RequestSigner.prototype.formatPath = function() { + var path = this.parsedPath.path, + query = this.parsedPath.query + + if (!query) return path + + // Services don't support empty query string keys + if (query[''] != null) delete query[''] + + return path + '?' + encodeRfc3986(querystring.stringify(query)) +} + +aws4.RequestSigner = RequestSigner + +aws4.sign = function(request, credentials) { + return new RequestSigner(request, credentials).sign() +} diff --git a/deps/npm/node_modules/request/node_modules/aws4/example.js b/deps/npm/node_modules/request/node_modules/aws4/example.js new file mode 100644 index 00000000000000..5d075409d5de95 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/aws4/example.js @@ -0,0 +1,371 @@ +var http = require('http'), + https = require('https'), + aws4 = require('aws4') + +// given an options object you could pass to http.request +var opts = {host: 'sqs.us-east-1.amazonaws.com', path: '/?Action=ListQueues'} + +// alternatively (as aws4 can infer the host): +opts = {service: 'sqs', region: 'us-east-1', path: '/?Action=ListQueues'} + +// alternatively (as us-east-1 is default): +opts = {service: 'sqs', path: '/?Action=ListQueues'} + +aws4.sign(opts) // assumes AWS credentials are available in process.env + +console.log(opts) +/* +{ + host: 'sqs.us-east-1.amazonaws.com', + path: '/?Action=ListQueues', + headers: { + Host: 'sqs.us-east-1.amazonaws.com', + 'X-Amz-Date': '20121226T061030Z', + Authorization: 'AWS4-HMAC-SHA256 Credential=ABCDEF/20121226/us-east-1/sqs/aws4_request, ...' + } +} +*/ + +// we can now use this to query AWS using the standard node.js http API +http.request(opts, function(res) { res.pipe(process.stdout) }).end() +/* + + +... +*/ + +// you can also pass AWS credentials in explicitly (otherwise taken from process.env) +aws4.sign(opts, {accessKeyId: '', secretAccessKey: ''}) + +// can also add the signature to query strings +aws4.sign({service: 's3', path: '/my-bucket?X-Amz-Expires=12345', signQuery: true}) + +// create a utility function to pipe to stdout (with https this time) +function request(o) { https.request(o, function(res) { res.pipe(process.stdout) }).end(o.body || '') } + +// aws4 can infer the HTTP method if a body is passed in +// method will be POST and Content-Type: 'application/x-www-form-urlencoded; charset=utf-8' +request(aws4.sign({service: 'iam', body: 'Action=ListGroups&Version=2010-05-08'})) +/* + +... +*/ + +// can specify any custom option or header as per usual +request(aws4.sign({ + service: 'dynamodb', + region: 'ap-southeast-2', + method: 'POST', + path: '/', + headers: { + 'Content-Type': 'application/x-amz-json-1.0', + 'X-Amz-Target': 'DynamoDB_20120810.ListTables' + }, + body: '{}' +})) +/* +{"TableNames":[]} +... +*/ + +// works with all other services that support Signature Version 4 + +request(aws4.sign({service: 's3', path: '/', signQuery: true})) +/* + +... +*/ + +request(aws4.sign({service: 'ec2', path: '/?Action=DescribeRegions&Version=2014-06-15'})) +/* + +... +*/ + +request(aws4.sign({service: 'sns', path: '/?Action=ListTopics&Version=2010-03-31'})) +/* + +... +*/ + +request(aws4.sign({service: 'sts', path: '/?Action=GetSessionToken&Version=2011-06-15'})) +/* + +... +*/ + +request(aws4.sign({service: 'cloudsearch', path: '/?Action=ListDomainNames&Version=2013-01-01'})) +/* + +... +*/ + +request(aws4.sign({service: 'ses', path: '/?Action=ListIdentities&Version=2010-12-01'})) +/* + +... +*/ + +request(aws4.sign({service: 'autoscaling', path: '/?Action=DescribeAutoScalingInstances&Version=2011-01-01'})) +/* + +... +*/ + +request(aws4.sign({service: 'elasticloadbalancing', path: '/?Action=DescribeLoadBalancers&Version=2012-06-01'})) +/* + +... +*/ + +request(aws4.sign({service: 'cloudformation', path: '/?Action=ListStacks&Version=2010-05-15'})) +/* + +... +*/ + +request(aws4.sign({service: 'elasticbeanstalk', path: '/?Action=ListAvailableSolutionStacks&Version=2010-12-01'})) +/* + +... +*/ + +request(aws4.sign({service: 'rds', path: '/?Action=DescribeDBInstances&Version=2012-09-17'})) +/* + +... +*/ + +request(aws4.sign({service: 'monitoring', path: '/?Action=ListMetrics&Version=2010-08-01'})) +/* + +... +*/ + +request(aws4.sign({service: 'redshift', path: '/?Action=DescribeClusters&Version=2012-12-01'})) +/* + +... +*/ + +request(aws4.sign({service: 'cloudfront', path: '/2014-05-31/distribution'})) +/* + +... +*/ + +request(aws4.sign({service: 'elasticache', path: '/?Action=DescribeCacheClusters&Version=2014-07-15'})) +/* + +... +*/ + +request(aws4.sign({service: 'elasticmapreduce', path: '/?Action=DescribeJobFlows&Version=2009-03-31'})) +/* + +... +*/ + +request(aws4.sign({service: 'route53', path: '/2013-04-01/hostedzone'})) +/* + +... +*/ + +request(aws4.sign({service: 'appstream', path: '/applications'})) +/* +{"_links":{"curie":[{"href":"http://docs.aws.amazon.com/appstream/latest/... +... +*/ + +request(aws4.sign({service: 'cognito-sync', path: '/identitypools'})) +/* +{"Count":0,"IdentityPoolUsages":[],"MaxResults":16,"NextToken":null} +... +*/ + +request(aws4.sign({service: 'elastictranscoder', path: '/2012-09-25/pipelines'})) +/* +{"NextPageToken":null,"Pipelines":[]} +... +*/ + +request(aws4.sign({service: 'lambda', path: '/2014-11-13/functions/'})) +/* +{"Functions":[],"NextMarker":null} +... +*/ + +request(aws4.sign({service: 'ecs', path: '/?Action=ListClusters&Version=2014-11-13'})) +/* + +... +*/ + +request(aws4.sign({service: 'glacier', path: '/-/vaults', headers: {'X-Amz-Glacier-Version': '2012-06-01'}})) +/* +{"Marker":null,"VaultList":[]} +... +*/ + +request(aws4.sign({service: 'storagegateway', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'StorageGateway_20120630.ListGateways' +}})) +/* +{"Gateways":[]} +... +*/ + +request(aws4.sign({service: 'datapipeline', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'DataPipeline.ListPipelines' +}})) +/* +{"hasMoreResults":false,"pipelineIdList":[]} +... +*/ + +request(aws4.sign({service: 'opsworks', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'OpsWorks_20130218.DescribeStacks' +}})) +/* +{"Stacks":[]} +... +*/ + +request(aws4.sign({service: 'route53domains', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'Route53Domains_v20140515.ListDomains' +}})) +/* +{"Domains":[]} +... +*/ + +request(aws4.sign({service: 'kinesis', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'Kinesis_20131202.ListStreams' +}})) +/* +{"HasMoreStreams":false,"StreamNames":[]} +... +*/ + +request(aws4.sign({service: 'cloudtrail', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'CloudTrail_20131101.DescribeTrails' +}})) +/* +{"trailList":[]} +... +*/ + +request(aws4.sign({service: 'logs', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'Logs_20140328.DescribeLogGroups' +}})) +/* +{"logGroups":[]} +... +*/ + +request(aws4.sign({service: 'codedeploy', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'CodeDeploy_20141006.ListApplications' +}})) +/* +{"applications":[]} +... +*/ + +request(aws4.sign({service: 'directconnect', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'OvertureService.DescribeConnections' +}})) +/* +{"connections":[]} +... +*/ + +request(aws4.sign({service: 'kms', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'TrentService.ListKeys' +}})) +/* +{"Keys":[],"Truncated":false} +... +*/ + +request(aws4.sign({service: 'config', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'StarlingDoveService.DescribeDeliveryChannels' +}})) +/* +{"DeliveryChannels":[]} +... +*/ + +request(aws4.sign({service: 'cloudhsm', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'CloudHsmFrontendService.ListAvailableZones' +}})) +/* +{"AZList":["us-east-1a","us-east-1b","us-east-1c"]} +... +*/ + +request(aws4.sign({ + service: 'swf', + body: '{"registrationStatus":"REGISTERED"}', + headers: { + 'Content-Type': 'application/x-amz-json-1.0', + 'X-Amz-Target': 'SimpleWorkflowService.ListDomains' + } +})) +/* +{"domainInfos":[]} +... +*/ + +request(aws4.sign({ + service: 'cognito-identity', + body: '{"MaxResults": 1}', + headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'AWSCognitoIdentityService.ListIdentityPools' + } +})) +/* +{"IdentityPools":[]} +... +*/ + +request(aws4.sign({ + service: 'mobileanalytics', + path: '/2014-06-05/events', + body: JSON.stringify({events:[{ + eventType: 'a', + timestamp: new Date().toISOString(), + session: {}, + }]}), + headers: { + 'Content-Type': 'application/json', + 'X-Amz-Client-Context': JSON.stringify({ + client: {client_id: 'a', app_title: 'a'}, + custom: {}, + env: {platform: 'a'}, + services: {}, + }), + } +})) +/* +(HTTP 202, empty response) +*/ + +// Still not updated to v4... + +//request(aws4.sign({service: 'importexport', path: '/?Action=ListJobs&Version=2010-06-01'})) + +//request(aws4.sign({service: 'sdb', path: '/?Action=ListDomains&Version=2009-04-15'})) diff --git a/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/.npmignore b/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/.npmignore new file mode 100644 index 00000000000000..07e6e472cc75fa --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/.npmignore @@ -0,0 +1 @@ +/node_modules diff --git a/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/.travis.yml b/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/.travis.yml new file mode 100644 index 00000000000000..4af02b3d17e64c --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - '0.8' + - '0.10' + - '0.12' + - 'iojs' +before_install: + - npm install -g npm@latest diff --git a/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/CONTRIBUTORS b/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/CONTRIBUTORS new file mode 100644 index 00000000000000..4a0bc5033a06e7 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/CONTRIBUTORS @@ -0,0 +1,14 @@ +# Authors, sorted by whether or not they are me +Isaac Z. Schlueter +Brian Cottingham +Carlos Brito Lage +Jesse Dailey +Kevin O'Hara +Marco Rogers +Mark Cavage +Marko Mikulicic +Nathan Rajlich +Satheesh Natesan +Trent Mick +ashleybrener +n4kz diff --git a/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/LICENSE b/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/LICENSE new file mode 100644 index 00000000000000..19129e315fe593 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/README.md b/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/README.md new file mode 100644 index 00000000000000..c06814e0414d56 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/README.md @@ -0,0 +1,137 @@ +# lru cache + +A cache object that deletes the least-recently-used items. + +## Usage: + +```javascript +var LRU = require("lru-cache") + , options = { max: 500 + , length: function (n) { return n * 2 } + , dispose: function (key, n) { n.close() } + , maxAge: 1000 * 60 * 60 } + , cache = LRU(options) + , otherCache = LRU(50) // sets just the max size + +cache.set("key", "value") +cache.get("key") // "value" + +cache.reset() // empty the cache +``` + +If you put more stuff in it, then items will fall out. + +If you try to put an oversized thing in it, then it'll fall out right +away. + +## Keys should always be Strings or Numbers + +Note: this module will print warnings to `console.error` if you use a +key that is not a String or Number. Because items are stored in an +object, which coerces keys to a string, it won't go well for you if +you try to use a key that is not a unique string, it'll cause surprise +collisions. For example: + +```JavaScript +// Bad Example! Dont' do this! +var cache = LRU() +var a = {} +var b = {} +cache.set(a, 'this is a') +cache.set(b, 'this is b') +console.log(cache.get(a)) // prints: 'this is b' +``` + +## Options + +* `max` The maximum size of the cache, checked by applying the length + function to all values in the cache. Not setting this is kind of + silly, since that's the whole purpose of this lib, but it defaults + to `Infinity`. +* `maxAge` Maximum age in ms. Items are not pro-actively pruned out + as they age, but if you try to get an item that is too old, it'll + drop it and return undefined instead of giving it to you. +* `length` Function that is used to calculate the length of stored + items. If you're storing strings or buffers, then you probably want + to do something like `function(n){return n.length}`. The default is + `function(n){return 1}`, which is fine if you want to store `max` + like-sized things. +* `dispose` Function that is called on items when they are dropped + from the cache. This can be handy if you want to close file + descriptors or do other cleanup tasks when items are no longer + accessible. Called with `key, value`. It's called *before* + actually removing the item from the internal cache, so if you want + to immediately put it back in, you'll have to do that in a + `nextTick` or `setTimeout` callback or it won't do anything. +* `stale` By default, if you set a `maxAge`, it'll only actually pull + stale items out of the cache when you `get(key)`. (That is, it's + not pre-emptively doing a `setTimeout` or anything.) If you set + `stale:true`, it'll return the stale value before deleting it. If + you don't set this, then it'll return `undefined` when you try to + get a stale entry, as if it had already been deleted. + +## API + +* `set(key, value, maxAge)` +* `get(key) => value` + + Both of these will update the "recently used"-ness of the key. + They do what you think. `max` is optional and overrides the + cache `max` option if provided. + +* `peek(key)` + + Returns the key value (or `undefined` if not found) without + updating the "recently used"-ness of the key. + + (If you find yourself using this a lot, you *might* be using the + wrong sort of data structure, but there are some use cases where + it's handy.) + +* `del(key)` + + Deletes a key out of the cache. + +* `reset()` + + Clear the cache entirely, throwing away all values. + +* `has(key)` + + Check if a key is in the cache, without updating the recent-ness + or deleting it for being stale. + +* `forEach(function(value,key,cache), [thisp])` + + Just like `Array.prototype.forEach`. Iterates over all the keys + in the cache, in order of recent-ness. (Ie, more recently used + items are iterated over first.) + +* `keys()` + + Return an array of the keys in the cache. + +* `values()` + + Return an array of the values in the cache. + +* `length()` + + Return total length of objects in cache taking into account + `length` options function. + +* `itemCount` + + Return total quantity of objects currently in cache. Note, that + `stale` (see options) items are returned as part of this item + count. + +* `dump()` + + Return an array of the cache entries ready for serialization and usage + with 'destinationCache.load(arr)`. + +* `load(cacheEntriesArray)` + + Loads another cache entries array, obtained with `sourceCache.dump()`, + into the cache. The destination cache is reset before loading new entries diff --git a/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/lib/lru-cache.js b/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/lib/lru-cache.js new file mode 100644 index 00000000000000..2bbe653be8ad08 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/lib/lru-cache.js @@ -0,0 +1,334 @@ +;(function () { // closure for web browsers + +if (typeof module === 'object' && module.exports) { + module.exports = LRUCache +} else { + // just set the global for non-node platforms. + this.LRUCache = LRUCache +} + +function hOP (obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key) +} + +function naiveLength () { return 1 } + +var didTypeWarning = false +function typeCheckKey(key) { + if (!didTypeWarning && typeof key !== 'string' && typeof key !== 'number') { + didTypeWarning = true + console.error(new TypeError("LRU: key must be a string or number. Almost certainly a bug! " + typeof key).stack) + } +} + +function LRUCache (options) { + if (!(this instanceof LRUCache)) + return new LRUCache(options) + + if (typeof options === 'number') + options = { max: options } + + if (!options) + options = {} + + this._max = options.max + // Kind of weird to have a default max of Infinity, but oh well. + if (!this._max || !(typeof this._max === "number") || this._max <= 0 ) + this._max = Infinity + + this._lengthCalculator = options.length || naiveLength + if (typeof this._lengthCalculator !== "function") + this._lengthCalculator = naiveLength + + this._allowStale = options.stale || false + this._maxAge = options.maxAge || null + this._dispose = options.dispose + this.reset() +} + +// resize the cache when the max changes. +Object.defineProperty(LRUCache.prototype, "max", + { set : function (mL) { + if (!mL || !(typeof mL === "number") || mL <= 0 ) mL = Infinity + this._max = mL + if (this._length > this._max) trim(this) + } + , get : function () { return this._max } + , enumerable : true + }) + +// resize the cache when the lengthCalculator changes. +Object.defineProperty(LRUCache.prototype, "lengthCalculator", + { set : function (lC) { + if (typeof lC !== "function") { + this._lengthCalculator = naiveLength + this._length = this._itemCount + for (var key in this._cache) { + this._cache[key].length = 1 + } + } else { + this._lengthCalculator = lC + this._length = 0 + for (var key in this._cache) { + this._cache[key].length = this._lengthCalculator(this._cache[key].value) + this._length += this._cache[key].length + } + } + + if (this._length > this._max) trim(this) + } + , get : function () { return this._lengthCalculator } + , enumerable : true + }) + +Object.defineProperty(LRUCache.prototype, "length", + { get : function () { return this._length } + , enumerable : true + }) + + +Object.defineProperty(LRUCache.prototype, "itemCount", + { get : function () { return this._itemCount } + , enumerable : true + }) + +LRUCache.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + var i = 0 + var itemCount = this._itemCount + + for (var k = this._mru - 1; k >= 0 && i < itemCount; k--) if (this._lruList[k]) { + i++ + var hit = this._lruList[k] + if (isStale(this, hit)) { + del(this, hit) + if (!this._allowStale) hit = undefined + } + if (hit) { + fn.call(thisp, hit.value, hit.key, this) + } + } +} + +LRUCache.prototype.keys = function () { + var keys = new Array(this._itemCount) + var i = 0 + for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { + var hit = this._lruList[k] + keys[i++] = hit.key + } + return keys +} + +LRUCache.prototype.values = function () { + var values = new Array(this._itemCount) + var i = 0 + for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { + var hit = this._lruList[k] + values[i++] = hit.value + } + return values +} + +LRUCache.prototype.reset = function () { + if (this._dispose && this._cache) { + for (var k in this._cache) { + this._dispose(k, this._cache[k].value) + } + } + + this._cache = Object.create(null) // hash of items by key + this._lruList = Object.create(null) // list of items in order of use recency + this._mru = 0 // most recently used + this._lru = 0 // least recently used + this._length = 0 // number of items in the list + this._itemCount = 0 +} + +LRUCache.prototype.dump = function () { + var arr = [] + var i = 0 + + for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { + var hit = this._lruList[k] + if (!isStale(this, hit)) { + //Do not store staled hits + ++i + arr.push({ + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0) + }); + } + } + //arr has the most read first + return arr +} + +LRUCache.prototype.dumpLru = function () { + return this._lruList +} + +LRUCache.prototype.set = function (key, value, maxAge) { + maxAge = maxAge || this._maxAge + typeCheckKey(key) + + var now = maxAge ? Date.now() : 0 + var len = this._lengthCalculator(value) + + if (hOP(this._cache, key)) { + if (len > this._max) { + del(this, this._cache[key]) + return false + } + // dispose of the old one before overwriting + if (this._dispose) + this._dispose(key, this._cache[key].value) + + this._cache[key].now = now + this._cache[key].maxAge = maxAge + this._cache[key].value = value + this._length += (len - this._cache[key].length) + this._cache[key].length = len + this.get(key) + + if (this._length > this._max) + trim(this) + + return true + } + + var hit = new Entry(key, value, this._mru++, len, now, maxAge) + + // oversized objects fall out of cache automatically. + if (hit.length > this._max) { + if (this._dispose) this._dispose(key, value) + return false + } + + this._length += hit.length + this._lruList[hit.lu] = this._cache[key] = hit + this._itemCount ++ + + if (this._length > this._max) + trim(this) + + return true +} + +LRUCache.prototype.has = function (key) { + typeCheckKey(key) + if (!hOP(this._cache, key)) return false + var hit = this._cache[key] + if (isStale(this, hit)) { + return false + } + return true +} + +LRUCache.prototype.get = function (key) { + typeCheckKey(key) + return get(this, key, true) +} + +LRUCache.prototype.peek = function (key) { + typeCheckKey(key) + return get(this, key, false) +} + +LRUCache.prototype.pop = function () { + var hit = this._lruList[this._lru] + del(this, hit) + return hit || null +} + +LRUCache.prototype.del = function (key) { + typeCheckKey(key) + del(this, this._cache[key]) +} + +LRUCache.prototype.load = function (arr) { + //reset the cache + this.reset(); + + var now = Date.now() + //A previous serialized cache has the most recent items first + for (var l = arr.length - 1; l >= 0; l-- ) { + var hit = arr[l] + typeCheckKey(hit.k) + var expiresAt = hit.e || 0 + if (expiresAt === 0) { + //the item was created without expiration in a non aged cache + this.set(hit.k, hit.v) + } else { + var maxAge = expiresAt - now + //dont add already expired items + if (maxAge > 0) this.set(hit.k, hit.v, maxAge) + } + } +} + +function get (self, key, doUse) { + typeCheckKey(key) + var hit = self._cache[key] + if (hit) { + if (isStale(self, hit)) { + del(self, hit) + if (!self._allowStale) hit = undefined + } else { + if (doUse) use(self, hit) + } + if (hit) hit = hit.value + } + return hit +} + +function isStale(self, hit) { + if (!hit || (!hit.maxAge && !self._maxAge)) return false + var stale = false; + var diff = Date.now() - hit.now + if (hit.maxAge) { + stale = diff > hit.maxAge + } else { + stale = self._maxAge && (diff > self._maxAge) + } + return stale; +} + +function use (self, hit) { + shiftLU(self, hit) + hit.lu = self._mru ++ + self._lruList[hit.lu] = hit +} + +function trim (self) { + while (self._lru < self._mru && self._length > self._max) + del(self, self._lruList[self._lru]) +} + +function shiftLU (self, hit) { + delete self._lruList[ hit.lu ] + while (self._lru < self._mru && !self._lruList[self._lru]) self._lru ++ +} + +function del (self, hit) { + if (hit) { + if (self._dispose) self._dispose(hit.key, hit.value) + self._length -= hit.length + self._itemCount -- + delete self._cache[ hit.key ] + shiftLU(self, hit) + } +} + +// classy, since V8 prefers predictable objects. +function Entry (key, value, lu, length, now, maxAge) { + this.key = key + this.value = value + this.lu = lu + this.length = length + this.now = now + if (maxAge) this.maxAge = maxAge +} + +})() diff --git a/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/package.json b/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/package.json new file mode 100644 index 00000000000000..501c3e735fa4d3 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/package.json @@ -0,0 +1,84 @@ +{ + "_args": [ + [ + "lru-cache@^2.6.5", + "/Users/rebecca/code/npm/node_modules/request/node_modules/aws4" + ] + ], + "_from": "lru-cache@>=2.6.5 <3.0.0", + "_id": "lru-cache@2.7.3", + "_inCache": true, + "_installable": true, + "_location": "/request/aws4/lru-cache", + "_nodeVersion": "4.0.0", + "_npmUser": { + "email": "i@izs.me", + "name": "isaacs" + }, + "_npmVersion": "3.3.2", + "_phantomChildren": {}, + "_requested": { + "name": "lru-cache", + "raw": "lru-cache@^2.6.5", + "rawSpec": "^2.6.5", + "scope": null, + "spec": ">=2.6.5 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/request/aws4" + ], + "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", + "_shasum": "6d4524e8b955f95d4f5b58851ce21dd72fb4e952", + "_shrinkwrap": null, + "_spec": "lru-cache@^2.6.5", + "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/aws4", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter" + }, + "bugs": { + "url": "https://github.com/isaacs/node-lru-cache/issues" + }, + "dependencies": {}, + "description": "A cache object that deletes the least-recently-used items.", + "devDependencies": { + "tap": "^1.2.0", + "weak": "" + }, + "directories": {}, + "dist": { + "shasum": "6d4524e8b955f95d4f5b58851ce21dd72fb4e952", + "tarball": "http://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz" + }, + "gitHead": "292048199f6d28b77fbe584279a1898e25e4c714", + "homepage": "https://github.com/isaacs/node-lru-cache#readme", + "keywords": [ + "cache", + "lru", + "mru" + ], + "license": "ISC", + "main": "lib/lru-cache.js", + "maintainers": [ + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + } + ], + "name": "lru-cache", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-lru-cache.git" + }, + "scripts": { + "test": "tap test --gc" + }, + "version": "2.7.3" +} diff --git a/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/test/basic.js b/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/test/basic.js new file mode 100644 index 00000000000000..b47225f109891f --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/test/basic.js @@ -0,0 +1,396 @@ +var test = require("tap").test + , LRU = require("../") + +test("basic", function (t) { + var cache = new LRU({max: 10}) + cache.set("key", "value") + t.equal(cache.get("key"), "value") + t.equal(cache.get("nada"), undefined) + t.equal(cache.length, 1) + t.equal(cache.max, 10) + t.end() +}) + +test("least recently set", function (t) { + var cache = new LRU(2) + cache.set("a", "A") + cache.set("b", "B") + cache.set("c", "C") + t.equal(cache.get("c"), "C") + t.equal(cache.get("b"), "B") + t.equal(cache.get("a"), undefined) + t.end() +}) + +test("lru recently gotten", function (t) { + var cache = new LRU(2) + cache.set("a", "A") + cache.set("b", "B") + cache.get("a") + cache.set("c", "C") + t.equal(cache.get("c"), "C") + t.equal(cache.get("b"), undefined) + t.equal(cache.get("a"), "A") + t.end() +}) + +test("del", function (t) { + var cache = new LRU(2) + cache.set("a", "A") + cache.del("a") + t.equal(cache.get("a"), undefined) + t.end() +}) + +test("max", function (t) { + var cache = new LRU(3) + + // test changing the max, verify that the LRU items get dropped. + cache.max = 100 + for (var i = 0; i < 100; i ++) cache.set(i, i) + t.equal(cache.length, 100) + for (var i = 0; i < 100; i ++) { + t.equal(cache.get(i), i) + } + cache.max = 3 + t.equal(cache.length, 3) + for (var i = 0; i < 97; i ++) { + t.equal(cache.get(i), undefined) + } + for (var i = 98; i < 100; i ++) { + t.equal(cache.get(i), i) + } + + // now remove the max restriction, and try again. + cache.max = "hello" + for (var i = 0; i < 100; i ++) cache.set(i, i) + t.equal(cache.length, 100) + for (var i = 0; i < 100; i ++) { + t.equal(cache.get(i), i) + } + // should trigger an immediate resize + cache.max = 3 + t.equal(cache.length, 3) + for (var i = 0; i < 97; i ++) { + t.equal(cache.get(i), undefined) + } + for (var i = 98; i < 100; i ++) { + t.equal(cache.get(i), i) + } + t.end() +}) + +test("reset", function (t) { + var cache = new LRU(10) + cache.set("a", "A") + cache.set("b", "B") + cache.reset() + t.equal(cache.length, 0) + t.equal(cache.max, 10) + t.equal(cache.get("a"), undefined) + t.equal(cache.get("b"), undefined) + t.end() +}) + + +test("basic with weighed length", function (t) { + var cache = new LRU({ + max: 100, + length: function (item) { return item.size } + }) + cache.set("key", {val: "value", size: 50}) + t.equal(cache.get("key").val, "value") + t.equal(cache.get("nada"), undefined) + t.equal(cache.lengthCalculator(cache.get("key")), 50) + t.equal(cache.length, 50) + t.equal(cache.max, 100) + t.end() +}) + + +test("weighed length item too large", function (t) { + var cache = new LRU({ + max: 10, + length: function (item) { return item.size } + }) + t.equal(cache.max, 10) + + // should fall out immediately + cache.set("key", {val: "value", size: 50}) + + t.equal(cache.length, 0) + t.equal(cache.get("key"), undefined) + t.end() +}) + +test("least recently set with weighed length", function (t) { + var cache = new LRU({ + max:8, + length: function (item) { return item.length } + }) + cache.set("a", "A") + cache.set("b", "BB") + cache.set("c", "CCC") + cache.set("d", "DDDD") + t.equal(cache.get("d"), "DDDD") + t.equal(cache.get("c"), "CCC") + t.equal(cache.get("b"), undefined) + t.equal(cache.get("a"), undefined) + t.end() +}) + +test("lru recently gotten with weighed length", function (t) { + var cache = new LRU({ + max: 8, + length: function (item) { return item.length } + }) + cache.set("a", "A") + cache.set("b", "BB") + cache.set("c", "CCC") + cache.get("a") + cache.get("b") + cache.set("d", "DDDD") + t.equal(cache.get("c"), undefined) + t.equal(cache.get("d"), "DDDD") + t.equal(cache.get("b"), "BB") + t.equal(cache.get("a"), "A") + t.end() +}) + +test("lru recently updated with weighed length", function (t) { + var cache = new LRU({ + max: 8, + length: function (item) { return item.length } + }) + cache.set("a", "A") + cache.set("b", "BB") + cache.set("c", "CCC") + t.equal(cache.length, 6) //CCC BB A + cache.set("a", "+A") + t.equal(cache.length, 7) //+A CCC BB + cache.set("b", "++BB") + t.equal(cache.length, 6) //++BB +A + t.equal(cache.get("c"), undefined) + + cache.set("c", "oversized") + t.equal(cache.length, 6) //++BB +A + t.equal(cache.get("c"), undefined) + + cache.set("a", "oversized") + t.equal(cache.length, 4) //++BB + t.equal(cache.get("a"), undefined) + t.equal(cache.get("b"), "++BB") + t.end() +}) + +test("set returns proper booleans", function(t) { + var cache = new LRU({ + max: 5, + length: function (item) { return item.length } + }) + + t.equal(cache.set("a", "A"), true) + + // should return false for max exceeded + t.equal(cache.set("b", "donuts"), false) + + t.equal(cache.set("b", "B"), true) + t.equal(cache.set("c", "CCCC"), true) + t.end() +}) + +test("drop the old items", function(t) { + var cache = new LRU({ + max: 5, + maxAge: 50 + }) + + cache.set("a", "A") + + setTimeout(function () { + cache.set("b", "b") + t.equal(cache.get("a"), "A") + }, 25) + + setTimeout(function () { + cache.set("c", "C") + // timed out + t.notOk(cache.get("a")) + }, 60 + 25) + + setTimeout(function () { + t.notOk(cache.get("b")) + t.equal(cache.get("c"), "C") + }, 90) + + setTimeout(function () { + t.notOk(cache.get("c")) + t.end() + }, 155) +}) + +test("individual item can have it's own maxAge", function(t) { + var cache = new LRU({ + max: 5, + maxAge: 50 + }) + + cache.set("a", "A", 20) + setTimeout(function () { + t.notOk(cache.get("a")) + t.end() + }, 25) +}) + +test("individual item can have it's own maxAge > cache's", function(t) { + var cache = new LRU({ + max: 5, + maxAge: 20 + }) + + cache.set("a", "A", 50) + setTimeout(function () { + t.equal(cache.get("a"), "A") + t.end() + }, 25) +}) + +test("disposal function", function(t) { + var disposed = false + var cache = new LRU({ + max: 1, + dispose: function (k, n) { + disposed = n + } + }) + + cache.set(1, 1) + cache.set(2, 2) + t.equal(disposed, 1) + cache.set(3, 3) + t.equal(disposed, 2) + cache.reset() + t.equal(disposed, 3) + t.end() +}) + +test("disposal function on too big of item", function(t) { + var disposed = false + var cache = new LRU({ + max: 1, + length: function (k) { + return k.length + }, + dispose: function (k, n) { + disposed = n + } + }) + var obj = [ 1, 2 ] + + t.equal(disposed, false) + cache.set("obj", obj) + t.equal(disposed, obj) + t.end() +}) + +test("has()", function(t) { + var cache = new LRU({ + max: 1, + maxAge: 10 + }) + + cache.set('foo', 'bar') + t.equal(cache.has('foo'), true) + cache.set('blu', 'baz') + t.equal(cache.has('foo'), false) + t.equal(cache.has('blu'), true) + setTimeout(function() { + t.equal(cache.has('blu'), false) + t.end() + }, 15) +}) + +test("stale", function(t) { + var cache = new LRU({ + maxAge: 10, + stale: true + }) + + cache.set('foo', 'bar') + t.equal(cache.get('foo'), 'bar') + t.equal(cache.has('foo'), true) + setTimeout(function() { + t.equal(cache.has('foo'), false) + t.equal(cache.get('foo'), 'bar') + t.equal(cache.get('foo'), undefined) + t.end() + }, 15) +}) + +test("lru update via set", function(t) { + var cache = LRU({ max: 2 }); + + cache.set('foo', 1); + cache.set('bar', 2); + cache.del('bar'); + cache.set('baz', 3); + cache.set('qux', 4); + + t.equal(cache.get('foo'), undefined) + t.equal(cache.get('bar'), undefined) + t.equal(cache.get('baz'), 3) + t.equal(cache.get('qux'), 4) + t.end() +}) + +test("least recently set w/ peek", function (t) { + var cache = new LRU(2) + cache.set("a", "A") + cache.set("b", "B") + t.equal(cache.peek("a"), "A") + cache.set("c", "C") + t.equal(cache.get("c"), "C") + t.equal(cache.get("b"), "B") + t.equal(cache.get("a"), undefined) + t.end() +}) + +test("pop the least used item", function (t) { + var cache = new LRU(3) + , last + + cache.set("a", "A") + cache.set("b", "B") + cache.set("c", "C") + + t.equal(cache.length, 3) + t.equal(cache.max, 3) + + // Ensure we pop a, c, b + cache.get("b", "B") + + last = cache.pop() + t.equal(last.key, "a") + t.equal(last.value, "A") + t.equal(cache.length, 2) + t.equal(cache.max, 3) + + last = cache.pop() + t.equal(last.key, "c") + t.equal(last.value, "C") + t.equal(cache.length, 1) + t.equal(cache.max, 3) + + last = cache.pop() + t.equal(last.key, "b") + t.equal(last.value, "B") + t.equal(cache.length, 0) + t.equal(cache.max, 3) + + last = cache.pop() + t.equal(last, null) + t.equal(cache.length, 0) + t.equal(cache.max, 3) + + t.end() +}) diff --git a/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/test/foreach.js b/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/test/foreach.js new file mode 100644 index 00000000000000..4190417cbc61d8 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/test/foreach.js @@ -0,0 +1,120 @@ +var test = require('tap').test +var LRU = require('../') + +test('forEach', function (t) { + var l = new LRU(5) + for (var i = 0; i < 10; i ++) { + l.set(i.toString(), i.toString(2)) + } + + var i = 9 + l.forEach(function (val, key, cache) { + t.equal(cache, l) + t.equal(key, i.toString()) + t.equal(val, i.toString(2)) + i -= 1 + }) + + // get in order of most recently used + l.get(6) + l.get(8) + + var order = [ 8, 6, 9, 7, 5 ] + var i = 0 + + l.forEach(function (val, key, cache) { + var j = order[i ++] + t.equal(cache, l) + t.equal(key, j.toString()) + t.equal(val, j.toString(2)) + }) + t.equal(i, order.length); + + t.end() +}) + +test('keys() and values()', function (t) { + var l = new LRU(5) + for (var i = 0; i < 10; i ++) { + l.set(i.toString(), i.toString(2)) + } + + t.similar(l.keys(), ['9', '8', '7', '6', '5']) + t.similar(l.values(), ['1001', '1000', '111', '110', '101']) + + // get in order of most recently used + l.get(6) + l.get(8) + + t.similar(l.keys(), ['8', '6', '9', '7', '5']) + t.similar(l.values(), ['1000', '110', '1001', '111', '101']) + + t.end() +}) + +test('all entries are iterated over', function(t) { + var l = new LRU(5) + for (var i = 0; i < 10; i ++) { + l.set(i.toString(), i.toString(2)) + } + + var i = 0 + l.forEach(function (val, key, cache) { + if (i > 0) { + cache.del(key) + } + i += 1 + }) + + t.equal(i, 5) + t.equal(l.keys().length, 1) + + t.end() +}) + +test('all stale entries are removed', function(t) { + var l = new LRU({ max: 5, maxAge: -5, stale: true }) + for (var i = 0; i < 10; i ++) { + l.set(i.toString(), i.toString(2)) + } + + var i = 0 + l.forEach(function () { + i += 1 + }) + + t.equal(i, 5) + t.equal(l.keys().length, 0) + + t.end() +}) + +test('expires', function (t) { + var l = new LRU({ + max: 10, + maxAge: 50 + }) + for (var i = 0; i < 10; i++) { + l.set(i.toString(), i.toString(2), ((i % 2) ? 25 : undefined)) + } + + var i = 0 + var order = [ 8, 6, 4, 2, 0 ] + setTimeout(function () { + l.forEach(function (val, key, cache) { + var j = order[i++] + t.equal(cache, l) + t.equal(key, j.toString()) + t.equal(val, j.toString(2)) + }) + t.equal(i, order.length); + + setTimeout(function () { + var count = 0; + l.forEach(function (val, key, cache) { count++; }) + t.equal(0, count); + t.end() + }, 25) + + }, 26) +}) diff --git a/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/test/memory-leak.js b/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/test/memory-leak.js new file mode 100644 index 00000000000000..b5912f6f168e5e --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/test/memory-leak.js @@ -0,0 +1,51 @@ +#!/usr/bin/env node --expose_gc + + +var weak = require('weak'); +var test = require('tap').test +var LRU = require('../') +var l = new LRU({ max: 10 }) +var refs = 0 +function X() { + refs ++ + weak(this, deref) +} + +function deref() { + refs -- +} + +test('no leaks', function (t) { + // fill up the cache + for (var i = 0; i < 100; i++) { + l.set(i, new X); + // throw some gets in there, too. + if (i % 2 === 0) + l.get(i / 2) + } + + gc() + + var start = process.memoryUsage() + + // capture the memory + var startRefs = refs + + // do it again, but more + for (var i = 0; i < 10000; i++) { + l.set(i, new X); + // throw some gets in there, too. + if (i % 2 === 0) + l.get(i / 2) + } + + gc() + + var end = process.memoryUsage() + t.equal(refs, startRefs, 'no leaky refs') + + console.error('start: %j\n' + + 'end: %j', start, end); + t.pass(); + t.end(); +}) diff --git a/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/test/serialize.js b/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/test/serialize.js new file mode 100644 index 00000000000000..5fe5dc3d371f1e --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/aws4/node_modules/lru-cache/test/serialize.js @@ -0,0 +1,215 @@ +var test = require('tap').test +var LRU = require('../') + +test('dump', function (t) { + var cache = new LRU() + + t.equal(cache.dump().length, 0, "nothing in dump for empty cache") + + cache.set("a", "A") + cache.set("b", "B") + t.deepEqual(cache.dump(), [ + { k: "b", v: "B", e: 0 }, + { k: "a", v: "A", e: 0 } + ]) + + cache.set("a", "A"); + t.deepEqual(cache.dump(), [ + { k: "a", v: "A", e: 0 }, + { k: "b", v: "B", e: 0 } + ]) + + cache.get("b"); + t.deepEqual(cache.dump(), [ + { k: "b", v: "B", e: 0 }, + { k: "a", v: "A", e: 0 } + ]) + + cache.del("a"); + t.deepEqual(cache.dump(), [ + { k: "b", v: "B", e: 0 } + ]) + + t.end() +}) + +test("do not dump stale items", function(t) { + var cache = new LRU({ + max: 5, + maxAge: 50 + }) + + //expires at 50 + cache.set("a", "A") + + setTimeout(function () { + //expires at 75 + cache.set("b", "B") + var s = cache.dump() + t.equal(s.length, 2) + t.equal(s[0].k, "b") + t.equal(s[1].k, "a") + }, 25) + + setTimeout(function () { + //expires at 110 + cache.set("c", "C") + var s = cache.dump() + t.equal(s.length, 2) + t.equal(s[0].k, "c") + t.equal(s[1].k, "b") + }, 60) + + setTimeout(function () { + //expires at 130 + cache.set("d", "D", 40) + var s = cache.dump() + t.equal(s.length, 2) + t.equal(s[0].k, "d") + t.equal(s[1].k, "c") + }, 90) + + setTimeout(function () { + var s = cache.dump() + t.equal(s.length, 1) + t.equal(s[0].k, "d") + }, 120) + + setTimeout(function () { + var s = cache.dump() + t.deepEqual(s, []) + t.end() + }, 155) +}) + +test("load basic cache", function(t) { + var cache = new LRU(), + copy = new LRU() + + cache.set("a", "A") + cache.set("b", "B") + + copy.load(cache.dump()) + t.deepEquals(cache.dump(), copy.dump()) + + t.end() +}) + + +test("load staled cache", function(t) { + var cache = new LRU({maxAge: 50}), + copy = new LRU({maxAge: 50}), + arr + + //expires at 50 + cache.set("a", "A") + setTimeout(function () { + //expires at 80 + cache.set("b", "B") + arr = cache.dump() + t.equal(arr.length, 2) + }, 30) + + setTimeout(function () { + copy.load(arr) + t.equal(copy.get("a"), undefined) + t.equal(copy.get("b"), "B") + }, 60) + + setTimeout(function () { + t.equal(copy.get("b"), undefined) + t.end() + }, 90) +}) + +test("load to other size cache", function(t) { + var cache = new LRU({max: 2}), + copy = new LRU({max: 1}) + + cache.set("a", "A") + cache.set("b", "B") + + copy.load(cache.dump()) + t.equal(copy.get("a"), undefined) + t.equal(copy.get("b"), "B") + + //update the last read from original cache + cache.get("a") + copy.load(cache.dump()) + t.equal(copy.get("a"), "A") + t.equal(copy.get("b"), undefined) + + t.end() +}) + + +test("load to other age cache", function(t) { + var cache = new LRU({maxAge: 50}), + aged = new LRU({maxAge: 100}), + simple = new LRU(), + arr, + expired + + //created at 0 + //a would be valid till 0 + 50 + cache.set("a", "A") + setTimeout(function () { + //created at 20 + //b would be valid till 20 + 50 + cache.set("b", "B") + //b would be valid till 20 + 70 + cache.set("c", "C", 70) + arr = cache.dump() + t.equal(arr.length, 3) + }, 20) + + setTimeout(function () { + t.equal(cache.get("a"), undefined) + t.equal(cache.get("b"), "B") + t.equal(cache.get("c"), "C") + + aged.load(arr) + t.equal(aged.get("a"), undefined) + t.equal(aged.get("b"), "B") + t.equal(aged.get("c"), "C") + + simple.load(arr) + t.equal(simple.get("a"), undefined) + t.equal(simple.get("b"), "B") + t.equal(simple.get("c"), "C") + }, 60) + + setTimeout(function () { + t.equal(cache.get("a"), undefined) + t.equal(cache.get("b"), undefined) + t.equal(cache.get("c"), "C") + + aged.load(arr) + t.equal(aged.get("a"), undefined) + t.equal(aged.get("b"), undefined) + t.equal(aged.get("c"), "C") + + simple.load(arr) + t.equal(simple.get("a"), undefined) + t.equal(simple.get("b"), undefined) + t.equal(simple.get("c"), "C") + }, 80) + + setTimeout(function () { + t.equal(cache.get("a"), undefined) + t.equal(cache.get("b"), undefined) + t.equal(cache.get("c"), undefined) + + aged.load(arr) + t.equal(aged.get("a"), undefined) + t.equal(aged.get("b"), undefined) + t.equal(aged.get("c"), undefined) + + simple.load(arr) + t.equal(simple.get("a"), undefined) + t.equal(simple.get("b"), undefined) + t.equal(simple.get("c"), undefined) + t.end() + }, 100) + +}) diff --git a/deps/npm/node_modules/request/node_modules/aws4/package.json b/deps/npm/node_modules/request/node_modules/aws4/package.json new file mode 100644 index 00000000000000..31de63b47c1dc4 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/aws4/package.json @@ -0,0 +1,130 @@ +{ + "_args": [ + [ + "aws4@^1.2.1", + "/Users/rebecca/code/npm/node_modules/request" + ] + ], + "_from": "aws4@>=1.2.1 <2.0.0", + "_id": "aws4@1.2.1", + "_inCache": true, + "_installable": true, + "_location": "/request/aws4", + "_nodeVersion": "4.2.4", + "_npmUser": { + "email": "michael.hart.au@gmail.com", + "name": "hichaelmart" + }, + "_npmVersion": "2.14.15", + "_phantomChildren": {}, + "_requested": { + "name": "aws4", + "raw": "aws4@^1.2.1", + "rawSpec": "^1.2.1", + "scope": null, + "spec": ">=1.2.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/request" + ], + "_resolved": "https://registry.npmjs.org/aws4/-/aws4-1.2.1.tgz", + "_shasum": "52b5659a4d32583d405f65e1124ac436d07fe5ac", + "_shrinkwrap": null, + "_spec": "aws4@^1.2.1", + "_where": "/Users/rebecca/code/npm/node_modules/request", + "author": { + "email": "michael.hart.au@gmail.com", + "name": "Michael Hart", + "url": "http://github.com/mhart" + }, + "bugs": { + "url": "https://github.com/mhart/aws4/issues" + }, + "dependencies": { + "lru-cache": "^2.6.5" + }, + "description": "Signs and prepares requests using AWS Signature Version 4", + "devDependencies": { + "mocha": "^2.2.5", + "should": "^7.0.1" + }, + "directories": {}, + "dist": { + "shasum": "52b5659a4d32583d405f65e1124ac436d07fe5ac", + "tarball": "http://registry.npmjs.org/aws4/-/aws4-1.2.1.tgz" + }, + "gitHead": "3d8a3a06a8415bd5255b4f60eb91576952e97f5c", + "homepage": "https://github.com/mhart/aws4#readme", + "keywords": [ + "amazon", + "appstream", + "autoscaling", + "aws", + "cloudformation", + "cloudfront", + "cloudhsm", + "cloudsearch", + "cloudtrail", + "cloudwatch", + "codedeploy", + "cognito", + "cognitoidentity", + "cognitosync", + "config", + "containerservice", + "datapipeline", + "directconnect", + "dynamodb", + "ec2", + "ecs", + "elasticache", + "elasticbeanstalk", + "elasticloadbalancing", + "elasticmapreduce", + "elastictranscoder", + "elb", + "emr", + "glacier", + "iam", + "keymanagementservice", + "kinesis", + "kms", + "lambda", + "logs", + "mobileanalytics", + "monitoring", + "opsworks", + "rds", + "redshift", + "route53", + "route53domains", + "s3", + "ses", + "signature", + "sns", + "sqs", + "storagegateway", + "sts", + "swf" + ], + "license": "MIT", + "main": "aws4.js", + "maintainers": [ + { + "name": "hichaelmart", + "email": "michael.hart.au@gmail.com" + } + ], + "name": "aws4", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/mhart/aws4.git" + }, + "scripts": { + "test": "mocha ./test/fast.js ./test/slow.js -b -t 100s -R list" + }, + "version": "1.2.1" +} diff --git a/deps/npm/node_modules/request/node_modules/hawk/dist/client.js b/deps/npm/node_modules/request/node_modules/hawk/dist/client.js index 155412351d6947..ac28ef7667eed0 100644 --- a/deps/npm/node_modules/request/node_modules/hawk/dist/client.js +++ b/deps/npm/node_modules/request/node_modules/hawk/dist/client.js @@ -4,7 +4,10 @@ ; -function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; } +var _typeof = function (obj) { + + return obj && typeof Symbol !== 'undefined' && obj.constructor === Symbol ? 'symbol' : typeof obj; +}; var Url = require('url'); var Hoek = require('hoek'); diff --git a/deps/npm/node_modules/request/node_modules/hawk/lib/server.js b/deps/npm/node_modules/request/node_modules/hawk/lib/server.js index a325d56a55dc6d..2f763723550f6f 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/lib/server.js +++ b/deps/npm/node_modules/request/node_modules/hawk/lib/server.js @@ -308,6 +308,11 @@ exports.header = function (credentials, artifacts, options) { * 'hostHeaderName', 'localtimeOffsetMsec', 'host', 'port' */ + +// 1 2 3 4 +internals.bewitRegex = /^(\/.*)([\?&])bewit\=([^&$]*)(?:&(.+))?$/; + + exports.authenticateBewit = function (req, credentialsFunc, options, callback) { callback = Hoek.nextTick(callback); @@ -325,8 +330,11 @@ exports.authenticateBewit = function (req, credentialsFunc, options, callback) { // Extract bewit - // 1 2 3 4 - var resource = request.url.match(/^(\/.*)([\?&])bewit\=([^&$]*)(?:&(.+))?$/); + if (request.url.length > Utils.limits.maxMatchLength) { + return callback(Boom.badRequest('Resource path exceeds max length')); + } + + var resource = request.url.match(internals.bewitRegex); if (!resource) { return callback(Boom.unauthorized(null, 'Hawk')); } diff --git a/deps/npm/node_modules/request/node_modules/hawk/lib/utils.js b/deps/npm/node_modules/request/node_modules/hawk/lib/utils.js index 8b192ace661de3..2da3343904aeab 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/lib/utils.js +++ b/deps/npm/node_modules/request/node_modules/hawk/lib/utils.js @@ -15,6 +15,11 @@ exports.version = function () { }; +exports.limits = { + maxMatchLength: 4096 // Limit the length of uris and headers to avoid a DoS attack on string matching +}; + + // Extract host and port from request // $1 $2 @@ -29,6 +34,10 @@ exports.parseHost = function (req, hostHeaderName) { return null; } + if (hostHeader.length > exports.limits.maxMatchLength) { + return null; + } + var hostParts = hostHeader.match(internals.hostHeaderRegex); if (!hostParts) { return null; @@ -63,8 +72,11 @@ exports.parseRequest = function (req, options) { // Obtain host and port information - if (!options.host || !options.port) { - var host = exports.parseHost(req, options.hostHeaderName); + var host; + if (!options.host || + !options.port) { + + host = exports.parseHost(req, options.hostHeaderName); if (!host) { return new Error('Invalid Host header'); } @@ -95,6 +107,10 @@ exports.nowSecs = function (localtimeOffsetMsec) { }; +internals.authHeaderRegex = /^(\w+)(?:\s+(.*))?$/; // Header: scheme[ something] +internals.attributeRegex = /^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~]+$/; // !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9 + + // Parse Hawk HTTP Authorization header exports.parseAuthorizationHeader = function (header, keys) { @@ -105,7 +121,11 @@ exports.parseAuthorizationHeader = function (header, keys) { return Boom.unauthorized(null, 'Hawk'); } - var headerParts = header.match(/^(\w+)(?:\s+(.*))?$/); // Header: scheme[ something] + if (header.length > exports.limits.maxMatchLength) { + return Boom.badRequest('Header length too long'); + } + + var headerParts = header.match(internals.authHeaderRegex); if (!headerParts) { return Boom.badRequest('Invalid header syntax'); } @@ -131,9 +151,9 @@ exports.parseAuthorizationHeader = function (header, keys) { return; } - // Allowed attribute value characters: !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9 + // Allowed attribute value characters - if ($2.match(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~]+$/) === null) { + if ($2.match(internals.attributeRegex) === null) { errorMessage = 'Bad attribute value: ' + $1; return; } diff --git a/deps/npm/node_modules/request/node_modules/hawk/package.json b/deps/npm/node_modules/request/node_modules/hawk/package.json index 4a51ea4ca1398e..4bae96efecbfc7 100644 --- a/deps/npm/node_modules/request/node_modules/hawk/package.json +++ b/deps/npm/node_modules/request/node_modules/hawk/package.json @@ -2,15 +2,15 @@ "_args": [ [ "hawk@~3.1.0", - "/Users/ogd/Documents/projects/npm/npm/node_modules/request" + "/Users/rebecca/code/npm/node_modules/request" ] ], "_from": "hawk@>=3.1.0 <3.2.0", - "_id": "hawk@3.1.2", + "_id": "hawk@3.1.3", "_inCache": true, "_installable": true, "_location": "/request/hawk", - "_nodeVersion": "5.0.0", + "_nodeVersion": "5.4.1", "_npmUser": { "email": "eran@hammer.io", "name": "hueniverse" @@ -28,11 +28,11 @@ "_requiredBy": [ "/request" ], - "_resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.2.tgz", - "_shasum": "90c90118886e21975d1ad4ae9b3e284ed19a2de8", + "_resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "_shasum": "078444bd7c1640b0fe540d2c9b73d59678e8e1c4", "_shrinkwrap": null, "_spec": "hawk@~3.1.0", - "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request", + "_where": "/Users/rebecca/code/npm/node_modules/request", "author": { "email": "eran@hammer.io", "name": "Eran Hammer", @@ -56,13 +56,13 @@ }, "directories": {}, "dist": { - "shasum": "90c90118886e21975d1ad4ae9b3e284ed19a2de8", - "tarball": "http://registry.npmjs.org/hawk/-/hawk-3.1.2.tgz" + "shasum": "078444bd7c1640b0fe540d2c9b73d59678e8e1c4", + "tarball": "http://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz" }, "engines": { "node": ">=0.10.32" }, - "gitHead": "66dd8f9b32058c2e834b0976b2f112e19f38ee72", + "gitHead": "2f0b93b34ed9b0ebc865838ef70c6a4035591430", "homepage": "https://github.com/hueniverse/hawk#readme", "keywords": [ "authentication", @@ -89,5 +89,5 @@ "test": "lab -a code -t 100 -L", "test-cov-html": "lab -a code -r html -o coverage.html" }, - "version": "3.1.2" + "version": "3.1.3" } diff --git a/deps/npm/node_modules/request/node_modules/hawk/test/server.js b/deps/npm/node_modules/request/node_modules/hawk/test/server.js index 6af4b89538c7f0..0fdf13d435913e 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/test/server.js +++ b/deps/npm/node_modules/request/node_modules/hawk/test/server.js @@ -970,6 +970,33 @@ describe('Server', function () { }); }); + describe('authenticateBewit()', function () { + + it('errors on uri too long', function (done) { + + var long = '/'; + for (var i = 0; i < 5000; ++i) { + long += 'x'; + } + + var req = { + method: 'GET', + url: long, + host: 'example.com', + port: 8080, + authorization: 'Hawk id="1", ts="1353788437", nonce="k3j4h2", mac="zy79QQ5/EYFmQqutVnYb73gAc/U=", ext="hello"' + }; + + Hawk.server.authenticateBewit(req, credentialsFunc, {}, function (err, credentials, bewit) { + + expect(err).to.exist(); + expect(err.output.statusCode).to.equal(400); + expect(err.message).to.equal('Resource path exceeds max length'); + done(); + }); + }); + }); + describe('authenticateMessage()', function () { it('errors on invalid authorization (ts)', function (done) { diff --git a/deps/npm/node_modules/request/node_modules/hawk/test/utils.js b/deps/npm/node_modules/request/node_modules/hawk/test/utils.js index 1bfef65f8cf5cf..a2f17e590d30e5 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/test/utils.js +++ b/deps/npm/node_modules/request/node_modules/hawk/test/utils.js @@ -93,6 +93,34 @@ describe('Utils', function () { expect(host.name).to.equal('[123:123:123]'); done(); }); + + it('errors on header too long', function (done) { + + var long = ''; + for (var i = 0; i < 5000; ++i) { + long += 'x'; + } + + expect(Hawk.utils.parseHost({ headers: { host: long } })).to.be.null(); + done(); + }); + }); + + describe('parseAuthorizationHeader()', function () { + + it('errors on header too long', function (done) { + + var long = 'Scheme a="'; + for (var i = 0; i < 5000; ++i) { + long += 'x'; + } + long += '"'; + + var err = Hawk.utils.parseAuthorizationHeader(long, ['a']); + expect(err).to.be.instanceof(Error); + expect(err.message).to.equal('Header length too long'); + done(); + }); }); describe('version()', function () { diff --git a/deps/npm/node_modules/request/node_modules/http-signature/CHANGES.md b/deps/npm/node_modules/request/node_modules/http-signature/CHANGES.md index 66248e765e1c3a..3e4b13881e0de4 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/CHANGES.md +++ b/deps/npm/node_modules/request/node_modules/http-signature/CHANGES.md @@ -1,5 +1,12 @@ # node-http-signature changelog +## 1.1.1 + +- Version of dependency `assert-plus` updated: old version was missing + some license information +- Corrected examples in `http_signing.md`, added auto-tests to + automatically validate these examples + ## 1.1.0 - Bump version of `sshpk` dependency, remove peerDependency on it since diff --git a/deps/npm/node_modules/request/node_modules/http-signature/http_signing.md b/deps/npm/node_modules/request/node_modules/http-signature/http_signing.md index d08a5250c91682..4f24d28c3c21d7 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/http_signing.md +++ b/deps/npm/node_modules/request/node_modules/http-signature/http_signing.md @@ -231,7 +231,7 @@ will want to enforce, but service providers SHOULD at minimum include the # Appendix A - Test Values -The following test data uses the RSA (2048b) keys, which we will refer +The following test data uses the RSA (1024b) keys, which we will refer to as `keyId=Test` in the following samples: -----BEGIN PUBLIC KEY----- @@ -259,6 +259,8 @@ to as `keyId=Test` in the following samples: And all examples use this request: + + POST /foo?param=value&pet=dog HTTP/1.1 Host: example.com Date: Thu, 05 Jan 2014 21:31:40 GMT @@ -268,21 +270,35 @@ And all examples use this request: {"hello": "world"} + + ### Default The string to sign would be: + + + date: Thu, 05 Jan 2014 21:31:40 GMT + + The Authorization header would be: - Authorization: Signature keyId="Test",algorithm="rsa-sha256",signature="ATp0r26dbMIxOopqw0OfABDT7CKMIoENumuruOtarj8n/97Q3htHFYpH8yOSQk3Z5zh8UxUym6FYTb5+A0Nz3NRsXJibnYi7brE/4tx5But9kkFGzG+xpUmimN4c3TMN7OFH//+r8hBf7BT9/GmHDUVZT2JzWGLZES2xDOUuMtA=" + + + Authorization: Signature keyId="Test",algorithm="rsa-sha256",headers="date",signature="jKyvPcxB4JbmYY4mByyBY7cZfNl4OW9HpFQlG7N4YcJPteKTu4MWCLyk+gIr0wDgqtLWf9NLpMAMimdfsH7FSWGfbMFSrsVTHNTk0rK3usrfFnti1dxsM4jl0kYJCKTGI/UWkqiaxwNiKqGcdlEDrTcUhhsFsOIo8VhddmZTZ8w=" + + ### All Headers Parameterized to include all headers, the string to sign would be (`+ "\n"` inserted for readability): + + + (request-target): post /foo?param=value&pet=dog host: example.com date: Thu, 05 Jan 2014 21:31:40 GMT @@ -290,6 +306,58 @@ inserted for readability): digest: SHA-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE= content-length: 18 + + The Authorization header would be: - Authorization: Signature keyId="Test",algorithm="rsa-sha256",headers="(request-target) host date content-type digest content-length",signature="jgSqYK0yKclIHfF9zdApVEbDp5eqj8C4i4X76pE+XHoxugXv7qnVrGR+30bmBgtpR39I4utq17s9ghz/2QFVxlnToYAvbSVZJ9ulLd1HQBugO0jOyn9sXOtcN7uNHBjqNCqUsnt0sw/cJA6B6nJZpyNqNyAXKdxZZItOuhIs78w=" + + + Authorization: Signature keyId="Test",algorithm="rsa-sha256",headers="(request-target) host date content-type digest content-length",signature="Ef7MlxLXoBovhil3AlyjtBwAL9g4TN3tibLj7uuNB3CROat/9KaeQ4hW2NiJ+pZ6HQEOx9vYZAyi+7cmIkmJszJCut5kQLAwuX+Ms/mUFvpKlSo9StS2bMXDBNjOh4Auj774GFj4gwjS+3NhFeoqyr/MuN6HsEnkvn6zdgfE2i0=" + + + +## Generating and verifying signatures using `openssl` + +The `openssl` commandline tool can be used to generate or verify the signatures listed above. + +Compose the signing string as usual, and pipe it into the the `openssl dgst` command, then into `openssl enc -base64`, as follows: + + $ printf 'date: Thu, 05 Jan 2014 21:31:40 GMT' | \ + openssl dgst -binary -sign /path/to/private.pem -sha256 | \ + openssl enc -base64 + jKyvPcxB4JbmYY4mByyBY7cZfNl4OW9Hp... + $ + +The `-sha256` option is necessary to produce an `rsa-sha256` signature. You can select other hash algorithms such as `sha1` by changing this argument. + +To verify a signature, first save the signature data, Base64-decoded, into a file, then use `openssl dgst` again with the `-verify` option: + + $ echo 'jKyvPcxB4JbmYY4mByy...' | openssl enc -A -d -base64 > signature + $ printf 'date: Thu, 05 Jan 2014 21:31:40 GMT' | \ + openssl dgst -sha256 -verify /path/to/public.pem -signature ./signature + Verified OK + $ + +## Generating and verifying signatures using `sshpk-sign` + +You can also generate and check signatures using the `sshpk-sign` tool which is +included with the `sshpk` package in `npm`. + +Compose the signing string as above, and pipe it into `sshpk-sign` as follows: + + $ printf 'date: Thu, 05 Jan 2014 21:31:40 GMT' | \ + sshpk-sign -i /path/to/private.pem + jKyvPcxB4JbmYY4mByyBY7cZfNl4OW9Hp... + $ + +This will produce an `rsa-sha256` signature by default, as you can see using +the `-v` option: + + sshpk-sign: using rsa-sha256 with a 1024 bit key + +You can also use `sshpk-verify` in a similar manner: + + $ printf 'date: Thu, 05 Jan 2014 21:31:40 GMT' | \ + sshpk-verify -i ./public.pem -s 'jKyvPcxB4JbmYY...' + OK + $ diff --git a/deps/npm/node_modules/request/node_modules/http-signature/lib/signer.js b/deps/npm/node_modules/request/node_modules/http-signature/lib/signer.js index c8fd366eebcc28..ef9946f77ccc83 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/lib/signer.js +++ b/deps/npm/node_modules/request/node_modules/http-signature/lib/signer.js @@ -342,6 +342,11 @@ module.exports = { stringToSign += '\n'; } + /* This is just for unit tests. */ + if (request.hasOwnProperty('_stringToSign')) { + request._stringToSign = stringToSign; + } + var signature; if (alg[0] === 'hmac') { if (typeof (options.key) !== 'string' && !Buffer.isBuffer(options.key)) diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/AUTHORS b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/AUTHORS similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/AUTHORS rename to deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/AUTHORS diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/CHANGES.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/CHANGES.md similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/CHANGES.md rename to deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/CHANGES.md diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md index c0c3a53087bb64..0b39593cef48dc 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md @@ -1,24 +1,26 @@ -# node-assert-plus +# assert-plus This library is a super small wrapper over node's assert module that has two things: (1) the ability to disable assertions with the environment variable -NODE_NDEBUG, and (2) some API wrappers for argument testing. Like +NODE\_NDEBUG, and (2) some API wrappers for argument testing. Like `assert.string(myArg, 'myArg')`. As a simple example, most of my code looks like this: +```javascript var assert = require('assert-plus'); function fooAccount(options, callback) { - assert.object(options, 'options'); - assert.number(options.id, 'options.id); - assert.bool(options.isManager, 'options.isManager'); - assert.string(options.name, 'options.name'); - assert.arrayOfString(options.email, 'options.email'); - assert.func(callback, 'callback'); + assert.object(options, 'options'); + assert.number(options.id, 'options.id'); + assert.bool(options.isManager, 'options.isManager'); + assert.string(options.name, 'options.name'); + assert.arrayOfString(options.email, 'options.email'); + assert.func(callback, 'callback'); // Do stuff - callback(null, {}); + callback(null, {}); } +``` # API @@ -27,60 +29,87 @@ take an argument, and then a string 'name' that's not a message; `AssertionError will be thrown if the assertion fails with a message like: AssertionError: foo (string) is required - at test (/home/mark/work/foo/foo.js:3:9) - at Object. (/home/mark/work/foo/foo.js:15:1) - at Module._compile (module.js:446:26) - at Object..js (module.js:464:10) - at Module.load (module.js:353:31) - at Function._load (module.js:311:12) - at Array.0 (module.js:484:10) - at EventEmitter._tickCallback (node.js:190:38) + at test (/home/mark/work/foo/foo.js:3:9) + at Object. (/home/mark/work/foo/foo.js:15:1) + at Module._compile (module.js:446:26) + at Object..js (module.js:464:10) + at Module.load (module.js:353:31) + at Function._load (module.js:311:12) + at Array.0 (module.js:484:10) + at EventEmitter._tickCallback (node.js:190:38) from: +```javascript function test(foo) { - assert.string(foo, 'foo'); + assert.string(foo, 'foo'); } +``` -There you go. You can check that arrays are of a homogenous type with `Arrayof$Type`: +There you go. You can check that arrays are of a homogeneous type with `Arrayof$Type`: +```javascript function test(foo) { - assert.arrayOfString(foo, 'foo'); + assert.arrayOfString(foo, 'foo'); } +``` You can assert IFF an argument is not `undefined` (i.e., an optional arg): +```javascript assert.optionalString(foo, 'foo'); +``` Lastly, you can opt-out of assertion checking altogether by setting the environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have lots of assertions, and don't want to pay `typeof ()` taxes to v8 in -production. +production. Be advised: The standard functions re-exported from `assert` are +also disabled in assert-plus if NDEBUG is specified. Using them directly from +the `assert` module avoids this behavior. The complete list of APIs is: +* assert.array * assert.bool * assert.buffer * assert.func * assert.number * assert.object * assert.string +* assert.stream +* assert.date +* assert.regex +* assert.uuid +* assert.arrayOfArray * assert.arrayOfBool +* assert.arrayOfBuffer * assert.arrayOfFunc * assert.arrayOfNumber * assert.arrayOfObject * assert.arrayOfString +* assert.arrayOfStream +* assert.arrayOfDate +* assert.arrayOfUuid +* assert.optionalArray * assert.optionalBool * assert.optionalBuffer * assert.optionalFunc * assert.optionalNumber * assert.optionalObject * assert.optionalString +* assert.optionalStream +* assert.optionalDate +* assert.optionalUuid +* assert.optionalArrayOfArray * assert.optionalArrayOfBool +* assert.optionalArrayOfBuffer * assert.optionalArrayOfFunc * assert.optionalArrayOfNumber * assert.optionalArrayOfObject * assert.optionalArrayOfString +* assert.optionalArrayOfStream +* assert.optionalArrayOfDate +* assert.optionalArrayOfUuid * assert.AssertionError * assert.fail * assert.ok diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js index ff2ba02de82045..6bce4d8c6c638b 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js @@ -1,245 +1,206 @@ // Copyright (c) 2012, Mark Cavage. All rights reserved. +// Copyright 2015 Joyent, Inc. var assert = require('assert'); var Stream = require('stream').Stream; var util = require('util'); - ///--- Globals -var NDEBUG = process.env.NODE_NDEBUG || false; +/* JSSTYLED */ var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/; - -///--- Messages - -var ARRAY_TYPE_REQUIRED = '%s ([%s]) required'; -var TYPE_REQUIRED = '%s (%s) is required'; - - - ///--- Internal -function capitalize(str) { - return (str.charAt(0).toUpperCase() + str.slice(1)); +function _capitalize(str) { + return (str.charAt(0).toUpperCase() + str.slice(1)); } -function uncapitalize(str) { - return (str.charAt(0).toLowerCase() + str.slice(1)); +function _toss(name, expected, oper, arg, actual) { + throw new assert.AssertionError({ + message: util.format('%s (%s) is required', name, expected), + actual: (actual === undefined) ? typeof (arg) : actual(arg), + expected: expected, + operator: oper || '===', + stackStartFunction: _toss.caller + }); } -function _() { - return (util.format.apply(util, arguments)); +function _getClass(arg) { + return (Object.prototype.toString.call(arg).slice(8, -1)); } - -function _assert(arg, type, name, stackFunc) { - if (!NDEBUG) { - name = name || type; - stackFunc = stackFunc || _assert.caller; - var t = typeof (arg); - - if (t !== type) { - throw new assert.AssertionError({ - message: _(TYPE_REQUIRED, name, type), - actual: t, - expected: type, - operator: '===', - stackStartFunction: stackFunc - }); - } - } +function noop() { + // Why even bother with asserts? } -function _instanceof(arg, type, name, stackFunc) { - if (!NDEBUG) { - name = name || type; - stackFunc = stackFunc || _instanceof.caller; +///--- Exports - if (!(arg instanceof type)) { - throw new assert.AssertionError({ - message: _(TYPE_REQUIRED, name, type.name), - actual: _getClass(arg), - expected: type.name, - operator: 'instanceof', - stackStartFunction: stackFunc - }); - } +var types = { + bool: { + check: function (arg) { return typeof (arg) === 'boolean'; } + }, + func: { + check: function (arg) { return typeof (arg) === 'function'; } + }, + string: { + check: function (arg) { return typeof (arg) === 'string'; } + }, + object: { + check: function (arg) { + return typeof (arg) === 'object' && arg !== null; } -} - -function _getClass(object) { - return (Object.prototype.toString.call(object).slice(8, -1)); + }, + number: { + check: function (arg) { + return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg); + } + }, + buffer: { + check: function (arg) { return Buffer.isBuffer(arg); }, + operator: 'Buffer.isBuffer' + }, + array: { + check: function (arg) { return Array.isArray(arg); }, + operator: 'Array.isArray' + }, + stream: { + check: function (arg) { return arg instanceof Stream; }, + operator: 'instanceof', + actual: _getClass + }, + date: { + check: function (arg) { return arg instanceof Date; }, + operator: 'instanceof', + actual: _getClass + }, + regexp: { + check: function (arg) { return arg instanceof RegExp; }, + operator: 'instanceof', + actual: _getClass + }, + uuid: { + check: function (arg) { + return typeof (arg) === 'string' && UUID_REGEXP.test(arg); + }, + operator: 'isUUID' + } }; +function _setExports(ndebug) { + var keys = Object.keys(types); + var out; + + /* re-export standard assert */ + if (process.env.NODE_NDEBUG) { + out = noop; + } else { + out = function (arg, msg) { + if (!arg) { + _toss(msg, 'true', arg); + } + }; + } - -///--- API - -function array(arr, type, name) { - if (!NDEBUG) { - name = name || type; - - if (!Array.isArray(arr)) { - throw new assert.AssertionError({ - message: _(ARRAY_TYPE_REQUIRED, name, type), - actual: typeof (arr), - expected: 'array', - operator: 'Array.isArray', - stackStartFunction: array.caller - }); - } - - for (var i = 0; i < arr.length; i++) { - _assert(arr[i], type, name, array); - } + /* standard checks */ + keys.forEach(function (k) { + if (ndebug) { + out[k] = noop; + return; } -} - - -function bool(arg, name) { - _assert(arg, 'boolean', name, bool); -} - - -function buffer(arg, name) { - if (!Buffer.isBuffer(arg)) { - throw new assert.AssertionError({ - message: _(TYPE_REQUIRED, name || '', 'Buffer'), - actual: typeof (arg), - expected: 'buffer', - operator: 'Buffer.isBuffer', - stackStartFunction: buffer - }); + var type = types[k]; + out[k] = function (arg, msg) { + if (!type.check(arg)) { + _toss(msg, k, type.operator, arg, type.actual); + } + }; + }); + + /* optional checks */ + keys.forEach(function (k) { + var name = 'optional' + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; } -} - - -function func(arg, name) { - _assert(arg, 'function', name); -} - - -function number(arg, name) { - _assert(arg, 'number', name); - if (!NDEBUG && (isNaN(arg) || !isFinite(arg))) { - throw new assert.AssertionError({ - message: _(TYPE_REQUIRED, name, 'number'), - actual: arg, - expected: 'number', - operator: 'isNaN', - stackStartFunction: number - }); + var type = types[k]; + out[name] = function (arg, msg) { + if (arg === undefined || arg === null) { + return; + } + if (!type.check(arg)) { + _toss(msg, k, type.operator, arg, type.actual); + } + }; + }); + + /* arrayOf checks */ + keys.forEach(function (k) { + var name = 'arrayOf' + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; } -} - - -function object(arg, name) { - _assert(arg, 'object', name); -} - - -function stream(arg, name) { - _instanceof(arg, Stream, name); -} - - -function date(arg, name) { - _instanceof(arg, Date, name); -} - -function regexp(arg, name) { - _instanceof(arg, RegExp, name); -} - - -function string(arg, name) { - _assert(arg, 'string', name); -} - - -function uuid(arg, name) { - string(arg, name); - if (!NDEBUG && !UUID_REGEXP.test(arg)) { - throw new assert.AssertionError({ - message: _(TYPE_REQUIRED, name, 'uuid'), - actual: 'string', - expected: 'uuid', - operator: 'test', - stackStartFunction: uuid - }); + var type = types[k]; + var expected = '[' + k + ']'; + out[name] = function (arg, msg) { + if (!Array.isArray(arg)) { + _toss(msg, expected, type.operator, arg, type.actual); + } + var i; + for (i = 0; i < arg.length; i++) { + if (!type.check(arg[i])) { + _toss(msg, expected, type.operator, arg, type.actual); + } + } + }; + }); + + /* optionalArrayOf checks */ + keys.forEach(function (k) { + var name = 'optionalArrayOf' + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; } -} - - -///--- Exports - -module.exports = { - bool: bool, - buffer: buffer, - date: date, - func: func, - number: number, - object: object, - regexp: regexp, - stream: stream, - string: string, - uuid: uuid -}; - - -Object.keys(module.exports).forEach(function (k) { - if (k === 'buffer') + var type = types[k]; + var expected = '[' + k + ']'; + out[name] = function (arg, msg) { + if (arg === undefined || arg === null) { return; - - var name = 'arrayOf' + capitalize(k); - - if (k === 'bool') - k = 'boolean'; - if (k === 'func') - k = 'function'; - module.exports[name] = function (arg, name) { - array(arg, k, name); + } + if (!Array.isArray(arg)) { + _toss(msg, expected, type.operator, arg, type.actual); + } + var i; + for (i = 0; i < arg.length; i++) { + if (!type.check(arg[i])) { + _toss(msg, expected, type.operator, arg, type.actual); + } + } }; -}); - -Object.keys(module.exports).forEach(function (k) { - var _name = 'optional' + capitalize(k); - var s = uncapitalize(k.replace('arrayOf', '')); - if (s === 'bool') - s = 'boolean'; - if (s === 'func') - s = 'function'; - - if (k.indexOf('arrayOf') !== -1) { - module.exports[_name] = function (arg, name) { - if (!NDEBUG && arg !== undefined) { - array(arg, s, name); - } - }; - } else { - module.exports[_name] = function (arg, name) { - if (!NDEBUG && arg !== undefined) { - _assert(arg, s, name); - } - }; - } -}); - + }); -// Reexport built-in assertions -Object.keys(assert).forEach(function (k) { + /* re-export built-in assertions */ + Object.keys(assert).forEach(function (k) { if (k === 'AssertionError') { - module.exports[k] = assert[k]; - return; + out[k] = assert[k]; + return; } + if (ndebug) { + out[k] = noop; + return; + } + out[k] = assert[k]; + }); - module.exports[k] = function () { - if (!NDEBUG) { - assert[k].apply(assert[k], arguments); - } - }; -}); + /* export ourselves (for unit tests _only_) */ + out._setExports = _setExports; + + return out; +} + +module.exports = _setExports(process.env.NODE_NDEBUG); diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json index b3317675d295de..b596b28af873e0 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json @@ -1,30 +1,109 @@ { + "_args": [ + [ + "assert-plus@^0.2.0", + "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature" + ] + ], + "_from": "assert-plus@>=0.2.0 <0.3.0", + "_id": "assert-plus@0.2.0", + "_inCache": true, + "_installable": true, + "_location": "/request/http-signature/assert-plus", + "_nodeVersion": "0.10.36", + "_npmUser": { + "email": "patrick.f.mooney@gmail.com", + "name": "pfmooney" + }, + "_npmVersion": "3.3.8", + "_phantomChildren": {}, + "_requested": { + "name": "assert-plus", + "raw": "assert-plus@^0.2.0", + "rawSpec": "^0.2.0", + "scope": null, + "spec": ">=0.2.0 <0.3.0", + "type": "range" + }, + "_requiredBy": [ + "/request/http-signature", + "/request/http-signature/sshpk", + "/request/http-signature/sshpk/dashdash" + ], + "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "_shasum": "d74e1b87e7affc0db8aadb7021f3fe48101ab234", + "_shrinkwrap": null, + "_spec": "assert-plus@^0.2.0", + "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature", "author": { - "name": "Mark Cavage", - "email": "mcavage@gmail.com" + "email": "mcavage@gmail.com", + "name": "Mark Cavage" }, - "name": "assert-plus", + "bugs": { + "url": "https://github.com/mcavage/node-assert-plus/issues" + }, + "contributors": [ + { + "name": "Dave Eddy", + "email": "dave@daveeddy.com" + }, + { + "name": "Fred Kuo", + "email": "fred.kuo@joyent.com" + }, + { + "name": "Lars-Magnus Skog", + "email": "ralphtheninja@riseup.net" + }, + { + "name": "Mark Cavage", + "email": "mcavage@gmail.com" + }, + { + "name": "Patrick Mooney", + "email": "pmooney@pfmooney.com" + }, + { + "name": "Rob Gulewich", + "email": "robert.gulewich@joyent.com" + } + ], + "dependencies": {}, "description": "Extra assertions on top of node's assert module", - "version": "0.1.5", + "devDependencies": { + "faucet": "0.0.1", + "tape": "4.2.2" + }, + "directories": {}, + "dist": { + "shasum": "d74e1b87e7affc0db8aadb7021f3fe48101ab234", + "tarball": "http://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz" + }, + "engines": { + "node": ">=0.8" + }, + "homepage": "https://github.com/mcavage/node-assert-plus#readme", + "license": "MIT", "main": "./assert.js", - "devDependencies": {}, + "maintainers": [ + { + "name": "mcavage", + "email": "mcavage@gmail.com" + }, + { + "name": "pfmooney", + "email": "patrick.f.mooney@gmail.com" + } + ], + "name": "assert-plus", "optionalDependencies": {}, + "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git+https://github.com/mcavage/node-assert-plus.git" }, - "engines": { - "node": ">=0.8" - }, - "readme": "# node-assert-plus\n\nThis library is a super small wrapper over node's assert module that has two\nthings: (1) the ability to disable assertions with the environment variable\nNODE_NDEBUG, and (2) some API wrappers for argument testing. Like\n`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks\nlike this:\n\n var assert = require('assert-plus');\n\n function fooAccount(options, callback) {\n\t assert.object(options, 'options');\n\t\tassert.number(options.id, 'options.id);\n\t\tassert.bool(options.isManager, 'options.isManager');\n\t\tassert.string(options.name, 'options.name');\n\t\tassert.arrayOfString(options.email, 'options.email');\n\t\tassert.func(callback, 'callback');\n\n // Do stuff\n\t\tcallback(null, {});\n }\n\n# API\n\nAll methods that *aren't* part of node's core assert API are simply assumed to\ntake an argument, and then a string 'name' that's not a message; `AssertionError`\nwill be thrown if the assertion fails with a message like:\n\n AssertionError: foo (string) is required\n\tat test (/home/mark/work/foo/foo.js:3:9)\n\tat Object. (/home/mark/work/foo/foo.js:15:1)\n\tat Module._compile (module.js:446:26)\n\tat Object..js (module.js:464:10)\n\tat Module.load (module.js:353:31)\n\tat Function._load (module.js:311:12)\n\tat Array.0 (module.js:484:10)\n\tat EventEmitter._tickCallback (node.js:190:38)\n\nfrom:\n\n function test(foo) {\n\t assert.string(foo, 'foo');\n }\n\nThere you go. You can check that arrays are of a homogenous type with `Arrayof$Type`:\n\n function test(foo) {\n\t assert.arrayOfString(foo, 'foo');\n }\n\nYou can assert IFF an argument is not `undefined` (i.e., an optional arg):\n\n assert.optionalString(foo, 'foo');\n\nLastly, you can opt-out of assertion checking altogether by setting the\nenvironment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have\nlots of assertions, and don't want to pay `typeof ()` taxes to v8 in\nproduction.\n\nThe complete list of APIs is:\n\n* assert.bool\n* assert.buffer\n* assert.func\n* assert.number\n* assert.object\n* assert.string\n* assert.arrayOfBool\n* assert.arrayOfFunc\n* assert.arrayOfNumber\n* assert.arrayOfObject\n* assert.arrayOfString\n* assert.optionalBool\n* assert.optionalBuffer\n* assert.optionalFunc\n* assert.optionalNumber\n* assert.optionalObject\n* assert.optionalString\n* assert.optionalArrayOfBool\n* assert.optionalArrayOfFunc\n* assert.optionalArrayOfNumber\n* assert.optionalArrayOfObject\n* assert.optionalArrayOfString\n* assert.AssertionError\n* assert.fail\n* assert.ok\n* assert.equal\n* assert.notEqual\n* assert.deepEqual\n* assert.notDeepEqual\n* assert.strictEqual\n* assert.notStrictEqual\n* assert.throws\n* assert.doesNotThrow\n* assert.ifError\n\n# Installation\n\n npm install assert-plus\n\n## License\n\nThe MIT License (MIT)\nCopyright (c) 2012 Mark Cavage\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n## Bugs\n\nSee .\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/mcavage/node-assert-plus/issues" + "scripts": { + "test": "tape tests/*.js | ./node_modules/.bin/faucet" }, - "homepage": "https://github.com/mcavage/node-assert-plus#readme", - "dependencies": {}, - "_id": "assert-plus@0.1.5", - "_shasum": "ee74009413002d84cec7219c6ac811812e723160", - "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz", - "_from": "assert-plus@>=0.1.5 <0.2.0" + "version": "0.2.0" } diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/README.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/README.md deleted file mode 100644 index 0b39593cef48dc..00000000000000 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/README.md +++ /dev/null @@ -1,155 +0,0 @@ -# assert-plus - -This library is a super small wrapper over node's assert module that has two -things: (1) the ability to disable assertions with the environment variable -NODE\_NDEBUG, and (2) some API wrappers for argument testing. Like -`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks -like this: - -```javascript - var assert = require('assert-plus'); - - function fooAccount(options, callback) { - assert.object(options, 'options'); - assert.number(options.id, 'options.id'); - assert.bool(options.isManager, 'options.isManager'); - assert.string(options.name, 'options.name'); - assert.arrayOfString(options.email, 'options.email'); - assert.func(callback, 'callback'); - - // Do stuff - callback(null, {}); - } -``` - -# API - -All methods that *aren't* part of node's core assert API are simply assumed to -take an argument, and then a string 'name' that's not a message; `AssertionError` -will be thrown if the assertion fails with a message like: - - AssertionError: foo (string) is required - at test (/home/mark/work/foo/foo.js:3:9) - at Object. (/home/mark/work/foo/foo.js:15:1) - at Module._compile (module.js:446:26) - at Object..js (module.js:464:10) - at Module.load (module.js:353:31) - at Function._load (module.js:311:12) - at Array.0 (module.js:484:10) - at EventEmitter._tickCallback (node.js:190:38) - -from: - -```javascript - function test(foo) { - assert.string(foo, 'foo'); - } -``` - -There you go. You can check that arrays are of a homogeneous type with `Arrayof$Type`: - -```javascript - function test(foo) { - assert.arrayOfString(foo, 'foo'); - } -``` - -You can assert IFF an argument is not `undefined` (i.e., an optional arg): - -```javascript - assert.optionalString(foo, 'foo'); -``` - -Lastly, you can opt-out of assertion checking altogether by setting the -environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have -lots of assertions, and don't want to pay `typeof ()` taxes to v8 in -production. Be advised: The standard functions re-exported from `assert` are -also disabled in assert-plus if NDEBUG is specified. Using them directly from -the `assert` module avoids this behavior. - -The complete list of APIs is: - -* assert.array -* assert.bool -* assert.buffer -* assert.func -* assert.number -* assert.object -* assert.string -* assert.stream -* assert.date -* assert.regex -* assert.uuid -* assert.arrayOfArray -* assert.arrayOfBool -* assert.arrayOfBuffer -* assert.arrayOfFunc -* assert.arrayOfNumber -* assert.arrayOfObject -* assert.arrayOfString -* assert.arrayOfStream -* assert.arrayOfDate -* assert.arrayOfUuid -* assert.optionalArray -* assert.optionalBool -* assert.optionalBuffer -* assert.optionalFunc -* assert.optionalNumber -* assert.optionalObject -* assert.optionalString -* assert.optionalStream -* assert.optionalDate -* assert.optionalUuid -* assert.optionalArrayOfArray -* assert.optionalArrayOfBool -* assert.optionalArrayOfBuffer -* assert.optionalArrayOfFunc -* assert.optionalArrayOfNumber -* assert.optionalArrayOfObject -* assert.optionalArrayOfString -* assert.optionalArrayOfStream -* assert.optionalArrayOfDate -* assert.optionalArrayOfUuid -* assert.AssertionError -* assert.fail -* assert.ok -* assert.equal -* assert.notEqual -* assert.deepEqual -* assert.notDeepEqual -* assert.strictEqual -* assert.notStrictEqual -* assert.throws -* assert.doesNotThrow -* assert.ifError - -# Installation - - npm install assert-plus - -## License - -The MIT License (MIT) -Copyright (c) 2012 Mark Cavage - -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. - -## Bugs - -See . diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/assert.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/assert.js deleted file mode 100644 index 6bce4d8c6c638b..00000000000000 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/assert.js +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) 2012, Mark Cavage. All rights reserved. -// Copyright 2015 Joyent, Inc. - -var assert = require('assert'); -var Stream = require('stream').Stream; -var util = require('util'); - - -///--- Globals - -/* JSSTYLED */ -var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/; - - -///--- Internal - -function _capitalize(str) { - return (str.charAt(0).toUpperCase() + str.slice(1)); -} - -function _toss(name, expected, oper, arg, actual) { - throw new assert.AssertionError({ - message: util.format('%s (%s) is required', name, expected), - actual: (actual === undefined) ? typeof (arg) : actual(arg), - expected: expected, - operator: oper || '===', - stackStartFunction: _toss.caller - }); -} - -function _getClass(arg) { - return (Object.prototype.toString.call(arg).slice(8, -1)); -} - -function noop() { - // Why even bother with asserts? -} - - -///--- Exports - -var types = { - bool: { - check: function (arg) { return typeof (arg) === 'boolean'; } - }, - func: { - check: function (arg) { return typeof (arg) === 'function'; } - }, - string: { - check: function (arg) { return typeof (arg) === 'string'; } - }, - object: { - check: function (arg) { - return typeof (arg) === 'object' && arg !== null; - } - }, - number: { - check: function (arg) { - return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg); - } - }, - buffer: { - check: function (arg) { return Buffer.isBuffer(arg); }, - operator: 'Buffer.isBuffer' - }, - array: { - check: function (arg) { return Array.isArray(arg); }, - operator: 'Array.isArray' - }, - stream: { - check: function (arg) { return arg instanceof Stream; }, - operator: 'instanceof', - actual: _getClass - }, - date: { - check: function (arg) { return arg instanceof Date; }, - operator: 'instanceof', - actual: _getClass - }, - regexp: { - check: function (arg) { return arg instanceof RegExp; }, - operator: 'instanceof', - actual: _getClass - }, - uuid: { - check: function (arg) { - return typeof (arg) === 'string' && UUID_REGEXP.test(arg); - }, - operator: 'isUUID' - } -}; - -function _setExports(ndebug) { - var keys = Object.keys(types); - var out; - - /* re-export standard assert */ - if (process.env.NODE_NDEBUG) { - out = noop; - } else { - out = function (arg, msg) { - if (!arg) { - _toss(msg, 'true', arg); - } - }; - } - - /* standard checks */ - keys.forEach(function (k) { - if (ndebug) { - out[k] = noop; - return; - } - var type = types[k]; - out[k] = function (arg, msg) { - if (!type.check(arg)) { - _toss(msg, k, type.operator, arg, type.actual); - } - }; - }); - - /* optional checks */ - keys.forEach(function (k) { - var name = 'optional' + _capitalize(k); - if (ndebug) { - out[name] = noop; - return; - } - var type = types[k]; - out[name] = function (arg, msg) { - if (arg === undefined || arg === null) { - return; - } - if (!type.check(arg)) { - _toss(msg, k, type.operator, arg, type.actual); - } - }; - }); - - /* arrayOf checks */ - keys.forEach(function (k) { - var name = 'arrayOf' + _capitalize(k); - if (ndebug) { - out[name] = noop; - return; - } - var type = types[k]; - var expected = '[' + k + ']'; - out[name] = function (arg, msg) { - if (!Array.isArray(arg)) { - _toss(msg, expected, type.operator, arg, type.actual); - } - var i; - for (i = 0; i < arg.length; i++) { - if (!type.check(arg[i])) { - _toss(msg, expected, type.operator, arg, type.actual); - } - } - }; - }); - - /* optionalArrayOf checks */ - keys.forEach(function (k) { - var name = 'optionalArrayOf' + _capitalize(k); - if (ndebug) { - out[name] = noop; - return; - } - var type = types[k]; - var expected = '[' + k + ']'; - out[name] = function (arg, msg) { - if (arg === undefined || arg === null) { - return; - } - if (!Array.isArray(arg)) { - _toss(msg, expected, type.operator, arg, type.actual); - } - var i; - for (i = 0; i < arg.length; i++) { - if (!type.check(arg[i])) { - _toss(msg, expected, type.operator, arg, type.actual); - } - } - }; - }); - - /* re-export built-in assertions */ - Object.keys(assert).forEach(function (k) { - if (k === 'AssertionError') { - out[k] = assert[k]; - return; - } - if (ndebug) { - out[k] = noop; - return; - } - out[k] = assert[k]; - }); - - /* export ourselves (for unit tests _only_) */ - out._setExports = _setExports; - - return out; -} - -module.exports = _setExports(process.env.NODE_NDEBUG); diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/package.json deleted file mode 100644 index 09597df69dacf3..00000000000000 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/package.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "_args": [ - [ - "assert-plus@>=0.2.0 <0.3.0", - "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk" - ] - ], - "_from": "assert-plus@>=0.2.0 <0.3.0", - "_id": "assert-plus@0.2.0", - "_inCache": true, - "_installable": true, - "_location": "/request/http-signature/sshpk/assert-plus", - "_nodeVersion": "0.10.36", - "_npmUser": { - "email": "patrick.f.mooney@gmail.com", - "name": "pfmooney" - }, - "_npmVersion": "3.3.8", - "_phantomChildren": {}, - "_requested": { - "name": "assert-plus", - "raw": "assert-plus@>=0.2.0 <0.3.0", - "rawSpec": ">=0.2.0 <0.3.0", - "scope": null, - "spec": ">=0.2.0 <0.3.0", - "type": "range" - }, - "_requiredBy": [ - "/request/http-signature/sshpk" - ], - "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "_shasum": "d74e1b87e7affc0db8aadb7021f3fe48101ab234", - "_shrinkwrap": null, - "_spec": "assert-plus@>=0.2.0 <0.3.0", - "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk", - "author": { - "email": "mcavage@gmail.com", - "name": "Mark Cavage" - }, - "bugs": { - "url": "https://github.com/mcavage/node-assert-plus/issues" - }, - "contributors": [ - { - "name": "Dave Eddy", - "email": "dave@daveeddy.com" - }, - { - "name": "Fred Kuo", - "email": "fred.kuo@joyent.com" - }, - { - "name": "Lars-Magnus Skog", - "email": "ralphtheninja@riseup.net" - }, - { - "name": "Mark Cavage", - "email": "mcavage@gmail.com" - }, - { - "name": "Patrick Mooney", - "email": "pmooney@pfmooney.com" - }, - { - "name": "Rob Gulewich", - "email": "robert.gulewich@joyent.com" - } - ], - "dependencies": {}, - "description": "Extra assertions on top of node's assert module", - "devDependencies": { - "faucet": "0.0.1", - "tape": "4.2.2" - }, - "directories": {}, - "dist": { - "shasum": "d74e1b87e7affc0db8aadb7021f3fe48101ab234", - "tarball": "http://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz" - }, - "engines": { - "node": ">=0.8" - }, - "homepage": "https://github.com/mcavage/node-assert-plus#readme", - "license": "MIT", - "main": "./assert.js", - "maintainers": [ - { - "name": "mcavage", - "email": "mcavage@gmail.com" - }, - { - "name": "pfmooney", - "email": "patrick.f.mooney@gmail.com" - } - ], - "name": "assert-plus", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/mcavage/node-assert-plus.git" - }, - "scripts": { - "test": "tape tests/*.js | ./node_modules/.bin/faucet" - }, - "version": "0.2.0" -} diff --git a/deps/npm/node_modules/request/node_modules/http-signature/package.json b/deps/npm/node_modules/request/node_modules/http-signature/package.json index 136df23b6f9649..c7479c09ff97a4 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/package.json +++ b/deps/npm/node_modules/request/node_modules/http-signature/package.json @@ -2,20 +2,20 @@ "_args": [ [ "http-signature@~1.1.0", - "/Users/ogd/Documents/projects/npm/npm/node_modules/request" + "/Users/rebecca/code/npm/node_modules/request" ] ], "_from": "http-signature@>=1.1.0 <1.2.0", - "_id": "http-signature@1.1.0", + "_id": "http-signature@1.1.1", "_inCache": true, "_installable": true, "_location": "/request/http-signature", - "_nodeVersion": "0.12.7", + "_nodeVersion": "0.12.9", "_npmUser": { "email": "alex@cooperi.net", "name": "arekinath" }, - "_npmVersion": "2.14.4", + "_npmVersion": "2.14.9", "_phantomChildren": {}, "_requested": { "name": "http-signature", @@ -28,11 +28,11 @@ "_requiredBy": [ "/request" ], - "_resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.0.tgz", - "_shasum": "5d2d7e9b6ef49980ad5b128d8e4ef09a31c90d95", + "_resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "_shasum": "df72e267066cd0ac67fb76adf8e134a8fbcf91bf", "_shrinkwrap": null, "_spec": "http-signature@~1.1.0", - "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request", + "_where": "/Users/rebecca/code/npm/node_modules/request", "author": { "name": "Joyent, Inc" }, @@ -54,7 +54,7 @@ } ], "dependencies": { - "assert-plus": "^0.1.5", + "assert-plus": "^0.2.0", "jsprim": "^1.2.2", "sshpk": "^1.7.0" }, @@ -65,14 +65,14 @@ }, "directories": {}, "dist": { - "shasum": "5d2d7e9b6ef49980ad5b128d8e4ef09a31c90d95", - "tarball": "http://registry.npmjs.org/http-signature/-/http-signature-1.1.0.tgz" + "shasum": "df72e267066cd0ac67fb76adf8e134a8fbcf91bf", + "tarball": "http://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz" }, "engines": { "node": ">=0.8", "npm": ">=1.3.7" }, - "gitHead": "162c2f0144b0645a57517d6d91fafcde3840cde2", + "gitHead": "74d3f35e3aa436d83723c53b01e266f448e8149a", "homepage": "https://github.com/joyent/node-http-signature/", "keywords": [ "https", @@ -104,5 +104,5 @@ "scripts": { "test": "tap test/*.js" }, - "version": "1.1.0" + "version": "1.1.1" } diff --git a/deps/npm/node_modules/request/node_modules/qs/.travis.yml b/deps/npm/node_modules/request/node_modules/qs/.travis.yml index 335fded1ab779a..63bdc12bebd6b9 100644 --- a/deps/npm/node_modules/request/node_modules/qs/.travis.yml +++ b/deps/npm/node_modules/request/node_modules/qs/.travis.yml @@ -1,8 +1,69 @@ language: node_js - node_js: - - 0.10 - - 4.0 - - 4 - + - "5.3" + - "5.2" + - "5.1" + - "5.0" + - "4.2" + - "4.1" + - "4.0" + - "iojs-v3.3" + - "iojs-v3.2" + - "iojs-v3.1" + - "iojs-v3.0" + - "iojs-v2.5" + - "iojs-v2.4" + - "iojs-v2.3" + - "iojs-v2.2" + - "iojs-v2.1" + - "iojs-v2.0" + - "iojs-v1.8" + - "iojs-v1.7" + - "iojs-v1.6" + - "iojs-v1.5" + - "iojs-v1.4" + - "iojs-v1.3" + - "iojs-v1.2" + - "iojs-v1.1" + - "iojs-v1.0" + - "0.12" + - "0.11" + - "0.10" + - "0.9" + - "0.8" + - "0.6" + - "0.4" +before_install: + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi' +script: + - 'if [ "${TRAVIS_NODE_VERSION}" != "4.2" ]; then npm run tests-only ; else npm test ; fi' sudo: false +matrix: + fast_finish: true + allow_failures: + - node_js: "5.2" + - node_js: "5.1" + - node_js: "5.0" + - node_js: "4.1" + - node_js: "4.0" + - node_js: "iojs-v3.2" + - node_js: "iojs-v3.1" + - node_js: "iojs-v3.0" + - node_js: "iojs-v2.4" + - node_js: "iojs-v2.3" + - node_js: "iojs-v2.2" + - node_js: "iojs-v2.1" + - node_js: "iojs-v2.0" + - node_js: "iojs-v1.7" + - node_js: "iojs-v1.6" + - node_js: "iojs-v1.5" + - node_js: "iojs-v1.4" + - node_js: "iojs-v1.3" + - node_js: "iojs-v1.2" + - node_js: "iojs-v1.1" + - node_js: "iojs-v1.0" + - node_js: "0.11" + - node_js: "0.9" + - node_js: "0.6" + - node_js: "0.4" diff --git a/deps/npm/node_modules/request/node_modules/qs/CHANGELOG.md b/deps/npm/node_modules/request/node_modules/qs/CHANGELOG.md index e43b1aceb32920..2df5e9d3783b5b 100644 --- a/deps/npm/node_modules/request/node_modules/qs/CHANGELOG.md +++ b/deps/npm/node_modules/request/node_modules/qs/CHANGELOG.md @@ -1,99 +1,110 @@ +## [**6.0.2**](https://github.com/ljharb/qs/issues?milestone=33&state=closed) +- Revert ES6 requirement and restore support for node down to v0.8. -## [**5.1.0**](https://github.com/hapijs/qs/issues?milestone=29&state=open) -- [**#117**](https://github.com/hapijs/qs/issues/117) make URI encoding stringified results optional -- [**#106**](https://github.com/hapijs/qs/issues/106) Add flag `skipNulls` to optionally skip null values in stringify +## [**6.0.1**](https://github.com/ljharb/qs/issues?milestone=32&state=closed) +- [**#127**](https://github.com/ljharb/qs/pull/127) Fix engines definition in package.json -## [**5.0.0**](https://github.com/hapijs/qs/issues?milestone=28&state=closed) -- [**#114**](https://github.com/hapijs/qs/issues/114) default allowDots to false -- [**#100**](https://github.com/hapijs/qs/issues/100) include dist to npm +## [**6.0.0**](https://github.com/ljharb/qs/issues?milestone=31&state=closed) +- [**#124**](https://github.com/ljharb/qs/issues/124) Use ES6 and drop support for node < v4 -## [**4.0.0**](https://github.com/hapijs/qs/issues?milestone=26&state=closed) -- [**#98**](https://github.com/hapijs/qs/issues/98) make returning plain objects and allowing prototype overwriting properties optional +## [**5.2.0**](https://github.com/ljharb/qs/issues?milestone=30&state=closed) +- [**#64**](https://github.com/ljharb/qs/issues/64) Add option to sort object keys in the query string -## [**3.1.0**](https://github.com/hapijs/qs/issues?milestone=24&state=closed) -- [**#89**](https://github.com/hapijs/qs/issues/89) Add option to disable "Transform dot notation to bracket notation" +## [**5.1.0**](https://github.com/ljharb/qs/issues?milestone=29&state=closed) +- [**#117**](https://github.com/ljharb/qs/issues/117) make URI encoding stringified results optional +- [**#106**](https://github.com/ljharb/qs/issues/106) Add flag `skipNulls` to optionally skip null values in stringify -## [**3.0.0**](https://github.com/hapijs/qs/issues?milestone=23&state=closed) -- [**#80**](https://github.com/hapijs/qs/issues/80) qs.parse silently drops properties -- [**#77**](https://github.com/hapijs/qs/issues/77) Perf boost -- [**#60**](https://github.com/hapijs/qs/issues/60) Add explicit option to disable array parsing -- [**#74**](https://github.com/hapijs/qs/issues/74) Bad parse when turning array into object -- [**#81**](https://github.com/hapijs/qs/issues/81) Add a `filter` option -- [**#68**](https://github.com/hapijs/qs/issues/68) Fixed issue with recursion and passing strings into objects. -- [**#66**](https://github.com/hapijs/qs/issues/66) Add mixed array and object dot notation support Closes: #47 -- [**#76**](https://github.com/hapijs/qs/issues/76) RFC 3986 -- [**#85**](https://github.com/hapijs/qs/issues/85) No equal sign -- [**#84**](https://github.com/hapijs/qs/issues/84) update license attribute +## [**5.0.0**](https://github.com/ljharb/qs/issues?milestone=28&state=closed) +- [**#114**](https://github.com/ljharb/qs/issues/114) default allowDots to false +- [**#100**](https://github.com/ljharb/qs/issues/100) include dist to npm -## [**2.4.1**](https://github.com/hapijs/qs/issues?milestone=20&state=closed) -- [**#73**](https://github.com/hapijs/qs/issues/73) Property 'hasOwnProperty' of object # is not a function +## [**4.0.0**](https://github.com/ljharb/qs/issues?milestone=26&state=closed) +- [**#98**](https://github.com/ljharb/qs/issues/98) make returning plain objects and allowing prototype overwriting properties optional -## [**2.4.0**](https://github.com/hapijs/qs/issues?milestone=19&state=closed) -- [**#70**](https://github.com/hapijs/qs/issues/70) Add arrayFormat option +## [**3.1.0**](https://github.com/ljharb/qs/issues?milestone=24&state=closed) +- [**#89**](https://github.com/ljharb/qs/issues/89) Add option to disable "Transform dot notation to bracket notation" -## [**2.3.3**](https://github.com/hapijs/qs/issues?milestone=18&state=closed) -- [**#59**](https://github.com/hapijs/qs/issues/59) make sure array indexes are >= 0, closes #57 -- [**#58**](https://github.com/hapijs/qs/issues/58) make qs usable for browser loader +## [**3.0.0**](https://github.com/ljharb/qs/issues?milestone=23&state=closed) +- [**#80**](https://github.com/ljharb/qs/issues/80) qs.parse silently drops properties +- [**#77**](https://github.com/ljharb/qs/issues/77) Perf boost +- [**#60**](https://github.com/ljharb/qs/issues/60) Add explicit option to disable array parsing +- [**#74**](https://github.com/ljharb/qs/issues/74) Bad parse when turning array into object +- [**#81**](https://github.com/ljharb/qs/issues/81) Add a `filter` option +- [**#68**](https://github.com/ljharb/qs/issues/68) Fixed issue with recursion and passing strings into objects. +- [**#66**](https://github.com/ljharb/qs/issues/66) Add mixed array and object dot notation support Closes: #47 +- [**#76**](https://github.com/ljharb/qs/issues/76) RFC 3986 +- [**#85**](https://github.com/ljharb/qs/issues/85) No equal sign +- [**#84**](https://github.com/ljharb/qs/issues/84) update license attribute -## [**2.3.2**](https://github.com/hapijs/qs/issues?milestone=17&state=closed) -- [**#55**](https://github.com/hapijs/qs/issues/55) allow merging a string into an object +## [**2.4.1**](https://github.com/ljharb/qs/issues?milestone=20&state=closed) +- [**#73**](https://github.com/ljharb/qs/issues/73) Property 'hasOwnProperty' of object # is not a function -## [**2.3.1**](https://github.com/hapijs/qs/issues?milestone=16&state=closed) -- [**#52**](https://github.com/hapijs/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError". +## [**2.4.0**](https://github.com/ljharb/qs/issues?milestone=19&state=closed) +- [**#70**](https://github.com/ljharb/qs/issues/70) Add arrayFormat option -## [**2.3.0**](https://github.com/hapijs/qs/issues?milestone=15&state=closed) -- [**#50**](https://github.com/hapijs/qs/issues/50) add option to omit array indices, closes #46 +## [**2.3.3**](https://github.com/ljharb/qs/issues?milestone=18&state=closed) +- [**#59**](https://github.com/ljharb/qs/issues/59) make sure array indexes are >= 0, closes #57 +- [**#58**](https://github.com/ljharb/qs/issues/58) make qs usable for browser loader -## [**2.2.5**](https://github.com/hapijs/qs/issues?milestone=14&state=closed) -- [**#39**](https://github.com/hapijs/qs/issues/39) Is there an alternative to Buffer.isBuffer? -- [**#49**](https://github.com/hapijs/qs/issues/49) refactor utils.merge, fixes #45 -- [**#41**](https://github.com/hapijs/qs/issues/41) avoid browserifying Buffer, for #39 +## [**2.3.2**](https://github.com/ljharb/qs/issues?milestone=17&state=closed) +- [**#55**](https://github.com/ljharb/qs/issues/55) allow merging a string into an object -## [**2.2.4**](https://github.com/hapijs/qs/issues?milestone=13&state=closed) -- [**#38**](https://github.com/hapijs/qs/issues/38) how to handle object keys beginning with a number +## [**2.3.1**](https://github.com/ljharb/qs/issues?milestone=16&state=closed) +- [**#52**](https://github.com/ljharb/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError". -## [**2.2.3**](https://github.com/hapijs/qs/issues?milestone=12&state=closed) -- [**#37**](https://github.com/hapijs/qs/issues/37) parser discards first empty value in array -- [**#36**](https://github.com/hapijs/qs/issues/36) Update to lab 4.x +## [**2.3.0**](https://github.com/ljharb/qs/issues?milestone=15&state=closed) +- [**#50**](https://github.com/ljharb/qs/issues/50) add option to omit array indices, closes #46 -## [**2.2.2**](https://github.com/hapijs/qs/issues?milestone=11&state=closed) -- [**#33**](https://github.com/hapijs/qs/issues/33) Error when plain object in a value -- [**#34**](https://github.com/hapijs/qs/issues/34) use Object.prototype.hasOwnProperty.call instead of obj.hasOwnProperty -- [**#24**](https://github.com/hapijs/qs/issues/24) Changelog? Semver? +## [**2.2.5**](https://github.com/ljharb/qs/issues?milestone=14&state=closed) +- [**#39**](https://github.com/ljharb/qs/issues/39) Is there an alternative to Buffer.isBuffer? +- [**#49**](https://github.com/ljharb/qs/issues/49) refactor utils.merge, fixes #45 +- [**#41**](https://github.com/ljharb/qs/issues/41) avoid browserifying Buffer, for #39 -## [**2.2.1**](https://github.com/hapijs/qs/issues?milestone=10&state=closed) -- [**#32**](https://github.com/hapijs/qs/issues/32) account for circular references properly, closes #31 -- [**#31**](https://github.com/hapijs/qs/issues/31) qs.parse stackoverflow on circular objects +## [**2.2.4**](https://github.com/ljharb/qs/issues?milestone=13&state=closed) +- [**#38**](https://github.com/ljharb/qs/issues/38) how to handle object keys beginning with a number -## [**2.2.0**](https://github.com/hapijs/qs/issues?milestone=9&state=closed) -- [**#26**](https://github.com/hapijs/qs/issues/26) Don't use Buffer global if it's not present -- [**#30**](https://github.com/hapijs/qs/issues/30) Bug when merging non-object values into arrays -- [**#29**](https://github.com/hapijs/qs/issues/29) Don't call Utils.clone at the top of Utils.merge -- [**#23**](https://github.com/hapijs/qs/issues/23) Ability to not limit parameters? +## [**2.2.3**](https://github.com/ljharb/qs/issues?milestone=12&state=closed) +- [**#37**](https://github.com/ljharb/qs/issues/37) parser discards first empty value in array +- [**#36**](https://github.com/ljharb/qs/issues/36) Update to lab 4.x -## [**2.1.0**](https://github.com/hapijs/qs/issues?milestone=8&state=closed) -- [**#22**](https://github.com/hapijs/qs/issues/22) Enable using a RegExp as delimiter +## [**2.2.2**](https://github.com/ljharb/qs/issues?milestone=11&state=closed) +- [**#33**](https://github.com/ljharb/qs/issues/33) Error when plain object in a value +- [**#34**](https://github.com/ljharb/qs/issues/34) use Object.prototype.hasOwnProperty.call instead of obj.hasOwnProperty +- [**#24**](https://github.com/ljharb/qs/issues/24) Changelog? Semver? -## [**2.0.0**](https://github.com/hapijs/qs/issues?milestone=7&state=closed) -- [**#18**](https://github.com/hapijs/qs/issues/18) Why is there arrayLimit? -- [**#20**](https://github.com/hapijs/qs/issues/20) Configurable parametersLimit -- [**#21**](https://github.com/hapijs/qs/issues/21) make all limits optional, for #18, for #20 +## [**2.2.1**](https://github.com/ljharb/qs/issues?milestone=10&state=closed) +- [**#32**](https://github.com/ljharb/qs/issues/32) account for circular references properly, closes #31 +- [**#31**](https://github.com/ljharb/qs/issues/31) qs.parse stackoverflow on circular objects -## [**1.2.2**](https://github.com/hapijs/qs/issues?milestone=6&state=closed) -- [**#19**](https://github.com/hapijs/qs/issues/19) Don't overwrite null values +## [**2.2.0**](https://github.com/ljharb/qs/issues?milestone=9&state=closed) +- [**#26**](https://github.com/ljharb/qs/issues/26) Don't use Buffer global if it's not present +- [**#30**](https://github.com/ljharb/qs/issues/30) Bug when merging non-object values into arrays +- [**#29**](https://github.com/ljharb/qs/issues/29) Don't call Utils.clone at the top of Utils.merge +- [**#23**](https://github.com/ljharb/qs/issues/23) Ability to not limit parameters? -## [**1.2.1**](https://github.com/hapijs/qs/issues?milestone=5&state=closed) -- [**#16**](https://github.com/hapijs/qs/issues/16) ignore non-string delimiters -- [**#15**](https://github.com/hapijs/qs/issues/15) Close code block +## [**2.1.0**](https://github.com/ljharb/qs/issues?milestone=8&state=closed) +- [**#22**](https://github.com/ljharb/qs/issues/22) Enable using a RegExp as delimiter -## [**1.2.0**](https://github.com/hapijs/qs/issues?milestone=4&state=closed) -- [**#12**](https://github.com/hapijs/qs/issues/12) Add optional delim argument -- [**#13**](https://github.com/hapijs/qs/issues/13) fix #11: flattened keys in array are now correctly parsed +## [**2.0.0**](https://github.com/ljharb/qs/issues?milestone=7&state=closed) +- [**#18**](https://github.com/ljharb/qs/issues/18) Why is there arrayLimit? +- [**#20**](https://github.com/ljharb/qs/issues/20) Configurable parametersLimit +- [**#21**](https://github.com/ljharb/qs/issues/21) make all limits optional, for #18, for #20 -## [**1.1.0**](https://github.com/hapijs/qs/issues?milestone=3&state=closed) -- [**#7**](https://github.com/hapijs/qs/issues/7) Empty values of a POST array disappear after being submitted -- [**#9**](https://github.com/hapijs/qs/issues/9) Should not omit equals signs (=) when value is null -- [**#6**](https://github.com/hapijs/qs/issues/6) Minor grammar fix in README +## [**1.2.2**](https://github.com/ljharb/qs/issues?milestone=6&state=closed) +- [**#19**](https://github.com/ljharb/qs/issues/19) Don't overwrite null values -## [**1.0.2**](https://github.com/hapijs/qs/issues?milestone=2&state=closed) -- [**#5**](https://github.com/hapijs/qs/issues/5) array holes incorrectly copied into object on large index +## [**1.2.1**](https://github.com/ljharb/qs/issues?milestone=5&state=closed) +- [**#16**](https://github.com/ljharb/qs/issues/16) ignore non-string delimiters +- [**#15**](https://github.com/ljharb/qs/issues/15) Close code block + +## [**1.2.0**](https://github.com/ljharb/qs/issues?milestone=4&state=closed) +- [**#12**](https://github.com/ljharb/qs/issues/12) Add optional delim argument +- [**#13**](https://github.com/ljharb/qs/issues/13) fix #11: flattened keys in array are now correctly parsed + +## [**1.1.0**](https://github.com/ljharb/qs/issues?milestone=3&state=closed) +- [**#7**](https://github.com/ljharb/qs/issues/7) Empty values of a POST array disappear after being submitted +- [**#9**](https://github.com/ljharb/qs/issues/9) Should not omit equals signs (=) when value is null +- [**#6**](https://github.com/ljharb/qs/issues/6) Minor grammar fix in README + +## [**1.0.2**](https://github.com/ljharb/qs/issues?milestone=2&state=closed) +- [**#5**](https://github.com/ljharb/qs/issues/5) array holes incorrectly copied into object on large index diff --git a/deps/npm/node_modules/request/node_modules/qs/README.md b/deps/npm/node_modules/request/node_modules/qs/README.md index 3c61db31a2214f..335eafb4be5a72 100644 --- a/deps/npm/node_modules/request/node_modules/qs/README.md +++ b/deps/npm/node_modules/request/node_modules/qs/README.md @@ -2,76 +2,82 @@ A querystring parsing and stringifying library with some added security. -[![Build Status](https://secure.travis-ci.org/hapijs/qs.svg)](http://travis-ci.org/hapijs/qs) +[![Build Status](https://api.travis-ci.org/ljharb/qs.svg)](http://travis-ci.org/ljharb/qs) -Lead Maintainer: [Nathan LaFreniere](https://github.com/nlf) +Lead Maintainer: [Jordan Harband](https://github.com/ljharb) The **qs** module was originally created and maintained by [TJ Holowaychuk](https://github.com/visionmedia/node-querystring). ## Usage ```javascript -var Qs = require('qs'); +var qs = require('qs'); +var assert = require('assert'); -var obj = Qs.parse('a=c'); // { a: 'c' } -var str = Qs.stringify(obj); // 'a=c' +var obj = qs.parse('a=c'); +assert.deepEqual(obj, { a: 'c' }); + +var str = qs.stringify(obj); +assert.equal(str, 'a=c'); ``` ### Parsing Objects +[](#preventEval) ```javascript -Qs.parse(string, [options]); +qs.parse(string, [options]); ``` **qs** allows you to create nested objects within your query strings, by surrounding the name of sub-keys with square brackets `[]`. For example, the string `'foo[bar]=baz'` converts to: ```javascript -{ +assert.deepEqual(qs.parse('foo[bar]=baz'), { foo: { bar: 'baz' } -} +}); ``` When using the `plainObjects` option the parsed value is returned as a plain object, created via `Object.create(null)` and as such you should be aware that prototype methods will not exist on it and a user may set those names to whatever value they like: ```javascript -Qs.parse('a.hasOwnProperty=b', { plainObjects: true }); -// { a: { hasOwnProperty: 'b' } } +var plainObject = qs.parse('a[hasOwnProperty]=b', { plainObjects: true }); +assert.deepEqual(plainObject, { a: { hasOwnProperty: 'b' } }); ``` By default parameters that would overwrite properties on the object prototype are ignored, if you wish to keep the data from those fields either use `plainObjects` as mentioned above, or set `allowPrototypes` to `true` which will allow user input to overwrite those properties. *WARNING* It is generally a bad idea to enable this option as it can cause problems when attempting to use the properties that have been overwritten. Always be careful with this option. ```javascript -Qs.parse('a.hasOwnProperty=b', { allowPrototypes: true }); -// { a: { hasOwnProperty: 'b' } } +var protoObject = qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }); +assert.deepEqual(protoObject, { a: { hasOwnProperty: 'b' } }); ``` URI encoded strings work too: ```javascript -Qs.parse('a%5Bb%5D=c'); -// { a: { b: 'c' } } +assert.deepEqual(qs.parse('a%5Bb%5D=c'), { + a: { b: 'c' } +}); ``` You can also nest your objects, like `'foo[bar][baz]=foobarbaz'`: ```javascript -{ +assert.deepEqual(qs.parse('foo[bar][baz]=foobarbaz'), { foo: { bar: { baz: 'foobarbaz' } } -} +}); ``` By default, when nesting objects **qs** will only parse up to 5 children deep. This means if you attempt to parse a string like `'a[b][c][d][e][f][g][h][i]=j'` your resulting object will be: ```javascript -{ +var expected = { a: { b: { c: { @@ -85,14 +91,16 @@ By default, when nesting objects **qs** will only parse up to 5 children deep. T } } } -} +}; +var string = 'a[b][c][d][e][f][g][h][i]=j'; +assert.deepEqual(qs.parse(string), expected); ``` -This depth can be overridden by passing a `depth` option to `Qs.parse(string, [options])`: +This depth can be overridden by passing a `depth` option to `qs.parse(string, [options])`: ```javascript -Qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 }); -// { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } } +var deep = qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 }); +assert.deepEqual(deep, { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } }); ``` The depth limit helps mitigate abuse when **qs** is used to parse user input, and it is recommended to keep it a reasonably small number. @@ -100,29 +108,29 @@ The depth limit helps mitigate abuse when **qs** is used to parse user input, an For similar reasons, by default **qs** will only parse up to 1000 parameters. This can be overridden by passing a `parameterLimit` option: ```javascript -Qs.parse('a=b&c=d', { parameterLimit: 1 }); -// { a: 'b' } +var limited = qs.parse('a=b&c=d', { parameterLimit: 1 }); +assert.deepEqual(limited, { a: 'b' }); ``` An optional delimiter can also be passed: ```javascript -Qs.parse('a=b;c=d', { delimiter: ';' }); -// { a: 'b', c: 'd' } +var delimited = qs.parse('a=b;c=d', { delimiter: ';' }); +assert.deepEqual(delimited, { a: 'b', c: 'd' }); ``` Delimiters can be a regular expression too: ```javascript -Qs.parse('a=b;c=d,e=f', { delimiter: /[;,]/ }); -// { a: 'b', c: 'd', e: 'f' } +var regexed = qs.parse('a=b;c=d,e=f', { delimiter: /[;,]/ }); +assert.deepEqual(regexed, { a: 'b', c: 'd', e: 'f' }); ``` Option `allowDots` can be used to enable dot notation: ```javascript -Qs.parse('a.b=c', { allowDots: true }); -// { a: { b: 'c' } } +var withDots = qs.parse('a.b=c', { allowDots: true }); +assert.deepEqual(withDots, { a: { b: 'c' } }); ``` ### Parsing Arrays @@ -130,15 +138,15 @@ Qs.parse('a.b=c', { allowDots: true }); **qs** can also parse arrays using a similar `[]` notation: ```javascript -Qs.parse('a[]=b&a[]=c'); -// { a: ['b', 'c'] } +var withArray = qs.parse('a[]=b&a[]=c'); +assert.deepEqual(withArray, { a: ['b', 'c'] }); ``` You may specify an index as well: ```javascript -Qs.parse('a[1]=c&a[0]=b'); -// { a: ['b', 'c'] } +var withIndexes = qs.parse('a[1]=c&a[0]=b'); +assert.deepEqual(withIndexes, { a: ['b', 'c'] }); ``` Note that the only difference between an index in an array and a key in an object is that the value between the brackets must be a number @@ -146,75 +154,75 @@ to create an array. When creating arrays with specific indices, **qs** will comp their order: ```javascript -Qs.parse('a[1]=b&a[15]=c'); -// { a: ['b', 'c'] } +var noSparse = qs.parse('a[1]=b&a[15]=c'); +assert.deepEqual(noSparse, { a: ['b', 'c'] }); ``` Note that an empty string is also a value, and will be preserved: ```javascript -Qs.parse('a[]=&a[]=b'); -// { a: ['', 'b'] } -Qs.parse('a[0]=b&a[1]=&a[2]=c'); -// { a: ['b', '', 'c'] } +var withEmptyString = qs.parse('a[]=&a[]=b'); +assert.deepEqual(withEmptyString, { a: ['', 'b'] }); + +var withIndexedEmptyString = qs.parse('a[0]=b&a[1]=&a[2]=c'); +assert.deepEqual(withIndexedEmptyString, { a: ['b', '', 'c'] }); ``` **qs** will also limit specifying indices in an array to a maximum index of `20`. Any array members with an index of greater than `20` will instead be converted to an object with the index as the key: ```javascript -Qs.parse('a[100]=b'); -// { a: { '100': 'b' } } +var withMaxIndex = qs.parse('a[100]=b'); +assert.deepEqual(withMaxIndex, { a: { '100': 'b' } }); ``` This limit can be overridden by passing an `arrayLimit` option: ```javascript -Qs.parse('a[1]=b', { arrayLimit: 0 }); -// { a: { '1': 'b' } } +var withArrayLimit = qs.parse('a[1]=b', { arrayLimit: 0 }); +assert.deepEqual(withArrayLimit, { a: { '1': 'b' } }); ``` To disable array parsing entirely, set `parseArrays` to `false`. ```javascript -Qs.parse('a[]=b', { parseArrays: false }); -// { a: { '0': 'b' } } +var noParsingArrays = qs.parse('a[]=b', { parseArrays: false }); +assert.deepEqual(noParsingArrays, { a: { '0': 'b' } }); ``` If you mix notations, **qs** will merge the two items into an object: ```javascript -Qs.parse('a[0]=b&a[b]=c'); -// { a: { '0': 'b', b: 'c' } } +var mixedNotation = qs.parse('a[0]=b&a[b]=c'); +assert.deepEqual(mixedNotation, { a: { '0': 'b', b: 'c' } }); ``` You can also create arrays of objects: ```javascript -Qs.parse('a[][b]=c'); -// { a: [{ b: 'c' }] } +var arraysOfObjects = qs.parse('a[][b]=c'); +assert.deepEqual(arraysOfObjects, { a: [{ b: 'c' }] }); ``` ### Stringifying +[](#preventEval) ```javascript -Qs.stringify(object, [options]); +qs.stringify(object, [options]); ``` When stringifying, **qs** by default URI encodes output. Objects are stringified as you would expect: ```javascript -Qs.stringify({ a: 'b' }); -// 'a=b' -Qs.stringify({ a: { b: 'c' } }); -// 'a%5Bb%5D=c' +assert.equal(qs.stringify({ a: 'b' }), 'a=b'); +assert.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); ``` This encoding can be disabled by setting the `encode` option to `false`: ```javascript -Qs.stringify({ a: { b: 'c' } }, { encode: false }); -// 'a[b]=c' +var unencoded = qs.stringify({ a: { b: 'c' } }, { encode: false }); +assert.equal(unencoded, 'a[b]=c'); ``` Examples beyond this point will be shown as though the output is not URI encoded for clarity. Please note that the return values in these cases *will* be URI encoded during real usage. @@ -222,47 +230,44 @@ Examples beyond this point will be shown as though the output is not URI encoded When arrays are stringified, by default they are given explicit indices: ```javascript -Qs.stringify({ a: ['b', 'c', 'd'] }); +qs.stringify({ a: ['b', 'c', 'd'] }); // 'a[0]=b&a[1]=c&a[2]=d' ``` You may override this by setting the `indices` option to `false`: ```javascript -Qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }); +qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }); // 'a=b&a=c&a=d' ``` You may use the `arrayFormat` option to specify the format of the output array ```javascript -Qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }) +qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }) // 'a[0]=b&a[1]=c' -Qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }) +qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }) // 'a[]=b&a[]=c' -Qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }) +qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }) // 'a=b&a=c' ``` Empty strings and null values will omit the value, but the equals sign (=) remains in place: ```javascript -Qs.stringify({ a: '' }); -// 'a=' +assert.equal(qs.stringify({ a: '' }), 'a='); ``` Properties that are set to `undefined` will be omitted entirely: ```javascript -Qs.stringify({ a: null, b: undefined }); -// 'a=' +assert.equal(qs.stringify({ a: null, b: undefined }), 'a='); ``` The delimiter may be overridden with stringify as well: ```javascript -Qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }); -// 'a=b;c=d' +assert.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d'); ``` Finally, you can use the `filter` option to restrict which keys will be included in the stringified output. @@ -283,11 +288,11 @@ function filterFunc(prefix, value) { } return value; } -Qs.stringify({ a: 'b', c: 'd', e: { f: new Date(123), g: [2] } }, { filter: filterFunc }) +qs.stringify({ a: 'b', c: 'd', e: { f: new Date(123), g: [2] } }, { filter: filterFunc }); // 'a=b&c=d&e[f]=123&e[g][0]=4' -Qs.stringify({ a: 'b', c: 'd', e: 'f' }, { filter: ['a', 'e'] }) +qs.stringify({ a: 'b', c: 'd', e: 'f' }, { filter: ['a', 'e'] }); // 'a=b&e=f' -Qs.stringify({ a: ['b', 'c', 'd'], e: 'f' }, { filter: ['a', 0, 2] }) +qs.stringify({ a: ['b', 'c', 'd'], e: 'f' }, { filter: ['a', 0, 2] }); // 'a[0]=b&a[2]=d' ``` @@ -296,36 +301,35 @@ Qs.stringify({ a: ['b', 'c', 'd'], e: 'f' }, { filter: ['a', 0, 2] }) By default, `null` values are treated like empty strings: ```javascript -Qs.stringify({ a: null, b: '' }); -// 'a=&b=' +var withNull = qs.stringify({ a: null, b: '' }); +assert.equal(withNull, 'a=&b='); ``` Parsing does not distinguish between parameters with and without equal signs. Both are converted to empty strings. ```javascript -Qs.parse('a&b=') -// { a: '', b: '' } +var equalsInsensitive = qs.parse('a&b='); +assert.deepEqual(equalsInsensitive, { a: '', b: '' }); ``` To distinguish between `null` values and empty strings use the `strictNullHandling` flag. In the result string the `null` values have no `=` sign: ```javascript -Qs.stringify({ a: null, b: '' }, { strictNullHandling: true }); -// 'a&b=' +var strictNull = qs.stringify({ a: null, b: '' }, { strictNullHandling: true }); +assert.equal(strictNull, 'a&b='); ``` To parse values without `=` back to `null` use the `strictNullHandling` flag: ```javascript -Qs.parse('a&b=', { strictNullHandling: true }); -// { a: null, b: '' } - +var parsedStrictNull = qs.parse('a&b=', { strictNullHandling: true }); +assert.deepEqual(parsedStrictNull, { a: null, b: '' }); ``` To completely skip rendering keys with `null` values, use the `skipNulls` flag: ```javascript -qs.stringify({ a: 'b', c: null}, { skipNulls: true }) -// 'a=b' +var nullsSkipped = qs.stringify({ a: 'b', c: null}, { skipNulls: true }); +assert.equal(nullsSkipped, 'a=b'); ``` diff --git a/deps/npm/node_modules/request/node_modules/qs/bower.json b/deps/npm/node_modules/request/node_modules/qs/bower.json index 53a70d0c94d733..8b21420a643286 100644 --- a/deps/npm/node_modules/request/node_modules/qs/bower.json +++ b/deps/npm/node_modules/request/node_modules/qs/bower.json @@ -1,7 +1,7 @@ { "name": "qs", "main": "dist/qs.js", - "version": "5.1.0", + "version": "5.2.0", "homepage": "https://github.com/hapijs/qs", "authors": [ "Nathan LaFreniere " diff --git a/deps/npm/node_modules/request/node_modules/qs/component.json b/deps/npm/node_modules/request/node_modules/qs/component.json index 1a1f72c7af3e86..fca856a631ae37 100644 --- a/deps/npm/node_modules/request/node_modules/qs/component.json +++ b/deps/npm/node_modules/request/node_modules/qs/component.json @@ -2,7 +2,7 @@ "name": "qs", "repository": "hapijs/qs", "description": "query-string parser / stringifier with nesting support", - "version": "5.1.0", + "version": "5.2.0", "keywords": ["querystring", "query", "parser"], "main": "lib/index.js", "scripts": [ diff --git a/deps/npm/node_modules/request/node_modules/qs/dist/qs.js b/deps/npm/node_modules/request/node_modules/qs/dist/qs.js index b72e97682d4b10..68433d45a8022d 100644 --- a/deps/npm/node_modules/request/node_modules/qs/dist/qs.js +++ b/deps/npm/node_modules/request/node_modules/qs/dist/qs.js @@ -1,28 +1,19 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Qs = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 0 && - (options.parseArrays && - index <= options.arrayLimit)) { - + (options.parseArrays && index <= options.arrayLimit) + ) { obj = []; obj[index] = internals.parseObject(chain, val, options); - } - else { + } else { obj[cleanRoot] = internals.parseObject(chain, val, options); } } @@ -104,18 +86,13 @@ internals.parseObject = function (chain, val, options) { return obj; }; - -internals.parseKeys = function (key, val, options) { - - if (!key) { +internals.parseKeys = function (givenKey, val, options) { + if (!givenKey) { return; } // Transform dot notation to bracket notation - - if (options.allowDots) { - key = key.replace(/\.([^\.\[]+)/g, '[$1]'); - } + var key = options.allowDots ? givenKey.replace(/\.([^\.\[]+)/g, '[$1]') : givenKey; // The regex chunks @@ -132,9 +109,7 @@ internals.parseKeys = function (key, val, options) { if (segment[1]) { // If we aren't using plain objects, optionally prefix keys // that would overwrite object prototype properties - if (!options.plainObjects && - Object.prototype.hasOwnProperty(segment[1])) { - + if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1])) { if (!options.allowPrototypes) { return; } @@ -147,11 +122,8 @@ internals.parseKeys = function (key, val, options) { var i = 0; while ((segment = child.exec(key)) !== null && i < options.depth) { - - ++i; - if (!options.plainObjects && - Object.prototype.hasOwnProperty(segment[1].replace(/\[|\]/g, ''))) { - + i += 1; + if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1].replace(/\[|\]/g, ''))) { if (!options.allowPrototypes) { continue; } @@ -168,10 +140,8 @@ internals.parseKeys = function (key, val, options) { return internals.parseObject(keys, val, options); }; - -module.exports = function (str, options) { - - options = options || {}; +module.exports = function (str, opts) { + var options = opts || {}; options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : internals.delimiter; options.depth = typeof options.depth === 'number' ? options.depth : internals.depth; options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : internals.arrayLimit; @@ -182,10 +152,11 @@ module.exports = function (str, options) { options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : internals.parameterLimit; options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling; - if (str === '' || + if ( + str === '' || str === null || - typeof str === 'undefined') { - + typeof str === 'undefined' + ) { return options.plainObjects ? Object.create(null) : {}; } @@ -195,7 +166,7 @@ module.exports = function (str, options) { // Iterate over the keys and setup the new object var keys = Object.keys(tempObj); - for (var i = 0, il = keys.length; i < il; ++i) { + for (var i = 0; i < keys.length; ++i) { var key = keys[i]; var newObj = internals.parseKeys(key, tempObj[key], options); obj = Utils.merge(obj, newObj, options); @@ -205,26 +176,20 @@ module.exports = function (str, options) { }; },{"./utils":4}],3:[function(require,module,exports){ -// Load modules +'use strict'; var Utils = require('./utils'); - -// Declare internals - var internals = { delimiter: '&', arrayPrefixGenerators: { - brackets: function (prefix, key) { - + brackets: function (prefix) { return prefix + '[]'; }, indices: function (prefix, key) { - return prefix + '[' + key + ']'; }, - repeat: function (prefix, key) { - + repeat: function (prefix) { return prefix; } }, @@ -233,19 +198,15 @@ var internals = { encode: true }; - -internals.stringify = function (obj, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter) { - +internals.stringify = function (object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort) { + var obj = object; if (typeof filter === 'function') { obj = filter(prefix, obj); - } - else if (Utils.isBuffer(obj)) { - obj = obj.toString(); - } - else if (obj instanceof Date) { + } else if (Utils.isBuffer(obj)) { + obj = String(obj); + } else if (obj instanceof Date) { obj = obj.toISOString(); - } - else if (obj === null) { + } else if (obj === null) { if (strictNullHandling) { return encode ? Utils.encode(prefix) : prefix; } @@ -253,10 +214,7 @@ internals.stringify = function (obj, prefix, generateArrayPrefix, strictNullHand obj = ''; } - if (typeof obj === 'string' || - typeof obj === 'number' || - typeof obj === 'boolean') { - + if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean') { if (encode) { return [Utils.encode(prefix) + '=' + Utils.encode(obj)]; } @@ -269,20 +227,24 @@ internals.stringify = function (obj, prefix, generateArrayPrefix, strictNullHand return values; } - var objKeys = Array.isArray(filter) ? filter : Object.keys(obj); - for (var i = 0, il = objKeys.length; i < il; ++i) { - var key = objKeys[i]; + var objKeys; + if (Array.isArray(filter)) { + objKeys = filter; + } else { + var keys = Object.keys(obj); + objKeys = sort ? keys.sort(sort) : keys; + } - if (skipNulls && - obj[key] === null) { + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + if (skipNulls && obj[key] === null) { continue; } if (Array.isArray(obj)) { values = values.concat(internals.stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encode, filter)); - } - else { + } else { values = values.concat(internals.stringify(obj[key], prefix + '[' + key + ']', generateArrayPrefix, strictNullHandling, skipNulls, encode, filter)); } } @@ -290,40 +252,35 @@ internals.stringify = function (obj, prefix, generateArrayPrefix, strictNullHand return values; }; - -module.exports = function (obj, options) { - - options = options || {}; +module.exports = function (object, opts) { + var obj = object; + var options = opts || {}; var delimiter = typeof options.delimiter === 'undefined' ? internals.delimiter : options.delimiter; var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling; var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : internals.skipNulls; var encode = typeof options.encode === 'boolean' ? options.encode : internals.encode; + var sort = typeof options.sort === 'function' ? options.sort : null; var objKeys; var filter; if (typeof options.filter === 'function') { filter = options.filter; obj = filter('', obj); - } - else if (Array.isArray(options.filter)) { + } else if (Array.isArray(options.filter)) { objKeys = filter = options.filter; } var keys = []; - if (typeof obj !== 'object' || - obj === null) { - + if (typeof obj !== 'object' || obj === null) { return ''; } var arrayFormat; if (options.arrayFormat in internals.arrayPrefixGenerators) { arrayFormat = options.arrayFormat; - } - else if ('indices' in options) { + } else if ('indices' in options) { arrayFormat = options.indices ? 'indices' : 'repeat'; - } - else { + } else { arrayFormat = 'indices'; } @@ -333,40 +290,39 @@ module.exports = function (obj, options) { objKeys = Object.keys(obj); } - for (var i = 0, il = objKeys.length; i < il; ++i) { - var key = objKeys[i]; + if (sort) { + objKeys.sort(sort); + } - if (skipNulls && - obj[key] === null) { + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + if (skipNulls && obj[key] === null) { continue; } - keys = keys.concat(internals.stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter)); + keys = keys.concat(internals.stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort)); } return keys.join(delimiter); }; },{"./utils":4}],4:[function(require,module,exports){ -// Load modules - +'use strict'; -// Declare internals - -var internals = {}; -internals.hexTable = new Array(256); -for (var h = 0; h < 256; ++h) { - internals.hexTable[h] = '%' + ((h < 16 ? '0' : '') + h.toString(16)).toUpperCase(); -} +var hexTable = (function () { + var array = new Array(256); + for (var i = 0; i < 256; ++i) { + array[i] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase(); + } + return array; +}()); exports.arrayToObject = function (source, options) { - var obj = options.plainObjects ? Object.create(null) : {}; - for (var i = 0, il = source.length; i < il; ++i) { + for (var i = 0; i < source.length; ++i) { if (typeof source[i] !== 'undefined') { - obj[i] = source[i]; } } @@ -374,9 +330,7 @@ exports.arrayToObject = function (source, options) { return obj; }; - exports.merge = function (target, source, options) { - if (!source) { return target; } @@ -384,47 +338,37 @@ exports.merge = function (target, source, options) { if (typeof source !== 'object') { if (Array.isArray(target)) { target.push(source); - } - else if (typeof target === 'object') { + } else if (typeof target === 'object') { target[source] = true; - } - else { - target = [target, source]; + } else { + return [target, source]; } return target; } if (typeof target !== 'object') { - target = [target].concat(source); - return target; + return [target].concat(source); } - if (Array.isArray(target) && - !Array.isArray(source)) { - - target = exports.arrayToObject(target, options); + var mergeTarget = target; + if (Array.isArray(target) && !Array.isArray(source)) { + mergeTarget = exports.arrayToObject(target, options); } - var keys = Object.keys(source); - for (var k = 0, kl = keys.length; k < kl; ++k) { - var key = keys[k]; + return Object.keys(source).reduce(function (acc, key) { var value = source[key]; - if (!Object.prototype.hasOwnProperty.call(target, key)) { - target[key] = value; + if (Object.prototype.hasOwnProperty.call(acc, key)) { + acc[key] = exports.merge(acc[key], value, options); + } else { + acc[key] = value; } - else { - target[key] = exports.merge(target[key], value, options); - } - } - - return target; + return acc; + }, mergeTarget); }; - exports.decode = function (str) { - try { return decodeURIComponent(str.replace(/\+/g, ' ')); } catch (e) { @@ -433,65 +377,60 @@ exports.decode = function (str) { }; exports.encode = function (str) { - // This code was originally written by Brian White (mscdex) for the io.js core querystring library. // It has been adapted here for stricter adherence to RFC 3986 if (str.length === 0) { return str; } - if (typeof str !== 'string') { - str = '' + str; - } + var string = typeof str === 'string' ? str : String(str); var out = ''; - for (var i = 0, il = str.length; i < il; ++i) { - var c = str.charCodeAt(i); + for (var i = 0; i < string.length; ++i) { + var c = string.charCodeAt(i); - if (c === 0x2D || // - + if ( + c === 0x2D || // - c === 0x2E || // . c === 0x5F || // _ c === 0x7E || // ~ (c >= 0x30 && c <= 0x39) || // 0-9 (c >= 0x41 && c <= 0x5A) || // a-z - (c >= 0x61 && c <= 0x7A)) { // A-Z - - out += str[i]; + (c >= 0x61 && c <= 0x7A) // A-Z + ) { + out += string.charAt(i); continue; } if (c < 0x80) { - out += internals.hexTable[c]; + out = out + hexTable[c]; continue; } if (c < 0x800) { - out += internals.hexTable[0xC0 | (c >> 6)] + internals.hexTable[0x80 | (c & 0x3F)]; + out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); continue; } if (c < 0xD800 || c >= 0xE000) { - out += internals.hexTable[0xE0 | (c >> 12)] + internals.hexTable[0x80 | ((c >> 6) & 0x3F)] + internals.hexTable[0x80 | (c & 0x3F)]; + out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); continue; } - ++i; - c = 0x10000 + (((c & 0x3FF) << 10) | (str.charCodeAt(i) & 0x3FF)); - out += internals.hexTable[0xF0 | (c >> 18)] + internals.hexTable[0x80 | ((c >> 12) & 0x3F)] + internals.hexTable[0x80 | ((c >> 6) & 0x3F)] + internals.hexTable[0x80 | (c & 0x3F)]; + i += 1; + c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); + out += (hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); } return out; }; -exports.compact = function (obj, refs) { - - if (typeof obj !== 'object' || - obj === null) { - +exports.compact = function (obj, references) { + if (typeof obj !== 'object' || obj === null) { return obj; } - refs = refs || []; + var refs = references || []; var lookup = refs.indexOf(obj); if (lookup !== -1) { return refs[lookup]; @@ -502,7 +441,7 @@ exports.compact = function (obj, refs) { if (Array.isArray(obj)) { var compacted = []; - for (var i = 0, il = obj.length; i < il; ++i) { + for (var i = 0; i < obj.length; ++i) { if (typeof obj[i] !== 'undefined') { compacted.push(obj[i]); } @@ -512,32 +451,24 @@ exports.compact = function (obj, refs) { } var keys = Object.keys(obj); - for (i = 0, il = keys.length; i < il; ++i) { - var key = keys[i]; + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; obj[key] = exports.compact(obj[key], refs); } return obj; }; - exports.isRegExp = function (obj) { - return Object.prototype.toString.call(obj) === '[object RegExp]'; }; - exports.isBuffer = function (obj) { - - if (obj === null || - typeof obj === 'undefined') { - + if (obj === null || typeof obj === 'undefined') { return false; } - return !!(obj.constructor && - obj.constructor.isBuffer && - obj.constructor.isBuffer(obj)); + return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); }; },{}]},{},[1])(1) diff --git a/deps/npm/node_modules/request/node_modules/qs/lib/index.js b/deps/npm/node_modules/request/node_modules/qs/lib/index.js old mode 100644 new mode 100755 index 0e094933d1bcd0..190195902a0cb0 --- a/deps/npm/node_modules/request/node_modules/qs/lib/index.js +++ b/deps/npm/node_modules/request/node_modules/qs/lib/index.js @@ -1,14 +1,8 @@ -// Load modules +'use strict'; var Stringify = require('./stringify'); var Parse = require('./parse'); - -// Declare internals - -var internals = {}; - - module.exports = { stringify: Stringify, parse: Parse diff --git a/deps/npm/node_modules/request/node_modules/qs/lib/parse.js b/deps/npm/node_modules/request/node_modules/qs/lib/parse.js old mode 100644 new mode 100755 index 4a2137efab7668..9b6cbd221987f0 --- a/deps/npm/node_modules/request/node_modules/qs/lib/parse.js +++ b/deps/npm/node_modules/request/node_modules/qs/lib/parse.js @@ -1,10 +1,7 @@ -// Load modules +'use strict'; var Utils = require('./utils'); - -// Declare internals - var internals = { delimiter: '&', depth: 5, @@ -16,13 +13,11 @@ var internals = { allowDots: false }; - internals.parseValues = function (str, options) { - var obj = {}; var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit); - for (var i = 0, il = parts.length; i < il; ++i) { + for (var i = 0; i < parts.length; ++i) { var part = parts[i]; var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1; @@ -32,16 +27,14 @@ internals.parseValues = function (str, options) { if (options.strictNullHandling) { obj[Utils.decode(part)] = null; } - } - else { + } else { var key = Utils.decode(part.slice(0, pos)); var val = Utils.decode(part.slice(pos + 1)); - if (!Object.prototype.hasOwnProperty.call(obj, key)) { - obj[key] = val; - } - else { + if (Object.prototype.hasOwnProperty.call(obj, key)) { obj[key] = [].concat(obj[key]).concat(val); + } else { + obj[key] = val; } } } @@ -49,9 +42,7 @@ internals.parseValues = function (str, options) { return obj; }; - internals.parseObject = function (chain, val, options) { - if (!chain.length) { return val; } @@ -62,23 +53,20 @@ internals.parseObject = function (chain, val, options) { if (root === '[]') { obj = []; obj = obj.concat(internals.parseObject(chain, val, options)); - } - else { + } else { obj = options.plainObjects ? Object.create(null) : {}; var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root; var index = parseInt(cleanRoot, 10); - var indexString = '' + index; - if (!isNaN(index) && + if ( + !isNaN(index) && root !== cleanRoot && - indexString === cleanRoot && + String(index) === cleanRoot && index >= 0 && - (options.parseArrays && - index <= options.arrayLimit)) { - + (options.parseArrays && index <= options.arrayLimit) + ) { obj = []; obj[index] = internals.parseObject(chain, val, options); - } - else { + } else { obj[cleanRoot] = internals.parseObject(chain, val, options); } } @@ -86,18 +74,13 @@ internals.parseObject = function (chain, val, options) { return obj; }; - -internals.parseKeys = function (key, val, options) { - - if (!key) { +internals.parseKeys = function (givenKey, val, options) { + if (!givenKey) { return; } // Transform dot notation to bracket notation - - if (options.allowDots) { - key = key.replace(/\.([^\.\[]+)/g, '[$1]'); - } + var key = options.allowDots ? givenKey.replace(/\.([^\.\[]+)/g, '[$1]') : givenKey; // The regex chunks @@ -114,9 +97,7 @@ internals.parseKeys = function (key, val, options) { if (segment[1]) { // If we aren't using plain objects, optionally prefix keys // that would overwrite object prototype properties - if (!options.plainObjects && - Object.prototype.hasOwnProperty(segment[1])) { - + if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1])) { if (!options.allowPrototypes) { return; } @@ -129,11 +110,8 @@ internals.parseKeys = function (key, val, options) { var i = 0; while ((segment = child.exec(key)) !== null && i < options.depth) { - - ++i; - if (!options.plainObjects && - Object.prototype.hasOwnProperty(segment[1].replace(/\[|\]/g, ''))) { - + i += 1; + if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1].replace(/\[|\]/g, ''))) { if (!options.allowPrototypes) { continue; } @@ -150,10 +128,8 @@ internals.parseKeys = function (key, val, options) { return internals.parseObject(keys, val, options); }; - -module.exports = function (str, options) { - - options = options || {}; +module.exports = function (str, opts) { + var options = opts || {}; options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : internals.delimiter; options.depth = typeof options.depth === 'number' ? options.depth : internals.depth; options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : internals.arrayLimit; @@ -164,10 +140,11 @@ module.exports = function (str, options) { options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : internals.parameterLimit; options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling; - if (str === '' || + if ( + str === '' || str === null || - typeof str === 'undefined') { - + typeof str === 'undefined' + ) { return options.plainObjects ? Object.create(null) : {}; } @@ -177,7 +154,7 @@ module.exports = function (str, options) { // Iterate over the keys and setup the new object var keys = Object.keys(tempObj); - for (var i = 0, il = keys.length; i < il; ++i) { + for (var i = 0; i < keys.length; ++i) { var key = keys[i]; var newObj = internals.parseKeys(key, tempObj[key], options); obj = Utils.merge(obj, newObj, options); diff --git a/deps/npm/node_modules/request/node_modules/qs/lib/stringify.js b/deps/npm/node_modules/request/node_modules/qs/lib/stringify.js old mode 100644 new mode 100755 index d05aa8752a160f..e7b669d3d58288 --- a/deps/npm/node_modules/request/node_modules/qs/lib/stringify.js +++ b/deps/npm/node_modules/request/node_modules/qs/lib/stringify.js @@ -1,23 +1,17 @@ -// Load modules +'use strict'; var Utils = require('./utils'); - -// Declare internals - var internals = { delimiter: '&', arrayPrefixGenerators: { - brackets: function (prefix, key) { - + brackets: function (prefix) { return prefix + '[]'; }, indices: function (prefix, key) { - return prefix + '[' + key + ']'; }, - repeat: function (prefix, key) { - + repeat: function (prefix) { return prefix; } }, @@ -26,19 +20,15 @@ var internals = { encode: true }; - -internals.stringify = function (obj, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort) { - +internals.stringify = function (object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort) { + var obj = object; if (typeof filter === 'function') { obj = filter(prefix, obj); - } - else if (Utils.isBuffer(obj)) { - obj = obj.toString(); - } - else if (obj instanceof Date) { + } else if (Utils.isBuffer(obj)) { + obj = String(obj); + } else if (obj instanceof Date) { obj = obj.toISOString(); - } - else if (obj === null) { + } else if (obj === null) { if (strictNullHandling) { return encode ? Utils.encode(prefix) : prefix; } @@ -46,10 +36,7 @@ internals.stringify = function (obj, prefix, generateArrayPrefix, strictNullHand obj = ''; } - if (typeof obj === 'string' || - typeof obj === 'number' || - typeof obj === 'boolean') { - + if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean') { if (encode) { return [Utils.encode(prefix) + '=' + Utils.encode(obj)]; } @@ -70,19 +57,16 @@ internals.stringify = function (obj, prefix, generateArrayPrefix, strictNullHand objKeys = sort ? keys.sort(sort) : keys; } - for (var i = 0, il = objKeys.length; i < il; ++i) { + for (var i = 0; i < objKeys.length; ++i) { var key = objKeys[i]; - if (skipNulls && - obj[key] === null) { - + if (skipNulls && obj[key] === null) { continue; } if (Array.isArray(obj)) { values = values.concat(internals.stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encode, filter)); - } - else { + } else { values = values.concat(internals.stringify(obj[key], prefix + '[' + key + ']', generateArrayPrefix, strictNullHandling, skipNulls, encode, filter)); } } @@ -90,10 +74,9 @@ internals.stringify = function (obj, prefix, generateArrayPrefix, strictNullHand return values; }; - -module.exports = function (obj, options) { - - options = options || {}; +module.exports = function (object, opts) { + var obj = object; + var options = opts || {}; var delimiter = typeof options.delimiter === 'undefined' ? internals.delimiter : options.delimiter; var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling; var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : internals.skipNulls; @@ -104,27 +87,22 @@ module.exports = function (obj, options) { if (typeof options.filter === 'function') { filter = options.filter; obj = filter('', obj); - } - else if (Array.isArray(options.filter)) { + } else if (Array.isArray(options.filter)) { objKeys = filter = options.filter; } var keys = []; - if (typeof obj !== 'object' || - obj === null) { - + if (typeof obj !== 'object' || obj === null) { return ''; } var arrayFormat; if (options.arrayFormat in internals.arrayPrefixGenerators) { arrayFormat = options.arrayFormat; - } - else if ('indices' in options) { + } else if ('indices' in options) { arrayFormat = options.indices ? 'indices' : 'repeat'; - } - else { + } else { arrayFormat = 'indices'; } @@ -138,12 +116,10 @@ module.exports = function (obj, options) { objKeys.sort(sort); } - for (var i = 0, il = objKeys.length; i < il; ++i) { + for (var i = 0; i < objKeys.length; ++i) { var key = objKeys[i]; - if (skipNulls && - obj[key] === null) { - + if (skipNulls && obj[key] === null) { continue; } diff --git a/deps/npm/node_modules/request/node_modules/qs/lib/utils.js b/deps/npm/node_modules/request/node_modules/qs/lib/utils.js old mode 100644 new mode 100755 index 88f314732b7ee0..5d433560306849 --- a/deps/npm/node_modules/request/node_modules/qs/lib/utils.js +++ b/deps/npm/node_modules/request/node_modules/qs/lib/utils.js @@ -1,21 +1,18 @@ -// Load modules +'use strict'; +var hexTable = (function () { + var array = new Array(256); + for (var i = 0; i < 256; ++i) { + array[i] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase(); + } -// Declare internals - -var internals = {}; -internals.hexTable = new Array(256); -for (var h = 0; h < 256; ++h) { - internals.hexTable[h] = '%' + ((h < 16 ? '0' : '') + h.toString(16)).toUpperCase(); -} - + return array; +}()); exports.arrayToObject = function (source, options) { - var obj = options.plainObjects ? Object.create(null) : {}; - for (var i = 0, il = source.length; i < il; ++i) { + for (var i = 0; i < source.length; ++i) { if (typeof source[i] !== 'undefined') { - obj[i] = source[i]; } } @@ -23,9 +20,7 @@ exports.arrayToObject = function (source, options) { return obj; }; - exports.merge = function (target, source, options) { - if (!source) { return target; } @@ -33,47 +28,37 @@ exports.merge = function (target, source, options) { if (typeof source !== 'object') { if (Array.isArray(target)) { target.push(source); - } - else if (typeof target === 'object') { + } else if (typeof target === 'object') { target[source] = true; - } - else { - target = [target, source]; + } else { + return [target, source]; } return target; } if (typeof target !== 'object') { - target = [target].concat(source); - return target; + return [target].concat(source); } - if (Array.isArray(target) && - !Array.isArray(source)) { - - target = exports.arrayToObject(target, options); + var mergeTarget = target; + if (Array.isArray(target) && !Array.isArray(source)) { + mergeTarget = exports.arrayToObject(target, options); } - var keys = Object.keys(source); - for (var k = 0, kl = keys.length; k < kl; ++k) { - var key = keys[k]; + return Object.keys(source).reduce(function (acc, key) { var value = source[key]; - if (!Object.prototype.hasOwnProperty.call(target, key)) { - target[key] = value; - } - else { - target[key] = exports.merge(target[key], value, options); + if (Object.prototype.hasOwnProperty.call(acc, key)) { + acc[key] = exports.merge(acc[key], value, options); + } else { + acc[key] = value; } - } - - return target; + return acc; + }, mergeTarget); }; - exports.decode = function (str) { - try { return decodeURIComponent(str.replace(/\+/g, ' ')); } catch (e) { @@ -82,65 +67,60 @@ exports.decode = function (str) { }; exports.encode = function (str) { - // This code was originally written by Brian White (mscdex) for the io.js core querystring library. // It has been adapted here for stricter adherence to RFC 3986 if (str.length === 0) { return str; } - if (typeof str !== 'string') { - str = '' + str; - } + var string = typeof str === 'string' ? str : String(str); var out = ''; - for (var i = 0, il = str.length; i < il; ++i) { - var c = str.charCodeAt(i); + for (var i = 0; i < string.length; ++i) { + var c = string.charCodeAt(i); - if (c === 0x2D || // - + if ( + c === 0x2D || // - c === 0x2E || // . c === 0x5F || // _ c === 0x7E || // ~ (c >= 0x30 && c <= 0x39) || // 0-9 (c >= 0x41 && c <= 0x5A) || // a-z - (c >= 0x61 && c <= 0x7A)) { // A-Z - - out += str[i]; + (c >= 0x61 && c <= 0x7A) // A-Z + ) { + out += string.charAt(i); continue; } if (c < 0x80) { - out += internals.hexTable[c]; + out = out + hexTable[c]; continue; } if (c < 0x800) { - out += internals.hexTable[0xC0 | (c >> 6)] + internals.hexTable[0x80 | (c & 0x3F)]; + out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); continue; } if (c < 0xD800 || c >= 0xE000) { - out += internals.hexTable[0xE0 | (c >> 12)] + internals.hexTable[0x80 | ((c >> 6) & 0x3F)] + internals.hexTable[0x80 | (c & 0x3F)]; + out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); continue; } - ++i; - c = 0x10000 + (((c & 0x3FF) << 10) | (str.charCodeAt(i) & 0x3FF)); - out += internals.hexTable[0xF0 | (c >> 18)] + internals.hexTable[0x80 | ((c >> 12) & 0x3F)] + internals.hexTable[0x80 | ((c >> 6) & 0x3F)] + internals.hexTable[0x80 | (c & 0x3F)]; + i += 1; + c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); + out += (hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); } return out; }; -exports.compact = function (obj, refs) { - - if (typeof obj !== 'object' || - obj === null) { - +exports.compact = function (obj, references) { + if (typeof obj !== 'object' || obj === null) { return obj; } - refs = refs || []; + var refs = references || []; var lookup = refs.indexOf(obj); if (lookup !== -1) { return refs[lookup]; @@ -151,7 +131,7 @@ exports.compact = function (obj, refs) { if (Array.isArray(obj)) { var compacted = []; - for (var i = 0, il = obj.length; i < il; ++i) { + for (var i = 0; i < obj.length; ++i) { if (typeof obj[i] !== 'undefined') { compacted.push(obj[i]); } @@ -161,30 +141,22 @@ exports.compact = function (obj, refs) { } var keys = Object.keys(obj); - for (i = 0, il = keys.length; i < il; ++i) { - var key = keys[i]; + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; obj[key] = exports.compact(obj[key], refs); } return obj; }; - exports.isRegExp = function (obj) { - return Object.prototype.toString.call(obj) === '[object RegExp]'; }; - exports.isBuffer = function (obj) { - - if (obj === null || - typeof obj === 'undefined') { - + if (obj === null || typeof obj === 'undefined') { return false; } - return !!(obj.constructor && - obj.constructor.isBuffer && - obj.constructor.isBuffer(obj)); + return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); }; diff --git a/deps/npm/node_modules/request/node_modules/qs/package.json b/deps/npm/node_modules/request/node_modules/qs/package.json index 7e60df7007dfe5..ed0815b5b70542 100644 --- a/deps/npm/node_modules/request/node_modules/qs/package.json +++ b/deps/npm/node_modules/request/node_modules/qs/package.json @@ -1,59 +1,105 @@ { - "name": "qs", - "description": "A querystring parser that supports nesting and arrays, with a depth limit", - "homepage": "https://github.com/hapijs/qs", - "version": "5.2.0", - "repository": { - "type": "git", - "url": "git+https://github.com/hapijs/qs.git" - }, - "main": "lib/index.js", - "keywords": [ - "querystring", - "qs" + "_args": [ + [ + "qs@~6.0.2", + "/Users/rebecca/code/npm/node_modules/request" + ] ], - "engines": ">=0.10.40", - "dependencies": {}, - "devDependencies": { - "browserify": "^10.2.1", - "code": "1.x.x", - "lab": "5.x.x" + "_from": "qs@>=6.0.2 <6.1.0", + "_id": "qs@6.0.2", + "_inCache": true, + "_installable": true, + "_location": "/request/qs", + "_nodeVersion": "5.4.1", + "_npmUser": { + "email": "ljharb@gmail.com", + "name": "ljharb" }, - "scripts": { - "test": "lab -a code -t 100 -L", - "test-tap": "lab -a code -r tap -o tests.tap", - "test-cov-html": "lab -a code -r html -o coverage.html", - "dist": "browserify --standalone Qs lib/index.js > dist/qs.js" + "_npmVersion": "3.3.12", + "_phantomChildren": {}, + "_requested": { + "name": "qs", + "raw": "qs@~6.0.2", + "rawSpec": "~6.0.2", + "scope": null, + "spec": ">=6.0.2 <6.1.0", + "type": "range" }, - "license": "BSD-3-Clause", - "gitHead": "a341cdf2fadba5ede1ce6c95c7051f6f31f37b81", + "_requiredBy": [ + "/request" + ], + "_resolved": "https://registry.npmjs.org/qs/-/qs-6.0.2.tgz", + "_shasum": "88c68d590e8ed56c76c79f352c17b982466abfcd", + "_shrinkwrap": null, + "_spec": "qs@~6.0.2", + "_where": "/Users/rebecca/code/npm/node_modules/request", "bugs": { - "url": "https://github.com/hapijs/qs/issues" + "url": "https://github.com/ljharb/qs/issues" }, - "_id": "qs@5.2.0", - "_shasum": "a9f31142af468cb72b25b30136ba2456834916be", - "_from": "qs@>=5.2.0 <5.3.0", - "_npmVersion": "3.3.5", - "_nodeVersion": "0.10.40", - "_npmUser": { - "name": "nlf", - "email": "quitlahok@gmail.com" + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "dependencies": {}, + "description": "A querystring parser that supports nesting and arrays, with a depth limit", + "devDependencies": { + "@ljharb/eslint-config": "^1.6.1", + "browserify": "^12.0.1", + "covert": "^1.1.0", + "eslint": "^1.10.3", + "evalmd": "^0.0.16", + "mkdirp": "^0.5.1", + "parallelshell": "^2.0.0", + "tape": "^4.3.0" }, + "directories": {}, "dist": { - "shasum": "a9f31142af468cb72b25b30136ba2456834916be", - "tarball": "http://registry.npmjs.org/qs/-/qs-5.2.0.tgz" + "shasum": "88c68d590e8ed56c76c79f352c17b982466abfcd", + "tarball": "http://registry.npmjs.org/qs/-/qs-6.0.2.tgz" }, + "engines": { + "node": ">=0.6" + }, + "gitHead": "47dfbd6740b3cc1593847825701c8aa136f636e3", + "homepage": "https://github.com/ljharb/qs", + "keywords": [ + "qs", + "querystring" + ], + "license": "BSD-3-Clause", + "main": "lib/index.js", "maintainers": [ { - "name": "nlf", - "email": "quitlahok@gmail.com" + "name": "hueniverse", + "email": "eran@hammer.io" }, { - "name": "hueniverse", - "email": "eran@hueniverse.com" + "name": "ljharb", + "email": "ljharb@gmail.com" + }, + { + "name": "nlf", + "email": "quitlahok@gmail.com" } ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/qs/-/qs-5.2.0.tgz", - "readme": "ERROR: No README data found!" + "name": "qs", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/qs.git" + }, + "scripts": { + "coverage": "covert test", + "dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js", + "lint": "eslint lib/*.js text/*.js", + "prepublish": "npm run dist", + "readme": "evalmd README.md", + "test": "parallelshell 'npm run readme' 'npm run lint' 'npm run coverage'", + "tests-only": "node test" + }, + "version": "6.0.2" } diff --git a/deps/npm/node_modules/request/node_modules/qs/test/index.js b/deps/npm/node_modules/request/node_modules/qs/test/index.js new file mode 100644 index 00000000000000..b6a7d9526a90b6 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/qs/test/index.js @@ -0,0 +1,5 @@ +require('./parse'); + +require('./stringify'); + +require('./utils'); diff --git a/deps/npm/node_modules/request/node_modules/qs/test/parse.js b/deps/npm/node_modules/request/node_modules/qs/test/parse.js old mode 100644 new mode 100755 index 679f19747af669..5665d074e95bd4 --- a/deps/npm/node_modules/request/node_modules/qs/test/parse.js +++ b/deps/npm/node_modules/request/node_modules/qs/test/parse.js @@ -1,478 +1,393 @@ -/* eslint no-extend-native:0 */ -// Load modules - -var Code = require('code'); -var Lab = require('lab'); -var Qs = require('../'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var lab = exports.lab = Lab.script(); -var expect = Code.expect; -var describe = lab.experiment; -var it = lab.test; - - -describe('parse()', function () { - - it('parses a simple string', function (done) { - - expect(Qs.parse('0=foo')).to.deep.equal({ '0': 'foo' }); - expect(Qs.parse('foo=c++')).to.deep.equal({ foo: 'c ' }); - expect(Qs.parse('a[>=]=23')).to.deep.equal({ a: { '>=': '23' } }); - expect(Qs.parse('a[<=>]==23')).to.deep.equal({ a: { '<=>': '=23' } }); - expect(Qs.parse('a[==]=23')).to.deep.equal({ a: { '==': '23' } }); - expect(Qs.parse('foo', { strictNullHandling: true })).to.deep.equal({ foo: null }); - expect(Qs.parse('foo' )).to.deep.equal({ foo: '' }); - expect(Qs.parse('foo=')).to.deep.equal({ foo: '' }); - expect(Qs.parse('foo=bar')).to.deep.equal({ foo: 'bar' }); - expect(Qs.parse(' foo = bar = baz ')).to.deep.equal({ ' foo ': ' bar = baz ' }); - expect(Qs.parse('foo=bar=baz')).to.deep.equal({ foo: 'bar=baz' }); - expect(Qs.parse('foo=bar&bar=baz')).to.deep.equal({ foo: 'bar', bar: 'baz' }); - expect(Qs.parse('foo2=bar2&baz2=')).to.deep.equal({ foo2: 'bar2', baz2: '' }); - expect(Qs.parse('foo=bar&baz', { strictNullHandling: true })).to.deep.equal({ foo: 'bar', baz: null }); - expect(Qs.parse('foo=bar&baz')).to.deep.equal({ foo: 'bar', baz: '' }); - expect(Qs.parse('cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World')).to.deep.equal({ +'use strict'; + +var test = require('tape'); +var qs = require('../'); + +test('parse()', function (t) { + t.test('parses a simple string', function (st) { + st.deepEqual(qs.parse('0=foo'), { '0': 'foo' }); + st.deepEqual(qs.parse('foo=c++'), { foo: 'c ' }); + st.deepEqual(qs.parse('a[>=]=23'), { a: { '>=': '23' } }); + st.deepEqual(qs.parse('a[<=>]==23'), { a: { '<=>': '=23' } }); + st.deepEqual(qs.parse('a[==]=23'), { a: { '==': '23' } }); + st.deepEqual(qs.parse('foo', { strictNullHandling: true }), { foo: null }); + st.deepEqual(qs.parse('foo'), { foo: '' }); + st.deepEqual(qs.parse('foo='), { foo: '' }); + st.deepEqual(qs.parse('foo=bar'), { foo: 'bar' }); + st.deepEqual(qs.parse(' foo = bar = baz '), { ' foo ': ' bar = baz ' }); + st.deepEqual(qs.parse('foo=bar=baz'), { foo: 'bar=baz' }); + st.deepEqual(qs.parse('foo=bar&bar=baz'), { foo: 'bar', bar: 'baz' }); + st.deepEqual(qs.parse('foo2=bar2&baz2='), { foo2: 'bar2', baz2: '' }); + st.deepEqual(qs.parse('foo=bar&baz', { strictNullHandling: true }), { foo: 'bar', baz: null }); + st.deepEqual(qs.parse('foo=bar&baz'), { foo: 'bar', baz: '' }); + st.deepEqual(qs.parse('cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World'), { cht: 'p3', chd: 't:60,40', chs: '250x100', chl: 'Hello|World' }); - done(); + st.end(); }); - it('allows enabling dot notation', function (done) { - - expect(Qs.parse('a.b=c')).to.deep.equal({ 'a.b': 'c' }); - expect(Qs.parse('a.b=c', { allowDots: true })).to.deep.equal({ a: { b: 'c' } }); - done(); + t.test('allows enabling dot notation', function (st) { + st.deepEqual(qs.parse('a.b=c'), { 'a.b': 'c' }); + st.deepEqual(qs.parse('a.b=c', { allowDots: true }), { a: { b: 'c' } }); + st.end(); }); - it('parses a single nested string', function (done) { + t.deepEqual(qs.parse('a[b]=c'), { a: { b: 'c' } }, 'parses a single nested string'); + t.deepEqual(qs.parse('a[b][c]=d'), { a: { b: { c: 'd' } } }, 'parses a double nested string'); + t.deepEqual( + qs.parse('a[b][c][d][e][f][g][h]=i'), + { a: { b: { c: { d: { e: { f: { '[g][h]': 'i' } } } } } } }, + 'defaults to a depth of 5' + ); - expect(Qs.parse('a[b]=c')).to.deep.equal({ a: { b: 'c' } }); - done(); + t.test('only parses one level when depth = 1', function (st) { + st.deepEqual(qs.parse('a[b][c]=d', { depth: 1 }), { a: { b: { '[c]': 'd' } } }); + st.deepEqual(qs.parse('a[b][c][d]=e', { depth: 1 }), { a: { b: { '[c][d]': 'e' } } }); + st.end(); }); - it('parses a double nested string', function (done) { + t.deepEqual(qs.parse('a=b&a=c'), { a: ['b', 'c'] }, 'parses a simple array'); - expect(Qs.parse('a[b][c]=d')).to.deep.equal({ a: { b: { c: 'd' } } }); - done(); + t.test('parses an explicit array', function (st) { + st.deepEqual(qs.parse('a[]=b'), { a: ['b'] }); + st.deepEqual(qs.parse('a[]=b&a[]=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[]=b&a[]=c&a[]=d'), { a: ['b', 'c', 'd'] }); + st.end(); }); - it('defaults to a depth of 5', function (done) { - - expect(Qs.parse('a[b][c][d][e][f][g][h]=i')).to.deep.equal({ a: { b: { c: { d: { e: { f: { '[g][h]': 'i' } } } } } } }); - done(); + t.test('parses a mix of simple and explicit arrays', function (st) { + st.deepEqual(qs.parse('a=b&a[]=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[0]=b&a=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a=b&a[0]=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[1]=b&a=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a=b&a[1]=c'), { a: ['b', 'c'] }); + st.end(); }); - it('only parses one level when depth = 1', function (done) { - - expect(Qs.parse('a[b][c]=d', { depth: 1 })).to.deep.equal({ a: { b: { '[c]': 'd' } } }); - expect(Qs.parse('a[b][c][d]=e', { depth: 1 })).to.deep.equal({ a: { b: { '[c][d]': 'e' } } }); - done(); + t.test('parses a nested array', function (st) { + st.deepEqual(qs.parse('a[b][]=c&a[b][]=d'), { a: { b: ['c', 'd'] } }); + st.deepEqual(qs.parse('a[>=]=25'), { a: { '>=': '25' } }); + st.end(); }); - it('parses a simple array', function (done) { - - expect(Qs.parse('a=b&a=c')).to.deep.equal({ a: ['b', 'c'] }); - done(); + t.test('allows to specify array indices', function (st) { + st.deepEqual(qs.parse('a[1]=c&a[0]=b&a[2]=d'), { a: ['b', 'c', 'd'] }); + st.deepEqual(qs.parse('a[1]=c&a[0]=b'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[1]=c'), { a: ['c'] }); + st.end(); }); - it('parses an explicit array', function (done) { - - expect(Qs.parse('a[]=b')).to.deep.equal({ a: ['b'] }); - expect(Qs.parse('a[]=b&a[]=c')).to.deep.equal({ a: ['b', 'c'] }); - expect(Qs.parse('a[]=b&a[]=c&a[]=d')).to.deep.equal({ a: ['b', 'c', 'd'] }); - done(); + t.test('limits specific array indices to 20', function (st) { + st.deepEqual(qs.parse('a[20]=a'), { a: ['a'] }); + st.deepEqual(qs.parse('a[21]=a'), { a: { '21': 'a' } }); + st.end(); }); - it('parses a mix of simple and explicit arrays', function (done) { + t.deepEqual(qs.parse('a[12b]=c'), { a: { '12b': 'c' } }, 'supports keys that begin with a number'); - expect(Qs.parse('a=b&a[]=c')).to.deep.equal({ a: ['b', 'c'] }); - expect(Qs.parse('a[]=b&a=c')).to.deep.equal({ a: ['b', 'c'] }); - expect(Qs.parse('a[0]=b&a=c')).to.deep.equal({ a: ['b', 'c'] }); - expect(Qs.parse('a=b&a[0]=c')).to.deep.equal({ a: ['b', 'c'] }); - expect(Qs.parse('a[1]=b&a=c')).to.deep.equal({ a: ['b', 'c'] }); - expect(Qs.parse('a=b&a[1]=c')).to.deep.equal({ a: ['b', 'c'] }); - done(); + t.test('supports encoded = signs', function (st) { + st.deepEqual(qs.parse('he%3Dllo=th%3Dere'), { 'he=llo': 'th=ere' }); + st.end(); }); - it('parses a nested array', function (done) { - - expect(Qs.parse('a[b][]=c&a[b][]=d')).to.deep.equal({ a: { b: ['c', 'd'] } }); - expect(Qs.parse('a[>=]=25')).to.deep.equal({ a: { '>=': '25' } }); - done(); - }); - - it('allows to specify array indices', function (done) { - - expect(Qs.parse('a[1]=c&a[0]=b&a[2]=d')).to.deep.equal({ a: ['b', 'c', 'd'] }); - expect(Qs.parse('a[1]=c&a[0]=b')).to.deep.equal({ a: ['b', 'c'] }); - expect(Qs.parse('a[1]=c')).to.deep.equal({ a: ['c'] }); - done(); - }); - - it('limits specific array indices to 20', function (done) { - - expect(Qs.parse('a[20]=a')).to.deep.equal({ a: ['a'] }); - expect(Qs.parse('a[21]=a')).to.deep.equal({ a: { '21': 'a' } }); - done(); - }); - - it('supports keys that begin with a number', function (done) { - - expect(Qs.parse('a[12b]=c')).to.deep.equal({ a: { '12b': 'c' } }); - done(); - }); - - it('supports encoded = signs', function (done) { - - expect(Qs.parse('he%3Dllo=th%3Dere')).to.deep.equal({ 'he=llo': 'th=ere' }); - done(); - }); - - it('is ok with url encoded strings', function (done) { - - expect(Qs.parse('a[b%20c]=d')).to.deep.equal({ a: { 'b c': 'd' } }); - expect(Qs.parse('a[b]=c%20d')).to.deep.equal({ a: { b: 'c d' } }); - done(); - }); - - it('allows brackets in the value', function (done) { - - expect(Qs.parse('pets=["tobi"]')).to.deep.equal({ pets: '["tobi"]' }); - expect(Qs.parse('operators=[">=", "<="]')).to.deep.equal({ operators: '[">=", "<="]' }); - done(); + t.test('is ok with url encoded strings', function (st) { + st.deepEqual(qs.parse('a[b%20c]=d'), { a: { 'b c': 'd' } }); + st.deepEqual(qs.parse('a[b]=c%20d'), { a: { b: 'c d' } }); + st.end(); }); - it('allows empty values', function (done) { - - expect(Qs.parse('')).to.deep.equal({}); - expect(Qs.parse(null)).to.deep.equal({}); - expect(Qs.parse(undefined)).to.deep.equal({}); - done(); + t.test('allows brackets in the value', function (st) { + st.deepEqual(qs.parse('pets=["tobi"]'), { pets: '["tobi"]' }); + st.deepEqual(qs.parse('operators=[">=", "<="]'), { operators: '[">=", "<="]' }); + st.end(); }); - it('transforms arrays to objects', function (done) { - - expect(Qs.parse('foo[0]=bar&foo[bad]=baz')).to.deep.equal({ foo: { '0': 'bar', bad: 'baz' } }); - expect(Qs.parse('foo[bad]=baz&foo[0]=bar')).to.deep.equal({ foo: { bad: 'baz', '0': 'bar' } }); - expect(Qs.parse('foo[bad]=baz&foo[]=bar')).to.deep.equal({ foo: { bad: 'baz', '0': 'bar' } }); - expect(Qs.parse('foo[]=bar&foo[bad]=baz')).to.deep.equal({ foo: { '0': 'bar', bad: 'baz' } }); - expect(Qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo')).to.deep.equal({ foo: { bad: 'baz', '0': 'bar', '1': 'foo' } }); - expect(Qs.parse('foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb')).to.deep.equal({ foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] }); - expect(Qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c')).to.deep.equal({ a: { '0': 'b', t: 'u', c: true } }); - expect(Qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y')).to.deep.equal({ a: { '0': 'b', '1': 'c', x: 'y' } }); - done(); + t.test('allows empty values', function (st) { + st.deepEqual(qs.parse(''), {}); + st.deepEqual(qs.parse(null), {}); + st.deepEqual(qs.parse(undefined), {}); + st.end(); }); - it('transforms arrays to objects (dot notation)', function (done) { - - expect(Qs.parse('foo[0].baz=bar&fool.bad=baz', { allowDots: true })).to.deep.equal({ foo: [{ baz: 'bar' }], fool: { bad: 'baz' } }); - expect(Qs.parse('foo[0].baz=bar&fool.bad.boo=baz', { allowDots: true })).to.deep.equal({ foo: [{ baz: 'bar' }], fool: { bad: { boo: 'baz' } } }); - expect(Qs.parse('foo[0][0].baz=bar&fool.bad=baz', { allowDots: true })).to.deep.equal({ foo: [[{ baz: 'bar' }]], fool: { bad: 'baz' } }); - expect(Qs.parse('foo[0].baz[0]=15&foo[0].bar=2', { allowDots: true })).to.deep.equal({ foo: [{ baz: ['15'], bar: '2' }] }); - expect(Qs.parse('foo[0].baz[0]=15&foo[0].baz[1]=16&foo[0].bar=2', { allowDots: true })).to.deep.equal({ foo: [{ baz: ['15', '16'], bar: '2' }] }); - expect(Qs.parse('foo.bad=baz&foo[0]=bar', { allowDots: true })).to.deep.equal({ foo: { bad: 'baz', '0': 'bar' } }); - expect(Qs.parse('foo.bad=baz&foo[]=bar', { allowDots: true })).to.deep.equal({ foo: { bad: 'baz', '0': 'bar' } }); - expect(Qs.parse('foo[]=bar&foo.bad=baz', { allowDots: true })).to.deep.equal({ foo: { '0': 'bar', bad: 'baz' } }); - expect(Qs.parse('foo.bad=baz&foo[]=bar&foo[]=foo', { allowDots: true })).to.deep.equal({ foo: { bad: 'baz', '0': 'bar', '1': 'foo' } }); - expect(Qs.parse('foo[0].a=a&foo[0].b=b&foo[1].a=aa&foo[1].b=bb', { allowDots: true })).to.deep.equal({ foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] }); - done(); + t.test('transforms arrays to objects', function (st) { + st.deepEqual(qs.parse('foo[0]=bar&foo[bad]=baz'), { foo: { '0': 'bar', bad: 'baz' } }); + st.deepEqual(qs.parse('foo[bad]=baz&foo[0]=bar'), { foo: { bad: 'baz', '0': 'bar' } }); + st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar'), { foo: { bad: 'baz', '0': 'bar' } }); + st.deepEqual(qs.parse('foo[]=bar&foo[bad]=baz'), { foo: { '0': 'bar', bad: 'baz' } }); + st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo'), { foo: { bad: 'baz', '0': 'bar', '1': 'foo' } }); + st.deepEqual(qs.parse('foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb'), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] }); + st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c'), { a: { '0': 'b', t: 'u', c: true } }); + st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y'), { a: { '0': 'b', '1': 'c', x: 'y' } }); + st.end(); }); - it('can add keys to objects', function (done) { - - expect(Qs.parse('a[b]=c&a=d')).to.deep.equal({ a: { b: 'c', d: true } }); - done(); + t.test('transforms arrays to objects (dot notation)', function (st) { + st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: 'baz' } }); + st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad.boo=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: { boo: 'baz' } } }); + st.deepEqual(qs.parse('foo[0][0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [[{ baz: 'bar' }]], fool: { bad: 'baz' } }); + st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15'], bar: '2' }] }); + st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].baz[1]=16&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15', '16'], bar: '2' }] }); + st.deepEqual(qs.parse('foo.bad=baz&foo[0]=bar', { allowDots: true }), { foo: { bad: 'baz', '0': 'bar' } }); + st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar', { allowDots: true }), { foo: { bad: 'baz', '0': 'bar' } }); + st.deepEqual(qs.parse('foo[]=bar&foo.bad=baz', { allowDots: true }), { foo: { '0': 'bar', bad: 'baz' } }); + st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar&foo[]=foo', { allowDots: true }), { foo: { bad: 'baz', '0': 'bar', '1': 'foo' } }); + st.deepEqual(qs.parse('foo[0].a=a&foo[0].b=b&foo[1].a=aa&foo[1].b=bb', { allowDots: true }), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] }); + st.end(); }); - it('correctly prunes undefined values when converting an array to an object', function (done) { + t.deepEqual(qs.parse('a[b]=c&a=d'), { a: { b: 'c', d: true } }, 'can add keys to objects'); - expect(Qs.parse('a[2]=b&a[99999999]=c')).to.deep.equal({ a: { '2': 'b', '99999999': 'c' } }); - done(); + t.test('correctly prunes undefined values when converting an array to an object', function (st) { + st.deepEqual(qs.parse('a[2]=b&a[99999999]=c'), { a: { '2': 'b', '99999999': 'c' } }); + st.end(); }); - it('supports malformed uri characters', function (done) { - - expect(Qs.parse('{%:%}', { strictNullHandling: true })).to.deep.equal({ '{%:%}': null }); - expect(Qs.parse('{%:%}=')).to.deep.equal({ '{%:%}': '' }); - expect(Qs.parse('foo=%:%}')).to.deep.equal({ foo: '%:%}' }); - done(); + t.test('supports malformed uri characters', function (st) { + st.deepEqual(qs.parse('{%:%}', { strictNullHandling: true }), { '{%:%}': null }); + st.deepEqual(qs.parse('{%:%}='), { '{%:%}': '' }); + st.deepEqual(qs.parse('foo=%:%}'), { foo: '%:%}' }); + st.end(); }); - it('doesn\'t produce empty keys', function (done) { - - expect(Qs.parse('_r=1&')).to.deep.equal({ '_r': '1' }); - done(); + t.test('doesn\'t produce empty keys', function (st) { + st.deepEqual(qs.parse('_r=1&'), { '_r': '1' }); + st.end(); }); - it('cannot access Object prototype', function (done) { - - Qs.parse('constructor[prototype][bad]=bad'); - Qs.parse('bad[constructor][prototype][bad]=bad'); - expect(typeof Object.prototype.bad).to.equal('undefined'); - done(); + t.test('cannot access Object prototype', function (st) { + qs.parse('constructor[prototype][bad]=bad'); + qs.parse('bad[constructor][prototype][bad]=bad'); + st.equal(typeof Object.prototype.bad, 'undefined'); + st.end(); }); - it('parses arrays of objects', function (done) { - - expect(Qs.parse('a[][b]=c')).to.deep.equal({ a: [{ b: 'c' }] }); - expect(Qs.parse('a[0][b]=c')).to.deep.equal({ a: [{ b: 'c' }] }); - done(); + t.test('parses arrays of objects', function (st) { + st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] }); + st.deepEqual(qs.parse('a[0][b]=c'), { a: [{ b: 'c' }] }); + st.end(); }); - it('allows for empty strings in arrays', function (done) { - - expect(Qs.parse('a[]=b&a[]=&a[]=c')).to.deep.equal({ a: ['b', '', 'c'] }); - expect(Qs.parse('a[0]=b&a[1]&a[2]=c&a[19]=', { strictNullHandling: true })).to.deep.equal({ a: ['b', null, 'c', ''] }); - expect(Qs.parse('a[0]=b&a[1]=&a[2]=c&a[19]', { strictNullHandling: true })).to.deep.equal({ a: ['b', '', 'c', null] }); - expect(Qs.parse('a[]=&a[]=b&a[]=c')).to.deep.equal({ a: ['', 'b', 'c'] }); - done(); + t.test('allows for empty strings in arrays', function (st) { + st.deepEqual(qs.parse('a[]=b&a[]=&a[]=c'), { a: ['b', '', 'c'] }); + st.deepEqual(qs.parse('a[0]=b&a[1]&a[2]=c&a[19]=', { strictNullHandling: true }), { a: ['b', null, 'c', ''] }); + st.deepEqual(qs.parse('a[0]=b&a[1]=&a[2]=c&a[19]', { strictNullHandling: true }), { a: ['b', '', 'c', null] }); + st.deepEqual(qs.parse('a[]=&a[]=b&a[]=c'), { a: ['', 'b', 'c'] }); + st.end(); }); - it('compacts sparse arrays', function (done) { - - expect(Qs.parse('a[10]=1&a[2]=2')).to.deep.equal({ a: ['2', '1'] }); - done(); + t.test('compacts sparse arrays', function (st) { + st.deepEqual(qs.parse('a[10]=1&a[2]=2'), { a: ['2', '1'] }); + st.end(); }); - it('parses semi-parsed strings', function (done) { - - expect(Qs.parse({ 'a[b]': 'c' })).to.deep.equal({ a: { b: 'c' } }); - expect(Qs.parse({ 'a[b]': 'c', 'a[d]': 'e' })).to.deep.equal({ a: { b: 'c', d: 'e' } }); - done(); + t.test('parses semi-parsed strings', function (st) { + st.deepEqual(qs.parse({ 'a[b]': 'c' }), { a: { b: 'c' } }); + st.deepEqual(qs.parse({ 'a[b]': 'c', 'a[d]': 'e' }), { a: { b: 'c', d: 'e' } }); + st.end(); }); - it('parses buffers correctly', function (done) { - + t.test('parses buffers correctly', function (st) { var b = new Buffer('test'); - expect(Qs.parse({ a: b })).to.deep.equal({ a: b }); - done(); + st.deepEqual(qs.parse({ a: b }), { a: b }); + st.end(); }); - it('continues parsing when no parent is found', function (done) { - - expect(Qs.parse('[]=&a=b')).to.deep.equal({ '0': '', a: 'b' }); - expect(Qs.parse('[]&a=b', { strictNullHandling: true })).to.deep.equal({ '0': null, a: 'b' }); - expect(Qs.parse('[foo]=bar')).to.deep.equal({ foo: 'bar' }); - done(); + t.test('continues parsing when no parent is found', function (st) { + st.deepEqual(qs.parse('[]=&a=b'), { '0': '', a: 'b' }); + st.deepEqual(qs.parse('[]&a=b', { strictNullHandling: true }), { '0': null, a: 'b' }); + st.deepEqual(qs.parse('[foo]=bar'), { foo: 'bar' }); + st.end(); }); - it('does not error when parsing a very long array', function (done) { - + t.test('does not error when parsing a very long array', function (st) { var str = 'a[]=a'; while (Buffer.byteLength(str) < 128 * 1024) { - str += '&' + str; + str = str + '&' + str; } - expect(function () { + st.doesNotThrow(function () { qs.parse(str); }); - Qs.parse(str); - }).to.not.throw(); - - done(); + st.end(); }); - it('should not throw when a native prototype has an enumerable property', { parallel: false }, function (done) { - + t.test('should not throw when a native prototype has an enumerable property', { parallel: false }, function (st) { Object.prototype.crash = ''; Array.prototype.crash = ''; - expect(Qs.parse.bind(null, 'a=b')).to.not.throw(); - expect(Qs.parse('a=b')).to.deep.equal({ a: 'b' }); - expect(Qs.parse.bind(null, 'a[][b]=c')).to.not.throw(); - expect(Qs.parse('a[][b]=c')).to.deep.equal({ a: [{ b: 'c' }] }); + st.doesNotThrow(qs.parse.bind(null, 'a=b')); + st.deepEqual(qs.parse('a=b'), { a: 'b' }); + st.doesNotThrow(qs.parse.bind(null, 'a[][b]=c')); + st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] }); delete Object.prototype.crash; delete Array.prototype.crash; - done(); + st.end(); }); - it('parses a string with an alternative string delimiter', function (done) { - - expect(Qs.parse('a=b;c=d', { delimiter: ';' })).to.deep.equal({ a: 'b', c: 'd' }); - done(); + t.test('parses a string with an alternative string delimiter', function (st) { + st.deepEqual(qs.parse('a=b;c=d', { delimiter: ';' }), { a: 'b', c: 'd' }); + st.end(); }); - it('parses a string with an alternative RegExp delimiter', function (done) { - - expect(Qs.parse('a=b; c=d', { delimiter: /[;,] */ })).to.deep.equal({ a: 'b', c: 'd' }); - done(); + t.test('parses a string with an alternative RegExp delimiter', function (st) { + st.deepEqual(qs.parse('a=b; c=d', { delimiter: /[;,] */ }), { a: 'b', c: 'd' }); + st.end(); }); - it('does not use non-splittable objects as delimiters', function (done) { - - expect(Qs.parse('a=b&c=d', { delimiter: true })).to.deep.equal({ a: 'b', c: 'd' }); - done(); + t.test('does not use non-splittable objects as delimiters', function (st) { + st.deepEqual(qs.parse('a=b&c=d', { delimiter: true }), { a: 'b', c: 'd' }); + st.end(); }); - it('allows overriding parameter limit', function (done) { - - expect(Qs.parse('a=b&c=d', { parameterLimit: 1 })).to.deep.equal({ a: 'b' }); - done(); + t.test('allows overriding parameter limit', function (st) { + st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: 1 }), { a: 'b' }); + st.end(); }); - it('allows setting the parameter limit to Infinity', function (done) { - - expect(Qs.parse('a=b&c=d', { parameterLimit: Infinity })).to.deep.equal({ a: 'b', c: 'd' }); - done(); + t.test('allows setting the parameter limit to Infinity', function (st) { + st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: Infinity }), { a: 'b', c: 'd' }); + st.end(); }); - it('allows overriding array limit', function (done) { - - expect(Qs.parse('a[0]=b', { arrayLimit: -1 })).to.deep.equal({ a: { '0': 'b' } }); - expect(Qs.parse('a[-1]=b', { arrayLimit: -1 })).to.deep.equal({ a: { '-1': 'b' } }); - expect(Qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 })).to.deep.equal({ a: { '0': 'b', '1': 'c' } }); - done(); + t.test('allows overriding array limit', function (st) { + st.deepEqual(qs.parse('a[0]=b', { arrayLimit: -1 }), { a: { '0': 'b' } }); + st.deepEqual(qs.parse('a[-1]=b', { arrayLimit: -1 }), { a: { '-1': 'b' } }); + st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 }), { a: { '0': 'b', '1': 'c' } }); + st.end(); }); - it('allows disabling array parsing', function (done) { - - expect(Qs.parse('a[0]=b&a[1]=c', { parseArrays: false })).to.deep.equal({ a: { '0': 'b', '1': 'c' } }); - done(); + t.test('allows disabling array parsing', function (st) { + st.deepEqual(qs.parse('a[0]=b&a[1]=c', { parseArrays: false }), { a: { '0': 'b', '1': 'c' } }); + st.end(); }); - it('parses an object', function (done) { - + t.test('parses an object', function (st) { var input = { 'user[name]': { 'pop[bob]': 3 }, 'user[email]': null }; var expected = { - 'user': { - 'name': { 'pop[bob]': 3 }, - 'email': null + user: { + name: { 'pop[bob]': 3 }, + email: null } }; - var result = Qs.parse(input); + var result = qs.parse(input); - expect(result).to.deep.equal(expected); - done(); + st.deepEqual(result, expected); + st.end(); }); - it('parses an object in dot notation', function (done) { - + t.test('parses an object in dot notation', function (st) { var input = { 'user.name': { 'pop[bob]': 3 }, 'user.email.': null }; var expected = { - 'user': { - 'name': { 'pop[bob]': 3 }, - 'email': null + user: { + name: { 'pop[bob]': 3 }, + email: null } }; - var result = Qs.parse(input, { allowDots: true }); + var result = qs.parse(input, { allowDots: true }); - expect(result).to.deep.equal(expected); - done(); + st.deepEqual(result, expected); + st.end(); }); - it('parses an object and not child values', function (done) { - + t.test('parses an object and not child values', function (st) { var input = { 'user[name]': { 'pop[bob]': { 'test': 3 } }, 'user[email]': null }; var expected = { - 'user': { - 'name': { 'pop[bob]': { 'test': 3 } }, - 'email': null + user: { + name: { 'pop[bob]': { 'test': 3 } }, + email: null } }; - var result = Qs.parse(input); + var result = qs.parse(input); - expect(result).to.deep.equal(expected); - done(); + st.deepEqual(result, expected); + st.end(); }); - it('does not blow up when Buffer global is missing', function (done) { - + t.test('does not blow up when Buffer global is missing', function (st) { var tempBuffer = global.Buffer; delete global.Buffer; - var result = Qs.parse('a=b&c=d'); + var result = qs.parse('a=b&c=d'); global.Buffer = tempBuffer; - expect(result).to.deep.equal({ a: 'b', c: 'd' }); - done(); + st.deepEqual(result, { a: 'b', c: 'd' }); + st.end(); }); - it('does not crash when parsing circular references', function (done) { - + t.test('does not crash when parsing circular references', function (st) { var a = {}; a.b = a; var parsed; - expect(function () { - - parsed = Qs.parse({ 'foo[bar]': 'baz', 'foo[baz]': a }); - }).to.not.throw(); + st.doesNotThrow(function () { + parsed = qs.parse({ 'foo[bar]': 'baz', 'foo[baz]': a }); + }); - expect(parsed).to.contain('foo'); - expect(parsed.foo).to.contain('bar', 'baz'); - expect(parsed.foo.bar).to.equal('baz'); - expect(parsed.foo.baz).to.deep.equal(a); - done(); + st.equal('foo' in parsed, true, 'parsed has "foo" property'); + st.equal('bar' in parsed.foo, true); + st.equal('baz' in parsed.foo, true); + st.equal(parsed.foo.bar, 'baz'); + st.deepEqual(parsed.foo.baz, a); + st.end(); }); - it('parses plain objects correctly', function (done) { - + t.test('parses plain objects correctly', function (st) { var a = Object.create(null); a.b = 'c'; - expect(Qs.parse(a)).to.deep.equal({ b: 'c' }); - var result = Qs.parse({ a: a }); - expect(result).to.contain('a'); - expect(result.a).to.deep.equal(a); - done(); + st.deepEqual(qs.parse(a), { b: 'c' }); + var result = qs.parse({ a: a }); + st.equal('a' in result, true, 'result has "a" property'); + st.deepEqual(result.a, a); + st.end(); }); - it('parses dates correctly', function (done) { - + t.test('parses dates correctly', function (st) { var now = new Date(); - expect(Qs.parse({ a: now })).to.deep.equal({ a: now }); - done(); + st.deepEqual(qs.parse({ a: now }), { a: now }); + st.end(); }); - it('parses regular expressions correctly', function (done) { - + t.test('parses regular expressions correctly', function (st) { var re = /^test$/; - expect(Qs.parse({ a: re })).to.deep.equal({ a: re }); - done(); + st.deepEqual(qs.parse({ a: re }), { a: re }); + st.end(); }); - it('can allow overwriting prototype properties', function (done) { - - expect(Qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true })).to.deep.equal({ a: { hasOwnProperty: 'b' } }, { prototype: false }); - expect(Qs.parse('hasOwnProperty=b', { allowPrototypes: true })).to.deep.equal({ hasOwnProperty: 'b' }, { prototype: false }); - done(); + t.test('can allow overwriting prototype properties', function (st) { + st.deepEqual(qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }), { a: { hasOwnProperty: 'b' } }, { prototype: false }); + st.deepEqual(qs.parse('hasOwnProperty=b', { allowPrototypes: true }), { hasOwnProperty: 'b' }, { prototype: false }); + st.end(); }); - it('can return plain objects', function (done) { - + t.test('can return plain objects', function (st) { var expected = Object.create(null); expected.a = Object.create(null); expected.a.b = 'c'; expected.a.hasOwnProperty = 'd'; - expect(Qs.parse('a[b]=c&a[hasOwnProperty]=d', { plainObjects: true })).to.deep.equal(expected); - expect(Qs.parse(null, { plainObjects: true })).to.deep.equal(Object.create(null)); + st.deepEqual(qs.parse('a[b]=c&a[hasOwnProperty]=d', { plainObjects: true }), expected); + st.deepEqual(qs.parse(null, { plainObjects: true }), Object.create(null)); var expectedArray = Object.create(null); expectedArray.a = Object.create(null); expectedArray.a['0'] = 'b'; expectedArray.a.c = 'd'; - expect(Qs.parse('a[]=b&a[c]=d', { plainObjects: true })).to.deep.equal(expectedArray); - done(); + st.deepEqual(qs.parse('a[]=b&a[c]=d', { plainObjects: true }), expectedArray); + st.end(); }); }); diff --git a/deps/npm/node_modules/request/node_modules/qs/test/stringify.js b/deps/npm/node_modules/request/node_modules/qs/test/stringify.js old mode 100644 new mode 100755 index 53139ff90586a9..88d22f25e932be --- a/deps/npm/node_modules/request/node_modules/qs/test/stringify.js +++ b/deps/npm/node_modules/request/node_modules/qs/test/stringify.js @@ -1,293 +1,235 @@ -/* eslint no-extend-native:0 */ -// Load modules +'use strict'; -var Code = require('code'); -var Lab = require('lab'); -var Qs = require('../'); +var test = require('tape'); +var qs = require('../'); - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var lab = exports.lab = Lab.script(); -var expect = Code.expect; -var describe = lab.experiment; -var it = lab.test; - - -describe('stringify()', function () { - - it('stringifies a querystring object', function (done) { - - expect(Qs.stringify({ a: 'b' })).to.equal('a=b'); - expect(Qs.stringify({ a: 1 })).to.equal('a=1'); - expect(Qs.stringify({ a: 1, b: 2 })).to.equal('a=1&b=2'); - expect(Qs.stringify({ a: 'A_Z' })).to.equal('a=A_Z'); - expect(Qs.stringify({ a: '€' })).to.equal('a=%E2%82%AC'); - expect(Qs.stringify({ a: '' })).to.equal('a=%EE%80%80'); - expect(Qs.stringify({ a: 'א' })).to.equal('a=%D7%90'); - expect(Qs.stringify({ a: '𐐷' })).to.equal('a=%F0%90%90%B7'); - done(); +test('stringify()', function (t) { + t.test('stringifies a querystring object', function (st) { + st.equal(qs.stringify({ a: 'b' }), 'a=b'); + st.equal(qs.stringify({ a: 1 }), 'a=1'); + st.equal(qs.stringify({ a: 1, b: 2 }), 'a=1&b=2'); + st.equal(qs.stringify({ a: 'A_Z' }), 'a=A_Z'); + st.equal(qs.stringify({ a: '€' }), 'a=%E2%82%AC'); + st.equal(qs.stringify({ a: '' }), 'a=%EE%80%80'); + st.equal(qs.stringify({ a: 'א' }), 'a=%D7%90'); + st.equal(qs.stringify({ a: '𐐷' }), 'a=%F0%90%90%B7'); + st.end(); }); - it('stringifies a nested object', function (done) { - - expect(Qs.stringify({ a: { b: 'c' } })).to.equal('a%5Bb%5D=c'); - expect(Qs.stringify({ a: { b: { c: { d: 'e' } } } })).to.equal('a%5Bb%5D%5Bc%5D%5Bd%5D=e'); - done(); + t.test('stringifies a nested object', function (st) { + st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); + st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }), 'a%5Bb%5D%5Bc%5D%5Bd%5D=e'); + st.end(); }); - it('stringifies an array value', function (done) { - - expect(Qs.stringify({ a: ['b', 'c', 'd'] })).to.equal('a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d'); - done(); + t.test('stringifies an array value', function (st) { + st.equal(qs.stringify({ a: ['b', 'c', 'd'] }), 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d'); + st.end(); }); - it('omits nulls when asked', function (done) { - - expect(Qs.stringify({ a: 'b', c: null }, { skipNulls: true })).to.equal('a=b'); - done(); + t.test('omits nulls when asked', function (st) { + st.equal(qs.stringify({ a: 'b', c: null }, { skipNulls: true }), 'a=b'); + st.end(); }); - it('omits nested nulls when asked', function (done) { - - expect(Qs.stringify({ a: { b: 'c', d: null } }, { skipNulls: true })).to.equal('a%5Bb%5D=c'); - done(); + t.test('omits nested nulls when asked', function (st) { + st.equal(qs.stringify({ a: { b: 'c', d: null } }, { skipNulls: true }), 'a%5Bb%5D=c'); + st.end(); }); - it('omits array indices when asked', function (done) { - - expect(Qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false })).to.equal('a=b&a=c&a=d'); - done(); + t.test('omits array indices when asked', function (st) { + st.equal(qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }), 'a=b&a=c&a=d'); + st.end(); }); - it('stringifies a nested array value', function (done) { - - expect(Qs.stringify({ a: { b: ['c', 'd'] } })).to.equal('a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d'); - done(); + t.test('stringifies a nested array value', function (st) { + st.equal(qs.stringify({ a: { b: ['c', 'd'] } }), 'a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d'); + st.end(); }); - it('stringifies an object inside an array', function (done) { - - expect(Qs.stringify({ a: [{ b: 'c' }] })).to.equal('a%5B0%5D%5Bb%5D=c'); - expect(Qs.stringify({ a: [{ b: { c: [1] } }] })).to.equal('a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1'); - done(); + t.test('stringifies an object inside an array', function (st) { + st.equal(qs.stringify({ a: [{ b: 'c' }] }), 'a%5B0%5D%5Bb%5D=c'); + st.equal(qs.stringify({ a: [{ b: { c: [1] } }] }), 'a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1'); + st.end(); }); - it('does not omit object keys when indices = false', function (done) { - - expect(Qs.stringify({ a: [{ b: 'c' }] }, { indices: false })).to.equal('a%5Bb%5D=c'); - done(); + t.test('does not omit object keys when indices = false', function (st) { + st.equal(qs.stringify({ a: [{ b: 'c' }] }, { indices: false }), 'a%5Bb%5D=c'); + st.end(); }); - it('uses indices notation for arrays when indices=true', function (done) { - - expect(Qs.stringify({ a: ['b', 'c'] }, { indices: true })).to.equal('a%5B0%5D=b&a%5B1%5D=c'); - done(); + t.test('uses indices notation for arrays when indices=true', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }, { indices: true }), 'a%5B0%5D=b&a%5B1%5D=c'); + st.end(); }); - it('uses indices notation for arrays when no arrayFormat is specified', function (done) { - - expect(Qs.stringify({ a: ['b', 'c'] })).to.equal('a%5B0%5D=b&a%5B1%5D=c'); - done(); + t.test('uses indices notation for arrays when no arrayFormat is specified', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }), 'a%5B0%5D=b&a%5B1%5D=c'); + st.end(); }); - it('uses indices notation for arrays when no arrayFormat=indices', function (done) { - - expect(Qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' })).to.equal('a%5B0%5D=b&a%5B1%5D=c'); - done(); + t.test('uses indices notation for arrays when no arrayFormat=indices', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }), 'a%5B0%5D=b&a%5B1%5D=c'); + st.end(); }); - it('uses repeat notation for arrays when no arrayFormat=repeat', function (done) { - - expect(Qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' })).to.equal('a=b&a=c'); - done(); + t.test('uses repeat notation for arrays when no arrayFormat=repeat', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }), 'a=b&a=c'); + st.end(); }); - it('uses brackets notation for arrays when no arrayFormat=brackets', function (done) { - - expect(Qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' })).to.equal('a%5B%5D=b&a%5B%5D=c'); - done(); + t.test('uses brackets notation for arrays when no arrayFormat=brackets', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }), 'a%5B%5D=b&a%5B%5D=c'); + st.end(); }); - it('stringifies a complicated object', function (done) { - - expect(Qs.stringify({ a: { b: 'c', d: 'e' } })).to.equal('a%5Bb%5D=c&a%5Bd%5D=e'); - done(); + t.test('stringifies a complicated object', function (st) { + st.equal(qs.stringify({ a: { b: 'c', d: 'e' } }), 'a%5Bb%5D=c&a%5Bd%5D=e'); + st.end(); }); - it('stringifies an empty value', function (done) { - - expect(Qs.stringify({ a: '' })).to.equal('a='); - expect(Qs.stringify({ a: null }, { strictNullHandling: true })).to.equal('a'); + t.test('stringifies an empty value', function (st) { + st.equal(qs.stringify({ a: '' }), 'a='); + st.equal(qs.stringify({ a: null }, { strictNullHandling: true }), 'a'); - expect(Qs.stringify({ a: '', b: '' })).to.equal('a=&b='); - expect(Qs.stringify({ a: null, b: '' }, { strictNullHandling: true })).to.equal('a&b='); + st.equal(qs.stringify({ a: '', b: '' }), 'a=&b='); + st.equal(qs.stringify({ a: null, b: '' }, { strictNullHandling: true }), 'a&b='); - expect(Qs.stringify({ a: { b: '' } })).to.equal('a%5Bb%5D='); - expect(Qs.stringify({ a: { b: null } }, { strictNullHandling: true })).to.equal('a%5Bb%5D'); - expect(Qs.stringify({ a: { b: null } }, { strictNullHandling: false })).to.equal('a%5Bb%5D='); + st.equal(qs.stringify({ a: { b: '' } }), 'a%5Bb%5D='); + st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: true }), 'a%5Bb%5D'); + st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: false }), 'a%5Bb%5D='); - done(); + st.end(); }); - it('stringifies an empty object', function (done) { - + t.test('stringifies an empty object', function (st) { var obj = Object.create(null); obj.a = 'b'; - expect(Qs.stringify(obj)).to.equal('a=b'); - done(); + st.equal(qs.stringify(obj), 'a=b'); + st.end(); }); - it('returns an empty string for invalid input', function (done) { - - expect(Qs.stringify(undefined)).to.equal(''); - expect(Qs.stringify(false)).to.equal(''); - expect(Qs.stringify(null)).to.equal(''); - expect(Qs.stringify('')).to.equal(''); - done(); + t.test('returns an empty string for invalid input', function (st) { + st.equal(qs.stringify(undefined), ''); + st.equal(qs.stringify(false), ''); + st.equal(qs.stringify(null), ''); + st.equal(qs.stringify(''), ''); + st.end(); }); - it('stringifies an object with an empty object as a child', function (done) { - + t.test('stringifies an object with an empty object as a child', function (st) { var obj = { a: Object.create(null) }; obj.a.b = 'c'; - expect(Qs.stringify(obj)).to.equal('a%5Bb%5D=c'); - done(); + st.equal(qs.stringify(obj), 'a%5Bb%5D=c'); + st.end(); }); - it('drops keys with a value of undefined', function (done) { + t.test('drops keys with a value of undefined', function (st) { + st.equal(qs.stringify({ a: undefined }), ''); - expect(Qs.stringify({ a: undefined })).to.equal(''); - - expect(Qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: true })).to.equal('a%5Bc%5D'); - expect(Qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: false })).to.equal('a%5Bc%5D='); - expect(Qs.stringify({ a: { b: undefined, c: '' } })).to.equal('a%5Bc%5D='); - done(); + st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: true }), 'a%5Bc%5D'); + st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: false }), 'a%5Bc%5D='); + st.equal(qs.stringify({ a: { b: undefined, c: '' } }), 'a%5Bc%5D='); + st.end(); }); - it('url encodes values', function (done) { - - expect(Qs.stringify({ a: 'b c' })).to.equal('a=b%20c'); - done(); + t.test('url encodes values', function (st) { + st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c'); + st.end(); }); - it('stringifies a date', function (done) { - + t.test('stringifies a date', function (st) { var now = new Date(); var str = 'a=' + encodeURIComponent(now.toISOString()); - expect(Qs.stringify({ a: now })).to.equal(str); - done(); + st.equal(qs.stringify({ a: now }), str); + st.end(); }); - it('stringifies the weird object from qs', function (done) { - - expect(Qs.stringify({ 'my weird field': '~q1!2"\'w$5&7/z8)?' })).to.equal('my%20weird%20field=~q1%212%22%27w%245%267%2Fz8%29%3F'); - done(); + t.test('stringifies the weird object from qs', function (st) { + st.equal(qs.stringify({ 'my weird field': '~q1!2"\'w$5&7/z8)?' }), 'my%20weird%20field=~q1%212%22%27w%245%267%2Fz8%29%3F'); + st.end(); }); - it('skips properties that are part of the object prototype', function (done) { - + t.test('skips properties that are part of the object prototype', function (st) { Object.prototype.crash = 'test'; - expect(Qs.stringify({ a: 'b' })).to.equal('a=b'); - expect(Qs.stringify({ a: { b: 'c' } })).to.equal('a%5Bb%5D=c'); + st.equal(qs.stringify({ a: 'b' }), 'a=b'); + st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); delete Object.prototype.crash; - done(); + st.end(); }); - it('stringifies boolean values', function (done) { - - expect(Qs.stringify({ a: true })).to.equal('a=true'); - expect(Qs.stringify({ a: { b: true } })).to.equal('a%5Bb%5D=true'); - expect(Qs.stringify({ b: false })).to.equal('b=false'); - expect(Qs.stringify({ b: { c: false } })).to.equal('b%5Bc%5D=false'); - done(); + t.test('stringifies boolean values', function (st) { + st.equal(qs.stringify({ a: true }), 'a=true'); + st.equal(qs.stringify({ a: { b: true } }), 'a%5Bb%5D=true'); + st.equal(qs.stringify({ b: false }), 'b=false'); + st.equal(qs.stringify({ b: { c: false } }), 'b%5Bc%5D=false'); + st.end(); }); - it('stringifies buffer values', function (done) { - - expect(Qs.stringify({ a: new Buffer('test') })).to.equal('a=test'); - expect(Qs.stringify({ a: { b: new Buffer('test') } })).to.equal('a%5Bb%5D=test'); - done(); + t.test('stringifies buffer values', function (st) { + st.equal(qs.stringify({ a: new Buffer('test') }), 'a=test'); + st.equal(qs.stringify({ a: { b: new Buffer('test') } }), 'a%5Bb%5D=test'); + st.end(); }); - it('stringifies an object using an alternative delimiter', function (done) { - - expect(Qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' })).to.equal('a=b;c=d'); - done(); + t.test('stringifies an object using an alternative delimiter', function (st) { + st.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d'); + st.end(); }); - it('doesn\'t blow up when Buffer global is missing', function (done) { - + t.test('doesn\'t blow up when Buffer global is missing', function (st) { var tempBuffer = global.Buffer; delete global.Buffer; - var result = Qs.stringify({ a: 'b', c: 'd' }); + var result = qs.stringify({ a: 'b', c: 'd' }); global.Buffer = tempBuffer; - expect(result).to.equal('a=b&c=d'); - done(); + st.equal(result, 'a=b&c=d'); + st.end(); }); - it('selects properties when filter=array', function (done) { - - expect(Qs.stringify({ a: 'b' }, { filter: ['a'] })).to.equal('a=b'); - expect(Qs.stringify({ a: 1 }, { filter: [] })).to.equal(''); - expect(Qs.stringify({ a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, { filter: ['a', 'b', 0, 2] })).to.equal('a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3'); - done(); - + t.test('selects properties when filter=array', function (st) { + st.equal(qs.stringify({ a: 'b' }, { filter: ['a'] }), 'a=b'); + st.equal(qs.stringify({ a: 1 }, { filter: [] }), ''); + st.equal(qs.stringify({ a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, { filter: ['a', 'b', 0, 2] }), 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3'); + st.end(); }); - it('supports custom representations when filter=function', function (done) { - + t.test('supports custom representations when filter=function', function (st) { var calls = 0; var obj = { a: 'b', c: 'd', e: { f: new Date(1257894000000) } }; var filterFunc = function (prefix, value) { - calls++; if (calls === 1) { - expect(prefix).to.be.empty(); - expect(value).to.equal(obj); - } - else if (prefix === 'c') { + st.equal(prefix, '', 'prefix is empty'); + st.equal(value, obj); + } else if (prefix === 'c') { return; - } - else if (value instanceof Date) { - expect(prefix).to.equal('e[f]'); + } else if (value instanceof Date) { + st.equal(prefix, 'e[f]'); return value.getTime(); } return value; }; - expect(Qs.stringify(obj, { filter: filterFunc })).to.equal('a=b&e%5Bf%5D=1257894000000'); - expect(calls).to.equal(5); - done(); - + st.equal(qs.stringify(obj, { filter: filterFunc }), 'a=b&e%5Bf%5D=1257894000000'); + st.equal(calls, 5); + st.end(); }); - it('can disable uri encoding', function (done) { - - expect(Qs.stringify({ a: 'b' }, { encode: false })).to.equal('a=b'); - expect(Qs.stringify({ a: { b: 'c' } }, { encode: false })).to.equal('a[b]=c'); - expect(Qs.stringify({ a: 'b', c: null }, { strictNullHandling: true, encode: false })).to.equal('a=b&c'); - done(); + t.test('can disable uri encoding', function (st) { + st.equal(qs.stringify({ a: 'b' }, { encode: false }), 'a=b'); + st.equal(qs.stringify({ a: { b: 'c' } }, { encode: false }), 'a[b]=c'); + st.equal(qs.stringify({ a: 'b', c: null }, { strictNullHandling: true, encode: false }), 'a=b&c'); + st.end(); }); - it('can sort the keys', function (done) { - - var sort = function alphabeticalSort (a, b) { - - return a.localeCompare(b); - }; - - expect(Qs.stringify({ a: 'c', z: 'y', b : 'f' }, { sort : sort })).to.equal('a=c&b=f&z=y'); - expect(Qs.stringify({ a: 'c', z: { j: 'a', i:'b' }, b : 'f' }, { sort : sort })).to.equal('a=c&b=f&z%5Bi%5D=b&z%5Bj%5D=a'); - done(); + t.test('can sort the keys', function (st) { + var sort = function (a, b) { return a.localeCompare(b); }; + st.equal(qs.stringify({ a: 'c', z: 'y', b: 'f' }, { sort: sort }), 'a=c&b=f&z=y'); + st.equal(qs.stringify({ a: 'c', z: { j: 'a', i: 'b' }, b: 'f' }, { sort: sort }), 'a=c&b=f&z%5Bi%5D=b&z%5Bj%5D=a'); + st.end(); }); }); diff --git a/deps/npm/node_modules/request/node_modules/qs/test/utils.js b/deps/npm/node_modules/request/node_modules/qs/test/utils.js old mode 100644 new mode 100755 index a9a6b520d6ed2c..4a8d8246c9995c --- a/deps/npm/node_modules/request/node_modules/qs/test/utils.js +++ b/deps/npm/node_modules/request/node_modules/qs/test/utils.js @@ -1,28 +1,9 @@ -// Load modules +'use strict'; -var Code = require('code'); -var Lab = require('lab'); -var Utils = require('../lib/utils'); +var test = require('tape'); +var utils = require('../lib/utils'); - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var lab = exports.lab = Lab.script(); -var expect = Code.expect; -var describe = lab.experiment; -var it = lab.test; - - -describe('merge()', function () { - - it('can merge two objects with the same key', function (done) { - - expect(Utils.merge({ a: 'b' }, { a: 'c' })).to.deep.equal({ a: ['b', 'c'] }); - done(); - }); +test('merge()', function (t) { + t.deepEqual(utils.merge({ a: 'b' }, { a: 'c' }), { a: ['b', 'c'] }, 'merges two objects with the same key'); + t.end(); }); diff --git a/deps/npm/node_modules/request/package.json b/deps/npm/node_modules/request/package.json index 025c965d4db23c..f3f8cf4907efd2 100644 --- a/deps/npm/node_modules/request/package.json +++ b/deps/npm/node_modules/request/package.json @@ -1,46 +1,44 @@ { "_args": [ [ - "request@~2.67.0", - "/Users/ogd/Documents/projects/npm/npm" + "request@latest", + "/Users/rebecca/code/npm" ] ], - "_from": "request@>=2.67.0 <2.68.0", - "_id": "request@2.67.0", + "_from": "request@latest", + "_id": "request@2.69.0", "_inCache": true, "_installable": true, "_location": "/request", - "_nodeVersion": "5.0.0", + "_nodeVersion": "4.1.2", "_npmUser": { - "email": "simeonvelichkov@gmail.com", - "name": "simov" + "email": "mikeal.rogers@gmail.com", + "name": "mikeal" }, - "_npmVersion": "3.3.12", + "_npmVersion": "2.14.4", "_phantomChildren": { "ansi-regex": "2.0.0", - "readable-stream": "2.0.4", + "readable-stream": "2.0.5", "strip-ansi": "3.0.0" }, "_requested": { "name": "request", - "raw": "request@~2.67.0", - "rawSpec": "~2.67.0", + "raw": "request@latest", + "rawSpec": "latest", "scope": null, - "spec": ">=2.67.0 <2.68.0", - "type": "range" + "spec": "latest", + "type": "tag" }, "_requiredBy": [ "/", "/node-gyp", - "/npm-registry-client", - "/npm-registry-couchapp/couchapp", - "/npm-registry-couchapp/couchapp/nano" + "/npm-registry-client" ], - "_resolved": "https://registry.npmjs.org/request/-/request-2.67.0.tgz", - "_shasum": "8af74780e2bf11ea0ae9aa965c11f11afd272742", + "_resolved": "https://registry.npmjs.org/request/-/request-2.69.0.tgz", + "_shasum": "cf91d2e000752b1217155c005241911991a2346a", "_shrinkwrap": null, - "_spec": "request@~2.67.0", - "_where": "/Users/ogd/Documents/projects/npm/npm", + "_spec": "request@latest", + "_where": "/Users/rebecca/code/npm", "author": { "email": "mikeal.rogers@gmail.com", "name": "Mikeal Rogers" @@ -50,13 +48,14 @@ }, "dependencies": { "aws-sign2": "~0.6.0", + "aws4": "^1.2.1", "bl": "~1.0.0", "caseless": "~0.11.0", "combined-stream": "~1.0.5", "extend": "~3.0.0", "forever-agent": "~0.6.1", "form-data": "~1.0.0-rc3", - "har-validator": "~2.0.2", + "har-validator": "~2.0.6", "hawk": "~3.1.0", "http-signature": "~1.1.0", "is-typedarray": "~1.0.0", @@ -65,7 +64,7 @@ "mime-types": "~2.1.7", "node-uuid": "~1.4.7", "oauth-sign": "~0.8.0", - "qs": "~5.2.0", + "qs": "~6.0.2", "stringstream": "~0.0.4", "tough-cookie": "~2.2.0", "tunnel-agent": "~0.4.1" @@ -73,12 +72,12 @@ "description": "Simplified HTTP request client.", "devDependencies": { "bluebird": "^3.0.2", - "browserify": "^12.0.1", + "browserify": "^13.0.0", "browserify-istanbul": "^0.1.5", - "buffer-equal": "^0.0.1", + "buffer-equal": "^1.0.0", "codecov.io": "^0.1.6", "coveralls": "^2.11.4", - "eslint": "1.9.0", + "eslint": "1.10.3", "function-bind": "^1.0.2", "istanbul": "^0.4.0", "karma": "^0.13.10", @@ -94,13 +93,13 @@ }, "directories": {}, "dist": { - "shasum": "8af74780e2bf11ea0ae9aa965c11f11afd272742", - "tarball": "http://registry.npmjs.org/request/-/request-2.67.0.tgz" + "shasum": "cf91d2e000752b1217155c005241911991a2346a", + "tarball": "http://registry.npmjs.org/request/-/request-2.69.0.tgz" }, "engines": { "node": ">=0.8.0" }, - "gitHead": "76f0655befbe8b37fa246bdca1107cbf57798d9a", + "gitHead": "1c2fb40c74efb4f706f350a78dbd5e58fe913af3", "homepage": "https://github.com/request/request#readme", "license": "Apache-2.0", "main": "index.js", @@ -142,5 +141,5 @@ "util", "utility" ], - "version": "2.67.0" + "version": "2.69.0" } diff --git a/deps/npm/node_modules/request/request.js b/deps/npm/node_modules/request/request.js index 19c1b92f376029..441db80f5a009c 100644 --- a/deps/npm/node_modules/request/request.js +++ b/deps/npm/node_modules/request/request.js @@ -8,13 +8,14 @@ var http = require('http') , zlib = require('zlib') , bl = require('bl') , hawk = require('hawk') - , aws = require('aws-sign2') + , aws2 = require('aws-sign2') , httpSignature = require('http-signature') , mime = require('mime-types') , stringstream = require('stringstream') , caseless = require('caseless') , ForeverAgent = require('forever-agent') , FormData = require('form-data') + , extend = require('extend') , isTypedArray = require('is-typedarray').strict , helpers = require('./lib/helpers') , cookies = require('./lib/cookies') @@ -123,7 +124,7 @@ function Request (options) { var reserved = Object.keys(Request.prototype) var nonReserved = filterForNonReserved(reserved, options) - util._extend(self, nonReserved) + extend(self, nonReserved) options = filterOutReservedFunctions(reserved, options) self.readable = true @@ -579,7 +580,7 @@ Request.prototype.init = function (options) { // Before ending the request, we had to compute the length of the whole form, asyncly self.setHeader(self._form.getHeaders(), true) self._form.getLength(function (err, length) { - if (!err) { + if (!err && !isNaN(length)) { self.setHeader('content-length', length) } end() @@ -1044,7 +1045,7 @@ Request.prototype.abort = function () { self.req.abort() } else if (self.response) { - self.response.abort() + self.response.destroy() } self.emit('abort') @@ -1228,29 +1229,52 @@ Request.prototype.aws = function (opts, now) { self._aws = opts return self } - var date = new Date() - self.setHeader('date', date.toUTCString()) - var auth = - { key: opts.key - , secret: opts.secret - , verb: self.method.toUpperCase() - , date: date - , contentType: self.getHeader('content-type') || '' - , md5: self.getHeader('content-md5') || '' - , amazonHeaders: aws.canonicalizeHeaders(self.headers) + + if (opts.sign_version == 4 || opts.sign_version == '4') { + var aws4 = require('aws4') + // use aws4 + var options = { + host: self.uri.host, + path: self.uri.path, + method: self.method, + headers: { + 'content-type': self.getHeader('content-type') || '' + }, + body: self.body + } + var signRes = aws4.sign(options, { + accessKeyId: opts.key, + secretAccessKey: opts.secret + }) + self.setHeader('authorization', signRes.headers.Authorization) + self.setHeader('x-amz-date', signRes.headers['X-Amz-Date']) + } + else { + // default: use aws-sign2 + var date = new Date() + self.setHeader('date', date.toUTCString()) + var auth = + { key: opts.key + , secret: opts.secret + , verb: self.method.toUpperCase() + , date: date + , contentType: self.getHeader('content-type') || '' + , md5: self.getHeader('content-md5') || '' + , amazonHeaders: aws2.canonicalizeHeaders(self.headers) + } + var path = self.uri.path + if (opts.bucket && path) { + auth.resource = '/' + opts.bucket + path + } else if (opts.bucket && !path) { + auth.resource = '/' + opts.bucket + } else if (!opts.bucket && path) { + auth.resource = path + } else if (!opts.bucket && !path) { + auth.resource = '/' } - var path = self.uri.path - if (opts.bucket && path) { - auth.resource = '/' + opts.bucket + path - } else if (opts.bucket && !path) { - auth.resource = '/' + opts.bucket - } else if (!opts.bucket && path) { - auth.resource = path - } else if (!opts.bucket && !path) { - auth.resource = '/' - } - auth.resource = aws.canonicalizeResource(auth.resource) - self.setHeader('authorization', aws.authorization(auth)) + auth.resource = aws2.canonicalizeResource(auth.resource) + self.setHeader('authorization', aws2.authorization(auth)) + } return self } diff --git a/deps/npm/node_modules/retry/Readme.md b/deps/npm/node_modules/retry/Readme.md index 09d9c8a81bf121..26e50a3a7f3c6a 100644 --- a/deps/npm/node_modules/retry/Readme.md +++ b/deps/npm/node_modules/retry/Readme.md @@ -57,8 +57,10 @@ var operation = retry.operation({ ### retry.operation([options]) -Creates a new `RetryOperation` object. See the `retry.timeouts()` function -below for available `options`. +Creates a new `RetryOperation` object. `options` is the same as `retry.timeouts()`'s `options`, with two additions: + +* `forever`: Whether to retry forever, defaults to `false`. +* `unref`: Wether to [unref](https://nodejs.org/api/timers.html#timers_unref) the setTimeout's, defaults to `false`. ### retry.timeouts([options]) @@ -126,11 +128,19 @@ retry.wrap(obj, {retries: 3}, ['method1', 'method2']); ``` The `options` object can take any options that the usual call to `retry.operation` can take. -### new RetryOperation(timeouts) +### new RetryOperation(timeouts, [options]) Creates a new `RetryOperation` where `timeouts` is an array where each value is a timeout given in milliseconds. +Available options: +* `forever`: Whether to retry forever, defaults to `false`. +* `unref`: Wether to [unref](https://nodejs.org/api/timers.html#timers_unref) the setTimeout's, defaults to `false`. + +If `forever` is true, the following changes happen: +* `RetryOperation.errors()` will only output an array of one item: the last error. +* `RetryOperation` will repeatedly use the last item in the `timeouts` array. + #### retryOperation.errors() Returns an array of all errors that have been passed to @@ -157,11 +167,11 @@ Whenever your retry operation takes longer than `timeout` to execute, the timeou #### retryOperation.try(fn) -This is an alias for `retryOperation.attempt(fn)`. This is deprecated. +This is an alias for `retryOperation.attempt(fn)`. This is deprecated. Please use `retryOperation.attempt(fn)` instead. #### retryOperation.start(fn) -This is an alias for `retryOperation.attempt(fn)`. This is deprecated. +This is an alias for `retryOperation.attempt(fn)`. This is deprecated. Please use `retryOperation.attempt(fn)` instead. #### retryOperation.retry(error) @@ -180,13 +190,15 @@ Returns an int representing the number of attempts it took to call `fn` before i retry is licensed under the MIT license. -#Changelog +# Changelog + +0.8.0 Implementing retry.wrap. -0.7.0 Some bugfixes and made retry.createTimeout() public. Fixed issues [#10](https://github.com/tim-kos/node-retry/issues/10), [#12](https://github.com/tim-kos/node-retry/issues/12), and [#13](https://github.com/tim-kos/node-retry/issues/13). +0.7.0 Some bug fixes and made retry.createTimeout() public. Fixed issues [#10](https://github.com/tim-kos/node-retry/issues/10), [#12](https://github.com/tim-kos/node-retry/issues/12), and [#13](https://github.com/tim-kos/node-retry/issues/13). -0.6.0 Introduced optional timeOps parameter for the attempt() function which is an object having a property timeout in miliseconds and a property cb callback function. Whenever your retry operation takes longer than timeout to execute, the timeout callback function cb is called. +0.6.0 Introduced optional timeOps parameter for the attempt() function which is an object having a property timeout in milliseconds and a property cb callback function. Whenever your retry operation takes longer than timeout to execute, the timeout callback function cb is called. -0.5.0 Some minor refactorings. +0.5.0 Some minor refactoring. 0.4.0 Changed retryOperation.try() to retryOperation.attempt(). Deprecated the aliases start() and try() for it. diff --git a/deps/npm/node_modules/retry/lib/retry.js b/deps/npm/node_modules/retry/lib/retry.js index 94685652c426fd..02ab14729bd8b7 100644 --- a/deps/npm/node_modules/retry/lib/retry.js +++ b/deps/npm/node_modules/retry/lib/retry.js @@ -1,10 +1,11 @@ var RetryOperation = require('./retry_operation'); exports.operation = function(options) { - var retryForever = false; - if (options && options.forever === true) retryForever = true; var timeouts = exports.timeouts(options); - return new RetryOperation(timeouts, retryForever); + return new RetryOperation(timeouts, { + forever: options && options.forever, + unref: options && options.unref + }); }; exports.timeouts = function(options) { diff --git a/deps/npm/node_modules/retry/lib/retry_operation.js b/deps/npm/node_modules/retry/lib/retry_operation.js index 52b895544e6a58..ad96efbdf3b02d 100644 --- a/deps/npm/node_modules/retry/lib/retry_operation.js +++ b/deps/npm/node_modules/retry/lib/retry_operation.js @@ -1,5 +1,11 @@ -function RetryOperation(timeouts, retryForever) { +function RetryOperation(timeouts, options) { + // Compatibility for the old (timeouts, retryForever) signature + if (typeof options === 'boolean') { + options = { forever: options }; + } + this._timeouts = timeouts; + this._options = options || {}; this._fn = null; this._errors = []; this._attempts = 1; @@ -7,7 +13,7 @@ function RetryOperation(timeouts, retryForever) { this._operationTimeoutCb = null; this._timeout = null; - if (!!retryForever) { + if (this._options.forever) { this._cachedTimeouts = this._timeouts.slice(0); } } @@ -37,18 +43,26 @@ RetryOperation.prototype.retry = function(err) { } var self = this; - setTimeout(function() { + var timer = setTimeout(function() { self._attempts++; if (self._operationTimeoutCb) { self._timeout = setTimeout(function() { self._operationTimeoutCb(self._attempts); }, self._operationTimeout); + + if (this._options.unref) { + self._timeout.unref(); + } } self._fn(self._attempts); }, timeout); + if (this._options.unref) { + timer.unref(); + } + return true; }; diff --git a/deps/npm/node_modules/retry/package.json b/deps/npm/node_modules/retry/package.json index 68d19a908a68a5..9d2283a3986e54 100644 --- a/deps/npm/node_modules/retry/package.json +++ b/deps/npm/node_modules/retry/package.json @@ -1,53 +1,79 @@ { - "author": { - "name": "Tim Koschützki", + "_args": [ + [ + "retry@latest", + "/Users/rebecca/code/npm" + ] + ], + "_from": "retry@latest", + "_id": "retry@0.9.0", + "_inCache": true, + "_installable": true, + "_location": "/retry", + "_nodeVersion": "4.2.1", + "_npmUser": { "email": "tim@debuggable.com", - "url": "http://debuggable.com/" + "name": "tim-kos" }, - "name": "retry", - "description": "Abstraction for exponential and custom retry strategies for failed operations.", - "license": "MIT", - "version": "0.8.0", - "homepage": "https://github.com/tim-kos/node-retry", - "repository": { - "type": "git", - "url": "git://github.com/tim-kos/node-retry.git" + "_npmVersion": "2.1.7", + "_phantomChildren": {}, + "_requested": { + "name": "retry", + "raw": "retry@latest", + "rawSpec": "latest", + "scope": null, + "spec": "latest", + "type": "tag" }, - "directories": { - "lib": "./lib" + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/retry/-/retry-0.9.0.tgz", + "_shasum": "6f697e50a0e4ddc8c8f7fb547a9b60dead43678d", + "_shrinkwrap": null, + "_spec": "retry@latest", + "_where": "/Users/rebecca/code/npm", + "author": { + "email": "tim@debuggable.com", + "name": "Tim Koschützki", + "url": "http://debuggable.com/" }, - "main": "index", - "engines": { - "node": "*" + "bugs": { + "url": "https://github.com/tim-kos/node-retry/issues" }, "dependencies": {}, + "description": "Abstraction for exponential and custom retry strategies for failed operations.", "devDependencies": { "fake": "0.2.0", "far": "0.0.1" }, - "gitHead": "9446e803d6a41ae08732a4a215ae5bf1ff1ccfdd", - "bugs": { - "url": "https://github.com/tim-kos/node-retry/issues" + "directories": { + "lib": "./lib" }, - "_id": "retry@0.8.0", - "scripts": {}, - "_shasum": "2367628dc0edb247b1eab649dc53ac8628ac2d5f", - "_from": "retry@>=0.8.0 <0.9.0", - "_npmVersion": "2.1.7", - "_nodeVersion": "0.10.33", - "_npmUser": { - "name": "tim-kos", - "email": "tim@debuggable.com" + "dist": { + "shasum": "6f697e50a0e4ddc8c8f7fb547a9b60dead43678d", + "tarball": "http://registry.npmjs.org/retry/-/retry-0.9.0.tgz" }, + "engines": { + "node": "*" + }, + "gitHead": "1b621cf499ef7647d005e3650006b93a8dbeb986", + "homepage": "https://github.com/tim-kos/node-retry", + "license": "MIT", + "main": "index", "maintainers": [ { "name": "tim-kos", "email": "tim@debuggable.com" } ], - "dist": { - "shasum": "2367628dc0edb247b1eab649dc53ac8628ac2d5f", - "tarball": "http://registry.npmjs.org/retry/-/retry-0.8.0.tgz" + "name": "retry", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/tim-kos/node-retry.git" }, - "_resolved": "https://registry.npmjs.org/retry/-/retry-0.8.0.tgz" + "scripts": {}, + "version": "0.9.0" } diff --git a/deps/npm/node_modules/rimraf/README.md b/deps/npm/node_modules/rimraf/README.md index 24fdb735de4ee3..423b8cf854ad3e 100644 --- a/deps/npm/node_modules/rimraf/README.md +++ b/deps/npm/node_modules/rimraf/README.md @@ -29,7 +29,7 @@ errors are handled for you: ## options -* unlink, chmod, stat, lstat, rmdir, readdir +* unlink, chmod, stat, lstat, rmdir, readdir, unlinkSync, chmodSync, statSync, lstatSync, rmdirSync, readdirSync In order to use a custom file system library, you can override diff --git a/deps/npm/node_modules/rimraf/package.json b/deps/npm/node_modules/rimraf/package.json index 53bb49a2d30b29..6ce45c22749a8b 100644 --- a/deps/npm/node_modules/rimraf/package.json +++ b/deps/npm/node_modules/rimraf/package.json @@ -1,12 +1,12 @@ { "_args": [ [ - "rimraf@2.5.0", + "rimraf@~2.5.0", "/Users/rebecca/code/npm" ] ], - "_from": "rimraf@2.5.0", - "_id": "rimraf@2.5.0", + "_from": "rimraf@>=2.5.0 <2.6.0", + "_id": "rimraf@2.5.1", "_inCache": true, "_installable": true, "_location": "/rimraf", @@ -15,19 +15,15 @@ "email": "i@izs.me", "name": "isaacs" }, - "_npmVersion": "3.3.2", - "_phantomChildren": { - "inflight": "1.0.4", - "inherits": "2.0.1", - "once": "1.3.3" - }, + "_npmVersion": "2.14.15", + "_phantomChildren": {}, "_requested": { "name": "rimraf", - "raw": "rimraf@2.5.0", - "rawSpec": "2.5.0", + "raw": "rimraf@~2.5.0", + "rawSpec": "~2.5.0", "scope": null, - "spec": "2.5.0", - "type": "version" + "spec": ">=2.5.0 <2.6.0", + "type": "range" }, "_requiredBy": [ "/", @@ -39,10 +35,10 @@ "/tap/nyc", "/tap/nyc/spawn-wrap" ], - "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.0.tgz", - "_shasum": "30c096cdf772e26bf3e1d2cff84c2196541a9bb6", + "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.1.tgz", + "_shasum": "52e1e946f3f9b9b0d5d8988ba3191aaf2a2dbd43", "_shrinkwrap": null, - "_spec": "rimraf@2.5.0", + "_spec": "rimraf@~2.5.0", "_where": "/Users/rebecca/code/npm", "author": { "email": "i@izs.me", @@ -61,12 +57,12 @@ "description": "A deep deletion module for node (like `rm -rf`)", "devDependencies": { "mkdirp": "^0.5.1", - "tap": "^2.3.4" + "tap": "^5.1.1" }, "directories": {}, "dist": { - "shasum": "30c096cdf772e26bf3e1d2cff84c2196541a9bb6", - "tarball": "http://registry.npmjs.org/rimraf/-/rimraf-2.5.0.tgz" + "shasum": "52e1e946f3f9b9b0d5d8988ba3191aaf2a2dbd43", + "tarball": "http://registry.npmjs.org/rimraf/-/rimraf-2.5.1.tgz" }, "files": [ "LICENSE", @@ -74,7 +70,7 @@ "bin.js", "rimraf.js" ], - "gitHead": "c42412ca7a4c9fcf1a219bdfef2283bd7dcbc1d2", + "gitHead": "979f7a3aa061d2262f9e1b41c6e4afd66c71d1d5", "homepage": "https://github.com/isaacs/rimraf#readme", "license": "ISC", "main": "rimraf.js", @@ -94,5 +90,5 @@ "scripts": { "test": "tap test/*.js" }, - "version": "2.5.0" + "version": "2.5.1" } diff --git a/deps/npm/node_modules/which/.npmignore b/deps/npm/node_modules/which/.npmignore new file mode 100644 index 00000000000000..0ac606ffcbed0a --- /dev/null +++ b/deps/npm/node_modules/which/.npmignore @@ -0,0 +1,3 @@ +.nyc_output/ +coverage/ +node_modules/ diff --git a/deps/npm/node_modules/which/node_modules/isexe/.npmignore b/deps/npm/node_modules/which/node_modules/isexe/.npmignore new file mode 100644 index 00000000000000..c1cb757acf58a4 --- /dev/null +++ b/deps/npm/node_modules/which/node_modules/isexe/.npmignore @@ -0,0 +1,2 @@ +.nyc_output/ +coverage/ diff --git a/deps/npm/node_modules/which/node_modules/isexe/README.md b/deps/npm/node_modules/which/node_modules/isexe/README.md new file mode 100644 index 00000000000000..30995ad7df9c87 --- /dev/null +++ b/deps/npm/node_modules/which/node_modules/isexe/README.md @@ -0,0 +1,51 @@ +# isexe + +Minimal module to check if a file is executable. + +Uses `fs.access` if available, and tests against the `PATHEXT` +environment variable on Windows. + +## USAGE + +```javascript +var isexe = require('isexe') +isexe('some-file-name', function (err, isExe) { + if (err) { + console.error('probably file does not exist or something', err) + } else if (isExe) { + console.error('this thing can be run') + } else { + console.error('cannot be run') + } +}) + +// same thing but synchronous, throws errors +var isExe = isexe.sync('some-file-name') + +// treat errors as just "not executable" +isexe('maybe-missing-file', { ignoreErrors: true }, callback) +var isExe = isexe.sync('maybe-missing-file', { ignoreErrors: true }) +``` + +## API + +### `isexe(path, [options], [callback])` + +Check if the path is executable. If no callback provided, and a +global `Promise` object is available, then a Promise will be returned. + +Will raise whatever errors may be raised by `fs.access` or `fs.stat`, +unless `options.ignoreErrors` is set to true. + +### `isexe.sync(path, [options])` + +Same as `isexe` but returns the value and throws any errors raised. + +### Options + +* `ignoreErrors` Treat all errors as "no, this is not executable", but + don't raise them. +* `uid` Number to use as the user id when using the `mode` approach. +* `gid` Number to use as the group id when using the `mode` approach. +* `pathExt` List of path extensions to use instead of `PATHEXT` + environment variable on Windows. diff --git a/deps/npm/node_modules/which/node_modules/isexe/access.js b/deps/npm/node_modules/which/node_modules/isexe/access.js new file mode 100644 index 00000000000000..e67b28bd6f6c6f --- /dev/null +++ b/deps/npm/node_modules/which/node_modules/isexe/access.js @@ -0,0 +1,15 @@ +module.exports = isexe +isexe.sync = sync + +var fs = require('fs') + +function isexe (path, _, cb) { + fs.access(path, fs.X_OK, function (er) { + cb(er, !er) + }) +} + +function sync (path, _) { + fs.accessSync(path, fs.X_OK) + return true +} diff --git a/deps/npm/node_modules/which/node_modules/isexe/index.js b/deps/npm/node_modules/which/node_modules/isexe/index.js new file mode 100644 index 00000000000000..ff8ef113b89229 --- /dev/null +++ b/deps/npm/node_modules/which/node_modules/isexe/index.js @@ -0,0 +1,59 @@ +var fs = require('fs') +var core +if (process.platform === 'win32' || global.TESTING_WINDOWS) { + core = require('./windows.js') +} else if (typeof fs.access === 'function') { + core = require('./access.js') +} else { + core = require('./mode.js') +} + +module.exports = isexe +isexe.sync = sync + +function isexe (path, options, cb) { + if (typeof options === 'function') { + cb = options + options = {} + } + + if (!cb) { + if (typeof Promise !== 'function') { + throw new TypeError('callback not provided') + } + + return new Promise(function (resolve, reject) { + isexe(path, options || {}, function (er, is) { + if (er) { + reject(er) + } else { + resolve(is) + } + }) + }) + } + + core(path, options || {}, function (er, is) { + // ignore EACCES because that just means we aren't allowed to run it + if (er) { + if (er.code === 'EACCES' || options && options.ignoreErrors) { + er = null + is = false + } + } + cb(er, is) + }) +} + +function sync (path, options) { + // my kingdom for a filtered catch + try { + return core.sync(path, options || {}) + } catch (er) { + if (options && options.ignoreErrors || er.code === 'EACCES') { + return false + } else { + throw er + } + } +} diff --git a/deps/npm/node_modules/which/node_modules/isexe/mode.js b/deps/npm/node_modules/which/node_modules/isexe/mode.js new file mode 100644 index 00000000000000..204428072801c9 --- /dev/null +++ b/deps/npm/node_modules/which/node_modules/isexe/mode.js @@ -0,0 +1,37 @@ +module.exports = isexe +isexe.sync = sync + +var fs = require('fs') + +function isexe (path, options, cb) { + fs.stat(path, function (er, st) { + cb(er, er ? false : checkMode(st, options)) + }) +} + +function sync (path, options) { + return checkMode(fs.statSync(path), options) +} + +function checkMode (stat, options) { + var mod = stat.mode + var uid = stat.uid + var gid = stat.gid + + var myUid = options.uid !== undefined ? + options.uid : process.getuid && process.getuid() + var myGid = options.gid !== undefined ? + options.gid : process.getgid && process.getgid() + + var u = parseInt('100', 8) + var g = parseInt('010', 8) + var o = parseInt('001', 8) + var ug = u | g + + var ret = (mod & o) || + (mod & g) && gid === myGid || + (mod & u) && uid === myUid || + (mod & ug) && myUid === 0 + + return ret +} diff --git a/deps/npm/node_modules/which/node_modules/isexe/package.json b/deps/npm/node_modules/which/node_modules/isexe/package.json new file mode 100644 index 00000000000000..49aeeab2a3df7b --- /dev/null +++ b/deps/npm/node_modules/which/node_modules/isexe/package.json @@ -0,0 +1,80 @@ +{ + "_args": [ + [ + "isexe@^1.1.1", + "/Users/rebecca/code/npm/node_modules/which" + ] + ], + "_from": "isexe@>=1.1.1 <2.0.0", + "_id": "isexe@1.1.1", + "_inCache": true, + "_installable": true, + "_location": "/which/isexe", + "_nodeVersion": "4.0.0", + "_npmUser": { + "email": "i@izs.me", + "name": "isaacs" + }, + "_npmVersion": "2.14.15", + "_phantomChildren": {}, + "_requested": { + "name": "isexe", + "raw": "isexe@^1.1.1", + "rawSpec": "^1.1.1", + "scope": null, + "spec": ">=1.1.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/which" + ], + "_resolved": "https://registry.npmjs.org/isexe/-/isexe-1.1.1.tgz", + "_shasum": "f0d4793ed2fb5c46bfdeab760bbb965f4485a66c", + "_shrinkwrap": null, + "_spec": "isexe@^1.1.1", + "_where": "/Users/rebecca/code/npm/node_modules/which", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/isexe/issues" + }, + "dependencies": {}, + "description": "Minimal module to check if a file is executable.", + "devDependencies": { + "mkdirp": "^0.5.1", + "rimraf": "^2.5.0", + "tap": "^5.1.2" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "f0d4793ed2fb5c46bfdeab760bbb965f4485a66c", + "tarball": "http://registry.npmjs.org/isexe/-/isexe-1.1.1.tgz" + }, + "gitHead": "af83031caed58654ad9d20b98eb710d383618ad7", + "homepage": "https://github.com/isaacs/isexe#readme", + "keywords": [], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "isexe", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/isexe.git" + }, + "scripts": { + "test": "tap test/*.js --branches=100 --statements=100 --functions=100 --lines=100" + }, + "version": "1.1.1" +} diff --git a/deps/npm/node_modules/which/node_modules/isexe/test/basic.js b/deps/npm/node_modules/which/node_modules/isexe/test/basic.js new file mode 100644 index 00000000000000..969fc9a0a3f68e --- /dev/null +++ b/deps/npm/node_modules/which/node_modules/isexe/test/basic.js @@ -0,0 +1,211 @@ +var t = require('tap') +var fs = require('fs') +var path = require('path') +var fixture = path.resolve(__dirname, 'fixtures') +var meow = fixture + '/meow.cat' +var mine = fixture + '/mine.cat' +var ours = fixture + '/ours.cat' +var fail = fixture + '/fail.false' +var noent = fixture + '/enoent.exe' +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') + +var isWindows = process.platform === 'win32' +var hasAccess = typeof fs.access === 'function' +var winSkip = isWindows && 'windows' +var accessSkip = !hasAccess && 'no fs.access function' +var hasPromise = typeof Promise === 'function' +var promiseSkip = !hasPromise && 'no global Promise' + +function reset () { + delete require.cache[require.resolve('../')] + return require('../') +} + +t.test('setup fixtures', function (t) { + rimraf.sync(fixture) + mkdirp.sync(fixture) + fs.writeFileSync(meow, '#!/usr/bin/env cat\nmeow\n') + fs.chmodSync(meow, parseInt('0755', 8)) + fs.writeFileSync(fail, '#!/usr/bin/env false\n') + fs.chmodSync(fail, parseInt('0644', 8)) + fs.writeFileSync(mine, '#!/usr/bin/env cat\nmine\n') + fs.chmodSync(mine, parseInt('0744', 8)) + fs.writeFileSync(ours, '#!/usr/bin/env cat\nours\n') + fs.chmodSync(ours, parseInt('0754', 8)) + t.end() +}) + +t.test('promise', { skip: promiseSkip }, function (t) { + var isexe = reset() + t.test('meow async', function (t) { + isexe(meow).then(function (is) { + t.ok(is) + t.end() + }) + }) + t.test('fail async', function (t) { + isexe(fail).then(function (is) { + t.notOk(is) + t.end() + }) + }) + t.test('noent async', function (t) { + isexe(noent).catch(function (er) { + t.ok(er) + t.end() + }) + }) + t.test('noent ignore async', function (t) { + isexe(noent, { ignoreErrors: true }).then(function (is) { + t.notOk(is) + t.end() + }) + }) + t.end() +}) + +t.test('no promise', function (t) { + global.Promise = null + var isexe = reset() + t.throws('try to meow a promise', function () { + isexe(meow) + }) + t.end() +}) + +t.test('access', { skip: accessSkip || winSkip }, function (t) { + runTest(t) +}) + +t.test('mode', { skip: winSkip }, function (t) { + delete fs.access + delete fs.accessSync + var isexe = reset() + t.ok(isexe.sync(ours, { uid: 0, gid: 0 })) + t.ok(isexe.sync(mine, { uid: 0, gid: 0 })) + runTest(t) +}) + +t.test('windows', function (t) { + global.TESTING_WINDOWS = true + var pathExt = '.EXE;.CAT;.CMD;.COM' + t.test('pathExt option', function (t) { + runTest(t, { pathExt: '.EXE;.CAT;.CMD;.COM' }) + }) + t.test('pathExt env', function (t) { + process.env.PATHEXT = pathExt + runTest(t) + }) + t.test('no pathExt', function (t) { + // with a pathExt of '', any filename is fine. + // so the "fail" one would still pass. + runTest(t, { pathExt: '', skipFail: true }) + }) + t.test('pathext with empty entry', function (t) { + // with a pathExt of '', any filename is fine. + // so the "fail" one would still pass. + runTest(t, { pathExt: ';' + pathExt, skipFail: true }) + }) + t.end() +}) + +t.test('cleanup', function (t) { + rimraf.sync(fixture) + t.end() +}) + +function runTest (t, options) { + var isexe = reset() + + var optionsIgnore = Object.create(options || {}) + optionsIgnore.ignoreErrors = true + + if (!options || !options.skipFail) { + t.notOk(isexe.sync(fail, options)) + } + t.notOk(isexe.sync(noent, optionsIgnore)) + if (!options) { + t.ok(isexe.sync(meow)) + } else { + t.ok(isexe.sync(meow, options)) + } + + t.ok(isexe.sync(mine, options)) + t.ok(isexe.sync(ours, options)) + t.throws(function () { + isexe.sync(noent, options) + }) + + t.test('meow async', function (t) { + if (!options) { + isexe(meow, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + } else { + isexe(meow, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + } + }) + + t.test('mine async', function (t) { + isexe(mine, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + }) + + t.test('ours async', function (t) { + isexe(ours, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + }) + + if (!options || !options.skipFail) { + t.test('fail async', function (t) { + isexe(fail, options, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + } + + t.test('noent async', function (t) { + isexe(noent, options, function (er, is) { + t.ok(er) + t.notOk(is) + t.end() + }) + }) + + t.test('noent ignore async', function (t) { + isexe(noent, optionsIgnore, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + + t.end() +} diff --git a/deps/npm/node_modules/which/node_modules/isexe/windows.js b/deps/npm/node_modules/which/node_modules/isexe/windows.js new file mode 100644 index 00000000000000..aba8561f3b0b12 --- /dev/null +++ b/deps/npm/node_modules/which/node_modules/isexe/windows.js @@ -0,0 +1,36 @@ +module.exports = isexe +isexe.sync = sync + +var fs = require('fs') + +function checkPathExt (path, options) { + var pathext = options.pathExt !== undefined ? + options.pathExt : process.env.PATHEXT + + if (!pathext) { + return true + } + + pathext = pathext.split(';') + if (pathext.indexOf('') !== -1) { + return true + } + for (var i = 0; i < pathext.length; i++) { + var p = pathext[i].toLowerCase() + if (p && path.substr(-p.length).toLowerCase() === p) { + return true + } + } + return false +} + +function isexe (path, options, cb) { + fs.stat(path, function (er, st) { + cb(er, er ? false : checkPathExt(path, options)) + }) +} + +function sync (path, options) { + fs.statSync(path) + return checkPathExt(path, options) +} diff --git a/deps/npm/node_modules/which/package.json b/deps/npm/node_modules/which/package.json index 79d84875bea558..04f90fa687a0e5 100644 --- a/deps/npm/node_modules/which/package.json +++ b/deps/npm/node_modules/which/package.json @@ -1,12 +1,12 @@ { "_args": [ [ - "which@1.2.1", + "which@~1.2.1", "/Users/rebecca/code/npm" ] ], - "_from": "which@1.2.1", - "_id": "which@1.2.1", + "_from": "which@>=1.2.1 <1.3.0", + "_id": "which@1.2.4", "_inCache": true, "_installable": true, "_location": "/which", @@ -15,26 +15,27 @@ "email": "i@izs.me", "name": "isaacs" }, - "_npmVersion": "3.3.2", + "_npmVersion": "2.14.15", "_phantomChildren": {}, "_requested": { "name": "which", - "raw": "which@1.2.1", - "rawSpec": "1.2.1", + "raw": "which@~1.2.1", + "rawSpec": "~1.2.1", "scope": null, - "spec": "1.2.1", - "type": "version" + "spec": ">=1.2.1 <1.3.0", + "type": "range" }, "_requiredBy": [ "/", "/node-gyp", "/standard/standard-format/esformatter/npm-run/npm-path", + "/tap/foreground-child/cross-spawn-async", "/tap/nyc/istanbul" ], - "_resolved": "https://registry.npmjs.org/which/-/which-1.2.1.tgz", - "_shasum": "a010c43aade1a798a3e6c1b1e453d45cb497a2bc", + "_resolved": "https://registry.npmjs.org/which/-/which-1.2.4.tgz", + "_shasum": "1557f96080604e5b11b3599eb9f45b50a9efd722", "_shrinkwrap": null, - "_spec": "which@1.2.1", + "_spec": "which@~1.2.1", "_where": "/Users/rebecca/code/npm", "author": { "email": "i@izs.me", @@ -48,20 +49,21 @@ "url": "https://github.com/isaacs/node-which/issues" }, "dependencies": { - "is-absolute": "^0.1.7" + "is-absolute": "^0.1.7", + "isexe": "^1.1.1" }, "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", "devDependencies": { "mkdirp": "^0.5.0", "rimraf": "^2.3.3", - "tap": "^2.0.0" + "tap": "^5.1.1" }, "directories": {}, "dist": { - "shasum": "a010c43aade1a798a3e6c1b1e453d45cb497a2bc", - "tarball": "http://registry.npmjs.org/which/-/which-1.2.1.tgz" + "shasum": "1557f96080604e5b11b3599eb9f45b50a9efd722", + "tarball": "http://registry.npmjs.org/which/-/which-1.2.4.tgz" }, - "gitHead": "c3b472bd2e13a61a880eca44c76025920a4cb1d5", + "gitHead": "1375684d40af9de2ecc527d1ab9b87b537d7a1cc", "homepage": "https://github.com/isaacs/node-which#readme", "license": "ISC", "main": "which.js", @@ -79,7 +81,7 @@ "url": "git://github.com/isaacs/node-which.git" }, "scripts": { - "test": "tap test/*.js" + "test": "tap test/*.js --cov" }, - "version": "1.2.1" + "version": "1.2.4" } diff --git a/deps/npm/node_modules/which/test/basic.js b/deps/npm/node_modules/which/test/basic.js index 80e9e96b2366ab..54c8d2384dc27f 100644 --- a/deps/npm/node_modules/which/test/basic.js +++ b/deps/npm/node_modules/which/test/basic.js @@ -51,17 +51,16 @@ t.test('make executable', function (t) { }) t.test('find when executable', function (t) { - t.plan(4) var opt = { pathExt: '.sh' } var expect = path.resolve(fixture, 'foo.sh').toLowerCase() - var PATH = process.env.PATH + var PATH = process.env.PATH || process.env.Path t.test('absolute', function (t) { runTest(fixture + '/foo.sh', t) }) t.test('with process.env.PATH', function (t) { - process.env.PATH = fixture + process.env.PATH = process.env.Path = fixture runTest('foo.sh', t) }) @@ -73,6 +72,25 @@ t.test('find when executable', function (t) { runTest('foo.sh', t) }) + t.test('with pathExt', { + skip: isWindows ? false : 'Only for Windows' + }, function (t) { + var pe = process.env.PATHEXT + process.env.PATHEXT = '.SH' + + t.test('foo.sh', function (t) { + runTest('foo.sh', t) + }) + t.test('foo', function (t) { + runTest('foo', t) + }) + t.test('replace', function (t) { + process.env.PATHEXT = pe + t.end() + }) + t.end() + }) + t.test('with path opt', function (t) { opt.path = fixture runTest('foo.sh', t) @@ -80,17 +98,20 @@ t.test('find when executable', function (t) { function runTest(exec, t) { t.plan(2) + + var found = which.sync(exec, opt).toLowerCase() + t.equal(found, expect) + which(exec, opt, function (er, found) { if (er) throw er t.equal(found.toLowerCase(), expect) + t.end() process.env.PATH = PATH }) - - var found = which.sync(exec, opt).toLowerCase() - t.equal(found, expect) } + t.end() }) t.test('clean', function (t) { diff --git a/deps/npm/node_modules/which/test/windows.js b/deps/npm/node_modules/which/test/windows.js new file mode 100644 index 00000000000000..1d5e4294a69357 --- /dev/null +++ b/deps/npm/node_modules/which/test/windows.js @@ -0,0 +1,10 @@ +// pretend to be Windows. +if (process.platform === 'win32') { + var t = require('tap') + t.plan(0, 'already on windows') + process.exit(0) +} + +process.env.Path = process.env.PATH.split(':').join(';') +process.env.OSTYPE = 'cygwin' +require('./basic.js') diff --git a/deps/npm/node_modules/which/which.js b/deps/npm/node_modules/which/which.js index e878351c1d78d8..5cf0124d7899b5 100644 --- a/deps/npm/node_modules/which/which.js +++ b/deps/npm/node_modules/which/which.js @@ -7,46 +7,26 @@ var isWindows = process.platform === 'win32' || var path = require('path') var COLON = isWindows ? ';' : ':' -var isExe +var isexe = require('isexe') var fs = require('fs') var isAbsolute = require('is-absolute') -var G = parseInt('0010', 8) -var U = parseInt('0100', 8) -var UG = parseInt('0110', 8) - -if (isWindows) { - // On windows, there is no good way to check that a file is executable - isExe = function isExe () { return true } -} else { - isExe = function isExe (mod, uid, gid) { - var ret = (mod & 1) - || (mod & G) && process.getgid && gid === process.getgid() - || (mod & U) && process.getuid && uid === process.getuid() - || (mod & UG) && process.getuid && 0 === process.getuid() - - if (!ret && process.getgroups && (mod & G)) { - var groups = process.getgroups() - for (var g = 0; g < groups.length; g++) { - if (groups[g] === gid) - return true - } - } - - return ret - } -} - function getPathInfo(cmd, opt) { var colon = opt.colon || COLON - var pathEnv = opt.path || process.env.PATH || '' + var pathEnv = opt.path || process.env.Path || process.env.PATH || '' var pathExt = [''] pathEnv = pathEnv.split(colon) + var pathExtExe = '' if (isWindows) { pathEnv.unshift(process.cwd()) - pathExt = (opt.pathExt || process.env.PATHEXT || '.EXE').split(colon) + pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM') + pathExt = pathExtExe.split(colon) + + + // Always test the cmd itself first. isexe will check to make sure + // it's found in the pathExt set. if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') pathExt.unshift('') } @@ -56,7 +36,11 @@ function getPathInfo(cmd, opt) { if (isAbsolute(cmd)) pathEnv = [''] - return {env: pathEnv, ext: pathExt} + return { + env: pathEnv, + ext: pathExt, + extExe: pathExtExe + } } function which (cmd, opt, cb) { @@ -68,6 +52,7 @@ function which (cmd, opt, cb) { var info = getPathInfo(cmd, opt) var pathEnv = info.env var pathExt = info.ext + var pathExtExe = info.extExe var found = [] ;(function F (i, l) { @@ -86,10 +71,8 @@ function which (cmd, opt, cb) { ;(function E (ii, ll) { if (ii === ll) return F(i + 1, l) var ext = pathExt[ii] - fs.stat(p + ext, function (er, stat) { - if (!er && - stat.isFile() && - isExe(stat.mode, stat.uid, stat.gid)) { + isexe(p + ext, { pathExt: pathExtExe }, function (er, is) { + if (!er && is) { if (opt.all) found.push(p + ext) else @@ -107,6 +90,7 @@ function whichSync (cmd, opt) { var info = getPathInfo(cmd, opt) var pathEnv = info.env var pathExt = info.ext + var pathExtExe = info.extExe var found = [] for (var i = 0, l = pathEnv.length; i < l; i ++) { @@ -117,10 +101,10 @@ function whichSync (cmd, opt) { var p = path.join(pathPart, cmd) for (var j = 0, ll = pathExt.length; j < ll; j ++) { var cur = p + pathExt[j] - var stat + var is try { - stat = fs.statSync(cur) - if (stat.isFile() && isExe(stat.mode, stat.uid, stat.gid)) { + is = isexe.sync(cur, { pathExt: pathExtExe }) + if (is) { if (opt.all) found.push(cur) else diff --git a/deps/npm/package.json b/deps/npm/package.json index 1b78f78f7b4e6e..37755a7c7a099e 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "3.6.0", + "version": "3.7.1", "name": "npm", "description": "a package manager for JavaScript", "keywords": [ @@ -56,7 +56,7 @@ "ini": "~1.3.4", "init-package-json": "~1.9.3", "lockfile": "~1.0.1", - "lodash.clonedeep": "~4.0.1", + "lodash.clonedeep": "~4.0.2", "lodash.isarguments": "~3.0.5", "lodash.isarray": "~4.0.0", "lodash.keys": "~4.0.0", @@ -73,7 +73,7 @@ "npm-package-arg": "~4.1.0", "npm-registry-client": "~7.0.9", "npm-user-validate": "~0.1.2", - "npmlog": "~2.0.0", + "npmlog": "~2.0.2", "once": "~1.3.3", "opener": "~1.4.1", "osenv": "~0.1.3", @@ -85,9 +85,9 @@ "read-package-tree": "~5.1.2", "readable-stream": "~2.0.5", "realize-package-specifier": "~3.0.1", - "request": "~2.67.0", - "retry": "~0.8.0", - "rimraf": "~2.5.0", + "request": "~2.69.0", + "retry": "~0.9.0", + "rimraf": "~2.5.1", "semver": "~5.1.0", "sha": "~2.0.1", "slide": "~1.1.6", @@ -99,7 +99,7 @@ "unique-filename": "~1.1.0", "unpipe": "~1.0.0", "validate-npm-package-name": "~2.2.2", - "which": "~1.2.1", + "which": "~1.2.4", "wrappy": "~1.0.1", "write-file-atomic": "~1.1.4" }, @@ -199,7 +199,7 @@ "require-inject": "~1.3.0", "sprintf-js": "~1.0.3", "standard": "~5.4.1", - "tap": "~5.1.1" + "tap": "~5.2.0" }, "scripts": { "dumpconf": "env | grep npm | sort | uniq", diff --git a/deps/npm/test/fixtures/onload.js b/deps/npm/test/fixtures/onload.js new file mode 100644 index 00000000000000..90c1a3aa55e77a --- /dev/null +++ b/deps/npm/test/fixtures/onload.js @@ -0,0 +1 @@ +console.error('called onload') diff --git a/deps/npm/test/tap/add-remote-git-file.js b/deps/npm/test/tap/add-remote-git-file.js index 673be4c2854ef4..eff4a62e2ffbb4 100644 --- a/deps/npm/test/tap/add-remote-git-file.js +++ b/deps/npm/test/tap/add-remote-git-file.js @@ -45,6 +45,29 @@ test('cache from repo', function (t) { }) }) +test('save install', function (t) { + process.chdir(pkg) + fs.writeFileSync('package.json', JSON.stringify({ + name: 'parent', + version: '5.4.3' + }, null, 2) + '\n') + var prev = npm.config.get('save') + npm.config.set('save', true) + npm.commands.install('.', [cloneURL], function (er) { + npm.config.set('save', prev) + t.ifError(er, 'npm installed via git') + var pj = JSON.parse(fs.readFileSync('package.json', 'utf-8')) + var dep = pj.dependencies.child + t.equal( + url.parse(dep).protocol, + 'git+file:', + 'npm didn\'t strip the git+ from git+file://' + ) + + t.end() + }) +}) + test('clean', function (t) { cleanup() t.end() diff --git a/deps/npm/test/tap/add-remote-git-submodule.js b/deps/npm/test/tap/add-remote-git-submodule.js new file mode 100644 index 00000000000000..f4a51b4f6cdcc7 --- /dev/null +++ b/deps/npm/test/tap/add-remote-git-submodule.js @@ -0,0 +1,145 @@ +var fs = require('fs') +var resolve = require('path').resolve + +var osenv = require('osenv') +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var test = require('tap').test + +var npm = require('../../lib/npm.js') +var common = require('../common-tap.js') + +var pkg = resolve(__dirname, 'add-remote-git-submodule') +var repos = resolve(__dirname, 'add-remote-git-submodule-repos') +var subwt = resolve(repos, 'subwt') +var topwt = resolve(repos, 'topwt') +var suburl = 'git://localhost:1234/sub.git' +var topurl = 'git://localhost:1234/top.git' + +var daemon +var daemonPID +var git + +var pjParent = JSON.stringify({ + name: 'parent', + version: '1.2.3', + dependencies: { + child: topurl + } +}, null, 2) + '\n' + +var pjChild = JSON.stringify({ + name: 'child', + version: '1.0.3' +}, null, 2) + '\n' + +test('setup', function (t) { + setup(function (er, r) { + t.ifError(er, 'git started up successfully') + t.end() + }) +}) + +test('install from repo', function (t) { + bootstrap(t) + npm.commands.install('.', [], function (er) { + t.ifError(er, 'npm installed via git') + t.end() + }) +}) + +test('has file in submodule', function (t) { + bootstrap(t) + npm.commands.install('.', [], function (er) { + t.ifError(er, 'npm installed via git') + var fooPath = resolve('node_modules', 'child', 'subpath', 'foo.txt') + fs.stat(fooPath, function (er) { + t.ifError(er, 'file in submodule exists') + t.end() + }) + }) +}) + +test('clean', function (t) { + daemon.on('close', function () { + cleanup() + t.end() + }) + process.kill(daemonPID) +}) + +function bootstrap (t) { + mkdirp.sync(pkg) + process.chdir(pkg) + fs.writeFileSync('package.json', pjParent) + t.tearDown(function () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) + }) +} + +function setup (cb) { + mkdirp.sync(topwt) + fs.writeFileSync(resolve(topwt, 'package.json'), pjChild) + mkdirp.sync(subwt) + fs.writeFileSync(resolve(subwt, 'foo.txt'), 'This is provided by submodule') + npm.load({ registry: common.registry, loglevel: 'silent' }, function () { + git = require('../../lib/utils/git.js') + + function startDaemon (cb) { + // start git server + var d = git.spawn( + [ + 'daemon', + '--verbose', + '--listen=localhost', + '--export-all', + '--base-path=.', + '--reuseaddr', + '--port=1234' + ], + { + cwd: repos, + env: process.env, + stdio: ['pipe', 'pipe', 'pipe'] + } + ) + d.stderr.on('data', childFinder) + + function childFinder (c) { + var cpid = c.toString().match(/^\[(\d+)\]/) + if (cpid[1]) { + this.removeListener('data', childFinder) + daemon = d + daemonPID = cpid[1] + cb(null) + } + } + } + + var env = { PATH: process.env.PATH } + var topopt = { cwd: topwt, env: env } + var reposopt = { cwd: repos, env: env } + common.makeGitRepo({ + path: subwt, + added: ['foo.txt'], + commands: [ + git.chainableExec(['clone', '--bare', subwt, 'sub.git'], reposopt), + startDaemon, + [common.makeGitRepo, { + path: topwt, + commands: [ + git.chainableExec(['submodule', 'add', suburl, 'subpath'], topopt), + git.chainableExec(['commit', '-m', 'added submodule'], topopt), + git.chainableExec(['clone', '--bare', topwt, 'top.git'], reposopt) + ] + }] + ] + }, cb) + }) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(repos) +} diff --git a/deps/npm/test/tap/lifecycle-path.js b/deps/npm/test/tap/lifecycle-path.js index fae6fcc83f71e3..39761b48d7533e 100644 --- a/deps/npm/test/tap/lifecycle-path.js +++ b/deps/npm/test/tap/lifecycle-path.js @@ -67,7 +67,8 @@ test('make sure the path is correct', function (t) { // get the ones we tacked on, then the system-specific requirements var expect = [ '{{ROOT}}/bin/node-gyp-bin', - '{{ROOT}}/test/tap/lifecycle-path/node_modules/.bin' + '{{ROOT}}/test/tap/lifecycle-path/node_modules/.bin', + path.dirname(process.execPath) ].concat(PATH.split(pathSplit).map(function (p) { return p.replace(/\\/g, '/') })) diff --git a/deps/npm/test/tap/lifecycle.js b/deps/npm/test/tap/lifecycle.js index 1bd77c383bfaaf..1a98bf3db75802 100644 --- a/deps/npm/test/tap/lifecycle.js +++ b/deps/npm/test/tap/lifecycle.js @@ -10,3 +10,35 @@ test('lifecycle: make env correctly', function (t) { t.end() }) }) + +test('lifecycle : accepts wd for package that matches project\'s name', function (t) { + npm.load({}, function () { + var wd = '/opt/my-time/node_modules/time' + var pkg = {name: 'time'} + + t.equal(lifecycle._incorrectWorkingDirectory(wd, pkg), false) + t.end() + }) +}) + +test('lifecycle : accepts wd for package that doesn\'t match project\'s name', function (t) { + npm.load({}, function () { + var wd = '/opt/my-project/node_modules/time' + var pkg = {name: 'time'} + + t.equal(lifecycle._incorrectWorkingDirectory(wd, pkg), false) + t.end() + }) +}) + +test('lifecycle : rejects wd for ', function (t) { + npm.load({}, function () { + var wd = '/opt/my-time/node_modules/time/invalid' + var pkg = { + name: 'time' + } + + t.equal(lifecycle._incorrectWorkingDirectory(wd, pkg), true) + t.end() + }) +}) diff --git a/deps/npm/test/tap/ls-production-and-dev.js b/deps/npm/test/tap/ls-production-and-dev.js new file mode 100644 index 00000000000000..e9bae3de792f16 --- /dev/null +++ b/deps/npm/test/tap/ls-production-and-dev.js @@ -0,0 +1,150 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap') + +var pkg = path.resolve(__dirname, 'ls-depth') + +var EXEC_OPTS = { cwd: pkg } + +var json = { + name: 'ls-env', + version: '0.0.0', + dependencies: { + 'test-package-with-one-dep': '0.0.0' + }, + devDependencies: { + 'test-package-with-one-dep': '0.0.0' + } +} + +test('setup', function (t) { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + mr({port: common.port}, function (er, s) { + common.npm( + [ + '--registry', common.registry, + 'install' + ], + EXEC_OPTS, + function (er, c) { + t.ifError(er, 'install ran without issue') + t.equal(c, 0) + s.close() + t.end() + } + ) + }) +}) + +test('npm ls --dev', function (t) { + common.npm(['ls', '--dev'], EXEC_OPTS, function (er, code, stdout) { + t.ifError(er, 'ls --dev ran without issue') + t.equal(code, 0) + t.has( + stdout, + /test-package-with-one-dep@0\.0\.0/, + 'output contains test-package-with-one-dep@0.0.0' + ) + t.end() + }) +}) + +test('npm ls --only=development', function (t) { + common.npm(['ls', '--only=development'], EXEC_OPTS, function (er, code, stdout) { + t.ifError(er, 'ls --only=development ran without issue') + t.equal(code, 0) + t.has( + stdout, + /test-package-with-one-dep@0\.0\.0/, + 'output contains test-package-with-one-dep@0.0.0' + ) + t.end() + }) +}) + +test('npm ls --only=dev', function (t) { + common.npm(['ls', '--only=dev'], EXEC_OPTS, function (er, code, stdout) { + t.ifError(er, 'ls --only=dev ran without issue') + t.equal(code, 0) + t.has( + stdout, + /test-package-with-one-dep@0\.0\.0/, + 'output contains test-package-with-one-dep@0.0.0' + ) + t.end() + }) +}) + +test('npm ls --production', function (t) { + common.npm(['ls', '--production'], EXEC_OPTS, function (er, code, stdout) { + t.ifError(er, 'ls --production ran without issue') + t.notOk(code, 'npm exited ok') + t.has( + stdout, + /test-package-with-one-dep@0\.0\.0/, + 'output contains test-package-with-one-dep@0.0.0' + ) + t.end() + }) +}) + +test('npm ls --prod', function (t) { + common.npm(['ls', '--prod'], EXEC_OPTS, function (er, code, stdout) { + t.ifError(er, 'ls --prod ran without issue') + t.notOk(code, 'npm exited ok') + t.has( + stdout, + /test-package-with-one-dep@0\.0\.0/, + 'output contains test-package-with-one-dep@0.0.0' + ) + t.end() + }) +}) + +test('npm ls --only=production', function (t) { + common.npm(['ls', '--only=production'], EXEC_OPTS, function (er, code, stdout) { + t.ifError(er, 'ls --only=production ran without issue') + t.notOk(code, 'npm exited ok') + t.has( + stdout, + /test-package-with-one-dep@0\.0\.0/, + 'output contains test-package-with-one-dep@0.0.0' + ) + t.end() + }) +}) + +test('npm ls --only=prod', function (t) { + common.npm(['ls', '--only=prod'], EXEC_OPTS, function (er, code, stdout) { + t.ifError(er, 'ls --only=prod ran without issue') + t.notOk(code, 'npm exited ok') + t.has( + stdout, + /test-package-with-one-dep@0\.0\.0/, + 'output contains test-package-with-one-dep@0.0.0' + ) + t.end() + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/deps/npm/test/tap/onload.js b/deps/npm/test/tap/onload.js new file mode 100644 index 00000000000000..8d2b6c743bab8e --- /dev/null +++ b/deps/npm/test/tap/onload.js @@ -0,0 +1,39 @@ +var path = require('path') +var test = require('tap').test +var rimraf = require('rimraf') +var common = require('../common-tap.js') +var opts = { cwd: __dirname } +var binDir = '../../node_modules/.bin' +var fixture = path.resolve(__dirname, binDir) +var onload = path.resolve(__dirname, '../fixtures/onload.js') + +test('setup', function (t) { + rimraf.sync(path.join(__dirname, 'node_modules')) + t.end() +}) + +test('npm bin with valid onload script', function (t) { + var args = ['--onload', onload, 'bin'] + common.npm(args, opts, function (err, code, stdout, stderr) { + t.ifError(err, 'bin ran without issue') + t.equal(stderr.trim(), 'called onload') + t.equal(code, 0, 'exit ok') + t.equal(stdout, fixture + '\n') + t.end() + }) +}) + +test('npm bin with invalid onload script', function (t) { + var onloadScript = onload + 'jsfd' + var args = ['--onload', onloadScript, '--loglevel=warn', 'bin'] + common.npm(args, opts, function (err, code, stdout, stderr) { + t.ifError(err, 'bin ran without issue') + t.match(stderr, /npm WARN onload-script failed to require onload script/) + t.match(stderr, /MODULE_NOT_FOUND/) + t.notEqual(stderr.indexOf(onloadScript), -1) + t.equal(code, 0, 'exit ok') + var res = path.resolve(stdout) + t.equal(res, fixture + '\n') + t.end() + }) +}) diff --git a/deps/npm/test/tap/uninstall-save.js b/deps/npm/test/tap/uninstall-save.js new file mode 100644 index 00000000000000..c097659d22066d --- /dev/null +++ b/deps/npm/test/tap/uninstall-save.js @@ -0,0 +1,110 @@ +var fs = require('fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') +var server + +var pkg = path.join(__dirname, 'uninstall-save') + +var EXEC_OPTS = { cwd: pkg } + +var json = { + name: 'uninstall-save', + version: '0.0.1' +} + +test('setup', function (t) { + setup() + mr({ port: common.port }, function (er, s) { + t.ifError(er, 'started mock registry') + server = s + t.end() + }) +}) + +test('uninstall --save removes rm-ed package from package.json', function (t) { + common.npm( + [ + '--registry', common.registry, + '--loglevel', 'silent', + '--save-prefix', '^', + '--save', + 'install', 'underscore@latest' + ], + EXEC_OPTS, + function (err, code) { + t.ifError(err, 'npm install ran without issue') + t.notOk(code, 'npm install exited with code 0') + + var p = path.join(pkg, 'node_modules', 'underscore', 'package.json') + t.ok(JSON.parse(fs.readFileSync(p))) + + var pkgJson = JSON.parse(fs.readFileSync( + path.join(pkg, 'package.json'), + 'utf8' + )) + t.deepEqual( + pkgJson.dependencies, + { 'underscore': '^1.5.1' }, + 'got expected save prefix and version of 1.5.1' + ) + + var installed = path.join(pkg, 'node_modules', 'underscore') + rimraf.sync(installed) + + common.npm( + [ + '--registry', common.registry, + '--loglevel', 'debug', + '--save', + 'uninstall', 'underscore' + ], + EXEC_OPTS, + function (err, code) { + t.ifError(err, 'npm uninstall ran without issue') + + var pkgJson = JSON.parse(fs.readFileSync( + path.join(pkg, 'package.json'), + 'utf8' + )) + + t.deepEqual( + pkgJson.dependencies, + { }, + 'dependency removed as expected' + ) + + t.end() + } + ) + } + ) +}) + +test('cleanup', function (t) { + server.close() + cleanup() + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} + +function setup () { + cleanup() + mkdirp.sync(path.resolve(pkg, 'node_modules')) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + + process.chdir(pkg) +}