From d7d321b071789f08c65dbb11a0e4b3b6a299af44 Mon Sep 17 00:00:00 2001 From: isaacs Date: Wed, 24 Jul 2019 23:00:03 -0700 Subject: [PATCH] deps: upgrade npm to 6.10.2 PR-URL: https://github.com/nodejs/node/pull/28853 Reviewed-By: Rich Trott Reviewed-By: Jiawen Geng Reviewed-By: Daijiro Wachi Reviewed-By: Trivikram Kamat Reviewed-By: Yongsheng Zhang --- deps/npm/.mailmap | 3 +- deps/npm/.travis.yml | 5 +- deps/npm/AUTHORS | 8 + deps/npm/CHANGELOG.md | 174 ++ deps/npm/configure | 2 +- deps/npm/doc/misc/semver.md | 16 +- 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-audit.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-ci.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-doctor.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-hook.html | 2 +- deps/npm/html/doc/cli/npm-init.html | 2 +- .../npm/html/doc/cli/npm-install-ci-test.html | 2 +- deps/npm/html/doc/cli/npm-install-test.html | 2 +- deps/npm/html/doc/cli/npm-install.html | 2 +- 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-org.html | 2 +- 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-profile.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-team.html | 2 +- deps/npm/html/doc/cli/npm-test.html | 2 +- deps/npm/html/doc/cli/npm-token.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 | 2 +- deps/npm/html/doc/cli/npm-version.html | 2 +- deps/npm/html/doc/cli/npm-view.html | 2 +- deps/npm/html/doc/cli/npm-whoami.html | 2 +- deps/npm/html/doc/cli/npm.html | 6 +- 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 | 2 +- .../npm/html/doc/files/npm-package-locks.html | 2 +- .../html/doc/files/npm-shrinkwrap.json.html | 2 +- deps/npm/html/doc/files/npmrc.html | 2 +- .../npm/html/doc/files/package-lock.json.html | 2 +- deps/npm/html/doc/files/package.json.html | 2 +- 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 | 12 +- 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 | 17 +- deps/npm/lib/audit.js | 5 +- deps/npm/lib/fetch-package-metadata.js | 3 +- deps/npm/lib/install/is-only-dev.js | 5 +- deps/npm/lib/install/is-only-optional.js | 5 +- deps/npm/lib/root.js | 4 +- deps/npm/lib/search/all-package-metadata.js | 18 +- deps/npm/lib/shrinkwrap.js | 3 +- deps/npm/lib/unbuild.js | 50 +- deps/npm/lib/utils/cache-file.js | 69 + deps/npm/lib/utils/correct-mkdir.js | 125 +- deps/npm/lib/utils/error-handler.js | 10 +- deps/npm/lib/utils/git.js | 10 + deps/npm/lib/utils/metrics.js | 7 +- deps/npm/lib/xmas.js | 4 +- deps/npm/man/man1/npm-README.1 | 2 +- deps/npm/man/man1/npm-adduser.1 | 2 +- deps/npm/man/man1/npm-bugs.1 | 2 +- deps/npm/man/man1/npm-cache.1 | 4 +- deps/npm/man/man1/npm-docs.1 | 2 +- deps/npm/man/man1/npm-install.1 | 6 +- deps/npm/man/man1/npm-logout.1 | 2 +- deps/npm/man/man1/npm-ls.1 | 2 +- deps/npm/man/man1/npm-outdated.1 | 7 +- deps/npm/man/man1/npm-profile.1 | 2 +- deps/npm/man/man1/npm-run-script.1 | 4 +- deps/npm/man/man1/npm-search.1 | 2 +- deps/npm/man/man1/npm-start.1 | 2 +- deps/npm/man/man1/npm-token.1 | 35 +- deps/npm/man/man1/npm-unpublish.1 | 2 +- deps/npm/man/man1/npm-update.1 | 32 +- deps/npm/man/man1/npm.1 | 6 +- deps/npm/man/man5/npm-folders.5 | 10 +- deps/npm/man/man5/npm-global.5 | 10 +- deps/npm/man/man5/npm-package-locks.5 | 21 +- deps/npm/man/man7/npm-config.7 | 7 +- deps/npm/man/man7/npm-disputes.7 | 2 +- deps/npm/man/man7/npm-scripts.7 | 14 +- deps/npm/man/man7/semver.7 | 21 +- deps/npm/node_modules/agent-base/.travis.yml | 1 + deps/npm/node_modules/agent-base/index.d.ts | 43 + deps/npm/node_modules/agent-base/package.json | 31 +- .../npm/node_modules/agent-base/patch-core.js | 46 +- deps/npm/node_modules/agent-base/test/test.js | 39 +- .../node_modules/agentkeepalive/History.md | 22 + .../npm/node_modules/agentkeepalive/README.md | 2 +- .../node_modules/agentkeepalive/index.d.ts | 43 + .../agentkeepalive/lib/_http_agent.js | 2 +- .../node_modules/agentkeepalive/package.json | 29 +- deps/npm/node_modules/block-stream/LICENCE | 25 - deps/npm/node_modules/block-stream/README.md | 14 - .../node_modules/block-stream/block-stream.js | 209 -- .../node_modules/block-stream/package.json | 60 - deps/npm/node_modules/cacache/CHANGELOG.md | 356 ++- deps/npm/node_modules/cacache/README.md | 51 +- .../node_modules/cacache/lib/content/write.js | 6 +- .../node_modules/cacache/lib/entry-index.js | 12 +- .../cacache/lib/util/fix-owner.js | 106 +- deps/npm/node_modules/cacache/lib/util/tmp.js | 11 +- deps/npm/node_modules/cacache/lib/verify.js | 16 +- .../cacache/node_modules/glob/LICENSE | 21 - .../cacache/node_modules/glob/README.md | 373 --- .../cacache/node_modules/glob/changelog.md | 67 - .../cacache/node_modules/glob/common.js | 240 -- .../cacache/node_modules/glob/glob.js | 790 ------ .../cacache/node_modules/glob/package.json | 76 - .../cacache/node_modules/glob/sync.js | 486 ---- .../cacache/node_modules/lru-cache/index.js | 334 --- .../cacache/node_modules/yallist/LICENSE | 15 - .../cacache/node_modules/yallist/iterator.js | 8 - deps/npm/node_modules/cacache/package.json | 38 +- deps/npm/node_modules/cacache/put.js | 2 - deps/npm/node_modules/call-limit/CHANGELOG.md | 16 + .../aproba => call-limit}/LICENSE | 2 +- deps/npm/node_modules/call-limit/README.md | 14 +- .../npm/node_modules/call-limit/call-limit.js | 127 +- deps/npm/node_modules/call-limit/package.json | 44 +- deps/npm/node_modules/chownr/chownr.js | 57 +- deps/npm/node_modules/chownr/package.json | 26 +- .../node_modules/lru-cache}/LICENSE | 0 .../node_modules/lru-cache/README.md | 14 +- .../node_modules/lru-cache/index.js | 468 ++++ .../node_modules/lru-cache/package.json | 34 +- .../node_modules/yallist}/LICENSE | 0 .../node_modules/yallist/README.md | 0 .../node_modules/yallist/iterator.js | 7 + .../node_modules/yallist/package.json | 28 +- .../node_modules/yallist/yallist.js | 6 - deps/npm/node_modules/env-paths/index.js | 69 + deps/npm/node_modules/env-paths/license | 21 + deps/npm/node_modules/env-paths/package.json | 78 + deps/npm/node_modules/env-paths/readme.md | 71 + .../npm/node_modules/es6-promise/CHANGELOG.md | 4 + .../es6-promise/dist/es6-promise.auto.js | 71 +- .../es6-promise/dist/es6-promise.auto.map | 2 +- .../es6-promise/dist/es6-promise.auto.min.js | 2 +- .../es6-promise/dist/es6-promise.auto.min.map | 2 +- .../es6-promise/dist/es6-promise.js | 71 +- .../es6-promise/dist/es6-promise.map | 2 +- .../es6-promise/dist/es6-promise.min.js | 2 +- .../es6-promise/dist/es6-promise.min.map | 2 +- .../node_modules/es6-promise/es6-promise.d.ts | 8 +- .../es6-promise/lib/es6-promise/-internal.js | 59 +- .../es6-promise/lib/es6-promise/enumerator.js | 17 +- .../npm/node_modules/es6-promise/package.json | 12 +- deps/npm/node_modules/fstream/.travis.yml | 9 - deps/npm/node_modules/fstream/LICENSE | 15 - deps/npm/node_modules/fstream/README.md | 76 - .../fstream/examples/filter-pipe.js | 134 - .../npm/node_modules/fstream/examples/pipe.js | 118 - .../node_modules/fstream/examples/reader.js | 68 - .../fstream/examples/symlink-write.js | 27 - deps/npm/node_modules/fstream/fstream.js | 35 - deps/npm/node_modules/fstream/lib/abstract.js | 85 - deps/npm/node_modules/fstream/lib/collect.js | 70 - .../node_modules/fstream/lib/dir-reader.js | 252 -- .../node_modules/fstream/lib/dir-writer.js | 174 -- .../node_modules/fstream/lib/file-reader.js | 150 - .../node_modules/fstream/lib/file-writer.js | 107 - deps/npm/node_modules/fstream/lib/get-type.js | 33 - .../node_modules/fstream/lib/link-reader.js | 53 - .../node_modules/fstream/lib/link-writer.js | 95 - .../node_modules/fstream/lib/proxy-reader.js | 95 - .../node_modules/fstream/lib/proxy-writer.js | 111 - deps/npm/node_modules/fstream/lib/reader.js | 255 -- .../node_modules/fstream/lib/socket-reader.js | 36 - deps/npm/node_modules/fstream/lib/writer.js | 390 --- deps/npm/node_modules/fstream/package.json | 62 - deps/npm/node_modules/glob/LICENSE | 6 + deps/npm/node_modules/glob/README.md | 7 +- deps/npm/node_modules/glob/package.json | 29 +- .../node_modules/https-proxy-agent/index.d.ts | 22 + .../https-proxy-agent/package.json | 19 +- .../https-proxy-agent/test/test.js | 342 --- .../yallist => infer-owner}/LICENSE | 2 +- deps/npm/node_modules/infer-owner/README.md | 41 + deps/npm/node_modules/infer-owner/index.js | 71 + .../npm/node_modules/infer-owner/package.json | 63 + deps/npm/node_modules/inherits/inherits.js | 2 + .../node_modules/inherits/inherits_browser.js | 32 +- deps/npm/node_modules/inherits/package.json | 48 +- deps/npm/node_modules/libcipm/CHANGELOG.md | 18 + deps/npm/node_modules/libcipm/index.js | 4 +- deps/npm/node_modules/libcipm/package.json | 26 +- deps/npm/node_modules/libnpm/CHANGELOG.md | 18 + deps/npm/node_modules/libnpm/package.json | 44 +- .../node_modules/libnpmaccess/CHANGELOG.md | 5 + .../node_modules/aproba/CHANGELOG.md | 4 - .../libnpmaccess/node_modules/aproba/LICENSE | 13 - .../node_modules/aproba/README.md | 93 - .../libnpmaccess/node_modules/aproba/index.js | 105 - .../node_modules/aproba/package.json | 66 - .../node_modules/libnpmaccess/package.json | 29 +- .../node_modules/p-limit/index.d.ts | 29 + .../node_modules/p-limit/index.js | 5 +- .../node_modules/p-limit/package.json | 22 +- .../node_modules/p-limit/readme.md | 2 +- .../node_modules/p-try/index.d.ts | 39 + .../libnpmconfig/node_modules/p-try/index.js | 8 +- .../node_modules/p-try/package.json | 22 +- .../libnpmconfig/node_modules/p-try/readme.md | 29 +- deps/npm/node_modules/libnpmhook/CHANGELOG.md | 5 + deps/npm/node_modules/libnpmhook/package.json | 24 +- deps/npm/node_modules/libnpmorg/.travis.yml | 7 + deps/npm/node_modules/libnpmorg/CHANGELOG.md | 10 + deps/npm/node_modules/libnpmorg/appveyor.yml | 22 + deps/npm/node_modules/libnpmorg/index.js | 6 +- .../node_modules/aproba/CHANGELOG.md | 4 - .../libnpmorg/node_modules/aproba/LICENSE | 13 - .../libnpmorg/node_modules/aproba/README.md | 93 - .../libnpmorg/node_modules/aproba/index.js | 105 - .../node_modules/aproba/package.json | 66 - deps/npm/node_modules/libnpmorg/package.json | 36 +- deps/npm/node_modules/libnpmorg/test/index.js | 2 +- .../node_modules/libnpmpublish/CHANGELOG.md | 5 + .../node_modules/libnpmpublish/package.json | 24 +- .../libnpmpublish/test/publish.js | 129 + .../npm/node_modules/libnpmsearch/.travis.yml | 7 + .../node_modules/libnpmsearch/CHANGELOG.md | 16 + deps/npm/node_modules/libnpmsearch/README.md | 2 +- .../node_modules/libnpmsearch/appveyor.yml | 22 + deps/npm/node_modules/libnpmsearch/index.js | 13 +- .../node_modules/libnpmsearch/package.json | 38 +- .../node_modules/libnpmsearch/test/index.js | 36 +- deps/npm/node_modules/libnpmteam/CHANGELOG.md | 10 + deps/npm/node_modules/libnpmteam/index.js | 24 +- .../node_modules/aproba/CHANGELOG.md | 4 - .../libnpmteam/node_modules/aproba/README.md | 93 - .../libnpmteam/node_modules/aproba/index.js | 105 - .../node_modules/aproba/package.json | 66 - deps/npm/node_modules/libnpmteam/package.json | 36 +- .../npm/node_modules/libnpmteam/test/index.js | 16 +- deps/npm/node_modules/lru-cache/README.md | 14 +- deps/npm/node_modules/lru-cache/index.js | 568 ++-- deps/npm/node_modules/lru-cache/package.json | 36 +- .../make-fetch-happen/CHANGELOG.md | 21 + .../node_modules/make-fetch-happen/cache.js | 4 - .../make-fetch-happen/package.json | 34 +- .../node-gyp/.github/ISSUE_TEMPLATE.md | 7 +- deps/npm/node_modules/node-gyp/.travis.yml | 78 + deps/npm/node_modules/node-gyp/CHANGELOG.md | 85 + deps/npm/node_modules/node-gyp/README.md | 148 +- deps/npm/node_modules/node-gyp/addon.gypi | 25 +- .../npm/node_modules/node-gyp/bin/node-gyp.js | 43 +- .../node_modules/node-gyp/gyp/PRESUBMIT.py | 3 +- .../node-gyp/gyp/pylib/gyp/MSVSNew.py | 17 +- .../node-gyp/gyp/pylib/gyp/MSVSSettings.py | 42 +- .../node-gyp/gyp/pylib/gyp/MSVSUserFile.py | 4 +- .../node-gyp/gyp/pylib/gyp/MSVSUtil.py | 2 +- .../node-gyp/gyp/pylib/gyp/MSVSVersion.py | 14 +- .../node-gyp/gyp/pylib/gyp/__init__.py | 89 +- .../node-gyp/gyp/pylib/gyp/common.py | 10 +- .../node-gyp/gyp/pylib/gyp/easy_xml.py | 3 +- .../node-gyp/gyp/pylib/gyp/flock_tool.py | 2 +- .../gyp/pylib/gyp/generator/analyzer.py | 88 +- .../gyp/pylib/gyp/generator/android.py | 20 +- .../node-gyp/gyp/pylib/gyp/generator/cmake.py | 14 +- .../gyp/generator/compile_commands_json.py | 0 .../gyp/generator/dump_dependency_json.py | 3 +- .../gyp/pylib/gyp/generator/eclipse.py | 2 +- .../node-gyp/gyp/pylib/gyp/generator/gypd.py | 2 +- .../node-gyp/gyp/pylib/gyp/generator/make.py | 40 +- .../node-gyp/gyp/pylib/gyp/generator/msvs.py | 112 +- .../node-gyp/gyp/pylib/gyp/generator/ninja.py | 15 +- .../node-gyp/gyp/pylib/gyp/generator/xcode.py | 33 +- .../node-gyp/gyp/pylib/gyp/input.py | 98 +- .../node-gyp/gyp/pylib/gyp/input_test.py | 22 +- .../node-gyp/gyp/pylib/gyp/mac_tool.py | 18 +- .../node-gyp/gyp/pylib/gyp/msvs_emulation.py | 6 +- .../node-gyp/gyp/pylib/gyp/ordered_dict.py | 4 +- .../node-gyp/gyp/pylib/gyp/simple_copy.py | 10 +- .../node-gyp/gyp/pylib/gyp/win_tool.py | 14 +- .../node-gyp/gyp/pylib/gyp/xcode_emulation.py | 24 +- .../node-gyp/gyp/pylib/gyp/xcode_ninja.py | 6 +- .../node-gyp/gyp/pylib/gyp/xcodeproj_file.py | 51 +- .../node-gyp/gyp/tools/graphviz.py | 30 +- .../node-gyp/gyp/tools/pretty_gyp.py | 12 +- .../node-gyp/gyp/tools/pretty_sln.py | 50 +- .../node-gyp/gyp/tools/pretty_vcproj.py | 28 +- .../{Find-VS2017.cs => Find-VisualStudio.cs} | 88 +- deps/npm/node_modules/node-gyp/lib/build.js | 161 +- deps/npm/node_modules/node-gyp/lib/clean.js | 19 +- .../node_modules/node-gyp/lib/configure.js | 438 +-- .../node-gyp/lib/find-node-directory.js | 50 +- .../node_modules/node-gyp/lib/find-python.js | 317 +++ .../node-gyp/lib/find-visualstudio.js | 427 +++ .../node_modules/node-gyp/lib/find-vs2017.js | 46 - deps/npm/node_modules/node-gyp/lib/install.js | 259 +- deps/npm/node_modules/node-gyp/lib/list.js | 24 +- .../npm/node_modules/node-gyp/lib/node-gyp.js | 162 +- .../node-gyp/lib/process-release.js | 147 +- deps/npm/node_modules/node-gyp/lib/rebuild.js | 11 +- deps/npm/node_modules/node-gyp/lib/remove.js | 28 +- deps/npm/node_modules/node-gyp/lib/util.js | 64 + .../node-gyp/node_modules/tar/.travis.yml | 4 - .../node-gyp/node_modules/tar/LICENSE | 12 - .../node-gyp/node_modules/tar/README.md | 50 - .../node_modules/tar/examples/extracter.js | 19 - .../node_modules/tar/examples/packer.js | 24 - .../node_modules/tar/examples/reader.js | 35 - .../node_modules/tar/lib/buffer-entry.js | 30 - .../node_modules/tar/lib/entry-writer.js | 169 -- .../node-gyp/node_modules/tar/lib/entry.js | 220 -- .../tar/lib/extended-header-writer.js | 191 -- .../node_modules/tar/lib/extended-header.js | 140 - .../node-gyp/node_modules/tar/lib/extract.js | 94 - .../tar/lib/global-header-writer.js | 14 - .../node-gyp/node_modules/tar/lib/header.js | 384 --- .../node-gyp/node_modules/tar/lib/pack.js | 236 -- .../node-gyp/node_modules/tar/lib/parse.js | 281 -- .../node-gyp/node_modules/tar/package.json | 59 - .../node-gyp/node_modules/tar/tar.js | 173 -- .../tar/test/00-setup-fixtures.js | 53 - .../tar/test/cb-never-called-1.0.1.tgz | Bin 4096 -> 0 bytes .../tar/test/dir-normalization.js | 177 -- .../tar/test/dir-normalization.tar | Bin 4608 -> 0 bytes .../node_modules/tar/test/error-on-broken.js | 33 - .../node_modules/tar/test/extract-move.js | 132 - .../node-gyp/node_modules/tar/test/extract.js | 367 --- .../node_modules/tar/test/fixtures.tgz | Bin 19352 -> 0 bytes .../node-gyp/node_modules/tar/test/header.js | 183 -- .../tar/test/pack-no-proprietary.js | 886 ------ .../node-gyp/node_modules/tar/test/pack.js | 952 ------- .../node_modules/tar/test/parse-discard.js | 29 - .../node-gyp/node_modules/tar/test/parse.js | 359 --- .../node_modules/tar/test/zz-cleanup.js | 20 - deps/npm/node_modules/node-gyp/package.json | 40 +- .../node-gyp/src/win_delay_load_hook.cc | 11 +- deps/npm/node_modules/node-gyp/test/docker.sh | 54 +- .../fixtures/VS_2017_BuildTools_minimal.txt | 1 + .../fixtures/VS_2017_Community_workload.txt | 1 + .../test/fixtures/VS_2017_Unusable.txt | 1 + .../fixtures/VS_2019_BuildTools_minimal.txt | 1 + .../fixtures/VS_2019_Community_workload.txt | 1 + .../test/fixtures/VS_2019_Preview.txt | 1 + .../node-gyp/test/fixtures/ca.crt | 38 +- .../node-gyp/test/fixtures/server.crt | 36 +- .../node-gyp/test/fixtures/server.key | 55 +- .../node-gyp/test/fixtures/test-charmap.py | 18 +- .../node-gyp/test/process-exec-sync.js | 54 +- .../node-gyp/test/simple-proxy.js | 23 +- .../node_modules/node-gyp/test/test-addon.js | 85 +- .../node-gyp/test/test-configure-python.js | 34 +- .../node-gyp/test/test-download.js | 43 +- .../test/test-find-accessible-sync.js | 24 +- .../node-gyp/test/test-find-node-directory.js | 42 +- .../node-gyp/test/test-find-python.js | 372 +-- .../node-gyp/test/test-find-visualstudio.js | 646 +++++ .../node-gyp/test/test-install.js | 9 +- .../node-gyp/test/test-options.js | 14 +- .../node-gyp/test/test-process-release.js | 343 +-- .../node_modules/npm-lifecycle/CHANGELOG.md | 56 + deps/npm/node_modules/npm-lifecycle/index.js | 90 +- .../node_modules/npm-lifecycle/package.json | 40 +- .../npm/node_modules/npm-profile/package.json | 26 +- .../npm-registry-fetch/CHANGELOG.md | 19 + .../node_modules/npm-registry-fetch/config.js | 2 - .../node_modules/npm-registry-fetch/index.js | 4 +- .../npm-registry-fetch/package.json | 30 +- deps/npm/node_modules/pacote/CHANGELOG.md | 693 ++--- deps/npm/node_modules/pacote/README.md | 4 +- deps/npm/node_modules/pacote/extract.js | 21 +- .../node_modules/pacote/lib/fetchers/file.js | 2 + .../node_modules/pacote/lib/fetchers/git.js | 2 +- .../pacote/node_modules/lru-cache/LICENSE | 15 - .../pacote/node_modules/lru-cache/README.md | 166 -- .../pacote/node_modules/lru-cache/index.js | 334 --- .../node_modules/lru-cache/package.json | 67 - .../pacote/node_modules/yallist/README.md | 204 -- .../pacote/node_modules/yallist/iterator.js | 8 - .../pacote/node_modules/yallist/package.json | 62 - .../pacote/node_modules/yallist/yallist.js | 376 --- deps/npm/node_modules/pacote/package.json | 37 +- deps/npm/node_modules/query-string/index.d.ts | 267 +- deps/npm/node_modules/query-string/index.js | 39 +- .../node_modules/query-string/package.json | 29 +- deps/npm/node_modules/query-string/readme.md | 87 +- .../node_modules/readable-stream/package.json | 26 +- .../readable-stream/readable-browser.js | 2 + deps/npm/node_modules/semver/CHANGELOG.md | 39 + deps/npm/node_modules/semver/README.md | 16 +- deps/npm/node_modules/semver/bin/semver | 161 +- deps/npm/node_modules/semver/package.json | 41 +- deps/npm/node_modules/semver/semver.js | 1681 ++++++------ .../smart-buffer/.prettierrc.yaml | 5 + .../smart-buffer/build/smartbuffer.js | 1020 ++++--- .../smart-buffer/build/smartbuffer.js.map | 2 +- .../node_modules/smart-buffer/package.json | 24 +- .../smart-buffer/typings/smartbuffer.d.ts | 987 ++++--- .../node_modules/socks-proxy-agent/README.md | 3 +- .../node_modules/socks-proxy-agent/index.js | 4 +- .../node_modules/agent-base}/.travis.yml | 1 + .../node_modules/agent-base/History.md | 113 + .../node_modules/agent-base/README.md | 145 + .../node_modules/agent-base/index.js | 170 ++ .../node_modules/agent-base/package.json | 65 + .../node_modules/agent-base/patch-core.js | 37 + .../agent-base}/test/ssl-cert-snakeoil.key | 0 .../agent-base}/test/ssl-cert-snakeoil.pem | 0 .../node_modules/agent-base/test/test.js | 697 +++++ .../socks-proxy-agent/package.json | 20 +- .../node_modules/socks-proxy-agent/yarn.lock | 354 +++ deps/npm/node_modules/socks/README.md | 24 +- .../socks/build/client/socksclient.js | 26 +- .../socks/build/client/socksclient.js.map | 2 +- .../socks/build/common/constants.js.map | 2 +- .../socks/build/common/helpers.js | 3 +- .../socks/build/common/helpers.js.map | 2 +- .../socks/build/common/util.js.map | 2 +- .../examples/javascript/associateExample.md | 2 +- .../docs/examples/javascript/bindExample.md | 2 +- .../examples/javascript/connectExample.md | 2 +- .../examples/typescript/associateExample.md | 2 +- .../docs/examples/typescript/bindExample.md | 2 +- .../examples/typescript/connectExample.md | 2 +- deps/npm/node_modules/socks/package.json | 29 +- .../socks/typings/common/constants.d.ts | 9 +- .../socks/typings/common/util.d.ts | 5 +- deps/npm/node_modules/socks/yarn-error.log | 2416 ----------------- deps/npm/node_modules/socks/yarn.lock | 6 +- .../node_modules/split-on-first/index.d.ts | 29 + deps/npm/node_modules/split-on-first/index.js | 22 + deps/npm/node_modules/split-on-first/license | 9 + .../node_modules/split-on-first/package.json | 68 + .../npm/node_modules/split-on-first/readme.md | 58 + deps/npm/node_modules/worker-farm/.travis.yml | 4 +- deps/npm/node_modules/worker-farm/README.md | 5 +- deps/npm/node_modules/worker-farm/index.d.ts | 75 +- .../worker-farm/lib/child/index.js | 8 +- deps/npm/node_modules/worker-farm/lib/farm.js | 19 +- deps/npm/node_modules/worker-farm/lib/fork.js | 2 +- .../npm/node_modules/worker-farm/lib/index.js | 2 +- .../npm/node_modules/worker-farm/package.json | 32 +- .../node_modules/worker-farm/tests/index.js | 62 +- deps/npm/node_modules/yallist/iterator.js | 11 +- deps/npm/node_modules/yallist/package.json | 24 +- deps/npm/node_modules/yallist/yallist.js | 6 + deps/npm/package.json | 58 +- deps/npm/scripts/clean-old.sh | 2 +- deps/npm/scripts/dep-update | 2 +- deps/npm/scripts/dev-dep-update | 2 +- deps/npm/scripts/release.sh | 2 +- deps/npm/scripts/relocate.sh | 2 +- deps/npm/test/common-tap.js | 62 +- deps/npm/test/tap/404-parent.js | 3 - .../test/tap/404-private-registry-scoped.js | 24 +- deps/npm/test/tap/404-private-registry.js | 23 +- deps/npm/test/tap/404.js | 2 +- deps/npm/test/tap/access.js | 28 +- .../all-package-metadata-cache-stream-unit.js | 27 +- .../all-package-metadata-entry-stream-unit.js | 29 +- ...all-package-metadata-update-stream-unit.js | 29 +- .../all-package-metadata-write-stream-unit.js | 23 +- deps/npm/test/tap/all-package-metadata.js | 2 +- deps/npm/test/tap/anon-cli-metrics.js | 2 +- deps/npm/test/tap/auto-prune.js | 2 +- .../bitbucket-https-url-with-creds-package.js | 2 +- .../tap/bitbucket-https-url-with-creds.js | 2 +- .../test/tap/bitbucket-shortcut-package.js | 2 +- deps/npm/test/tap/bitbucket-shortcut.js | 2 +- deps/npm/test/tap/cache-shasum-fork.js | 4 +- deps/npm/test/tap/check-permissions.js | 9 +- deps/npm/test/tap/ci-header.js | 2 +- deps/npm/test/tap/ci-with-local-dependency.js | 82 + deps/npm/test/tap/circular-dep.js | 2 +- deps/npm/test/tap/correct-mkdir.js | 13 +- deps/npm/test/tap/debug-logs.js | 25 +- deps/npm/test/tap/dedupe-git-semver.js | 2 +- deps/npm/test/tap/doctor.js | 2 +- deps/npm/test/tap/false-name.js | 11 +- deps/npm/test/tap/fetch-package-metadata.js | 23 +- .../test/tap/gist-short-shortcut-package.js | 2 +- deps/npm/test/tap/gist-short-shortcut.js | 2 +- deps/npm/test/tap/gist-shortcut-package.js | 2 +- deps/npm/test/tap/gist-shortcut.js | 2 +- .../test/tap/git-dependency-install-link.js | 2 +- deps/npm/test/tap/git-npmignore.js | 3 +- deps/npm/test/tap/git-prepare.js | 3 +- deps/npm/test/tap/github-shortcut-package.js | 2 +- deps/npm/test/tap/github-shortcut.js | 2 +- deps/npm/test/tap/gitlab-shortcut-package.js | 2 +- deps/npm/test/tap/gitlab-shortcut.js | 2 +- deps/npm/test/tap/ignore-install-link.js | 2 +- deps/npm/test/tap/install-actions.js | 2 +- .../test/tap/install-dep-classification.js | 2 +- .../tap/install-duplicate-deps-warning.js | 2 +- .../test/tap/install-package-json-order.js | 2 +- .../npm/test/tap/install-package-lock-only.js | 2 +- .../install-scoped-with-bundled-dependency.js | 2 +- .../npm/test/tap/install-shrinkwrapped-git.js | 1 - .../tap/install-with-dev-dep-duplicate.js | 2 +- .../test/tap/invalid-dep-version-filtering.js | 2 +- deps/npm/test/tap/lockfile-http-deps.js | 2 +- deps/npm/test/tap/ls-peer.js | 2 +- .../optional-metadep-rollback-collision.js | 2 +- deps/npm/test/tap/outdated-git.js | 2 +- deps/npm/test/tap/outdated-latest.js | 2 +- deps/npm/test/tap/outdated-long.js | 17 +- deps/npm/test/tap/outdated-remote.js | 8 +- deps/npm/test/tap/outdated-symlink.js | 2 +- deps/npm/test/tap/outdated.js | 13 +- deps/npm/test/tap/owner.js | 12 +- deps/npm/test/tap/pack-scoped.js | 2 +- deps/npm/test/tap/pack.js | 2 +- deps/npm/test/tap/peer-deps.js | 2 +- deps/npm/test/tap/prepare.js | 2 +- deps/npm/test/tap/prepublish-only.js | 2 +- deps/npm/test/tap/prepublish.js | 2 +- deps/npm/test/tap/progress-config.js | 7 +- .../test/tap/prune-with-dev-dep-duplicate.js | 13 +- deps/npm/test/tap/prune-with-only-dev-deps.js | 12 +- deps/npm/test/tap/prune.js | 14 +- deps/npm/test/tap/publish-access-scoped.js | 68 +- deps/npm/test/tap/publish-access-unscoped.js | 68 +- deps/npm/test/tap/publish-config.js | 4 +- .../test/tap/publish-invalid-semver-tag.js | 10 +- deps/npm/test/tap/publish-scoped.js | 14 +- deps/npm/test/tap/publish.js | 23 +- deps/npm/test/tap/retry-on-stale-cache.js | 3 +- deps/npm/test/tap/run-script.js | 2 +- deps/npm/test/tap/save-optional.js | 2 +- deps/npm/test/tap/scope-header.js | 2 +- .../test/tap/scripts-whitespace-windows.js | 2 +- .../npm/test/tap/search.all-package-search.js | 29 +- deps/npm/test/tap/search.js | 54 +- deps/npm/test/tap/shared-linked.js | 3 +- deps/npm/test/tap/shrinkwrap-default-dev.js | 2 +- .../npm/test/tap/shrinkwrap-dev-dependency.js | 2 +- deps/npm/test/tap/shrinkwrap-lifecycle-cwd.js | 2 +- .../test/tap/shrinkwrap-local-dependency.js | 2 +- .../tap/shrinkwrap-optional-dependency.js | 2 +- .../test/tap/shrinkwrap-optional-platform.js | 2 +- .../test/tap/shrinkwrap-optional-property.js | 2 +- .../tap/shrinkwrap-prod-dependency-also.js | 2 +- .../test/tap/shrinkwrap-prod-dependency.js | 2 +- .../tap/shrinkwrap-shared-dev-dependency.js | 2 +- deps/npm/test/tap/sorted-package-json.js | 60 +- deps/npm/test/tap/spec-local-specifiers.js | 6 +- .../splat-with-only-prerelease-to-latest.js | 13 +- deps/npm/test/tap/tag-version-prefix.js | 19 - deps/npm/test/tap/tagged-version-matching.js | 2 +- deps/npm/test/tap/unpack-foreign-tarball.js | 2 +- deps/npm/test/tap/update-examples.js | 11 +- deps/npm/test/tap/update-symlink.js | 2 +- deps/npm/test/tap/upgrade-lifecycles.js | 2 +- .../test/tap/version-allow-same-version.js | 2 +- .../test/tap/version-consistent-newlines.js | 2 +- deps/npm/test/tap/version-from-git.js | 19 +- deps/npm/test/tap/version-git-not-clean.js | 22 +- deps/npm/test/tap/version-lifecycle.js | 12 +- deps/npm/test/tap/version-message-config.js | 18 - deps/npm/test/tap/version-no-git.js | 13 +- deps/npm/test/tap/version-no-package.js | 22 +- deps/npm/test/tap/version-no-tags.js | 15 +- deps/npm/test/tap/version-prerelease-id.js | 24 - .../tap/version-sub-directory-shrinkwrap.js | 17 +- deps/npm/test/tap/version-sub-directory.js | 2 +- .../npm/test/tap/version-update-shrinkwrap.js | 21 +- deps/npm/test/tap/zz-cleanup.js | 8 - 603 files changed, 12013 insertions(+), 22585 deletions(-) create mode 100644 deps/npm/lib/utils/cache-file.js create mode 100644 deps/npm/node_modules/agent-base/index.d.ts create mode 100644 deps/npm/node_modules/agentkeepalive/index.d.ts delete mode 100644 deps/npm/node_modules/block-stream/LICENCE delete mode 100644 deps/npm/node_modules/block-stream/README.md delete mode 100644 deps/npm/node_modules/block-stream/block-stream.js delete mode 100644 deps/npm/node_modules/block-stream/package.json delete mode 100644 deps/npm/node_modules/cacache/node_modules/glob/LICENSE delete mode 100644 deps/npm/node_modules/cacache/node_modules/glob/README.md delete mode 100644 deps/npm/node_modules/cacache/node_modules/glob/changelog.md delete mode 100644 deps/npm/node_modules/cacache/node_modules/glob/common.js delete mode 100644 deps/npm/node_modules/cacache/node_modules/glob/glob.js delete mode 100644 deps/npm/node_modules/cacache/node_modules/glob/package.json delete mode 100644 deps/npm/node_modules/cacache/node_modules/glob/sync.js delete mode 100644 deps/npm/node_modules/cacache/node_modules/lru-cache/index.js delete mode 100644 deps/npm/node_modules/cacache/node_modules/yallist/LICENSE delete mode 100644 deps/npm/node_modules/cacache/node_modules/yallist/iterator.js create mode 100644 deps/npm/node_modules/call-limit/CHANGELOG.md rename deps/npm/node_modules/{libnpmteam/node_modules/aproba => call-limit}/LICENSE (92%) rename deps/npm/node_modules/{block-stream => cross-spawn/node_modules/lru-cache}/LICENSE (100%) rename deps/npm/node_modules/{cacache => cross-spawn}/node_modules/lru-cache/README.md (89%) create mode 100644 deps/npm/node_modules/cross-spawn/node_modules/lru-cache/index.js rename deps/npm/node_modules/{cacache => cross-spawn}/node_modules/lru-cache/package.json (63%) rename deps/npm/node_modules/{cacache/node_modules/lru-cache => cross-spawn/node_modules/yallist}/LICENSE (100%) rename deps/npm/node_modules/{cacache => cross-spawn}/node_modules/yallist/README.md (100%) create mode 100644 deps/npm/node_modules/cross-spawn/node_modules/yallist/iterator.js rename deps/npm/node_modules/{cacache => cross-spawn}/node_modules/yallist/package.json (63%) rename deps/npm/node_modules/{cacache => cross-spawn}/node_modules/yallist/yallist.js (98%) create mode 100644 deps/npm/node_modules/env-paths/index.js create mode 100644 deps/npm/node_modules/env-paths/license create mode 100644 deps/npm/node_modules/env-paths/package.json create mode 100644 deps/npm/node_modules/env-paths/readme.md delete mode 100644 deps/npm/node_modules/fstream/.travis.yml delete mode 100644 deps/npm/node_modules/fstream/LICENSE delete mode 100644 deps/npm/node_modules/fstream/README.md delete mode 100644 deps/npm/node_modules/fstream/examples/filter-pipe.js delete mode 100644 deps/npm/node_modules/fstream/examples/pipe.js delete mode 100644 deps/npm/node_modules/fstream/examples/reader.js delete mode 100644 deps/npm/node_modules/fstream/examples/symlink-write.js delete mode 100644 deps/npm/node_modules/fstream/fstream.js delete mode 100644 deps/npm/node_modules/fstream/lib/abstract.js delete mode 100644 deps/npm/node_modules/fstream/lib/collect.js delete mode 100644 deps/npm/node_modules/fstream/lib/dir-reader.js delete mode 100644 deps/npm/node_modules/fstream/lib/dir-writer.js delete mode 100644 deps/npm/node_modules/fstream/lib/file-reader.js delete mode 100644 deps/npm/node_modules/fstream/lib/file-writer.js delete mode 100644 deps/npm/node_modules/fstream/lib/get-type.js delete mode 100644 deps/npm/node_modules/fstream/lib/link-reader.js delete mode 100644 deps/npm/node_modules/fstream/lib/link-writer.js delete mode 100644 deps/npm/node_modules/fstream/lib/proxy-reader.js delete mode 100644 deps/npm/node_modules/fstream/lib/proxy-writer.js delete mode 100644 deps/npm/node_modules/fstream/lib/reader.js delete mode 100644 deps/npm/node_modules/fstream/lib/socket-reader.js delete mode 100644 deps/npm/node_modules/fstream/lib/writer.js delete mode 100644 deps/npm/node_modules/fstream/package.json create mode 100644 deps/npm/node_modules/https-proxy-agent/index.d.ts delete mode 100644 deps/npm/node_modules/https-proxy-agent/test/test.js rename deps/npm/node_modules/{pacote/node_modules/yallist => infer-owner}/LICENSE (93%) create mode 100644 deps/npm/node_modules/infer-owner/README.md create mode 100644 deps/npm/node_modules/infer-owner/index.js create mode 100644 deps/npm/node_modules/infer-owner/package.json delete mode 100644 deps/npm/node_modules/libnpmaccess/node_modules/aproba/CHANGELOG.md delete mode 100644 deps/npm/node_modules/libnpmaccess/node_modules/aproba/LICENSE delete mode 100644 deps/npm/node_modules/libnpmaccess/node_modules/aproba/README.md delete mode 100644 deps/npm/node_modules/libnpmaccess/node_modules/aproba/index.js delete mode 100644 deps/npm/node_modules/libnpmaccess/node_modules/aproba/package.json create mode 100644 deps/npm/node_modules/libnpmconfig/node_modules/p-limit/index.d.ts create mode 100644 deps/npm/node_modules/libnpmconfig/node_modules/p-try/index.d.ts create mode 100644 deps/npm/node_modules/libnpmorg/.travis.yml create mode 100644 deps/npm/node_modules/libnpmorg/appveyor.yml delete mode 100644 deps/npm/node_modules/libnpmorg/node_modules/aproba/CHANGELOG.md delete mode 100644 deps/npm/node_modules/libnpmorg/node_modules/aproba/LICENSE delete mode 100644 deps/npm/node_modules/libnpmorg/node_modules/aproba/README.md delete mode 100644 deps/npm/node_modules/libnpmorg/node_modules/aproba/index.js delete mode 100644 deps/npm/node_modules/libnpmorg/node_modules/aproba/package.json create mode 100644 deps/npm/node_modules/libnpmsearch/.travis.yml create mode 100644 deps/npm/node_modules/libnpmsearch/appveyor.yml delete mode 100644 deps/npm/node_modules/libnpmteam/node_modules/aproba/CHANGELOG.md delete mode 100644 deps/npm/node_modules/libnpmteam/node_modules/aproba/README.md delete mode 100644 deps/npm/node_modules/libnpmteam/node_modules/aproba/index.js delete mode 100644 deps/npm/node_modules/libnpmteam/node_modules/aproba/package.json create mode 100644 deps/npm/node_modules/node-gyp/.travis.yml rename deps/npm/node_modules/node-gyp/{tools => }/gyp/pylib/gyp/generator/compile_commands_json.py (100%) rename deps/npm/node_modules/node-gyp/lib/{Find-VS2017.cs => Find-VisualStudio.cs} (64%) create mode 100644 deps/npm/node_modules/node-gyp/lib/find-python.js create mode 100644 deps/npm/node_modules/node-gyp/lib/find-visualstudio.js delete mode 100644 deps/npm/node_modules/node-gyp/lib/find-vs2017.js create mode 100644 deps/npm/node_modules/node-gyp/lib/util.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/.travis.yml delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/LICENSE delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/README.md delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/examples/extracter.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/examples/packer.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/examples/reader.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/buffer-entry.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry-writer.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header-writer.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/extract.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/global-header-writer.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/header.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/pack.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/package.json delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/tar.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/00-setup-fixtures.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/cb-never-called-1.0.1.tgz delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/dir-normalization.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/dir-normalization.tar delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/error-on-broken.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/extract-move.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/extract.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/fixtures.tgz delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/header.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/pack-no-proprietary.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/pack.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/parse-discard.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/parse.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/zz-cleanup.js create mode 100644 deps/npm/node_modules/node-gyp/test/fixtures/VS_2017_BuildTools_minimal.txt create mode 100644 deps/npm/node_modules/node-gyp/test/fixtures/VS_2017_Community_workload.txt create mode 100644 deps/npm/node_modules/node-gyp/test/fixtures/VS_2017_Unusable.txt create mode 100644 deps/npm/node_modules/node-gyp/test/fixtures/VS_2019_BuildTools_minimal.txt create mode 100644 deps/npm/node_modules/node-gyp/test/fixtures/VS_2019_Community_workload.txt create mode 100644 deps/npm/node_modules/node-gyp/test/fixtures/VS_2019_Preview.txt create mode 100644 deps/npm/node_modules/node-gyp/test/test-find-visualstudio.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/lru-cache/LICENSE delete mode 100644 deps/npm/node_modules/pacote/node_modules/lru-cache/README.md delete mode 100644 deps/npm/node_modules/pacote/node_modules/lru-cache/index.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/lru-cache/package.json delete mode 100644 deps/npm/node_modules/pacote/node_modules/yallist/README.md delete mode 100644 deps/npm/node_modules/pacote/node_modules/yallist/iterator.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/yallist/package.json delete mode 100644 deps/npm/node_modules/pacote/node_modules/yallist/yallist.js create mode 100644 deps/npm/node_modules/semver/CHANGELOG.md create mode 100644 deps/npm/node_modules/smart-buffer/.prettierrc.yaml rename deps/npm/node_modules/{https-proxy-agent => socks-proxy-agent/node_modules/agent-base}/.travis.yml (97%) create mode 100644 deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/History.md create mode 100644 deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/README.md create mode 100644 deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/index.js create mode 100644 deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/package.json create mode 100644 deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js rename deps/npm/node_modules/{https-proxy-agent => socks-proxy-agent/node_modules/agent-base}/test/ssl-cert-snakeoil.key (100%) rename deps/npm/node_modules/{https-proxy-agent => socks-proxy-agent/node_modules/agent-base}/test/ssl-cert-snakeoil.pem (100%) create mode 100644 deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js create mode 100644 deps/npm/node_modules/socks-proxy-agent/yarn.lock delete mode 100644 deps/npm/node_modules/socks/yarn-error.log create mode 100644 deps/npm/node_modules/split-on-first/index.d.ts create mode 100644 deps/npm/node_modules/split-on-first/index.js create mode 100644 deps/npm/node_modules/split-on-first/license create mode 100644 deps/npm/node_modules/split-on-first/package.json create mode 100644 deps/npm/node_modules/split-on-first/readme.md create mode 100644 deps/npm/test/tap/ci-with-local-dependency.js delete mode 100644 deps/npm/test/tap/zz-cleanup.js diff --git a/deps/npm/.mailmap b/deps/npm/.mailmap index 42c32d0ab44192..a14e7b8287bc8e 100644 --- a/deps/npm/.mailmap +++ b/deps/npm/.mailmap @@ -28,7 +28,8 @@ Geoff Flarity Gregers Gram Rygg Ifeanyi Oraelosi Isaac Z. Schlueter -Isaac Z. Schlueter isaacs +Isaac Z. Schlueter +isaacs Jake Verbaten James Sanders James Treworgy diff --git a/deps/npm/.travis.yml b/deps/npm/.travis.yml index 07bae65e6640fc..ef949a0d454d96 100644 --- a/deps/npm/.travis.yml +++ b/deps/npm/.travis.yml @@ -1,4 +1,4 @@ -sudo: false +sudo: true # need to declare the language as well as the matrix below language: node_js # having top-level `env:` adds a phantom build @@ -12,7 +12,8 @@ matrix: # only gather coverage info for LTS env: DEPLOY_VERSION=testing COVERALLS_REPO_TOKEN="$COVERALLS_OPTIONAL_TOKEN" script: - - "node . run tap-cover -- \"test/tap/*.js\"" + # run the sudo tests, with coverage enabled + - "sudo PATH=$PATH $(which node) . run tap -- \"test/tap/*.js\" --coverage" - "unset COVERALLS_REPO_TOKEN ; node . run tap -- \"test/broken-under-*/*.js\"" # previous LTS is next most important - node_js: "10" diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index 551e9340bd257a..e50da41e47212e 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -1,5 +1,6 @@ # Authors sorted by whether or not they're me Isaac Z. Schlueter +isaacs Steve Steiner Mikeal Rogers Aaron Blohowiak @@ -641,3 +642,10 @@ COURIER, CALEB [AG/1000] CalebCourier Florian Keller Sreeram Jayan +--get +raywu0123 +isaacs +Iván Reinoso García +Roy Marples +Robert James Gabriel +John Firebaugh diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index 58b2f49bd9dad5..7cf53e92f553a5 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,3 +1,177 @@ +## v6.10.2 (2019-07-23): + +tl;dr - Fixes several issues with the cache when npm is run as `sudo` on +Unix systems. + +### TESTING + +* [`2a78b96f8`](https://github.com/npm/cli/commit/2a78b96f830bbd834720ccc9eacccc54915ae6f7) + check test cache for root-owned files + ([@isaacs](https://github.com/isaacs)) +* [`108646ebc`](https://github.com/npm/cli/commit/108646ebc12f3eeebaa0a45884c45991a45e57e4) + run sudo tests on Travis-CI ([@isaacs](https://github.com/isaacs)) +* [`cf984e946`](https://github.com/npm/cli/commit/cf984e946f453cbea2fcc7a59608de3f24ab74c3) + set --no-esm tap flag ([@isaacs](https://github.com/isaacs)) +* [`8e0a3100d`](https://github.com/npm/cli/commit/8e0a3100dffb3965bb3dc4240e82980dfadf2f3c) + add script to run tests and leave fixtures for inspection and debugging + ([@isaacs](https://github.com/isaacs)) + +### BUGFIXES + +* [`25f4f73f6`](https://github.com/npm/cli/commit/25f4f73f6dc9744757787c82351120cd1baee5f8) + add a util for writing arbitrary files to cache This prevents metrics + timing and debug logs from becoming root-owned. + ([@isaacs](https://github.com/isaacs)) +* [`2c61ce65d`](https://github.com/npm/cli/commit/2c61ce65d6b67100fdf3fcb9729055b669cb1a1d) + infer cache owner from parent dir in `correct-mkdir` util + ([@isaacs](https://github.com/isaacs)) +* [`235e5d6df`](https://github.com/npm/cli/commit/235e5d6df6f427585ec58425f1f3339d08f39d8a) + ensure correct owner on cached all-packages metadata + ([@isaacs](https://github.com/isaacs)) +* [`e2d377bb6`](https://github.com/npm/cli/commit/e2d377bb6419d8a3c1d80a73dba46062b4dad336) + [npm.community#8540](https://npm.community/t/npm-audit-fails-with-child-requires-fails-because-requires-must-be-an-object/8540) + audit: report server error on failure + ([@isaacs](https://github.com/isaacs)) +* [`52576a39e`](https://github.com/npm/cli/commit/52576a39ed75d94c46bb2c482fd38d2c6ea61c56) + [#216](https://github.com/npm/cli/pull/216) + [npm.community#5385](https://npm.community/t/6-8-0-npm-ci-fails-with-local-dependency/5385) + [npm.community#6076](https://npm.community/t/npm-ci-fail-to-local-packages/6076) + Fix `npm ci` with `file:` dependencies. Partially reverts + [#40](https://github.com/npm/cli/pull/40)/[#86](https://github.com/npm/cli/pull/86), + recording dependencies of linked deps in order for `npm ci` to work. + ([@jfirebaugh](https://github.com/jfirebaugh)) + +### DEPENDENCIES + +* [`0fefdee13`](https://github.com/npm/cli/commit/0fefdee130fd7d0dbb240fb9ecb50a793fbf3d29) + `cacache@12.0.2` ([@isaacs](https://github.com/isaacs)) + * infer uid/gid instead of accepting as options, preventing the + overwhelming majority of cases where root-owned files end up in the + cache folder. + ([ac84d14](https://github.com/npm/cacache/commit/ac84d14)) + ([@isaacs](https://github.com/isaacs)) + ([#1](https://github.com/npm/cacache/pull/1)) + * **i18n:** add another error message + ([676cb32](https://github.com/npm/cacache/commit/676cb32)) + ([@zkat](https://github.com/zkat)) +* [`e1d87a392`](https://github.com/npm/cli/commit/e1d87a392371a070b0788ab7bfc62be18b21e9ad) + `pacote@9.5.4` ([@isaacs](https://github.com/isaacs)) + * git: ensure stream failures are reported + ([7f07b5d](https://github.com/npm/pacote/commit/7f07b5d)) + [#1](https://github.com/npm/pacote/issues/1) + ([@lddubeau](https://github.com/lddubeau)) +* [`3f035bf09`](https://github.com/npm/cli/commit/3f035bf098e2feea76574cec18b04812659aa16d) + `infer-owner@1.0.4` ([@isaacs](https://github.com/isaacs)) +* [`ba3283112`](https://github.com/npm/cli/commit/ba32831126591d2f6f48e31a4a2329b533b1ff19) + `npm-registry-fetch@4.0.0` ([@isaacs](https://github.com/isaacs)) +* [`ee90c334d`](https://github.com/npm/cli/commit/ee90c334d271383d0325af42f20f80f34cb61f07) + `libnpm@3.0.1` ([@isaacs](https://github.com/isaacs)) +* [`1e480c384`](https://github.com/npm/cli/commit/1e480c38416982ae28b5cdd48c698ca59d3c0395) + `libnpmaccess@3.0.2` ([@isaacs](https://github.com/isaacs)) +* [`7662ee850`](https://github.com/npm/cli/commit/7662ee850220c71ecaec639adbc7715286f0d28b) + `libnpmhook@5.0.3` ([@isaacs](https://github.com/isaacs)) +* [`1357fadc6`](https://github.com/npm/cli/commit/1357fadc613d0bfeb40f9a8f3ecace2face2fe2c) + `libnpmorg@1.0.1` ([@isaacs](https://github.com/isaacs)) +* [`a621b5cb6`](https://github.com/npm/cli/commit/a621b5cb6c881f95a11af86a8051754a67ae017c) + `libnpmsearch@2.0.2` ([@isaacs](https://github.com/isaacs)) +* [`560cd31dd`](https://github.com/npm/cli/commit/560cd31dd51b6aa2e396ccdd7289fab0a50b5608) + `libnpmteam@1.0.2` ([@isaacs](https://github.com/isaacs)) +* [`de7ae0867`](https://github.com/npm/cli/commit/de7ae0867d4c0180edc283457ce0b4e8e5eee554) + `npm-profile@4.0.2` ([@isaacs](https://github.com/isaacs)) +* [`e95da463c`](https://github.com/npm/cli/commit/e95da463cb7a325457ef411a569d7ef4bf76901d) + `libnpm@3.0.1` ([@isaacs](https://github.com/isaacs)) +* [`554b641d4`](https://github.com/npm/cli/commit/554b641d49d135ae8d137e83aa288897c32dacc6) + `npm-registry-fetch@4.0.0` ([@isaacs](https://github.com/isaacs)) +* [`06772f34a`](https://github.com/npm/cli/commit/06772f34ab851440dcd78574736936c674a84aed) + `node-gyp@5.0.3` ([@isaacs](https://github.com/isaacs)) +* [`85358db80`](https://github.com/npm/cli/commit/85358db80d6ccb5f7bc9a0b4d558ac6dd2468394) + `npm-lifecycle@3.1.2` ([@isaacs](https://github.com/isaacs)) + * [`051cf20`](https://github.com/npm/npm-lifecycle/commit/051cf20072a01839c17920d2e841756251c4f924) + [#26](https://github.com/npm/npm-lifecycle/pull/26) fix switches for + alternative shells on Windows + ([@gucong3000](https://github.com/gucong3000)) + * [`3aaf954`](https://github.com/npm/npm-lifecycle/commit/3aaf95435965e8f7acfd955582cf85237afd2c9b) + [#25](https://github.com/npm/npm-lifecycle/pull/25) set only one PATH + env variable for child process on Windows + ([@zkochan](https://github.com/zkochan)) + * [`ea18ed2`](https://github.com/npm/npm-lifecycle/commit/ea18ed2b754ca7f11998cad70d88e9004c5bef4a) + [#36](https://github.com/npm/npm-lifecycle/pull/36) + [#11](https://github.com/npm/npm-lifecycle/issue/11) + [#18](https://github.com/npm/npm-lifecycle/issue/18) remove + procInterrupt listener on SIGINT in procError + ([@mattshin](https://github.com/mattshin)) + * [`5523951`](https://github.com/npm/npm-lifecycle/commit/55239519c57b82521605622e6c71640a31ed4586) + [#29](https://github.com/npm/npm-lifecycle/issue/29) + [#30](https://github.com/npm/npm-lifecycle/pull/30) Use platform + specific path casing if present + ([@mattezell](https://github.com/mattezell)) + +## v6.10.1 (2019-07-11): + +### BUGFIXES + +* [`3cbd57712`](https://github.com/npm/cli/commit/3cbd577120a9da6e51bb8b13534d1bf71ea5712c) + fix(git): strip GIT environs when running git + ([@isaacs](https://github.com/isaacs)) +* [`a81a8c4c4`](https://github.com/npm/cli/commit/a81a8c4c466f510215a51cef1bb08544d11844fe) + [#206](https://github.com/npm/cli/pull/206) improve isOnly(Dev,Optional) + ([@larsgw](https://github.com/larsgw)) +* [`172f9aca6`](https://github.com/npm/cli/commit/172f9aca67a66ee303c17f90a994cd52fc66552a) + [#179](https://github.com/npm/cli/pull/179) fix-xmas-underline + ([@raywu0123](https://github.com/raywu0123)) +* [`f52673fc7`](https://github.com/npm/cli/commit/f52673fc7284e58af8c04533e82b76bf7add72cf) + [#212](https://github.com/npm/cli/pull/212) build: use `/usr/bin/env` to + load bash ([@rsmarples](https://github.com/rsmarples)) + +### DEPENDENCIES + +* [`ef4445ad3`](https://github.com/npm/cli/commit/ef4445ad34a53b5639499c8e3c9752f62ee6f37c) + [#208](https://github.com/npm/cli/pull/208) `node-gyp@5.0.2` + ([@irega](https://github.com/irega)) +* [`c0d611356`](https://github.com/npm/cli/commit/c0d611356f7b23077e97574b01c8886e544db425) + `npm-lifecycle@3.0.0` ([@isaacs](https://github.com/isaacs)) +* [`7716ba972`](https://github.com/npm/cli/commit/7716ba9720270d5b780755a5bb1ce79702067f1f) + `libcipm@4.0.0` ([@isaacs](https://github.com/isaacs)) +* [`42d22e837`](https://github.com/npm/cli/commit/42d22e8374c7d303d94e405d7385d94dd2558814) + `libnpm@3.0.0` ([@isaacs](https://github.com/isaacs)) +* [`a2ea7f9ff`](https://github.com/npm/cli/commit/a2ea7f9ff64ae743d05fdbf7d46fb9afafa8aa6f) + `semver@5.7.0` ([@isaacs](https://github.com/isaacs)) +* [`429226a5e`](https://github.com/npm/cli/commit/429226a5e992cd907d4f19bd738037007cf78c1f) + `lru-cache@5.1.1` ([@isaacs](https://github.com/isaacs)) +* [`175670ea6`](https://github.com/npm/cli/commit/175670ea65cca03f8b2e957df3dd4b8b0efd0e1f) + `npm-registry-fetch@3.9.1`: ([@isaacs](https://github.com/isaacs)) +* [`0d0517f7f`](https://github.com/npm/cli/commit/0d0517f7f8c902b5064ac18fb4015b31750ad2b2) + `call-limit@1.1.1` ([@isaacs](https://github.com/isaacs)) +* [`741400429`](https://github.com/npm/cli/commit/74140042917ea241062a812ceb65c5423c2bafa9) + `glob@7.1.4` ([@isaacs](https://github.com/isaacs)) +* [`bddd60e30`](https://github.com/npm/cli/commit/bddd60e302283a4a70d35f8f742e42bd13f4dabf) + `inherits@2.0.4` ([@isaacs](https://github.com/isaacs)) +* [`4acf03fd1`](https://github.com/npm/cli/commit/4acf03fd140ed3ddb2dcf3fdc9756bc3f5a8bcbb) + `libnpmsearch@2.0.1` ([@isaacs](https://github.com/isaacs)) +* [`c2bd17291`](https://github.com/npm/cli/commit/c2bd17291a86bea7ced2fbd07d66d013bd7a7560) + `marked@0.6.3` ([@isaacs](https://github.com/isaacs)) +* [`7f0221bb1`](https://github.com/npm/cli/commit/7f0221bb1bb41ffc933c785940e227feae38c80c) + `marked-man@0.6.0` ([@isaacs](https://github.com/isaacs)) +* [`f458fe7dd`](https://github.com/npm/cli/commit/f458fe7dd3bebddf603aaae183a424ea8aaa018f) + `npm-lifecycle@2.1.1` ([@isaacs](https://github.com/isaacs)) +* [`009752978`](https://github.com/npm/cli/commit/0097529780269c28444f1efa0d7c131d47a933eb) + `node-gyp@4.0.0` ([@isaacs](https://github.com/isaacs)) +* [`0fa2bb438`](https://github.com/npm/cli/commit/0fa2bb4386379d6e9d8c95db08662ec0529964f9) + `query-string@6.8.1` ([@isaacs](https://github.com/isaacs)) +* [`b86450929`](https://github.com/npm/cli/commit/b86450929796950a1fe4b1f9b02b1634c812f3bb) + `tar-stream@2.1.0` ([@isaacs](https://github.com/isaacs)) +* [`25db00fe9`](https://github.com/npm/cli/commit/25db00fe953453198adb9e1bd71d1bc2a9f04aaa) + `worker-farm@1.7.0` ([@isaacs](https://github.com/isaacs)) +* [`8dfbe8610`](https://github.com/npm/cli/commit/8dfbe861085dfa8fa56bb504b4a00fba04c34f9d) + `readable-stream@3.4.0` ([@isaacs](https://github.com/isaacs)) +* [`f6164d5dd`](https://github.com/npm/cli/commit/f6164d5ddd072eabdf2237f1694a31efd746eb1d) + [isaacs/chownr#21](https://github.com/isaacs/chownr/pull/21) + [isaacs/chownr#20](https://github.com/isaacs/chownr/issues/20) + [npm.community#7901](https://npm.community/t/7901/) + [npm.community#8203](https://npm.community/t/8203) `chownr@1.1.2` This + fixes an EISDIR error from cacache on Darwin in Node versions prior to + 10.6. ([@isaacs](https://github.com/isaacs)) + ## v6.10.0 (2019-07-03): ### FEATURES diff --git a/deps/npm/configure b/deps/npm/configure index b13c8d0d73e223..f177f43a3a4da2 100755 --- a/deps/npm/configure +++ b/deps/npm/configure @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # set configurations that will be "sticky" on this system, # surviving npm self-updates. diff --git a/deps/npm/doc/misc/semver.md b/deps/npm/doc/misc/semver.md index 2c856d80094273..1a93f022b332bd 100644 --- a/deps/npm/doc/misc/semver.md +++ b/deps/npm/doc/misc/semver.md @@ -20,6 +20,7 @@ semver.clean(' =v1.2.3 ') // '1.2.3' semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true semver.gt('1.2.3', '9.8.7') // false semver.lt('1.2.3', '9.8.7') // true +semver.minVersion('>=1.0.0') // '1.0.0' semver.valid(semver.coerce('v2')) // '2.0.0' semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' ``` @@ -29,7 +30,7 @@ As a command-line utility: ``` $ semver -h -A JavaScript implementation of the http://semver.org/ specification +A JavaScript implementation of the https://semver.org/ specification Copyright Isaac Z. Schlueter Usage: semver [options] [ [...]] @@ -71,7 +72,7 @@ multiple versions to the utility will just sort them. ## Versions A "version" is described by the `v2.0.0` specification found at -. +. A leading `"="` or `"v"` character is stripped off and ignored. @@ -137,6 +138,13 @@ the user is indicating that they are aware of the risk. However, it is still not appropriate to assume that they have opted into taking a similar risk on the *next* set of prerelease versions. +Note that this behavior can be suppressed (treating all prerelease +versions as if they were normal versions, for the purpose of range +matching) by setting the `includePrerelease` flag on the options +object to any +[functions](https://github.com/npm/node-semver#functions) that do +range matching. + #### Prerelease Identifiers The method `.inc` takes an additional `identifier` string argument that @@ -325,6 +333,8 @@ strings that they parse. * `patch(v)`: Return the patch version number. * `intersects(r1, r2, loose)`: Return true if the two supplied ranges or comparators intersect. +* `parse(v)`: Attempt to parse a string as a semantic version, returning either + a `SemVer` object or `null`. ### Comparison @@ -361,6 +371,8 @@ strings that they parse. that satisfies the range, or `null` if none of them do. * `minSatisfying(versions, range)`: Return the lowest version in the list that satisfies the range, or `null` if none of them do. +* `minVersion(range)`: Return the lowest version that can possibly match + the given range. * `gtr(version, range)`: Return `true` if version is greater than all the versions possible in the range. * `ltr(version, range)`: Return `true` if version is less than all the diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html index 47012985aaa8ac..a56103d49810c7 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -118,5 +118,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-access.html b/deps/npm/html/doc/cli/npm-access.html index 910133c0562663..f2678499369982 100644 --- a/deps/npm/html/doc/cli/npm-access.html +++ b/deps/npm/html/doc/cli/npm-access.html @@ -93,5 +93,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html index d2cbb013b19152..f8552fcf10fdc2 100644 --- a/deps/npm/html/doc/cli/npm-adduser.html +++ b/deps/npm/html/doc/cli/npm-adduser.html @@ -78,5 +78,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-audit.html b/deps/npm/html/doc/cli/npm-audit.html index 158c90771923db..c62dfa063dd8ec 100644 --- a/deps/npm/html/doc/cli/npm-audit.html +++ b/deps/npm/html/doc/cli/npm-audit.html @@ -94,4 +94,4 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html index 95320dce00ee3f..11b94115ed464b 100644 --- a/deps/npm/html/doc/cli/npm-bin.html +++ b/deps/npm/html/doc/cli/npm-bin.html @@ -34,5 +34,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html index 03574ee5536809..70700c2cfc2502 100644 --- a/deps/npm/html/doc/cli/npm-bugs.html +++ b/deps/npm/html/doc/cli/npm-bugs.html @@ -54,5 +54,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html index 13179c5a618e1c..99e83a7cef0da5 100644 --- a/deps/npm/html/doc/cli/npm-build.html +++ b/deps/npm/html/doc/cli/npm-build.html @@ -38,5 +38,5 @@

DESCRIPTION

       - + diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html index b5c2b9e300fee0..17d8e38782ecbf 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 4771ce622d8ede..c41c216bac6c46 100644 --- a/deps/npm/html/doc/cli/npm-cache.html +++ b/deps/npm/html/doc/cli/npm-cache.html @@ -88,5 +88,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-ci.html b/deps/npm/html/doc/cli/npm-ci.html index 991420224ef2cf..ea210944243dd5 100644 --- a/deps/npm/html/doc/cli/npm-ci.html +++ b/deps/npm/html/doc/cli/npm-ci.html @@ -58,4 +58,4 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html index 83ac99c0d971ba..3e50ee74bc3bc9 100644 --- a/deps/npm/html/doc/cli/npm-completion.html +++ b/deps/npm/html/doc/cli/npm-completion.html @@ -42,5 +42,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html index 6f0dd2fb14eedd..00ed8836579202 100644 --- a/deps/npm/html/doc/cli/npm-config.html +++ b/deps/npm/html/doc/cli/npm-config.html @@ -62,5 +62,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html index e30d67aff35ba2..276888e963fe8d 100644 --- a/deps/npm/html/doc/cli/npm-dedupe.html +++ b/deps/npm/html/doc/cli/npm-dedupe.html @@ -58,5 +58,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html index 70058325537956..af67c39d177af1 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 83c4cf30d6b19a..05b4cc069c88dc 100644 --- a/deps/npm/html/doc/cli/npm-dist-tag.html +++ b/deps/npm/html/doc/cli/npm-dist-tag.html @@ -86,5 +86,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html index 16e058f01fc5a1..8b17a607e15aaf 100644 --- a/deps/npm/html/doc/cli/npm-docs.html +++ b/deps/npm/html/doc/cli/npm-docs.html @@ -55,5 +55,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-doctor.html b/deps/npm/html/doc/cli/npm-doctor.html index 3f31a53fc0c414..8252890511862c 100644 --- a/deps/npm/html/doc/cli/npm-doctor.html +++ b/deps/npm/html/doc/cli/npm-doctor.html @@ -102,4 +102,4 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html index a481ebe454d4d9..3f7da1a9c3db0f 100644 --- a/deps/npm/html/doc/cli/npm-edit.html +++ b/deps/npm/html/doc/cli/npm-edit.html @@ -50,5 +50,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html index a84b5fcb8531cc..67ff72f6f665a7 100644 --- a/deps/npm/html/doc/cli/npm-explore.html +++ b/deps/npm/html/doc/cli/npm-explore.html @@ -47,5 +47,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 6c52a7a61d47ae..bf0c34fdc0c72e 100644 --- a/deps/npm/html/doc/cli/npm-help-search.html +++ b/deps/npm/html/doc/cli/npm-help-search.html @@ -44,5 +44,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html index dd2853af546758..e340f169c190c2 100644 --- a/deps/npm/html/doc/cli/npm-help.html +++ b/deps/npm/html/doc/cli/npm-help.html @@ -49,5 +49,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-hook.html b/deps/npm/html/doc/cli/npm-hook.html index c045ede8bba3ce..76b84727e46f27 100644 --- a/deps/npm/html/doc/cli/npm-hook.html +++ b/deps/npm/html/doc/cli/npm-hook.html @@ -52,4 +52,4 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html index 9a9d2111f18292..e315352a4a2fc9 100644 --- a/deps/npm/html/doc/cli/npm-init.html +++ b/deps/npm/html/doc/cli/npm-init.html @@ -61,5 +61,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-install-ci-test.html b/deps/npm/html/doc/cli/npm-install-ci-test.html index 4ca0d5d7c15f31..b4e99f77ea561d 100644 --- a/deps/npm/html/doc/cli/npm-install-ci-test.html +++ b/deps/npm/html/doc/cli/npm-install-ci-test.html @@ -32,4 +32,4 @@

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 2ee900fbca32d9..435a848d51ee74 100644 --- a/deps/npm/html/doc/cli/npm-install-test.html +++ b/deps/npm/html/doc/cli/npm-install-test.html @@ -41,5 +41,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html index 7be073f6d4ea63..00a140545a8d8f 100644 --- a/deps/npm/html/doc/cli/npm-install.html +++ b/deps/npm/html/doc/cli/npm-install.html @@ -370,5 +370,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html index aa2967eaa0b70a..531643439892d6 100644 --- a/deps/npm/html/doc/cli/npm-link.html +++ b/deps/npm/html/doc/cli/npm-link.html @@ -71,5 +71,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/cli/npm-logout.html b/deps/npm/html/doc/cli/npm-logout.html index 2e581dbb898a06..7bd4d22c260dc9 100644 --- a/deps/npm/html/doc/cli/npm-logout.html +++ b/deps/npm/html/doc/cli/npm-logout.html @@ -49,5 +49,5 @@

scope

       - + diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html index 2954c94e3ca917..4afabe2774090c 100644 --- a/deps/npm/html/doc/cli/npm-ls.html +++ b/deps/npm/html/doc/cli/npm-ls.html @@ -20,7 +20,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@6.10.0 /path/to/npm
+
npm@6.10.2 /path/to/npm
 └─┬ init-package-json@0.0.4
   └── promzard@0.1.5

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

If a project specifies git urls for dependencies these are shown @@ -108,5 +108,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-org.html b/deps/npm/html/doc/cli/npm-org.html index d445b9b59aaccc..a767c3c9a4d929 100644 --- a/deps/npm/html/doc/cli/npm-org.html +++ b/deps/npm/html/doc/cli/npm-org.html @@ -40,4 +40,4 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html index 609215f738a141..fe59197b46c210 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 b9eea1cf0f7562..345d0fe7374b0e 100644 --- a/deps/npm/html/doc/cli/npm-owner.html +++ b/deps/npm/html/doc/cli/npm-owner.html @@ -53,5 +53,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html index bff180a4959c62..bbef2eaa840160 100644 --- a/deps/npm/html/doc/cli/npm-pack.html +++ b/deps/npm/html/doc/cli/npm-pack.html @@ -42,5 +42,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-ping.html b/deps/npm/html/doc/cli/npm-ping.html index d3de0489aadfd1..0d7eb0687c46ae 100644 --- a/deps/npm/html/doc/cli/npm-ping.html +++ b/deps/npm/html/doc/cli/npm-ping.html @@ -33,5 +33,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html index 6a1fd3bc2bc418..a4628f5946c115 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-profile.html b/deps/npm/html/doc/cli/npm-profile.html index 22d2f5411bba41..58d69f2de9e1d3 100644 --- a/deps/npm/html/doc/cli/npm-profile.html +++ b/deps/npm/html/doc/cli/npm-profile.html @@ -88,4 +88,4 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html index 62e61cae6d029f..45934ad58d31b4 100644 --- a/deps/npm/html/doc/cli/npm-prune.html +++ b/deps/npm/html/doc/cli/npm-prune.html @@ -47,5 +47,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html index 616afb8fd6ef6a..2541a1767a109b 100644 --- a/deps/npm/html/doc/cli/npm-publish.html +++ b/deps/npm/html/doc/cli/npm-publish.html @@ -87,5 +87,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html index 4b9e278421573b..160f083e9b7227 100644 --- a/deps/npm/html/doc/cli/npm-rebuild.html +++ b/deps/npm/html/doc/cli/npm-rebuild.html @@ -34,5 +34,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html index a786565b8d7847..8f4742f716577d 100644 --- a/deps/npm/html/doc/cli/npm-repo.html +++ b/deps/npm/html/doc/cli/npm-repo.html @@ -40,5 +40,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html index 1986acc6673a54..c39efb64a0605b 100644 --- a/deps/npm/html/doc/cli/npm-restart.html +++ b/deps/npm/html/doc/cli/npm-restart.html @@ -52,5 +52,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html index a6f141691aa3b1..ff3a49d84d1d4e 100644 --- a/deps/npm/html/doc/cli/npm-root.html +++ b/deps/npm/html/doc/cli/npm-root.html @@ -34,5 +34,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 fe3bccf53e7d5d..dd2562b1a74f9d 100644 --- a/deps/npm/html/doc/cli/npm-run-script.html +++ b/deps/npm/html/doc/cli/npm-run-script.html @@ -79,5 +79,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html index cad2cdbd7f2249..1363c30399d282 100644 --- a/deps/npm/html/doc/cli/npm-search.html +++ b/deps/npm/html/doc/cli/npm-search.html @@ -108,5 +108,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html index e57b205e1b0719..66152bf9b86230 100644 --- a/deps/npm/html/doc/cli/npm-shrinkwrap.html +++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html @@ -40,5 +40,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html index a93bee702e17ae..a8c814bb6cfaa6 100644 --- a/deps/npm/html/doc/cli/npm-star.html +++ b/deps/npm/html/doc/cli/npm-star.html @@ -35,5 +35,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html index c9ee96f08b4d4c..51a0cd97f9e8f2 100644 --- a/deps/npm/html/doc/cli/npm-stars.html +++ b/deps/npm/html/doc/cli/npm-stars.html @@ -35,5 +35,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html index 2410c5963b3764..dd344ad9814777 100644 --- a/deps/npm/html/doc/cli/npm-start.html +++ b/deps/npm/html/doc/cli/npm-start.html @@ -38,5 +38,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html index dba0e0721a4679..3c0480326b5e57 100644 --- a/deps/npm/html/doc/cli/npm-stop.html +++ b/deps/npm/html/doc/cli/npm-stop.html @@ -33,5 +33,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-team.html b/deps/npm/html/doc/cli/npm-team.html index 27e96f20f2f105..97c6d56168ff9e 100644 --- a/deps/npm/html/doc/cli/npm-team.html +++ b/deps/npm/html/doc/cli/npm-team.html @@ -69,5 +69,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html index 623f64c4b01d71..ba66a5d2a046f8 100644 --- a/deps/npm/html/doc/cli/npm-test.html +++ b/deps/npm/html/doc/cli/npm-test.html @@ -35,5 +35,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-token.html b/deps/npm/html/doc/cli/npm-token.html index 19db21095a64c5..f372614c07afc9 100644 --- a/deps/npm/html/doc/cli/npm-token.html +++ b/deps/npm/html/doc/cli/npm-token.html @@ -81,4 +81,4 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html index f541343aed6180..e44761409a4202 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 41ea41e26fa102..ea5215888ede49 100644 --- a/deps/npm/html/doc/cli/npm-unpublish.html +++ b/deps/npm/html/doc/cli/npm-unpublish.html @@ -52,5 +52,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html index b8cd1c95885ffe..e7a078724a1353 100644 --- a/deps/npm/html/doc/cli/npm-update.html +++ b/deps/npm/html/doc/cli/npm-update.html @@ -100,5 +100,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html index 7aac9d7058f59e..734d1275c80043 100644 --- a/deps/npm/html/doc/cli/npm-version.html +++ b/deps/npm/html/doc/cli/npm-version.html @@ -116,5 +116,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html index 777d9bb8f17b7c..a113c3f756a093 100644 --- a/deps/npm/html/doc/cli/npm-view.html +++ b/deps/npm/html/doc/cli/npm-view.html @@ -75,5 +75,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html index 1c2908bad213f7..88a20636823490 100644 --- a/deps/npm/html/doc/cli/npm-whoami.html +++ b/deps/npm/html/doc/cli/npm-whoami.html @@ -32,5 +32,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html index bc2bce9db2d6e9..210cca02114c3c 100644 --- a/deps/npm/html/doc/cli/npm.html +++ b/deps/npm/html/doc/cli/npm.html @@ -12,7 +12,7 @@

npm

javascript package manager

SYNOPSIS

npm <command> [args]

VERSION

-

6.10.0

+

6.10.2

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 @@ -130,7 +130,7 @@

AUTHOR

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

+i@izs.me

SEE ALSO

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

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/npm-folders.html b/deps/npm/html/doc/files/npm-folders.html index 858b854a7dd2bc..096f1c0a4e3afc 100644 --- a/deps/npm/html/doc/files/npm-folders.html +++ b/deps/npm/html/doc/files/npm-folders.html @@ -179,5 +179,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html index 858b854a7dd2bc..096f1c0a4e3afc 100644 --- a/deps/npm/html/doc/files/npm-global.html +++ b/deps/npm/html/doc/files/npm-global.html @@ -179,5 +179,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html index 844ba63e97530d..fedef0cffbbdcf 100644 --- a/deps/npm/html/doc/files/npm-json.html +++ b/deps/npm/html/doc/files/npm-json.html @@ -581,5 +581,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/npm-package-locks.html b/deps/npm/html/doc/files/npm-package-locks.html index 050ae982bba98f..3d0df2c792d5c6 100644 --- a/deps/npm/html/doc/files/npm-package-locks.html +++ b/deps/npm/html/doc/files/npm-package-locks.html @@ -154,4 +154,4 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/npm-shrinkwrap.json.html b/deps/npm/html/doc/files/npm-shrinkwrap.json.html index 2c3093eb376fbc..9bd97cc1f91e61 100644 --- a/deps/npm/html/doc/files/npm-shrinkwrap.json.html +++ b/deps/npm/html/doc/files/npm-shrinkwrap.json.html @@ -42,4 +42,4 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html index ce6e68b84536e8..a615eba3532e6b 100644 --- a/deps/npm/html/doc/files/npmrc.html +++ b/deps/npm/html/doc/files/npmrc.html @@ -82,5 +82,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/package-lock.json.html b/deps/npm/html/doc/files/package-lock.json.html index 344f256c229753..1f1c580527aa39 100644 --- a/deps/npm/html/doc/files/package-lock.json.html +++ b/deps/npm/html/doc/files/package-lock.json.html @@ -130,4 +130,4 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html index 844ba63e97530d..fedef0cffbbdcf 100644 --- a/deps/npm/html/doc/files/package.json.html +++ b/deps/npm/html/doc/files/package.json.html @@ -581,5 +581,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html index 0e08507df63107..7612b1c319ea83 100644 --- a/deps/npm/html/doc/index.html +++ b/deps/npm/html/doc/index.html @@ -182,5 +182,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 58794d281cf712..7419b6900c06b8 100644 --- a/deps/npm/html/doc/misc/npm-coding-style.html +++ b/deps/npm/html/doc/misc/npm-coding-style.html @@ -145,5 +145,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html index 2382d3f7e3cdda..2628233cd544e5 100644 --- a/deps/npm/html/doc/misc/npm-config.html +++ b/deps/npm/html/doc/misc/npm-config.html @@ -1078,5 +1078,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html index 5fa7f9beb12e22..4f696819c67900 100644 --- a/deps/npm/html/doc/misc/npm-developers.html +++ b/deps/npm/html/doc/misc/npm-developers.html @@ -198,5 +198,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html index 6cffc43cf8006a..c8a81a8f347dc6 100644 --- a/deps/npm/html/doc/misc/npm-disputes.html +++ b/deps/npm/html/doc/misc/npm-disputes.html @@ -20,7 +20,7 @@

    npm-disputes

    Handling Module

    TL;DR

    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.

    @@ -58,13 +58,13 @@

    DESCRIPTION

  • Alice emails Yusuf, explaining the situation as respectfully as possible, and what she would like to do with the module name. She adds the npm support -staff support@npmjs.com to the CC list of the email. Mention in the email +staff support@npmjs.com to the CC list of the email. Mention in the email that Yusuf can run npm owner add alice foo to add Alice as an owner of the foo package.

  • After a reasonable amount of time, if Yusuf has not responded, or if Yusuf and Alice can't come to any sort of resolution, email support -support@npmjs.com and we'll sort it out. ("Reasonable" is usually at least +support@npmjs.com and we'll sort it out. ("Reasonable" is usually at least 4 weeks.)

  • @@ -101,12 +101,12 @@

    EXCEPTIONS

    Code of Conduct such as hateful language, pornographic content, or harassment. -

    If you see bad behavior like this, please report it to abuse@npmjs.com right +

    If you see bad behavior like this, please report it to abuse@npmjs.com right away. You are never expected to resolve abusive behavior on your own. We are here to help.

    TRADEMARKS

    If you think another npm publisher is infringing your trademark, such as by -using a confusingly similar package name, email abuse@npmjs.com with a link to +using a confusingly similar package name, email abuse@npmjs.com with a link to the package or user account on https://www.npmjs.com/. Attach a copy of your trademark registration certificate.

    If we see that the package's publisher is intentionally misleading others by @@ -139,5 +139,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html index 2ac27e8b70f2ca..a1f4a0d3243768 100644 --- a/deps/npm/html/doc/misc/npm-index.html +++ b/deps/npm/html/doc/misc/npm-index.html @@ -182,5 +182,5 @@

    semver(7)

           - + diff --git a/deps/npm/html/doc/misc/npm-orgs.html b/deps/npm/html/doc/misc/npm-orgs.html index ecde3910f4de78..b67565857d9328 100644 --- a/deps/npm/html/doc/misc/npm-orgs.html +++ b/deps/npm/html/doc/misc/npm-orgs.html @@ -77,5 +77,5 @@

    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 cd6ee23c5e2d49..1b9f0684d3cefb 100644 --- a/deps/npm/html/doc/misc/npm-registry.html +++ b/deps/npm/html/doc/misc/npm-registry.html @@ -96,5 +96,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-scope.html b/deps/npm/html/doc/misc/npm-scope.html index 1347fb504c9c09..ce7e0932bc30da 100644 --- a/deps/npm/html/doc/misc/npm-scope.html +++ b/deps/npm/html/doc/misc/npm-scope.html @@ -93,5 +93,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html index ede8fb55fb9333..d6c43435c33b9c 100644 --- a/deps/npm/html/doc/misc/npm-scripts.html +++ b/deps/npm/html/doc/misc/npm-scripts.html @@ -234,5 +234,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html index b213fc834b855d..6607c978030aa7 100644 --- a/deps/npm/html/doc/misc/removing-npm.html +++ b/deps/npm/html/doc/misc/removing-npm.html @@ -52,5 +52,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html index d8f8a81cac7fc2..122754055f0036 100644 --- a/deps/npm/html/doc/misc/semver.html +++ b/deps/npm/html/doc/misc/semver.html @@ -22,12 +22,13 @@

    Usage

    semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true semver.gt('1.2.3', '9.8.7') // false semver.lt('1.2.3', '9.8.7') // true +semver.minVersion('>=1.0.0') // '1.0.0' semver.valid(semver.coerce('v2')) // '2.0.0' semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'

As a command-line utility:

$ semver -h
 
-A JavaScript implementation of the http://semver.org/ specification
+A JavaScript implementation of the https://semver.org/ specification
 Copyright Isaac Z. Schlueter
 
 Usage: semver [options] <version> [<version> [...]]
@@ -65,7 +66,7 @@ 

Usage

Versions are printed in ascending order, so supplying multiple versions to the utility will just sort them.

Versions

A "version" is described by the v2.0.0 specification found at -http://semver.org/.

+https://semver.org/.

A leading "=" or "v" character is stripped off and ignored.

Ranges

A version range is a set of comparators which specify versions @@ -117,6 +118,12 @@

Prerelease Tags

the user is indicating that they are aware of the risk. However, it is still not appropriate to assume that they have opted into taking a similar risk on the next set of prerelease versions.

+

Note that this behavior can be suppressed (treating all prerelease +versions as if they were normal versions, for the purpose of range +matching) by setting the includePrerelease flag on the options +object to any +functions that do +range matching.

Prerelease Identifiers

The method .inc takes an additional identifier string argument that will append the value of the string as a prerelease identifier:

@@ -279,6 +286,8 @@

Functions

  • patch(v): Return the patch version number.
  • intersects(r1, r2, loose): Return true if the two supplied ranges or comparators intersect.
  • +
  • parse(v): Attempt to parse a string as a semantic version, returning either +a SemVer object or null.
  • Comparison

      @@ -315,6 +324,8 @@

      Ranges

      that satisfies the range, or null if none of them do.
    • minSatisfying(versions, range): Return the lowest version in the list that satisfies the range, or null if none of them do.
    • +
    • minVersion(range): Return the lowest version that can possibly match +the given range.
    • gtr(version, range): Return true if version is greater than all the versions possible in the range.
    • ltr(version, range): Return true if version is less than all the @@ -361,5 +372,5 @@

      Coercion

             - + diff --git a/deps/npm/lib/audit.js b/deps/npm/lib/audit.js index 37b54d6eca1400..c86566403a2bff 100644 --- a/deps/npm/lib/audit.js +++ b/deps/npm/lib/audit.js @@ -196,7 +196,10 @@ function auditCmd (args, cb) { } else if (err.statusCode === 404) { msg = `Your configured registry (${opts.registry}) does not support audit requests.` } else { - msg = `Your configured registry (${opts.registry}) does not support audit requests, or the audit endpoint is temporarily unavailable.` + msg = `Your configured registry (${opts.registry}) may not support audit requests, or the audit endpoint may be temporarily unavailable.` + } + if (err.body.length) { + msg += '\nThe server said: ' + err.body } const ne = new Error(msg) ne.code = 'ENOAUDIT' diff --git a/deps/npm/lib/fetch-package-metadata.js b/deps/npm/lib/fetch-package-metadata.js index 78eed42bdf0002..c4f46f513fed28 100644 --- a/deps/npm/lib/fetch-package-metadata.js +++ b/deps/npm/lib/fetch-package-metadata.js @@ -26,7 +26,8 @@ function andLogAndFinish (spec, tracker, done) { } } -const CACHE = require('lru-cache')({ +const LRUCache = require('lru-cache') +const CACHE = new LRUCache({ max: 300 * 1024 * 1024, length: (p) => p._contentLength }) diff --git a/deps/npm/lib/install/is-only-dev.js b/deps/npm/lib/install/is-only-dev.js index 2877c61a227d09..804497393eaa3c 100644 --- a/deps/npm/lib/install/is-only-dev.js +++ b/deps/npm/lib/install/is-only-dev.js @@ -28,9 +28,10 @@ function andIsOnlyDev (name, seen) { return isDev && !isProd } else { if (seen.has(req)) return true - seen = new Set(seen) seen.add(req) - return isOnlyDev(req, seen) + const result = isOnlyDev(req, seen) + seen.delete(req) + return result } } } diff --git a/deps/npm/lib/install/is-only-optional.js b/deps/npm/lib/install/is-only-optional.js index 81e227bae7a89c..ea27eadcfa809a 100644 --- a/deps/npm/lib/install/is-only-optional.js +++ b/deps/npm/lib/install/is-only-optional.js @@ -11,11 +11,12 @@ function isOptional (node, seen) { if (seen.has(node) || node.requiredBy.length === 0) { return false } - seen = new Set(seen) seen.add(node) const swOptional = node.fromShrinkwrap && node.package._optional - return node.requiredBy.every(function (req) { + const result = node.requiredBy.every(function (req) { if (req.fakeChild && swOptional) return true return isOptDep(req, moduleName(node)) || isOptional(req, seen) }) + seen.delete(node) + return result } diff --git a/deps/npm/lib/root.js b/deps/npm/lib/root.js index 82a804aff5391b..97d76c120f807e 100644 --- a/deps/npm/lib/root.js +++ b/deps/npm/lib/root.js @@ -1,7 +1,7 @@ module.exports = root -var npm = require('./npm.js') -var output = require('./utils/output.js') +const npm = require('./npm.js') +const output = require('./utils/output.js') root.usage = 'npm root [-g]' diff --git a/deps/npm/lib/search/all-package-metadata.js b/deps/npm/lib/search/all-package-metadata.js index 5883def5c72e3e..a006dadaddf3b1 100644 --- a/deps/npm/lib/search/all-package-metadata.js +++ b/deps/npm/lib/search/all-package-metadata.js @@ -217,7 +217,7 @@ function extractUpdated (entryStream, label, opts) { // be output from it. module.exports._createCacheWriteStream = createCacheWriteStream function createCacheWriteStream (cacheFile, latest, opts) { - return _ensureCacheDirExists(cacheFile, opts).then(() => { + return _ensureCacheDirExists(cacheFile, opts).then(({uid, gid}) => { log.silly('all-package-metadata', 'creating output stream') const outStream = _createCacheOutStream() const cacheFileStream = writeStreamAtomic(cacheFile) @@ -231,19 +231,31 @@ function createCacheWriteStream (cacheFile, latest, opts) { let errEmitted = false linkStreams(inputStream, outStream, () => { errEmitted = true }) - cacheFileStream.on('close', () => !errEmitted && outStream.end()) + cacheFileStream.on('close', () => { + if (!errEmitted) { + if (typeof uid === 'number' && + typeof gid === 'number' && + process.getuid && + process.getgid && + (process.getuid() !== uid || process.getgid() !== gid)) { + chownr.sync(cacheFile, uid, gid) + } + outStream.end() + } + }) return ms.duplex.obj(inputStream, outStream) }) } +// return the {uid,gid} that the cache should have function _ensureCacheDirExists (cacheFile, opts) { var cacheBase = path.dirname(cacheFile) log.silly('all-package-metadata', 'making sure cache dir exists at', cacheBase) return correctMkdir(opts.cache).then(st => { return mkdir(cacheBase).then(made => { return chownr(made || cacheBase, st.uid, st.gid) - }) + }).then(() => ({ uid: st.uid, gid: st.gid })) }) } diff --git a/deps/npm/lib/shrinkwrap.js b/deps/npm/lib/shrinkwrap.js index 75d58bf8e4f0b4..bd8c0abbaa2054 100644 --- a/deps/npm/lib/shrinkwrap.js +++ b/deps/npm/lib/shrinkwrap.js @@ -111,7 +111,6 @@ function shrinkwrapDeps (deps, top, tree, seen) { var pkginfo = deps[moduleName(child)] = {} var requested = getRequested(child) || child.package._requested || {} var linked = child.isLink || child.isInLink - var linkedFromHere = linked && path.relative(top.realpath, child.realpath)[0] !== '.' pkginfo.version = childVersion(top, child, requested) if (requested.type === 'git' && child.package._from) { pkginfo.from = child.package._from @@ -142,7 +141,7 @@ function shrinkwrapDeps (deps, top, tree, seen) { }) } // iterate into children on non-links and links contained within the top level package - if (child.children.length && (!child.isLink || linkedFromHere)) { + if (child.children.length) { pkginfo.dependencies = {} shrinkwrapDeps(pkginfo.dependencies, top, child, seen) } diff --git a/deps/npm/lib/unbuild.js b/deps/npm/lib/unbuild.js index 3e115b6999b2cd..e06ee5eb30e209 100644 --- a/deps/npm/lib/unbuild.js +++ b/deps/npm/lib/unbuild.js @@ -2,17 +2,17 @@ module.exports = unbuild module.exports.rmStuff = rmStuff unbuild.usage = 'npm unbuild \n(this is plumbing)' -var readJson = require('read-package-json') -var gentlyRm = require('./utils/gently-rm.js') -var npm = require('./npm.js') -var path = require('path') -var isInside = require('path-is-inside') -var lifecycle = require('./utils/lifecycle.js') -var asyncMap = require('slide').asyncMap -var chain = require('slide').chain -var log = require('npmlog') -var build = require('./build.js') -var output = require('./utils/output.js') +const readJson = require('read-package-json') +const gentlyRm = require('./utils/gently-rm.js') +const npm = require('./npm.js') +const path = require('path') +const isInside = require('path-is-inside') +const lifecycle = require('./utils/lifecycle.js') +const asyncMap = require('slide').asyncMap +const chain = require('slide').chain +const log = require('npmlog') +const build = require('./build.js') +const output = require('./utils/output.js') // args is a list of folders. // remove any bins/etc, and then delete the folder. @@ -30,7 +30,7 @@ function unbuild_ (silent) { cb_(er, path.relative(npm.root, folder)) } folder = path.resolve(folder) - var base = isInside(folder, npm.prefix) ? npm.prefix : folder + const base = isInside(folder, npm.prefix) ? npm.prefix : folder delete build._didBuild[folder] log.verbose('unbuild', folder.substr(npm.prefix.length + 1)) readJson(path.resolve(folder, 'package.json'), function (er, pkg) { @@ -58,13 +58,13 @@ function rmStuff (pkg, folder, cb) { // if it's global, and folder is in {prefix}/node_modules, // then bins are in {prefix}/bin // otherwise, then bins are in folder/../.bin - var dir = path.dirname(folder) - var scope = path.basename(dir) - var parent = scope.charAt(0) === '@' ? path.dirname(dir) : dir - var gnm = npm.dir + const dir = path.dirname(folder) + const scope = path.basename(dir) + const parent = scope.charAt(0) === '@' ? path.dirname(dir) : dir + const gnm = npm.dir // gnm might be an absolute path, parent might be relative // this checks they're the same directory regardless - var top = path.relative(gnm, parent) === '' + const top = path.relative(gnm, parent) === '' log.verbose('unbuild rmStuff', pkg._id, 'from', gnm) if (!top) log.verbose('unbuild rmStuff', 'in', parent) @@ -75,7 +75,7 @@ function rmStuff (pkg, folder, cb) { function rmBins (pkg, folder, parent, top, cb) { if (!pkg.bin) return cb() - var binRoot = top ? npm.bin : path.resolve(parent, '.bin') + const binRoot = top ? npm.bin : path.resolve(parent, '.bin') asyncMap(Object.keys(pkg.bin), function (b, cb) { if (process.platform === 'win32') { chain([ [gentlyRm, path.resolve(binRoot, b) + '.cmd', true, folder], @@ -98,7 +98,7 @@ function rmMans (pkg, folder, parent, top, cb) { !npm.config.get('global')) { return cb() } - var manRoot = path.resolve(npm.config.get('prefix'), 'share', 'man') + const manRoot = path.resolve(npm.config.get('prefix'), 'share', 'man') log.verbose('rmMans', 'man files are', pkg.man, 'in', manRoot) asyncMap(pkg.man, function (man, cb) { if (Array.isArray(man)) { @@ -109,7 +109,7 @@ function rmMans (pkg, folder, parent, top, cb) { function rmMan (man) { log.silly('rmMan', 'preparing to remove', man) - var parseMan = man.match(/(.*\.([0-9]+)(\.gz)?)$/) + const parseMan = man.match(/(.*\.([0-9]+)(\.gz)?)$/) if (!parseMan) { log.error( 'rmMan', man, 'is not a valid name for a man file.', @@ -119,11 +119,11 @@ function rmMans (pkg, folder, parent, top, cb) { return cb() } - var stem = parseMan[1] - var sxn = parseMan[2] - var gz = parseMan[3] || '' - var bn = path.basename(stem) - var manDest = path.join( + const stem = parseMan[1] + const sxn = parseMan[2] + const gz = parseMan[3] || '' + const bn = path.basename(stem) + const manDest = path.join( manRoot, 'man' + sxn, (bn.indexOf(pkg.name) === 0 ? bn : pkg.name + '-' + bn) + '.' + sxn + gz diff --git a/deps/npm/lib/utils/cache-file.js b/deps/npm/lib/utils/cache-file.js new file mode 100644 index 00000000000000..77df7d4e09361d --- /dev/null +++ b/deps/npm/lib/utils/cache-file.js @@ -0,0 +1,69 @@ +const npm = require('../npm.js') +const path = require('path') +const chownr = require('chownr') +const writeFileAtomic = require('write-file-atomic') +const mkdirp = require('mkdirp') +const fs = require('graceful-fs') + +let cache = null +let cacheUid = null +let cacheGid = null +let needChown = typeof process.getuid === 'function' + +const getCacheOwner = () => { + let st + try { + st = fs.lstatSync(cache) + } catch (er) { + if (er.code !== 'ENOENT') { + throw er + } + st = fs.lstatSync(path.dirname(cache)) + } + + cacheUid = st.uid + cacheGid = st.gid + + needChown = st.uid !== process.getuid() || + st.gid !== process.getgid() +} + +const writeOrAppend = (method, file, data) => { + if (!cache) { + cache = npm.config.get('cache') + } + + // redundant if already absolute, but prevents non-absolute files + // from being written as if they're part of the cache. + file = path.resolve(cache, file) + + if (cacheUid === null && needChown) { + getCacheOwner() + } + + const dir = path.dirname(file) + const firstMade = mkdirp.sync(dir) + + if (!needChown) { + return method(file, data) + } + + let methodThrew = true + try { + method(file, data) + methodThrew = false + } finally { + // always try to leave it in the right ownership state, even on failure + // let the method error fail it instead of the chownr error, though + if (!methodThrew) { + chownr.sync(firstMade || file, cacheUid, cacheGid) + } else { + try { + chownr.sync(firstMade || file, cacheUid, cacheGid) + } catch (_) {} + } + } +} + +exports.append = (file, data) => writeOrAppend(fs.appendFileSync, file, data) +exports.write = (file, data) => writeOrAppend(writeFileAtomic.sync, file, data) diff --git a/deps/npm/lib/utils/correct-mkdir.js b/deps/npm/lib/utils/correct-mkdir.js index 68c4a4ad79ae2e..2558de66f5b6fa 100644 --- a/deps/npm/lib/utils/correct-mkdir.js +++ b/deps/npm/lib/utils/correct-mkdir.js @@ -1,123 +1,36 @@ -var chownr = require('chownr') -var dezalgo = require('dezalgo') -var fs = require('graceful-fs') -var inflight = require('inflight') -var log = require('npmlog') -var mkdirp = require('mkdirp') +const chownr = require('chownr') +const inflight = require('inflight') +const log = require('npmlog') +const mkdirp = require('mkdirp') +const inferOwner = require('infer-owner') + +// retain ownership of the parent dir +// this matches behavior in cacache to infer the cache ownership +// based on the ownership of the cache folder or it is parent. -// memoize the directories created by this step -var stats = {} -var effectiveOwner module.exports = function correctMkdir (path, cb) { - cb = dezalgo(cb) - cb = inflight('correctMkdir:' + path, cb) + cb = inflight('correctMkdir: ' + path, cb) if (!cb) { return log.verbose('correctMkdir', path, 'correctMkdir already in flight; waiting') } else { log.verbose('correctMkdir', path, 'correctMkdir not in flight; initializing') } - if (stats[path]) return cb(null, stats[path]) - - fs.stat(path, function (er, st) { - if (er) return makeDirectory(path, cb) - - if (!st.isDirectory()) { - log.error('correctMkdir', 'invalid dir %s', path) - return cb(er) - } - - var ownerStats = calculateOwner() - // there's always a chance the permissions could have been frobbed, so fix - if (st.uid !== ownerStats.uid) { - stats[path] = ownerStats - setPermissions(path, ownerStats, cb) - } else { - stats[path] = st - cb(null, stats[path]) - } - }) -} - -function calculateOwner () { - if (!effectiveOwner) { - effectiveOwner = { uid: 0, gid: 0 } - - // Pretty much only on windows - if (!process.getuid) { - return effectiveOwner - } - - effectiveOwner.uid = +process.getuid() - effectiveOwner.gid = +process.getgid() - - if (effectiveOwner.uid === 0) { - if (process.env.SUDO_UID) effectiveOwner.uid = +process.env.SUDO_UID - if (process.env.SUDO_GID) effectiveOwner.gid = +process.env.SUDO_GID - } - } - - return effectiveOwner -} - -function makeDirectory (path, cb) { - cb = inflight('makeDirectory:' + path, cb) - if (!cb) { - return log.verbose('makeDirectory', path, 'creation already in flight; waiting') - } else { - log.verbose('makeDirectory', path, 'creation not in flight; initializing') - } - - var owner = calculateOwner() - if (!process.getuid) { - return mkdirp(path, function (er) { - log.verbose('makeCacheDir', 'UID & GID are irrelevant on', process.platform) - - stats[path] = owner - return cb(er, stats[path]) - }) + log.verbose('makeCacheDir', 'UID & GID are irrelevant on', process.platform) + return mkdirp(path, (er, made) => cb(er, { uid: 0, gid: 0 })) } - if (owner.uid !== 0 || !process.env.HOME) { - log.silly( - 'makeDirectory', path, - 'uid:', owner.uid, - 'gid:', owner.gid - ) - stats[path] = owner - mkdirp(path, afterMkdir) - } else { - fs.stat(process.env.HOME, function (er, st) { + inferOwner(path).then(owner => { + mkdirp(path, (er, made) => { if (er) { - log.error('makeDirectory', 'homeless?') + log.error('correctMkdir', 'failed to make directory %s', path) return cb(er) } - - log.silly( - 'makeDirectory', path, - 'uid:', st.uid, - 'gid:', st.gid - ) - stats[path] = st - mkdirp(path, afterMkdir) + chownr(made || path, owner.uid, owner.gid, (er) => cb(er, owner)) }) - } - - function afterMkdir (er, made) { - if (er || !stats[path] || isNaN(stats[path].uid) || isNaN(stats[path].gid)) { - return cb(er, stats[path]) - } - - if (!made) return cb(er, stats[path]) - - setPermissions(made, stats[path], cb) - } -} - -function setPermissions (path, st, cb) { - chownr(path, st.uid, st.gid, function (er) { - if (er && er.code === 'ENOENT') return cb(null, st) - return cb(er, st) + }, er => { + log.error('correctMkdir', 'failed to infer path ownership %s', path) + return cb(er) }) } diff --git a/deps/npm/lib/utils/error-handler.js b/deps/npm/lib/utils/error-handler.js index ba9d9f8e252e58..7cb43be2900ec3 100644 --- a/deps/npm/lib/utils/error-handler.js +++ b/deps/npm/lib/utils/error-handler.js @@ -11,11 +11,10 @@ var wroteLogFile = false var exitCode = 0 var rollbacks = npm.rollbacks var chain = require('slide').chain -var writeFileAtomic = require('write-file-atomic') var errorMessage = require('./error-message.js') var stopMetrics = require('./metrics.js').stop -var mkdirp = require('mkdirp') -var fs = require('graceful-fs') + +const cacheFile = require('./cache-file.js') var logFileName function getLogFile () { @@ -40,7 +39,7 @@ process.on('exit', function (code) { if (npm.config.loaded && npm.config.get('timing')) { try { timings.logfile = getLogFile() - fs.appendFileSync(path.join(npm.config.get('cache'), '_timing.json'), JSON.stringify(timings) + '\n') + cacheFile.append('_timing.json', JSON.stringify(timings) + '\n') } catch (_) { // ignore } @@ -228,7 +227,6 @@ function writeLogFile () { var os = require('os') try { - mkdirp.sync(path.resolve(npm.config.get('cache'), '_logs')) var logOutput = '' log.record.forEach(function (m) { var pref = [m.id, m.level] @@ -241,7 +239,7 @@ function writeLogFile () { logOutput += line + os.EOL }) }) - writeFileAtomic.sync(getLogFile(), logOutput) + cacheFile.write(getLogFile(), logOutput) // truncate once it's been written. log.record.length = 0 diff --git a/deps/npm/lib/utils/git.js b/deps/npm/lib/utils/git.js index 6770853dd9622a..1951640e815689 100644 --- a/deps/npm/lib/utils/git.js +++ b/deps/npm/lib/utils/git.js @@ -28,6 +28,16 @@ function execGit (args, options, cb) { function spawnGit (args, options) { log.info('git', args) + // If we're already in a git command (eg, running test as an exec + // line in an interactive rebase) then these environment variables + // will force git to operate on the current project, instead of + // checking out/fetching/etc. whatever the user actually intends. + options.env = options.env || Object.keys(process.env) + .filter(k => !/^GIT/.test(k)) + .reduce((set, k) => { + set[k] = process.env[k] + return set + }, {}) return spawn(git, prefixGitArgs().concat(args || []), options) } diff --git a/deps/npm/lib/utils/metrics.js b/deps/npm/lib/utils/metrics.js index 0f99c841dbe26c..1a4bb79a6e85d3 100644 --- a/deps/npm/lib/utils/metrics.js +++ b/deps/npm/lib/utils/metrics.js @@ -9,6 +9,7 @@ const path = require('path') const npm = require('../npm.js') const regFetch = require('libnpm/fetch') const uuid = require('uuid') +const cacheFile = require('./cache-file.js') let inMetrics = false @@ -51,9 +52,9 @@ function saveMetrics (itWorked) { } } try { - fs.writeFileSync(metricsFile, JSON.stringify(metrics)) + cacheFile.write(metricsFile, JSON.stringify(metrics)) } catch (ex) { - // we couldn't write the error metrics file, um, well, oh well. + // we couldn't write and/or chown the error metrics file, oh well. } } @@ -72,6 +73,6 @@ function sendMetrics (metricsFile, metricsRegistry) { ).then(() => { fs.unlinkSync(metricsFile) }, err => { - fs.writeFileSync(path.join(path.dirname(metricsFile), 'last-send-metrics-error.txt'), err.stack) + cacheFile.write(path.join(path.dirname(metricsFile), 'last-send-metrics-error.txt'), err.stack) }) } diff --git a/deps/npm/lib/xmas.js b/deps/npm/lib/xmas.js index 65c0c131abd484..81ab59c8e22368 100644 --- a/deps/npm/lib/xmas.js +++ b/deps/npm/lib/xmas.js @@ -11,7 +11,7 @@ module.exports = function (args, cb) { '\u0020', '\u0020', '\u0020', '\u0020', '\u0020', '\u0020', '\u0020', '\u2E1B', '\u2042', '\u2E2E', '&', '@', '\uFF61' ] - var oc = [21, 33, 34, 35, 36, 37] + var oc = [33, 34, 35, 36, 37] var l = '\u005e' function w (s) { process.stderr.write(s) } @@ -25,6 +25,7 @@ module.exports = function (args, cb) { var O = L * 2 - 2 var S = (M - O) / 2 for (i = 0; i < S; i++) w(' ') + w(x + '\u001b[21m') w(x + '\u001b[32m' + f) for (i = 0; i < O; i++) { w( @@ -33,6 +34,7 @@ module.exports = function (args, cb) { ) } w(x + '\u001b[32m' + b + '\n') + w(x + '\u001b[0m') } w(' ') for (i = 1; i < H; i++) w('\u001b[32m' + l) diff --git a/deps/npm/man/man1/npm-README.1 b/deps/npm/man/man1/npm-README.1 index 712dc334054500..370485fcf71fb1 100644 --- a/deps/npm/man/man1/npm-README.1 +++ b/deps/npm/man/man1/npm-README.1 @@ -159,7 +159,7 @@ https://npm\.community/c/bugs Be sure to include \fIall\fR of the output from the npm command that didn't work as expected\. The \fBnpm\-debug\.log\fP file is also helpful to provide\. .P -You can also find npm people in \fB#npm\fP on https:// or +You can also find npm people in \fB#npm\fP on https://package\.community/ or on Twitter \fIhttps://twitter\.com/npm_support\fR\|\. Whoever responds will no doubt tell you to put the output in a gist or email\. .SH SEE ALSO diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1 index 8007f5e8bed954..0117d9ec78f696 100644 --- a/deps/npm/man/man1/npm-adduser.1 +++ b/deps/npm/man/man1/npm-adduser.1 @@ -31,7 +31,7 @@ your existing record\. .SH CONFIGURATION .SS registry .P -Default: https:// +Default: https://registry\.npmjs\.org/ .P The base URL of the npm package registry\. If \fBscope\fP is also specified, this registry will only be used for packages with that scope\. \fBscope\fP defaults diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1 index 4cb0c04871388d..6509fb46710657 100644 --- a/deps/npm/man/man1/npm-bugs.1 +++ b/deps/npm/man/man1/npm-bugs.1 @@ -30,7 +30,7 @@ The browser that is called by the \fBnpm bugs\fP command to open websites\. .SS registry .RS 0 .IP \(bu 2 -Default: https:// +Default: https://registry\.npmjs\.org/ .IP \(bu 2 Type: url diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1 index 56f95549716603..057a9123a1c35d 100644 --- a/deps/npm/man/man1/npm-cache.1 +++ b/deps/npm/man/man1/npm-cache.1 @@ -88,9 +88,9 @@ npm help publish .IP \(bu 2 npm help pack .IP \(bu 2 -https:// +https://npm\.im/cacache .IP \(bu 2 -https:// +https://npm\.im/pacote .RE diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1 index cc086e24dbb351..6ff989eac846fa 100644 --- a/deps/npm/man/man1/npm-docs.1 +++ b/deps/npm/man/man1/npm-docs.1 @@ -32,7 +32,7 @@ The browser that is called by the \fBnpm docs\fP command to open websites\. .SS registry .RS 0 .IP \(bu 2 -Default: https:// +Default: https://registry\.npmjs\.org/ .IP \(bu 2 Type: url diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1 index d712d55448905f..6c32b16b13adb5 100644 --- a/deps/npm/man/man1/npm-install.1 +++ b/deps/npm/man/man1/npm-install.1 @@ -79,7 +79,7 @@ NOTE: The \fB\-\-production\fP flag has no particular meaning when adding a to link a dev directory into your npm root, you can do this more easily by using \fBnpm link\fP\|\. Tarball requirements: -.RS 0 +.RS .IP \(bu 2 The filename \fImust\fR use \fB\|\.tar\fP, \fB\|\.tar\.gz\fP, or \fB\|\.tgz\fP as the extension\. @@ -123,7 +123,7 @@ npm install \./package\.tgz \fBnpm install\fP saves any specified packages into \fBdependencies\fP by default\. Additionally, you can control where and how they get saved with some additional flags: -.RS 0 +.RS .IP \(bu 2 \fB\-P, \-\-save\-prod\fP: Package will appear in your \fBdependencies\fP\|\. This is the .P @@ -244,7 +244,7 @@ fetch the package by name if it is not valid\. script will be run, before the package is packaged and installed\. The following git environment variables are recognized by npm and will be added to the environment when running git: -.RS 0 +.RS .IP \(bu 2 \fBGIT_ASKPASS\fP .IP \(bu 2 diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1 index 9c29363af9f56e..d7438fd16d5246 100644 --- a/deps/npm/man/man1/npm-logout.1 +++ b/deps/npm/man/man1/npm-logout.1 @@ -23,7 +23,7 @@ connected to that scope, if set\. .SH CONFIGURATION .SS registry .P -Default: https:// +Default: https://registry\.npmjs\.org/ .P The base URL of the npm package registry\. If \fBscope\fP is also specified, it takes precedence\. diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index ab7d2a7d3213f3..da054529adb082 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -22,7 +22,7 @@ For example, running \fBnpm ls promzard\fP in npm's source tree will show: .P .RS 2 .nf -npm@6.10.0 /path/to/npm +npm@6.10.2 /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 00d28b346e6514..aee9006752d015 100644 --- a/deps/npm/man/man1/npm-outdated.1 +++ b/deps/npm/man/man1/npm-outdated.1 @@ -81,9 +81,10 @@ something immutable, like a commit SHA), or it might not, so \fBnpm outdated\fP \fBnpm update\fP have to fetch Git repos to check\. This is why currently doing a reinstall of a Git dependency always forces a new clone and install\. .IP \(bu 2 -\fBis marked as "wanted", but "latest" is\fP\fBbecause npm -uses dist\-tags to manage its\fPlatest\fBand\fPnext\fBrelease channels\.\fPnpm update\fBwill install the _newest_ version, but\fPnpm install npm\fB(with no semver range) -will install whatever's tagged as\fPlatest`\. +\fBnpm@3\.5\.2\fP is marked as "wanted", but "latest" is \fBnpm@3\.5\.1\fP because npm +uses dist\-tags to manage its \fBlatest\fP and \fBnext\fP release channels\. \fBnpm update\fP +will install the \fInewest\fR version, but \fBnpm install npm\fP (with no semver range) +will install whatever's tagged as \fBlatest\fP\|\. .IP \(bu 2 \fBonce\fP is just plain out of date\. Reinstalling \fBnode_modules\fP from scratch or running \fBnpm update\fP will bring it up to spec\. diff --git a/deps/npm/man/man1/npm-profile.1 b/deps/npm/man/man1/npm-profile.1 index be92745f80afd3..c074860d7bede2 100644 --- a/deps/npm/man/man1/npm-profile.1 +++ b/deps/npm/man/man1/npm-profile.1 @@ -62,7 +62,7 @@ if you have two\-factor authentication enabled\. .IP \(bu 2 \fBnpm profile enable\-2fa [auth\-and\-writes|auth\-only]\fP: Enables two\-factor authentication\. Defaults to \fBauth\-and\-writes\fP mode\. Modes are: -.RS 0 +.RS .IP \(bu 2 \fBauth\-only\fP: Require an OTP when logging in or making changes to your account's authentication\. The OTP will be required on both the website diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1 index 1310bb97edf155..104663207bc605 100644 --- a/deps/npm/man/man1/npm-run-script.1 +++ b/deps/npm/man/man1/npm-run-script.1 @@ -18,7 +18,7 @@ used by the test, start, restart, and stop commands, but can be called directly, as well\. When the scripts in the package are printed out, they're separated into lifecycle (test, start, restart) and directly\-run scripts\. .P -As of ` \fIhttps://blog\.npmjs\.org/post/98131109725/npm\-2\-0\-0\fR, you can +As of \fBnpm@2\.0\.0\fP \fIhttps://blog\.npmjs\.org/post/98131109725/npm\-2\-0\-0\fR, you can use custom arguments when executing scripts\. The special option \fB\-\-\fP is used by getopt \fIhttps://goo\.gl/KxMmtG\fR to delimit the end of the options\. npm will pass all the arguments after the \fB\-\-\fP directly to your script: @@ -62,7 +62,7 @@ to run your tests\. The actual shell your script is run within is platform dependent\. By default, on Unix\-like systems it is the \fB/bin/sh\fP command, on Windows it is the \fBcmd\.exe\fP\|\. The actual shell referred to by \fB/bin/sh\fP also depends on the system\. -As of ` \fIhttps://github\.com/npm/npm/releases/tag/v5\.1\.0\fR you can +As of \fBnpm@5\.1\.0\fP \fIhttps://github\.com/npm/npm/releases/tag/v5\.1\.0\fR you can customize the shell with the \fBscript\-shell\fP configuration\. .P Scripts are run from the root of the module, regardless of what your current diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1 index b5ab90baf22064..e5e1fac9b4294f 100644 --- a/deps/npm/man/man1/npm-search.1 +++ b/deps/npm/man/man1/npm-search.1 @@ -110,7 +110,7 @@ The age of the cache, in seconds, before another registry request is made\. .SS registry .RS 0 .IP \(bu 2 -Default: https:// +Default: https://registry\.npmjs\.org/ .IP \(bu 2 Type: url diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1 index cb4dee2ac0b2df..8c2eeb9be66a39 100644 --- a/deps/npm/man/man1/npm-start.1 +++ b/deps/npm/man/man1/npm-start.1 @@ -14,7 +14,7 @@ This runs an arbitrary command specified in the package's \fB"start"\fP property its \fB"scripts"\fP object\. If no \fB"start"\fP property is specified on the \fB"scripts"\fP object, it will run \fBnode server\.js\fP\|\. .P -As of ` \fIhttps://blog\.npmjs\.org/post/98131109725/npm\-2\-0\-0\fR, you can +As of \fBnpm@2\.0\.0\fP \fIhttps://blog\.npmjs\.org/post/98131109725/npm\-2\-0\-0\fR, you can use custom arguments when executing scripts\. Refer to npm help run\-script for more details\. .SH SEE ALSO diff --git a/deps/npm/man/man1/npm-token.1 b/deps/npm/man/man1/npm-token.1 index 71eb50db219453..ef750d6c1a62fd 100644 --- a/deps/npm/man/man1/npm-token.1 +++ b/deps/npm/man/man1/npm-token.1 @@ -18,26 +18,37 @@ This lets you list, create and revoke authentication tokens\. \fBnpm token list\fP: Shows a table of all active authentication tokens\. You can request this as JSON with \fB\-\-json\fP or tab\-separated values with \fB\-\-parseable\fP\|\. -.P -.RS 2 -.nf -+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\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-\-\-\-\-\-\-\-+ | 6334e1 | 1dadd1… | 2017\-09\-23 | no | | -+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +.IP \(bu 2 +\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +.P +.RS 2 +.nf + .fi .RE .IP \(bu 2 diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1 index 6cbf125fcd85dd..f5c4c17750f769 100644 --- a/deps/npm/man/man1/npm-unpublish.1 +++ b/deps/npm/man/man1/npm-unpublish.1 @@ -34,7 +34,7 @@ be republished until 24 hours have passed\. With the default registry (\fBregistry\.npmjs\.org\fP), unpublish is only allowed with versions published in the last 72 hours\. If you are trying to unpublish a version published longer ago than that, -contact \|\. +contact support@npmjs\.com\|\. .P The scope is optional and follows the usual rules for npm help 7 \fBnpm\-scope\fP\|\. .SH SEE ALSO diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1 index 78d59cab5f31cb..29730d4c088074 100644 --- a/deps/npm/man/man1/npm-update.1 +++ b/deps/npm/man/man1/npm-update.1 @@ -25,17 +25,17 @@ packages\. If no package name is specified, all packages in the specified location (global or local) will be updated\. .P -As of \fB, the\fPnpm update\fBwill only inspect top\-level packages\. -Prior versions of\fPnpm\fBwould also recursively inspect all dependencies\. -To get the old behavior, use\fPnpm \-\-depth 9999 update`\. +As of \fBnpm@2\.6\.1\fP, the \fBnpm update\fP will only inspect top\-level packages\. +Prior versions of \fBnpm\fP would also recursively inspect all dependencies\. +To get the old behavior, use \fBnpm \-\-depth 9999 update\fP\|\. .P -As of \fB, the\fPnpm update\fBwill change\fPpackage\.json\fBto save the +As of \fBnpm@5\.0\.0\fP, the \fBnpm update\fP will change \fBpackage\.json\fP to save the new version as the minimum required dependency\. To get the old behavior, -use\fPnpm update \-\-no\-save`\. +use \fBnpm update \-\-no\-save\fP\|\. .SH EXAMPLES .P -IMPORTANT VERSION NOTE: these examples assume \fBor later\. For -older versions of\fPnpm\fB, you must specify\fP\-\-depth 0` to get the behavior +IMPORTANT VERSION NOTE: these examples assume \fBnpm@2\.6\.1\fP or later\. For +older versions of \fBnpm\fP, you must specify \fB\-\-depth 0\fP to get the behavior described below\. .P For the examples below, assume that the current package is \fBapp\fP and it depends @@ -71,7 +71,8 @@ If \fBapp\fP\|'s \fBpackage\.json\fP contains: .fi .RE .P -Then \fBnpm update\fP will install \fB, because\fP1\.2\.2\fBis\fPlatest\fBand\fP1\.2\.2\fBsatisfies\fP^1\.1\.1`\. +Then \fBnpm update\fP will install \fBdep1@1\.2\.2\fP, because \fB1\.2\.2\fP is \fBlatest\fP and +\fB1\.2\.2\fP satisfies \fB^1\.1\.1\fP\|\. .SS Tilde Dependencies .P However, if \fBapp\fP\|'s \fBpackage\.json\fP contains: @@ -84,9 +85,10 @@ However, if \fBapp\fP\|'s \fBpackage\.json\fP contains: .fi .RE .P -In this case, running \fBnpm update\fP will install \fB\|\. Even though the\fPlatest\fBtag points to\fP1\.2\.2\fB, this version does not satisfy\fP~1\.1\.1\fB, which is equivalent -to\fP>=1\.1\.1 <1\.2\.0\fB\|\. So the highest\-sorting version that satisfies\fP~1\.1\.1\fBis used, -which is\fP1\.1\.2`\. +In this case, running \fBnpm update\fP will install \fBdep1@1\.1\.2\fP\|\. Even though the \fBlatest\fP +tag points to \fB1\.2\.2\fP, this version does not satisfy \fB~1\.1\.1\fP, which is equivalent +to \fB>=1\.1\.1 <1\.2\.0\fP\|\. So the highest\-sorting version that satisfies \fB~1\.1\.1\fP is used, +which is \fB1\.1\.2\fP\|\. .SS Caret Dependencies below 1\.0\.0 .P Suppose \fBapp\fP has a caret dependency on a version below \fB1\.0\.0\fP, for example: @@ -99,8 +101,8 @@ Suppose \fBapp\fP has a caret dependency on a version below \fB1\.0\.0\fP, for e .fi .RE .P -\fBnpm update\fP will install \fB, because there are no other -versions which satisfy\fP^0\.2\.0`\. +\fBnpm update\fP will install \fBdep1@0\.2\.0\fP, because there are no other +versions which satisfy \fB^0\.2\.0\fP\|\. .P If the dependence were on \fB^0\.4\.0\fP: .P @@ -112,8 +114,8 @@ If the dependence were on \fB^0\.4\.0\fP: .fi .RE .P -Then \fBnpm update\fP will install \fB, because that is the highest\-sorting -version that satisfies\fP^0\.4\.0\fB(\fP>= 0\.4\.0 <0\.5\.0`) +Then \fBnpm update\fP will install \fBdep1@0\.4\.1\fP, because that is the highest\-sorting +version that satisfies \fB^0\.4\.0\fP (\fB>= 0\.4\.0 <0\.5\.0\fP) .SS Updating Globally\-Installed Packages .P \fBnpm update \-g\fP will apply the \fBupdate\fP action to each globally installed diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index ad3255ce2a5d04..1312e4334db7f7 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -10,7 +10,7 @@ npm [args] .RE .SH VERSION .P -6.10.0 +6.10.2 .SH DESCRIPTION .P npm is the package manager for the Node JavaScript platform\. It puts @@ -25,8 +25,8 @@ Run \fBnpm help\fP to get a list of available commands\. .SH IMPORTANT .P npm is configured to use npm, Inc\.'s public registry at -https:// by default\. Use of the npm public registry is -subject to terms of use available at https:// +https://registry\.npmjs\.org by default\. Use of the npm public registry is +subject to terms of use available at https://www\.npmjs\.com/policies/terms\. .P You can configure npm to use any compatible registry you like, and even run your own registry\. Use of someone else's registry may be governed by their diff --git a/deps/npm/man/man5/npm-folders.5 b/deps/npm/man/man5/npm-folders.5 index 5cd6ae97cef957..45214a4b925c22 100644 --- a/deps/npm/man/man5/npm-folders.5 +++ b/deps/npm/man/man5/npm-folders.5 @@ -173,17 +173,17 @@ foo .fi .RE .P -Since foo depends directly on \fBand\fP\fB, those are -installed in foo's\fPnode_modules` folder\. +Since foo depends directly on \fBbar@1\.2\.3\fP and \fBbaz@1\.2\.3\fP, those are +installed in foo's \fBnode_modules\fP folder\. .P Even though the latest copy of blerg is 1\.3\.7, foo has a specific dependency on version 1\.2\.5\. So, that gets installed at [A]\. Since the -parent installation of blerg satisfies bar's dependency on `, +parent installation of blerg satisfies bar's dependency on \fBblerg@1\.x\fP, it does not install another copy under [B]\. .P Bar [B] also has dependencies on baz and asdf, so those are installed in -bar's \fBnode_modules\fP folder\. Because it depends on \fB, it cannot -re\-use the\fP\fBinstalled in the parent\fPnode_modules` folder [D], +bar's \fBnode_modules\fP folder\. Because it depends on \fBbaz@2\.x\fP, it cannot +re\-use the \fBbaz@1\.2\.3\fP installed in the parent \fBnode_modules\fP folder [D], and must install its own copy [C]\. .P Underneath bar, the \fBbaz \-> quux \-> bar\fP dependency creates a cycle\. diff --git a/deps/npm/man/man5/npm-global.5 b/deps/npm/man/man5/npm-global.5 index 5cd6ae97cef957..45214a4b925c22 100644 --- a/deps/npm/man/man5/npm-global.5 +++ b/deps/npm/man/man5/npm-global.5 @@ -173,17 +173,17 @@ foo .fi .RE .P -Since foo depends directly on \fBand\fP\fB, those are -installed in foo's\fPnode_modules` folder\. +Since foo depends directly on \fBbar@1\.2\.3\fP and \fBbaz@1\.2\.3\fP, those are +installed in foo's \fBnode_modules\fP folder\. .P Even though the latest copy of blerg is 1\.3\.7, foo has a specific dependency on version 1\.2\.5\. So, that gets installed at [A]\. Since the -parent installation of blerg satisfies bar's dependency on `, +parent installation of blerg satisfies bar's dependency on \fBblerg@1\.x\fP, it does not install another copy under [B]\. .P Bar [B] also has dependencies on baz and asdf, so those are installed in -bar's \fBnode_modules\fP folder\. Because it depends on \fB, it cannot -re\-use the\fP\fBinstalled in the parent\fPnode_modules` folder [D], +bar's \fBnode_modules\fP folder\. Because it depends on \fBbaz@2\.x\fP, it cannot +re\-use the \fBbaz@1\.2\.3\fP installed in the parent \fBnode_modules\fP folder [D], and must install its own copy [C]\. .P Underneath bar, the \fBbaz \-> quux \-> bar\fP dependency creates a cycle\. diff --git a/deps/npm/man/man5/npm-package-locks.5 b/deps/npm/man/man5/npm-package-locks.5 index fb0727c449457a..d864a5baab35f6 100644 --- a/deps/npm/man/man5/npm-package-locks.5 +++ b/deps/npm/man/man5/npm-package-locks.5 @@ -71,7 +71,7 @@ A@0\.1\.0 .fi .RE .P -However, if is published, then a fresh \fBnpm install A\fP will +However, if B@0\.0\.2 is published, then a fresh \fBnpm install A\fP will install: .P .RS 2 @@ -85,7 +85,7 @@ A@0\.1\.0 assuming the new version did not modify B's dependencies\. Of course, the new version of B could include a new version of C and any number of new dependencies\. If such changes are undesirable, the author of A -could specify a dependency on \|\. However, if A's author and B's +could specify a dependency on B@0\.0\.1\|\. However, if A's author and B's author are not the same person, there's no way for A's author to say that he or she does not want to pull in newly published versions of C when B hasn't changed at all\. @@ -170,22 +170,25 @@ if any transitive dependencies were updated, hoisted, etc\. .SS Resolving lockfile conflicts .P Occasionally, two separate npm install will create package locks that cause -merge conflicts in source control systems\. As of \fB, these conflicts -can be resolved by manually fixing any\fPpackage\.json\fBconflicts, and then -running\fPnpm install [\-\-package\-lock\-only]\fBagain\. npm will automatically +merge conflicts in source control systems\. As of \fBnpm@5\.7\.0\fP, these conflicts +can be resolved by manually fixing any \fBpackage\.json\fP conflicts, and then +running \fBnpm install [\-\-package\-lock\-only]\fP again\. npm will automatically resolve any conflicts for you and write a merged package lock that includes all -the dependencies from both branches in a reasonable tree\. If\fP\-\-package\-lock\-only\fBis provided, it will do this without also modifying your -local\fPnode_modules/`\. +the dependencies from both branches in a reasonable tree\. If +\fB\-\-package\-lock\-only\fP is provided, it will do this without also modifying your +local \fBnode_modules/\fP\|\. .P To make this process seamless on git, consider installing \fBnpm\-merge\-driver\fP \fIhttps://npm\.im/npm\-merge\-driver\fR, which will teach git how to do this itself without any user interaction\. In short: \fB$ npx npm\-merge\-driver install \-g\fP will let you do this, and even works with -\fBversions of npm 5, albeit a bit more noisily\. Note that if\fPpackage\.json\fBitself conflicts, you will have to resolve that by hand and run\fPnpm install` manually, even with the merge driver\. +pre\-\fBnpm@5\.7\.0\fP versions of npm 5, albeit a bit more noisily\. Note that if +\fBpackage\.json\fP itself conflicts, you will have to resolve that by hand and run +\fBnpm install\fP manually, even with the merge driver\. .SH SEE ALSO .RS 0 .IP \(bu 2 -https:// +https://medium\.com/@sdboyer/so\-you\-want\-to\-write\-a\-package\-manager\-4ae9c17d9527 .IP \(bu 2 npm help 5 package\.json .IP \(bu 2 diff --git a/deps/npm/man/man7/npm-config.7 b/deps/npm/man/man7/npm-config.7 index 97075db38b6e87..d690ad256fba16 100644 --- a/deps/npm/man/man7/npm-config.7 +++ b/deps/npm/man/man7/npm-config.7 @@ -262,7 +262,8 @@ command will error\. .P If the requested version is a \fBdist\-tag\fP and the given tag does not pass the \fB\-\-before\fP filter, the most recent version less than or equal to that tag will -be used\. For example, \fBfoo@latest\fP might install \fBeven though\fPlatest\fBis\fP2\.0`\. +be used\. For example, \fBfoo@latest\fP might install \fBfoo@1\.2\fP even though \fBlatest\fP +is \fB2\.0\fP\|\. .SS bin\-links .RS 0 .IP \(bu 2 @@ -947,7 +948,7 @@ Any "%s" in the message will be replaced with the version number\. .SS metrics\-registry .RS 0 .IP \(bu 2 -Default: The value of \fBregistry\fP (which defaults to "https:// +Default: The value of \fBregistry\fP (which defaults to "https://registry\.npmjs\.org/") .IP \(bu 2 Type: String @@ -1203,7 +1204,7 @@ Rebuild bundled dependencies after installation\. .SS registry .RS 0 .IP \(bu 2 -Default: https:// +Default: https://registry\.npmjs\.org/ .IP \(bu 2 Type: url diff --git a/deps/npm/man/man7/npm-disputes.7 b/deps/npm/man/man7/npm-disputes.7 index d2802afddecb8e..dcb389bb57839a 100644 --- a/deps/npm/man/man7/npm-disputes.7 +++ b/deps/npm/man/man7/npm-disputes.7 @@ -120,7 +120,7 @@ here to help\.\fR .P If you think another npm publisher is infringing your trademark, such as by using a confusingly similar package name, email abuse@npmjs\.com with a link to -the package or user account on https:// \fIhttps://www\.npmjs\.com/\fR\|\. +the package or user account on https://www\.npmjs\.com/ \fIhttps://www\.npmjs\.com/\fR\|\. Attach a copy of your trademark registration certificate\. .P If we see that the package's publisher is intentionally misleading others by diff --git a/deps/npm/man/man7/npm-scripts.7 b/deps/npm/man/man7/npm-scripts.7 index 7fe3254ed32188..f05f4d1ed00f50 100644 --- a/deps/npm/man/man7/npm-scripts.7 +++ b/deps/npm/man/man7/npm-scripts.7 @@ -77,15 +77,15 @@ names will be run for those as well (e\.g\. \fBpremyscript\fP, \fBmyscript\fP, .SH PREPUBLISH AND PREPARE .SS DEPRECATION NOTE .P -Since \fB, the npm CLI has run the\fPprepublish\fBscript for both\fPnpm -publish\fBand\fPnpm install\fB, because it's a convenient way to prepare a package +Since \fBnpm@1\.1\.71\fP, the npm CLI has run the \fBprepublish\fP script for both \fBnpm +publish\fP and \fBnpm install\fP, because it's a convenient way to prepare a package for use (some common use cases are described in the section below)\. It has -also turned out to be, in practice, [very -confusing](https://github\.com/npm/npm/issues/10074)\. As of\fP\fB, a new -event has been introduced,\fPprepare\fB, that preserves this existing behavior\. A -_new_ event,\fPprepublishOnly\fBhas been added as a transitional strategy to +also turned out to be, in practice, very +confusing \fIhttps://github\.com/npm/npm/issues/10074\fR\|\. As of \fBnpm@4\.0\.0\fP, a new +event has been introduced, \fBprepare\fP, that preserves this existing behavior\. A +\fInew\fR event, \fBprepublishOnly\fP has been added as a transitional strategy to allow users to avoid the confusing behavior of existing npm versions and only -run on\fPnpm publish` (for instance, running the tests one last time to ensure +run on \fBnpm publish\fP (for instance, running the tests one last time to ensure they're in good shape)\. .P See https://github\.com/npm/npm/issues/10074 for a much lengthier diff --git a/deps/npm/man/man7/semver.7 b/deps/npm/man/man7/semver.7 index cd5bdde92bcbd6..d7325e9b2d5c63 100644 --- a/deps/npm/man/man7/semver.7 +++ b/deps/npm/man/man7/semver.7 @@ -6,7 +6,6 @@ .RS 2 .nf npm install \-\-save semver -` .fi .RE .SH Usage @@ -23,6 +22,7 @@ semver\.clean(' =v1\.2\.3 ') // '1\.2\.3' semver\.satisfies('1\.2\.3', '1\.x || >=2\.5\.0 || 5\.0\.0 \- 7\.2\.3') // true semver\.gt('1\.2\.3', '9\.8\.7') // false semver\.lt('1\.2\.3', '9\.8\.7') // true +semver\.minVersion('>=1\.0\.0') // '1\.0\.0' semver\.valid(semver\.coerce('v2')) // '2\.0\.0' semver\.valid(semver\.coerce('42\.6\.7\.9\.3\-alpha')) // '42\.6\.7' .fi @@ -34,7 +34,7 @@ As a command\-line utility: .nf $ semver \-h -A JavaScript implementation of the http://semver\.org/ specification +A JavaScript implementation of the https://semver\.org/ specification Copyright Isaac Z\. Schlueter Usage: semver [options] [ [\.\.\.]] @@ -76,7 +76,7 @@ multiple versions to the utility will just sort them\. .SH Versions .P A "version" is described by the \fBv2\.0\.0\fP specification found at -http://semver\.org/\|\. +https://semver\.org/\|\. .P A leading \fB"="\fP or \fB"v"\fP character is stripped off and ignored\. .SH Ranges @@ -146,6 +146,13 @@ alpha/beta/rc versions\. By including a prerelease tag in the range, the user is indicating that they are aware of the risk\. However, it is still not appropriate to assume that they have opted into taking a similar risk on the \fInext\fR set of prerelease versions\. +.P +Note that this behavior can be suppressed (treating all prerelease +versions as if they were normal versions, for the purpose of range +matching) by setting the \fBincludePrerelease\fP flag on the options +object to any +functions \fIhttps://github\.com/npm/node\-semver#functions\fR that do +range matching\. .SS Prerelease Identifiers .P The method \fB\|\.inc\fP takes an additional \fBidentifier\fP string argument that @@ -372,7 +379,7 @@ strings that they parse\. \fBinc(v, release)\fP: Return the version incremented by the release type (\fBmajor\fP, \fBpremajor\fP, \fBminor\fP, \fBpreminor\fP, \fBpatch\fP, \fBprepatch\fP, or \fBprerelease\fP), or null if it's not valid -.RS 0 +.RS .IP \(bu 2 \fBpremajor\fP in one call will bump the version up to the next major version and down to a prerelease of that major version\. @@ -396,6 +403,9 @@ if none exist\. Example: \fBprerelease('1\.2\.3\-alpha\.1') \-> ['alpha', 1]\fP .IP \(bu 2 \fBintersects(r1, r2, loose)\fP: Return true if the two supplied ranges or comparators intersect\. +.IP \(bu 2 +\fBparse(v)\fP: Attempt to parse a string as a semantic version, returning either +a \fBSemVer\fP object or \fBnull\fP\|\. .RE .SS Comparison @@ -451,6 +461,9 @@ that satisfies the range, or \fBnull\fP if none of them do\. \fBminSatisfying(versions, range)\fP: Return the lowest version in the list that satisfies the range, or \fBnull\fP if none of them do\. .IP \(bu 2 +\fBminVersion(range)\fP: Return the lowest version that can possibly match +the given range\. +.IP \(bu 2 \fBgtr(version, range)\fP: Return \fBtrue\fP if version is greater than all the versions possible in the range\. .IP \(bu 2 diff --git a/deps/npm/node_modules/agent-base/.travis.yml b/deps/npm/node_modules/agent-base/.travis.yml index 6ce862c6f63a77..76200951f0450b 100644 --- a/deps/npm/node_modules/agent-base/.travis.yml +++ b/deps/npm/node_modules/agent-base/.travis.yml @@ -9,6 +9,7 @@ node_js: - "7" - "8" - "9" + - "10" install: - PATH="`npm bin`:`npm bin -g`:$PATH" diff --git a/deps/npm/node_modules/agent-base/index.d.ts b/deps/npm/node_modules/agent-base/index.d.ts new file mode 100644 index 00000000000000..ff6788bdc77c65 --- /dev/null +++ b/deps/npm/node_modules/agent-base/index.d.ts @@ -0,0 +1,43 @@ +// Type definitions for agent-base 4.2.1 +// Project: https://github.com/TooTallNate/node-agent-base +// Definitions by: Christopher Quadflieg + +/// +import { EventEmitter } from 'events'; + +declare namespace Agent { + export type AgentCallback = ( + req?: any, + opts?: { + secureEndpoint: boolean; + } + ) => void; + + export interface AgentOptions { + timeout?: number; + host?: string; + port?: number; + [key: string]: any; + } + + export interface Agent extends EventEmitter { + _promisifiedCallback: boolean; + timeout: number | null; + options?: AgentOptions; + callback: AgentCallback; + addRequest: (req?: any, opts?: any) => void; + freeSocket: (socket: any, opts: any) => void; + } +} + +/** + * Base `http.Agent` implementation. + * No pooling/keep-alive is implemented by default. + */ +declare function Agent(opts?: Agent.AgentOptions): Agent.Agent; +declare function Agent( + callback: Agent.AgentCallback, + opts?: Agent.AgentOptions +): Agent.Agent; + +export = Agent; diff --git a/deps/npm/node_modules/agent-base/package.json b/deps/npm/node_modules/agent-base/package.json index 08c5330def1560..70da68723410f2 100644 --- a/deps/npm/node_modules/agent-base/package.json +++ b/deps/npm/node_modules/agent-base/package.json @@ -1,31 +1,28 @@ { - "_from": "agent-base@latest", - "_id": "agent-base@4.2.1", + "_from": "agent-base@4", + "_id": "agent-base@4.3.0", "_inBundle": false, - "_integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", + "_integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", "_location": "/agent-base", "_phantomChildren": {}, "_requested": { - "type": "tag", + "type": "range", "registry": true, - "raw": "agent-base@latest", + "raw": "agent-base@4", "name": "agent-base", "escapedName": "agent-base", - "rawSpec": "latest", + "rawSpec": "4", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "4" }, "_requiredBy": [ - "#USER", - "/", "/http-proxy-agent", - "/https-proxy-agent", - "/socks-proxy-agent" + "/https-proxy-agent" ], - "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", - "_shasum": "d89e5999f797875674c07d87f260fc41e83e8ca9", - "_spec": "agent-base@latest", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", + "_shasum": "8165f01c436009bccad0b1d122f05ed770efc6ee", + "_spec": "agent-base@4", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/http-proxy-agent", "author": { "name": "Nathan Rajlich", "email": "nathan@tootallnate.net", @@ -41,6 +38,8 @@ "deprecated": false, "description": "Turn a function into an `http.Agent` instance", "devDependencies": { + "@types/es6-promisify": "^5.0.0", + "@types/node": "^10.5.3", "mocha": "^3.4.2", "ws": "^3.0.0" }, @@ -65,5 +64,5 @@ "scripts": { "test": "mocha --reporter spec" }, - "version": "4.2.1" + "version": "4.3.0" } diff --git a/deps/npm/node_modules/agent-base/patch-core.js b/deps/npm/node_modules/agent-base/patch-core.js index 47d26a72b0a65e..21cbbb6753bdf4 100644 --- a/deps/npm/node_modules/agent-base/patch-core.js +++ b/deps/npm/node_modules/agent-base/patch-core.js @@ -8,21 +8,25 @@ const https = require('https'); * * There is currently no PR attempting to move this property upstream. */ -https.request = (function(request) { - return function(_options, cb) { - let options; - if (typeof _options === 'string') { - options = url.parse(_options); - } else { - options = Object.assign({}, _options); - } - if (null == options.port) { - options.port = 443; - } - options.secureEndpoint = true; - return request.call(https, options, cb); - }; -})(https.request); +const patchMarker = "__agent_base_https_request_patched__"; +if (!https.request[patchMarker]) { + https.request = (function(request) { + return function(_options, cb) { + let options; + if (typeof _options === 'string') { + options = url.parse(_options); + } else { + options = Object.assign({}, _options); + } + if (null == options.port) { + options.port = 443; + } + options.secureEndpoint = true; + return request.call(https, options, cb); + }; + })(https.request); + https.request[patchMarker] = true; +} /** * This is needed for Node.js >= 9.0.0 to make sure `https.get()` uses the @@ -30,7 +34,17 @@ https.request = (function(request) { * * Ref: https://github.com/nodejs/node/commit/5118f31 */ -https.get = function(options, cb) { +https.get = function (_url, _options, cb) { + let options; + if (typeof _url === 'string' && _options && typeof _options !== 'function') { + options = Object.assign({}, url.parse(_url), _options); + } else if (!_options && !cb) { + options = _url; + } else if (!cb) { + options = _url; + cb = _options; + } + const req = https.request(options, cb); req.end(); return req; diff --git a/deps/npm/node_modules/agent-base/test/test.js b/deps/npm/node_modules/agent-base/test/test.js index 6a8ca68e0dcbf7..0f372c07606317 100644 --- a/deps/npm/node_modules/agent-base/test/test.js +++ b/deps/npm/node_modules/agent-base/test/test.js @@ -189,9 +189,10 @@ describe('Agent', function() { }) }; var req = http.request(opts, function(res) { - assert.equal('0.9', res.httpVersion); - assert.equal(111, res.statusCode); + assert.equal('1.0', res.httpVersion); + assert.equal(200, res.statusCode); assert.equal('bar', res.headers.foo); + assert.deepEqual(['1', '2'], res.headers['set-cookie']); done(); }); @@ -199,8 +200,8 @@ describe('Agent', function() { // doesn't *actually* attach the listeners to the "stream" until // this happens req.once('socket', function() { - var buf = new Buffer( - 'HTTP/0.9 111\r\n' + + var buf = Buffer.from( + 'HTTP/1.0 200\r\n' + 'Foo: bar\r\n' + 'Set-Cookie: 1\r\n' + 'Set-Cookie: 2\r\n\r\n' @@ -541,6 +542,25 @@ describe('"https" module', function() { }); }); + it('should support the 3-argument `https.get()`', function(done) { + var agent = new Agent(function(req, opts, fn) { + assert.equal('google.com', opts.host); + assert.equal('/q', opts.pathname || opts.path); + assert.equal('881', opts.port); + assert.equal('bar', opts.foo); + done(); + }); + + https.get( + 'https://google.com:881/q', + { + host: 'google.com', + foo: 'bar', + agent: agent + } + ); + }); + it('should default to port 443', function(done) { var agent = new Agent(function(req, opts, fn) { assert.equal(true, opts.secureEndpoint); @@ -559,6 +579,17 @@ describe('"https" module', function() { }); }); + it('should not re-patch https.request', () => { + var patchModulePath = "../patch-core"; + var patchedRequest = https.request; + + delete require.cache[require.resolve(patchModulePath)]; + require(patchModulePath); + + assert.equal(patchedRequest, https.request); + assert.equal(true, https.request.__agent_base_https_request_patched__); + }); + describe('PassthroughAgent', function() { it('should pass through to `https.globalAgent`', function(done) { // add HTTP server "request" listener diff --git a/deps/npm/node_modules/agentkeepalive/History.md b/deps/npm/node_modules/agentkeepalive/History.md index da67a1c4f6f94e..70771ca235f36f 100644 --- a/deps/npm/node_modules/agentkeepalive/History.md +++ b/deps/npm/node_modules/agentkeepalive/History.md @@ -1,4 +1,26 @@ +3.5.2 / 2018-10-19 +================== + +**fixes** + * [[`5751fc1`](http://github.com/node-modules/agentkeepalive/commit/5751fc1180ed6544602c681ffbd08ca66a0cb12c)] - fix: sockLen being miscalculated when removing sockets (#60) (Ehden Sinai <>) + +3.5.1 / 2018-07-31 +================== + +**fixes** + * [[`495f1ab`](http://github.com/node-modules/agentkeepalive/commit/495f1ab625d43945d72f68096b97db723d4f0657)] - fix: add the lost npm files (#66) (Henry Zhuang <>) + +3.5.0 / 2018-07-31 +================== + +**features** + * [[`16f5aea`](http://github.com/node-modules/agentkeepalive/commit/16f5aeadfda57f1c602652f1472a63cc83cd05bf)] - feat: add typing define. (#65) (Henry Zhuang <>) + +**others** + * [[`28fa062`](http://github.com/node-modules/agentkeepalive/commit/28fa06246fb5103f88ebeeb8563757a9078b8157)] - docs: add "per host" to description of maxFreeSockets (tony-gutierrez <>) + * [[`7df2577`](http://github.com/node-modules/agentkeepalive/commit/7df25774f00a1031ca4daad2878a17e0539072a2)] - test: run test on node 10 (#63) (fengmk2 <>) + 3.4.1 / 2018-03-08 ================== diff --git a/deps/npm/node_modules/agentkeepalive/README.md b/deps/npm/node_modules/agentkeepalive/README.md index ce067f10c7fb7a..823145821b72f1 100644 --- a/deps/npm/node_modules/agentkeepalive/README.md +++ b/deps/npm/node_modules/agentkeepalive/README.md @@ -56,7 +56,7 @@ $ npm install agentkeepalive --save Default is `freeSocketKeepAliveTimeout * 2`. * `maxSockets` {Number} Maximum number of sockets to allow per host. Default = `Infinity`. - * `maxFreeSockets` {Number} Maximum number of sockets to leave open + * `maxFreeSockets` {Number} Maximum number of sockets (per host) to leave open in a free state. Only relevant if `keepAlive` is set to `true`. Default = `256`. * `socketActiveTTL` {Number} Sets the socket active time to live, even if it's in use. diff --git a/deps/npm/node_modules/agentkeepalive/index.d.ts b/deps/npm/node_modules/agentkeepalive/index.d.ts new file mode 100644 index 00000000000000..c11636f7ca116e --- /dev/null +++ b/deps/npm/node_modules/agentkeepalive/index.d.ts @@ -0,0 +1,43 @@ +declare module "agentkeepalive" { + import * as http from 'http'; + import * as https from 'https'; + + interface AgentStatus { + createSocketCount: number, + createSocketErrorCount: number, + closeSocketCount: number, + errorSocketCount: number, + timeoutSocketCount: number, + requestCount: number, + freeSockets: object, + sockets: object, + requests: object, + } + + interface HttpOptions extends http.AgentOptions { + freeSocketKeepAliveTimeout?: number; + timeout?: number; + socketActiveTTL?: number; + } + + interface HttpsOptions extends https.AgentOptions { + freeSocketKeepAliveTimeout?: number; + timeout?: number; + socketActiveTTL?: number; + } + + class internal extends http.Agent { + constructor(opts?: HttpOptions); + readonly statusChanged: boolean; + createSocket(req: http.IncomingMessage, options: http.RequestOptions, cb: Function): void; + getCurrentStatus(): AgentStatus; + } + + namespace internal { + export class HttpsAgent extends internal { + constructor(opts?: HttpsOptions); + } + } + + export = internal; +} diff --git a/deps/npm/node_modules/agentkeepalive/lib/_http_agent.js b/deps/npm/node_modules/agentkeepalive/lib/_http_agent.js index 83f1d115eac84a..c324b7f875ec31 100644 --- a/deps/npm/node_modules/agentkeepalive/lib/_http_agent.js +++ b/deps/npm/node_modules/agentkeepalive/lib/_http_agent.js @@ -380,7 +380,7 @@ Agent.prototype.removeSocket = function removeSocket(s, options) { // [patch start] var freeLen = this.freeSockets[name] ? this.freeSockets[name].length : 0; - var sockLen = freeLen + this.sockets[name] ? this.sockets[name].length : 0; + var sockLen = freeLen + (this.sockets[name] ? this.sockets[name].length : 0); // [patch end] if (this.requests[name] && this.requests[name].length && sockLen < this.maxSockets) { diff --git a/deps/npm/node_modules/agentkeepalive/package.json b/deps/npm/node_modules/agentkeepalive/package.json index c0ce0576bc1070..ba6470dba8a135 100644 --- a/deps/npm/node_modules/agentkeepalive/package.json +++ b/deps/npm/node_modules/agentkeepalive/package.json @@ -1,8 +1,8 @@ { "_from": "agentkeepalive@^3.4.1", - "_id": "agentkeepalive@3.4.1", + "_id": "agentkeepalive@3.5.2", "_inBundle": false, - "_integrity": "sha512-MPIwsZU9PP9kOrZpyu2042kYA8Fdt/AedQYkYXucHgF9QoD9dXVp0ypuGnHXSR0hTstBxdt85Xkh4JolYfK5wg==", + "_integrity": "sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ==", "_location": "/agentkeepalive", "_phantomChildren": {}, "_requested": { @@ -16,14 +16,12 @@ "fetchSpec": "^3.4.1" }, "_requiredBy": [ - "/make-fetch-happen", - "/npm-profile/make-fetch-happen", - "/npm-registry-fetch/make-fetch-happen" + "/make-fetch-happen" ], - "_resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.4.1.tgz", - "_shasum": "aa95aebc3a749bca5ed53e3880a09f5235b48f0c", + "_resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.5.2.tgz", + "_shasum": "a113924dd3fa24a0bc3b78108c450c2abee00f67", "_spec": "agentkeepalive@^3.4.1", - "_where": "/Users/rebecca/code/npm/node_modules/make-fetch-happen", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/make-fetch-happen", "author": { "name": "fengmk2", "email": "fengmk2@gmail.com", @@ -35,7 +33,7 @@ }, "bundleDependencies": false, "ci": { - "version": "4.3.2, 4, 6, 8, 9" + "version": "4, 6, 8, 10" }, "dependencies": { "humanize-ms": "^1.2.1" @@ -43,11 +41,11 @@ "deprecated": false, "description": "Missing keepalive http.Agent", "devDependencies": { - "autod": "^2.8.0", - "egg-bin": "^1.10.3", - "egg-ci": "^1.7.0", - "eslint": "^3.19.0", - "eslint-config-egg": "^4.2.0", + "autod": "^3.0.1", + "egg-bin": "^1.11.1", + "egg-ci": "^1.8.0", + "eslint": "^4.19.1", + "eslint-config-egg": "^6.0.0", "pedding": "^1.1.0" }, "engines": { @@ -55,6 +53,7 @@ }, "files": [ "index.js", + "index.d.ts", "browser.js", "lib" ], @@ -80,5 +79,5 @@ "lint": "eslint lib test index.js", "test": "egg-bin test" }, - "version": "3.4.1" + "version": "3.5.2" } diff --git a/deps/npm/node_modules/block-stream/LICENCE b/deps/npm/node_modules/block-stream/LICENCE deleted file mode 100644 index 74489e2e2658e7..00000000000000 --- a/deps/npm/node_modules/block-stream/LICENCE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) Isaac Z. Schlueter -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/deps/npm/node_modules/block-stream/README.md b/deps/npm/node_modules/block-stream/README.md deleted file mode 100644 index c16e9c468891db..00000000000000 --- a/deps/npm/node_modules/block-stream/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# block-stream - -A stream of blocks. - -Write data into it, and it'll output data in buffer blocks the size you -specify, padding with zeroes if necessary. - -```javascript -var block = new BlockStream(512) -fs.createReadStream("some-file").pipe(block) -block.pipe(fs.createWriteStream("block-file")) -``` - -When `.end()` or `.flush()` is called, it'll pad the block with zeroes. diff --git a/deps/npm/node_modules/block-stream/block-stream.js b/deps/npm/node_modules/block-stream/block-stream.js deleted file mode 100644 index 008de035c2edca..00000000000000 --- a/deps/npm/node_modules/block-stream/block-stream.js +++ /dev/null @@ -1,209 +0,0 @@ -// write data to it, and it'll emit data in 512 byte blocks. -// if you .end() or .flush(), it'll emit whatever it's got, -// padded with nulls to 512 bytes. - -module.exports = BlockStream - -var Stream = require("stream").Stream - , inherits = require("inherits") - , assert = require("assert").ok - , debug = process.env.DEBUG ? console.error : function () {} - -function BlockStream (size, opt) { - this.writable = this.readable = true - this._opt = opt || {} - this._chunkSize = size || 512 - this._offset = 0 - this._buffer = [] - this._bufferLength = 0 - if (this._opt.nopad) this._zeroes = false - else { - this._zeroes = new Buffer(this._chunkSize) - for (var i = 0; i < this._chunkSize; i ++) { - this._zeroes[i] = 0 - } - } -} - -inherits(BlockStream, Stream) - -BlockStream.prototype.write = function (c) { - // debug(" BS write", c) - if (this._ended) throw new Error("BlockStream: write after end") - if (c && !Buffer.isBuffer(c)) c = new Buffer(c + "") - if (c.length) { - this._buffer.push(c) - this._bufferLength += c.length - } - // debug("pushed onto buffer", this._bufferLength) - if (this._bufferLength >= this._chunkSize) { - if (this._paused) { - // debug(" BS paused, return false, need drain") - this._needDrain = true - return false - } - this._emitChunk() - } - return true -} - -BlockStream.prototype.pause = function () { - // debug(" BS pausing") - this._paused = true -} - -BlockStream.prototype.resume = function () { - // debug(" BS resume") - this._paused = false - return this._emitChunk() -} - -BlockStream.prototype.end = function (chunk) { - // debug("end", chunk) - if (typeof chunk === "function") cb = chunk, chunk = null - if (chunk) this.write(chunk) - this._ended = true - this.flush() -} - -BlockStream.prototype.flush = function () { - this._emitChunk(true) -} - -BlockStream.prototype._emitChunk = function (flush) { - // debug("emitChunk flush=%j emitting=%j paused=%j", flush, this._emitting, this._paused) - - // emit a chunk - if (flush && this._zeroes) { - // debug(" BS push zeroes", this._bufferLength) - // push a chunk of zeroes - var padBytes = (this._bufferLength % this._chunkSize) - if (padBytes !== 0) padBytes = this._chunkSize - padBytes - if (padBytes > 0) { - // debug("padBytes", padBytes, this._zeroes.slice(0, padBytes)) - this._buffer.push(this._zeroes.slice(0, padBytes)) - this._bufferLength += padBytes - // debug(this._buffer[this._buffer.length - 1].length, this._bufferLength) - } - } - - if (this._emitting || this._paused) return - this._emitting = true - - // debug(" BS entering loops") - var bufferIndex = 0 - while (this._bufferLength >= this._chunkSize && - (flush || !this._paused)) { - // debug(" BS data emission loop", this._bufferLength) - - var out - , outOffset = 0 - , outHas = this._chunkSize - - while (outHas > 0 && (flush || !this._paused) ) { - // debug(" BS data inner emit loop", this._bufferLength) - var cur = this._buffer[bufferIndex] - , curHas = cur.length - this._offset - // debug("cur=", cur) - // debug("curHas=%j", curHas) - // If it's not big enough to fill the whole thing, then we'll need - // to copy multiple buffers into one. However, if it is big enough, - // then just slice out the part we want, to save unnecessary copying. - // Also, need to copy if we've already done some copying, since buffers - // can't be joined like cons strings. - if (out || curHas < outHas) { - out = out || new Buffer(this._chunkSize) - cur.copy(out, outOffset, - this._offset, this._offset + Math.min(curHas, outHas)) - } else if (cur.length === outHas && this._offset === 0) { - // shortcut -- cur is exactly long enough, and no offset. - out = cur - } else { - // slice out the piece of cur that we need. - out = cur.slice(this._offset, this._offset + outHas) - } - - if (curHas > outHas) { - // means that the current buffer couldn't be completely output - // update this._offset to reflect how much WAS written - this._offset += outHas - outHas = 0 - } else { - // output the entire current chunk. - // toss it away - outHas -= curHas - outOffset += curHas - bufferIndex ++ - this._offset = 0 - } - } - - this._bufferLength -= this._chunkSize - assert(out.length === this._chunkSize) - // debug("emitting data", out) - // debug(" BS emitting, paused=%j", this._paused, this._bufferLength) - this.emit("data", out) - out = null - } - // debug(" BS out of loops", this._bufferLength) - - // whatever is left, it's not enough to fill up a block, or we're paused - this._buffer = this._buffer.slice(bufferIndex) - if (this._paused) { - // debug(" BS paused, leaving", this._bufferLength) - this._needsDrain = true - this._emitting = false - return - } - - // if flushing, and not using null-padding, then need to emit the last - // chunk(s) sitting in the queue. We know that it's not enough to - // fill up a whole block, because otherwise it would have been emitted - // above, but there may be some offset. - var l = this._buffer.length - if (flush && !this._zeroes && l) { - if (l === 1) { - if (this._offset) { - this.emit("data", this._buffer[0].slice(this._offset)) - } else { - this.emit("data", this._buffer[0]) - } - } else { - var outHas = this._bufferLength - , out = new Buffer(outHas) - , outOffset = 0 - for (var i = 0; i < l; i ++) { - var cur = this._buffer[i] - , curHas = cur.length - this._offset - cur.copy(out, outOffset, this._offset) - this._offset = 0 - outOffset += curHas - this._bufferLength -= curHas - } - this.emit("data", out) - } - // truncate - this._buffer.length = 0 - this._bufferLength = 0 - this._offset = 0 - } - - // now either drained or ended - // debug("either draining, or ended", this._bufferLength, this._ended) - // means that we've flushed out all that we can so far. - if (this._needDrain) { - // debug("emitting drain", this._bufferLength) - this._needDrain = false - this.emit("drain") - } - - if ((this._bufferLength === 0) && this._ended && !this._endEmitted) { - // debug("emitting end", this._bufferLength) - this._endEmitted = true - this.emit("end") - } - - this._emitting = false - - // debug(" BS no longer emitting", flush, this._paused, this._emitting, this._bufferLength, this._chunkSize) -} diff --git a/deps/npm/node_modules/block-stream/package.json b/deps/npm/node_modules/block-stream/package.json deleted file mode 100644 index d7d591cf904b07..00000000000000 --- a/deps/npm/node_modules/block-stream/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "_from": "block-stream@*", - "_id": "block-stream@0.0.9", - "_inBundle": false, - "_integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", - "_location": "/block-stream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "block-stream@*", - "name": "block-stream", - "escapedName": "block-stream", - "rawSpec": "*", - "saveSpec": null, - "fetchSpec": "*" - }, - "_requiredBy": [ - "/node-gyp/tar" - ], - "_resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "_shasum": "13ebfe778a03205cfe03751481ebb4b3300c126a", - "_spec": "block-stream@*", - "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/tar", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/block-stream/issues" - }, - "bundleDependencies": false, - "dependencies": { - "inherits": "~2.0.0" - }, - "deprecated": false, - "description": "a stream of blocks", - "devDependencies": { - "tap": "^5.7.1" - }, - "engines": { - "node": "0.4 || >=0.5.8" - }, - "files": [ - "block-stream.js" - ], - "homepage": "https://github.com/isaacs/block-stream#readme", - "license": "ISC", - "main": "block-stream.js", - "name": "block-stream", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/block-stream.git" - }, - "scripts": { - "test": "tap test/*.js --cov" - }, - "version": "0.0.9" -} diff --git a/deps/npm/node_modules/cacache/CHANGELOG.md b/deps/npm/node_modules/cacache/CHANGELOG.md index e140576c3084dc..de84bdbf132169 100644 --- a/deps/npm/node_modules/cacache/CHANGELOG.md +++ b/deps/npm/node_modules/cacache/CHANGELOG.md @@ -2,108 +2,168 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. -### [11.3.3](https://github.com/zkat/cacache/compare/v11.3.2...v11.3.3) (2019-06-17) +### [12.0.2](https://github.com/npm/cacache/compare/v12.0.1...v12.0.2) (2019-07-19) + + + +### [12.0.1](https://github.com/npm/cacache/compare/v12.0.0...v12.0.1) (2019-07-19) + +* **deps** Abstracted out `lib/util/infer-owner.js` to + [@npmcli/infer-owner](https://www.npmjs.com/package/@npmcli/infer-owner) + so that it could be more easily used in other parts of the npm CLI. + + +## [12.0.0](https://github.com/npm/cacache/compare/v11.3.3...v12.0.0) (2019-07-15) + + +### Features + +* infer uid/gid instead of accepting as options ([ac84d14](https://github.com/npm/cacache/commit/ac84d14)) +* **i18n:** add another error message ([676cb32](https://github.com/npm/cacache/commit/676cb32)) + + +### BREAKING CHANGES + +* the uid gid options are no longer respected or +necessary. As of this change, cacache will always match the cache +contents to the ownership of the cache directory (or its parent +directory), regardless of what the caller passes in. + +Reasoning: + +The number one reason to use a uid or gid option was to keep root-owned +files from causing problems in the cache. In npm's case, this meant +that CLI's ./lib/command.js had to work out the appropriate uid and gid, +then pass it to the libnpmcommand module, which had to in turn pass the +uid and gid to npm-registry-fetch, which then passed it to +make-fetch-happen, which passed it to cacache. (For package fetching, +pacote would be in that mix as well.) + +Added to that, `cacache.rm()` will actually _write_ a file into the +cache index, but has no way to accept an option so that its call to +entry-index.js will write the index with the appropriate uid/gid. +Little ownership bugs were all over the place, and tricky to trace +through. (Why should make-fetch-happen even care about accepting or +passing uids and gids? It's an http library.) + +This change allows us to keep the cache from having mixed ownership in +any situation. + +Of course, this _does_ mean that if you have a root-owned but +user-writable folder (for example, `/tmp`), then the cache will try to +chown everything to root. + +The solution is for the user to create a folder, make it user-owned, and +use that, rather than relying on cacache to create the root cache folder. + +If we decide to restore the uid/gid opts, and use ownership inferrence +only when uid/gid are unset, then take care to also make rm take an +option object, and pass it through to entry-index.js. + + + +### [11.3.3](https://github.com/npm/cacache/compare/v11.3.2...v11.3.3) (2019-06-17) ### Bug Fixes -* **audit:** npm audit fix ([200a6d5](https://github.com/zkat/cacache/commit/200a6d5)) -* **config:** Add ssri config 'error' option ([#146](https://github.com/zkat/cacache/issues/146)) ([47de8f5](https://github.com/zkat/cacache/commit/47de8f5)) -* **deps:** npm audit fix ([481a7dc](https://github.com/zkat/cacache/commit/481a7dc)) -* **standard:** standard --fix ([7799149](https://github.com/zkat/cacache/commit/7799149)) -* **write:** avoid another cb never called situation ([5156561](https://github.com/zkat/cacache/commit/5156561)) +* **audit:** npm audit fix ([200a6d5](https://github.com/npm/cacache/commit/200a6d5)) +* **config:** Add ssri config 'error' option ([#146](https://github.com/npm/cacache/issues/146)) ([47de8f5](https://github.com/npm/cacache/commit/47de8f5)) +* **deps:** npm audit fix ([481a7dc](https://github.com/npm/cacache/commit/481a7dc)) +* **standard:** standard --fix ([7799149](https://github.com/npm/cacache/commit/7799149)) +* **write:** avoid another cb never called situation ([5156561](https://github.com/npm/cacache/commit/5156561)) -## [11.3.2](https://github.com/zkat/cacache/compare/v11.3.1...v11.3.2) (2018-12-21) +## [11.3.2](https://github.com/npm/cacache/compare/v11.3.1...v11.3.2) (2018-12-21) ### Bug Fixes -* **get:** make sure to handle errors in the .then ([b10bcd0](https://github.com/zkat/cacache/commit/b10bcd0)) +* **get:** make sure to handle errors in the .then ([b10bcd0](https://github.com/npm/cacache/commit/b10bcd0)) -## [11.3.1](https://github.com/zkat/cacache/compare/v11.3.0...v11.3.1) (2018-11-05) +## [11.3.1](https://github.com/npm/cacache/compare/v11.3.0...v11.3.1) (2018-11-05) ### Bug Fixes -* **get:** export hasContent.sync properly ([d76c920](https://github.com/zkat/cacache/commit/d76c920)) +* **get:** export hasContent.sync properly ([d76c920](https://github.com/npm/cacache/commit/d76c920)) -# [11.3.0](https://github.com/zkat/cacache/compare/v11.2.0...v11.3.0) (2018-11-05) +# [11.3.0](https://github.com/npm/cacache/compare/v11.2.0...v11.3.0) (2018-11-05) ### Features -* **get:** add sync API for reading ([db1e094](https://github.com/zkat/cacache/commit/db1e094)) +* **get:** add sync API for reading ([db1e094](https://github.com/npm/cacache/commit/db1e094)) -# [11.2.0](https://github.com/zkat/cacache/compare/v11.1.0...v11.2.0) (2018-08-08) +# [11.2.0](https://github.com/npm/cacache/compare/v11.1.0...v11.2.0) (2018-08-08) ### Features -* **read:** add sync support to other internal read.js fns ([fe638b6](https://github.com/zkat/cacache/commit/fe638b6)) +* **read:** add sync support to other internal read.js fns ([fe638b6](https://github.com/npm/cacache/commit/fe638b6)) -# [11.1.0](https://github.com/zkat/cacache/compare/v11.0.3...v11.1.0) (2018-08-01) +# [11.1.0](https://github.com/npm/cacache/compare/v11.0.3...v11.1.0) (2018-08-01) ### Features -* **read:** add sync support for low-level content read ([b43af83](https://github.com/zkat/cacache/commit/b43af83)) +* **read:** add sync support for low-level content read ([b43af83](https://github.com/npm/cacache/commit/b43af83)) -## [11.0.3](https://github.com/zkat/cacache/compare/v11.0.2...v11.0.3) (2018-08-01) +## [11.0.3](https://github.com/npm/cacache/compare/v11.0.2...v11.0.3) (2018-08-01) ### Bug Fixes -* **config:** add ssri config options ([#136](https://github.com/zkat/cacache/issues/136)) ([10d5d9a](https://github.com/zkat/cacache/commit/10d5d9a)) -* **perf:** refactor content.read to avoid lstats ([c5ac10e](https://github.com/zkat/cacache/commit/c5ac10e)) -* **test:** oops when removing safe-buffer ([1950490](https://github.com/zkat/cacache/commit/1950490)) +* **config:** add ssri config options ([#136](https://github.com/npm/cacache/issues/136)) ([10d5d9a](https://github.com/npm/cacache/commit/10d5d9a)) +* **perf:** refactor content.read to avoid lstats ([c5ac10e](https://github.com/npm/cacache/commit/c5ac10e)) +* **test:** oops when removing safe-buffer ([1950490](https://github.com/npm/cacache/commit/1950490)) -## [11.0.2](https://github.com/zkat/cacache/compare/v11.0.1...v11.0.2) (2018-05-07) +## [11.0.2](https://github.com/npm/cacache/compare/v11.0.1...v11.0.2) (2018-05-07) ### Bug Fixes -* **verify:** size param no longer lost in a verify ([#131](https://github.com/zkat/cacache/issues/131)) ([c614a19](https://github.com/zkat/cacache/commit/c614a19)), closes [#130](https://github.com/zkat/cacache/issues/130) +* **verify:** size param no longer lost in a verify ([#131](https://github.com/npm/cacache/issues/131)) ([c614a19](https://github.com/npm/cacache/commit/c614a19)), closes [#130](https://github.com/npm/cacache/issues/130) -## [11.0.1](https://github.com/zkat/cacache/compare/v11.0.0...v11.0.1) (2018-04-10) +## [11.0.1](https://github.com/npm/cacache/compare/v11.0.0...v11.0.1) (2018-04-10) -# [11.0.0](https://github.com/zkat/cacache/compare/v10.0.4...v11.0.0) (2018-04-09) +# [11.0.0](https://github.com/npm/cacache/compare/v10.0.4...v11.0.0) (2018-04-09) ### Features -* **opts:** use figgy-pudding for opts ([#128](https://github.com/zkat/cacache/issues/128)) ([33d4eed](https://github.com/zkat/cacache/commit/33d4eed)) +* **opts:** use figgy-pudding for opts ([#128](https://github.com/npm/cacache/issues/128)) ([33d4eed](https://github.com/npm/cacache/commit/33d4eed)) ### meta -* drop support for node@4 ([529f347](https://github.com/zkat/cacache/commit/529f347)) +* drop support for node@4 ([529f347](https://github.com/npm/cacache/commit/529f347)) ### BREAKING CHANGES @@ -113,52 +173,52 @@ All notable changes to this project will be documented in this file. See [standa -## [10.0.4](https://github.com/zkat/cacache/compare/v10.0.3...v10.0.4) (2018-02-16) +## [10.0.4](https://github.com/npm/cacache/compare/v10.0.3...v10.0.4) (2018-02-16) -## [10.0.3](https://github.com/zkat/cacache/compare/v10.0.2...v10.0.3) (2018-02-16) +## [10.0.3](https://github.com/npm/cacache/compare/v10.0.2...v10.0.3) (2018-02-16) ### Bug Fixes -* **content:** rethrow aggregate errors as ENOENT ([fa918f5](https://github.com/zkat/cacache/commit/fa918f5)) +* **content:** rethrow aggregate errors as ENOENT ([fa918f5](https://github.com/npm/cacache/commit/fa918f5)) -## [10.0.2](https://github.com/zkat/cacache/compare/v10.0.1...v10.0.2) (2018-01-07) +## [10.0.2](https://github.com/npm/cacache/compare/v10.0.1...v10.0.2) (2018-01-07) ### Bug Fixes -* **ls:** deleted entries could cause a premature stream EOF ([347dc36](https://github.com/zkat/cacache/commit/347dc36)) +* **ls:** deleted entries could cause a premature stream EOF ([347dc36](https://github.com/npm/cacache/commit/347dc36)) -## [10.0.1](https://github.com/zkat/cacache/compare/v10.0.0...v10.0.1) (2017-11-15) +## [10.0.1](https://github.com/npm/cacache/compare/v10.0.0...v10.0.1) (2017-11-15) ### Bug Fixes -* **move-file:** actually use the fallback to `move-concurrently` (#110) ([073fbe1](https://github.com/zkat/cacache/commit/073fbe1)) +* **move-file:** actually use the fallback to `move-concurrently` (#110) ([073fbe1](https://github.com/npm/cacache/commit/073fbe1)) -# [10.0.0](https://github.com/zkat/cacache/compare/v9.3.0...v10.0.0) (2017-10-23) +# [10.0.0](https://github.com/npm/cacache/compare/v9.3.0...v10.0.0) (2017-10-23) ### Features -* **license:** relicense to ISC (#111) ([fdbb4e5](https://github.com/zkat/cacache/commit/fdbb4e5)) +* **license:** relicense to ISC (#111) ([fdbb4e5](https://github.com/npm/cacache/commit/fdbb4e5)) ### Performance Improvements -* more copyFile benchmarks ([63787bb](https://github.com/zkat/cacache/commit/63787bb)) +* more copyFile benchmarks ([63787bb](https://github.com/npm/cacache/commit/63787bb)) ### BREAKING CHANGES @@ -168,132 +228,132 @@ All notable changes to this project will be documented in this file. See [standa -# [9.3.0](https://github.com/zkat/cacache/compare/v9.2.9...v9.3.0) (2017-10-07) +# [9.3.0](https://github.com/npm/cacache/compare/v9.2.9...v9.3.0) (2017-10-07) ### Features -* **copy:** added cacache.get.copy api for fast copies (#107) ([067b5f6](https://github.com/zkat/cacache/commit/067b5f6)) +* **copy:** added cacache.get.copy api for fast copies (#107) ([067b5f6](https://github.com/npm/cacache/commit/067b5f6)) -## [9.2.9](https://github.com/zkat/cacache/compare/v9.2.8...v9.2.9) (2017-06-17) +## [9.2.9](https://github.com/npm/cacache/compare/v9.2.8...v9.2.9) (2017-06-17) -## [9.2.8](https://github.com/zkat/cacache/compare/v9.2.7...v9.2.8) (2017-06-05) +## [9.2.8](https://github.com/npm/cacache/compare/v9.2.7...v9.2.8) (2017-06-05) ### Bug Fixes -* **ssri:** bump ssri for bugfix ([c3232ea](https://github.com/zkat/cacache/commit/c3232ea)) +* **ssri:** bump ssri for bugfix ([c3232ea](https://github.com/npm/cacache/commit/c3232ea)) -## [9.2.7](https://github.com/zkat/cacache/compare/v9.2.6...v9.2.7) (2017-06-05) +## [9.2.7](https://github.com/npm/cacache/compare/v9.2.6...v9.2.7) (2017-06-05) ### Bug Fixes -* **content:** make verified content completely read-only (#96) ([4131196](https://github.com/zkat/cacache/commit/4131196)) +* **content:** make verified content completely read-only (#96) ([4131196](https://github.com/npm/cacache/commit/4131196)) -## [9.2.6](https://github.com/zkat/cacache/compare/v9.2.5...v9.2.6) (2017-05-31) +## [9.2.6](https://github.com/npm/cacache/compare/v9.2.5...v9.2.6) (2017-05-31) ### Bug Fixes -* **node:** update ssri to prevent old node 4 crash ([5209ffe](https://github.com/zkat/cacache/commit/5209ffe)) +* **node:** update ssri to prevent old node 4 crash ([5209ffe](https://github.com/npm/cacache/commit/5209ffe)) -## [9.2.5](https://github.com/zkat/cacache/compare/v9.2.4...v9.2.5) (2017-05-25) +## [9.2.5](https://github.com/npm/cacache/compare/v9.2.4...v9.2.5) (2017-05-25) ### Bug Fixes -* **deps:** fix lockfile issues and bump ssri ([84e1d7e](https://github.com/zkat/cacache/commit/84e1d7e)) +* **deps:** fix lockfile issues and bump ssri ([84e1d7e](https://github.com/npm/cacache/commit/84e1d7e)) -## [9.2.4](https://github.com/zkat/cacache/compare/v9.2.3...v9.2.4) (2017-05-24) +## [9.2.4](https://github.com/npm/cacache/compare/v9.2.3...v9.2.4) (2017-05-24) ### Bug Fixes -* **deps:** bumping deps ([bbccb12](https://github.com/zkat/cacache/commit/bbccb12)) +* **deps:** bumping deps ([bbccb12](https://github.com/npm/cacache/commit/bbccb12)) -## [9.2.3](https://github.com/zkat/cacache/compare/v9.2.2...v9.2.3) (2017-05-24) +## [9.2.3](https://github.com/npm/cacache/compare/v9.2.2...v9.2.3) (2017-05-24) ### Bug Fixes -* **rm:** stop crashing if content is missing on rm ([ac90bc0](https://github.com/zkat/cacache/commit/ac90bc0)) +* **rm:** stop crashing if content is missing on rm ([ac90bc0](https://github.com/npm/cacache/commit/ac90bc0)) -## [9.2.2](https://github.com/zkat/cacache/compare/v9.2.1...v9.2.2) (2017-05-14) +## [9.2.2](https://github.com/npm/cacache/compare/v9.2.1...v9.2.2) (2017-05-14) ### Bug Fixes -* **i18n:** lets pretend this didn't happen ([519b4ee](https://github.com/zkat/cacache/commit/519b4ee)) +* **i18n:** lets pretend this didn't happen ([519b4ee](https://github.com/npm/cacache/commit/519b4ee)) -## [9.2.1](https://github.com/zkat/cacache/compare/v9.2.0...v9.2.1) (2017-05-14) +## [9.2.1](https://github.com/npm/cacache/compare/v9.2.0...v9.2.1) (2017-05-14) ### Bug Fixes -* **docs:** fixing translation messup ([bb9e4f9](https://github.com/zkat/cacache/commit/bb9e4f9)) +* **docs:** fixing translation messup ([bb9e4f9](https://github.com/npm/cacache/commit/bb9e4f9)) -# [9.2.0](https://github.com/zkat/cacache/compare/v9.1.0...v9.2.0) (2017-05-14) +# [9.2.0](https://github.com/npm/cacache/compare/v9.1.0...v9.2.0) (2017-05-14) ### Features -* **i18n:** add Spanish translation for API ([531f9a4](https://github.com/zkat/cacache/commit/531f9a4)) +* **i18n:** add Spanish translation for API ([531f9a4](https://github.com/npm/cacache/commit/531f9a4)) -# [9.1.0](https://github.com/zkat/cacache/compare/v9.0.0...v9.1.0) (2017-05-14) +# [9.1.0](https://github.com/npm/cacache/compare/v9.0.0...v9.1.0) (2017-05-14) ### Features -* **i18n:** Add Spanish translation and i18n setup (#91) ([323b90c](https://github.com/zkat/cacache/commit/323b90c)) +* **i18n:** Add Spanish translation and i18n setup (#91) ([323b90c](https://github.com/npm/cacache/commit/323b90c)) -# [9.0.0](https://github.com/zkat/cacache/compare/v8.0.0...v9.0.0) (2017-04-28) +# [9.0.0](https://github.com/npm/cacache/compare/v8.0.0...v9.0.0) (2017-04-28) ### Bug Fixes -* **memoization:** actually use the LRU ([0e55dc9](https://github.com/zkat/cacache/commit/0e55dc9)) +* **memoization:** actually use the LRU ([0e55dc9](https://github.com/npm/cacache/commit/0e55dc9)) ### Features -* **memoization:** memoizers can be injected through opts.memoize (#90) ([e5614c7](https://github.com/zkat/cacache/commit/e5614c7)) +* **memoization:** memoizers can be injected through opts.memoize (#90) ([e5614c7](https://github.com/npm/cacache/commit/e5614c7)) ### BREAKING CHANGES @@ -303,12 +363,12 @@ All notable changes to this project will be documented in this file. See [standa -# [8.0.0](https://github.com/zkat/cacache/compare/v7.1.0...v8.0.0) (2017-04-22) +# [8.0.0](https://github.com/npm/cacache/compare/v7.1.0...v8.0.0) (2017-04-22) ### Features -* **read:** change hasContent to return {sri, size} (#88) ([bad6c49](https://github.com/zkat/cacache/commit/bad6c49)), closes [#87](https://github.com/zkat/cacache/issues/87) +* **read:** change hasContent to return {sri, size} (#88) ([bad6c49](https://github.com/npm/cacache/commit/bad6c49)), closes [#87](https://github.com/npm/cacache/issues/87) ### BREAKING CHANGES @@ -318,78 +378,78 @@ All notable changes to this project will be documented in this file. See [standa -# [7.1.0](https://github.com/zkat/cacache/compare/v7.0.5...v7.1.0) (2017-04-20) +# [7.1.0](https://github.com/npm/cacache/compare/v7.0.5...v7.1.0) (2017-04-20) ### Features -* **size:** handle content size info (#49) ([91230af](https://github.com/zkat/cacache/commit/91230af)) +* **size:** handle content size info (#49) ([91230af](https://github.com/npm/cacache/commit/91230af)) -## [7.0.5](https://github.com/zkat/cacache/compare/v7.0.4...v7.0.5) (2017-04-18) +## [7.0.5](https://github.com/npm/cacache/compare/v7.0.4...v7.0.5) (2017-04-18) ### Bug Fixes -* **integrity:** new ssri with fixed integrity stream ([6d13e8e](https://github.com/zkat/cacache/commit/6d13e8e)) -* **write:** wrap stuff in promises to improve errors ([3624fc5](https://github.com/zkat/cacache/commit/3624fc5)) +* **integrity:** new ssri with fixed integrity stream ([6d13e8e](https://github.com/npm/cacache/commit/6d13e8e)) +* **write:** wrap stuff in promises to improve errors ([3624fc5](https://github.com/npm/cacache/commit/3624fc5)) -## [7.0.4](https://github.com/zkat/cacache/compare/v7.0.3...v7.0.4) (2017-04-15) +## [7.0.4](https://github.com/npm/cacache/compare/v7.0.3...v7.0.4) (2017-04-15) ### Bug Fixes -* **fix-owner:** throw away ENOENTs on chownr ([d49bbcd](https://github.com/zkat/cacache/commit/d49bbcd)) +* **fix-owner:** throw away ENOENTs on chownr ([d49bbcd](https://github.com/npm/cacache/commit/d49bbcd)) -## [7.0.3](https://github.com/zkat/cacache/compare/v7.0.2...v7.0.3) (2017-04-05) +## [7.0.3](https://github.com/npm/cacache/compare/v7.0.2...v7.0.3) (2017-04-05) ### Bug Fixes -* **read:** fixing error message for integrity verification failures ([9d4f0a5](https://github.com/zkat/cacache/commit/9d4f0a5)) +* **read:** fixing error message for integrity verification failures ([9d4f0a5](https://github.com/npm/cacache/commit/9d4f0a5)) -## [7.0.2](https://github.com/zkat/cacache/compare/v7.0.1...v7.0.2) (2017-04-03) +## [7.0.2](https://github.com/npm/cacache/compare/v7.0.1...v7.0.2) (2017-04-03) ### Bug Fixes -* **integrity:** use EINTEGRITY error code and update ssri ([8dc2e62](https://github.com/zkat/cacache/commit/8dc2e62)) +* **integrity:** use EINTEGRITY error code and update ssri ([8dc2e62](https://github.com/npm/cacache/commit/8dc2e62)) -## [7.0.1](https://github.com/zkat/cacache/compare/v7.0.0...v7.0.1) (2017-04-03) +## [7.0.1](https://github.com/npm/cacache/compare/v7.0.0...v7.0.1) (2017-04-03) ### Bug Fixes -* **docs:** fix header name conflict in readme ([afcd456](https://github.com/zkat/cacache/commit/afcd456)) +* **docs:** fix header name conflict in readme ([afcd456](https://github.com/npm/cacache/commit/afcd456)) -# [7.0.0](https://github.com/zkat/cacache/compare/v6.3.0...v7.0.0) (2017-04-03) +# [7.0.0](https://github.com/npm/cacache/compare/v6.3.0...v7.0.0) (2017-04-03) ### Bug Fixes -* **test:** fix content.write tests when running in docker ([d2e9b6a](https://github.com/zkat/cacache/commit/d2e9b6a)) +* **test:** fix content.write tests when running in docker ([d2e9b6a](https://github.com/npm/cacache/commit/d2e9b6a)) ### Features -* **integrity:** subresource integrity support (#78) ([b1e731f](https://github.com/zkat/cacache/commit/b1e731f)) +* **integrity:** subresource integrity support (#78) ([b1e731f](https://github.com/npm/cacache/commit/b1e731f)) ### BREAKING CHANGES @@ -425,150 +485,150 @@ All notable changes to this project will be documented in this file. See [standa -# [6.3.0](https://github.com/zkat/cacache/compare/v6.2.0...v6.3.0) (2017-04-01) +# [6.3.0](https://github.com/npm/cacache/compare/v6.2.0...v6.3.0) (2017-04-01) ### Bug Fixes -* **fixOwner:** ignore EEXIST race condition from mkdirp ([4670e9b](https://github.com/zkat/cacache/commit/4670e9b)) -* **index:** ignore index removal races when inserting ([b9d2fa2](https://github.com/zkat/cacache/commit/b9d2fa2)) -* **memo:** use lru-cache for better mem management (#75) ([d8ac5aa](https://github.com/zkat/cacache/commit/d8ac5aa)) +* **fixOwner:** ignore EEXIST race condition from mkdirp ([4670e9b](https://github.com/npm/cacache/commit/4670e9b)) +* **index:** ignore index removal races when inserting ([b9d2fa2](https://github.com/npm/cacache/commit/b9d2fa2)) +* **memo:** use lru-cache for better mem management (#75) ([d8ac5aa](https://github.com/npm/cacache/commit/d8ac5aa)) ### Features -* **dependencies:** Switch to move-concurrently (#77) ([dc6482d](https://github.com/zkat/cacache/commit/dc6482d)) +* **dependencies:** Switch to move-concurrently (#77) ([dc6482d](https://github.com/npm/cacache/commit/dc6482d)) -# [6.2.0](https://github.com/zkat/cacache/compare/v6.1.2...v6.2.0) (2017-03-15) +# [6.2.0](https://github.com/npm/cacache/compare/v6.1.2...v6.2.0) (2017-03-15) ### Bug Fixes -* **index:** additional bucket entry verification with checksum (#72) ([f8e0f25](https://github.com/zkat/cacache/commit/f8e0f25)) -* **verify:** return fixOwner.chownr promise ([6818521](https://github.com/zkat/cacache/commit/6818521)) +* **index:** additional bucket entry verification with checksum (#72) ([f8e0f25](https://github.com/npm/cacache/commit/f8e0f25)) +* **verify:** return fixOwner.chownr promise ([6818521](https://github.com/npm/cacache/commit/6818521)) ### Features -* **tmp:** safe tmp dir creation/management util (#73) ([c42da71](https://github.com/zkat/cacache/commit/c42da71)) +* **tmp:** safe tmp dir creation/management util (#73) ([c42da71](https://github.com/npm/cacache/commit/c42da71)) -## [6.1.2](https://github.com/zkat/cacache/compare/v6.1.1...v6.1.2) (2017-03-13) +## [6.1.2](https://github.com/npm/cacache/compare/v6.1.1...v6.1.2) (2017-03-13) ### Bug Fixes -* **index:** set default hashAlgorithm ([d6eb2f0](https://github.com/zkat/cacache/commit/d6eb2f0)) +* **index:** set default hashAlgorithm ([d6eb2f0](https://github.com/npm/cacache/commit/d6eb2f0)) -## [6.1.1](https://github.com/zkat/cacache/compare/v6.1.0...v6.1.1) (2017-03-13) +## [6.1.1](https://github.com/npm/cacache/compare/v6.1.0...v6.1.1) (2017-03-13) ### Bug Fixes -* **coverage:** bumping coverage for verify (#71) ([0b7faf6](https://github.com/zkat/cacache/commit/0b7faf6)) -* **deps:** glob should have been a regular dep :< ([0640bc4](https://github.com/zkat/cacache/commit/0640bc4)) +* **coverage:** bumping coverage for verify (#71) ([0b7faf6](https://github.com/npm/cacache/commit/0b7faf6)) +* **deps:** glob should have been a regular dep :< ([0640bc4](https://github.com/npm/cacache/commit/0640bc4)) -# [6.1.0](https://github.com/zkat/cacache/compare/v6.0.2...v6.1.0) (2017-03-12) +# [6.1.0](https://github.com/npm/cacache/compare/v6.0.2...v6.1.0) (2017-03-12) ### Bug Fixes -* **coverage:** more coverage for content reads (#70) ([ef4f70a](https://github.com/zkat/cacache/commit/ef4f70a)) -* **tests:** use safe-buffer because omfg (#69) ([6ab8132](https://github.com/zkat/cacache/commit/6ab8132)) +* **coverage:** more coverage for content reads (#70) ([ef4f70a](https://github.com/npm/cacache/commit/ef4f70a)) +* **tests:** use safe-buffer because omfg (#69) ([6ab8132](https://github.com/npm/cacache/commit/6ab8132)) ### Features -* **rm:** limited rm.all and fixed bugs (#66) ([d5d25ba](https://github.com/zkat/cacache/commit/d5d25ba)), closes [#66](https://github.com/zkat/cacache/issues/66) -* **verify:** tested, working cache verifier/gc (#68) ([45ad77a](https://github.com/zkat/cacache/commit/45ad77a)) +* **rm:** limited rm.all and fixed bugs (#66) ([d5d25ba](https://github.com/npm/cacache/commit/d5d25ba)), closes [#66](https://github.com/npm/cacache/issues/66) +* **verify:** tested, working cache verifier/gc (#68) ([45ad77a](https://github.com/npm/cacache/commit/45ad77a)) -## [6.0.2](https://github.com/zkat/cacache/compare/v6.0.1...v6.0.2) (2017-03-11) +## [6.0.2](https://github.com/npm/cacache/compare/v6.0.1...v6.0.2) (2017-03-11) ### Bug Fixes -* **index:** segment cache items with another subbucket (#64) ([c3644e5](https://github.com/zkat/cacache/commit/c3644e5)) +* **index:** segment cache items with another subbucket (#64) ([c3644e5](https://github.com/npm/cacache/commit/c3644e5)) -## [6.0.1](https://github.com/zkat/cacache/compare/v6.0.0...v6.0.1) (2017-03-05) +## [6.0.1](https://github.com/npm/cacache/compare/v6.0.0...v6.0.1) (2017-03-05) ### Bug Fixes -* **docs:** Missed spots in README ([8ffb7fa](https://github.com/zkat/cacache/commit/8ffb7fa)) +* **docs:** Missed spots in README ([8ffb7fa](https://github.com/npm/cacache/commit/8ffb7fa)) -# [6.0.0](https://github.com/zkat/cacache/compare/v5.0.3...v6.0.0) (2017-03-05) +# [6.0.0](https://github.com/npm/cacache/compare/v5.0.3...v6.0.0) (2017-03-05) ### Bug Fixes -* **api:** keep memo cache mostly-internal ([2f72d0a](https://github.com/zkat/cacache/commit/2f72d0a)) -* **content:** use the rest of the string, not the whole string ([fa8f3c3](https://github.com/zkat/cacache/commit/fa8f3c3)) -* **deps:** removed `format-number[@2](https://github.com/2).0.2` ([1187791](https://github.com/zkat/cacache/commit/1187791)) -* **deps:** removed inflight[@1](https://github.com/1).0.6 ([0d1819c](https://github.com/zkat/cacache/commit/0d1819c)) -* **deps:** rimraf[@2](https://github.com/2).6.1 ([9efab6b](https://github.com/zkat/cacache/commit/9efab6b)) -* **deps:** standard[@9](https://github.com/9).0.0 ([4202cba](https://github.com/zkat/cacache/commit/4202cba)) -* **deps:** tap[@10](https://github.com/10).3.0 ([aa03088](https://github.com/zkat/cacache/commit/aa03088)) -* **deps:** weallcontribute[@1](https://github.com/1).0.8 ([ad4f4dc](https://github.com/zkat/cacache/commit/ad4f4dc)) -* **docs:** add security note to hashKey ([03f81ba](https://github.com/zkat/cacache/commit/03f81ba)) -* **hashes:** change default hashAlgorithm to sha512 ([ea00ba6](https://github.com/zkat/cacache/commit/ea00ba6)) -* **hashes:** missed a spot for hashAlgorithm defaults ([45997d8](https://github.com/zkat/cacache/commit/45997d8)) -* **index:** add length header before JSON for verification ([fb8cb4d](https://github.com/zkat/cacache/commit/fb8cb4d)) -* **index:** change index filenames to sha1s of keys ([bbc5fca](https://github.com/zkat/cacache/commit/bbc5fca)) -* **index:** who cares about race conditions anyway ([b1d3888](https://github.com/zkat/cacache/commit/b1d3888)) -* **perf:** bulk-read get+read for massive speed ([d26cdf9](https://github.com/zkat/cacache/commit/d26cdf9)) -* **perf:** use bulk file reads for index reads ([79a8891](https://github.com/zkat/cacache/commit/79a8891)) -* **put-stream:** remove tmp file on stream insert error ([65f6632](https://github.com/zkat/cacache/commit/65f6632)) -* **put-stream:** robustified and predictibilized ([daf9e08](https://github.com/zkat/cacache/commit/daf9e08)) -* **put-stream:** use new promise API for moves ([1d36013](https://github.com/zkat/cacache/commit/1d36013)) -* **readme:** updated to reflect new default hashAlgo ([c60a2fa](https://github.com/zkat/cacache/commit/c60a2fa)) -* **verify:** tiny typo fix ([db22d05](https://github.com/zkat/cacache/commit/db22d05)) +* **api:** keep memo cache mostly-internal ([2f72d0a](https://github.com/npm/cacache/commit/2f72d0a)) +* **content:** use the rest of the string, not the whole string ([fa8f3c3](https://github.com/npm/cacache/commit/fa8f3c3)) +* **deps:** removed `format-number@2.0.2` ([1187791](https://github.com/npm/cacache/commit/1187791)) +* **deps:** removed inflight@1.0.6 ([0d1819c](https://github.com/npm/cacache/commit/0d1819c)) +* **deps:** rimraf@2.6.1 ([9efab6b](https://github.com/npm/cacache/commit/9efab6b)) +* **deps:** standard@9.0.0 ([4202cba](https://github.com/npm/cacache/commit/4202cba)) +* **deps:** tap@10.3.0 ([aa03088](https://github.com/npm/cacache/commit/aa03088)) +* **deps:** weallcontribute@1.0.8 ([ad4f4dc](https://github.com/npm/cacache/commit/ad4f4dc)) +* **docs:** add security note to hashKey ([03f81ba](https://github.com/npm/cacache/commit/03f81ba)) +* **hashes:** change default hashAlgorithm to sha512 ([ea00ba6](https://github.com/npm/cacache/commit/ea00ba6)) +* **hashes:** missed a spot for hashAlgorithm defaults ([45997d8](https://github.com/npm/cacache/commit/45997d8)) +* **index:** add length header before JSON for verification ([fb8cb4d](https://github.com/npm/cacache/commit/fb8cb4d)) +* **index:** change index filenames to sha1s of keys ([bbc5fca](https://github.com/npm/cacache/commit/bbc5fca)) +* **index:** who cares about race conditions anyway ([b1d3888](https://github.com/npm/cacache/commit/b1d3888)) +* **perf:** bulk-read get+read for massive speed ([d26cdf9](https://github.com/npm/cacache/commit/d26cdf9)) +* **perf:** use bulk file reads for index reads ([79a8891](https://github.com/npm/cacache/commit/79a8891)) +* **put-stream:** remove tmp file on stream insert error ([65f6632](https://github.com/npm/cacache/commit/65f6632)) +* **put-stream:** robustified and predictibilized ([daf9e08](https://github.com/npm/cacache/commit/daf9e08)) +* **put-stream:** use new promise API for moves ([1d36013](https://github.com/npm/cacache/commit/1d36013)) +* **readme:** updated to reflect new default hashAlgo ([c60a2fa](https://github.com/npm/cacache/commit/c60a2fa)) +* **verify:** tiny typo fix ([db22d05](https://github.com/npm/cacache/commit/db22d05)) ### Features -* **api:** converted external api ([7bf032f](https://github.com/zkat/cacache/commit/7bf032f)) -* **cacache:** exported clearMemoized() utility ([8d2c5b6](https://github.com/zkat/cacache/commit/8d2c5b6)) -* **cache:** add versioning to content and index ([31bc549](https://github.com/zkat/cacache/commit/31bc549)) -* **content:** collate content files into subdirs ([c094d9f](https://github.com/zkat/cacache/commit/c094d9f)) -* **deps:** [@npmcorp](https://github.com/npmcorp)/move[@1](https://github.com/1).0.0 ([bdd00bf](https://github.com/zkat/cacache/commit/bdd00bf)) -* **deps:** bluebird[@3](https://github.com/3).4.7 ([3a17aff](https://github.com/zkat/cacache/commit/3a17aff)) -* **deps:** promise-inflight[@1](https://github.com/1).0.1 ([a004fe6](https://github.com/zkat/cacache/commit/a004fe6)) -* **get:** added memoization support for get ([c77d794](https://github.com/zkat/cacache/commit/c77d794)) -* **get:** export hasContent ([2956ec3](https://github.com/zkat/cacache/commit/2956ec3)) -* **index:** add hashAlgorithm and format insert ret val ([b639746](https://github.com/zkat/cacache/commit/b639746)) -* **index:** collate index files into subdirs ([e8402a5](https://github.com/zkat/cacache/commit/e8402a5)) -* **index:** promisify entry index ([cda3335](https://github.com/zkat/cacache/commit/cda3335)) -* **memo:** added memoization lib ([da07b92](https://github.com/zkat/cacache/commit/da07b92)) -* **memo:** export memoization api ([954b1b3](https://github.com/zkat/cacache/commit/954b1b3)) -* **move-file:** add move fallback for weird errors ([5cf4616](https://github.com/zkat/cacache/commit/5cf4616)) -* **perf:** bulk content write api ([51b536e](https://github.com/zkat/cacache/commit/51b536e)) -* **put:** added memoization support to put ([b613a70](https://github.com/zkat/cacache/commit/b613a70)) -* **read:** switched to promises ([a869362](https://github.com/zkat/cacache/commit/a869362)) -* **rm:** added memoization support to rm ([4205cf0](https://github.com/zkat/cacache/commit/4205cf0)) -* **rm:** switched to promises ([a000d24](https://github.com/zkat/cacache/commit/a000d24)) -* **util:** promise-inflight ownership fix requests ([9517cd7](https://github.com/zkat/cacache/commit/9517cd7)) -* **util:** use promises for api ([ae204bb](https://github.com/zkat/cacache/commit/ae204bb)) -* **verify:** converted to Promises ([f0b3974](https://github.com/zkat/cacache/commit/f0b3974)) +* **api:** converted external api ([7bf032f](https://github.com/npm/cacache/commit/7bf032f)) +* **cacache:** exported clearMemoized() utility ([8d2c5b6](https://github.com/npm/cacache/commit/8d2c5b6)) +* **cache:** add versioning to content and index ([31bc549](https://github.com/npm/cacache/commit/31bc549)) +* **content:** collate content files into subdirs ([c094d9f](https://github.com/npm/cacache/commit/c094d9f)) +* **deps:** `@npmcorp/move@1.0.0` ([bdd00bf](https://github.com/npm/cacache/commit/bdd00bf)) +* **deps:** `bluebird@3.4.7` ([3a17aff](https://github.com/npm/cacache/commit/3a17aff)) +* **deps:** `promise-inflight@1.0.1` ([a004fe6](https://github.com/npm/cacache/commit/a004fe6)) +* **get:** added memoization support for get ([c77d794](https://github.com/npm/cacache/commit/c77d794)) +* **get:** export hasContent ([2956ec3](https://github.com/npm/cacache/commit/2956ec3)) +* **index:** add hashAlgorithm and format insert ret val ([b639746](https://github.com/npm/cacache/commit/b639746)) +* **index:** collate index files into subdirs ([e8402a5](https://github.com/npm/cacache/commit/e8402a5)) +* **index:** promisify entry index ([cda3335](https://github.com/npm/cacache/commit/cda3335)) +* **memo:** added memoization lib ([da07b92](https://github.com/npm/cacache/commit/da07b92)) +* **memo:** export memoization api ([954b1b3](https://github.com/npm/cacache/commit/954b1b3)) +* **move-file:** add move fallback for weird errors ([5cf4616](https://github.com/npm/cacache/commit/5cf4616)) +* **perf:** bulk content write api ([51b536e](https://github.com/npm/cacache/commit/51b536e)) +* **put:** added memoization support to put ([b613a70](https://github.com/npm/cacache/commit/b613a70)) +* **read:** switched to promises ([a869362](https://github.com/npm/cacache/commit/a869362)) +* **rm:** added memoization support to rm ([4205cf0](https://github.com/npm/cacache/commit/4205cf0)) +* **rm:** switched to promises ([a000d24](https://github.com/npm/cacache/commit/a000d24)) +* **util:** promise-inflight ownership fix requests ([9517cd7](https://github.com/npm/cacache/commit/9517cd7)) +* **util:** use promises for api ([ae204bb](https://github.com/npm/cacache/commit/ae204bb)) +* **verify:** converted to Promises ([f0b3974](https://github.com/npm/cacache/commit/f0b3974)) ### BREAKING CHANGES diff --git a/deps/npm/node_modules/cacache/README.md b/deps/npm/node_modules/cacache/README.md index 971b7b0b747a01..7f8ec5eec05ff8 100644 --- a/deps/npm/node_modules/cacache/README.md +++ b/deps/npm/node_modules/cacache/README.md @@ -1,12 +1,16 @@ -# cacache [![npm version](https://img.shields.io/npm/v/cacache.svg)](https://npm.im/cacache) [![license](https://img.shields.io/npm/l/cacache.svg)](https://npm.im/cacache) [![Travis](https://img.shields.io/travis/zkat/cacache.svg)](https://travis-ci.org/zkat/cacache) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/cacache?svg=true)](https://ci.appveyor.com/project/zkat/cacache) [![Coverage Status](https://coveralls.io/repos/github/zkat/cacache/badge.svg?branch=latest)](https://coveralls.io/github/zkat/cacache?branch=latest) +# cacache [![npm version](https://img.shields.io/npm/v/cacache.svg)](https://npm.im/cacache) [![license](https://img.shields.io/npm/l/cacache.svg)](https://npm.im/cacache) [![Travis](https://img.shields.io/travis/npm/cacache.svg)](https://travis-ci.org/npm/cacache) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/npm/cacache?svg=true)](https://ci.appveyor.com/project/npm/cacache) [![Coverage Status](https://coveralls.io/repos/github/npm/cacache/badge.svg?branch=latest)](https://coveralls.io/github/npm/cacache?branch=latest) -[`cacache`](https://github.com/zkat/cacache) is a Node.js library for managing +[`cacache`](https://github.com/npm/cacache) is a Node.js library for managing local key and content address caches. It's really fast, really good at concurrency, and it will never give you corrupted data, even if cache files get corrupted or manipulated. -It was originally written to be used as [npm](https://npm.im)'s local cache, but -can just as easily be used on its own. +On systems that support user and group settings on files, cacache will +match the `uid` and `gid` values to the folder where the cache lives, even +when running as `root`. + +It was written to be used as [npm](https://npm.im)'s local cache, but can +just as easily be used on its own. _Translations: [español](README.es.md)_ @@ -414,13 +418,6 @@ may also use any anagram of `'modnar'` to use this feature. Currently only supports one algorithm at a time (i.e., an array length of exactly `1`). Has no effect if `opts.integrity` is present. -##### `opts.uid`/`opts.gid` - -If provided, cacache will do its best to make sure any new files added to the -cache use this particular `uid`/`gid` combination. This can be used, -for example, to drop permissions when someone uses `sudo`, but cacache makes -no assumptions about your needs here. - ##### `opts.memoize` Default: null @@ -498,10 +495,11 @@ Completely resets the in-memory entry cache. Returns a unique temporary directory inside the cache's `tmp` dir. This directory will use the same safe user assignment that all the other stuff use. -Once the directory is made, it's the user's responsibility that all files within -are made according to the same `opts.gid`/`opts.uid` settings that would be -passed in. If not, you can ask cacache to do it for you by calling -[`tmp.fix()`](#tmp-fix), which will fix all tmp directory permissions. +Once the directory is made, it's the user's responsibility that all files +within are given the appropriate `gid`/`uid` ownership settings to match +the rest of the cache. If not, you can ask cacache to do it for you by +calling [`tmp.fix()`](#tmp-fix), which will fix all tmp directory +permissions. If you want automatic cleanup of this directory, use [`tmp.withTmp()`](#with-tpm) @@ -514,6 +512,27 @@ cacache.tmp.mkdir(cache).then(dir => { }) ``` +#### `> tmp.fix(cache) -> Promise` + +Sets the `uid` and `gid` properties on all files and folders within the tmp +folder to match the rest of the cache. + +Use this after manually writing files into [`tmp.mkdir`](#tmp-mkdir) or +[`tmp.withTmp`](#with-tmp). + +##### Example + +```javascript +cacache.tmp.mkdir(cache).then(dir => { + writeFile(path.join(dir, 'file'), someData).then(() => { + // make sure we didn't just put a root-owned file in the cache + cacache.tmp.fix().then(() => { + // all uids and gids match now + }) + }) +}) +``` + #### `> tmp.withTmp(cache, opts, cb) -> Promise` Creates a temporary directory with [`tmp.mkdir()`](#tmp-mkdir) and calls `cb` @@ -591,8 +610,6 @@ of entries removed, etc. ##### Options -* `opts.uid` - uid to assign to cache and its contents -* `opts.gid` - gid to assign to cache and its contents * `opts.filter` - receives a formatted entry. Return false to remove it. Note: might be called more than once on the same entry. diff --git a/deps/npm/node_modules/cacache/lib/content/write.js b/deps/npm/node_modules/cacache/lib/content/write.js index 150371cb857a6f..4d96a3cffe1f10 100644 --- a/deps/npm/node_modules/cacache/lib/content/write.js +++ b/deps/npm/node_modules/cacache/lib/content/write.js @@ -121,7 +121,7 @@ function pipeToTmp (inputStream, cache, tmpTarget, opts, errCheck) { function makeTmp (cache, opts) { const tmpTarget = uniqueFilename(path.join(cache, 'tmp'), opts.tmpPrefix) return fixOwner.mkdirfix( - path.dirname(tmpTarget), opts.uid, opts.gid + cache, path.dirname(tmpTarget) ).then(() => ({ target: tmpTarget, moved: false @@ -134,14 +134,14 @@ function moveToDestination (tmp, cache, sri, opts, errCheck) { const destDir = path.dirname(destination) return fixOwner.mkdirfix( - destDir, opts.uid, opts.gid + cache, destDir ).then(() => { errCheck && errCheck() return moveFile(tmp.target, destination) }).then(() => { errCheck && errCheck() tmp.moved = true - return fixOwner.chownr(destination, opts.uid, opts.gid) + return fixOwner.chownr(cache, destination) }) } diff --git a/deps/npm/node_modules/cacache/lib/entry-index.js b/deps/npm/node_modules/cacache/lib/entry-index.js index d2549e7136749b..dee1824b1d091b 100644 --- a/deps/npm/node_modules/cacache/lib/entry-index.js +++ b/deps/npm/node_modules/cacache/lib/entry-index.js @@ -32,9 +32,7 @@ module.exports.NotFoundError = class NotFoundError extends Error { const IndexOpts = figgyPudding({ metadata: {}, - size: {}, - uid: {}, - gid: {} + size: {} }) module.exports.insert = insert @@ -49,7 +47,7 @@ function insert (cache, key, integrity, opts) { metadata: opts.metadata } return fixOwner.mkdirfix( - path.dirname(bucket), opts.uid, opts.gid + cache, path.dirname(bucket) ).then(() => { const stringified = JSON.stringify(entry) // NOTE - Cleverness ahoy! @@ -63,7 +61,7 @@ function insert (cache, key, integrity, opts) { bucket, `\n${hashEntry(stringified)}\t${stringified}` ) }).then( - () => fixOwner.chownr(bucket, opts.uid, opts.gid) + () => fixOwner.chownr(cache, bucket) ).catch({ code: 'ENOENT' }, () => { // There's a class of race conditions that happen when things get deleted // during fixOwner, or between the two mkdirfix/chownr calls. @@ -86,13 +84,13 @@ function insertSync (cache, key, integrity, opts) { size: opts.size, metadata: opts.metadata } - fixOwner.mkdirfix.sync(path.dirname(bucket), opts.uid, opts.gid) + fixOwner.mkdirfix.sync(cache, path.dirname(bucket)) const stringified = JSON.stringify(entry) fs.appendFileSync( bucket, `\n${hashEntry(stringified)}\t${stringified}` ) try { - fixOwner.chownr.sync(bucket, opts.uid, opts.gid) + fixOwner.chownr.sync(cache, bucket) } catch (err) { if (err.code !== 'ENOENT') { throw err diff --git a/deps/npm/node_modules/cacache/lib/util/fix-owner.js b/deps/npm/node_modules/cacache/lib/util/fix-owner.js index 563724ca6e8616..c91c709d9586b6 100644 --- a/deps/npm/node_modules/cacache/lib/util/fix-owner.js +++ b/deps/npm/node_modules/cacache/lib/util/fix-owner.js @@ -5,83 +5,115 @@ const BB = require('bluebird') const chownr = BB.promisify(require('chownr')) const mkdirp = BB.promisify(require('mkdirp')) const inflight = require('promise-inflight') +const inferOwner = require('infer-owner') + +// Memoize getuid()/getgid() calls. +// patch process.setuid/setgid to invalidate cached value on change +const self = { uid: null, gid: null } +const getSelf = () => { + if (typeof self.uid !== 'number') { + self.uid = process.getuid() + const setuid = process.setuid + process.setuid = (uid) => { + self.uid = null + process.setuid = setuid + return process.setuid(uid) + } + } + if (typeof self.gid !== 'number') { + self.gid = process.getgid() + const setgid = process.setgid + process.setgid = (gid) => { + self.gid = null + process.setgid = setgid + return process.setgid(gid) + } + } +} module.exports.chownr = fixOwner -function fixOwner (filepath, uid, gid) { +function fixOwner (cache, filepath) { if (!process.getuid) { // This platform doesn't need ownership fixing return BB.resolve() } - if (typeof uid !== 'number' && typeof gid !== 'number') { - // There's no permissions override. Nothing to do here. - return BB.resolve() - } - if ((typeof uid === 'number' && process.getuid() === uid) && - (typeof gid === 'number' && process.getgid() === gid)) { + return BB.resolve(inferOwner(cache)).then(owner => { + const { uid, gid } = owner + getSelf() + // No need to override if it's already what we used. - return BB.resolve() - } - return inflight( - 'fixOwner: fixing ownership on ' + filepath, - () => chownr( - filepath, - typeof uid === 'number' ? uid : process.getuid(), - typeof gid === 'number' ? gid : process.getgid() - ).catch({ code: 'ENOENT' }, () => null) - ) + if (self.uid === uid && self.gid === gid) { + return + } + + return inflight( + 'fixOwner: fixing ownership on ' + filepath, + () => chownr( + filepath, + typeof uid === 'number' ? uid : self.uid, + typeof gid === 'number' ? gid : self.gid + ).catch({ code: 'ENOENT' }, () => null) + ) + }) } module.exports.chownr.sync = fixOwnerSync -function fixOwnerSync (filepath, uid, gid) { +function fixOwnerSync (cache, filepath) { if (!process.getuid) { // This platform doesn't need ownership fixing return } - if (typeof uid !== 'number' && typeof gid !== 'number') { - // There's no permissions override. Nothing to do here. - return - } - if ((typeof uid === 'number' && process.getuid() === uid) && - (typeof gid === 'number' && process.getgid() === gid)) { + const { uid, gid } = inferOwner.sync(cache) + getSelf() + if (self.uid === uid && self.gid === gid) { // No need to override if it's already what we used. return } try { chownr.sync( filepath, - typeof uid === 'number' ? uid : process.getuid(), - typeof gid === 'number' ? gid : process.getgid() + typeof uid === 'number' ? uid : self.uid, + typeof gid === 'number' ? gid : self.gid ) } catch (err) { + // only catch ENOENT, any other error is a problem. if (err.code === 'ENOENT') { return null } + throw err } } module.exports.mkdirfix = mkdirfix -function mkdirfix (p, uid, gid, cb) { - return mkdirp(p).then(made => { - if (made) { - return fixOwner(made, uid, gid).then(() => made) - } - }).catch({ code: 'EEXIST' }, () => { - // There's a race in mkdirp! - return fixOwner(p, uid, gid).then(() => null) +function mkdirfix (cache, p, cb) { + // we have to infer the owner _before_ making the directory, even though + // we aren't going to use the results, since the cache itself might not + // exist yet. If we mkdirp it, then our current uid/gid will be assumed + // to be correct if it creates the cache folder in the process. + return BB.resolve(inferOwner(cache)).then(() => { + return mkdirp(p).then(made => { + if (made) { + return fixOwner(cache, made).then(() => made) + } + }).catch({ code: 'EEXIST' }, () => { + // There's a race in mkdirp! + return fixOwner(cache, p).then(() => null) + }) }) } module.exports.mkdirfix.sync = mkdirfixSync -function mkdirfixSync (p, uid, gid) { +function mkdirfixSync (cache, p) { try { + inferOwner.sync(cache) const made = mkdirp.sync(p) if (made) { - fixOwnerSync(made, uid, gid) + fixOwnerSync(cache, made) return made } } catch (err) { if (err.code === 'EEXIST') { - fixOwnerSync(p, uid, gid) + fixOwnerSync(cache, p) return null } else { throw err diff --git a/deps/npm/node_modules/cacache/lib/util/tmp.js b/deps/npm/node_modules/cacache/lib/util/tmp.js index 65fc4b297eb420..78494b8eae7128 100644 --- a/deps/npm/node_modules/cacache/lib/util/tmp.js +++ b/deps/npm/node_modules/cacache/lib/util/tmp.js @@ -9,16 +9,14 @@ const rimraf = BB.promisify(require('rimraf')) const uniqueFilename = require('unique-filename') const TmpOpts = figgyPudding({ - tmpPrefix: {}, - uid: {}, - gid: {} + tmpPrefix: {} }) module.exports.mkdir = mktmpdir function mktmpdir (cache, opts) { opts = TmpOpts(opts) const tmpTarget = uniqueFilename(path.join(cache, 'tmp'), opts.tmpPrefix) - return fixOwner.mkdirfix(tmpTarget, opts.uid, opts.gid).then(() => { + return fixOwner.mkdirfix(cache, tmpTarget).then(() => { return tmpTarget }) } @@ -34,7 +32,6 @@ function withTmp (cache, opts, cb) { } module.exports.fix = fixtmpdir -function fixtmpdir (cache, opts) { - opts = TmpOpts(opts) - return fixOwner(path.join(cache, 'tmp'), opts.uid, opts.gid) +function fixtmpdir (cache) { + return fixOwner(cache, path.join(cache, 'tmp')) } diff --git a/deps/npm/node_modules/cacache/lib/verify.js b/deps/npm/node_modules/cacache/lib/verify.js index 8eaab0b7daf276..617d38db12c33d 100644 --- a/deps/npm/node_modules/cacache/lib/verify.js +++ b/deps/npm/node_modules/cacache/lib/verify.js @@ -22,9 +22,7 @@ const VerifyOpts = figgyPudding({ filter: {}, log: { default: { silly () {} } - }, - uid: {}, - gid: {} + } }) module.exports = verify @@ -67,9 +65,9 @@ function markEndTime (cache, opts) { function fixPerms (cache, opts) { opts.log.silly('verify', 'fixing cache permissions') - return fixOwner.mkdirfix(cache, opts.uid, opts.gid).then(() => { + return fixOwner.mkdirfix(cache, cache).then(() => { // TODO - fix file permissions too - return fixOwner.chownr(cache, opts.uid, opts.gid) + return fixOwner.chownr(cache, cache) }).then(() => null) } @@ -195,8 +193,6 @@ function rebuildBucket (cache, bucket, stats, opts) { const content = contentPath(cache, entry.integrity) return fs.statAsync(content).then(() => { return index.insert(cache, entry.key, entry.integrity, { - uid: opts.uid, - gid: opts.gid, metadata: entry.metadata, size: entry.size }).then(() => { stats.totalEntries++ }) @@ -216,7 +212,11 @@ function cleanTmp (cache, opts) { function writeVerifile (cache, opts) { const verifile = path.join(cache, '_lastverified') opts.log.silly('verify', 'writing verifile to ' + verifile) - return fs.writeFileAsync(verifile, '' + (+(new Date()))) + try { + return fs.writeFileAsync(verifile, '' + (+(new Date()))) + } finally { + fixOwner.chownr.sync(cache, verifile) + } } module.exports.lastRun = lastRun diff --git a/deps/npm/node_modules/cacache/node_modules/glob/LICENSE b/deps/npm/node_modules/cacache/node_modules/glob/LICENSE deleted file mode 100644 index 42ca266df1d523..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/glob/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -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. - -## Glob Logo - -Glob's logo created by Tanya Brassie , licensed -under a Creative Commons Attribution-ShareAlike 4.0 International License -https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/deps/npm/node_modules/cacache/node_modules/glob/README.md b/deps/npm/node_modules/cacache/node_modules/glob/README.md deleted file mode 100644 index e71b967ea28809..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/glob/README.md +++ /dev/null @@ -1,373 +0,0 @@ -# Glob - -Match files using the patterns the shell uses, like stars and stuff. - -[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Build Status](https://ci.appveyor.com/api/projects/status/kd7f3yftf7unxlsx?svg=true)](https://ci.appveyor.com/project/isaacs/node-glob) [![Coverage Status](https://coveralls.io/repos/isaacs/node-glob/badge.svg?branch=master&service=github)](https://coveralls.io/github/isaacs/node-glob?branch=master) - -This is a glob implementation in JavaScript. It uses the `minimatch` -library to do its matching. - -![](logo/glob.png) - -## Usage - -Install with npm - -``` -npm i glob -``` - -```javascript -var glob = require("glob") - -// options is optional -glob("**/*.js", options, function (er, files) { - // files is an array of filenames. - // If the `nonull` option is set, and nothing - // was found, then files is ["**/*.js"] - // er is an error object or null. -}) -``` - -## Glob Primer - -"Globs" are the patterns you type when you do stuff like `ls *.js` on -the command line, or put `build/*` in a `.gitignore` file. - -Before parsing the path part patterns, braced sections are expanded -into a set. Braced sections start with `{` and end with `}`, with any -number of comma-delimited sections within. Braced sections may contain -slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`. - -The following characters have special magic meaning when used in a -path portion: - -* `*` Matches 0 or more characters in a single path portion -* `?` Matches 1 character -* `[...]` Matches a range of characters, similar to a RegExp range. - If the first character of the range is `!` or `^` then it matches - any character not in the range. -* `!(pattern|pattern|pattern)` Matches anything that does not match - any of the patterns provided. -* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the - patterns provided. -* `+(pattern|pattern|pattern)` Matches one or more occurrences of the - patterns provided. -* `*(a|b|c)` Matches zero or more occurrences of the patterns provided -* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns - provided -* `**` If a "globstar" is alone in a path portion, then it matches - zero or more directories and subdirectories searching for matches. - It does not crawl symlinked directories. - -### Dots - -If a file or directory path portion has a `.` as the first character, -then it will not match any glob pattern unless that pattern's -corresponding path part also has a `.` as its first character. - -For example, the pattern `a/.*/c` would match the file at `a/.b/c`. -However the pattern `a/*/c` would not, because `*` does not start with -a dot character. - -You can make glob treat dots as normal characters by setting -`dot:true` in the options. - -### Basename Matching - -If you set `matchBase:true` in the options, and the pattern has no -slashes in it, then it will seek for any file anywhere in the tree -with a matching basename. For example, `*.js` would match -`test/simple/basic.js`. - -### Empty Sets - -If no matching files are found, then an empty array is returned. This -differs from the shell, where the pattern itself is returned. For -example: - - $ echo a*s*d*f - a*s*d*f - -To get the bash-style behavior, set the `nonull:true` in the options. - -### See Also: - -* `man sh` -* `man bash` (Search for "Pattern Matching") -* `man 3 fnmatch` -* `man 5 gitignore` -* [minimatch documentation](https://github.com/isaacs/minimatch) - -## glob.hasMagic(pattern, [options]) - -Returns `true` if there are any special characters in the pattern, and -`false` otherwise. - -Note that the options affect the results. If `noext:true` is set in -the options object, then `+(a|b)` will not be considered a magic -pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}` -then that is considered magical, unless `nobrace:true` is set in the -options. - -## glob(pattern, [options], cb) - -* `pattern` `{String}` Pattern to be matched -* `options` `{Object}` -* `cb` `{Function}` - * `err` `{Error | null}` - * `matches` `{Array}` filenames found matching the pattern - -Perform an asynchronous glob search. - -## glob.sync(pattern, [options]) - -* `pattern` `{String}` Pattern to be matched -* `options` `{Object}` -* return: `{Array}` filenames found matching the pattern - -Perform a synchronous glob search. - -## Class: glob.Glob - -Create a Glob object by instantiating the `glob.Glob` class. - -```javascript -var Glob = require("glob").Glob -var mg = new Glob(pattern, options, cb) -``` - -It's an EventEmitter, and starts walking the filesystem to find matches -immediately. - -### new glob.Glob(pattern, [options], [cb]) - -* `pattern` `{String}` pattern to search for -* `options` `{Object}` -* `cb` `{Function}` Called when an error occurs, or matches are found - * `err` `{Error | null}` - * `matches` `{Array}` filenames found matching the pattern - -Note that if the `sync` flag is set in the options, then matches will -be immediately available on the `g.found` member. - -### Properties - -* `minimatch` The minimatch object that the glob uses. -* `options` The options object passed in. -* `aborted` Boolean which is set to true when calling `abort()`. There - is no way at this time to continue a glob search after aborting, but - you can re-use the statCache to avoid having to duplicate syscalls. -* `cache` Convenience object. Each field has the following possible - values: - * `false` - Path does not exist - * `true` - Path exists - * `'FILE'` - Path exists, and is not a directory - * `'DIR'` - Path exists, and is a directory - * `[file, entries, ...]` - Path exists, is a directory, and the - array value is the results of `fs.readdir` -* `statCache` Cache of `fs.stat` results, to prevent statting the same - path multiple times. -* `symlinks` A record of which paths are symbolic links, which is - relevant in resolving `**` patterns. -* `realpathCache` An optional object which is passed to `fs.realpath` - to minimize unnecessary syscalls. It is stored on the instantiated - Glob object, and may be re-used. - -### Events - -* `end` When the matching is finished, this is emitted with all the - matches found. If the `nonull` option is set, and no match was found, - then the `matches` list contains the original pattern. The matches - are sorted, unless the `nosort` flag is set. -* `match` Every time a match is found, this is emitted with the specific - thing that matched. It is not deduplicated or resolved to a realpath. -* `error` Emitted when an unexpected error is encountered, or whenever - any fs error occurs if `options.strict` is set. -* `abort` When `abort()` is called, this event is raised. - -### Methods - -* `pause` Temporarily stop the search -* `resume` Resume the search -* `abort` Stop the search forever - -### Options - -All the options that can be passed to Minimatch can also be passed to -Glob to change pattern matching behavior. Also, some have been added, -or have glob-specific ramifications. - -All options are false by default, unless otherwise noted. - -All options are added to the Glob object, as well. - -If you are running many `glob` operations, you can pass a Glob object -as the `options` argument to a subsequent operation to shortcut some -`stat` and `readdir` calls. At the very least, you may pass in shared -`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that -parallel glob operations will be sped up by sharing information about -the filesystem. - -* `cwd` The current working directory in which to search. Defaults - to `process.cwd()`. -* `root` The place where patterns starting with `/` will be mounted - onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix - systems, and `C:\` or some such on Windows.) -* `dot` Include `.dot` files in normal matches and `globstar` matches. - Note that an explicit dot in a portion of the pattern will always - match dot files. -* `nomount` By default, a pattern starting with a forward-slash will be - "mounted" onto the root setting, so that a valid filesystem path is - returned. Set this flag to disable that behavior. -* `mark` Add a `/` character to directory matches. Note that this - requires additional stat calls. -* `nosort` Don't sort the results. -* `stat` Set to true to stat *all* results. This reduces performance - somewhat, and is completely unnecessary, unless `readdir` is presumed - to be an untrustworthy indicator of file existence. -* `silent` When an unusual error is encountered when attempting to - read a directory, a warning will be printed to stderr. Set the - `silent` option to true to suppress these warnings. -* `strict` When an unusual error is encountered when attempting to - read a directory, the process will just continue on in search of - other matches. Set the `strict` option to raise an error in these - cases. -* `cache` See `cache` property above. Pass in a previously generated - cache object to save some fs calls. -* `statCache` A cache of results of filesystem information, to prevent - unnecessary stat calls. While it should not normally be necessary - to set this, you may pass the statCache from one glob() call to the - options object of another, if you know that the filesystem will not - change between calls. (See "Race Conditions" below.) -* `symlinks` A cache of known symbolic links. You may pass in a - previously generated `symlinks` object to save `lstat` calls when - resolving `**` matches. -* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead. -* `nounique` In some cases, brace-expanded patterns can result in the - same file showing up multiple times in the result set. By default, - this implementation prevents duplicates in the result set. Set this - flag to disable that behavior. -* `nonull` Set to never return an empty set, instead returning a set - containing the pattern itself. This is the default in glob(3). -* `debug` Set to enable debug logging in minimatch and glob. -* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. -* `noglobstar` Do not match `**` against multiple filenames. (Ie, - treat it as a normal `*` instead.) -* `noext` Do not match `+(a|b)` "extglob" patterns. -* `nocase` Perform a case-insensitive match. Note: on - case-insensitive filesystems, non-magic patterns will match by - default, since `stat` and `readdir` will not raise errors. -* `matchBase` Perform a basename-only match if the pattern does not - contain any slash characters. That is, `*.js` would be treated as - equivalent to `**/*.js`, matching all js files in all directories. -* `nodir` Do not match directories, only files. (Note: to match - *only* directories, simply put a `/` at the end of the pattern.) -* `ignore` Add a pattern or an array of glob patterns to exclude matches. - Note: `ignore` patterns are *always* in `dot:true` mode, regardless - of any other settings. -* `follow` Follow symlinked directories when expanding `**` patterns. - Note that this can result in a lot of duplicate references in the - presence of cyclic links. -* `realpath` Set to true to call `fs.realpath` on all of the results. - In the case of a symlink that cannot be resolved, the full absolute - path to the matched entry is returned (though it will usually be a - broken symlink) -* `absolute` Set to true to always receive absolute paths for matched - files. Unlike `realpath`, this also affects the values returned in - the `match` event. - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between node-glob and other -implementations, and are intentional. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.3, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -Note that symlinked directories are not crawled as part of a `**`, -though their contents may match against subsequent portions of the -pattern. This prevents infinite loops and duplicates and the like. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then glob returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. - -### Comments and Negation - -Previously, this module let you mark a pattern as a "comment" if it -started with a `#` character, or a "negated" pattern if it started -with a `!` character. - -These options were deprecated in version 5, and removed in version 6. - -To specify things that should not match, use the `ignore` option. - -## Windows - -**Please only use forward-slashes in glob expressions.** - -Though windows uses either `/` or `\` as its path separator, only `/` -characters are used by this glob implementation. You must use -forward-slashes **only** in glob expressions. Back-slashes will always -be interpreted as escape characters, not path separators. - -Results from absolute patterns such as `/foo/*` are mounted onto the -root setting using `path.join`. On windows, this will by default result -in `/foo/*` matching `C:\foo\bar.txt`. - -## Race Conditions - -Glob searching, by its very nature, is susceptible to race conditions, -since it relies on directory walking and such. - -As a result, it is possible that a file that exists when glob looks for -it may have been deleted or modified by the time it returns the result. - -As part of its internal implementation, this program caches all stat -and readdir calls that it makes, in order to cut down on system -overhead. However, this also makes it even more susceptible to races, -especially if the cache or statCache objects are reused between glob -calls. - -Users are thus advised not to use a glob result as a guarantee of -filesystem state in the face of rapid changes. For the vast majority -of operations, this is never a problem. - -## Glob Logo -Glob's logo was created by [Tanya Brassie](http://tanyabrassie.com/). Logo files can be found [here](https://github.com/isaacs/node-glob/tree/master/logo). - -The logo is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/). - -## Contributing - -Any change to behavior (including bugfixes) must come with a test. - -Patches that fail tests or reduce performance will be rejected. - -``` -# to run tests -npm test - -# to re-generate test fixtures -npm run test-regen - -# to benchmark against bash/zsh -npm run bench - -# to profile javascript -npm run prof -``` diff --git a/deps/npm/node_modules/cacache/node_modules/glob/changelog.md b/deps/npm/node_modules/cacache/node_modules/glob/changelog.md deleted file mode 100644 index 41636771e3a7cd..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/glob/changelog.md +++ /dev/null @@ -1,67 +0,0 @@ -## 7.0 - -- Raise error if `options.cwd` is specified, and not a directory - -## 6.0 - -- Remove comment and negation pattern support -- Ignore patterns are always in `dot:true` mode - -## 5.0 - -- Deprecate comment and negation patterns -- Fix regression in `mark` and `nodir` options from making all cache - keys absolute path. -- Abort if `fs.readdir` returns an error that's unexpected -- Don't emit `match` events for ignored items -- Treat ENOTSUP like ENOTDIR in readdir - -## 4.5 - -- Add `options.follow` to always follow directory symlinks in globstar -- Add `options.realpath` to call `fs.realpath` on all results -- Always cache based on absolute path - -## 4.4 - -- Add `options.ignore` -- Fix handling of broken symlinks - -## 4.3 - -- Bump minimatch to 2.x -- Pass all tests on Windows - -## 4.2 - -- Add `glob.hasMagic` function -- Add `options.nodir` flag - -## 4.1 - -- Refactor sync and async implementations for performance -- Throw if callback provided to sync glob function -- Treat symbolic links in globstar results the same as Bash 4.3 - -## 4.0 - -- Use `^` for dependency versions (bumped major because this breaks - older npm versions) -- Ensure callbacks are only ever called once -- switch to ISC license - -## 3.x - -- Rewrite in JavaScript -- Add support for setting root, cwd, and windows support -- Cache many fs calls -- Add globstar support -- emit match events - -## 2.x - -- Use `glob.h` and `fnmatch.h` from NetBSD - -## 1.x - -- `glob.h` static binding. diff --git a/deps/npm/node_modules/cacache/node_modules/glob/common.js b/deps/npm/node_modules/cacache/node_modules/glob/common.js deleted file mode 100644 index 66651bb3aac655..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/glob/common.js +++ /dev/null @@ -1,240 +0,0 @@ -exports.alphasort = alphasort -exports.alphasorti = alphasorti -exports.setopts = setopts -exports.ownProp = ownProp -exports.makeAbs = makeAbs -exports.finish = finish -exports.mark = mark -exports.isIgnored = isIgnored -exports.childrenIgnored = childrenIgnored - -function ownProp (obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field) -} - -var path = require("path") -var minimatch = require("minimatch") -var isAbsolute = require("path-is-absolute") -var Minimatch = minimatch.Minimatch - -function alphasorti (a, b) { - return a.toLowerCase().localeCompare(b.toLowerCase()) -} - -function alphasort (a, b) { - return a.localeCompare(b) -} - -function setupIgnores (self, options) { - self.ignore = options.ignore || [] - - if (!Array.isArray(self.ignore)) - self.ignore = [self.ignore] - - if (self.ignore.length) { - self.ignore = self.ignore.map(ignoreMap) - } -} - -// ignore patterns are always in dot:true mode. -function ignoreMap (pattern) { - var gmatcher = null - if (pattern.slice(-3) === '/**') { - var gpattern = pattern.replace(/(\/\*\*)+$/, '') - gmatcher = new Minimatch(gpattern, { dot: true }) - } - - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher: gmatcher - } -} - -function setopts (self, pattern, options) { - if (!options) - options = {} - - // base-matching: just use globstar for that. - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar") - } - pattern = "**/" + pattern - } - - self.silent = !!options.silent - self.pattern = pattern - self.strict = options.strict !== false - self.realpath = !!options.realpath - self.realpathCache = options.realpathCache || Object.create(null) - self.follow = !!options.follow - self.dot = !!options.dot - self.mark = !!options.mark - self.nodir = !!options.nodir - if (self.nodir) - self.mark = true - self.sync = !!options.sync - self.nounique = !!options.nounique - self.nonull = !!options.nonull - self.nosort = !!options.nosort - self.nocase = !!options.nocase - self.stat = !!options.stat - self.noprocess = !!options.noprocess - self.absolute = !!options.absolute - - self.maxLength = options.maxLength || Infinity - self.cache = options.cache || Object.create(null) - self.statCache = options.statCache || Object.create(null) - self.symlinks = options.symlinks || Object.create(null) - - setupIgnores(self, options) - - self.changedCwd = false - var cwd = process.cwd() - if (!ownProp(options, "cwd")) - self.cwd = cwd - else { - self.cwd = path.resolve(options.cwd) - self.changedCwd = self.cwd !== cwd - } - - self.root = options.root || path.resolve(self.cwd, "/") - self.root = path.resolve(self.root) - if (process.platform === "win32") - self.root = self.root.replace(/\\/g, "/") - - // TODO: is an absolute `cwd` supposed to be resolved against `root`? - // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') - self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd) - if (process.platform === "win32") - self.cwdAbs = self.cwdAbs.replace(/\\/g, "/") - self.nomount = !!options.nomount - - // disable comments and negation in Minimatch. - // Note that they are not supported in Glob itself anyway. - options.nonegate = true - options.nocomment = true - - self.minimatch = new Minimatch(pattern, options) - self.options = self.minimatch.options -} - -function finish (self) { - var nou = self.nounique - var all = nou ? [] : Object.create(null) - - for (var i = 0, l = self.matches.length; i < l; i ++) { - var matches = self.matches[i] - if (!matches || Object.keys(matches).length === 0) { - if (self.nonull) { - // do like the shell, and spit out the literal glob - var literal = self.minimatch.globSet[i] - if (nou) - all.push(literal) - else - all[literal] = true - } - } else { - // had matches - var m = Object.keys(matches) - if (nou) - all.push.apply(all, m) - else - m.forEach(function (m) { - all[m] = true - }) - } - } - - if (!nou) - all = Object.keys(all) - - if (!self.nosort) - all = all.sort(self.nocase ? alphasorti : alphasort) - - // at *some* point we statted all of these - if (self.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self._mark(all[i]) - } - if (self.nodir) { - all = all.filter(function (e) { - var notDir = !(/\/$/.test(e)) - var c = self.cache[e] || self.cache[makeAbs(self, e)] - if (notDir && c) - notDir = c !== 'DIR' && !Array.isArray(c) - return notDir - }) - } - } - - if (self.ignore.length) - all = all.filter(function(m) { - return !isIgnored(self, m) - }) - - self.found = all -} - -function mark (self, p) { - var abs = makeAbs(self, p) - var c = self.cache[abs] - var m = p - if (c) { - var isDir = c === 'DIR' || Array.isArray(c) - var slash = p.slice(-1) === '/' - - if (isDir && !slash) - m += '/' - else if (!isDir && slash) - m = m.slice(0, -1) - - if (m !== p) { - var mabs = makeAbs(self, m) - self.statCache[mabs] = self.statCache[abs] - self.cache[mabs] = self.cache[abs] - } - } - - return m -} - -// lotta situps... -function makeAbs (self, f) { - var abs = f - if (f.charAt(0) === '/') { - abs = path.join(self.root, f) - } else if (isAbsolute(f) || f === '') { - abs = f - } else if (self.changedCwd) { - abs = path.resolve(self.cwd, f) - } else { - abs = path.resolve(f) - } - - if (process.platform === 'win32') - abs = abs.replace(/\\/g, '/') - - return abs -} - - -// Return true, if pattern ends with globstar '**', for the accompanying parent directory. -// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents -function isIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) - }) -} - -function childrenIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path)) - }) -} diff --git a/deps/npm/node_modules/cacache/node_modules/glob/glob.js b/deps/npm/node_modules/cacache/node_modules/glob/glob.js deleted file mode 100644 index 58dec0f6c2bd0b..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/glob/glob.js +++ /dev/null @@ -1,790 +0,0 @@ -// Approach: -// -// 1. Get the minimatch set -// 2. For each pattern in the set, PROCESS(pattern, false) -// 3. Store matches per-set, then uniq them -// -// PROCESS(pattern, inGlobStar) -// Get the first [n] items from pattern that are all strings -// Join these together. This is PREFIX. -// If there is no more remaining, then stat(PREFIX) and -// add to matches if it succeeds. END. -// -// If inGlobStar and PREFIX is symlink and points to dir -// set ENTRIES = [] -// else readdir(PREFIX) as ENTRIES -// If fail, END -// -// with ENTRIES -// If pattern[n] is GLOBSTAR -// // handle the case where the globstar match is empty -// // by pruning it out, and testing the resulting pattern -// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) -// // handle other cases. -// for ENTRY in ENTRIES (not dotfiles) -// // attach globstar + tail onto the entry -// // Mark that this entry is a globstar match -// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) -// -// else // not globstar -// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) -// Test ENTRY against pattern[n] -// If fails, continue -// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) -// -// Caveat: -// Cache all stats and readdirs results to minimize syscall. Since all -// we ever care about is existence and directory-ness, we can just keep -// `true` for files, and [children,...] for directories, or `false` for -// things that don't exist. - -module.exports = glob - -var fs = require('fs') -var rp = require('fs.realpath') -var minimatch = require('minimatch') -var Minimatch = minimatch.Minimatch -var inherits = require('inherits') -var EE = require('events').EventEmitter -var path = require('path') -var assert = require('assert') -var isAbsolute = require('path-is-absolute') -var globSync = require('./sync.js') -var common = require('./common.js') -var alphasort = common.alphasort -var alphasorti = common.alphasorti -var setopts = common.setopts -var ownProp = common.ownProp -var inflight = require('inflight') -var util = require('util') -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -var once = require('once') - -function glob (pattern, options, cb) { - if (typeof options === 'function') cb = options, options = {} - if (!options) options = {} - - if (options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return globSync(pattern, options) - } - - return new Glob(pattern, options, cb) -} - -glob.sync = globSync -var GlobSync = glob.GlobSync = globSync.GlobSync - -// old api surface -glob.glob = glob - -function extend (origin, add) { - if (add === null || typeof add !== 'object') { - return origin - } - - var keys = Object.keys(add) - var i = keys.length - while (i--) { - origin[keys[i]] = add[keys[i]] - } - return origin -} - -glob.hasMagic = function (pattern, options_) { - var options = extend({}, options_) - options.noprocess = true - - var g = new Glob(pattern, options) - var set = g.minimatch.set - - if (!pattern) - return false - - if (set.length > 1) - return true - - for (var j = 0; j < set[0].length; j++) { - if (typeof set[0][j] !== 'string') - return true - } - - return false -} - -glob.Glob = Glob -inherits(Glob, EE) -function Glob (pattern, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - - if (options && options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return new GlobSync(pattern, options) - } - - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb) - - setopts(this, pattern, options) - this._didRealPath = false - - // process each pattern in the minimatch set - var n = this.minimatch.set.length - - // The matches are stored as {: true,...} so that - // duplicates are automagically pruned. - // Later, we do an Object.keys() on these. - // Keep them as a list so we can fill in when nonull is set. - this.matches = new Array(n) - - if (typeof cb === 'function') { - cb = once(cb) - this.on('error', cb) - this.on('end', function (matches) { - cb(null, matches) - }) - } - - var self = this - this._processing = 0 - - this._emitQueue = [] - this._processQueue = [] - this.paused = false - - if (this.noprocess) - return this - - if (n === 0) - return done() - - var sync = true - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false, done) - } - sync = false - - function done () { - --self._processing - if (self._processing <= 0) { - if (sync) { - process.nextTick(function () { - self._finish() - }) - } else { - self._finish() - } - } - } -} - -Glob.prototype._finish = function () { - assert(this instanceof Glob) - if (this.aborted) - return - - if (this.realpath && !this._didRealpath) - return this._realpath() - - common.finish(this) - this.emit('end', this.found) -} - -Glob.prototype._realpath = function () { - if (this._didRealpath) - return - - this._didRealpath = true - - var n = this.matches.length - if (n === 0) - return this._finish() - - var self = this - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next) - - function next () { - if (--n === 0) - self._finish() - } -} - -Glob.prototype._realpathSet = function (index, cb) { - var matchset = this.matches[index] - if (!matchset) - return cb() - - var found = Object.keys(matchset) - var self = this - var n = found.length - - if (n === 0) - return cb() - - var set = this.matches[index] = Object.create(null) - found.forEach(function (p, i) { - // If there's a problem with the stat, then it means that - // one or more of the links in the realpath couldn't be - // resolved. just return the abs value in that case. - p = self._makeAbs(p) - rp.realpath(p, self.realpathCache, function (er, real) { - if (!er) - set[real] = true - else if (er.syscall === 'stat') - set[p] = true - else - self.emit('error', er) // srsly wtf right here - - if (--n === 0) { - self.matches[index] = set - cb() - } - }) - }) -} - -Glob.prototype._mark = function (p) { - return common.mark(this, p) -} - -Glob.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} - -Glob.prototype.abort = function () { - this.aborted = true - this.emit('abort') -} - -Glob.prototype.pause = function () { - if (!this.paused) { - this.paused = true - this.emit('pause') - } -} - -Glob.prototype.resume = function () { - if (this.paused) { - this.emit('resume') - this.paused = false - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0) - this._emitQueue.length = 0 - for (var i = 0; i < eq.length; i ++) { - var e = eq[i] - this._emitMatch(e[0], e[1]) - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0) - this._processQueue.length = 0 - for (var i = 0; i < pq.length; i ++) { - var p = pq[i] - this._processing-- - this._process(p[0], p[1], p[2], p[3]) - } - } - } -} - -Glob.prototype._process = function (pattern, index, inGlobStar, cb) { - assert(this instanceof Glob) - assert(typeof cb === 'function') - - if (this.aborted) - return - - this._processing++ - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]) - return - } - - //console.error('PROCESS %d', this._processing, pattern) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // see if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index, cb) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip _processing - if (childrenIgnored(this, read)) - return cb() - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) -} - -Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - -Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return cb() - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return cb() - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return cb() - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - this._process([e].concat(remain), index, inGlobStar, cb) - } - cb() -} - -Glob.prototype._emitMatch = function (index, e) { - if (this.aborted) - return - - if (isIgnored(this, e)) - return - - if (this.paused) { - this._emitQueue.push([index, e]) - return - } - - var abs = isAbsolute(e) ? e : this._makeAbs(e) - - if (this.mark) - e = this._mark(e) - - if (this.absolute) - e = abs - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - - var st = this.statCache[abs] - if (st) - this.emit('stat', e, st) - - this.emit('match', e) -} - -Glob.prototype._readdirInGlobStar = function (abs, cb) { - if (this.aborted) - return - - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false, cb) - - var lstatkey = 'lstat\0' + abs - var self = this - var lstatcb = inflight(lstatkey, lstatcb_) - - if (lstatcb) - fs.lstat(abs, lstatcb) - - function lstatcb_ (er, lstat) { - if (er && er.code === 'ENOENT') - return cb() - - var isSym = lstat && lstat.isSymbolicLink() - self.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) { - self.cache[abs] = 'FILE' - cb() - } else - self._readdir(abs, false, cb) - } -} - -Glob.prototype._readdir = function (abs, inGlobStar, cb) { - if (this.aborted) - return - - cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) - if (!cb) - return - - //console.error('RD %j %j', +inGlobStar, abs) - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return cb() - - if (Array.isArray(c)) - return cb(null, c) - } - - var self = this - fs.readdir(abs, readdirCb(this, abs, cb)) -} - -function readdirCb (self, abs, cb) { - return function (er, entries) { - if (er) - self._readdirError(abs, er, cb) - else - self._readdirEntries(abs, entries, cb) - } -} - -Glob.prototype._readdirEntries = function (abs, entries, cb) { - if (this.aborted) - return - - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - return cb(null, entries) -} - -Glob.prototype._readdirError = function (f, er, cb) { - if (this.aborted) - return - - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - this.emit('error', error) - this.abort() - } - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) { - this.emit('error', er) - // If the error is handled, then we abort - // if not, we threw out of here - this.abort() - } - if (!this.silent) - console.error('glob error', er) - break - } - - return cb() -} - -Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - - -Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - //console.error('pgs2', prefix, remain[0], entries) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return cb() - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false, cb) - - var isSym = this.symlinks[abs] - var len = entries.length - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return cb() - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true, cb) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true, cb) - } - - cb() -} - -Glob.prototype._processSimple = function (prefix, index, cb) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var self = this - this._stat(prefix, function (er, exists) { - self._processSimple2(prefix, index, er, exists, cb) - }) -} -Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { - - //console.error('ps2', prefix, exists) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return cb() - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) - cb() -} - -// Returns either 'DIR', 'FILE', or false -Glob.prototype._stat = function (f, cb) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return cb() - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return cb(null, c) - - if (needDir && c === 'FILE') - return cb() - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (stat !== undefined) { - if (stat === false) - return cb(null, stat) - else { - var type = stat.isDirectory() ? 'DIR' : 'FILE' - if (needDir && type === 'FILE') - return cb() - else - return cb(null, type, stat) - } - } - - var self = this - var statcb = inflight('stat\0' + abs, lstatcb_) - if (statcb) - fs.lstat(abs, statcb) - - function lstatcb_ (er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - // If it's a symlink, then treat it as the target, unless - // the target does not exist, then treat it as a file. - return fs.stat(abs, function (er, stat) { - if (er) - self._stat2(f, abs, null, lstat, cb) - else - self._stat2(f, abs, er, stat, cb) - }) - } else { - self._stat2(f, abs, er, lstat, cb) - } - } -} - -Glob.prototype._stat2 = function (f, abs, er, stat, cb) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return cb() - } - - var needDir = f.slice(-1) === '/' - this.statCache[abs] = stat - - if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) - return cb(null, false, stat) - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - this.cache[abs] = this.cache[abs] || c - - if (needDir && c === 'FILE') - return cb() - - return cb(null, c, stat) -} diff --git a/deps/npm/node_modules/cacache/node_modules/glob/package.json b/deps/npm/node_modules/cacache/node_modules/glob/package.json deleted file mode 100644 index eaead84e567bfe..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/glob/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_from": "glob@^7.1.4", - "_id": "glob@7.1.4", - "_inBundle": false, - "_integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", - "_location": "/cacache/glob", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "glob@^7.1.4", - "name": "glob", - "escapedName": "glob", - "rawSpec": "^7.1.4", - "saveSpec": null, - "fetchSpec": "^7.1.4" - }, - "_requiredBy": [ - "/cacache" - ], - "_resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "_shasum": "aa608a2f6c577ad357e1ae5a5c26d9a8d1969255", - "_spec": "glob@^7.1.4", - "_where": "/Users/isaacs/dev/npm/cli/node_modules/cacache", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/node-glob/issues" - }, - "bundleDependencies": false, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "deprecated": false, - "description": "a little globber", - "devDependencies": { - "mkdirp": "0", - "rimraf": "^2.2.8", - "tap": "^12.0.1", - "tick": "0.0.6" - }, - "engines": { - "node": "*" - }, - "files": [ - "glob.js", - "sync.js", - "common.js" - ], - "homepage": "https://github.com/isaacs/node-glob#readme", - "license": "ISC", - "main": "glob.js", - "name": "glob", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-glob.git" - }, - "scripts": { - "bench": "bash benchmark.sh", - "benchclean": "node benchclean.js", - "prepublish": "npm run benchclean", - "prof": "bash prof.sh && cat profile.txt", - "profclean": "rm -f v8.log profile.txt", - "test": "tap test/*.js --cov", - "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js" - }, - "version": "7.1.4" -} diff --git a/deps/npm/node_modules/cacache/node_modules/glob/sync.js b/deps/npm/node_modules/cacache/node_modules/glob/sync.js deleted file mode 100644 index c952134baa7ec0..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/glob/sync.js +++ /dev/null @@ -1,486 +0,0 @@ -module.exports = globSync -globSync.GlobSync = GlobSync - -var fs = require('fs') -var rp = require('fs.realpath') -var minimatch = require('minimatch') -var Minimatch = minimatch.Minimatch -var Glob = require('./glob.js').Glob -var util = require('util') -var path = require('path') -var assert = require('assert') -var isAbsolute = require('path-is-absolute') -var common = require('./common.js') -var alphasort = common.alphasort -var alphasorti = common.alphasorti -var setopts = common.setopts -var ownProp = common.ownProp -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -function globSync (pattern, options) { - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - return new GlobSync(pattern, options).found -} - -function GlobSync (pattern, options) { - if (!pattern) - throw new Error('must provide pattern') - - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options) - - setopts(this, pattern, options) - - if (this.noprocess) - return this - - var n = this.minimatch.set.length - this.matches = new Array(n) - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false) - } - this._finish() -} - -GlobSync.prototype._finish = function () { - assert(this instanceof GlobSync) - if (this.realpath) { - var self = this - this.matches.forEach(function (matchset, index) { - var set = self.matches[index] = Object.create(null) - for (var p in matchset) { - try { - p = self._makeAbs(p) - var real = rp.realpathSync(p, self.realpathCache) - set[real] = true - } catch (er) { - if (er.syscall === 'stat') - set[self._makeAbs(p)] = true - else - throw er - } - } - }) - } - common.finish(this) -} - - -GlobSync.prototype._process = function (pattern, index, inGlobStar) { - assert(this instanceof GlobSync) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // See if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip processing - if (childrenIgnored(this, read)) - return - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar) -} - - -GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar) - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix.slice(-1) !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) - newPattern = [prefix, e] - else - newPattern = [e] - this._process(newPattern.concat(remain), index, inGlobStar) - } -} - - -GlobSync.prototype._emitMatch = function (index, e) { - if (isIgnored(this, e)) - return - - var abs = this._makeAbs(e) - - if (this.mark) - e = this._mark(e) - - if (this.absolute) { - e = abs - } - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - - if (this.stat) - this._stat(e) -} - - -GlobSync.prototype._readdirInGlobStar = function (abs) { - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false) - - var entries - var lstat - var stat - try { - lstat = fs.lstatSync(abs) - } catch (er) { - if (er.code === 'ENOENT') { - // lstat failed, doesn't exist - return null - } - } - - var isSym = lstat && lstat.isSymbolicLink() - this.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = 'FILE' - else - entries = this._readdir(abs, false) - - return entries -} - -GlobSync.prototype._readdir = function (abs, inGlobStar) { - var entries - - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return null - - if (Array.isArray(c)) - return c - } - - try { - return this._readdirEntries(abs, fs.readdirSync(abs)) - } catch (er) { - this._readdirError(abs, er) - return null - } -} - -GlobSync.prototype._readdirEntries = function (abs, entries) { - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - - // mark and cache dir-ness - return entries -} - -GlobSync.prototype._readdirError = function (f, er) { - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - throw error - } - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) - throw er - if (!this.silent) - console.error('glob error', er) - break - } -} - -GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { - - var entries = this._readdir(abs, inGlobStar) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false) - - var len = entries.length - var isSym = this.symlinks[abs] - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true) - } -} - -GlobSync.prototype._processSimple = function (prefix, index) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var exists = this._stat(prefix) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) -} - -// Returns either 'DIR', 'FILE', or false -GlobSync.prototype._stat = function (f) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return false - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return c - - if (needDir && c === 'FILE') - return false - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (!stat) { - var lstat - try { - lstat = fs.lstatSync(abs) - } catch (er) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return false - } - } - - if (lstat && lstat.isSymbolicLink()) { - try { - stat = fs.statSync(abs) - } catch (er) { - stat = lstat - } - } else { - stat = lstat - } - } - - this.statCache[abs] = stat - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - - this.cache[abs] = this.cache[abs] || c - - if (needDir && c === 'FILE') - return false - - return c -} - -GlobSync.prototype._mark = function (p) { - return common.mark(this, p) -} - -GlobSync.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} diff --git a/deps/npm/node_modules/cacache/node_modules/lru-cache/index.js b/deps/npm/node_modules/cacache/node_modules/lru-cache/index.js deleted file mode 100644 index 573b6b85b9779d..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/lru-cache/index.js +++ /dev/null @@ -1,334 +0,0 @@ -'use strict' - -// A linked list to keep track of recently-used-ness -const Yallist = require('yallist') - -const MAX = Symbol('max') -const LENGTH = Symbol('length') -const LENGTH_CALCULATOR = Symbol('lengthCalculator') -const ALLOW_STALE = Symbol('allowStale') -const MAX_AGE = Symbol('maxAge') -const DISPOSE = Symbol('dispose') -const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet') -const LRU_LIST = Symbol('lruList') -const CACHE = Symbol('cache') -const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet') - -const naiveLength = () => 1 - -// lruList is a yallist where the head is the youngest -// item, and the tail is the oldest. the list contains the Hit -// objects as the entries. -// Each Hit object has a reference to its Yallist.Node. This -// never changes. -// -// cache is a Map (or PseudoMap) that matches the keys to -// the Yallist.Node object. -class LRUCache { - constructor (options) { - if (typeof options === 'number') - options = { max: options } - - if (!options) - options = {} - - if (options.max && (typeof options.max !== 'number' || options.max < 0)) - throw new TypeError('max must be a non-negative number') - // Kind of weird to have a default max of Infinity, but oh well. - const max = this[MAX] = options.max || Infinity - - const lc = options.length || naiveLength - this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc - this[ALLOW_STALE] = options.stale || false - if (options.maxAge && typeof options.maxAge !== 'number') - throw new TypeError('maxAge must be a number') - this[MAX_AGE] = options.maxAge || 0 - this[DISPOSE] = options.dispose - this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false - this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false - this.reset() - } - - // resize the cache when the max changes. - set max (mL) { - if (typeof mL !== 'number' || mL < 0) - throw new TypeError('max must be a non-negative number') - - this[MAX] = mL || Infinity - trim(this) - } - get max () { - return this[MAX] - } - - set allowStale (allowStale) { - this[ALLOW_STALE] = !!allowStale - } - get allowStale () { - return this[ALLOW_STALE] - } - - set maxAge (mA) { - if (typeof mA !== 'number') - throw new TypeError('maxAge must be a non-negative number') - - this[MAX_AGE] = mA - trim(this) - } - get maxAge () { - return this[MAX_AGE] - } - - // resize the cache when the lengthCalculator changes. - set lengthCalculator (lC) { - if (typeof lC !== 'function') - lC = naiveLength - - if (lC !== this[LENGTH_CALCULATOR]) { - this[LENGTH_CALCULATOR] = lC - this[LENGTH] = 0 - this[LRU_LIST].forEach(hit => { - hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) - this[LENGTH] += hit.length - }) - } - trim(this) - } - get lengthCalculator () { return this[LENGTH_CALCULATOR] } - - get length () { return this[LENGTH] } - get itemCount () { return this[LRU_LIST].length } - - rforEach (fn, thisp) { - thisp = thisp || this - for (let walker = this[LRU_LIST].tail; walker !== null;) { - const prev = walker.prev - forEachStep(this, fn, walker, thisp) - walker = prev - } - } - - forEach (fn, thisp) { - thisp = thisp || this - for (let walker = this[LRU_LIST].head; walker !== null;) { - const next = walker.next - forEachStep(this, fn, walker, thisp) - walker = next - } - } - - keys () { - return this[LRU_LIST].toArray().map(k => k.key) - } - - values () { - return this[LRU_LIST].toArray().map(k => k.value) - } - - reset () { - if (this[DISPOSE] && - this[LRU_LIST] && - this[LRU_LIST].length) { - this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value)) - } - - this[CACHE] = new Map() // hash of items by key - this[LRU_LIST] = new Yallist() // list of items in order of use recency - this[LENGTH] = 0 // length of items in the list - } - - dump () { - return this[LRU_LIST].map(hit => - isStale(this, hit) ? false : { - k: hit.key, - v: hit.value, - e: hit.now + (hit.maxAge || 0) - }).toArray().filter(h => h) - } - - dumpLru () { - return this[LRU_LIST] - } - - set (key, value, maxAge) { - maxAge = maxAge || this[MAX_AGE] - - if (maxAge && typeof maxAge !== 'number') - throw new TypeError('maxAge must be a number') - - const now = maxAge ? Date.now() : 0 - const len = this[LENGTH_CALCULATOR](value, key) - - if (this[CACHE].has(key)) { - if (len > this[MAX]) { - del(this, this[CACHE].get(key)) - return false - } - - const node = this[CACHE].get(key) - const item = node.value - - // dispose of the old one before overwriting - // split out into 2 ifs for better coverage tracking - if (this[DISPOSE]) { - if (!this[NO_DISPOSE_ON_SET]) - this[DISPOSE](key, item.value) - } - - item.now = now - item.maxAge = maxAge - item.value = value - this[LENGTH] += len - item.length - item.length = len - this.get(key) - trim(this) - return true - } - - const hit = new Entry(key, value, 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[LRU_LIST].unshift(hit) - this[CACHE].set(key, this[LRU_LIST].head) - trim(this) - return true - } - - has (key) { - if (!this[CACHE].has(key)) return false - const hit = this[CACHE].get(key).value - return !isStale(this, hit) - } - - get (key) { - return get(this, key, true) - } - - peek (key) { - return get(this, key, false) - } - - pop () { - const node = this[LRU_LIST].tail - if (!node) - return null - - del(this, node) - return node.value - } - - del (key) { - del(this, this[CACHE].get(key)) - } - - load (arr) { - // reset the cache - this.reset() - - const now = Date.now() - // A previous serialized cache has the most recent items first - for (let l = arr.length - 1; l >= 0; l--) { - const hit = arr[l] - const 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 { - const maxAge = expiresAt - now - // dont add already expired items - if (maxAge > 0) { - this.set(hit.k, hit.v, maxAge) - } - } - } - } - - prune () { - this[CACHE].forEach((value, key) => get(this, key, false)) - } -} - -const get = (self, key, doUse) => { - const node = self[CACHE].get(key) - if (node) { - const hit = node.value - if (isStale(self, hit)) { - del(self, node) - if (!self[ALLOW_STALE]) - return undefined - } else { - if (doUse) { - if (self[UPDATE_AGE_ON_GET]) - node.value.now = Date.now() - self[LRU_LIST].unshiftNode(node) - } - } - return hit.value - } -} - -const isStale = (self, hit) => { - if (!hit || (!hit.maxAge && !self[MAX_AGE])) - return false - - const diff = Date.now() - hit.now - return hit.maxAge ? diff > hit.maxAge - : self[MAX_AGE] && (diff > self[MAX_AGE]) -} - -const trim = self => { - if (self[LENGTH] > self[MAX]) { - for (let walker = self[LRU_LIST].tail; - self[LENGTH] > self[MAX] && walker !== null;) { - // We know that we're about to delete this one, and also - // what the next least recently used key will be, so just - // go ahead and set it now. - const prev = walker.prev - del(self, walker) - walker = prev - } - } -} - -const del = (self, node) => { - if (node) { - const hit = node.value - if (self[DISPOSE]) - self[DISPOSE](hit.key, hit.value) - - self[LENGTH] -= hit.length - self[CACHE].delete(hit.key) - self[LRU_LIST].removeNode(node) - } -} - -class Entry { - constructor (key, value, length, now, maxAge) { - this.key = key - this.value = value - this.length = length - this.now = now - this.maxAge = maxAge || 0 - } -} - -const forEachStep = (self, fn, node, thisp) => { - let hit = node.value - if (isStale(self, hit)) { - del(self, node) - if (!self[ALLOW_STALE]) - hit = undefined - } - if (hit) - fn.call(thisp, hit.value, hit.key, self) -} - -module.exports = LRUCache diff --git a/deps/npm/node_modules/cacache/node_modules/yallist/LICENSE b/deps/npm/node_modules/cacache/node_modules/yallist/LICENSE deleted file mode 100644 index 19129e315fe593..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/yallist/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -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/cacache/node_modules/yallist/iterator.js b/deps/npm/node_modules/cacache/node_modules/yallist/iterator.js deleted file mode 100644 index d41c97a19f9849..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/yallist/iterator.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict' -module.exports = function (Yallist) { - Yallist.prototype[Symbol.iterator] = function* () { - for (let walker = this.head; walker; walker = walker.next) { - yield walker.value - } - } -} diff --git a/deps/npm/node_modules/cacache/package.json b/deps/npm/node_modules/cacache/package.json index c5cce2b1060c73..1df72c2d7db6f1 100644 --- a/deps/npm/node_modules/cacache/package.json +++ b/deps/npm/node_modules/cacache/package.json @@ -1,26 +1,19 @@ { - "_from": "cacache@^11.3.2", - "_id": "cacache@11.3.3", + "_from": "cacache@12.0.2", + "_id": "cacache@12.0.2", "_inBundle": false, - "_integrity": "sha512-p8WcneCytvzPxhDvYp31PD039vi77I12W+/KfR9S8AZbaiARFBCpsPJS+9uhWfeBfeAtW7o/4vt3MUqLkbY6nA==", + "_integrity": "sha512-ifKgxH2CKhJEg6tNdAwziu6Q33EvuG26tYcda6PT3WKisZcYDXsnEdnRv67Po3yCzFfaSoMjGZzJyD2c3DT1dg==", "_location": "/cacache", - "_phantomChildren": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - }, + "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "cacache@^11.3.2", + "raw": "cacache@12.0.2", "name": "cacache", "escapedName": "cacache", - "rawSpec": "^11.3.2", + "rawSpec": "12.0.2", "saveSpec": null, - "fetchSpec": "^11.3.2" + "fetchSpec": "12.0.2" }, "_requiredBy": [ "#USER", @@ -28,16 +21,16 @@ "/make-fetch-happen", "/pacote" ], - "_resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.3.tgz", - "_shasum": "8bd29df8c6a718a6ebd2d010da4d7972ae3bbadc", - "_spec": "cacache@^11.3.2", + "_resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.2.tgz", + "_shasum": "8db03205e36089a3df6954c66ce92541441ac46c", + "_spec": "cacache@12.0.2", "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Kat Marchán", "email": "kzm@sykosomatic.org" }, "bugs": { - "url": "https://github.com/zkat/cacache/issues" + "url": "https://github.com/npm/cacache/issues" }, "bundleDependencies": false, "cache-version": { @@ -68,6 +61,7 @@ "figgy-pudding": "^3.5.1", "glob": "^7.1.4", "graceful-fs": "^4.1.15", + "infer-owner": "^1.0.3", "lru-cache": "^5.1.1", "mississippi": "^3.0.0", "mkdirp": "^0.5.1", @@ -97,7 +91,7 @@ "lib", "locales" ], - "homepage": "https://github.com/zkat/cacache#readme", + "homepage": "https://github.com/npm/cacache#readme", "keywords": [ "cache", "caching", @@ -118,7 +112,7 @@ "name": "cacache", "repository": { "type": "git", - "url": "git+https://github.com/zkat/cacache.git" + "url": "git+https://github.com/npm/cacache.git" }, "scripts": { "benchmarks": "node test/benchmarks", @@ -131,5 +125,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "11.3.3" + "version": "12.0.2" } diff --git a/deps/npm/node_modules/cacache/put.js b/deps/npm/node_modules/cacache/put.js index cb4057fd5f8dd2..a400639303a448 100644 --- a/deps/npm/node_modules/cacache/put.js +++ b/deps/npm/node_modules/cacache/put.js @@ -16,8 +16,6 @@ const PutOpts = figgyPudding({ pickAlgorithm: {}, size: {}, tmpPrefix: {}, - uid: {}, - gid: {}, single: {}, sep: {}, error: {}, diff --git a/deps/npm/node_modules/call-limit/CHANGELOG.md b/deps/npm/node_modules/call-limit/CHANGELOG.md new file mode 100644 index 00000000000000..a6b1df978e11df --- /dev/null +++ b/deps/npm/node_modules/call-limit/CHANGELOG.md @@ -0,0 +1,16 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +### [1.1.1](https://github.com/iarna/call-limit/compare/v1.1.0...v1.1.1) (2019-06-03) + + +### Bug Fixes + +* **call-limit:** Limiter rewrite ([bbd0ea6](https://github.com/iarna/call-limit/commit/bbd0ea6)) +* **test:** Update tests to let/const ([f0b7f98](https://github.com/iarna/call-limit/commit/f0b7f98)) + + +### Tests + +* Test coverage for limited promise based methods ([d5069f4](https://github.com/iarna/call-limit/commit/d5069f4)) diff --git a/deps/npm/node_modules/libnpmteam/node_modules/aproba/LICENSE b/deps/npm/node_modules/call-limit/LICENSE similarity index 92% rename from deps/npm/node_modules/libnpmteam/node_modules/aproba/LICENSE rename to deps/npm/node_modules/call-limit/LICENSE index 2a4982dc40cb69..216e843abcbac1 100644 --- a/deps/npm/node_modules/libnpmteam/node_modules/aproba/LICENSE +++ b/deps/npm/node_modules/call-limit/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2015, Rebecca Turner +Copyright Rebecca Turner Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/deps/npm/node_modules/call-limit/README.md b/deps/npm/node_modules/call-limit/README.md index dc4f081dcecd08..5b5c7264e46f23 100644 --- a/deps/npm/node_modules/call-limit/README.md +++ b/deps/npm/node_modules/call-limit/README.md @@ -4,17 +4,17 @@ call-limit Limit the number of simultaneous executions of a async function. ```javascript -var fs = require('fs') -var limit = require('call-limit') -var limitedStat = limit(fs.stat, 5) +const fs = require('fs') +const limit = require('call-limit') +const limitedStat = limit(fs.stat, 5) ``` Or with promise returning functions: ```javascript -var fs = Bluebird.promisifyAll(require('fs')) -var limit = require('call-limit') -var limitedStat = limit.promise(fs.statAsync, 5) +const fs = Bluebird.promisifyAll(require('fs')) +const limit = require('call-limit') +const limitedStat = limit.promise(fs.statAsync, 5) ``` ### USAGE: @@ -22,7 +22,7 @@ var limitedStat = limit.promise(fs.statAsync, 5) Given that: ```javascript -var limit = require('call-limit') +const limit = require('call-limit') ``` ### limit(func, maxRunning) → limitedFunc diff --git a/deps/npm/node_modules/call-limit/call-limit.js b/deps/npm/node_modules/call-limit/call-limit.js index d6e4534b8a2e8f..2dc7d279a3a52c 100644 --- a/deps/npm/node_modules/call-limit/call-limit.js +++ b/deps/npm/node_modules/call-limit/call-limit.js @@ -1,86 +1,99 @@ -"use strict" +'use strict' -var defaultMaxRunning = 50 +const defaultMaxRunning = 50 -var limit = module.exports = function (func, maxRunning) { - var running = 0 - var queue = [] +const limit = module.exports = function (func, maxRunning) { + const state = {running: 0, queue: []} if (!maxRunning) maxRunning = defaultMaxRunning return function limited () { - var self = this - var args = Array.prototype.slice.call(arguments) - if (running >= maxRunning) { - queue.push({self: this, args: args}) - return + const args = Array.prototype.slice.call(arguments) + if (state.running >= maxRunning) { + state.queue.push({obj: this, args}) + } else { + callFunc(this, args) + } + } + function callNext () { + if (state.queue.length === 0) return + const next = state.queue.shift() + callFunc(next.obj, next.args) + } + function callFunc (obj, args) { + const cb = typeof args[args.length - 1] === 'function' && args.pop() + try { + ++state.running + func.apply(obj, args.concat(function () { + --state.running + process.nextTick(callNext) + if (cb) process.nextTick(() => cb.apply(obj, arguments)) + })) + } catch (err) { + --state.running + if (cb) process.nextTick(() => cb.call(obj, err)) + process.nextTick(callNext) } - var cb = typeof args[args.length-1] === 'function' && args.pop() - ++ running - args.push(function () { - var cbargs = arguments - -- running - cb && process.nextTick(function () { - cb.apply(self, cbargs) - }) - if (queue.length) { - var next = queue.shift() - limited.apply(next.self, next.args) - } - }) - func.apply(self, args) } } module.exports.method = function (classOrObj, method, maxRunning) { if (typeof classOrObj === 'function') { - var func = classOrObj.prototype[method] + const func = classOrObj.prototype[method] classOrObj.prototype[method] = limit(func, maxRunning) } else { - var func = classOrObj[method] + const func = classOrObj[method] classOrObj[method] = limit(func, maxRunning) } } module.exports.promise = function (func, maxRunning) { - var running = 0 - var queue = [] + const state = {running: 0, queue: []} if (!maxRunning) maxRunning = defaultMaxRunning - return function () { - var self = this - var args = Array.prototype.slice.call(arguments) - return new Promise(function (resolve) { - if (running >= maxRunning) { - queue.push({self: self, args: args, resolve: resolve}) - return - } else { - runNext(self, args, resolve) - } - function runNext (self, args, resolve) { - ++ running - resolve( - func.apply(self, args) - .then(finish, function (err) { - finish(err) - throw err - })) - } - - function finish () { - -- running - if (queue.length) { - var next = queue.shift() - process.nextTick(runNext, next.self, next.args, next.resolve) - } - } + return function limited () { + const args = Array.prototype.slice.call(arguments) + if (state.running >= maxRunning) { + return new Promise(resolve => { + state.queue.push({resolve, obj: this, args}) + }) + } else { + return callFunc(this, args) + } + } + function callNext () { + if (state.queue.length === 0) return + const next = state.queue.shift() + next.resolve(callFunc(next.obj, next.args)) + } + function callFunc (obj, args) { + return callFinally(() => { + ++state.running + return func.apply(obj, args) + }, () => { + --state.running + process.nextTick(callNext) }) } + function callFinally (action, fin) { + try { + return Promise.resolve(action()).then(value => { + fin() + return value + }, err => { + fin() + return Promise.reject(err) + }) + } catch (err) { + fin() + return Promise.reject(err) + } + } } module.exports.promise.method = function (classOrObj, method, maxRunning) { if (typeof classOrObj === 'function') { - var func = classOrObj.prototype[method] + const func = classOrObj.prototype[method] classOrObj.prototype[method] = limit.promise(func, maxRunning) } else { - var func = classOrObj[method] + const func = classOrObj[method] classOrObj[method] = limit.promise(func, maxRunning) } } diff --git a/deps/npm/node_modules/call-limit/package.json b/deps/npm/node_modules/call-limit/package.json index e074b244eb3678..2e3b264de115b1 100644 --- a/deps/npm/node_modules/call-limit/package.json +++ b/deps/npm/node_modules/call-limit/package.json @@ -1,32 +1,28 @@ { - "_args": [ - [ - "call-limit@1.1.0", - "/Users/rebecca/code/npm" - ] - ], - "_from": "call-limit@1.1.0", - "_id": "call-limit@1.1.0", + "_from": "call-limit@1.1.1", + "_id": "call-limit@1.1.1", "_inBundle": false, - "_integrity": "sha1-b9YbA/PaQqLNDsK2DwK9DnGZH+o=", + "_integrity": "sha512-5twvci5b9eRBw2wCfPtN0GmlR2/gadZqyFpPhOK6CvMFoFgA+USnZ6Jpu1lhG9h85pQ3Ouil3PfXWRD4EUaRiQ==", "_location": "/call-limit", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "call-limit@1.1.0", + "raw": "call-limit@1.1.1", "name": "call-limit", "escapedName": "call-limit", - "rawSpec": "1.1.0", + "rawSpec": "1.1.1", "saveSpec": null, - "fetchSpec": "1.1.0" + "fetchSpec": "1.1.1" }, "_requiredBy": [ + "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/call-limit/-/call-limit-1.1.0.tgz", - "_spec": "1.1.0", - "_where": "/Users/rebecca/code/npm", + "_resolved": "https://registry.npmjs.org/call-limit/-/call-limit-1.1.1.tgz", + "_shasum": "ef15f2670db3f1992557e2d965abc459e6e358d4", + "_spec": "call-limit@1.1.1", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Rebecca Turner", "email": "me@re-becca.org" @@ -34,10 +30,16 @@ "bugs": { "url": "https://github.com/iarna/call-limit/issues" }, + "bundleDependencies": false, "dependencies": {}, + "deprecated": false, "description": "Limit the number of simultaneous calls to an async function", "devDependencies": { - "tap": "^1.0.0" + "@iarna/standard": "*", + "standard-version": "*", + "tap": "^14.2.0", + "weallbehave": "*", + "weallcontribute": "*" }, "files": [ "call-limit.js" @@ -51,7 +53,13 @@ "url": "git+https://github.com/iarna/call-limit.git" }, "scripts": { - "test": "tap test/*.js" + "postrelease": "npm publish && git push --follow-tags", + "prerelease": "npm t", + "pretest": "iarna-standard", + "release": "standard-version -s", + "test": "tap test/*.js", + "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", + "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "1.1.0" + "version": "1.1.1" } diff --git a/deps/npm/node_modules/chownr/chownr.js b/deps/npm/node_modules/chownr/chownr.js index 7e63928827e2c6..b056912ee15831 100644 --- a/deps/npm/node_modules/chownr/chownr.js +++ b/deps/npm/node_modules/chownr/chownr.js @@ -7,6 +7,36 @@ const LCHOWN = fs.lchown ? 'lchown' : 'chown' /* istanbul ignore next */ const LCHOWNSYNC = fs.lchownSync ? 'lchownSync' : 'chownSync' +const needEISDIRHandled = fs.lchown && + !process.version.match(/v1[1-9]+\./) && + !process.version.match(/v10\.[6-9]/) + +/* istanbul ignore next */ +const handleEISDIR = + needEISDIRHandled ? (path, uid, gid, cb) => er => { + // Node prior to v10 had a very questionable implementation of + // fs.lchown, which would always try to call fs.open on a directory + // Fall back to fs.chown in those cases. + if (!er || er.code !== 'EISDIR') + cb(er) + else + fs.chown(path, uid, gid, cb) + } + : (_, __, ___, cb) => cb + +/* istanbul ignore next */ +const handleEISDirSync = + needEISDIRHandled ? (path, uid, gid) => { + try { + return fs[LCHOWNSYNC](path, uid, gid) + } catch (er) { + if (er.code !== 'EISDIR') + throw er + fs.chownSync(path, uid, gid) + } + } + : fs[LCHOWNSYNC] + // fs.readdir could only accept an options object as of node v6 const nodeVersion = process.version let readdir = (path, options, cb) => fs.readdir(path, options, cb) @@ -28,10 +58,13 @@ const chownrKid = (p, child, uid, gid, cb) => { chownr(path.resolve(p, child.name), uid, gid, er => { if (er) return cb(er) - fs[LCHOWN](path.resolve(p, child.name), uid, gid, cb) + const cpath = path.resolve(p, child.name) + fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, cb)) }) - } else - fs[LCHOWN](path.resolve(p, child.name), uid, gid, cb) + } else { + const cpath = path.resolve(p, child.name) + fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, cb)) + } } @@ -41,14 +74,18 @@ const chownr = (p, uid, gid, cb) => { // or doesn't exist. give up. if (er && er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP') return cb(er) - if (er || !children.length) return fs[LCHOWN](p, uid, gid, cb) + if (er || !children.length) + return fs[LCHOWN](p, uid, gid, handleEISDIR(p, uid, gid, cb)) let len = children.length let errState = null const then = er => { - if (errState) return - if (er) return cb(errState = er) - if (-- len === 0) return fs[LCHOWN](p, uid, gid, cb) + if (errState) + return + if (er) + return cb(errState = er) + if (-- len === 0) + return fs[LCHOWN](p, uid, gid, handleEISDIR(p, uid, gid, cb)) } children.forEach(child => chownrKid(p, child, uid, gid, then)) @@ -65,7 +102,7 @@ const chownrKidSync = (p, child, uid, gid) => { if (child.isDirectory()) chownrSync(path.resolve(p, child.name), uid, gid) - fs[LCHOWNSYNC](path.resolve(p, child.name), uid, gid) + handleEISDirSync(path.resolve(p, child.name), uid, gid) } const chownrSync = (p, uid, gid) => { @@ -74,14 +111,14 @@ const chownrSync = (p, uid, gid) => { children = readdirSync(p, { withFileTypes: true }) } catch (er) { if (er && er.code === 'ENOTDIR' && er.code !== 'ENOTSUP') - return fs[LCHOWNSYNC](p, uid, gid) + return handleEISDirSync(p, uid, gid) throw er } if (children.length) children.forEach(child => chownrKidSync(p, child, uid, gid)) - return fs[LCHOWNSYNC](p, uid, gid) + return handleEISDirSync(p, uid, gid) } module.exports = chownr diff --git a/deps/npm/node_modules/chownr/package.json b/deps/npm/node_modules/chownr/package.json index 0004fa0e1eb005..f7b9c81c84ca34 100644 --- a/deps/npm/node_modules/chownr/package.json +++ b/deps/npm/node_modules/chownr/package.json @@ -1,28 +1,30 @@ { - "_from": "chownr@1.1.1", - "_id": "chownr@1.1.1", + "_from": "chownr@1.1.2", + "_id": "chownr@1.1.2", "_inBundle": false, - "_integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", + "_integrity": "sha512-GkfeAQh+QNy3wquu9oIZr6SS5x7wGdSgNQvD10X3r+AZr1Oys22HW8kAmDMvNg2+Dm0TeGaEuO8gFwdBXxwO8A==", "_location": "/chownr", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "chownr@1.1.1", + "raw": "chownr@1.1.2", "name": "chownr", "escapedName": "chownr", - "rawSpec": "1.1.1", + "rawSpec": "1.1.2", "saveSpec": null, - "fetchSpec": "1.1.1" + "fetchSpec": "1.1.2" }, "_requiredBy": [ "#USER", - "/" + "/", + "/cacache", + "/tar" ], - "_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", - "_shasum": "54726b8b8fff4df053c42187e801fb4412df1494", - "_spec": "chownr@1.1.1", - "_where": "/Users/aeschright/code/cli", + "_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.2.tgz", + "_shasum": "a18f1e0b269c8a6a5d3c86eb298beb14c3dd7bf6", + "_spec": "chownr@1.1.2", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -56,5 +58,5 @@ "preversion": "npm test", "test": "tap test/*.js --cov" }, - "version": "1.1.1" + "version": "1.1.2" } diff --git a/deps/npm/node_modules/block-stream/LICENSE b/deps/npm/node_modules/cross-spawn/node_modules/lru-cache/LICENSE similarity index 100% rename from deps/npm/node_modules/block-stream/LICENSE rename to deps/npm/node_modules/cross-spawn/node_modules/lru-cache/LICENSE diff --git a/deps/npm/node_modules/cacache/node_modules/lru-cache/README.md b/deps/npm/node_modules/cross-spawn/node_modules/lru-cache/README.md similarity index 89% rename from deps/npm/node_modules/cacache/node_modules/lru-cache/README.md rename to deps/npm/node_modules/cross-spawn/node_modules/lru-cache/README.md index 435dfebb7e27d0..d660dd5747abec 100644 --- a/deps/npm/node_modules/cacache/node_modules/lru-cache/README.md +++ b/deps/npm/node_modules/cross-spawn/node_modules/lru-cache/README.md @@ -18,8 +18,8 @@ var LRU = require("lru-cache") , length: function (n, key) { return n * 2 + key.length } , dispose: function (key, n) { n.close() } , maxAge: 1000 * 60 * 60 } - , cache = new LRU(options) - , otherCache = new LRU(50) // sets just the max size + , cache = LRU(options) + , otherCache = LRU(50) // sets just the max size cache.set("key", "value") cache.get("key") // "value" @@ -49,13 +49,10 @@ away. * `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`. Setting it to a non-number or negative number will - throw a `TypeError`. Setting it to 0 makes it be `Infinity`. + 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. - Setting this to a negative value will make everything seem old! - Setting it to a non-number will throw a `TypeError`. * `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, key){return n.length}`. The default is @@ -79,11 +76,6 @@ away. it'll be called whenever a `set()` operation overwrites an existing key. If you set this option, `dispose()` will only be called when a key falls out of the cache, not when it is overwritten. -* `updateAgeOnGet` When using time-expiring entries with `maxAge`, - setting this to `true` will make each item's effective time update - to the current time whenever it is retrieved from cache, causing it - to not expire. (It can still fall out of cache based on recency of - use, of course.) ## API diff --git a/deps/npm/node_modules/cross-spawn/node_modules/lru-cache/index.js b/deps/npm/node_modules/cross-spawn/node_modules/lru-cache/index.js new file mode 100644 index 00000000000000..bd35b53589381c --- /dev/null +++ b/deps/npm/node_modules/cross-spawn/node_modules/lru-cache/index.js @@ -0,0 +1,468 @@ +'use strict' + +module.exports = LRUCache + +// This will be a proper iterable 'Map' in engines that support it, +// or a fakey-fake PseudoMap in older versions. +var Map = require('pseudomap') +var util = require('util') + +// A linked list to keep track of recently-used-ness +var Yallist = require('yallist') + +// use symbols if possible, otherwise just _props +var hasSymbol = typeof Symbol === 'function' && process.env._nodeLRUCacheForceNoSymbol !== '1' +var makeSymbol +if (hasSymbol) { + makeSymbol = function (key) { + return Symbol(key) + } +} else { + makeSymbol = function (key) { + return '_' + key + } +} + +var MAX = makeSymbol('max') +var LENGTH = makeSymbol('length') +var LENGTH_CALCULATOR = makeSymbol('lengthCalculator') +var ALLOW_STALE = makeSymbol('allowStale') +var MAX_AGE = makeSymbol('maxAge') +var DISPOSE = makeSymbol('dispose') +var NO_DISPOSE_ON_SET = makeSymbol('noDisposeOnSet') +var LRU_LIST = makeSymbol('lruList') +var CACHE = makeSymbol('cache') + +function naiveLength () { return 1 } + +// lruList is a yallist where the head is the youngest +// item, and the tail is the oldest. the list contains the Hit +// objects as the entries. +// Each Hit object has a reference to its Yallist.Node. This +// never changes. +// +// cache is a Map (or PseudoMap) that matches the keys to +// the Yallist.Node object. +function LRUCache (options) { + if (!(this instanceof LRUCache)) { + return new LRUCache(options) + } + + if (typeof options === 'number') { + options = { max: options } + } + + if (!options) { + options = {} + } + + var max = this[MAX] = options.max + // Kind of weird to have a default max of Infinity, but oh well. + if (!max || + !(typeof max === 'number') || + max <= 0) { + this[MAX] = Infinity + } + + var lc = options.length || naiveLength + if (typeof lc !== 'function') { + lc = naiveLength + } + this[LENGTH_CALCULATOR] = lc + + this[ALLOW_STALE] = options.stale || false + this[MAX_AGE] = options.maxAge || 0 + this[DISPOSE] = options.dispose + this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false + 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 + trim(this) + }, + get: function () { + return this[MAX] + }, + enumerable: true +}) + +Object.defineProperty(LRUCache.prototype, 'allowStale', { + set: function (allowStale) { + this[ALLOW_STALE] = !!allowStale + }, + get: function () { + return this[ALLOW_STALE] + }, + enumerable: true +}) + +Object.defineProperty(LRUCache.prototype, 'maxAge', { + set: function (mA) { + if (!mA || !(typeof mA === 'number') || mA < 0) { + mA = 0 + } + this[MAX_AGE] = mA + trim(this) + }, + get: function () { + return this[MAX_AGE] + }, + enumerable: true +}) + +// resize the cache when the lengthCalculator changes. +Object.defineProperty(LRUCache.prototype, 'lengthCalculator', { + set: function (lC) { + if (typeof lC !== 'function') { + lC = naiveLength + } + if (lC !== this[LENGTH_CALCULATOR]) { + this[LENGTH_CALCULATOR] = lC + this[LENGTH] = 0 + this[LRU_LIST].forEach(function (hit) { + hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) + this[LENGTH] += hit.length + }, this) + } + trim(this) + }, + get: function () { return this[LENGTH_CALCULATOR] }, + enumerable: true +}) + +Object.defineProperty(LRUCache.prototype, 'length', { + get: function () { return this[LENGTH] }, + enumerable: true +}) + +Object.defineProperty(LRUCache.prototype, 'itemCount', { + get: function () { return this[LRU_LIST].length }, + enumerable: true +}) + +LRUCache.prototype.rforEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this[LRU_LIST].tail; walker !== null;) { + var prev = walker.prev + forEachStep(this, fn, walker, thisp) + walker = prev + } +} + +function forEachStep (self, fn, node, thisp) { + var hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) { + hit = undefined + } + } + if (hit) { + fn.call(thisp, hit.value, hit.key, self) + } +} + +LRUCache.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this[LRU_LIST].head; walker !== null;) { + var next = walker.next + forEachStep(this, fn, walker, thisp) + walker = next + } +} + +LRUCache.prototype.keys = function () { + return this[LRU_LIST].toArray().map(function (k) { + return k.key + }, this) +} + +LRUCache.prototype.values = function () { + return this[LRU_LIST].toArray().map(function (k) { + return k.value + }, this) +} + +LRUCache.prototype.reset = function () { + if (this[DISPOSE] && + this[LRU_LIST] && + this[LRU_LIST].length) { + this[LRU_LIST].forEach(function (hit) { + this[DISPOSE](hit.key, hit.value) + }, this) + } + + this[CACHE] = new Map() // hash of items by key + this[LRU_LIST] = new Yallist() // list of items in order of use recency + this[LENGTH] = 0 // length of items in the list +} + +LRUCache.prototype.dump = function () { + return this[LRU_LIST].map(function (hit) { + if (!isStale(this, hit)) { + return { + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0) + } + } + }, this).toArray().filter(function (h) { + return h + }) +} + +LRUCache.prototype.dumpLru = function () { + return this[LRU_LIST] +} + +/* istanbul ignore next */ +LRUCache.prototype.inspect = function (n, opts) { + var str = 'LRUCache {' + var extras = false + + var as = this[ALLOW_STALE] + if (as) { + str += '\n allowStale: true' + extras = true + } + + var max = this[MAX] + if (max && max !== Infinity) { + if (extras) { + str += ',' + } + str += '\n max: ' + util.inspect(max, opts) + extras = true + } + + var maxAge = this[MAX_AGE] + if (maxAge) { + if (extras) { + str += ',' + } + str += '\n maxAge: ' + util.inspect(maxAge, opts) + extras = true + } + + var lc = this[LENGTH_CALCULATOR] + if (lc && lc !== naiveLength) { + if (extras) { + str += ',' + } + str += '\n length: ' + util.inspect(this[LENGTH], opts) + extras = true + } + + var didFirst = false + this[LRU_LIST].forEach(function (item) { + if (didFirst) { + str += ',\n ' + } else { + if (extras) { + str += ',\n' + } + didFirst = true + str += '\n ' + } + var key = util.inspect(item.key).split('\n').join('\n ') + var val = { value: item.value } + if (item.maxAge !== maxAge) { + val.maxAge = item.maxAge + } + if (lc !== naiveLength) { + val.length = item.length + } + if (isStale(this, item)) { + val.stale = true + } + + val = util.inspect(val, opts).split('\n').join('\n ') + str += key + ' => ' + val + }) + + if (didFirst || extras) { + str += '\n' + } + str += '}' + + return str +} + +LRUCache.prototype.set = function (key, value, maxAge) { + maxAge = maxAge || this[MAX_AGE] + + var now = maxAge ? Date.now() : 0 + var len = this[LENGTH_CALCULATOR](value, key) + + if (this[CACHE].has(key)) { + if (len > this[MAX]) { + del(this, this[CACHE].get(key)) + return false + } + + var node = this[CACHE].get(key) + var item = node.value + + // dispose of the old one before overwriting + // split out into 2 ifs for better coverage tracking + if (this[DISPOSE]) { + if (!this[NO_DISPOSE_ON_SET]) { + this[DISPOSE](key, item.value) + } + } + + item.now = now + item.maxAge = maxAge + item.value = value + this[LENGTH] += len - item.length + item.length = len + this.get(key) + trim(this) + return true + } + + var hit = new Entry(key, value, 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[LRU_LIST].unshift(hit) + this[CACHE].set(key, this[LRU_LIST].head) + trim(this) + return true +} + +LRUCache.prototype.has = function (key) { + if (!this[CACHE].has(key)) return false + var hit = this[CACHE].get(key).value + if (isStale(this, hit)) { + return false + } + return true +} + +LRUCache.prototype.get = function (key) { + return get(this, key, true) +} + +LRUCache.prototype.peek = function (key) { + return get(this, key, false) +} + +LRUCache.prototype.pop = function () { + var node = this[LRU_LIST].tail + if (!node) return null + del(this, node) + return node.value +} + +LRUCache.prototype.del = function (key) { + del(this, this[CACHE].get(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] + 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) + } + } + } +} + +LRUCache.prototype.prune = function () { + var self = this + this[CACHE].forEach(function (value, key) { + get(self, key, false) + }) +} + +function get (self, key, doUse) { + var node = self[CACHE].get(key) + if (node) { + var hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) hit = undefined + } else { + if (doUse) { + self[LRU_LIST].unshiftNode(node) + } + } + if (hit) hit = hit.value + } + return hit +} + +function isStale (self, hit) { + if (!hit || (!hit.maxAge && !self[MAX_AGE])) { + return false + } + var stale = false + var diff = Date.now() - hit.now + if (hit.maxAge) { + stale = diff > hit.maxAge + } else { + stale = self[MAX_AGE] && (diff > self[MAX_AGE]) + } + return stale +} + +function trim (self) { + if (self[LENGTH] > self[MAX]) { + for (var walker = self[LRU_LIST].tail; + self[LENGTH] > self[MAX] && walker !== null;) { + // We know that we're about to delete this one, and also + // what the next least recently used key will be, so just + // go ahead and set it now. + var prev = walker.prev + del(self, walker) + walker = prev + } + } +} + +function del (self, node) { + if (node) { + var hit = node.value + if (self[DISPOSE]) { + self[DISPOSE](hit.key, hit.value) + } + self[LENGTH] -= hit.length + self[CACHE].delete(hit.key) + self[LRU_LIST].removeNode(node) + } +} + +// classy, since V8 prefers predictable objects. +function Entry (key, value, length, now, maxAge) { + this.key = key + this.value = value + this.length = length + this.now = now + this.maxAge = maxAge || 0 +} diff --git a/deps/npm/node_modules/cacache/node_modules/lru-cache/package.json b/deps/npm/node_modules/cross-spawn/node_modules/lru-cache/package.json similarity index 63% rename from deps/npm/node_modules/cacache/node_modules/lru-cache/package.json rename to deps/npm/node_modules/cross-spawn/node_modules/lru-cache/package.json index 1d41a07afbda4c..092742d4d6e4d3 100644 --- a/deps/npm/node_modules/cacache/node_modules/lru-cache/package.json +++ b/deps/npm/node_modules/cross-spawn/node_modules/lru-cache/package.json @@ -1,27 +1,27 @@ { - "_from": "lru-cache@^5.1.1", - "_id": "lru-cache@5.1.1", + "_from": "lru-cache@^4.0.1", + "_id": "lru-cache@4.1.5", "_inBundle": false, - "_integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "_location": "/cacache/lru-cache", + "_integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "_location": "/cross-spawn/lru-cache", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "lru-cache@^5.1.1", + "raw": "lru-cache@^4.0.1", "name": "lru-cache", "escapedName": "lru-cache", - "rawSpec": "^5.1.1", + "rawSpec": "^4.0.1", "saveSpec": null, - "fetchSpec": "^5.1.1" + "fetchSpec": "^4.0.1" }, "_requiredBy": [ - "/cacache" + "/cross-spawn" ], - "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "_shasum": "1da27e6710271947695daf6848e847f01d84b920", - "_spec": "lru-cache@^5.1.1", - "_where": "/Users/aeschright/code/cli/node_modules/cacache", + "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "_shasum": "8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd", + "_spec": "lru-cache@^4.0.1", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/cross-spawn", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me" @@ -31,12 +31,14 @@ }, "bundleDependencies": false, "dependencies": { - "yallist": "^3.0.2" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" }, "deprecated": false, "description": "A cache object that deletes the least-recently-used items.", "devDependencies": { "benchmark": "^2.1.4", + "standard": "^12.0.1", "tap": "^12.1.0" }, "files": [ @@ -57,11 +59,13 @@ }, "scripts": { "coveragerport": "tap --coverage-report=html", + "lintfix": "standard --fix test/*.js index.js", "postpublish": "git push origin --all; git push origin --tags", - "postversion": "npm publish", + "posttest": "standard test/*.js index.js", + "postversion": "npm publish --tag=legacy", "preversion": "npm test", "snap": "TAP_SNAPSHOT=1 tap test/*.js -J", "test": "tap test/*.js --100 -J" }, - "version": "5.1.1" + "version": "4.1.5" } diff --git a/deps/npm/node_modules/cacache/node_modules/lru-cache/LICENSE b/deps/npm/node_modules/cross-spawn/node_modules/yallist/LICENSE similarity index 100% rename from deps/npm/node_modules/cacache/node_modules/lru-cache/LICENSE rename to deps/npm/node_modules/cross-spawn/node_modules/yallist/LICENSE diff --git a/deps/npm/node_modules/cacache/node_modules/yallist/README.md b/deps/npm/node_modules/cross-spawn/node_modules/yallist/README.md similarity index 100% rename from deps/npm/node_modules/cacache/node_modules/yallist/README.md rename to deps/npm/node_modules/cross-spawn/node_modules/yallist/README.md diff --git a/deps/npm/node_modules/cross-spawn/node_modules/yallist/iterator.js b/deps/npm/node_modules/cross-spawn/node_modules/yallist/iterator.js new file mode 100644 index 00000000000000..4a15bf22c40032 --- /dev/null +++ b/deps/npm/node_modules/cross-spawn/node_modules/yallist/iterator.js @@ -0,0 +1,7 @@ +var Yallist = require('./yallist.js') + +Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value + } +} diff --git a/deps/npm/node_modules/cacache/node_modules/yallist/package.json b/deps/npm/node_modules/cross-spawn/node_modules/yallist/package.json similarity index 63% rename from deps/npm/node_modules/cacache/node_modules/yallist/package.json rename to deps/npm/node_modules/cross-spawn/node_modules/yallist/package.json index 91ea442aa86f1c..de575bcbb85a83 100644 --- a/deps/npm/node_modules/cacache/node_modules/yallist/package.json +++ b/deps/npm/node_modules/cross-spawn/node_modules/yallist/package.json @@ -1,27 +1,27 @@ { - "_from": "yallist@^3.0.2", - "_id": "yallist@3.0.3", + "_from": "yallist@^2.1.2", + "_id": "yallist@2.1.2", "_inBundle": false, - "_integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", - "_location": "/cacache/yallist", + "_integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "_location": "/cross-spawn/yallist", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "yallist@^3.0.2", + "raw": "yallist@^2.1.2", "name": "yallist", "escapedName": "yallist", - "rawSpec": "^3.0.2", + "rawSpec": "^2.1.2", "saveSpec": null, - "fetchSpec": "^3.0.2" + "fetchSpec": "^2.1.2" }, "_requiredBy": [ - "/cacache/lru-cache" + "/cross-spawn/lru-cache" ], - "_resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "_shasum": "b4b049e314be545e3ce802236d6cd22cd91c3de9", - "_spec": "yallist@^3.0.2", - "_where": "/Users/aeschright/code/cli/node_modules/cacache/node_modules/lru-cache", + "_resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "_shasum": "1c11f9218f076089a47dd512f93c6699a6a81d52", + "_spec": "yallist@^2.1.2", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/cross-spawn/node_modules/lru-cache", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -35,7 +35,7 @@ "deprecated": false, "description": "Yet Another Linked List", "devDependencies": { - "tap": "^12.1.0" + "tap": "^10.3.0" }, "directories": { "test": "test" @@ -58,5 +58,5 @@ "preversion": "npm test", "test": "tap test/*.js --100" }, - "version": "3.0.3" + "version": "2.1.2" } diff --git a/deps/npm/node_modules/cacache/node_modules/yallist/yallist.js b/deps/npm/node_modules/cross-spawn/node_modules/yallist/yallist.js similarity index 98% rename from deps/npm/node_modules/cacache/node_modules/yallist/yallist.js rename to deps/npm/node_modules/cross-spawn/node_modules/yallist/yallist.js index b0ab36cf31b7a6..518d23330b936c 100644 --- a/deps/npm/node_modules/cacache/node_modules/yallist/yallist.js +++ b/deps/npm/node_modules/cross-spawn/node_modules/yallist/yallist.js @@ -1,4 +1,3 @@ -'use strict' module.exports = Yallist Yallist.Node = Node @@ -369,8 +368,3 @@ function Node (value, prev, next, list) { this.next = null } } - -try { - // add if support for Symbol.iterator is present - require('./iterator.js')(Yallist) -} catch (er) {} diff --git a/deps/npm/node_modules/env-paths/index.js b/deps/npm/node_modules/env-paths/index.js new file mode 100644 index 00000000000000..4a04b712ff8a67 --- /dev/null +++ b/deps/npm/node_modules/env-paths/index.js @@ -0,0 +1,69 @@ +'use strict'; +const path = require('path'); +const os = require('os'); + +const homedir = os.homedir(); +const tmpdir = os.tmpdir(); +const env = process.env; + +const macos = name => { + const library = path.join(homedir, 'Library'); + + return { + data: path.join(library, 'Application Support', name), + config: path.join(library, 'Preferences', name), + cache: path.join(library, 'Caches', name), + log: path.join(library, 'Logs', name), + temp: path.join(tmpdir, name) + }; +}; + +const windows = name => { + const appData = env.LOCALAPPDATA || path.join(homedir, 'AppData', 'Local'); + + return { + // data/config/cache/log are invented by me as Windows isn't opinionated about this + data: path.join(appData, name, 'Data'), + config: path.join(appData, name, 'Config'), + cache: path.join(appData, name, 'Cache'), + log: path.join(appData, name, 'Log'), + temp: path.join(tmpdir, name) + }; +}; + +// https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html +const linux = name => { + const username = path.basename(homedir); + + return { + data: path.join(env.XDG_DATA_HOME || path.join(homedir, '.local', 'share'), name), + config: path.join(env.XDG_CONFIG_HOME || path.join(homedir, '.config'), name), + cache: path.join(env.XDG_CACHE_HOME || path.join(homedir, '.cache'), name), + // https://wiki.debian.org/XDGBaseDirectorySpecification#state + log: path.join(env.XDG_STATE_HOME || path.join(homedir, '.local', 'state'), name), + temp: path.join(tmpdir, username, name) + }; +}; + +module.exports = (name, opts) => { + if (typeof name !== 'string') { + throw new TypeError(`Expected string, got ${typeof name}`); + } + + opts = Object.assign({suffix: 'nodejs'}, opts); + + if (opts.suffix) { + // add suffix to prevent possible conflict with native apps + name += `-${opts.suffix}`; + } + + if (process.platform === 'darwin') { + return macos(name); + } + + if (process.platform === 'win32') { + return windows(name); + } + + return linux(name); +}; diff --git a/deps/npm/node_modules/env-paths/license b/deps/npm/node_modules/env-paths/license new file mode 100644 index 00000000000000..654d0bfe943437 --- /dev/null +++ b/deps/npm/node_modules/env-paths/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.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/env-paths/package.json b/deps/npm/node_modules/env-paths/package.json new file mode 100644 index 00000000000000..3b1dfb74d8041a --- /dev/null +++ b/deps/npm/node_modules/env-paths/package.json @@ -0,0 +1,78 @@ +{ + "_from": "env-paths@^1.0.0", + "_id": "env-paths@1.0.0", + "_inBundle": false, + "_integrity": "sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA=", + "_location": "/env-paths", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "env-paths@^1.0.0", + "name": "env-paths", + "escapedName": "env-paths", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/node-gyp" + ], + "_resolved": "https://registry.npmjs.org/env-paths/-/env-paths-1.0.0.tgz", + "_shasum": "4168133b42bb05c38a35b1ae4397c8298ab369e0", + "_spec": "env-paths@^1.0.0", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/node-gyp", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/env-paths/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Get paths for storing things like data, config, cache, etc", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/env-paths#readme", + "keywords": [ + "common", + "user", + "paths", + "env", + "environment", + "directory", + "dir", + "appdir", + "path", + "data", + "config", + "cache", + "logs", + "temp", + "linux", + "unix" + ], + "license": "MIT", + "name": "env-paths", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/env-paths.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.0", + "xo": { + "esnext": true + } +} diff --git a/deps/npm/node_modules/env-paths/readme.md b/deps/npm/node_modules/env-paths/readme.md new file mode 100644 index 00000000000000..0bdc2ac1439b70 --- /dev/null +++ b/deps/npm/node_modules/env-paths/readme.md @@ -0,0 +1,71 @@ +# env-paths [![Build Status](https://travis-ci.org/sindresorhus/env-paths.svg?branch=master)](https://travis-ci.org/sindresorhus/env-paths) + +> Get paths for storing things like data, config, cache, etc + + +## Install + +``` +$ npm install --save env-paths +``` + + +## Usage + +```js +const envPaths = require('env-paths'); +const paths = envPaths('MyApp'); + +paths.data; +//=> '/home/sindresorhus/.local/share/MyApp-nodejs' + +paths.config +//=> '/home/sindresorhus/.config/MyApp-nodejs' +``` + + +## API + +### paths = envPaths(name, [options]) + +#### name + +Type: `string` + +Name of your project. Used to generate the paths. + +#### options + +##### suffix + +Type: `string`
      +Default: `'nodejs'` + +**Don't use this option unless you really have to!**
      +Suffix appended to the project name to avoid name conflicts with native +apps. Pass an empty string to disable it. + +### paths.data + +Directory for data files. + +### paths.config + +Directory for config files. + +### paths.cache + +Directory for non-essential data files. + +### paths.log + +Directory for log files. + +### paths.temp + +Directory for temporary files. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/deps/npm/node_modules/es6-promise/CHANGELOG.md b/deps/npm/node_modules/es6-promise/CHANGELOG.md index 51582059f90460..d630cc0dc06c01 100644 --- a/deps/npm/node_modules/es6-promise/CHANGELOG.md +++ b/deps/npm/node_modules/es6-promise/CHANGELOG.md @@ -1,5 +1,9 @@ # Master +# 4.2.5 + +* remove old try/catch performance hacks, modern runtimes do not require these tricks + # 4.2.4 * [Fixes #305] Confuse webpack diff --git a/deps/npm/node_modules/es6-promise/dist/es6-promise.auto.js b/deps/npm/node_modules/es6-promise/dist/es6-promise.auto.js index 6312674b519f6f..1c46f949055494 100644 --- a/deps/npm/node_modules/es6-promise/dist/es6-promise.auto.js +++ b/deps/npm/node_modules/es6-promise/dist/es6-promise.auto.js @@ -3,7 +3,7 @@ * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) * @license Licensed under MIT license * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE - * @version v4.2.6+9869a4bc + * @version v4.2.8+1e68dce6 */ (function (global, factory) { @@ -234,8 +234,6 @@ var PENDING = void 0; var FULFILLED = 1; var REJECTED = 2; -var TRY_CATCH_ERROR = { error: null }; - function selfFulfillment() { return new TypeError("You cannot resolve a promise with itself"); } @@ -244,15 +242,6 @@ function cannotReturnOwn() { return new TypeError('A promises callback cannot return that same promise.'); } -function getThen(promise) { - try { - return promise.then; - } catch (error) { - TRY_CATCH_ERROR.error = error; - return TRY_CATCH_ERROR; - } -} - function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) { try { then$$1.call(value, fulfillmentHandler, rejectionHandler); @@ -308,10 +297,7 @@ function handleMaybeThenable(promise, maybeThenable, then$$1) { if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) { handleOwnThenable(promise, maybeThenable); } else { - if (then$$1 === TRY_CATCH_ERROR) { - reject(promise, TRY_CATCH_ERROR.error); - TRY_CATCH_ERROR.error = null; - } else if (then$$1 === undefined) { + if (then$$1 === undefined) { fulfill(promise, maybeThenable); } else if (isFunction(then$$1)) { handleForeignThenable(promise, maybeThenable, then$$1); @@ -325,7 +311,14 @@ function resolve(promise, value) { if (promise === value) { reject(promise, selfFulfillment()); } else if (objectOrFunction(value)) { - handleMaybeThenable(promise, value, getThen(value)); + var then$$1 = void 0; + try { + then$$1 = value.then; + } catch (error) { + reject(promise, error); + return; + } + handleMaybeThenable(promise, value, then$$1); } else { fulfill(promise, value); } @@ -404,31 +397,18 @@ function publish(promise) { promise._subscribers.length = 0; } -function tryCatch(callback, detail) { - try { - return callback(detail); - } catch (e) { - TRY_CATCH_ERROR.error = e; - return TRY_CATCH_ERROR; - } -} - function invokeCallback(settled, promise, callback, detail) { var hasCallback = isFunction(callback), value = void 0, error = void 0, - succeeded = void 0, - failed = void 0; + succeeded = true; if (hasCallback) { - value = tryCatch(callback, detail); - - if (value === TRY_CATCH_ERROR) { - failed = true; - error = value.error; - value.error = null; - } else { - succeeded = true; + try { + value = callback(detail); + } catch (e) { + succeeded = false; + error = e; } if (promise === value) { @@ -437,14 +417,13 @@ function invokeCallback(settled, promise, callback, detail) { } } else { value = detail; - succeeded = true; } if (promise._state !== PENDING) { // noop } else if (hasCallback && succeeded) { resolve(promise, value); - } else if (failed) { + } else if (succeeded === false) { reject(promise, error); } else if (settled === FULFILLED) { fulfill(promise, value); @@ -522,7 +501,15 @@ var Enumerator = function () { if (resolve$$1 === resolve$1) { - var _then = getThen(entry); + var _then = void 0; + var error = void 0; + var didError = false; + try { + _then = entry.then; + } catch (e) { + didError = true; + error = e; + } if (_then === then && entry._state !== PENDING) { this._settledAt(entry._state, i, entry._result); @@ -531,7 +518,11 @@ var Enumerator = function () { this._result[i] = entry; } else if (c === Promise$2) { var promise = new c(noop); - handleMaybeThenable(promise, entry, _then); + if (didError) { + reject(promise, error); + } else { + handleMaybeThenable(promise, entry, _then); + } this._willSettleAt(promise, i); } else { this._willSettleAt(new c(function (resolve$$1) { diff --git a/deps/npm/node_modules/es6-promise/dist/es6-promise.auto.map b/deps/npm/node_modules/es6-promise/dist/es6-promise.auto.map index 0264bd481635de..a5abce99f41051 100644 --- a/deps/npm/node_modules/es6-promise/dist/es6-promise.auto.map +++ b/deps/npm/node_modules/es6-promise/dist/es6-promise.auto.map @@ -1 +1 @@ -{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.6+9869a4bc\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n if (isFunction(callback)) {\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n }\n\n return promise.then(callback, callback);\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","import Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAEC;;AAED,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC;AACtB,IAAI,KAAK,C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,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;ACJ1BA,SAAO,CAAC,QAAQ,EAAE,CAAC;;;;;;;;","file":"es6-promise.auto.js"} \ No newline at end of file +{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.8+1e68dce6\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n var then = void 0;\n try {\n then = value.then;\n } catch (error) {\n reject(promise, error);\n return;\n }\n handleMaybeThenable(promise, value, then);\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = true;\n\n if (hasCallback) {\n try {\n value = callback(detail);\n } catch (e) {\n succeeded = false;\n error = e;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (succeeded === false) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = void 0;\n var error = void 0;\n var didError = false;\n try {\n _then = entry.then;\n } catch (e) {\n didError = true;\n error = e;\n }\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n if (didError) {\n reject(promise, error);\n } else {\n handleMaybeThenable(promise, entry, _then);\n }\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n if (isFunction(callback)) {\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n }\n\n return promise.then(callback, callback);\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","import Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAEC;;AAED,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC;AACtB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC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nB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACjC,KAAK,GAAG,MAAM,CAAC;GAChB,MAAM,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;IACtC,KAAK,GAAG,IAAI,CAAC;GACd,MAAM;IACL,IAAI;MACF,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;KACnC,CAAC,OAAO,CAAC,EAAE;MACV,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;KAC7F;GACF;;EAED,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;;EAEtB,IAAI,CAAC,EAAE;IACL,IAAI,eAAe,GAAG,IAAI,CAAC;IAC3B,IAAI;MACF,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC/D,CAAC,OAAO,CAAC,EAAE;;KAEX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;ACJ1BA,SAAO,CAAC,QAAQ,EAAE,CAAC;;;;;;;;","file":"es6-promise.auto.js"} \ No newline at end of file diff --git a/deps/npm/node_modules/es6-promise/dist/es6-promise.auto.min.js b/deps/npm/node_modules/es6-promise/dist/es6-promise.auto.min.js index 586ddb4bcaa668..5a44a3b086e844 100644 --- a/deps/npm/node_modules/es6-promise/dist/es6-promise.auto.min.js +++ b/deps/npm/node_modules/es6-promise/dist/es6-promise.auto.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){B=t}function r(t){G=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof z?function(){z(a)}:c()}function s(){var t=0,e=new J(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n if (isFunction(callback)) {\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n }\n\n return promise.then(callback, callback);\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","import Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAEC;;AAED,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC;AACtB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,AAAO,IAAI,OAAO,GAAG,QAAQ;;ACtB7B,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,IAAI,SAAS,GAAG,KAAK,CAAC,CAAC;AACvB,IAAI,iBAAiB,GAAG,KAAK,CAAC,CAAC;;AAE/B,AAAO,IAAI,IAAI,GAAG,SAAS,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;EAC7C,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;EACtB,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CA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OAAO,IAAI,KAAK,WAAW,EAAE;IACtC,KAAK,GAAG,IAAI,CAAC;GACd,MAAM;IACL,IAAI;MACF,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;KACnC,CAAC,OAAO,CAAC,EAAE;MACV,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;KAC7F;GACF;;EAED,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;;EAEtB,IAAI,CAAC,EAAE;IACL,IAAI,eAAe,GAAG,IAAI,CAAC;IAC3B,IAAI;MACF,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC/D,CAAC,OAAO,CAAC,EAAE;;KAEX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;ACJ1BA,SAAO,CAAC,QAAQ,EAAE,CAAC;;;;;;;;","file":"es6-promise.auto.min.js"} \ No newline at end of file +{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.8+1e68dce6\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n var then = void 0;\n try {\n then = value.then;\n } catch (error) {\n reject(promise, error);\n return;\n }\n handleMaybeThenable(promise, value, then);\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = true;\n\n if (hasCallback) {\n try {\n value = callback(detail);\n } catch (e) {\n succeeded = false;\n error = e;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (succeeded === false) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = void 0;\n var error = void 0;\n var didError = false;\n try {\n _then = entry.then;\n } catch (e) {\n didError = true;\n error = e;\n }\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n if (didError) {\n reject(promise, error);\n } else {\n handleMaybeThenable(promise, entry, _then);\n }\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n if (isFunction(callback)) {\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n }\n\n return promise.then(callback, callback);\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","import Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAEC;;AAED,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC;AACtB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,AAAO,IAAI,OAAO,GAAG,QAAQ;;ACtB7B,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,IAAI,SAAS,GAAG,KAAK,CAAC,CAAC;AACvB,IAAI,iBAAiB,GAAG,KAAK,CAAC,CAAC;;AAE/B,AAAO,IAAI,IAAI,GAAG,SAAS,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;EAC7C,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;EACtB,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;EACrB,GAAG,IAAI,CAAC,CAAC;EACT,IAAI,GAAG,KAAK,CAAC,EAAE;;;;IAIb,IAAI,iBAAiB,EAAE;MACrB,iBAAiB,CAAC,KAAK,CAAC,CAAC;KAC1B,MAAM;MACL,aAAa,EAAE,CAAC;KACjB;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EAAE;;KAEX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;ACJ1BA,SAAO,CAAC,QAAQ,EAAE,CAAC;;;;;;;;","file":"es6-promise.auto.min.js"} \ No newline at end of file diff --git a/deps/npm/node_modules/es6-promise/dist/es6-promise.js b/deps/npm/node_modules/es6-promise/dist/es6-promise.js index 02a78bddb8ee0f..780e6a112a8cfa 100644 --- a/deps/npm/node_modules/es6-promise/dist/es6-promise.js +++ b/deps/npm/node_modules/es6-promise/dist/es6-promise.js @@ -3,7 +3,7 @@ * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) * @license Licensed under MIT license * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE - * @version v4.2.6+9869a4bc + * @version v4.2.8+1e68dce6 */ (function (global, factory) { @@ -234,8 +234,6 @@ var PENDING = void 0; var FULFILLED = 1; var REJECTED = 2; -var TRY_CATCH_ERROR = { error: null }; - function selfFulfillment() { return new TypeError("You cannot resolve a promise with itself"); } @@ -244,15 +242,6 @@ function cannotReturnOwn() { return new TypeError('A promises callback cannot return that same promise.'); } -function getThen(promise) { - try { - return promise.then; - } catch (error) { - TRY_CATCH_ERROR.error = error; - return TRY_CATCH_ERROR; - } -} - function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) { try { then$$1.call(value, fulfillmentHandler, rejectionHandler); @@ -308,10 +297,7 @@ function handleMaybeThenable(promise, maybeThenable, then$$1) { if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) { handleOwnThenable(promise, maybeThenable); } else { - if (then$$1 === TRY_CATCH_ERROR) { - reject(promise, TRY_CATCH_ERROR.error); - TRY_CATCH_ERROR.error = null; - } else if (then$$1 === undefined) { + if (then$$1 === undefined) { fulfill(promise, maybeThenable); } else if (isFunction(then$$1)) { handleForeignThenable(promise, maybeThenable, then$$1); @@ -325,7 +311,14 @@ function resolve(promise, value) { if (promise === value) { reject(promise, selfFulfillment()); } else if (objectOrFunction(value)) { - handleMaybeThenable(promise, value, getThen(value)); + var then$$1 = void 0; + try { + then$$1 = value.then; + } catch (error) { + reject(promise, error); + return; + } + handleMaybeThenable(promise, value, then$$1); } else { fulfill(promise, value); } @@ -404,31 +397,18 @@ function publish(promise) { promise._subscribers.length = 0; } -function tryCatch(callback, detail) { - try { - return callback(detail); - } catch (e) { - TRY_CATCH_ERROR.error = e; - return TRY_CATCH_ERROR; - } -} - function invokeCallback(settled, promise, callback, detail) { var hasCallback = isFunction(callback), value = void 0, error = void 0, - succeeded = void 0, - failed = void 0; + succeeded = true; if (hasCallback) { - value = tryCatch(callback, detail); - - if (value === TRY_CATCH_ERROR) { - failed = true; - error = value.error; - value.error = null; - } else { - succeeded = true; + try { + value = callback(detail); + } catch (e) { + succeeded = false; + error = e; } if (promise === value) { @@ -437,14 +417,13 @@ function invokeCallback(settled, promise, callback, detail) { } } else { value = detail; - succeeded = true; } if (promise._state !== PENDING) { // noop } else if (hasCallback && succeeded) { resolve(promise, value); - } else if (failed) { + } else if (succeeded === false) { reject(promise, error); } else if (settled === FULFILLED) { fulfill(promise, value); @@ -522,7 +501,15 @@ var Enumerator = function () { if (resolve$$1 === resolve$1) { - var _then = getThen(entry); + var _then = void 0; + var error = void 0; + var didError = false; + try { + _then = entry.then; + } catch (e) { + didError = true; + error = e; + } if (_then === then && entry._state !== PENDING) { this._settledAt(entry._state, i, entry._result); @@ -531,7 +518,11 @@ var Enumerator = function () { this._result[i] = entry; } else if (c === Promise$1) { var promise = new c(noop); - handleMaybeThenable(promise, entry, _then); + if (didError) { + reject(promise, error); + } else { + handleMaybeThenable(promise, entry, _then); + } this._willSettleAt(promise, i); } else { this._willSettleAt(new c(function (resolve$$1) { diff --git a/deps/npm/node_modules/es6-promise/dist/es6-promise.map b/deps/npm/node_modules/es6-promise/dist/es6-promise.map index d17ac0788c37c7..27db4142fdcd78 100644 --- a/deps/npm/node_modules/es6-promise/dist/es6-promise.map +++ b/deps/npm/node_modules/es6-promise/dist/es6-promise.map @@ -1 +1 @@ -{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.6+9869a4bc\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n if (isFunction(callback)) {\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n }\n\n return promise.then(callback, callback);\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAA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D,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;;;;;;;","file":"es6-promise.js"} \ No newline at end of file +{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.8+1e68dce6\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n var then = void 0;\n try {\n then = value.then;\n } catch (error) {\n reject(promise, error);\n return;\n }\n handleMaybeThenable(promise, value, then);\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = true;\n\n if (hasCallback) {\n try {\n value = callback(detail);\n } catch (e) {\n succeeded = false;\n error = e;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (succeeded === false) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = void 0;\n var error = void 0;\n var didError = false;\n try {\n _then = entry.then;\n } catch (e) {\n didError = true;\n error = e;\n }\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n if (didError) {\n reject(promise, error);\n } else {\n handleMaybeThenable(promise, entry, _then);\n }\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n if (isFunction(callback)) {\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n }\n\n return promise.then(callback, callback);\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAEC;;AAED,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC;AACtB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,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B,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACjC,KAAK,GAAG,MAAM,CAAC;GAChB,MAAM,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;IACtC,KAAK,GAAG,IAAI,CAAC;GACd,MAAM;IACL,IAAI;MACF,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;KACnC,CAAC,OAAO,CAAC,EAAE;MACV,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;KAC7F;GACF;;EAED,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;;EAEtB,IAAI,CAAC,EAAE;IACL,IAAI,eAAe,GAAG,IAAI,CAAC;IAC3B,IAAI;MACF,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC/D,CAAC,OAAO,CAAC,EAAE;;KAEX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;;;;;;;","file":"es6-promise.js"} \ No newline at end of file diff --git a/deps/npm/node_modules/es6-promise/dist/es6-promise.min.js b/deps/npm/node_modules/es6-promise/dist/es6-promise.min.js index b37c7755ec0f10..6af5903ab58134 100644 --- a/deps/npm/node_modules/es6-promise/dist/es6-promise.min.js +++ b/deps/npm/node_modules/es6-promise/dist/es6-promise.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){B=t}function r(t){G=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof z?function(){z(a)}:c()}function s(){var t=0,e=new J(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n if (isFunction(callback)) {\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n }\n\n return promise.then(callback, callback);\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAEC;;AAED,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC;AACtB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,AAAO,IAAI,OAAO,GAAG,QAAQ;;ACtB7B,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,IAAI,SAAS,GAAG,KAAK,CAAC,CAAC;AACvB,IAAI,iBAAiB,GAAG,KAAK,CAAC,CAAC;;AAE/B,AAAO,IAAI,IAAI,GAAG,SAAS,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;EAC7C,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;EACtB,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;EACrB,GAAG,IAAI,CAAC,CAAC;EACT,IAAI,GAAG,KAAK,CAAC,EAAE;;;;IAIb,IAAI,iBAAiB,EAAE;MACrB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,CAAC,aAAa,CAAC,EAAE,CAAC;KACnC,CAAC,OAAO,CAAC,EAAE;MACV,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;KAC7F;GACF;;EAED,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;;EAEtB,IAAI,CAAC,EAAE;IACL,IAAI,eAAe,GAAG,IAAI,CAAC;IAC3B,IAAI;MACF,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC/D,CAAC,OAAO,CAAC,EAAE;;KAEX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;;;;;;;","file":"es6-promise.min.js"} \ No newline at end of file +{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.8+1e68dce6\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n var then = void 0;\n try {\n then = value.then;\n } catch (error) {\n reject(promise, error);\n return;\n }\n handleMaybeThenable(promise, value, then);\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = true;\n\n if (hasCallback) {\n try {\n value = callback(detail);\n } catch (e) {\n succeeded = false;\n error = e;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (succeeded === false) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = void 0;\n var error = void 0;\n var didError = false;\n try {\n _then = entry.then;\n } catch (e) {\n didError = true;\n error = e;\n }\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n if (didError) {\n reject(promise, error);\n } else {\n handleMaybeThenable(promise, entry, _then);\n }\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n if (isFunction(callback)) {\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n }\n\n return promise.then(callback, callback);\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OA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;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;;;;;;;","file":"es6-promise.min.js"} \ No newline at end of file diff --git a/deps/npm/node_modules/es6-promise/es6-promise.d.ts b/deps/npm/node_modules/es6-promise/es6-promise.d.ts index cce5b36071e6cf..e4200dfd0d0f6f 100644 --- a/deps/npm/node_modules/es6-promise/es6-promise.d.ts +++ b/deps/npm/node_modules/es6-promise/es6-promise.d.ts @@ -34,11 +34,15 @@ export class Promise implements Thenable { catch (onRejected?: (error: any) => U | Thenable): Promise; /** - * onSettled is invoked when/if the "promise" settles (either rejects or fulfills); + * onSettled is invoked when/if the "promise" settles (either rejects or fulfills). + * The returned promise is settled when the `Thenable` returned by `onFinally` settles; + * it is rejected if `onFinally` throws or rejects; otherwise it assumes the state of the + * original Promise. * * @param onFinally called when/if "promise" settles + */ - finally (onFinally?: (callback: any) => U | Thenable): Promise; + finally (onFinally?: () => any | Thenable): Promise; /** * Make a new promise from the thenable. diff --git a/deps/npm/node_modules/es6-promise/lib/es6-promise/-internal.js b/deps/npm/node_modules/es6-promise/lib/es6-promise/-internal.js index 925776f55f07a2..6bd75a82c309da 100644 --- a/deps/npm/node_modules/es6-promise/lib/es6-promise/-internal.js +++ b/deps/npm/node_modules/es6-promise/lib/es6-promise/-internal.js @@ -18,8 +18,6 @@ const PENDING = void 0; const FULFILLED = 1; const REJECTED = 2; -const TRY_CATCH_ERROR = { error: null }; - function selfFulfillment() { return new TypeError("You cannot resolve a promise with itself"); } @@ -28,15 +26,6 @@ function cannotReturnOwn() { return new TypeError('A promises callback cannot return that same promise.'); } -function getThen(promise) { - try { - return promise.then; - } catch(error) { - TRY_CATCH_ERROR.error = error; - return TRY_CATCH_ERROR; - } -} - function tryThen(then, value, fulfillmentHandler, rejectionHandler) { try { then.call(value, fulfillmentHandler, rejectionHandler); @@ -47,8 +36,8 @@ function tryThen(then, value, fulfillmentHandler, rejectionHandler) { function handleForeignThenable(promise, thenable, then) { asap(promise => { - var sealed = false; - var error = tryThen(then, thenable, value => { + let sealed = false; + let error = tryThen(then, thenable, value => { if (sealed) { return; } sealed = true; if (thenable !== value) { @@ -87,10 +76,7 @@ function handleMaybeThenable(promise, maybeThenable, then) { maybeThenable.constructor.resolve === originalResolve) { handleOwnThenable(promise, maybeThenable); } else { - if (then === TRY_CATCH_ERROR) { - reject(promise, TRY_CATCH_ERROR.error); - TRY_CATCH_ERROR.error = null; - } else if (then === undefined) { + if (then === undefined) { fulfill(promise, maybeThenable); } else if (isFunction(then)) { handleForeignThenable(promise, maybeThenable, then); @@ -104,7 +90,14 @@ function resolve(promise, value) { if (promise === value) { reject(promise, selfFulfillment()); } else if (objectOrFunction(value)) { - handleMaybeThenable(promise, value, getThen(value)); + let then; + try { + then = value.then; + } catch (error) { + reject(promise, error); + return; + } + handleMaybeThenable(promise, value, then); } else { fulfill(promise, value); } @@ -174,46 +167,31 @@ function publish(promise) { promise._subscribers.length = 0; } - -function tryCatch(callback, detail) { - try { - return callback(detail); - } catch(e) { - TRY_CATCH_ERROR.error = e; - return TRY_CATCH_ERROR; - } -} - function invokeCallback(settled, promise, callback, detail) { let hasCallback = isFunction(callback), - value, error, succeeded, failed; + value, error, succeeded = true; if (hasCallback) { - value = tryCatch(callback, detail); - - if (value === TRY_CATCH_ERROR) { - failed = true; - error = value.error; - value.error = null; - } else { - succeeded = true; + try { + value = callback(detail); + } catch (e) { + succeeded = false; + error = e; } if (promise === value) { reject(promise, cannotReturnOwn()); return; } - } else { value = detail; - succeeded = true; } if (promise._state !== PENDING) { // noop } else if (hasCallback && succeeded) { resolve(promise, value); - } else if (failed) { + } else if (succeeded === false) { reject(promise, error); } else if (settled === FULFILLED) { fulfill(promise, value); @@ -249,7 +227,6 @@ function makePromise(promise) { export { nextId, makePromise, - getThen, noop, resolve, reject, diff --git a/deps/npm/node_modules/es6-promise/lib/es6-promise/enumerator.js b/deps/npm/node_modules/es6-promise/lib/es6-promise/enumerator.js index b0eaa9300eb06c..be2e0938a99874 100644 --- a/deps/npm/node_modules/es6-promise/lib/es6-promise/enumerator.js +++ b/deps/npm/node_modules/es6-promise/lib/es6-promise/enumerator.js @@ -10,7 +10,6 @@ import { FULFILLED, REJECTED, PENDING, - getThen, handleMaybeThenable } from './-internal'; @@ -63,7 +62,15 @@ export default class Enumerator { let { resolve } = c; if (resolve === originalResolve) { - let then = getThen(entry); + let then; + let error; + let didError = false; + try { + then = entry.then; + } catch (e) { + didError = true; + error = e; + } if (then === originalThen && entry._state !== PENDING) { @@ -73,7 +80,11 @@ export default class Enumerator { this._result[i] = entry; } else if (c === Promise) { let promise = new c(noop); - handleMaybeThenable(promise, entry, then); + if (didError) { + reject(promise, error); + } else { + handleMaybeThenable(promise, entry, then); + } this._willSettleAt(promise, i); } else { this._willSettleAt(new c(resolve => resolve(entry)), i); diff --git a/deps/npm/node_modules/es6-promise/package.json b/deps/npm/node_modules/es6-promise/package.json index 22d31abd00dd22..9095197841815c 100644 --- a/deps/npm/node_modules/es6-promise/package.json +++ b/deps/npm/node_modules/es6-promise/package.json @@ -1,8 +1,8 @@ { "_from": "es6-promise@^4.0.3", - "_id": "es6-promise@4.2.6", + "_id": "es6-promise@4.2.8", "_inBundle": false, - "_integrity": "sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q==", + "_integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", "_location": "/es6-promise", "_phantomChildren": {}, "_requested": { @@ -18,10 +18,10 @@ "_requiredBy": [ "/es6-promisify" ], - "_resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.6.tgz", - "_shasum": "b685edd8258886365ea62b57d30de28fadcd974f", + "_resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "_shasum": "4eb21594c972bc40553d276e510539143db53e0a", "_spec": "es6-promise@^4.0.3", - "_where": "/Users/zkat/Documents/code/work/npm/node_modules/es6-promisify", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/es6-promisify", "author": { "name": "Yehuda Katz, Tom Dale, Stefan Penner and contributors", "url": "Conversion to ES6 API by Jake Archibald" @@ -102,5 +102,5 @@ }, "typings": "es6-promise.d.ts", "unpkg": "dist/es6-promise.auto.min.js", - "version": "4.2.6" + "version": "4.2.8" } diff --git a/deps/npm/node_modules/fstream/.travis.yml b/deps/npm/node_modules/fstream/.travis.yml deleted file mode 100644 index 9f5972ab5aa1cd..00000000000000 --- a/deps/npm/node_modules/fstream/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -node_js: - - "6" - - "4" - - "0.10" - - "0.12" -before_install: - - "npm config set spin false" - - "npm install -g npm/npm" diff --git a/deps/npm/node_modules/fstream/LICENSE b/deps/npm/node_modules/fstream/LICENSE deleted file mode 100644 index 19129e315fe593..00000000000000 --- a/deps/npm/node_modules/fstream/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -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/fstream/README.md b/deps/npm/node_modules/fstream/README.md deleted file mode 100644 index 9d8cb77e5c30ba..00000000000000 --- a/deps/npm/node_modules/fstream/README.md +++ /dev/null @@ -1,76 +0,0 @@ -Like FS streams, but with stat on them, and supporting directories and -symbolic links, as well as normal files. Also, you can use this to set -the stats on a file, even if you don't change its contents, or to create -a symlink, etc. - -So, for example, you can "write" a directory, and it'll call `mkdir`. You -can specify a uid and gid, and it'll call `chown`. You can specify a -`mtime` and `atime`, and it'll call `utimes`. You can call it a symlink -and provide a `linkpath` and it'll call `symlink`. - -Note that it won't automatically resolve symbolic links. So, if you -call `fstream.Reader('/some/symlink')` then you'll get an object -that stats and then ends immediately (since it has no data). To follow -symbolic links, do this: `fstream.Reader({path:'/some/symlink', follow: -true })`. - -There are various checks to make sure that the bytes emitted are the -same as the intended size, if the size is set. - -## Examples - -```javascript -fstream - .Writer({ path: "path/to/file" - , mode: 0755 - , size: 6 - }) - .write("hello\n") - .end() -``` - -This will create the directories if they're missing, and then write -`hello\n` into the file, chmod it to 0755, and assert that 6 bytes have -been written when it's done. - -```javascript -fstream - .Writer({ path: "path/to/file" - , mode: 0755 - , size: 6 - , flags: "a" - }) - .write("hello\n") - .end() -``` - -You can pass flags in, if you want to append to a file. - -```javascript -fstream - .Writer({ path: "path/to/symlink" - , linkpath: "./file" - , SymbolicLink: true - , mode: "0755" // octal strings supported - }) - .end() -``` - -If isSymbolicLink is a function, it'll be called, and if it returns -true, then it'll treat it as a symlink. If it's not a function, then -any truish value will make a symlink, or you can set `type: -'SymbolicLink'`, which does the same thing. - -Note that the linkpath is relative to the symbolic link location, not -the parent dir or cwd. - -```javascript -fstream - .Reader("path/to/dir") - .pipe(fstream.Writer("path/to/other/dir")) -``` - -This will do like `cp -Rp path/to/dir path/to/other/dir`. If the other -dir exists and isn't a directory, then it'll emit an error. It'll also -set the uid, gid, mode, etc. to be identical. In this way, it's more -like `rsync -a` than simply a copy. diff --git a/deps/npm/node_modules/fstream/examples/filter-pipe.js b/deps/npm/node_modules/fstream/examples/filter-pipe.js deleted file mode 100644 index 83dadef8a6f39b..00000000000000 --- a/deps/npm/node_modules/fstream/examples/filter-pipe.js +++ /dev/null @@ -1,134 +0,0 @@ -var fstream = require('../fstream.js') -var path = require('path') - -var r = fstream.Reader({ - path: path.dirname(__dirname), - filter: function () { - return !this.basename.match(/^\./) && - !this.basename.match(/^node_modules$/) && - !this.basename.match(/^deep-copy$/) && - !this.basename.match(/^filter-copy$/) - } -}) - -// this writer will only write directories -var w = fstream.Writer({ - path: path.resolve(__dirname, 'filter-copy'), - type: 'Directory', - filter: function () { - return this.type === 'Directory' - } -}) - -var indent = '' - -r.on('entry', appears) -r.on('ready', function () { - console.error('ready to begin!', r.path) -}) - -function appears (entry) { - console.error(indent + 'a %s appears!', entry.type, entry.basename, typeof entry.basename) - if (foggy) { - console.error('FOGGY!') - var p = entry - do { - console.error(p.depth, p.path, p._paused) - p = p.parent - } while (p) - - throw new Error('\u001b[mshould not have entries while foggy') - } - indent += '\t' - entry.on('data', missile(entry)) - entry.on('end', runaway(entry)) - entry.on('entry', appears) -} - -var foggy -function missile (entry) { - function liftFog (who) { - if (!foggy) return - if (who) { - console.error('%s breaks the spell!', who && who.path) - } else { - console.error('the spell expires!') - } - console.error('\u001b[mthe fog lifts!\n') - clearTimeout(foggy) - foggy = null - if (entry._paused) entry.resume() - } - - if (entry.type === 'Directory') { - var ended = false - entry.once('end', function () { ended = true }) - return function (c) { - // throw in some pathological pause()/resume() behavior - // just for extra fun. - process.nextTick(function () { - if (!foggy && !ended) { // && Math.random() < 0.3) { - console.error(indent + '%s casts a spell', entry.basename) - console.error('\na slowing fog comes over the battlefield...\n\u001b[32m') - entry.pause() - entry.once('resume', liftFog) - foggy = setTimeout(liftFog, 1000) - } - }) - } - } - - return function (c) { - var e = Math.random() < 0.5 - console.error(indent + '%s %s for %d damage!', - entry.basename, - e ? 'is struck' : 'fires a chunk', - c.length) - } -} - -function runaway (entry) { - return function () { - var e = Math.random() < 0.5 - console.error(indent + '%s %s', - entry.basename, - e ? 'turns to flee' : 'is vanquished!') - indent = indent.slice(0, -1) - } -} - -w.on('entry', attacks) -// w.on('ready', function () { attacks(w) }) -function attacks (entry) { - console.error(indent + '%s %s!', entry.basename, - entry.type === 'Directory' ? 'calls for backup' : 'attacks') - entry.on('entry', attacks) -} - -var ended = false -var i = 1 -r.on('end', function () { - if (foggy) clearTimeout(foggy) - console.error("\u001b[mIT'S OVER!!") - console.error('A WINNAR IS YOU!') - - console.log('ok ' + (i++) + ' A WINNAR IS YOU') - ended = true - // now go through and verify that everything in there is a dir. - var p = path.resolve(__dirname, 'filter-copy') - var checker = fstream.Reader({ path: p }) - checker.checker = true - checker.on('child', function (e) { - var ok = e.type === 'Directory' - console.log((ok ? '' : 'not ') + 'ok ' + (i++) + - ' should be a dir: ' + - e.path.substr(checker.path.length + 1)) - }) -}) - -process.on('exit', function () { - console.log((ended ? '' : 'not ') + 'ok ' + (i) + ' ended') - console.log('1..' + i) -}) - -r.pipe(w) diff --git a/deps/npm/node_modules/fstream/examples/pipe.js b/deps/npm/node_modules/fstream/examples/pipe.js deleted file mode 100644 index 3de42ef32bfd7b..00000000000000 --- a/deps/npm/node_modules/fstream/examples/pipe.js +++ /dev/null @@ -1,118 +0,0 @@ -var fstream = require('../fstream.js') -var path = require('path') - -var r = fstream.Reader({ - path: path.dirname(__dirname), - filter: function () { - return !this.basename.match(/^\./) && - !this.basename.match(/^node_modules$/) && - !this.basename.match(/^deep-copy$/) - } -}) - -var w = fstream.Writer({ - path: path.resolve(__dirname, 'deep-copy'), - type: 'Directory' -}) - -var indent = '' - -r.on('entry', appears) -r.on('ready', function () { - console.error('ready to begin!', r.path) -}) - -function appears (entry) { - console.error(indent + 'a %s appears!', entry.type, entry.basename, typeof entry.basename, entry) - if (foggy) { - console.error('FOGGY!') - var p = entry - do { - console.error(p.depth, p.path, p._paused) - p = p.parent - } while (p) - - throw new Error('\u001b[mshould not have entries while foggy') - } - indent += '\t' - entry.on('data', missile(entry)) - entry.on('end', runaway(entry)) - entry.on('entry', appears) -} - -var foggy -function missile (entry) { - function liftFog (who) { - if (!foggy) return - if (who) { - console.error('%s breaks the spell!', who && who.path) - } else { - console.error('the spell expires!') - } - console.error('\u001b[mthe fog lifts!\n') - clearTimeout(foggy) - foggy = null - if (entry._paused) entry.resume() - } - - if (entry.type === 'Directory') { - var ended = false - entry.once('end', function () { ended = true }) - return function (c) { - // throw in some pathological pause()/resume() behavior - // just for extra fun. - process.nextTick(function () { - if (!foggy && !ended) { // && Math.random() < 0.3) { - console.error(indent + '%s casts a spell', entry.basename) - console.error('\na slowing fog comes over the battlefield...\n\u001b[32m') - entry.pause() - entry.once('resume', liftFog) - foggy = setTimeout(liftFog, 10) - } - }) - } - } - - return function (c) { - var e = Math.random() < 0.5 - console.error(indent + '%s %s for %d damage!', - entry.basename, - e ? 'is struck' : 'fires a chunk', - c.length) - } -} - -function runaway (entry) { - return function () { - var e = Math.random() < 0.5 - console.error(indent + '%s %s', - entry.basename, - e ? 'turns to flee' : 'is vanquished!') - indent = indent.slice(0, -1) - } -} - -w.on('entry', attacks) -// w.on('ready', function () { attacks(w) }) -function attacks (entry) { - console.error(indent + '%s %s!', entry.basename, - entry.type === 'Directory' ? 'calls for backup' : 'attacks') - entry.on('entry', attacks) -} - -var ended = false -r.on('end', function () { - if (foggy) clearTimeout(foggy) - console.error("\u001b[mIT'S OVER!!") - console.error('A WINNAR IS YOU!') - - console.log('ok 1 A WINNAR IS YOU') - ended = true -}) - -process.on('exit', function () { - console.log((ended ? '' : 'not ') + 'ok 2 ended') - console.log('1..2') -}) - -r.pipe(w) diff --git a/deps/npm/node_modules/fstream/examples/reader.js b/deps/npm/node_modules/fstream/examples/reader.js deleted file mode 100644 index 19affbe7e6e23d..00000000000000 --- a/deps/npm/node_modules/fstream/examples/reader.js +++ /dev/null @@ -1,68 +0,0 @@ -var fstream = require('../fstream.js') -var tap = require('tap') -var fs = require('fs') -var path = require('path') -var dir = path.dirname(__dirname) - -tap.test('reader test', function (t) { - var children = -1 - var gotReady = false - var ended = false - - var r = fstream.Reader({ - path: dir, - filter: function () { - // return this.parent === r - return this.parent === r || this === r - } - }) - - r.on('ready', function () { - gotReady = true - children = fs.readdirSync(dir).length - console.error('Setting expected children to ' + children) - t.equal(r.type, 'Directory', 'should be a directory') - }) - - r.on('entry', function (entry) { - children-- - if (!gotReady) { - t.fail('children before ready!') - } - t.equal(entry.dirname, r.path, 'basename is parent dir') - }) - - r.on('error', function (er) { - t.fail(er) - t.end() - process.exit(1) - }) - - r.on('end', function () { - t.equal(children, 0, 'should have seen all children') - ended = true - }) - - var closed = false - r.on('close', function () { - t.ok(ended, 'saw end before close') - t.notOk(closed, 'close should only happen once') - closed = true - t.end() - }) -}) - -tap.test('reader error test', function (t) { - // assumes non-root on a *nix system - var r = fstream.Reader({ path: '/etc/shadow' }) - - r.once('error', function (er) { - t.ok(true) - t.end() - }) - - r.on('end', function () { - t.fail('reader ended without error') - t.end() - }) -}) diff --git a/deps/npm/node_modules/fstream/examples/symlink-write.js b/deps/npm/node_modules/fstream/examples/symlink-write.js deleted file mode 100644 index 19e81eea9fe807..00000000000000 --- a/deps/npm/node_modules/fstream/examples/symlink-write.js +++ /dev/null @@ -1,27 +0,0 @@ -var fstream = require('../fstream.js') -var notOpen = false -process.chdir(__dirname) - -fstream - .Writer({ - path: 'path/to/symlink', - linkpath: './file', - isSymbolicLink: true, - mode: '0755' // octal strings supported - }) - .on('close', function () { - notOpen = true - var fs = require('fs') - var s = fs.lstatSync('path/to/symlink') - var isSym = s.isSymbolicLink() - console.log((isSym ? '' : 'not ') + 'ok 1 should be symlink') - var t = fs.readlinkSync('path/to/symlink') - var isTarget = t === './file' - console.log((isTarget ? '' : 'not ') + 'ok 2 should link to ./file') - }) - .end() - -process.on('exit', function () { - console.log((notOpen ? '' : 'not ') + 'ok 3 should be closed') - console.log('1..3') -}) diff --git a/deps/npm/node_modules/fstream/fstream.js b/deps/npm/node_modules/fstream/fstream.js deleted file mode 100644 index c0eb3bea788036..00000000000000 --- a/deps/npm/node_modules/fstream/fstream.js +++ /dev/null @@ -1,35 +0,0 @@ -exports.Abstract = require('./lib/abstract.js') -exports.Reader = require('./lib/reader.js') -exports.Writer = require('./lib/writer.js') - -exports.File = { - Reader: require('./lib/file-reader.js'), - Writer: require('./lib/file-writer.js') -} - -exports.Dir = { - Reader: require('./lib/dir-reader.js'), - Writer: require('./lib/dir-writer.js') -} - -exports.Link = { - Reader: require('./lib/link-reader.js'), - Writer: require('./lib/link-writer.js') -} - -exports.Proxy = { - Reader: require('./lib/proxy-reader.js'), - Writer: require('./lib/proxy-writer.js') -} - -exports.Reader.Dir = exports.DirReader = exports.Dir.Reader -exports.Reader.File = exports.FileReader = exports.File.Reader -exports.Reader.Link = exports.LinkReader = exports.Link.Reader -exports.Reader.Proxy = exports.ProxyReader = exports.Proxy.Reader - -exports.Writer.Dir = exports.DirWriter = exports.Dir.Writer -exports.Writer.File = exports.FileWriter = exports.File.Writer -exports.Writer.Link = exports.LinkWriter = exports.Link.Writer -exports.Writer.Proxy = exports.ProxyWriter = exports.Proxy.Writer - -exports.collect = require('./lib/collect.js') diff --git a/deps/npm/node_modules/fstream/lib/abstract.js b/deps/npm/node_modules/fstream/lib/abstract.js deleted file mode 100644 index 97c120e1d5277d..00000000000000 --- a/deps/npm/node_modules/fstream/lib/abstract.js +++ /dev/null @@ -1,85 +0,0 @@ -// the parent class for all fstreams. - -module.exports = Abstract - -var Stream = require('stream').Stream -var inherits = require('inherits') - -function Abstract () { - Stream.call(this) -} - -inherits(Abstract, Stream) - -Abstract.prototype.on = function (ev, fn) { - if (ev === 'ready' && this.ready) { - process.nextTick(fn.bind(this)) - } else { - Stream.prototype.on.call(this, ev, fn) - } - return this -} - -Abstract.prototype.abort = function () { - this._aborted = true - this.emit('abort') -} - -Abstract.prototype.destroy = function () {} - -Abstract.prototype.warn = function (msg, code) { - var self = this - var er = decorate(msg, code, self) - if (!self.listeners('warn')) { - console.error('%s %s\n' + - 'path = %s\n' + - 'syscall = %s\n' + - 'fstream_type = %s\n' + - 'fstream_path = %s\n' + - 'fstream_unc_path = %s\n' + - 'fstream_class = %s\n' + - 'fstream_stack =\n%s\n', - code || 'UNKNOWN', - er.stack, - er.path, - er.syscall, - er.fstream_type, - er.fstream_path, - er.fstream_unc_path, - er.fstream_class, - er.fstream_stack.join('\n')) - } else { - self.emit('warn', er) - } -} - -Abstract.prototype.info = function (msg, code) { - this.emit('info', msg, code) -} - -Abstract.prototype.error = function (msg, code, th) { - var er = decorate(msg, code, this) - if (th) throw er - else this.emit('error', er) -} - -function decorate (er, code, self) { - if (!(er instanceof Error)) er = new Error(er) - er.code = er.code || code - er.path = er.path || self.path - er.fstream_type = er.fstream_type || self.type - er.fstream_path = er.fstream_path || self.path - if (self._path !== self.path) { - er.fstream_unc_path = er.fstream_unc_path || self._path - } - if (self.linkpath) { - er.fstream_linkpath = er.fstream_linkpath || self.linkpath - } - er.fstream_class = er.fstream_class || self.constructor.name - er.fstream_stack = er.fstream_stack || - new Error().stack.split(/\n/).slice(3).map(function (s) { - return s.replace(/^ {4}at /, '') - }) - - return er -} diff --git a/deps/npm/node_modules/fstream/lib/collect.js b/deps/npm/node_modules/fstream/lib/collect.js deleted file mode 100644 index e5d4f35833476e..00000000000000 --- a/deps/npm/node_modules/fstream/lib/collect.js +++ /dev/null @@ -1,70 +0,0 @@ -module.exports = collect - -function collect (stream) { - if (stream._collected) return - - if (stream._paused) return stream.on('resume', collect.bind(null, stream)) - - stream._collected = true - stream.pause() - - stream.on('data', save) - stream.on('end', save) - var buf = [] - function save (b) { - if (typeof b === 'string') b = new Buffer(b) - if (Buffer.isBuffer(b) && !b.length) return - buf.push(b) - } - - stream.on('entry', saveEntry) - var entryBuffer = [] - function saveEntry (e) { - collect(e) - entryBuffer.push(e) - } - - stream.on('proxy', proxyPause) - function proxyPause (p) { - p.pause() - } - - // replace the pipe method with a new version that will - // unlock the buffered stuff. if you just call .pipe() - // without a destination, then it'll re-play the events. - stream.pipe = (function (orig) { - return function (dest) { - // console.error(' === open the pipes', dest && dest.path) - - // let the entries flow through one at a time. - // Once they're all done, then we can resume completely. - var e = 0 - ;(function unblockEntry () { - var entry = entryBuffer[e++] - // console.error(" ==== unblock entry", entry && entry.path) - if (!entry) return resume() - entry.on('end', unblockEntry) - if (dest) dest.add(entry) - else stream.emit('entry', entry) - })() - - function resume () { - stream.removeListener('entry', saveEntry) - stream.removeListener('data', save) - stream.removeListener('end', save) - - stream.pipe = orig - if (dest) stream.pipe(dest) - - buf.forEach(function (b) { - if (b) stream.emit('data', b) - else stream.emit('end') - }) - - stream.resume() - } - - return dest - } - })(stream.pipe) -} diff --git a/deps/npm/node_modules/fstream/lib/dir-reader.js b/deps/npm/node_modules/fstream/lib/dir-reader.js deleted file mode 100644 index 820cdc85a8e9c4..00000000000000 --- a/deps/npm/node_modules/fstream/lib/dir-reader.js +++ /dev/null @@ -1,252 +0,0 @@ -// A thing that emits "entry" events with Reader objects -// Pausing it causes it to stop emitting entry events, and also -// pauses the current entry if there is one. - -module.exports = DirReader - -var fs = require('graceful-fs') -var inherits = require('inherits') -var path = require('path') -var Reader = require('./reader.js') -var assert = require('assert').ok - -inherits(DirReader, Reader) - -function DirReader (props) { - var self = this - if (!(self instanceof DirReader)) { - throw new Error('DirReader must be called as constructor.') - } - - // should already be established as a Directory type - if (props.type !== 'Directory' || !props.Directory) { - throw new Error('Non-directory type ' + props.type) - } - - self.entries = null - self._index = -1 - self._paused = false - self._length = -1 - - if (props.sort) { - this.sort = props.sort - } - - Reader.call(this, props) -} - -DirReader.prototype._getEntries = function () { - var self = this - - // race condition. might pause() before calling _getEntries, - // and then resume, and try to get them a second time. - if (self._gotEntries) return - self._gotEntries = true - - fs.readdir(self._path, function (er, entries) { - if (er) return self.error(er) - - self.entries = entries - - self.emit('entries', entries) - if (self._paused) self.once('resume', processEntries) - else processEntries() - - function processEntries () { - self._length = self.entries.length - if (typeof self.sort === 'function') { - self.entries = self.entries.sort(self.sort.bind(self)) - } - self._read() - } - }) -} - -// start walking the dir, and emit an "entry" event for each one. -DirReader.prototype._read = function () { - var self = this - - if (!self.entries) return self._getEntries() - - if (self._paused || self._currentEntry || self._aborted) { - // console.error('DR paused=%j, current=%j, aborted=%j', self._paused, !!self._currentEntry, self._aborted) - return - } - - self._index++ - if (self._index >= self.entries.length) { - if (!self._ended) { - self._ended = true - self.emit('end') - self.emit('close') - } - return - } - - // ok, handle this one, then. - - // save creating a proxy, by stat'ing the thing now. - var p = path.resolve(self._path, self.entries[self._index]) - assert(p !== self._path) - assert(self.entries[self._index]) - - // set this to prevent trying to _read() again in the stat time. - self._currentEntry = p - fs[ self.props.follow ? 'stat' : 'lstat' ](p, function (er, stat) { - if (er) return self.error(er) - - var who = self._proxy || self - - stat.path = p - stat.basename = path.basename(p) - stat.dirname = path.dirname(p) - var childProps = self.getChildProps.call(who, stat) - childProps.path = p - childProps.basename = path.basename(p) - childProps.dirname = path.dirname(p) - - var entry = Reader(childProps, stat) - - // console.error("DR Entry", p, stat.size) - - self._currentEntry = entry - - // "entry" events are for direct entries in a specific dir. - // "child" events are for any and all children at all levels. - // This nomenclature is not completely final. - - entry.on('pause', function (who) { - if (!self._paused && !entry._disowned) { - self.pause(who) - } - }) - - entry.on('resume', function (who) { - if (self._paused && !entry._disowned) { - self.resume(who) - } - }) - - entry.on('stat', function (props) { - self.emit('_entryStat', entry, props) - if (entry._aborted) return - if (entry._paused) { - entry.once('resume', function () { - self.emit('entryStat', entry, props) - }) - } else self.emit('entryStat', entry, props) - }) - - entry.on('ready', function EMITCHILD () { - // console.error("DR emit child", entry._path) - if (self._paused) { - // console.error(" DR emit child - try again later") - // pause the child, and emit the "entry" event once we drain. - // console.error("DR pausing child entry") - entry.pause(self) - return self.once('resume', EMITCHILD) - } - - // skip over sockets. they can't be piped around properly, - // so there's really no sense even acknowledging them. - // if someone really wants to see them, they can listen to - // the "socket" events. - if (entry.type === 'Socket') { - self.emit('socket', entry) - } else { - self.emitEntry(entry) - } - }) - - var ended = false - entry.on('close', onend) - entry.on('disown', onend) - function onend () { - if (ended) return - ended = true - self.emit('childEnd', entry) - self.emit('entryEnd', entry) - self._currentEntry = null - if (!self._paused) { - self._read() - } - } - - // XXX Remove this. Works in node as of 0.6.2 or so. - // Long filenames should not break stuff. - entry.on('error', function (er) { - if (entry._swallowErrors) { - self.warn(er) - entry.emit('end') - entry.emit('close') - } else { - self.emit('error', er) - } - }) - - // proxy up some events. - ;[ - 'child', - 'childEnd', - 'warn' - ].forEach(function (ev) { - entry.on(ev, self.emit.bind(self, ev)) - }) - }) -} - -DirReader.prototype.disown = function (entry) { - entry.emit('beforeDisown') - entry._disowned = true - entry.parent = entry.root = null - if (entry === this._currentEntry) { - this._currentEntry = null - } - entry.emit('disown') -} - -DirReader.prototype.getChildProps = function () { - return { - depth: this.depth + 1, - root: this.root || this, - parent: this, - follow: this.follow, - filter: this.filter, - sort: this.props.sort, - hardlinks: this.props.hardlinks - } -} - -DirReader.prototype.pause = function (who) { - var self = this - if (self._paused) return - who = who || self - self._paused = true - if (self._currentEntry && self._currentEntry.pause) { - self._currentEntry.pause(who) - } - self.emit('pause', who) -} - -DirReader.prototype.resume = function (who) { - var self = this - if (!self._paused) return - who = who || self - - self._paused = false - // console.error('DR Emit Resume', self._path) - self.emit('resume', who) - if (self._paused) { - // console.error('DR Re-paused', self._path) - return - } - - if (self._currentEntry) { - if (self._currentEntry.resume) self._currentEntry.resume(who) - } else self._read() -} - -DirReader.prototype.emitEntry = function (entry) { - this.emit('entry', entry) - this.emit('child', entry) -} diff --git a/deps/npm/node_modules/fstream/lib/dir-writer.js b/deps/npm/node_modules/fstream/lib/dir-writer.js deleted file mode 100644 index ec50dca900dcf4..00000000000000 --- a/deps/npm/node_modules/fstream/lib/dir-writer.js +++ /dev/null @@ -1,174 +0,0 @@ -// It is expected that, when .add() returns false, the consumer -// of the DirWriter will pause until a "drain" event occurs. Note -// that this is *almost always going to be the case*, unless the -// thing being written is some sort of unsupported type, and thus -// skipped over. - -module.exports = DirWriter - -var Writer = require('./writer.js') -var inherits = require('inherits') -var mkdir = require('mkdirp') -var path = require('path') -var collect = require('./collect.js') - -inherits(DirWriter, Writer) - -function DirWriter (props) { - var self = this - if (!(self instanceof DirWriter)) { - self.error('DirWriter must be called as constructor.', null, true) - } - - // should already be established as a Directory type - if (props.type !== 'Directory' || !props.Directory) { - self.error('Non-directory type ' + props.type + ' ' + - JSON.stringify(props), null, true) - } - - Writer.call(this, props) -} - -DirWriter.prototype._create = function () { - var self = this - mkdir(self._path, Writer.dirmode, function (er) { - if (er) return self.error(er) - // ready to start getting entries! - self.ready = true - self.emit('ready') - self._process() - }) -} - -// a DirWriter has an add(entry) method, but its .write() doesn't -// do anything. Why a no-op rather than a throw? Because this -// leaves open the door for writing directory metadata for -// gnu/solaris style dumpdirs. -DirWriter.prototype.write = function () { - return true -} - -DirWriter.prototype.end = function () { - this._ended = true - this._process() -} - -DirWriter.prototype.add = function (entry) { - var self = this - - // console.error('\tadd', entry._path, '->', self._path) - collect(entry) - if (!self.ready || self._currentEntry) { - self._buffer.push(entry) - return false - } - - // create a new writer, and pipe the incoming entry into it. - if (self._ended) { - return self.error('add after end') - } - - self._buffer.push(entry) - self._process() - - return this._buffer.length === 0 -} - -DirWriter.prototype._process = function () { - var self = this - - // console.error('DW Process p=%j', self._processing, self.basename) - - if (self._processing) return - - var entry = self._buffer.shift() - if (!entry) { - // console.error("DW Drain") - self.emit('drain') - if (self._ended) self._finish() - return - } - - self._processing = true - // console.error("DW Entry", entry._path) - - self.emit('entry', entry) - - // ok, add this entry - // - // don't allow recursive copying - var p = entry - var pp - do { - pp = p._path || p.path - if (pp === self.root._path || pp === self._path || - (pp && pp.indexOf(self._path) === 0)) { - // console.error('DW Exit (recursive)', entry.basename, self._path) - self._processing = false - if (entry._collected) entry.pipe() - return self._process() - } - p = p.parent - } while (p) - - // console.error("DW not recursive") - - // chop off the entry's root dir, replace with ours - var props = { - parent: self, - root: self.root || self, - type: entry.type, - depth: self.depth + 1 - } - - pp = entry._path || entry.path || entry.props.path - if (entry.parent) { - pp = pp.substr(entry.parent._path.length + 1) - } - // get rid of any ../../ shenanigans - props.path = path.join(self.path, path.join('/', pp)) - - // if i have a filter, the child should inherit it. - props.filter = self.filter - - // all the rest of the stuff, copy over from the source. - Object.keys(entry.props).forEach(function (k) { - if (!props.hasOwnProperty(k)) { - props[k] = entry.props[k] - } - }) - - // not sure at this point what kind of writer this is. - var child = self._currentChild = new Writer(props) - child.on('ready', function () { - // console.error("DW Child Ready", child.type, child._path) - // console.error(" resuming", entry._path) - entry.pipe(child) - entry.resume() - }) - - // XXX Make this work in node. - // Long filenames should not break stuff. - child.on('error', function (er) { - if (child._swallowErrors) { - self.warn(er) - child.emit('end') - child.emit('close') - } else { - self.emit('error', er) - } - }) - - // we fire _end internally *after* end, so that we don't move on - // until any "end" listeners have had their chance to do stuff. - child.on('close', onend) - var ended = false - function onend () { - if (ended) return - ended = true - // console.error("* DW Child end", child.basename) - self._currentChild = null - self._processing = false - self._process() - } -} diff --git a/deps/npm/node_modules/fstream/lib/file-reader.js b/deps/npm/node_modules/fstream/lib/file-reader.js deleted file mode 100644 index baa01f4b3db7ef..00000000000000 --- a/deps/npm/node_modules/fstream/lib/file-reader.js +++ /dev/null @@ -1,150 +0,0 @@ -// Basically just a wrapper around an fs.ReadStream - -module.exports = FileReader - -var fs = require('graceful-fs') -var inherits = require('inherits') -var Reader = require('./reader.js') -var EOF = {EOF: true} -var CLOSE = {CLOSE: true} - -inherits(FileReader, Reader) - -function FileReader (props) { - // console.error(" FR create", props.path, props.size, new Error().stack) - var self = this - if (!(self instanceof FileReader)) { - throw new Error('FileReader must be called as constructor.') - } - - // should already be established as a File type - // XXX Todo: preserve hardlinks by tracking dev+inode+nlink, - // with a HardLinkReader class. - if (!((props.type === 'Link' && props.Link) || - (props.type === 'File' && props.File))) { - throw new Error('Non-file type ' + props.type) - } - - self._buffer = [] - self._bytesEmitted = 0 - Reader.call(self, props) -} - -FileReader.prototype._getStream = function () { - var self = this - var stream = self._stream = fs.createReadStream(self._path, self.props) - - if (self.props.blksize) { - stream.bufferSize = self.props.blksize - } - - stream.on('open', self.emit.bind(self, 'open')) - - stream.on('data', function (c) { - // console.error('\t\t%d %s', c.length, self.basename) - self._bytesEmitted += c.length - // no point saving empty chunks - if (!c.length) { - return - } else if (self._paused || self._buffer.length) { - self._buffer.push(c) - self._read() - } else self.emit('data', c) - }) - - stream.on('end', function () { - if (self._paused || self._buffer.length) { - // console.error('FR Buffering End', self._path) - self._buffer.push(EOF) - self._read() - } else { - self.emit('end') - } - - if (self._bytesEmitted !== self.props.size) { - self.error("Didn't get expected byte count\n" + - 'expect: ' + self.props.size + '\n' + - 'actual: ' + self._bytesEmitted) - } - }) - - stream.on('close', function () { - if (self._paused || self._buffer.length) { - // console.error('FR Buffering Close', self._path) - self._buffer.push(CLOSE) - self._read() - } else { - // console.error('FR close 1', self._path) - self.emit('close') - } - }) - - stream.on('error', function (e) { - self.emit('error', e) - }) - - self._read() -} - -FileReader.prototype._read = function () { - var self = this - // console.error('FR _read', self._path) - if (self._paused) { - // console.error('FR _read paused', self._path) - return - } - - if (!self._stream) { - // console.error('FR _getStream calling', self._path) - return self._getStream() - } - - // clear out the buffer, if there is one. - if (self._buffer.length) { - // console.error('FR _read has buffer', self._buffer.length, self._path) - var buf = self._buffer - for (var i = 0, l = buf.length; i < l; i++) { - var c = buf[i] - if (c === EOF) { - // console.error('FR Read emitting buffered end', self._path) - self.emit('end') - } else if (c === CLOSE) { - // console.error('FR Read emitting buffered close', self._path) - self.emit('close') - } else { - // console.error('FR Read emitting buffered data', self._path) - self.emit('data', c) - } - - if (self._paused) { - // console.error('FR Read Re-pausing at '+i, self._path) - self._buffer = buf.slice(i) - return - } - } - self._buffer.length = 0 - } -// console.error("FR _read done") -// that's about all there is to it. -} - -FileReader.prototype.pause = function (who) { - var self = this - // console.error('FR Pause', self._path) - if (self._paused) return - who = who || self - self._paused = true - if (self._stream) self._stream.pause() - self.emit('pause', who) -} - -FileReader.prototype.resume = function (who) { - var self = this - // console.error('FR Resume', self._path) - if (!self._paused) return - who = who || self - self.emit('resume', who) - self._paused = false - if (self._stream) self._stream.resume() - self._read() -} diff --git a/deps/npm/node_modules/fstream/lib/file-writer.js b/deps/npm/node_modules/fstream/lib/file-writer.js deleted file mode 100644 index 4c803d8d68d2f5..00000000000000 --- a/deps/npm/node_modules/fstream/lib/file-writer.js +++ /dev/null @@ -1,107 +0,0 @@ -module.exports = FileWriter - -var fs = require('graceful-fs') -var Writer = require('./writer.js') -var inherits = require('inherits') -var EOF = {} - -inherits(FileWriter, Writer) - -function FileWriter (props) { - var self = this - if (!(self instanceof FileWriter)) { - throw new Error('FileWriter must be called as constructor.') - } - - // should already be established as a File type - if (props.type !== 'File' || !props.File) { - throw new Error('Non-file type ' + props.type) - } - - self._buffer = [] - self._bytesWritten = 0 - - Writer.call(this, props) -} - -FileWriter.prototype._create = function () { - var self = this - if (self._stream) return - - var so = {} - if (self.props.flags) so.flags = self.props.flags - so.mode = Writer.filemode - if (self._old && self._old.blksize) so.bufferSize = self._old.blksize - - self._stream = fs.createWriteStream(self._path, so) - - self._stream.on('open', function () { - // console.error("FW open", self._buffer, self._path) - self.ready = true - self._buffer.forEach(function (c) { - if (c === EOF) self._stream.end() - else self._stream.write(c) - }) - self.emit('ready') - // give this a kick just in case it needs it. - self.emit('drain') - }) - - self._stream.on('error', function (er) { self.emit('error', er) }) - - self._stream.on('drain', function () { self.emit('drain') }) - - self._stream.on('close', function () { - // console.error('\n\nFW Stream Close', self._path, self.size) - self._finish() - }) -} - -FileWriter.prototype.write = function (c) { - var self = this - - self._bytesWritten += c.length - - if (!self.ready) { - if (!Buffer.isBuffer(c) && typeof c !== 'string') { - throw new Error('invalid write data') - } - self._buffer.push(c) - return false - } - - var ret = self._stream.write(c) - // console.error('\t-- fw wrote, _stream says', ret, self._stream._queue.length) - - // allow 2 buffered writes, because otherwise there's just too - // much stop and go bs. - if (ret === false && self._stream._queue) { - return self._stream._queue.length <= 2 - } else { - return ret - } -} - -FileWriter.prototype.end = function (c) { - var self = this - - if (c) self.write(c) - - if (!self.ready) { - self._buffer.push(EOF) - return false - } - - return self._stream.end() -} - -FileWriter.prototype._finish = function () { - var self = this - if (typeof self.size === 'number' && self._bytesWritten !== self.size) { - self.error( - 'Did not get expected byte count.\n' + - 'expect: ' + self.size + '\n' + - 'actual: ' + self._bytesWritten) - } - Writer.prototype._finish.call(self) -} diff --git a/deps/npm/node_modules/fstream/lib/get-type.js b/deps/npm/node_modules/fstream/lib/get-type.js deleted file mode 100644 index 19f6a657db8475..00000000000000 --- a/deps/npm/node_modules/fstream/lib/get-type.js +++ /dev/null @@ -1,33 +0,0 @@ -module.exports = getType - -function getType (st) { - var types = [ - 'Directory', - 'File', - 'SymbolicLink', - 'Link', // special for hardlinks from tarballs - 'BlockDevice', - 'CharacterDevice', - 'FIFO', - 'Socket' - ] - var type - - if (st.type && types.indexOf(st.type) !== -1) { - st[st.type] = true - return st.type - } - - for (var i = 0, l = types.length; i < l; i++) { - type = types[i] - var is = st[type] || st['is' + type] - if (typeof is === 'function') is = is.call(st) - if (is) { - st[type] = true - st.type = type - return type - } - } - - return null -} diff --git a/deps/npm/node_modules/fstream/lib/link-reader.js b/deps/npm/node_modules/fstream/lib/link-reader.js deleted file mode 100644 index fb4cc67a98dc55..00000000000000 --- a/deps/npm/node_modules/fstream/lib/link-reader.js +++ /dev/null @@ -1,53 +0,0 @@ -// Basically just a wrapper around an fs.readlink -// -// XXX: Enhance this to support the Link type, by keeping -// a lookup table of {:}, so that hardlinks -// can be preserved in tarballs. - -module.exports = LinkReader - -var fs = require('graceful-fs') -var inherits = require('inherits') -var Reader = require('./reader.js') - -inherits(LinkReader, Reader) - -function LinkReader (props) { - var self = this - if (!(self instanceof LinkReader)) { - throw new Error('LinkReader must be called as constructor.') - } - - if (!((props.type === 'Link' && props.Link) || - (props.type === 'SymbolicLink' && props.SymbolicLink))) { - throw new Error('Non-link type ' + props.type) - } - - Reader.call(self, props) -} - -// When piping a LinkReader into a LinkWriter, we have to -// already have the linkpath property set, so that has to -// happen *before* the "ready" event, which means we need to -// override the _stat method. -LinkReader.prototype._stat = function (currentStat) { - var self = this - fs.readlink(self._path, function (er, linkpath) { - if (er) return self.error(er) - self.linkpath = self.props.linkpath = linkpath - self.emit('linkpath', linkpath) - Reader.prototype._stat.call(self, currentStat) - }) -} - -LinkReader.prototype._read = function () { - var self = this - if (self._paused) return - // basically just a no-op, since we got all the info we need - // from the _stat method - if (!self._ended) { - self.emit('end') - self.emit('close') - self._ended = true - } -} diff --git a/deps/npm/node_modules/fstream/lib/link-writer.js b/deps/npm/node_modules/fstream/lib/link-writer.js deleted file mode 100644 index af54284008faa1..00000000000000 --- a/deps/npm/node_modules/fstream/lib/link-writer.js +++ /dev/null @@ -1,95 +0,0 @@ -module.exports = LinkWriter - -var fs = require('graceful-fs') -var Writer = require('./writer.js') -var inherits = require('inherits') -var path = require('path') -var rimraf = require('rimraf') - -inherits(LinkWriter, Writer) - -function LinkWriter (props) { - var self = this - if (!(self instanceof LinkWriter)) { - throw new Error('LinkWriter must be called as constructor.') - } - - // should already be established as a Link type - if (!((props.type === 'Link' && props.Link) || - (props.type === 'SymbolicLink' && props.SymbolicLink))) { - throw new Error('Non-link type ' + props.type) - } - - if (props.linkpath === '') props.linkpath = '.' - if (!props.linkpath) { - self.error('Need linkpath property to create ' + props.type) - } - - Writer.call(this, props) -} - -LinkWriter.prototype._create = function () { - // console.error(" LW _create") - var self = this - var hard = self.type === 'Link' || process.platform === 'win32' - var link = hard ? 'link' : 'symlink' - var lp = hard ? path.resolve(self.dirname, self.linkpath) : self.linkpath - - // can only change the link path by clobbering - // For hard links, let's just assume that's always the case, since - // there's no good way to read them if we don't already know. - if (hard) return clobber(self, lp, link) - - fs.readlink(self._path, function (er, p) { - // only skip creation if it's exactly the same link - if (p && p === lp) return finish(self) - clobber(self, lp, link) - }) -} - -function clobber (self, lp, link) { - rimraf(self._path, function (er) { - if (er) return self.error(er) - create(self, lp, link) - }) -} - -function create (self, lp, link) { - fs[link](lp, self._path, function (er) { - // if this is a hard link, and we're in the process of writing out a - // directory, it's very possible that the thing we're linking to - // doesn't exist yet (especially if it was intended as a symlink), - // so swallow ENOENT errors here and just soldier in. - // Additionally, an EPERM or EACCES can happen on win32 if it's trying - // to make a link to a directory. Again, just skip it. - // A better solution would be to have fs.symlink be supported on - // windows in some nice fashion. - if (er) { - if ((er.code === 'ENOENT' || - er.code === 'EACCES' || - er.code === 'EPERM') && process.platform === 'win32') { - self.ready = true - self.emit('ready') - self.emit('end') - self.emit('close') - self.end = self._finish = function () {} - } else return self.error(er) - } - finish(self) - }) -} - -function finish (self) { - self.ready = true - self.emit('ready') - if (self._ended && !self._finished) self._finish() -} - -LinkWriter.prototype.end = function () { - // console.error("LW finish in end") - this._ended = true - if (this.ready) { - this._finished = true - this._finish() - } -} diff --git a/deps/npm/node_modules/fstream/lib/proxy-reader.js b/deps/npm/node_modules/fstream/lib/proxy-reader.js deleted file mode 100644 index 4f431c9d9e27d3..00000000000000 --- a/deps/npm/node_modules/fstream/lib/proxy-reader.js +++ /dev/null @@ -1,95 +0,0 @@ -// A reader for when we don't yet know what kind of thing -// the thing is. - -module.exports = ProxyReader - -var Reader = require('./reader.js') -var getType = require('./get-type.js') -var inherits = require('inherits') -var fs = require('graceful-fs') - -inherits(ProxyReader, Reader) - -function ProxyReader (props) { - var self = this - if (!(self instanceof ProxyReader)) { - throw new Error('ProxyReader must be called as constructor.') - } - - self.props = props - self._buffer = [] - self.ready = false - - Reader.call(self, props) -} - -ProxyReader.prototype._stat = function () { - var self = this - var props = self.props - // stat the thing to see what the proxy should be. - var stat = props.follow ? 'stat' : 'lstat' - - fs[stat](props.path, function (er, current) { - var type - if (er || !current) { - type = 'File' - } else { - type = getType(current) - } - - props[type] = true - props.type = self.type = type - - self._old = current - self._addProxy(Reader(props, current)) - }) -} - -ProxyReader.prototype._addProxy = function (proxy) { - var self = this - if (self._proxyTarget) { - return self.error('proxy already set') - } - - self._proxyTarget = proxy - proxy._proxy = self - - ;[ - 'error', - 'data', - 'end', - 'close', - 'linkpath', - 'entry', - 'entryEnd', - 'child', - 'childEnd', - 'warn', - 'stat' - ].forEach(function (ev) { - // console.error('~~ proxy event', ev, self.path) - proxy.on(ev, self.emit.bind(self, ev)) - }) - - self.emit('proxy', proxy) - - proxy.on('ready', function () { - // console.error("~~ proxy is ready!", self.path) - self.ready = true - self.emit('ready') - }) - - var calls = self._buffer - self._buffer.length = 0 - calls.forEach(function (c) { - proxy[c[0]].apply(proxy, c[1]) - }) -} - -ProxyReader.prototype.pause = function () { - return this._proxyTarget ? this._proxyTarget.pause() : false -} - -ProxyReader.prototype.resume = function () { - return this._proxyTarget ? this._proxyTarget.resume() : false -} diff --git a/deps/npm/node_modules/fstream/lib/proxy-writer.js b/deps/npm/node_modules/fstream/lib/proxy-writer.js deleted file mode 100644 index a6544621bfbe75..00000000000000 --- a/deps/npm/node_modules/fstream/lib/proxy-writer.js +++ /dev/null @@ -1,111 +0,0 @@ -// A writer for when we don't know what kind of thing -// the thing is. That is, it's not explicitly set, -// so we're going to make it whatever the thing already -// is, or "File" -// -// Until then, collect all events. - -module.exports = ProxyWriter - -var Writer = require('./writer.js') -var getType = require('./get-type.js') -var inherits = require('inherits') -var collect = require('./collect.js') -var fs = require('fs') - -inherits(ProxyWriter, Writer) - -function ProxyWriter (props) { - var self = this - if (!(self instanceof ProxyWriter)) { - throw new Error('ProxyWriter must be called as constructor.') - } - - self.props = props - self._needDrain = false - - Writer.call(self, props) -} - -ProxyWriter.prototype._stat = function () { - var self = this - var props = self.props - // stat the thing to see what the proxy should be. - var stat = props.follow ? 'stat' : 'lstat' - - fs[stat](props.path, function (er, current) { - var type - if (er || !current) { - type = 'File' - } else { - type = getType(current) - } - - props[type] = true - props.type = self.type = type - - self._old = current - self._addProxy(Writer(props, current)) - }) -} - -ProxyWriter.prototype._addProxy = function (proxy) { - // console.error("~~ set proxy", this.path) - var self = this - if (self._proxy) { - return self.error('proxy already set') - } - - self._proxy = proxy - ;[ - 'ready', - 'error', - 'close', - 'pipe', - 'drain', - 'warn' - ].forEach(function (ev) { - proxy.on(ev, self.emit.bind(self, ev)) - }) - - self.emit('proxy', proxy) - - var calls = self._buffer - calls.forEach(function (c) { - // console.error("~~ ~~ proxy buffered call", c[0], c[1]) - proxy[c[0]].apply(proxy, c[1]) - }) - self._buffer.length = 0 - if (self._needsDrain) self.emit('drain') -} - -ProxyWriter.prototype.add = function (entry) { - // console.error("~~ proxy add") - collect(entry) - - if (!this._proxy) { - this._buffer.push(['add', [entry]]) - this._needDrain = true - return false - } - return this._proxy.add(entry) -} - -ProxyWriter.prototype.write = function (c) { - // console.error('~~ proxy write') - if (!this._proxy) { - this._buffer.push(['write', [c]]) - this._needDrain = true - return false - } - return this._proxy.write(c) -} - -ProxyWriter.prototype.end = function (c) { - // console.error('~~ proxy end') - if (!this._proxy) { - this._buffer.push(['end', [c]]) - return false - } - return this._proxy.end(c) -} diff --git a/deps/npm/node_modules/fstream/lib/reader.js b/deps/npm/node_modules/fstream/lib/reader.js deleted file mode 100644 index be4f570eeb2812..00000000000000 --- a/deps/npm/node_modules/fstream/lib/reader.js +++ /dev/null @@ -1,255 +0,0 @@ -module.exports = Reader - -var fs = require('graceful-fs') -var Stream = require('stream').Stream -var inherits = require('inherits') -var path = require('path') -var getType = require('./get-type.js') -var hardLinks = Reader.hardLinks = {} -var Abstract = require('./abstract.js') - -// Must do this *before* loading the child classes -inherits(Reader, Abstract) - -var LinkReader = require('./link-reader.js') - -function Reader (props, currentStat) { - var self = this - if (!(self instanceof Reader)) return new Reader(props, currentStat) - - if (typeof props === 'string') { - props = { path: props } - } - - // polymorphism. - // call fstream.Reader(dir) to get a DirReader object, etc. - // Note that, unlike in the Writer case, ProxyReader is going - // to be the *normal* state of affairs, since we rarely know - // the type of a file prior to reading it. - - var type - var ClassType - - if (props.type && typeof props.type === 'function') { - type = props.type - ClassType = type - } else { - type = getType(props) - ClassType = Reader - } - - if (currentStat && !type) { - type = getType(currentStat) - props[type] = true - props.type = type - } - - switch (type) { - case 'Directory': - ClassType = require('./dir-reader.js') - break - - case 'Link': - // XXX hard links are just files. - // However, it would be good to keep track of files' dev+inode - // and nlink values, and create a HardLinkReader that emits - // a linkpath value of the original copy, so that the tar - // writer can preserve them. - // ClassType = HardLinkReader - // break - - case 'File': - ClassType = require('./file-reader.js') - break - - case 'SymbolicLink': - ClassType = LinkReader - break - - case 'Socket': - ClassType = require('./socket-reader.js') - break - - case null: - ClassType = require('./proxy-reader.js') - break - } - - if (!(self instanceof ClassType)) { - return new ClassType(props) - } - - Abstract.call(self) - - if (!props.path) { - self.error('Must provide a path', null, true) - } - - self.readable = true - self.writable = false - - self.type = type - self.props = props - self.depth = props.depth = props.depth || 0 - self.parent = props.parent || null - self.root = props.root || (props.parent && props.parent.root) || self - - self._path = self.path = path.resolve(props.path) - if (process.platform === 'win32') { - self.path = self._path = self.path.replace(/\?/g, '_') - if (self._path.length >= 260) { - // how DOES one create files on the moon? - // if the path has spaces in it, then UNC will fail. - self._swallowErrors = true - // if (self._path.indexOf(" ") === -1) { - self._path = '\\\\?\\' + self.path.replace(/\//g, '\\') - // } - } - } - self.basename = props.basename = path.basename(self.path) - self.dirname = props.dirname = path.dirname(self.path) - - // these have served their purpose, and are now just noisy clutter - props.parent = props.root = null - - // console.error("\n\n\n%s setting size to", props.path, props.size) - self.size = props.size - self.filter = typeof props.filter === 'function' ? props.filter : null - if (props.sort === 'alpha') props.sort = alphasort - - // start the ball rolling. - // this will stat the thing, and then call self._read() - // to start reading whatever it is. - // console.error("calling stat", props.path, currentStat) - self._stat(currentStat) -} - -function alphasort (a, b) { - return a === b ? 0 - : a.toLowerCase() > b.toLowerCase() ? 1 - : a.toLowerCase() < b.toLowerCase() ? -1 - : a > b ? 1 - : -1 -} - -Reader.prototype._stat = function (currentStat) { - var self = this - var props = self.props - var stat = props.follow ? 'stat' : 'lstat' - // console.error("Reader._stat", self._path, currentStat) - if (currentStat) process.nextTick(statCb.bind(null, null, currentStat)) - else fs[stat](self._path, statCb) - - function statCb (er, props_) { - // console.error("Reader._stat, statCb", self._path, props_, props_.nlink) - if (er) return self.error(er) - - Object.keys(props_).forEach(function (k) { - props[k] = props_[k] - }) - - // if it's not the expected size, then abort here. - if (undefined !== self.size && props.size !== self.size) { - return self.error('incorrect size') - } - self.size = props.size - - var type = getType(props) - var handleHardlinks = props.hardlinks !== false - - // special little thing for handling hardlinks. - if (handleHardlinks && type !== 'Directory' && props.nlink && props.nlink > 1) { - var k = props.dev + ':' + props.ino - // console.error("Reader has nlink", self._path, k) - if (hardLinks[k] === self._path || !hardLinks[k]) { - hardLinks[k] = self._path - } else { - // switch into hardlink mode. - type = self.type = self.props.type = 'Link' - self.Link = self.props.Link = true - self.linkpath = self.props.linkpath = hardLinks[k] - // console.error("Hardlink detected, switching mode", self._path, self.linkpath) - // Setting __proto__ would arguably be the "correct" - // approach here, but that just seems too wrong. - self._stat = self._read = LinkReader.prototype._read - } - } - - if (self.type && self.type !== type) { - self.error('Unexpected type: ' + type) - } - - // if the filter doesn't pass, then just skip over this one. - // still have to emit end so that dir-walking can move on. - if (self.filter) { - var who = self._proxy || self - // special handling for ProxyReaders - if (!self.filter.call(who, who, props)) { - if (!self._disowned) { - self.abort() - self.emit('end') - self.emit('close') - } - return - } - } - - // last chance to abort or disown before the flow starts! - var events = ['_stat', 'stat', 'ready'] - var e = 0 - ;(function go () { - if (self._aborted) { - self.emit('end') - self.emit('close') - return - } - - if (self._paused && self.type !== 'Directory') { - self.once('resume', go) - return - } - - var ev = events[e++] - if (!ev) { - return self._read() - } - self.emit(ev, props) - go() - })() - } -} - -Reader.prototype.pipe = function (dest) { - var self = this - if (typeof dest.add === 'function') { - // piping to a multi-compatible, and we've got directory entries. - self.on('entry', function (entry) { - var ret = dest.add(entry) - if (ret === false) { - self.pause() - } - }) - } - - // console.error("R Pipe apply Stream Pipe") - return Stream.prototype.pipe.apply(this, arguments) -} - -Reader.prototype.pause = function (who) { - this._paused = true - who = who || this - this.emit('pause', who) - if (this._stream) this._stream.pause(who) -} - -Reader.prototype.resume = function (who) { - this._paused = false - who = who || this - this.emit('resume', who) - if (this._stream) this._stream.resume(who) - this._read() -} - -Reader.prototype._read = function () { - this.error('Cannot read unknown type: ' + this.type) -} diff --git a/deps/npm/node_modules/fstream/lib/socket-reader.js b/deps/npm/node_modules/fstream/lib/socket-reader.js deleted file mode 100644 index e0456ba890ede8..00000000000000 --- a/deps/npm/node_modules/fstream/lib/socket-reader.js +++ /dev/null @@ -1,36 +0,0 @@ -// Just get the stats, and then don't do anything. -// You can't really "read" from a socket. You "connect" to it. -// Mostly, this is here so that reading a dir with a socket in it -// doesn't blow up. - -module.exports = SocketReader - -var inherits = require('inherits') -var Reader = require('./reader.js') - -inherits(SocketReader, Reader) - -function SocketReader (props) { - var self = this - if (!(self instanceof SocketReader)) { - throw new Error('SocketReader must be called as constructor.') - } - - if (!(props.type === 'Socket' && props.Socket)) { - throw new Error('Non-socket type ' + props.type) - } - - Reader.call(self, props) -} - -SocketReader.prototype._read = function () { - var self = this - if (self._paused) return - // basically just a no-op, since we got all the info we have - // from the _stat method - if (!self._ended) { - self.emit('end') - self.emit('close') - self._ended = true - } -} diff --git a/deps/npm/node_modules/fstream/lib/writer.js b/deps/npm/node_modules/fstream/lib/writer.js deleted file mode 100644 index 3f10547820fad9..00000000000000 --- a/deps/npm/node_modules/fstream/lib/writer.js +++ /dev/null @@ -1,390 +0,0 @@ -module.exports = Writer - -var fs = require('graceful-fs') -var inherits = require('inherits') -var rimraf = require('rimraf') -var mkdir = require('mkdirp') -var path = require('path') -var umask = process.platform === 'win32' ? 0 : process.umask() -var getType = require('./get-type.js') -var Abstract = require('./abstract.js') - -// Must do this *before* loading the child classes -inherits(Writer, Abstract) - -Writer.dirmode = parseInt('0777', 8) & (~umask) -Writer.filemode = parseInt('0666', 8) & (~umask) - -var DirWriter = require('./dir-writer.js') -var LinkWriter = require('./link-writer.js') -var FileWriter = require('./file-writer.js') -var ProxyWriter = require('./proxy-writer.js') - -// props is the desired state. current is optionally the current stat, -// provided here so that subclasses can avoid statting the target -// more than necessary. -function Writer (props, current) { - var self = this - - if (typeof props === 'string') { - props = { path: props } - } - - // polymorphism. - // call fstream.Writer(dir) to get a DirWriter object, etc. - var type = getType(props) - var ClassType = Writer - - switch (type) { - case 'Directory': - ClassType = DirWriter - break - case 'File': - ClassType = FileWriter - break - case 'Link': - case 'SymbolicLink': - ClassType = LinkWriter - break - case null: - default: - // Don't know yet what type to create, so we wrap in a proxy. - ClassType = ProxyWriter - break - } - - if (!(self instanceof ClassType)) return new ClassType(props) - - // now get down to business. - - Abstract.call(self) - - if (!props.path) self.error('Must provide a path', null, true) - - // props is what we want to set. - // set some convenience properties as well. - self.type = props.type - self.props = props - self.depth = props.depth || 0 - self.clobber = props.clobber === false ? props.clobber : true - self.parent = props.parent || null - self.root = props.root || (props.parent && props.parent.root) || self - - self._path = self.path = path.resolve(props.path) - if (process.platform === 'win32') { - self.path = self._path = self.path.replace(/\?/g, '_') - if (self._path.length >= 260) { - self._swallowErrors = true - self._path = '\\\\?\\' + self.path.replace(/\//g, '\\') - } - } - self.basename = path.basename(props.path) - self.dirname = path.dirname(props.path) - self.linkpath = props.linkpath || null - - props.parent = props.root = null - - // console.error("\n\n\n%s setting size to", props.path, props.size) - self.size = props.size - - if (typeof props.mode === 'string') { - props.mode = parseInt(props.mode, 8) - } - - self.readable = false - self.writable = true - - // buffer until ready, or while handling another entry - self._buffer = [] - self.ready = false - - self.filter = typeof props.filter === 'function' ? props.filter : null - - // start the ball rolling. - // this checks what's there already, and then calls - // self._create() to call the impl-specific creation stuff. - self._stat(current) -} - -// Calling this means that it's something we can't create. -// Just assert that it's already there, otherwise raise a warning. -Writer.prototype._create = function () { - var self = this - fs[self.props.follow ? 'stat' : 'lstat'](self._path, function (er) { - if (er) { - return self.warn('Cannot create ' + self._path + '\n' + - 'Unsupported type: ' + self.type, 'ENOTSUP') - } - self._finish() - }) -} - -Writer.prototype._stat = function (current) { - var self = this - var props = self.props - var stat = props.follow ? 'stat' : 'lstat' - var who = self._proxy || self - - if (current) statCb(null, current) - else fs[stat](self._path, statCb) - - function statCb (er, current) { - if (self.filter && !self.filter.call(who, who, current)) { - self._aborted = true - self.emit('end') - self.emit('close') - return - } - - // if it's not there, great. We'll just create it. - // if it is there, then we'll need to change whatever differs - if (er || !current) { - return create(self) - } - - self._old = current - var currentType = getType(current) - - // if it's a type change, then we need to clobber or error. - // if it's not a type change, then let the impl take care of it. - if (currentType !== self.type || self.type === 'File' && current.nlink > 1) { - return rimraf(self._path, function (er) { - if (er) return self.error(er) - self._old = null - create(self) - }) - } - - // otherwise, just handle in the app-specific way - // this creates a fs.WriteStream, or mkdir's, or whatever - create(self) - } -} - -function create (self) { - // console.error("W create", self._path, Writer.dirmode) - - // XXX Need to clobber non-dirs that are in the way, - // unless { clobber: false } in the props. - mkdir(path.dirname(self._path), Writer.dirmode, function (er, made) { - // console.error("W created", path.dirname(self._path), er) - if (er) return self.error(er) - - // later on, we have to set the mode and owner for these - self._madeDir = made - return self._create() - }) -} - -function endChmod (self, want, current, path, cb) { - var wantMode = want.mode - var chmod = want.follow || self.type !== 'SymbolicLink' - ? 'chmod' : 'lchmod' - - if (!fs[chmod]) return cb() - if (typeof wantMode !== 'number') return cb() - - var curMode = current.mode & parseInt('0777', 8) - wantMode = wantMode & parseInt('0777', 8) - if (wantMode === curMode) return cb() - - fs[chmod](path, wantMode, cb) -} - -function endChown (self, want, current, path, cb) { - // Don't even try it unless root. Too easy to EPERM. - if (process.platform === 'win32') return cb() - if (!process.getuid || process.getuid() !== 0) return cb() - if (typeof want.uid !== 'number' && - typeof want.gid !== 'number') return cb() - - if (current.uid === want.uid && - current.gid === want.gid) return cb() - - var chown = (self.props.follow || self.type !== 'SymbolicLink') - ? 'chown' : 'lchown' - if (!fs[chown]) return cb() - - if (typeof want.uid !== 'number') want.uid = current.uid - if (typeof want.gid !== 'number') want.gid = current.gid - - fs[chown](path, want.uid, want.gid, cb) -} - -function endUtimes (self, want, current, path, cb) { - if (!fs.utimes || process.platform === 'win32') return cb() - - var utimes = (want.follow || self.type !== 'SymbolicLink') - ? 'utimes' : 'lutimes' - - if (utimes === 'lutimes' && !fs[utimes]) { - utimes = 'utimes' - } - - if (!fs[utimes]) return cb() - - var curA = current.atime - var curM = current.mtime - var meA = want.atime - var meM = want.mtime - - if (meA === undefined) meA = curA - if (meM === undefined) meM = curM - - if (!isDate(meA)) meA = new Date(meA) - if (!isDate(meM)) meA = new Date(meM) - - if (meA.getTime() === curA.getTime() && - meM.getTime() === curM.getTime()) return cb() - - fs[utimes](path, meA, meM, cb) -} - -// XXX This function is beastly. Break it up! -Writer.prototype._finish = function () { - var self = this - - if (self._finishing) return - self._finishing = true - - // console.error(" W Finish", self._path, self.size) - - // set up all the things. - // At this point, we're already done writing whatever we've gotta write, - // adding files to the dir, etc. - var todo = 0 - var errState = null - var done = false - - if (self._old) { - // the times will almost *certainly* have changed. - // adds the utimes syscall, but remove another stat. - self._old.atime = new Date(0) - self._old.mtime = new Date(0) - // console.error(" W Finish Stale Stat", self._path, self.size) - setProps(self._old) - } else { - var stat = self.props.follow ? 'stat' : 'lstat' - // console.error(" W Finish Stating", self._path, self.size) - fs[stat](self._path, function (er, current) { - // console.error(" W Finish Stated", self._path, self.size, current) - if (er) { - // if we're in the process of writing out a - // directory, it's very possible that the thing we're linking to - // doesn't exist yet (especially if it was intended as a symlink), - // so swallow ENOENT errors here and just soldier on. - if (er.code === 'ENOENT' && - (self.type === 'Link' || self.type === 'SymbolicLink') && - process.platform === 'win32') { - self.ready = true - self.emit('ready') - self.emit('end') - self.emit('close') - self.end = self._finish = function () {} - return - } else return self.error(er) - } - setProps(self._old = current) - }) - } - - return - - function setProps (current) { - todo += 3 - endChmod(self, self.props, current, self._path, next('chmod')) - endChown(self, self.props, current, self._path, next('chown')) - endUtimes(self, self.props, current, self._path, next('utimes')) - } - - function next (what) { - return function (er) { - // console.error(" W Finish", what, todo) - if (errState) return - if (er) { - er.fstream_finish_call = what - return self.error(errState = er) - } - if (--todo > 0) return - if (done) return - done = true - - // we may still need to set the mode/etc. on some parent dirs - // that were created previously. delay end/close until then. - if (!self._madeDir) return end() - else endMadeDir(self, self._path, end) - - function end (er) { - if (er) { - er.fstream_finish_call = 'setupMadeDir' - return self.error(er) - } - // all the props have been set, so we're completely done. - self.emit('end') - self.emit('close') - } - } - } -} - -function endMadeDir (self, p, cb) { - var made = self._madeDir - // everything *between* made and path.dirname(self._path) - // needs to be set up. Note that this may just be one dir. - var d = path.dirname(p) - - endMadeDir_(self, d, function (er) { - if (er) return cb(er) - if (d === made) { - return cb() - } - endMadeDir(self, d, cb) - }) -} - -function endMadeDir_ (self, p, cb) { - var dirProps = {} - Object.keys(self.props).forEach(function (k) { - dirProps[k] = self.props[k] - - // only make non-readable dirs if explicitly requested. - if (k === 'mode' && self.type !== 'Directory') { - dirProps[k] = dirProps[k] | parseInt('0111', 8) - } - }) - - var todo = 3 - var errState = null - fs.stat(p, function (er, current) { - if (er) return cb(errState = er) - endChmod(self, dirProps, current, p, next) - endChown(self, dirProps, current, p, next) - endUtimes(self, dirProps, current, p, next) - }) - - function next (er) { - if (errState) return - if (er) return cb(errState = er) - if (--todo === 0) return cb() - } -} - -Writer.prototype.pipe = function () { - this.error("Can't pipe from writable stream") -} - -Writer.prototype.add = function () { - this.error("Can't add to non-Directory type") -} - -Writer.prototype.write = function () { - return true -} - -function objectToString (d) { - return Object.prototype.toString.call(d) -} - -function isDate (d) { - return typeof d === 'object' && objectToString(d) === '[object Date]' -} diff --git a/deps/npm/node_modules/fstream/package.json b/deps/npm/node_modules/fstream/package.json deleted file mode 100644 index f90ce2c450ee86..00000000000000 --- a/deps/npm/node_modules/fstream/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_from": "fstream@^1.0.0", - "_id": "fstream@1.0.12", - "_inBundle": false, - "_integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", - "_location": "/fstream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "fstream@^1.0.0", - "name": "fstream", - "escapedName": "fstream", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/node-gyp", - "/node-gyp/tar" - ], - "_resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", - "_shasum": "4e8ba8ee2d48be4f7d0de505455548eae5932045", - "_spec": "fstream@^1.0.0", - "_where": "/Users/isaacs/dev/npm/cli/node_modules/node-gyp", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/npm/fstream/issues" - }, - "bundleDependencies": false, - "dependencies": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - }, - "deprecated": false, - "description": "Advanced file system stream things", - "devDependencies": { - "standard": "^4.0.0", - "tap": "^1.2.0" - }, - "engines": { - "node": ">=0.6" - }, - "homepage": "https://github.com/npm/fstream#readme", - "license": "ISC", - "main": "fstream.js", - "name": "fstream", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/fstream.git" - }, - "scripts": { - "test": "standard && tap examples/*.js" - }, - "version": "1.0.12" -} diff --git a/deps/npm/node_modules/glob/LICENSE b/deps/npm/node_modules/glob/LICENSE index 19129e315fe593..42ca266df1d523 100644 --- a/deps/npm/node_modules/glob/LICENSE +++ b/deps/npm/node_modules/glob/LICENSE @@ -13,3 +13,9 @@ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +## Glob Logo + +Glob's logo created by Tanya Brassie , licensed +under a Creative Commons Attribution-ShareAlike 4.0 International License +https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/deps/npm/node_modules/glob/README.md b/deps/npm/node_modules/glob/README.md index baa1d1ba86506a..e71b967ea28809 100644 --- a/deps/npm/node_modules/glob/README.md +++ b/deps/npm/node_modules/glob/README.md @@ -7,7 +7,7 @@ Match files using the patterns the shell uses, like stars and stuff. This is a glob implementation in JavaScript. It uses the `minimatch` library to do its matching. -![](oh-my-glob.gif) +![](logo/glob.png) ## Usage @@ -347,6 +347,11 @@ Users are thus advised not to use a glob result as a guarantee of filesystem state in the face of rapid changes. For the vast majority of operations, this is never a problem. +## Glob Logo +Glob's logo was created by [Tanya Brassie](http://tanyabrassie.com/). Logo files can be found [here](https://github.com/isaacs/node-glob/tree/master/logo). + +The logo is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/). + ## Contributing Any change to behavior (including bugfixes) must come with a test. diff --git a/deps/npm/node_modules/glob/package.json b/deps/npm/node_modules/glob/package.json index 7c64de2751e5fe..788801e299e45f 100644 --- a/deps/npm/node_modules/glob/package.json +++ b/deps/npm/node_modules/glob/package.json @@ -1,40 +1,39 @@ { - "_from": "glob@7.1.3", - "_id": "glob@7.1.3", + "_from": "glob@7.1.4", + "_id": "glob@7.1.4", "_inBundle": false, - "_integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "_integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", "_location": "/glob", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "glob@7.1.3", + "raw": "glob@7.1.4", "name": "glob", "escapedName": "glob", - "rawSpec": "7.1.3", + "rawSpec": "7.1.4", "saveSpec": null, - "fetchSpec": "7.1.3" + "fetchSpec": "7.1.4" }, "_requiredBy": [ "#USER", "/", - "/cacache", "/deglob", "/eslint", - "/globby", "/init-package-json", "/node-gyp", - "/npm-registry-fetch/cacache", + "/nyc", "/pacote", "/read-package-json", "/rimraf", "/tap", - "/tap-mocha-reporter" + "/tap-mocha-reporter", + "/test-exclude" ], - "_resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "_shasum": "3960832d3f1574108342dafd3a67b332c0969df1", - "_spec": "glob@7.1.3", - "_where": "/Users/rebecca/code/npm", + "_resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "_shasum": "aa608a2f6c577ad357e1ae5a5c26d9a8d1969255", + "_spec": "glob@7.1.4", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -85,5 +84,5 @@ "test": "tap test/*.js --cov", "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js" }, - "version": "7.1.3" + "version": "7.1.4" } diff --git a/deps/npm/node_modules/https-proxy-agent/index.d.ts b/deps/npm/node_modules/https-proxy-agent/index.d.ts new file mode 100644 index 00000000000000..00989abadebdeb --- /dev/null +++ b/deps/npm/node_modules/https-proxy-agent/index.d.ts @@ -0,0 +1,22 @@ +declare module 'https-proxy-agent' { + import * as https from 'https' + + namespace HttpsProxyAgent { + interface HttpsProxyAgentOptions { + host: string + port: number + secureProxy?: boolean + headers?: { + [key: string]: string + } + [key: string]: any + } + } + + // HttpsProxyAgent doesnt *actually* extend https.Agent, but for my purposes I want it to pretend that it does + class HttpsProxyAgent extends https.Agent { + constructor(opts: HttpsProxyAgent.HttpsProxyAgentOptions | string) + } + + export = HttpsProxyAgent +} diff --git a/deps/npm/node_modules/https-proxy-agent/package.json b/deps/npm/node_modules/https-proxy-agent/package.json index 538782a862a386..1f2885918136a9 100644 --- a/deps/npm/node_modules/https-proxy-agent/package.json +++ b/deps/npm/node_modules/https-proxy-agent/package.json @@ -1,8 +1,8 @@ { "_from": "https-proxy-agent@^2.2.1", - "_id": "https-proxy-agent@2.2.1", + "_id": "https-proxy-agent@2.2.2", "_inBundle": false, - "_integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", + "_integrity": "sha512-c8Ndjc9Bkpfx/vCJueCPy0jlP4ccCCSNDp8xwCZzPjKJUm+B+u9WX2x98Qx4n1PiMNTWo3D7KK5ifNV/yJyRzg==", "_location": "/https-proxy-agent", "_phantomChildren": {}, "_requested": { @@ -16,14 +16,12 @@ "fetchSpec": "^2.2.1" }, "_requiredBy": [ - "/make-fetch-happen", - "/npm-profile/make-fetch-happen", - "/npm-registry-fetch/make-fetch-happen" + "/make-fetch-happen" ], - "_resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", - "_shasum": "51552970fa04d723e04c56d04178c3f92592bbc0", + "_resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.2.tgz", + "_shasum": "271ea8e90f836ac9f119daccd39c19ff7dfb0793", "_spec": "https-proxy-agent@^2.2.1", - "_where": "/Users/rebecca/code/npm/node_modules/make-fetch-happen", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/make-fetch-happen", "author": { "name": "Nathan Rajlich", "email": "nathan@tootallnate.net", @@ -34,7 +32,7 @@ }, "bundleDependencies": false, "dependencies": { - "agent-base": "^4.1.0", + "agent-base": "^4.3.0", "debug": "^3.1.0" }, "deprecated": false, @@ -63,5 +61,6 @@ "scripts": { "test": "mocha --reporter spec" }, - "version": "2.2.1" + "types": "./index.d.ts", + "version": "2.2.2" } diff --git a/deps/npm/node_modules/https-proxy-agent/test/test.js b/deps/npm/node_modules/https-proxy-agent/test/test.js deleted file mode 100644 index b368495821421f..00000000000000 --- a/deps/npm/node_modules/https-proxy-agent/test/test.js +++ /dev/null @@ -1,342 +0,0 @@ - -/** - * Module dependencies. - */ - -var fs = require('fs'); -var url = require('url'); -var http = require('http'); -var https = require('https'); -var assert = require('assert'); -var Proxy = require('proxy'); -var HttpsProxyAgent = require('../'); - -describe('HttpsProxyAgent', function () { - - var server; - var serverPort; - - var sslServer; - var sslServerPort; - - var proxy; - var proxyPort; - - var sslProxy; - var sslProxyPort; - - before(function (done) { - // setup target HTTP server - server = http.createServer(); - server.listen(function () { - serverPort = server.address().port; - done(); - }); - }); - - before(function (done) { - // setup HTTP proxy server - proxy = Proxy(); - proxy.listen(function () { - proxyPort = proxy.address().port; - done(); - }); - }); - - before(function (done) { - // setup target HTTPS server - var options = { - key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'), - cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem') - }; - sslServer = https.createServer(options); - sslServer.listen(function () { - sslServerPort = sslServer.address().port; - done(); - }); - }); - - before(function (done) { - // setup SSL HTTP proxy server - var options = { - key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'), - cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem') - }; - sslProxy = Proxy(https.createServer(options)); - sslProxy.listen(function () { - sslProxyPort = sslProxy.address().port; - done(); - }); - }); - - // shut down test HTTP server - after(function (done) { - server.once('close', function () { done(); }); - server.close(); - }); - - after(function (done) { - proxy.once('close', function () { done(); }); - proxy.close(); - }); - - after(function (done) { - sslServer.once('close', function () { done(); }); - sslServer.close(); - }); - - after(function (done) { - sslProxy.once('close', function () { done(); }); - sslProxy.close(); - }); - - describe('constructor', function () { - it('should throw an Error if no "proxy" argument is given', function () { - assert.throws(function () { - new HttpsProxyAgent(); - }); - }); - it('should accept a "string" proxy argument', function () { - var agent = new HttpsProxyAgent('http://127.0.0.1:' + proxyPort); - assert.equal('127.0.0.1', agent.proxy.host); - assert.equal(proxyPort, agent.proxy.port); - }); - it('should accept a `url.parse()` result object argument', function () { - var opts = url.parse('http://127.0.0.1:' + proxyPort); - var agent = new HttpsProxyAgent(opts); - assert.equal('127.0.0.1', agent.proxy.host); - assert.equal(proxyPort, agent.proxy.port); - }); - it('should set a `defaultPort` property', function () { - var opts = url.parse("http://127.0.0.1:" + proxyPort); - var agent = new HttpsProxyAgent(opts); - assert.equal(443, agent.defaultPort); - }); - describe('secureProxy', function () { - it('should default to `false`', function () { - var agent = new HttpsProxyAgent({ port: proxyPort }); - assert.equal(false, agent.secureProxy); - }); - it('should be `false` when "http:" protocol is used', function () { - var agent = new HttpsProxyAgent({ port: proxyPort, protocol: 'http:' }); - assert.equal(false, agent.secureProxy); - }); - it('should be `true` when "https:" protocol is used', function () { - var agent = new HttpsProxyAgent({ port: proxyPort, protocol: 'https:' }); - assert.equal(true, agent.secureProxy); - }); - it('should be `true` when "https" protocol is used', function () { - var agent = new HttpsProxyAgent({ port: proxyPort, protocol: 'https' }); - assert.equal(true, agent.secureProxy); - }); - }); - }); - - describe('"http" module', function () { - - beforeEach(function () { - delete proxy.authenticate; - }); - - it('should work over an HTTP proxy', function (done) { - server.once('request', function (req, res) { - res.end(JSON.stringify(req.headers)); - }); - - var proxy = process.env.HTTP_PROXY || process.env.http_proxy || 'http://127.0.0.1:' + proxyPort; - var agent = new HttpsProxyAgent(proxy); - - var opts = url.parse('http://127.0.0.1:' + serverPort); - opts.agent = agent; - - var req = http.get(opts, function (res) { - var data = ''; - res.setEncoding('utf8'); - res.on('data', function (b) { - data += b; - }); - res.on('end', function () { - data = JSON.parse(data); - assert.equal('127.0.0.1:' + serverPort, data.host); - done(); - }); - }); - req.once('error', done); - }); - it('should work over an HTTPS proxy', function (done) { - server.once('request', function (req, res) { - res.end(JSON.stringify(req.headers)); - }); - - var proxy = process.env.HTTPS_PROXY || process.env.https_proxy || 'https://127.0.0.1:' + sslProxyPort; - proxy = url.parse(proxy); - proxy.rejectUnauthorized = false; - var agent = new HttpsProxyAgent(proxy); - - var opts = url.parse('http://127.0.0.1:' + serverPort); - opts.agent = agent; - - http.get(opts, function (res) { - var data = ''; - res.setEncoding('utf8'); - res.on('data', function (b) { - data += b; - }); - res.on('end', function () { - data = JSON.parse(data); - assert.equal('127.0.0.1:' + serverPort, data.host); - done(); - }); - }); - }); - it('should receive the 407 authorization code on the `http.ClientResponse`', function (done) { - // set a proxy authentication function for this test - proxy.authenticate = function (req, fn) { - // reject all requests - fn(null, false); - }; - - var proxyUri = process.env.HTTP_PROXY || process.env.http_proxy || 'http://127.0.0.1:' + proxyPort; - var agent = new HttpsProxyAgent(proxyUri); - - var opts = {}; - // `host` and `port` don't really matter since the proxy will reject anyways - opts.host = '127.0.0.1'; - opts.port = 80; - opts.agent = agent; - - var req = http.get(opts, function (res) { - assert.equal(407, res.statusCode); - assert('proxy-authenticate' in res.headers); - done(); - }); - }); - it('should emit an "error" event on the `http.ClientRequest` if the proxy does not exist', function (done) { - // port 4 is a reserved, but "unassigned" port - var proxyUri = 'http://127.0.0.1:4'; - var agent = new HttpsProxyAgent(proxyUri); - - var opts = url.parse('http://nodejs.org'); - opts.agent = agent; - - var req = http.get(opts); - req.once('error', function (err) { - assert.equal('ECONNREFUSED', err.code); - req.abort(); - done(); - }); - }); - - it('should allow custom proxy "headers"', function (done) { - server.once('connect', function (req, socket, head) { - assert.equal('CONNECT', req.method); - assert.equal('bar', req.headers.foo); - socket.destroy(); - done(); - }); - - var uri = 'http://127.0.0.1:' + serverPort; - var proxyOpts = url.parse(uri); - proxyOpts.headers = { - 'Foo': 'bar' - }; - var agent = new HttpsProxyAgent(proxyOpts); - - var opts = {}; - // `host` and `port` don't really matter since the proxy will reject anyways - opts.host = '127.0.0.1'; - opts.port = 80; - opts.agent = agent; - - http.get(opts); - }); - - }); - - describe('"https" module', function () { - it('should work over an HTTP proxy', function (done) { - sslServer.once('request', function (req, res) { - res.end(JSON.stringify(req.headers)); - }); - - var proxy = process.env.HTTP_PROXY || process.env.http_proxy || 'http://127.0.0.1:' + proxyPort; - var agent = new HttpsProxyAgent(proxy); - - var opts = url.parse('https://127.0.0.1:' + sslServerPort); - opts.rejectUnauthorized = false; - opts.agent = agent; - - https.get(opts, function (res) { - var data = ''; - res.setEncoding('utf8'); - res.on('data', function (b) { - data += b; - }); - res.on('end', function () { - data = JSON.parse(data); - assert.equal('127.0.0.1:' + sslServerPort, data.host); - done(); - }); - }); - }); - - it('should work over an HTTPS proxy', function (done) { - sslServer.once('request', function (req, res) { - res.end(JSON.stringify(req.headers)); - }); - - var proxy = process.env.HTTPS_PROXY || process.env.https_proxy || 'https://127.0.0.1:' + sslProxyPort; - proxy = url.parse(proxy); - proxy.rejectUnauthorized = false; - var agent = new HttpsProxyAgent(proxy); - - var opts = url.parse('https://127.0.0.1:' + sslServerPort); - opts.agent = agent; - opts.rejectUnauthorized = false; - - https.get(opts, function (res) { - var data = ''; - res.setEncoding('utf8'); - res.on('data', function (b) { - data += b; - }); - res.on('end', function () { - data = JSON.parse(data); - assert.equal('127.0.0.1:' + sslServerPort, data.host); - done(); - }); - }); - }); - - it('should not send a port number for the default port', function (done) { - sslServer.once('request', function (req, res) { - res.end(JSON.stringify(req.headers)); - }); - - var proxy = process.env.HTTPS_PROXY || process.env.https_proxy || "https://127.0.0.1:" + sslProxyPort; - proxy = url.parse(proxy); - proxy.rejectUnauthorized = false; - var agent = new HttpsProxyAgent(proxy); - agent.defaultPort = sslServerPort; - - var opts = url.parse("https://127.0.0.1:" + sslServerPort); - opts.agent = agent; - opts.rejectUnauthorized = false; - - https.get(opts, function(res) { - var data = ""; - res.setEncoding("utf8"); - res.on("data", function(b) { - data += b; - }); - res.on("end", function() { - data = JSON.parse(data); - assert.equal("127.0.0.1", data.host); - done(); - }); - }); - }); - - }); - -}); diff --git a/deps/npm/node_modules/pacote/node_modules/yallist/LICENSE b/deps/npm/node_modules/infer-owner/LICENSE similarity index 93% rename from deps/npm/node_modules/pacote/node_modules/yallist/LICENSE rename to deps/npm/node_modules/infer-owner/LICENSE index 19129e315fe593..20a47625409237 100644 --- a/deps/npm/node_modules/pacote/node_modules/yallist/LICENSE +++ b/deps/npm/node_modules/infer-owner/LICENSE @@ -1,6 +1,6 @@ The ISC License -Copyright (c) Isaac Z. Schlueter and Contributors +Copyright (c) npm, Inc. 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 diff --git a/deps/npm/node_modules/infer-owner/README.md b/deps/npm/node_modules/infer-owner/README.md new file mode 100644 index 00000000000000..146caf7b8c8019 --- /dev/null +++ b/deps/npm/node_modules/infer-owner/README.md @@ -0,0 +1,41 @@ +# infer-owner + +Infer the owner of a path based on the owner of its nearest existing parent + +## USAGE + +```js +const inferOwner = require('infer-owner') + +inferOwner('/some/cache/folder/file').then(owner => { + // owner is {uid, gid} that should be attached to + // the /some/cache/folder/file, based on ownership + // of /some/cache/folder, /some/cache, /some, or /, + // whichever is the first to exist +}) + +// same, but not async +const owner = inferOwner.sync('/some/cache/folder/file') + +// results are cached! to reset the cache (eg, to change +// permissions for whatever reason), do this: +inferOwner.clearCache() +``` + +This module endeavors to be as performant as possible. Parallel requests +for ownership of the same path will only stat the directories one time. + +## API + +* `inferOwner(path) -> Promise<{ uid, gid }>` + + If the path exists, return its uid and gid. If it does not, look to + its parent, then its grandparent, and so on. + +* `inferOwner(path) -> { uid, gid }` + + Sync form of `inferOwner(path)`. + +* `inferOwner.clearCache()` + + Delete all cached ownership information and in-flight tracking. diff --git a/deps/npm/node_modules/infer-owner/index.js b/deps/npm/node_modules/infer-owner/index.js new file mode 100644 index 00000000000000..a7bddcbd2288b5 --- /dev/null +++ b/deps/npm/node_modules/infer-owner/index.js @@ -0,0 +1,71 @@ +const cache = new Map() +const fs = require('fs') +const { dirname, resolve } = require('path') + + +const lstat = path => new Promise((res, rej) => + fs.lstat(path, (er, st) => er ? rej(er) : res(st))) + +const inferOwner = path => { + path = resolve(path) + if (cache.has(path)) + return Promise.resolve(cache.get(path)) + + const statThen = st => { + const { uid, gid } = st + cache.set(path, { uid, gid }) + return { uid, gid } + } + const parent = dirname(path) + const parentTrap = parent === path ? null : er => { + return inferOwner(parent).then((owner) => { + cache.set(path, owner) + return owner + }) + } + return lstat(path).then(statThen, parentTrap) +} + +const inferOwnerSync = path => { + path = resolve(path) + if (cache.has(path)) + return cache.get(path) + + const parent = dirname(path) + + // avoid obscuring call site by re-throwing + // "catch" the error by returning from a finally, + // only if we're not at the root, and the parent call works. + let threw = true + try { + const st = fs.lstatSync(path) + threw = false + const { uid, gid } = st + cache.set(path, { uid, gid }) + return { uid, gid } + } finally { + if (threw && parent !== path) { + const owner = inferOwnerSync(parent) + cache.set(path, owner) + return owner // eslint-disable-line no-unsafe-finally + } + } +} + +const inflight = new Map() +module.exports = path => { + path = resolve(path) + if (inflight.has(path)) + return Promise.resolve(inflight.get(path)) + const p = inferOwner(path).then(owner => { + inflight.delete(path) + return owner + }) + inflight.set(path, p) + return p +} +module.exports.sync = inferOwnerSync +module.exports.clearCache = () => { + cache.clear() + inflight.clear() +} diff --git a/deps/npm/node_modules/infer-owner/package.json b/deps/npm/node_modules/infer-owner/package.json new file mode 100644 index 00000000000000..1b7b3e0509f426 --- /dev/null +++ b/deps/npm/node_modules/infer-owner/package.json @@ -0,0 +1,63 @@ +{ + "_from": "infer-owner@1.0.4", + "_id": "infer-owner@1.0.4", + "_inBundle": false, + "_integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", + "_location": "/infer-owner", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "infer-owner@1.0.4", + "name": "infer-owner", + "escapedName": "infer-owner", + "rawSpec": "1.0.4", + "saveSpec": null, + "fetchSpec": "1.0.4" + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "_shasum": "c4cefcaa8e51051c2a40ba2ce8a3d27295af9467", + "_spec": "infer-owner@1.0.4", + "_where": "/Users/isaacs/dev/npm/cli", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "https://izs.me" + }, + "bugs": { + "url": "https://github.com/npm/infer-owner/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Infer the owner of a path based on the owner of its nearest existing parent", + "devDependencies": { + "mutate-fs": "^2.1.1", + "tap": "^12.4.2" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/npm/infer-owner#readme", + "license": "ISC", + "main": "index.js", + "name": "infer-owner", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/infer-owner.git" + }, + "scripts": { + "postpublish": "git push origin --follow-tags", + "postversion": "npm publish", + "preversion": "npm test", + "snap": "TAP_SNAPSHOT=1 tap -J test/*.js --100", + "test": "tap -J test/*.js --100" + }, + "version": "1.0.4" +} diff --git a/deps/npm/node_modules/inherits/inherits.js b/deps/npm/node_modules/inherits/inherits.js index 3b94763a76eef0..f71f2d93294a67 100644 --- a/deps/npm/node_modules/inherits/inherits.js +++ b/deps/npm/node_modules/inherits/inherits.js @@ -1,7 +1,9 @@ try { var util = require('util'); + /* istanbul ignore next */ if (typeof util.inherits !== 'function') throw ''; module.exports = util.inherits; } catch (e) { + /* istanbul ignore next */ module.exports = require('./inherits_browser.js'); } diff --git a/deps/npm/node_modules/inherits/inherits_browser.js b/deps/npm/node_modules/inherits/inherits_browser.js index c1e78a75e6b52b..86bbb3dc29e484 100644 --- a/deps/npm/node_modules/inherits/inherits_browser.js +++ b/deps/npm/node_modules/inherits/inherits_browser.js @@ -1,23 +1,27 @@ if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); + if (superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }) + } }; } else { // old school shim for old browsers module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor + if (superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } } } diff --git a/deps/npm/node_modules/inherits/package.json b/deps/npm/node_modules/inherits/package.json index 0ae0875ff48746..ab48b2a4b3dbf6 100644 --- a/deps/npm/node_modules/inherits/package.json +++ b/deps/npm/node_modules/inherits/package.json @@ -1,52 +1,62 @@ { - "_args": [ - [ - "inherits@2.0.3", - "/Users/rebecca/code/npm" - ] - ], - "_from": "inherits@2.0.3", - "_id": "inherits@2.0.3", + "_from": "inherits@2.0.4", + "_id": "inherits@2.0.4", "_inBundle": false, - "_integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "_integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "_location": "/inherits", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "inherits@2.0.3", + "raw": "inherits@2.0.4", "name": "inherits", "escapedName": "inherits", - "rawSpec": "2.0.3", + "rawSpec": "2.0.4", "saveSpec": null, - "fetchSpec": "2.0.3" + "fetchSpec": "2.0.4" }, "_requiredBy": [ + "#USER", "/", + "/are-we-there-yet/readable-stream", "/block-stream", + "/cacache/glob", "/concat-stream", + "/concat-stream/readable-stream", "/duplexify", + "/duplexify/readable-stream", "/flush-write-stream", + "/flush-write-stream/readable-stream", "/from2", + "/from2/readable-stream", + "/fs-write-stream-atomic/readable-stream", "/fstream", "/glob", "/node-gyp/tar", "/parallel-transform", + "/parallel-transform/readable-stream", "/pumpify", "/readable-stream", "/sorted-union-stream/from2", - "/sorted-union-stream/readable-stream" + "/sorted-union-stream/readable-stream", + "/stream-iterate/readable-stream", + "/tap-mocha-reporter/readable-stream", + "/tar-stream", + "/through2/readable-stream" ], - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "_spec": "2.0.3", - "_where": "/Users/rebecca/code/npm", + "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "_shasum": "0fa2c64f932917c3433a0ded55363aae37416b7c", + "_spec": "inherits@2.0.4", + "_where": "/Users/isaacs/dev/npm/cli", "browser": "./inherits_browser.js", "bugs": { "url": "https://github.com/isaacs/inherits/issues" }, + "bundleDependencies": false, + "deprecated": false, "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", "devDependencies": { - "tap": "^7.1.0" + "tap": "^14.2.4" }, "files": [ "inherits.js", @@ -71,7 +81,7 @@ "url": "git://github.com/isaacs/inherits.git" }, "scripts": { - "test": "node test" + "test": "tap" }, - "version": "2.0.3" + "version": "2.0.4" } diff --git a/deps/npm/node_modules/libcipm/CHANGELOG.md b/deps/npm/node_modules/libcipm/CHANGELOG.md index 5f9d4906e4ae7b..5d72f4c362a3d7 100644 --- a/deps/npm/node_modules/libcipm/CHANGELOG.md +++ b/deps/npm/node_modules/libcipm/CHANGELOG.md @@ -2,6 +2,24 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +# [4.0.0](https://github.com/zkat/cipm/compare/v3.0.3...v4.0.0) (2019-07-10) + + +* npm-lifecycle@3.0.0 ([84b8d7e](https://github.com/zkat/cipm/commit/84b8d7e)) + + +### Bug Fixes + +* **lifecycle:** remove warning from bluebird ([#59](https://github.com/zkat/cipm/issues/59)) ([7af39e6](https://github.com/zkat/cipm/commit/7af39e6)), closes [#58](https://github.com/zkat/cipm/issues/58) + + +### BREAKING CHANGES + +* requires updating node-gyp in npm/cli + + + ## [3.0.3](https://github.com/zkat/cipm/compare/v3.0.2...v3.0.3) (2019-01-22) diff --git a/deps/npm/node_modules/libcipm/index.js b/deps/npm/node_modules/libcipm/index.js index 7f4d13f74a34c1..ebc05385e19732 100644 --- a/deps/npm/node_modules/libcipm/index.js +++ b/deps/npm/node_modules/libcipm/index.js @@ -348,7 +348,7 @@ class Installer { .then(from => npa.resolve(dep.name, from)) .then(from => { pkg._from = from.toString() }) .then(() => writeFileAsync(depPkgPath, JSON.stringify(pkg, null, 2))) - .then(pkg) + .then(() => pkg) } updateInstallScript (dep, pkg) { @@ -363,7 +363,7 @@ class Installer { pkg.scripts.install = 'node-gyp rebuild' } }) - .then(pkg) + .then(() => pkg) } // A cute little mark-and-sweep collector! diff --git a/deps/npm/node_modules/libcipm/package.json b/deps/npm/node_modules/libcipm/package.json index 153dc1acbaadaa..d2dde91e8bd473 100644 --- a/deps/npm/node_modules/libcipm/package.json +++ b/deps/npm/node_modules/libcipm/package.json @@ -1,28 +1,28 @@ { - "_from": "libcipm@latest", - "_id": "libcipm@3.0.3", + "_from": "libcipm@4.0.0", + "_id": "libcipm@4.0.0", "_inBundle": false, - "_integrity": "sha512-71V5CpTI+zFydTc5IjJ/tx8JHbXEJvmYF2zaSVW1V3X1rRnRjXqh44iuiyry1xgi3ProUQ1vX1uwFiWs00+2og==", + "_integrity": "sha512-5IIamvUIqWYjfNscYdirKisXyaTMw7Mf7yuGrjHH2isz7xBZDCUOIdujZxNk2g6lBBs8AGxYW6lHpNnnt92bww==", "_location": "/libcipm", "_phantomChildren": {}, "_requested": { - "type": "tag", + "type": "version", "registry": true, - "raw": "libcipm@latest", + "raw": "libcipm@4.0.0", "name": "libcipm", "escapedName": "libcipm", - "rawSpec": "latest", + "rawSpec": "4.0.0", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "4.0.0" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/libcipm/-/libcipm-3.0.3.tgz", - "_shasum": "2e764effe0b90d458790dab3165794c804075ed3", - "_spec": "libcipm@latest", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/libcipm/-/libcipm-4.0.0.tgz", + "_shasum": "30053bee09b0b1f4df855137d631a6d27f5d59de", + "_spec": "libcipm@4.0.0", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Kat Marchán", "email": "kzm@sykosomatic.org" @@ -48,7 +48,7 @@ "ini": "^1.3.5", "lock-verify": "^2.0.2", "mkdirp": "^0.5.1", - "npm-lifecycle": "^2.0.3", + "npm-lifecycle": "^3.0.0", "npm-logical-tree": "^1.2.1", "npm-package-arg": "^6.1.0", "pacote": "^9.1.0", @@ -96,5 +96,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "3.0.3" + "version": "4.0.0" } diff --git a/deps/npm/node_modules/libnpm/CHANGELOG.md b/deps/npm/node_modules/libnpm/CHANGELOG.md index e9712f7d445539..bb3a52a36f93d6 100644 --- a/deps/npm/node_modules/libnpm/CHANGELOG.md +++ b/deps/npm/node_modules/libnpm/CHANGELOG.md @@ -2,6 +2,24 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [3.0.1](https://github.com/npm/libnpm/compare/v3.0.0...v3.0.1) (2019-07-16) + + + + +# [3.0.0](https://github.com/npm/libnpm/compare/v2.0.1...v3.0.0) (2019-07-10) + + +* npm-lifecycle@3.0.0 ([56cc8e5](https://github.com/npm/libnpm/commit/56cc8e5)) + + +### BREAKING CHANGES + +* requires updating node-gyp in npm/cli + + + ## [2.0.1](https://github.com/npm/libnpm/compare/v2.0.0...v2.0.1) (2018-12-05) diff --git a/deps/npm/node_modules/libnpm/package.json b/deps/npm/node_modules/libnpm/package.json index 4c77e68097f387..9fb5641b2d9a11 100644 --- a/deps/npm/node_modules/libnpm/package.json +++ b/deps/npm/node_modules/libnpm/package.json @@ -1,28 +1,28 @@ { - "_from": "libnpm@^2.0.1", - "_id": "libnpm@2.0.1", + "_from": "libnpm@3.0.1", + "_id": "libnpm@3.0.1", "_inBundle": false, - "_integrity": "sha512-qTKoxyJvpBxHZQB6k0AhSLajyXq9ZE/lUsZzuHAplr2Bpv9G+k4YuYlExYdUCeVRRGqcJt8hvkPh4tBwKoV98w==", + "_integrity": "sha512-d7jU5ZcMiTfBqTUJVZ3xid44fE5ERBm9vBnmhp2ECD2Ls+FNXWxHSkO7gtvrnbLO78gwPdNPz1HpsF3W4rjkBQ==", "_location": "/libnpm", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "libnpm@^2.0.1", + "raw": "libnpm@3.0.1", "name": "libnpm", "escapedName": "libnpm", - "rawSpec": "^2.0.1", + "rawSpec": "3.0.1", "saveSpec": null, - "fetchSpec": "^2.0.1" + "fetchSpec": "3.0.1" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/libnpm/-/libnpm-2.0.1.tgz", - "_shasum": "a48fcdee3c25e13c77eb7c60a0efe561d7fb0d8f", - "_spec": "libnpm@^2.0.1", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/libnpm/-/libnpm-3.0.1.tgz", + "_shasum": "0be11b4c9dd4d1ffd7d95c786e92e55d65be77a2", + "_spec": "libnpm@3.0.1", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Kat Marchán", "email": "kzm@zkat.tech" @@ -35,21 +35,21 @@ "bin-links": "^1.1.2", "bluebird": "^3.5.3", "find-npm-prefix": "^1.0.2", - "libnpmaccess": "^3.0.1", + "libnpmaccess": "^3.0.2", "libnpmconfig": "^1.2.1", - "libnpmhook": "^5.0.2", - "libnpmorg": "^1.0.0", - "libnpmpublish": "^1.1.0", - "libnpmsearch": "^2.0.0", - "libnpmteam": "^1.0.1", + "libnpmhook": "^5.0.3", + "libnpmorg": "^1.0.1", + "libnpmpublish": "^1.1.2", + "libnpmsearch": "^2.0.2", + "libnpmteam": "^1.0.2", "lock-verify": "^2.0.2", - "npm-lifecycle": "^2.1.0", + "npm-lifecycle": "^3.0.0", "npm-logical-tree": "^1.2.1", "npm-package-arg": "^6.1.0", - "npm-profile": "^4.0.1", - "npm-registry-fetch": "^3.8.0", + "npm-profile": "^4.0.2", + "npm-registry-fetch": "^4.0.0", "npmlog": "^4.1.2", - "pacote": "^9.2.3", + "pacote": "^9.5.3", "read-package-json": "^2.0.13", "stringify-package": "^1.0.0" }, @@ -90,5 +90,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "2.0.1" + "version": "3.0.1" } diff --git a/deps/npm/node_modules/libnpmaccess/CHANGELOG.md b/deps/npm/node_modules/libnpmaccess/CHANGELOG.md index 14959aaefbe445..cbec879a7db2e9 100644 --- a/deps/npm/node_modules/libnpmaccess/CHANGELOG.md +++ b/deps/npm/node_modules/libnpmaccess/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [3.0.2](https://github.com/npm/libnpmaccess/compare/v3.0.1...v3.0.2) (2019-07-16) + + + ## [3.0.1](https://github.com/npm/libnpmaccess/compare/v3.0.0...v3.0.1) (2018-11-12) diff --git a/deps/npm/node_modules/libnpmaccess/node_modules/aproba/CHANGELOG.md b/deps/npm/node_modules/libnpmaccess/node_modules/aproba/CHANGELOG.md deleted file mode 100644 index bab30ecb7e625d..00000000000000 --- a/deps/npm/node_modules/libnpmaccess/node_modules/aproba/CHANGELOG.md +++ /dev/null @@ -1,4 +0,0 @@ -2.0.0 - * Drop support for 0.10 and 0.12. They haven't been in travis but still, - since we _know_ we'll break with them now it's only polite to do a - major bump. diff --git a/deps/npm/node_modules/libnpmaccess/node_modules/aproba/LICENSE b/deps/npm/node_modules/libnpmaccess/node_modules/aproba/LICENSE deleted file mode 100644 index 2a4982dc40cb69..00000000000000 --- a/deps/npm/node_modules/libnpmaccess/node_modules/aproba/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2015, Rebecca Turner - -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/libnpmaccess/node_modules/aproba/README.md b/deps/npm/node_modules/libnpmaccess/node_modules/aproba/README.md deleted file mode 100644 index e94799201ce046..00000000000000 --- a/deps/npm/node_modules/libnpmaccess/node_modules/aproba/README.md +++ /dev/null @@ -1,93 +0,0 @@ -aproba -====== - -A ridiculously light-weight function argument validator - -``` -var validate = require("aproba") - -function myfunc(a, b, c) { - // `a` must be a string, `b` a number, `c` a function - validate('SNF', arguments) // [a,b,c] is also valid -} - -myfunc('test', 23, function () {}) // ok -myfunc(123, 23, function () {}) // type error -myfunc('test', 23) // missing arg error -myfunc('test', 23, function () {}, true) // too many args error - -``` - -Valid types are: - -| type | description -| :--: | :---------- -| * | matches any type -| A | `Array.isArray` OR an `arguments` object -| S | typeof == string -| N | typeof == number -| F | typeof == function -| O | typeof == object and not type A and not type E -| B | typeof == boolean -| E | `instanceof Error` OR `null` **(special: see below)** -| Z | == `null` - -Validation failures throw one of three exception types, distinguished by a -`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`. - -If you pass in an invalid type then it will throw with a code of -`EUNKNOWNTYPE`. - -If an **error** argument is found and is not null then the remaining -arguments are optional. That is, if you say `ESO` then that's like using a -non-magical `E` in: `E|ESO|ZSO`. - -### But I have optional arguments?! - -You can provide more than one signature by separating them with pipes `|`. -If any signature matches the arguments then they'll be considered valid. - -So for example, say you wanted to write a signature for -`fs.createWriteStream`. The docs for it describe it thusly: - -``` -fs.createWriteStream(path[, options]) -``` - -This would be a signature of `SO|S`. That is, a string and and object, or -just a string. - -Now, if you read the full `fs` docs, you'll see that actually path can ALSO -be a buffer. And options can be a string, that is: -``` -path | -options | -``` - -To reproduce this you have to fully enumerate all of the possible -combinations and that implies a signature of `SO|SS|OO|OS|S|O`. The -awkwardness is a feature: It reminds you of the complexity you're adding to -your API when you do this sort of thing. - - -### Browser support - -This has no dependencies and should work in browsers, though you'll have -noisier stack traces. - -### Why this exists - -I wanted a very simple argument validator. It needed to do two things: - -1. Be more concise and easier to use than assertions - -2. Not encourage an infinite bikeshed of DSLs - -This is why types are specified by a single character and there's no such -thing as an optional argument. - -This is not intended to validate user data. This is specifically about -asserting the interface of your functions. - -If you need greater validation, I encourage you to write them by hand or -look elsewhere. diff --git a/deps/npm/node_modules/libnpmaccess/node_modules/aproba/index.js b/deps/npm/node_modules/libnpmaccess/node_modules/aproba/index.js deleted file mode 100644 index fd947481ba5575..00000000000000 --- a/deps/npm/node_modules/libnpmaccess/node_modules/aproba/index.js +++ /dev/null @@ -1,105 +0,0 @@ -'use strict' -module.exports = validate - -function isArguments (thingy) { - return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee') -} - -const types = { - '*': {label: 'any', check: () => true}, - A: {label: 'array', check: _ => Array.isArray(_) || isArguments(_)}, - S: {label: 'string', check: _ => typeof _ === 'string'}, - N: {label: 'number', check: _ => typeof _ === 'number'}, - F: {label: 'function', check: _ => typeof _ === 'function'}, - O: {label: 'object', check: _ => typeof _ === 'object' && _ != null && !types.A.check(_) && !types.E.check(_)}, - B: {label: 'boolean', check: _ => typeof _ === 'boolean'}, - E: {label: 'error', check: _ => _ instanceof Error}, - Z: {label: 'null', check: _ => _ == null} -} - -function addSchema (schema, arity) { - const group = arity[schema.length] = arity[schema.length] || [] - if (group.indexOf(schema) === -1) group.push(schema) -} - -function validate (rawSchemas, args) { - if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length) - if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas') - if (!args) throw missingRequiredArg(1, 'args') - if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas) - if (!types.A.check(args)) throw invalidType(1, ['array'], args) - const schemas = rawSchemas.split('|') - const arity = {} - - schemas.forEach(schema => { - for (let ii = 0; ii < schema.length; ++ii) { - const type = schema[ii] - if (!types[type]) throw unknownType(ii, type) - } - if (/E.*E/.test(schema)) throw moreThanOneError(schema) - addSchema(schema, arity) - if (/E/.test(schema)) { - addSchema(schema.replace(/E.*$/, 'E'), arity) - addSchema(schema.replace(/E/, 'Z'), arity) - if (schema.length === 1) addSchema('', arity) - } - }) - let matching = arity[args.length] - if (!matching) { - throw wrongNumberOfArgs(Object.keys(arity), args.length) - } - for (let ii = 0; ii < args.length; ++ii) { - let newMatching = matching.filter(schema => { - const type = schema[ii] - const typeCheck = types[type].check - return typeCheck(args[ii]) - }) - if (!newMatching.length) { - const labels = matching.map(_ => types[_[ii]].label).filter(_ => _ != null) - throw invalidType(ii, labels, args[ii]) - } - matching = newMatching - } -} - -function missingRequiredArg (num) { - return newException('EMISSINGARG', 'Missing required argument #' + (num + 1)) -} - -function unknownType (num, type) { - return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1)) -} - -function invalidType (num, expectedTypes, value) { - let valueType - Object.keys(types).forEach(typeCode => { - if (types[typeCode].check(value)) valueType = types[typeCode].label - }) - return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' + - englishList(expectedTypes) + ' but got ' + valueType) -} - -function englishList (list) { - return list.join(', ').replace(/, ([^,]+)$/, ' or $1') -} - -function wrongNumberOfArgs (expected, got) { - const english = englishList(expected) - const args = expected.every(ex => ex.length === 1) - ? 'argument' - : 'arguments' - return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got) -} - -function moreThanOneError (schema) { - return newException('ETOOMANYERRORTYPES', - 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"') -} - -function newException (code, msg) { - const err = new Error(msg) - err.code = code - /* istanbul ignore else */ - if (Error.captureStackTrace) Error.captureStackTrace(err, validate) - return err -} diff --git a/deps/npm/node_modules/libnpmaccess/node_modules/aproba/package.json b/deps/npm/node_modules/libnpmaccess/node_modules/aproba/package.json deleted file mode 100644 index c184114b068494..00000000000000 --- a/deps/npm/node_modules/libnpmaccess/node_modules/aproba/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_args": [ - [ - "aproba@2.0.0", - "/Users/zkat/Documents/code/work/npm" - ] - ], - "_from": "aproba@2.0.0", - "_id": "aproba@2.0.0", - "_inBundle": false, - "_integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", - "_location": "/libnpmaccess/aproba", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "aproba@2.0.0", - "name": "aproba", - "escapedName": "aproba", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/libnpmaccess" - ], - "_resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "/Users/zkat/Documents/code/work/npm", - "author": { - "name": "Rebecca Turner", - "email": "me@re-becca.org" - }, - "bugs": { - "url": "https://github.com/iarna/aproba/issues" - }, - "dependencies": {}, - "description": "A ridiculously light-weight argument validator (now browser friendly)", - "devDependencies": { - "standard": "^11.0.1", - "tap": "^12.0.1" - }, - "directories": { - "test": "test" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/iarna/aproba", - "keywords": [ - "argument", - "validate" - ], - "license": "ISC", - "main": "index.js", - "name": "aproba", - "repository": { - "type": "git", - "url": "git+https://github.com/iarna/aproba.git" - }, - "scripts": { - "pretest": "standard", - "test": "tap --100 -J test/*.js" - }, - "version": "2.0.0" -} diff --git a/deps/npm/node_modules/libnpmaccess/package.json b/deps/npm/node_modules/libnpmaccess/package.json index c60e95b8d975fe..943b0aeb46a24b 100644 --- a/deps/npm/node_modules/libnpmaccess/package.json +++ b/deps/npm/node_modules/libnpmaccess/package.json @@ -1,27 +1,28 @@ { - "_from": "libnpmaccess@^3.0.1", - "_id": "libnpmaccess@3.0.1", + "_from": "libnpmaccess@3.0.2", + "_id": "libnpmaccess@3.0.2", "_inBundle": false, - "_integrity": "sha512-RlZ7PNarCBt+XbnP7R6PoVgOq9t+kou5rvhaInoNibhPO7eMlRfS0B8yjatgn2yaHIwWNyoJDolC/6Lc5L/IQA==", + "_integrity": "sha512-01512AK7MqByrI2mfC7h5j8N9V4I7MHJuk9buo8Gv+5QgThpOgpjB7sQBDDkeZqRteFb1QM/6YNdHfG7cDvfAQ==", "_location": "/libnpmaccess", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "libnpmaccess@^3.0.1", + "raw": "libnpmaccess@3.0.2", "name": "libnpmaccess", "escapedName": "libnpmaccess", - "rawSpec": "^3.0.1", + "rawSpec": "3.0.2", "saveSpec": null, - "fetchSpec": "^3.0.1" + "fetchSpec": "3.0.2" }, "_requiredBy": [ - "/libnpm" + "#USER", + "/" ], - "_resolved": "https://registry.npmjs.org/libnpmaccess/-/libnpmaccess-3.0.1.tgz", - "_shasum": "5b3a9de621f293d425191aa2e779102f84167fa8", - "_spec": "libnpmaccess@^3.0.1", - "_where": "/Users/zkat/Documents/code/work/npm/node_modules/libnpm", + "_resolved": "https://registry.npmjs.org/libnpmaccess/-/libnpmaccess-3.0.2.tgz", + "_shasum": "8b2d72345ba3bef90d3b4f694edd5c0417f58923", + "_spec": "libnpmaccess@3.0.2", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Kat Marchán", "email": "kzm@zkat.tech" @@ -34,7 +35,7 @@ "aproba": "^2.0.0", "get-stream": "^4.0.0", "npm-package-arg": "^6.1.0", - "npm-registry-fetch": "^3.8.0" + "npm-registry-fetch": "^4.0.0" }, "deprecated": false, "description": "programmatic library for `npm access` commands", @@ -62,5 +63,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "3.0.1" + "version": "3.0.2" } diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/index.d.ts b/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/index.d.ts new file mode 100644 index 00000000000000..02988aaf89f999 --- /dev/null +++ b/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/index.d.ts @@ -0,0 +1,29 @@ +export interface Limit { + /** + * @param fn - Promise-returning/async function. + * @param arguments - Any arguments to pass through to `fn`. Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a lot of functions. + * @returns The promise returned by calling `fn(...arguments)`. + */ + ( + fn: (...arguments: Arguments) => PromiseLike | ReturnType, + ...arguments: Arguments + ): Promise; + + /** + * The number of promises that are currently running. + */ + readonly activeCount: number; + + /** + * The number of promises that are waiting to run (i.e. their internal `fn` was not called yet). + */ + readonly pendingCount: number; +} + +/** + * Run multiple promise-returning & async functions with limited concurrency. + * + * @param concurrency - Concurrency limit. Minimum: `1`. + * @returns A `limit` function. + */ +export default function pLimit(concurrency: number): Limit; diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/index.js b/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/index.js index 86decabbc06824..d22fbe8a49d0ac 100644 --- a/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/index.js +++ b/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/index.js @@ -1,7 +1,7 @@ 'use strict'; const pTry = require('p-try'); -module.exports = concurrency => { +const pLimit = concurrency => { if (concurrency < 1) { throw new TypeError('Expected `concurrency` to be a number from 1 and up'); } @@ -47,3 +47,6 @@ module.exports = concurrency => { return generator; }; + +module.exports = pLimit; +module.exports.default = pLimit; diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/package.json b/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/package.json index 233b3f13d75e15..9c9c7d9ffc077e 100644 --- a/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/package.json +++ b/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/package.json @@ -1,8 +1,8 @@ { "_from": "p-limit@^2.0.0", - "_id": "p-limit@2.1.0", + "_id": "p-limit@2.2.0", "_inBundle": false, - "_integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==", + "_integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", "_location": "/libnpmconfig/p-limit", "_phantomChildren": {}, "_requested": { @@ -18,10 +18,10 @@ "_requiredBy": [ "/libnpmconfig/p-locate" ], - "_resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz", - "_shasum": "1d5a0d20fb12707c758a655f6bbc4386b5930d68", + "_resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", + "_shasum": "417c9941e6027a9abcba5092dd2904e255b5fbc2", "_spec": "p-limit@^2.0.0", - "_where": "/Users/zkat/Documents/code/work/npm/node_modules/libnpmconfig/node_modules/p-locate", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/libnpmconfig/node_modules/p-locate", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -37,18 +37,20 @@ "deprecated": false, "description": "Run multiple promise-returning & async functions with limited concurrency", "devDependencies": { - "ava": "^1.0.1", + "ava": "^1.2.1", "delay": "^4.1.0", "in-range": "^1.0.0", "random-int": "^1.0.0", "time-span": "^2.0.0", - "xo": "^0.23.0" + "tsd-check": "^0.3.0", + "xo": "^0.24.0" }, "engines": { "node": ">=6" }, "files": [ - "index.js" + "index.js", + "index.d.ts" ], "homepage": "https://github.com/sindresorhus/p-limit#readme", "keywords": [ @@ -75,7 +77,7 @@ "url": "git+https://github.com/sindresorhus/p-limit.git" }, "scripts": { - "test": "xo && ava" + "test": "xo && ava && tsd-check" }, - "version": "2.1.0" + "version": "2.2.0" } diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/readme.md b/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/readme.md index 92a6dbf7741d26..b87f3e0c9c3153 100644 --- a/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/readme.md +++ b/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/readme.md @@ -54,7 +54,7 @@ Type: `Function` Promise-returning/async function. -#### ...args +#### args Any arguments to pass through to `fn`. diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/p-try/index.d.ts b/deps/npm/node_modules/libnpmconfig/node_modules/p-try/index.d.ts new file mode 100644 index 00000000000000..2a7319ec2a5568 --- /dev/null +++ b/deps/npm/node_modules/libnpmconfig/node_modules/p-try/index.d.ts @@ -0,0 +1,39 @@ +declare const pTry: { + /** + Start a promise chain. + + @param fn - The function to run to start the promise chain. + @param arguments - Arguments to pass to `fn`. + @returns The value of calling `fn(...arguments)`. If the function throws an error, the returned `Promise` will be rejected with that error. + + @example + ``` + import pTry = require('p-try'); + + (async () => { + try { + const value = await pTry(() => { + return synchronousFunctionThatMightThrow(); + }); + console.log(value); + } catch (error) { + console.error(error); + } + })(); + ``` + */ + ( + fn: (...arguments: ArgumentsType) => PromiseLike | ValueType, + ...arguments: ArgumentsType + ): Promise; + + // TODO: remove this in the next major version, refactor the whole definition to: + // declare function pTry( + // fn: (...arguments: ArgumentsType) => PromiseLike | ValueType, + // ...arguments: ArgumentsType + // ): Promise; + // export = pTry; + default: typeof pTry; +}; + +export = pTry; diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/p-try/index.js b/deps/npm/node_modules/libnpmconfig/node_modules/p-try/index.js index 2d26268d479380..db858da29252b8 100644 --- a/deps/npm/node_modules/libnpmconfig/node_modules/p-try/index.js +++ b/deps/npm/node_modules/libnpmconfig/node_modules/p-try/index.js @@ -1,5 +1,9 @@ 'use strict'; -module.exports = (callback, ...args) => new Promise(resolve => { - resolve(callback(...args)); +const pTry = (fn, ...arguments_) => new Promise(resolve => { + resolve(fn(...arguments_)); }); + +module.exports = pTry; +// TODO: remove this in the next major version +module.exports.default = pTry; diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/p-try/package.json b/deps/npm/node_modules/libnpmconfig/node_modules/p-try/package.json index d8aef830b594e2..af14d60c3680e7 100644 --- a/deps/npm/node_modules/libnpmconfig/node_modules/p-try/package.json +++ b/deps/npm/node_modules/libnpmconfig/node_modules/p-try/package.json @@ -1,8 +1,8 @@ { "_from": "p-try@^2.0.0", - "_id": "p-try@2.0.0", + "_id": "p-try@2.2.0", "_inBundle": false, - "_integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", + "_integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "_location": "/libnpmconfig/p-try", "_phantomChildren": {}, "_requested": { @@ -18,10 +18,10 @@ "_requiredBy": [ "/libnpmconfig/p-limit" ], - "_resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", - "_shasum": "85080bb87c64688fa47996fe8f7dfbe8211760b1", + "_resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "_shasum": "cb2868540e313d61de58fafbe35ce9004d5540e6", "_spec": "p-try@^2.0.0", - "_where": "/Users/zkat/Documents/code/work/npm/node_modules/libnpmconfig/node_modules/p-limit", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/libnpmconfig/node_modules/p-limit", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -34,14 +34,16 @@ "deprecated": false, "description": "`Start a promise chain", "devDependencies": { - "ava": "*", - "xo": "*" + "ava": "^1.4.1", + "tsd": "^0.7.1", + "xo": "^0.24.0" }, "engines": { "node": ">=6" }, "files": [ - "index.js" + "index.js", + "index.d.ts" ], "homepage": "https://github.com/sindresorhus/p-try#readme", "keywords": [ @@ -66,7 +68,7 @@ "url": "git+https://github.com/sindresorhus/p-try.git" }, "scripts": { - "test": "xo && ava" + "test": "xo && ava && tsd" }, - "version": "2.0.0" + "version": "2.2.0" } diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/p-try/readme.md b/deps/npm/node_modules/libnpmconfig/node_modules/p-try/readme.md index 58acb759aa5a41..4d7bd64dfcb8ba 100644 --- a/deps/npm/node_modules/libnpmconfig/node_modules/p-try/readme.md +++ b/deps/npm/node_modules/libnpmconfig/node_modules/p-try/readme.md @@ -17,24 +17,35 @@ $ npm install p-try ```js const pTry = require('p-try'); -pTry(() => { - return synchronousFunctionThatMightThrow(); -}).then(value => { - console.log(value); -}).catch(error => { - console.error(error); -}); +(async () => { + try { + const value = await pTry(() => { + return synchronousFunctionThatMightThrow(); + }); + console.log(value); + } catch (error) { + console.error(error); + } +})(); ``` ## API -### pTry(fn, ...args) +### pTry(fn, ...arguments) -Returns a `Promise` resolved with the value of calling `fn(...args)`. If the function throws an error, the returned `Promise` will be rejected with that error. +Returns a `Promise` resolved with the value of calling `fn(...arguments)`. If the function throws an error, the returned `Promise` will be rejected with that error. Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a *lot* of functions. +#### fn + +The function to run to start the promise chain. + +#### arguments + +Arguments to pass to `fn`. + ## Related diff --git a/deps/npm/node_modules/libnpmhook/CHANGELOG.md b/deps/npm/node_modules/libnpmhook/CHANGELOG.md index 251d1f996dbba0..4121122e0b7355 100644 --- a/deps/npm/node_modules/libnpmhook/CHANGELOG.md +++ b/deps/npm/node_modules/libnpmhook/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [5.0.3](https://github.com/npm/libnpmhook/compare/v5.0.2...v5.0.3) (2019-07-16) + + + ## [5.0.2](https://github.com/npm/libnpmhook/compare/v5.0.1...v5.0.2) (2018-08-24) diff --git a/deps/npm/node_modules/libnpmhook/package.json b/deps/npm/node_modules/libnpmhook/package.json index ebcc752a3c350f..20f5e288687889 100644 --- a/deps/npm/node_modules/libnpmhook/package.json +++ b/deps/npm/node_modules/libnpmhook/package.json @@ -1,28 +1,28 @@ { - "_from": "libnpmhook@5.0.2", - "_id": "libnpmhook@5.0.2", + "_from": "libnpmhook@5.0.3", + "_id": "libnpmhook@5.0.3", "_inBundle": false, - "_integrity": "sha512-vLenmdFWhRfnnZiNFPNMog6CK7Ujofy2TWiM2CrpZUjBRIhHkJeDaAbJdYCT6W4lcHtyrJR8yXW8KFyq6UAp1g==", + "_integrity": "sha512-UdNLMuefVZra/wbnBXECZPefHMGsVDTq5zaM/LgKNE9Keyl5YXQTnGAzEo+nFOpdRqTWI9LYi4ApqF9uVCCtuA==", "_location": "/libnpmhook", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "libnpmhook@5.0.2", + "raw": "libnpmhook@5.0.3", "name": "libnpmhook", "escapedName": "libnpmhook", - "rawSpec": "5.0.2", + "rawSpec": "5.0.3", "saveSpec": null, - "fetchSpec": "5.0.2" + "fetchSpec": "5.0.3" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/libnpmhook/-/libnpmhook-5.0.2.tgz", - "_shasum": "d12817b0fb893f36f1d5be20017f2aea25825d94", - "_spec": "libnpmhook@5.0.2", - "_where": "/Users/aeschright/code/cli", + "_resolved": "https://registry.npmjs.org/libnpmhook/-/libnpmhook-5.0.3.tgz", + "_shasum": "4020c0f5edbf08ebe395325caa5ea01885b928f7", + "_spec": "libnpmhook@5.0.3", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Kat Marchán", "email": "kzm@sykosomatic.org" @@ -35,7 +35,7 @@ "aproba": "^2.0.0", "figgy-pudding": "^3.4.1", "get-stream": "^4.0.0", - "npm-registry-fetch": "^3.8.0" + "npm-registry-fetch": "^4.0.0" }, "deprecated": false, "description": "programmatic API for managing npm registry hooks", @@ -74,5 +74,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "5.0.2" + "version": "5.0.3" } diff --git a/deps/npm/node_modules/libnpmorg/.travis.yml b/deps/npm/node_modules/libnpmorg/.travis.yml new file mode 100644 index 00000000000000..db5ea8b0186403 --- /dev/null +++ b/deps/npm/node_modules/libnpmorg/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +sudo: false +node_js: + - "10" + - "9" + - "8" + - "6" diff --git a/deps/npm/node_modules/libnpmorg/CHANGELOG.md b/deps/npm/node_modules/libnpmorg/CHANGELOG.md index 03392b64cd91cb..3d70c79c5614b6 100644 --- a/deps/npm/node_modules/libnpmorg/CHANGELOG.md +++ b/deps/npm/node_modules/libnpmorg/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [1.0.1](https://github.com/npm/libnpmorg/compare/v1.0.0...v1.0.1) (2019-07-16) + + +### Bug Fixes + +* **standard:** standard --fix ([5118358](https://github.com/npm/libnpmorg/commit/5118358)) + + + # 1.0.0 (2018-08-23) diff --git a/deps/npm/node_modules/libnpmorg/appveyor.yml b/deps/npm/node_modules/libnpmorg/appveyor.yml new file mode 100644 index 00000000000000..9cc64c58e02f96 --- /dev/null +++ b/deps/npm/node_modules/libnpmorg/appveyor.yml @@ -0,0 +1,22 @@ +environment: + matrix: + - nodejs_version: "10" + - nodejs_version: "9" + - nodejs_version: "8" + - nodejs_version: "6" + +platform: + - x64 + +install: + - ps: Install-Product node $env:nodejs_version $env:platform + - npm config set spin false + - npm install + +test_script: + - npm test + +matrix: + fast_finish: true + +build: off diff --git a/deps/npm/node_modules/libnpmorg/index.js b/deps/npm/node_modules/libnpmorg/index.js index bff806aa583cfa..cd3e51e6ad1722 100644 --- a/deps/npm/node_modules/libnpmorg/index.js +++ b/deps/npm/node_modules/libnpmorg/index.js @@ -7,7 +7,7 @@ const getStream = require('get-stream') const validate = require('aproba') const OrgConfig = figgyPudding({ - Promise: {default: () => Promise} + Promise: { default: () => Promise } }) // From https://github.com/npm/registry/blob/master/docs/orgs/memberships.md @@ -26,7 +26,7 @@ cmd.set = (org, user, role, opts) => { org = org.replace(/^@?/, '') fetch.json(`/-/org/${eu(org)}/user`, opts.concat({ method: 'PUT', - body: {user, role} + body: { user, role } })).then(resolve, reject) }).then(ret => Object.assign(new MembershipDetail(), ret)) } @@ -39,7 +39,7 @@ cmd.rm = (org, user, opts) => { org = org.replace(/^@?/, '') fetch(`/-/org/${eu(org)}/user`, opts.concat({ method: 'DELETE', - body: {user}, + body: { user }, ignoreBody: true })).then(resolve, reject) }).then(() => null) diff --git a/deps/npm/node_modules/libnpmorg/node_modules/aproba/CHANGELOG.md b/deps/npm/node_modules/libnpmorg/node_modules/aproba/CHANGELOG.md deleted file mode 100644 index bab30ecb7e625d..00000000000000 --- a/deps/npm/node_modules/libnpmorg/node_modules/aproba/CHANGELOG.md +++ /dev/null @@ -1,4 +0,0 @@ -2.0.0 - * Drop support for 0.10 and 0.12. They haven't been in travis but still, - since we _know_ we'll break with them now it's only polite to do a - major bump. diff --git a/deps/npm/node_modules/libnpmorg/node_modules/aproba/LICENSE b/deps/npm/node_modules/libnpmorg/node_modules/aproba/LICENSE deleted file mode 100644 index 2a4982dc40cb69..00000000000000 --- a/deps/npm/node_modules/libnpmorg/node_modules/aproba/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2015, Rebecca Turner - -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/libnpmorg/node_modules/aproba/README.md b/deps/npm/node_modules/libnpmorg/node_modules/aproba/README.md deleted file mode 100644 index e94799201ce046..00000000000000 --- a/deps/npm/node_modules/libnpmorg/node_modules/aproba/README.md +++ /dev/null @@ -1,93 +0,0 @@ -aproba -====== - -A ridiculously light-weight function argument validator - -``` -var validate = require("aproba") - -function myfunc(a, b, c) { - // `a` must be a string, `b` a number, `c` a function - validate('SNF', arguments) // [a,b,c] is also valid -} - -myfunc('test', 23, function () {}) // ok -myfunc(123, 23, function () {}) // type error -myfunc('test', 23) // missing arg error -myfunc('test', 23, function () {}, true) // too many args error - -``` - -Valid types are: - -| type | description -| :--: | :---------- -| * | matches any type -| A | `Array.isArray` OR an `arguments` object -| S | typeof == string -| N | typeof == number -| F | typeof == function -| O | typeof == object and not type A and not type E -| B | typeof == boolean -| E | `instanceof Error` OR `null` **(special: see below)** -| Z | == `null` - -Validation failures throw one of three exception types, distinguished by a -`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`. - -If you pass in an invalid type then it will throw with a code of -`EUNKNOWNTYPE`. - -If an **error** argument is found and is not null then the remaining -arguments are optional. That is, if you say `ESO` then that's like using a -non-magical `E` in: `E|ESO|ZSO`. - -### But I have optional arguments?! - -You can provide more than one signature by separating them with pipes `|`. -If any signature matches the arguments then they'll be considered valid. - -So for example, say you wanted to write a signature for -`fs.createWriteStream`. The docs for it describe it thusly: - -``` -fs.createWriteStream(path[, options]) -``` - -This would be a signature of `SO|S`. That is, a string and and object, or -just a string. - -Now, if you read the full `fs` docs, you'll see that actually path can ALSO -be a buffer. And options can be a string, that is: -``` -path | -options | -``` - -To reproduce this you have to fully enumerate all of the possible -combinations and that implies a signature of `SO|SS|OO|OS|S|O`. The -awkwardness is a feature: It reminds you of the complexity you're adding to -your API when you do this sort of thing. - - -### Browser support - -This has no dependencies and should work in browsers, though you'll have -noisier stack traces. - -### Why this exists - -I wanted a very simple argument validator. It needed to do two things: - -1. Be more concise and easier to use than assertions - -2. Not encourage an infinite bikeshed of DSLs - -This is why types are specified by a single character and there's no such -thing as an optional argument. - -This is not intended to validate user data. This is specifically about -asserting the interface of your functions. - -If you need greater validation, I encourage you to write them by hand or -look elsewhere. diff --git a/deps/npm/node_modules/libnpmorg/node_modules/aproba/index.js b/deps/npm/node_modules/libnpmorg/node_modules/aproba/index.js deleted file mode 100644 index fd947481ba5575..00000000000000 --- a/deps/npm/node_modules/libnpmorg/node_modules/aproba/index.js +++ /dev/null @@ -1,105 +0,0 @@ -'use strict' -module.exports = validate - -function isArguments (thingy) { - return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee') -} - -const types = { - '*': {label: 'any', check: () => true}, - A: {label: 'array', check: _ => Array.isArray(_) || isArguments(_)}, - S: {label: 'string', check: _ => typeof _ === 'string'}, - N: {label: 'number', check: _ => typeof _ === 'number'}, - F: {label: 'function', check: _ => typeof _ === 'function'}, - O: {label: 'object', check: _ => typeof _ === 'object' && _ != null && !types.A.check(_) && !types.E.check(_)}, - B: {label: 'boolean', check: _ => typeof _ === 'boolean'}, - E: {label: 'error', check: _ => _ instanceof Error}, - Z: {label: 'null', check: _ => _ == null} -} - -function addSchema (schema, arity) { - const group = arity[schema.length] = arity[schema.length] || [] - if (group.indexOf(schema) === -1) group.push(schema) -} - -function validate (rawSchemas, args) { - if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length) - if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas') - if (!args) throw missingRequiredArg(1, 'args') - if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas) - if (!types.A.check(args)) throw invalidType(1, ['array'], args) - const schemas = rawSchemas.split('|') - const arity = {} - - schemas.forEach(schema => { - for (let ii = 0; ii < schema.length; ++ii) { - const type = schema[ii] - if (!types[type]) throw unknownType(ii, type) - } - if (/E.*E/.test(schema)) throw moreThanOneError(schema) - addSchema(schema, arity) - if (/E/.test(schema)) { - addSchema(schema.replace(/E.*$/, 'E'), arity) - addSchema(schema.replace(/E/, 'Z'), arity) - if (schema.length === 1) addSchema('', arity) - } - }) - let matching = arity[args.length] - if (!matching) { - throw wrongNumberOfArgs(Object.keys(arity), args.length) - } - for (let ii = 0; ii < args.length; ++ii) { - let newMatching = matching.filter(schema => { - const type = schema[ii] - const typeCheck = types[type].check - return typeCheck(args[ii]) - }) - if (!newMatching.length) { - const labels = matching.map(_ => types[_[ii]].label).filter(_ => _ != null) - throw invalidType(ii, labels, args[ii]) - } - matching = newMatching - } -} - -function missingRequiredArg (num) { - return newException('EMISSINGARG', 'Missing required argument #' + (num + 1)) -} - -function unknownType (num, type) { - return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1)) -} - -function invalidType (num, expectedTypes, value) { - let valueType - Object.keys(types).forEach(typeCode => { - if (types[typeCode].check(value)) valueType = types[typeCode].label - }) - return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' + - englishList(expectedTypes) + ' but got ' + valueType) -} - -function englishList (list) { - return list.join(', ').replace(/, ([^,]+)$/, ' or $1') -} - -function wrongNumberOfArgs (expected, got) { - const english = englishList(expected) - const args = expected.every(ex => ex.length === 1) - ? 'argument' - : 'arguments' - return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got) -} - -function moreThanOneError (schema) { - return newException('ETOOMANYERRORTYPES', - 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"') -} - -function newException (code, msg) { - const err = new Error(msg) - err.code = code - /* istanbul ignore else */ - if (Error.captureStackTrace) Error.captureStackTrace(err, validate) - return err -} diff --git a/deps/npm/node_modules/libnpmorg/node_modules/aproba/package.json b/deps/npm/node_modules/libnpmorg/node_modules/aproba/package.json deleted file mode 100644 index 3268a9ec7f7e16..00000000000000 --- a/deps/npm/node_modules/libnpmorg/node_modules/aproba/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_args": [ - [ - "aproba@2.0.0", - "/Users/zkat/Documents/code/work/npm" - ] - ], - "_from": "aproba@2.0.0", - "_id": "aproba@2.0.0", - "_inBundle": false, - "_integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", - "_location": "/libnpmorg/aproba", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "aproba@2.0.0", - "name": "aproba", - "escapedName": "aproba", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/libnpmorg" - ], - "_resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "/Users/zkat/Documents/code/work/npm", - "author": { - "name": "Rebecca Turner", - "email": "me@re-becca.org" - }, - "bugs": { - "url": "https://github.com/iarna/aproba/issues" - }, - "dependencies": {}, - "description": "A ridiculously light-weight argument validator (now browser friendly)", - "devDependencies": { - "standard": "^11.0.1", - "tap": "^12.0.1" - }, - "directories": { - "test": "test" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/iarna/aproba", - "keywords": [ - "argument", - "validate" - ], - "license": "ISC", - "main": "index.js", - "name": "aproba", - "repository": { - "type": "git", - "url": "git+https://github.com/iarna/aproba.git" - }, - "scripts": { - "pretest": "standard", - "test": "tap --100 -J test/*.js" - }, - "version": "2.0.0" -} diff --git a/deps/npm/node_modules/libnpmorg/package.json b/deps/npm/node_modules/libnpmorg/package.json index 3f1941298e192e..e93fc52a05d57c 100644 --- a/deps/npm/node_modules/libnpmorg/package.json +++ b/deps/npm/node_modules/libnpmorg/package.json @@ -1,32 +1,28 @@ { - "_args": [ - [ - "libnpmorg@1.0.0", - "/Users/zkat/Documents/code/work/npm" - ] - ], - "_from": "libnpmorg@1.0.0", - "_id": "libnpmorg@1.0.0", + "_from": "libnpmorg@1.0.1", + "_id": "libnpmorg@1.0.1", "_inBundle": false, - "_integrity": "sha512-o+4eVJBoDGMgRwh2lJY0a8pRV2c/tQM/SxlqXezjcAg26Qe9jigYVs+Xk0vvlYDWCDhP0g74J8UwWeAgsB7gGw==", + "_integrity": "sha512-0sRUXLh+PLBgZmARvthhYXQAWn0fOsa6T5l3JSe2n9vKG/lCVK4nuG7pDsa7uMq+uTt2epdPK+a2g6btcY11Ww==", "_location": "/libnpmorg", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "libnpmorg@1.0.0", + "raw": "libnpmorg@1.0.1", "name": "libnpmorg", "escapedName": "libnpmorg", - "rawSpec": "1.0.0", + "rawSpec": "1.0.1", "saveSpec": null, - "fetchSpec": "1.0.0" + "fetchSpec": "1.0.1" }, "_requiredBy": [ - "/libnpm" + "#USER", + "/" ], - "_resolved": "https://registry.npmjs.org/libnpmorg/-/libnpmorg-1.0.0.tgz", - "_spec": "1.0.0", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/libnpmorg/-/libnpmorg-1.0.1.tgz", + "_shasum": "5d2503f6ceb57f33dbdcc718e6698fea6d5ad087", + "_spec": "libnpmorg@1.0.1", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Kat Marchán", "email": "kzm@zkat.tech" @@ -34,16 +30,18 @@ "bugs": { "url": "https://github.com/npm/libnpmorg/issues" }, + "bundleDependencies": false, "dependencies": { "aproba": "^2.0.0", "figgy-pudding": "^3.4.1", "get-stream": "^4.0.0", - "npm-registry-fetch": "^3.8.0" + "npm-registry-fetch": "^4.0.0" }, + "deprecated": false, "description": "Programmatic api for `npm org` commands", "devDependencies": { "nock": "^9.6.1", - "standard": "*", + "standard": "^12.0.0", "standard-version": "*", "tap": "*", "weallbehave": "*", @@ -73,5 +71,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "1.0.0" + "version": "1.0.1" } diff --git a/deps/npm/node_modules/libnpmorg/test/index.js b/deps/npm/node_modules/libnpmorg/test/index.js index f5e163a06a7894..e6ec33ab8a6c49 100644 --- a/deps/npm/node_modules/libnpmorg/test/index.js +++ b/deps/npm/node_modules/libnpmorg/test/index.js @@ -7,7 +7,7 @@ const tnock = require('./util/tnock.js') const org = require('../index.js') -const OPTS = figgyPudding({registry: {}})({ +const OPTS = figgyPudding({ registry: {} })({ registry: 'https://mock.reg/' }) diff --git a/deps/npm/node_modules/libnpmpublish/CHANGELOG.md b/deps/npm/node_modules/libnpmpublish/CHANGELOG.md index 529fa805a09271..974b3fd308a6b4 100644 --- a/deps/npm/node_modules/libnpmpublish/CHANGELOG.md +++ b/deps/npm/node_modules/libnpmpublish/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [1.1.2](https://github.com/npm/libnpmpublish/compare/v1.1.1...v1.1.2) (2019-07-16) + + + ## [1.1.1](https://github.com/npm/libnpmpublish/compare/v1.1.0...v1.1.1) (2019-01-22) diff --git a/deps/npm/node_modules/libnpmpublish/package.json b/deps/npm/node_modules/libnpmpublish/package.json index 4df1f0011dd13b..58eda1a5089281 100644 --- a/deps/npm/node_modules/libnpmpublish/package.json +++ b/deps/npm/node_modules/libnpmpublish/package.json @@ -1,27 +1,27 @@ { - "_from": "libnpmpublish@^1.1.0", - "_id": "libnpmpublish@1.1.1", + "_from": "libnpmpublish@^1.1.2", + "_id": "libnpmpublish@1.1.2", "_inBundle": false, - "_integrity": "sha512-nefbvJd/wY38zdt+b9SHL6171vqBrMtZ56Gsgfd0duEKb/pB8rDT4/ObUQLrHz1tOfht1flt2zM+UGaemzAG5g==", + "_integrity": "sha512-2yIwaXrhTTcF7bkJKIKmaCV9wZOALf/gsTDxVSu/Gu/6wiG3fA8ce8YKstiWKTxSFNC0R7isPUb6tXTVFZHt2g==", "_location": "/libnpmpublish", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "libnpmpublish@^1.1.0", + "raw": "libnpmpublish@^1.1.2", "name": "libnpmpublish", "escapedName": "libnpmpublish", - "rawSpec": "^1.1.0", + "rawSpec": "^1.1.2", "saveSpec": null, - "fetchSpec": "^1.1.0" + "fetchSpec": "^1.1.2" }, "_requiredBy": [ "/libnpm" ], - "_resolved": "https://registry.npmjs.org/libnpmpublish/-/libnpmpublish-1.1.1.tgz", - "_shasum": "ff0c6bb0b4ad2bda2ad1f5fba6760a4af37125f0", - "_spec": "libnpmpublish@^1.1.0", - "_where": "/Users/zkat/Documents/code/work/npm/node_modules/libnpm", + "_resolved": "https://registry.npmjs.org/libnpmpublish/-/libnpmpublish-1.1.2.tgz", + "_shasum": "4201cfc4a69c44e6f454ec548fa1cd90f10df0a0", + "_spec": "libnpmpublish@^1.1.2", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/libnpm", "author": { "name": "Kat Marchán", "email": "kzm@zkat.tech" @@ -37,7 +37,7 @@ "lodash.clonedeep": "^4.5.0", "normalize-package-data": "^2.4.0", "npm-package-arg": "^6.1.0", - "npm-registry-fetch": "^3.8.0", + "npm-registry-fetch": "^4.0.0", "semver": "^5.5.1", "ssri": "^6.0.1" }, @@ -69,5 +69,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "1.1.1" + "version": "1.1.2" } diff --git a/deps/npm/node_modules/libnpmpublish/test/publish.js b/deps/npm/node_modules/libnpmpublish/test/publish.js index 65b8c82524dd2d..23eef2181f1fb5 100644 --- a/deps/npm/node_modules/libnpmpublish/test/publish.js +++ b/deps/npm/node_modules/libnpmpublish/test/publish.js @@ -917,3 +917,132 @@ test('publishConfig on manifest', t => { }) }) }) + +test('publish with encoded _auth', t => { + const manifest = { + name: 'libnpmpublish', + version: '1.0.0', + description: 'some stuff' + } + return mockTar({ + 'package.json': JSON.stringify(manifest), + 'index.js': 'console.log("hello world")' + }).then(tarData => { + const shasum = crypto.createHash('sha1').update(tarData).digest('hex') + const integrity = ssri.fromData(tarData, { algorithms: ['sha512'] }) + const packument = { + name: 'libnpmpublish', + description: 'some stuff', + readme: '', + _id: 'libnpmpublish', + 'dist-tags': { + latest: '1.0.0' + }, + maintainers: [ + { name: 'myuser', email: 'my@ema.il' } + ], + versions: { + '1.0.0': { + _id: 'libnpmpublish@1.0.0', + _npmUser: { + name: 'myuser', + email: 'my@ema.il' + }, + maintainers: [ + { name: 'myuser', email: 'my@ema.il' } + ], + _nodeVersion: process.versions.node, + name: 'libnpmpublish', + version: '1.0.0', + description: 'some stuff', + dist: { + shasum, + integrity: integrity.toString(), + tarball: `http://mock.reg/libnpmpublish/-/libnpmpublish-1.0.0.tgz` + } + } + }, + _attachments: { + 'libnpmpublish-1.0.0.tgz': { + 'content_type': 'application/octet-stream', + data: tarData.toString('base64'), + length: tarData.length + } + } + } + const srv = tnock(t, REG) + srv.put('/libnpmpublish', body => { + t.deepEqual(body, packument, 'posted packument matches expectations') + return true + }, { + authorization: 'Bearer deadbeef' + }).reply(201, {}) + + return publish(manifest, tarData, OPTS.concat({ + _auth: Buffer.from('myuser:mypassword', 'utf8').toString('base64'), + email: 'my@ema.il' + })).then(ret => { + t.ok(ret, 'publish succeeded using _auth') + }) + }) +}) + +test('publish with 302 redirect', t => { + const manifest = { + name: 'libnpmpublish', + version: '1.0.0', + description: 'some stuff' + } + return mockTar({ + 'package.json': JSON.stringify(manifest), + 'index.js': 'console.log("hello world")' + }).then(tarData => { + const shasum = crypto.createHash('sha1').update(tarData).digest('hex') + const integrity = ssri.fromData(tarData, { algorithms: ['sha512'] }) + const packument = { + name: 'libnpmpublish', + description: 'some stuff', + readme: '', + _id: 'libnpmpublish', + 'dist-tags': { + latest: '1.0.0' + }, + versions: { + '1.0.0': { + _id: 'libnpmpublish@1.0.0', + _nodeVersion: process.versions.node, + name: 'libnpmpublish', + version: '1.0.0', + description: 'some stuff', + dist: { + shasum, + integrity: integrity.toString(), + tarball: `http://mock.reg/libnpmpublish/-/libnpmpublish-1.0.0.tgz` + } + } + }, + _attachments: { + 'libnpmpublish-1.0.0.tgz': { + 'content_type': 'application/octet-stream', + data: tarData.toString('base64'), + length: tarData.length + } + } + } + tnock(t, REG).put('/libnpmpublish').reply(302, '', { + location: 'http://blah.net/libnpmpublish' + }) + tnock(t, 'http://blah.net').put('/libnpmpublish', body => { + t.deepEqual(body, packument, 'posted packument matches expectations') + return true + }, { + authorization: 'Bearer deadbeef' + }).reply(201, {}) + + return publish(manifest, tarData, OPTS.concat({ + token: 'deadbeef' + })).then(ret => { + t.ok(ret, 'publish succeeded') + }) + }) +}) diff --git a/deps/npm/node_modules/libnpmsearch/.travis.yml b/deps/npm/node_modules/libnpmsearch/.travis.yml new file mode 100644 index 00000000000000..db5ea8b0186403 --- /dev/null +++ b/deps/npm/node_modules/libnpmsearch/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +sudo: false +node_js: + - "10" + - "9" + - "8" + - "6" diff --git a/deps/npm/node_modules/libnpmsearch/CHANGELOG.md b/deps/npm/node_modules/libnpmsearch/CHANGELOG.md index 6ca044d3f48b4d..1adf2d0db52ce7 100644 --- a/deps/npm/node_modules/libnpmsearch/CHANGELOG.md +++ b/deps/npm/node_modules/libnpmsearch/CHANGELOG.md @@ -2,6 +2,22 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [2.0.2](https://github.com/npm/libnpmsearch/compare/v2.0.1...v2.0.2) (2019-07-16) + + + + +## [2.0.1](https://github.com/npm/libnpmsearch/compare/v2.0.0...v2.0.1) (2019-06-10) + + +### Bug Fixes + +* **opts:** support `opts.from` properly ([#2](https://github.com/npm/libnpmsearch/issues/2)) ([da6636c](https://github.com/npm/libnpmsearch/commit/da6636c)) +* **standard:** standard --fix ([beca19c](https://github.com/npm/libnpmsearch/commit/beca19c)) + + + # [2.0.0](https://github.com/npm/libnpmsearch/compare/v1.0.0...v2.0.0) (2018-08-28) diff --git a/deps/npm/node_modules/libnpmsearch/README.md b/deps/npm/node_modules/libnpmsearch/README.md index 6617ddb89d1151..a83988cc2867d4 100644 --- a/deps/npm/node_modules/libnpmsearch/README.md +++ b/deps/npm/node_modules/libnpmsearch/README.md @@ -46,7 +46,7 @@ console.log(await search('libnpm')) The following opts are used directly by `libnpmsearch` itself: * `opts.limit` - Number of results to limit the query to. Default: 20 -* `opts.offset` - Offset number for results. Used with `opts.limit` for pagination. Default: 0 +* `opts.from` - Offset number for results. Used with `opts.limit` for pagination. Default: 0 * `opts.detailed` - If true, returns an object with `package`, `score`, and `searchScore` fields, with `package` being what would usually be returned, and the other two containing details about how that package scored. Useful for UIs. Default: false * `opts.sortBy` - Used as a shorthand to set `opts.quality`, `opts.maintenance`, and `opts.popularity` with values that prioritize each one. Should be one of `'optimal'`, `'quality'`, `'maintenance'`, or `'popularity'`. Default: `'optimal'` * `opts.maintenance` - Decimal number between `0` and `1` that defines the weight of `maintenance` metrics when scoring and sorting packages. Default: `0.65` (same as `opts.sortBy: 'optimal'`) diff --git a/deps/npm/node_modules/libnpmsearch/appveyor.yml b/deps/npm/node_modules/libnpmsearch/appveyor.yml new file mode 100644 index 00000000000000..9cc64c58e02f96 --- /dev/null +++ b/deps/npm/node_modules/libnpmsearch/appveyor.yml @@ -0,0 +1,22 @@ +environment: + matrix: + - nodejs_version: "10" + - nodejs_version: "9" + - nodejs_version: "8" + - nodejs_version: "6" + +platform: + - x64 + +install: + - ps: Install-Product node $env:nodejs_version $env:platform + - npm config set spin false + - npm install + +test_script: + - npm test + +matrix: + fast_finish: true + +build: off diff --git a/deps/npm/node_modules/libnpmsearch/index.js b/deps/npm/node_modules/libnpmsearch/index.js index b84cab150bea28..995549aeee03d6 100644 --- a/deps/npm/node_modules/libnpmsearch/index.js +++ b/deps/npm/node_modules/libnpmsearch/index.js @@ -5,12 +5,12 @@ const getStream = require('get-stream') const npmFetch = require('npm-registry-fetch') const SearchOpts = figgyPudding({ - detailed: {default: false}, - limit: {default: 20}, - from: {default: 0}, - quality: {default: 0.65}, - popularity: {default: 0.98}, - maintenance: {default: 0.5}, + detailed: { default: false }, + limit: { default: 20 }, + from: { default: 0 }, + quality: { default: 0.65 }, + popularity: { default: 0.98 }, + maintenance: { default: 0.5 }, sortBy: {} }) @@ -60,6 +60,7 @@ function searchStream (query, opts) { query: { text: Array.isArray(query) ? query.join(' ') : query, size: opts.limit, + from: opts.from, quality: opts.quality, popularity: opts.popularity, maintenance: opts.maintenance diff --git a/deps/npm/node_modules/libnpmsearch/package.json b/deps/npm/node_modules/libnpmsearch/package.json index 50e74c7adbff3e..3ad48cb72f593f 100644 --- a/deps/npm/node_modules/libnpmsearch/package.json +++ b/deps/npm/node_modules/libnpmsearch/package.json @@ -1,32 +1,28 @@ { - "_args": [ - [ - "libnpmsearch@2.0.0", - "/Users/zkat/Documents/code/work/npm" - ] - ], - "_from": "libnpmsearch@2.0.0", - "_id": "libnpmsearch@2.0.0", + "_from": "libnpmsearch@2.0.2", + "_id": "libnpmsearch@2.0.2", "_inBundle": false, - "_integrity": "sha512-vd+JWbTGzOSfiOc+72MU6y7WqmBXn49egCCrIXp27iE/88bX8EpG64ST1blWQI1bSMUr9l1AKPMVsqa2tS5KWA==", + "_integrity": "sha512-VTBbV55Q6fRzTdzziYCr64+f8AopQ1YZ+BdPOv16UegIEaE8C0Kch01wo4s3kRTFV64P121WZJwgmBwrq68zYg==", "_location": "/libnpmsearch", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "libnpmsearch@2.0.0", + "raw": "libnpmsearch@2.0.2", "name": "libnpmsearch", "escapedName": "libnpmsearch", - "rawSpec": "2.0.0", + "rawSpec": "2.0.2", "saveSpec": null, - "fetchSpec": "2.0.0" + "fetchSpec": "2.0.2" }, "_requiredBy": [ - "/libnpm" + "#USER", + "/" ], - "_resolved": "https://registry.npmjs.org/libnpmsearch/-/libnpmsearch-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/libnpmsearch/-/libnpmsearch-2.0.2.tgz", + "_shasum": "9a4f059102d38e3dd44085bdbfe5095f2a5044cf", + "_spec": "libnpmsearch@2.0.2", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Kat Marchán", "email": "kzm@zkat.tech" @@ -34,17 +30,19 @@ "bugs": { "url": "https://github.com/npm/libnpmsearch/issues" }, + "bundleDependencies": false, "dependencies": { "figgy-pudding": "^3.5.1", "get-stream": "^4.0.0", - "npm-registry-fetch": "^3.8.0" + "npm-registry-fetch": "^4.0.0" }, + "deprecated": false, "description": "Programmatic API for searching in npm and compatible registries.", "devDependencies": { "nock": "^9.6.1", - "standard": "*", + "standard": "^12.0.0", "standard-version": "*", - "tap": "*", + "tap": "^12.0.1", "weallbehave": "*", "weallcontribute": "*" }, @@ -70,5 +68,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "2.0.0" + "version": "2.0.2" } diff --git a/deps/npm/node_modules/libnpmsearch/test/index.js b/deps/npm/node_modules/libnpmsearch/test/index.js index f926af6da8559d..bec5c70e46424d 100644 --- a/deps/npm/node_modules/libnpmsearch/test/index.js +++ b/deps/npm/node_modules/libnpmsearch/test/index.js @@ -6,7 +6,7 @@ const qs = require('querystring') const test = require('tap').test const tnock = require('./util/tnock.js') -const OPTS = figgyPudding({registry: {}})({ +const OPTS = figgyPudding({ registry: {} })({ registry: 'https://mock.reg/' }) @@ -17,6 +17,7 @@ test('basic test', t => { const query = qs.stringify({ text: 'oo', size: 20, + from: 0, quality: 0.65, popularity: 0.98, maintenance: 0.5 @@ -42,6 +43,7 @@ test('search.stream', t => { const query = qs.stringify({ text: 'oo', size: 20, + from: 0, quality: 0.65, popularity: 0.98, maintenance: 0.5 @@ -69,6 +71,7 @@ test('accepts a limit option', t => { const query = qs.stringify({ text: 'oo', size: 3, + from: 0, quality: 0.65, popularity: 0.98, maintenance: 0.5 @@ -81,7 +84,29 @@ test('accepts a limit option', t => { { package: { name: 'cool', version: '1.0.0' } } ] }) - return search('oo', OPTS.concat({limit: 3})).then(results => { + return search('oo', OPTS.concat({ limit: 3 })).then(results => { + t.equal(results.length, 4, 'returns more results if endpoint does so') + }) +}) + +test('accepts a from option', t => { + const query = qs.stringify({ + text: 'oo', + size: 20, + from: 1, + quality: 0.65, + popularity: 0.98, + maintenance: 0.5 + }) + tnock(t, REG).get(`/-/v1/search?${query}`).once().reply(200, { + objects: [ + { package: { name: 'cool', version: '1.0.0' } }, + { package: { name: 'cool', version: '1.1.0' } }, + { package: { name: 'cool', version: '1.0.0' } }, + { package: { name: 'cool', version: '1.0.0' } } + ] + }) + return search('oo', OPTS.concat({ from: 1 })).then(results => { t.equal(results.length, 4, 'returns more results if endpoint does so') }) }) @@ -90,6 +115,7 @@ test('accepts quality/mainenance/popularity options', t => { const query = qs.stringify({ text: 'oo', size: 20, + from: 0, quality: 1, popularity: 2, maintenance: 3 @@ -115,6 +141,7 @@ test('sortBy: quality', t => { const query = qs.stringify({ text: 'oo', size: 20, + from: 0, quality: 1, popularity: 0, maintenance: 0 @@ -138,6 +165,7 @@ test('sortBy: popularity', t => { const query = qs.stringify({ text: 'oo', size: 20, + from: 0, quality: 0, popularity: 1, maintenance: 0 @@ -161,6 +189,7 @@ test('sortBy: maintenance', t => { const query = qs.stringify({ text: 'oo', size: 20, + from: 0, quality: 0, popularity: 0, maintenance: 1 @@ -184,6 +213,7 @@ test('sortBy: optimal', t => { const query = qs.stringify({ text: 'oo', size: 20, + from: 0, quality: 0.65, popularity: 0.98, maintenance: 0.5 @@ -207,6 +237,7 @@ test('detailed format', t => { const query = qs.stringify({ text: 'oo', size: 20, + from: 0, quality: 0, popularity: 0, maintenance: 1 @@ -252,6 +283,7 @@ test('space-separates and URI-encodes multiple search params', t => { const query = qs.stringify({ text: 'foo bar:baz quux?=', size: 1, + from: 0, quality: 1, popularity: 2, maintenance: 3 diff --git a/deps/npm/node_modules/libnpmteam/CHANGELOG.md b/deps/npm/node_modules/libnpmteam/CHANGELOG.md index 65a73146edb44e..c5a8630a911648 100644 --- a/deps/npm/node_modules/libnpmteam/CHANGELOG.md +++ b/deps/npm/node_modules/libnpmteam/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [1.0.2](https://github.com/npm/libnpmteam/compare/v1.0.1...v1.0.2) (2019-07-16) + + +### Bug Fixes + +* **standard:** standard --fix ([3dc9144](https://github.com/npm/libnpmteam/commit/3dc9144)) + + + ## [1.0.1](https://github.com/npm/libnpmteam/compare/v1.0.0...v1.0.1) (2018-08-24) diff --git a/deps/npm/node_modules/libnpmteam/index.js b/deps/npm/node_modules/libnpmteam/index.js index c0bd0609aab252..3d9c906791c87e 100644 --- a/deps/npm/node_modules/libnpmteam/index.js +++ b/deps/npm/node_modules/libnpmteam/index.js @@ -8,7 +8,7 @@ const validate = require('aproba') const TeamConfig = figgyPudding({ description: {}, - Promise: {default: () => Promise} + Promise: { default: () => Promise } }) const cmd = module.exports = {} @@ -16,12 +16,12 @@ const cmd = module.exports = {} cmd.create = (entity, opts) => { opts = TeamConfig(opts) return pwrap(opts, () => { - const {scope, team} = splitEntity(entity) + const { scope, team } = splitEntity(entity) validate('SSO', [scope, team, opts]) return npmFetch.json(`/-/org/${eu(scope)}/team`, opts.concat({ method: 'PUT', scope, - body: {name: team, description: opts.description} + body: { name: team, description: opts.description } })) }) } @@ -29,7 +29,7 @@ cmd.create = (entity, opts) => { cmd.destroy = (entity, opts) => { opts = TeamConfig(opts) return pwrap(opts, () => { - const {scope, team} = splitEntity(entity) + const { scope, team } = splitEntity(entity) validate('SSO', [scope, team, opts]) return npmFetch.json(`/-/team/${eu(scope)}/${eu(team)}`, opts.concat({ method: 'DELETE', @@ -41,12 +41,12 @@ cmd.destroy = (entity, opts) => { cmd.add = (user, entity, opts) => { opts = TeamConfig(opts) return pwrap(opts, () => { - const {scope, team} = splitEntity(entity) + const { scope, team } = splitEntity(entity) validate('SSO', [scope, team, opts]) return npmFetch.json(`/-/team/${eu(scope)}/${eu(team)}/user`, opts.concat({ method: 'PUT', scope, - body: {user} + body: { user } })) }) } @@ -54,12 +54,12 @@ cmd.add = (user, entity, opts) => { cmd.rm = (user, entity, opts) => { opts = TeamConfig(opts) return pwrap(opts, () => { - const {scope, team} = splitEntity(entity) + const { scope, team } = splitEntity(entity) validate('SSO', [scope, team, opts]) return npmFetch.json(`/-/team/${eu(scope)}/${eu(team)}/user`, opts.concat({ method: 'DELETE', scope, - body: {user} + body: { user } })) }) } @@ -72,7 +72,7 @@ cmd.lsTeams.stream = (scope, opts) => { opts = TeamConfig(opts) validate('SO', [scope, opts]) return npmFetch.json.stream(`/-/org/${eu(scope)}/team`, '.*', opts.concat({ - query: {format: 'cli'} + query: { format: 'cli' } })) } @@ -82,11 +82,11 @@ cmd.lsUsers = (entity, opts) => { } cmd.lsUsers.stream = (entity, opts) => { opts = TeamConfig(opts) - const {scope, team} = splitEntity(entity) + const { scope, team } = splitEntity(entity) validate('SSO', [scope, team, opts]) const uri = `/-/team/${eu(scope)}/${eu(team)}/user` return npmFetch.json.stream(uri, '.*', opts.concat({ - query: {format: 'cli'} + query: { format: 'cli' } })) } @@ -96,7 +96,7 @@ cmd.edit = () => { function splitEntity (entity = '') { let [, scope, team] = entity.match(/^@?([^:]+):(.*)$/) || [] - return {scope, team} + return { scope, team } } function pwrap (opts, fn) { diff --git a/deps/npm/node_modules/libnpmteam/node_modules/aproba/CHANGELOG.md b/deps/npm/node_modules/libnpmteam/node_modules/aproba/CHANGELOG.md deleted file mode 100644 index bab30ecb7e625d..00000000000000 --- a/deps/npm/node_modules/libnpmteam/node_modules/aproba/CHANGELOG.md +++ /dev/null @@ -1,4 +0,0 @@ -2.0.0 - * Drop support for 0.10 and 0.12. They haven't been in travis but still, - since we _know_ we'll break with them now it's only polite to do a - major bump. diff --git a/deps/npm/node_modules/libnpmteam/node_modules/aproba/README.md b/deps/npm/node_modules/libnpmteam/node_modules/aproba/README.md deleted file mode 100644 index e94799201ce046..00000000000000 --- a/deps/npm/node_modules/libnpmteam/node_modules/aproba/README.md +++ /dev/null @@ -1,93 +0,0 @@ -aproba -====== - -A ridiculously light-weight function argument validator - -``` -var validate = require("aproba") - -function myfunc(a, b, c) { - // `a` must be a string, `b` a number, `c` a function - validate('SNF', arguments) // [a,b,c] is also valid -} - -myfunc('test', 23, function () {}) // ok -myfunc(123, 23, function () {}) // type error -myfunc('test', 23) // missing arg error -myfunc('test', 23, function () {}, true) // too many args error - -``` - -Valid types are: - -| type | description -| :--: | :---------- -| * | matches any type -| A | `Array.isArray` OR an `arguments` object -| S | typeof == string -| N | typeof == number -| F | typeof == function -| O | typeof == object and not type A and not type E -| B | typeof == boolean -| E | `instanceof Error` OR `null` **(special: see below)** -| Z | == `null` - -Validation failures throw one of three exception types, distinguished by a -`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`. - -If you pass in an invalid type then it will throw with a code of -`EUNKNOWNTYPE`. - -If an **error** argument is found and is not null then the remaining -arguments are optional. That is, if you say `ESO` then that's like using a -non-magical `E` in: `E|ESO|ZSO`. - -### But I have optional arguments?! - -You can provide more than one signature by separating them with pipes `|`. -If any signature matches the arguments then they'll be considered valid. - -So for example, say you wanted to write a signature for -`fs.createWriteStream`. The docs for it describe it thusly: - -``` -fs.createWriteStream(path[, options]) -``` - -This would be a signature of `SO|S`. That is, a string and and object, or -just a string. - -Now, if you read the full `fs` docs, you'll see that actually path can ALSO -be a buffer. And options can be a string, that is: -``` -path | -options | -``` - -To reproduce this you have to fully enumerate all of the possible -combinations and that implies a signature of `SO|SS|OO|OS|S|O`. The -awkwardness is a feature: It reminds you of the complexity you're adding to -your API when you do this sort of thing. - - -### Browser support - -This has no dependencies and should work in browsers, though you'll have -noisier stack traces. - -### Why this exists - -I wanted a very simple argument validator. It needed to do two things: - -1. Be more concise and easier to use than assertions - -2. Not encourage an infinite bikeshed of DSLs - -This is why types are specified by a single character and there's no such -thing as an optional argument. - -This is not intended to validate user data. This is specifically about -asserting the interface of your functions. - -If you need greater validation, I encourage you to write them by hand or -look elsewhere. diff --git a/deps/npm/node_modules/libnpmteam/node_modules/aproba/index.js b/deps/npm/node_modules/libnpmteam/node_modules/aproba/index.js deleted file mode 100644 index fd947481ba5575..00000000000000 --- a/deps/npm/node_modules/libnpmteam/node_modules/aproba/index.js +++ /dev/null @@ -1,105 +0,0 @@ -'use strict' -module.exports = validate - -function isArguments (thingy) { - return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee') -} - -const types = { - '*': {label: 'any', check: () => true}, - A: {label: 'array', check: _ => Array.isArray(_) || isArguments(_)}, - S: {label: 'string', check: _ => typeof _ === 'string'}, - N: {label: 'number', check: _ => typeof _ === 'number'}, - F: {label: 'function', check: _ => typeof _ === 'function'}, - O: {label: 'object', check: _ => typeof _ === 'object' && _ != null && !types.A.check(_) && !types.E.check(_)}, - B: {label: 'boolean', check: _ => typeof _ === 'boolean'}, - E: {label: 'error', check: _ => _ instanceof Error}, - Z: {label: 'null', check: _ => _ == null} -} - -function addSchema (schema, arity) { - const group = arity[schema.length] = arity[schema.length] || [] - if (group.indexOf(schema) === -1) group.push(schema) -} - -function validate (rawSchemas, args) { - if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length) - if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas') - if (!args) throw missingRequiredArg(1, 'args') - if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas) - if (!types.A.check(args)) throw invalidType(1, ['array'], args) - const schemas = rawSchemas.split('|') - const arity = {} - - schemas.forEach(schema => { - for (let ii = 0; ii < schema.length; ++ii) { - const type = schema[ii] - if (!types[type]) throw unknownType(ii, type) - } - if (/E.*E/.test(schema)) throw moreThanOneError(schema) - addSchema(schema, arity) - if (/E/.test(schema)) { - addSchema(schema.replace(/E.*$/, 'E'), arity) - addSchema(schema.replace(/E/, 'Z'), arity) - if (schema.length === 1) addSchema('', arity) - } - }) - let matching = arity[args.length] - if (!matching) { - throw wrongNumberOfArgs(Object.keys(arity), args.length) - } - for (let ii = 0; ii < args.length; ++ii) { - let newMatching = matching.filter(schema => { - const type = schema[ii] - const typeCheck = types[type].check - return typeCheck(args[ii]) - }) - if (!newMatching.length) { - const labels = matching.map(_ => types[_[ii]].label).filter(_ => _ != null) - throw invalidType(ii, labels, args[ii]) - } - matching = newMatching - } -} - -function missingRequiredArg (num) { - return newException('EMISSINGARG', 'Missing required argument #' + (num + 1)) -} - -function unknownType (num, type) { - return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1)) -} - -function invalidType (num, expectedTypes, value) { - let valueType - Object.keys(types).forEach(typeCode => { - if (types[typeCode].check(value)) valueType = types[typeCode].label - }) - return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' + - englishList(expectedTypes) + ' but got ' + valueType) -} - -function englishList (list) { - return list.join(', ').replace(/, ([^,]+)$/, ' or $1') -} - -function wrongNumberOfArgs (expected, got) { - const english = englishList(expected) - const args = expected.every(ex => ex.length === 1) - ? 'argument' - : 'arguments' - return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got) -} - -function moreThanOneError (schema) { - return newException('ETOOMANYERRORTYPES', - 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"') -} - -function newException (code, msg) { - const err = new Error(msg) - err.code = code - /* istanbul ignore else */ - if (Error.captureStackTrace) Error.captureStackTrace(err, validate) - return err -} diff --git a/deps/npm/node_modules/libnpmteam/node_modules/aproba/package.json b/deps/npm/node_modules/libnpmteam/node_modules/aproba/package.json deleted file mode 100644 index d941c6159ffe36..00000000000000 --- a/deps/npm/node_modules/libnpmteam/node_modules/aproba/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_args": [ - [ - "aproba@2.0.0", - "/Users/zkat/Documents/code/work/npm" - ] - ], - "_from": "aproba@2.0.0", - "_id": "aproba@2.0.0", - "_inBundle": false, - "_integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", - "_location": "/libnpmteam/aproba", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "aproba@2.0.0", - "name": "aproba", - "escapedName": "aproba", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/libnpmteam" - ], - "_resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "/Users/zkat/Documents/code/work/npm", - "author": { - "name": "Rebecca Turner", - "email": "me@re-becca.org" - }, - "bugs": { - "url": "https://github.com/iarna/aproba/issues" - }, - "dependencies": {}, - "description": "A ridiculously light-weight argument validator (now browser friendly)", - "devDependencies": { - "standard": "^11.0.1", - "tap": "^12.0.1" - }, - "directories": { - "test": "test" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/iarna/aproba", - "keywords": [ - "argument", - "validate" - ], - "license": "ISC", - "main": "index.js", - "name": "aproba", - "repository": { - "type": "git", - "url": "git+https://github.com/iarna/aproba.git" - }, - "scripts": { - "pretest": "standard", - "test": "tap --100 -J test/*.js" - }, - "version": "2.0.0" -} diff --git a/deps/npm/node_modules/libnpmteam/package.json b/deps/npm/node_modules/libnpmteam/package.json index 8b9fcd60ea31cf..47bcedb8dc676c 100644 --- a/deps/npm/node_modules/libnpmteam/package.json +++ b/deps/npm/node_modules/libnpmteam/package.json @@ -1,32 +1,28 @@ { - "_args": [ - [ - "libnpmteam@1.0.1", - "/Users/zkat/Documents/code/work/npm" - ] - ], - "_from": "libnpmteam@1.0.1", - "_id": "libnpmteam@1.0.1", + "_from": "libnpmteam@1.0.2", + "_id": "libnpmteam@1.0.2", "_inBundle": false, - "_integrity": "sha512-gDdrflKFCX7TNwOMX1snWojCoDE5LoRWcfOC0C/fqF7mBq8Uz9zWAX4B2RllYETNO7pBupBaSyBDkTAC15cAMg==", + "_integrity": "sha512-p420vM28Us04NAcg1rzgGW63LMM6rwe+6rtZpfDxCcXxM0zUTLl7nPFEnRF3JfFBF5skF/yuZDUthTsHgde8QA==", "_location": "/libnpmteam", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "libnpmteam@1.0.1", + "raw": "libnpmteam@1.0.2", "name": "libnpmteam", "escapedName": "libnpmteam", - "rawSpec": "1.0.1", + "rawSpec": "1.0.2", "saveSpec": null, - "fetchSpec": "1.0.1" + "fetchSpec": "1.0.2" }, "_requiredBy": [ - "/libnpm" + "#USER", + "/" ], - "_resolved": "https://registry.npmjs.org/libnpmteam/-/libnpmteam-1.0.1.tgz", - "_spec": "1.0.1", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/libnpmteam/-/libnpmteam-1.0.2.tgz", + "_shasum": "8b48bcbb6ce70dd8150c950fcbdbf3feb6eec820", + "_spec": "libnpmteam@1.0.2", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Kat Marchán", "email": "kzm@zkat.tech" @@ -34,16 +30,18 @@ "bugs": { "url": "https://github.com/npm/libnpmteam/issues" }, + "bundleDependencies": false, "dependencies": { "aproba": "^2.0.0", "figgy-pudding": "^3.4.1", "get-stream": "^4.0.0", - "npm-registry-fetch": "^3.8.0" + "npm-registry-fetch": "^4.0.0" }, + "deprecated": false, "description": "npm Team management APIs", "devDependencies": { "nock": "^9.6.1", - "standard": "*", + "standard": "^12.0.0", "standard-version": "*", "tap": "*", "weallbehave": "*", @@ -65,5 +63,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "1.0.1" + "version": "1.0.2" } diff --git a/deps/npm/node_modules/libnpmteam/test/index.js b/deps/npm/node_modules/libnpmteam/test/index.js index 2271c28840dc3b..7bc79d51812235 100644 --- a/deps/npm/node_modules/libnpmteam/test/index.js +++ b/deps/npm/node_modules/libnpmteam/test/index.js @@ -2,7 +2,7 @@ const figgyPudding = require('figgy-pudding') const getStream = require('get-stream') -const {test} = require('tap') +const { test } = require('tap') const tnock = require('./util/tnock.js') const team = require('../index.js') @@ -14,10 +14,10 @@ const OPTS = figgyPudding({})({ test('create', t => { tnock(t, REG).put( - '/-/org/foo/team', {name: 'cli'} - ).reply(201, {name: 'cli'}) + '/-/org/foo/team', { name: 'cli' } + ).reply(201, { name: 'cli' }) return team.create('@foo:cli', OPTS).then(ret => { - t.deepEqual(ret, {name: 'cli'}, 'request succeeded') + t.deepEqual(ret, { name: 'cli' }, 'request succeeded') }) }) @@ -39,11 +39,11 @@ test('create w/ description', t => { tnock(t, REG).put('/-/org/foo/team', { name: 'cli', description: 'just some cool folx' - }).reply(201, {name: 'cli'}) + }).reply(201, { name: 'cli' }) return team.create('@foo:cli', OPTS.concat({ description: 'just some cool folx' })).then(ret => { - t.deepEqual(ret, {name: 'cli'}, 'no desc in return') + t.deepEqual(ret, { name: 'cli' }, 'no desc in return') }) }) @@ -58,7 +58,7 @@ test('destroy', t => { test('add', t => { tnock(t, REG).put( - '/-/team/foo/cli/user', {user: 'zkat'} + '/-/team/foo/cli/user', { user: 'zkat' } ).reply(201, {}) return team.add('zkat', '@foo:cli', OPTS).then(ret => { t.deepEqual(ret, {}, 'request succeeded') @@ -67,7 +67,7 @@ test('add', t => { test('rm', t => { tnock(t, REG).delete( - '/-/team/foo/cli/user', {user: 'zkat'} + '/-/team/foo/cli/user', { user: 'zkat' } ).reply(204, {}) return team.rm('zkat', '@foo:cli', OPTS).then(ret => { t.deepEqual(ret, {}, 'request succeeded') diff --git a/deps/npm/node_modules/lru-cache/README.md b/deps/npm/node_modules/lru-cache/README.md index d660dd5747abec..435dfebb7e27d0 100644 --- a/deps/npm/node_modules/lru-cache/README.md +++ b/deps/npm/node_modules/lru-cache/README.md @@ -18,8 +18,8 @@ var LRU = require("lru-cache") , length: function (n, key) { return n * 2 + key.length } , dispose: function (key, n) { n.close() } , maxAge: 1000 * 60 * 60 } - , cache = LRU(options) - , otherCache = LRU(50) // sets just the max size + , cache = new LRU(options) + , otherCache = new LRU(50) // sets just the max size cache.set("key", "value") cache.get("key") // "value" @@ -49,10 +49,13 @@ away. * `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`. + to `Infinity`. Setting it to a non-number or negative number will + throw a `TypeError`. Setting it to 0 makes it be `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. + Setting this to a negative value will make everything seem old! + Setting it to a non-number will throw a `TypeError`. * `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, key){return n.length}`. The default is @@ -76,6 +79,11 @@ away. it'll be called whenever a `set()` operation overwrites an existing key. If you set this option, `dispose()` will only be called when a key falls out of the cache, not when it is overwritten. +* `updateAgeOnGet` When using time-expiring entries with `maxAge`, + setting this to `true` will make each item's effective time update + to the current time whenever it is retrieved from cache, causing it + to not expire. (It can still fall out of cache based on recency of + use, of course.) ## API diff --git a/deps/npm/node_modules/lru-cache/index.js b/deps/npm/node_modules/lru-cache/index.js index bd35b53589381c..573b6b85b9779d 100644 --- a/deps/npm/node_modules/lru-cache/index.js +++ b/deps/npm/node_modules/lru-cache/index.js @@ -1,39 +1,20 @@ 'use strict' -module.exports = LRUCache - -// This will be a proper iterable 'Map' in engines that support it, -// or a fakey-fake PseudoMap in older versions. -var Map = require('pseudomap') -var util = require('util') - // A linked list to keep track of recently-used-ness -var Yallist = require('yallist') - -// use symbols if possible, otherwise just _props -var hasSymbol = typeof Symbol === 'function' && process.env._nodeLRUCacheForceNoSymbol !== '1' -var makeSymbol -if (hasSymbol) { - makeSymbol = function (key) { - return Symbol(key) - } -} else { - makeSymbol = function (key) { - return '_' + key - } -} +const Yallist = require('yallist') -var MAX = makeSymbol('max') -var LENGTH = makeSymbol('length') -var LENGTH_CALCULATOR = makeSymbol('lengthCalculator') -var ALLOW_STALE = makeSymbol('allowStale') -var MAX_AGE = makeSymbol('maxAge') -var DISPOSE = makeSymbol('dispose') -var NO_DISPOSE_ON_SET = makeSymbol('noDisposeOnSet') -var LRU_LIST = makeSymbol('lruList') -var CACHE = makeSymbol('cache') +const MAX = Symbol('max') +const LENGTH = Symbol('length') +const LENGTH_CALCULATOR = Symbol('lengthCalculator') +const ALLOW_STALE = Symbol('allowStale') +const MAX_AGE = Symbol('maxAge') +const DISPOSE = Symbol('dispose') +const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet') +const LRU_LIST = Symbol('lruList') +const CACHE = Symbol('cache') +const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet') -function naiveLength () { return 1 } +const naiveLength = () => 1 // lruList is a yallist where the head is the youngest // item, and the tail is the oldest. the list contains the Hit @@ -43,426 +24,311 @@ function naiveLength () { return 1 } // // cache is a Map (or PseudoMap) that matches the keys to // the Yallist.Node object. -function LRUCache (options) { - if (!(this instanceof LRUCache)) { - return new LRUCache(options) +class LRUCache { + constructor (options) { + if (typeof options === 'number') + options = { max: options } + + if (!options) + options = {} + + if (options.max && (typeof options.max !== 'number' || options.max < 0)) + throw new TypeError('max must be a non-negative number') + // Kind of weird to have a default max of Infinity, but oh well. + const max = this[MAX] = options.max || Infinity + + const lc = options.length || naiveLength + this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc + this[ALLOW_STALE] = options.stale || false + if (options.maxAge && typeof options.maxAge !== 'number') + throw new TypeError('maxAge must be a number') + this[MAX_AGE] = options.maxAge || 0 + this[DISPOSE] = options.dispose + this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false + this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false + this.reset() } - if (typeof options === 'number') { - options = { max: options } - } + // resize the cache when the max changes. + set max (mL) { + if (typeof mL !== 'number' || mL < 0) + throw new TypeError('max must be a non-negative number') - if (!options) { - options = {} + this[MAX] = mL || Infinity + trim(this) } - - var max = this[MAX] = options.max - // Kind of weird to have a default max of Infinity, but oh well. - if (!max || - !(typeof max === 'number') || - max <= 0) { - this[MAX] = Infinity + get max () { + return this[MAX] } - var lc = options.length || naiveLength - if (typeof lc !== 'function') { - lc = naiveLength + set allowStale (allowStale) { + this[ALLOW_STALE] = !!allowStale + } + get allowStale () { + return this[ALLOW_STALE] } - this[LENGTH_CALCULATOR] = lc - - this[ALLOW_STALE] = options.stale || false - this[MAX_AGE] = options.maxAge || 0 - this[DISPOSE] = options.dispose - this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false - 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 - trim(this) - }, - get: function () { - return this[MAX] - }, - enumerable: true -}) + set maxAge (mA) { + if (typeof mA !== 'number') + throw new TypeError('maxAge must be a non-negative number') -Object.defineProperty(LRUCache.prototype, 'allowStale', { - set: function (allowStale) { - this[ALLOW_STALE] = !!allowStale - }, - get: function () { - return this[ALLOW_STALE] - }, - enumerable: true -}) - -Object.defineProperty(LRUCache.prototype, 'maxAge', { - set: function (mA) { - if (!mA || !(typeof mA === 'number') || mA < 0) { - mA = 0 - } this[MAX_AGE] = mA trim(this) - }, - get: function () { + } + get maxAge () { return this[MAX_AGE] - }, - enumerable: true -}) - -// resize the cache when the lengthCalculator changes. -Object.defineProperty(LRUCache.prototype, 'lengthCalculator', { - set: function (lC) { - if (typeof lC !== 'function') { + } + + // resize the cache when the lengthCalculator changes. + set lengthCalculator (lC) { + if (typeof lC !== 'function') lC = naiveLength - } + if (lC !== this[LENGTH_CALCULATOR]) { this[LENGTH_CALCULATOR] = lC this[LENGTH] = 0 - this[LRU_LIST].forEach(function (hit) { + this[LRU_LIST].forEach(hit => { hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) this[LENGTH] += hit.length - }, this) + }) } trim(this) - }, - get: function () { return this[LENGTH_CALCULATOR] }, - enumerable: true -}) - -Object.defineProperty(LRUCache.prototype, 'length', { - get: function () { return this[LENGTH] }, - enumerable: true -}) - -Object.defineProperty(LRUCache.prototype, 'itemCount', { - get: function () { return this[LRU_LIST].length }, - enumerable: true -}) - -LRUCache.prototype.rforEach = function (fn, thisp) { - thisp = thisp || this - for (var walker = this[LRU_LIST].tail; walker !== null;) { - var prev = walker.prev - forEachStep(this, fn, walker, thisp) - walker = prev } -} + get lengthCalculator () { return this[LENGTH_CALCULATOR] } -function forEachStep (self, fn, node, thisp) { - var hit = node.value - if (isStale(self, hit)) { - del(self, node) - if (!self[ALLOW_STALE]) { - hit = undefined + get length () { return this[LENGTH] } + get itemCount () { return this[LRU_LIST].length } + + rforEach (fn, thisp) { + thisp = thisp || this + for (let walker = this[LRU_LIST].tail; walker !== null;) { + const prev = walker.prev + forEachStep(this, fn, walker, thisp) + walker = prev } } - if (hit) { - fn.call(thisp, hit.value, hit.key, self) + + forEach (fn, thisp) { + thisp = thisp || this + for (let walker = this[LRU_LIST].head; walker !== null;) { + const next = walker.next + forEachStep(this, fn, walker, thisp) + walker = next + } } -} -LRUCache.prototype.forEach = function (fn, thisp) { - thisp = thisp || this - for (var walker = this[LRU_LIST].head; walker !== null;) { - var next = walker.next - forEachStep(this, fn, walker, thisp) - walker = next + keys () { + return this[LRU_LIST].toArray().map(k => k.key) } -} -LRUCache.prototype.keys = function () { - return this[LRU_LIST].toArray().map(function (k) { - return k.key - }, this) -} + values () { + return this[LRU_LIST].toArray().map(k => k.value) + } -LRUCache.prototype.values = function () { - return this[LRU_LIST].toArray().map(function (k) { - return k.value - }, this) -} + reset () { + if (this[DISPOSE] && + this[LRU_LIST] && + this[LRU_LIST].length) { + this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value)) + } -LRUCache.prototype.reset = function () { - if (this[DISPOSE] && - this[LRU_LIST] && - this[LRU_LIST].length) { - this[LRU_LIST].forEach(function (hit) { - this[DISPOSE](hit.key, hit.value) - }, this) + this[CACHE] = new Map() // hash of items by key + this[LRU_LIST] = new Yallist() // list of items in order of use recency + this[LENGTH] = 0 // length of items in the list } - this[CACHE] = new Map() // hash of items by key - this[LRU_LIST] = new Yallist() // list of items in order of use recency - this[LENGTH] = 0 // length of items in the list -} - -LRUCache.prototype.dump = function () { - return this[LRU_LIST].map(function (hit) { - if (!isStale(this, hit)) { - return { + dump () { + return this[LRU_LIST].map(hit => + isStale(this, hit) ? false : { k: hit.key, v: hit.value, e: hit.now + (hit.maxAge || 0) - } - } - }, this).toArray().filter(function (h) { - return h - }) -} - -LRUCache.prototype.dumpLru = function () { - return this[LRU_LIST] -} - -/* istanbul ignore next */ -LRUCache.prototype.inspect = function (n, opts) { - var str = 'LRUCache {' - var extras = false - - var as = this[ALLOW_STALE] - if (as) { - str += '\n allowStale: true' - extras = true + }).toArray().filter(h => h) } - var max = this[MAX] - if (max && max !== Infinity) { - if (extras) { - str += ',' - } - str += '\n max: ' + util.inspect(max, opts) - extras = true + dumpLru () { + return this[LRU_LIST] } - var maxAge = this[MAX_AGE] - if (maxAge) { - if (extras) { - str += ',' - } - str += '\n maxAge: ' + util.inspect(maxAge, opts) - extras = true - } + set (key, value, maxAge) { + maxAge = maxAge || this[MAX_AGE] - var lc = this[LENGTH_CALCULATOR] - if (lc && lc !== naiveLength) { - if (extras) { - str += ',' - } - str += '\n length: ' + util.inspect(this[LENGTH], opts) - extras = true - } + if (maxAge && typeof maxAge !== 'number') + throw new TypeError('maxAge must be a number') - var didFirst = false - this[LRU_LIST].forEach(function (item) { - if (didFirst) { - str += ',\n ' - } else { - if (extras) { - str += ',\n' + const now = maxAge ? Date.now() : 0 + const len = this[LENGTH_CALCULATOR](value, key) + + if (this[CACHE].has(key)) { + if (len > this[MAX]) { + del(this, this[CACHE].get(key)) + return false } - didFirst = true - str += '\n ' - } - var key = util.inspect(item.key).split('\n').join('\n ') - var val = { value: item.value } - if (item.maxAge !== maxAge) { - val.maxAge = item.maxAge - } - if (lc !== naiveLength) { - val.length = item.length - } - if (isStale(this, item)) { - val.stale = true - } - val = util.inspect(val, opts).split('\n').join('\n ') - str += key + ' => ' + val - }) + const node = this[CACHE].get(key) + const item = node.value - if (didFirst || extras) { - str += '\n' - } - str += '}' + // dispose of the old one before overwriting + // split out into 2 ifs for better coverage tracking + if (this[DISPOSE]) { + if (!this[NO_DISPOSE_ON_SET]) + this[DISPOSE](key, item.value) + } - return str -} + item.now = now + item.maxAge = maxAge + item.value = value + this[LENGTH] += len - item.length + item.length = len + this.get(key) + trim(this) + return true + } -LRUCache.prototype.set = function (key, value, maxAge) { - maxAge = maxAge || this[MAX_AGE] + const hit = new Entry(key, value, len, now, maxAge) - var now = maxAge ? Date.now() : 0 - var len = this[LENGTH_CALCULATOR](value, key) + // oversized objects fall out of cache automatically. + if (hit.length > this[MAX]) { + if (this[DISPOSE]) + this[DISPOSE](key, value) - if (this[CACHE].has(key)) { - if (len > this[MAX]) { - del(this, this[CACHE].get(key)) return false } - var node = this[CACHE].get(key) - var item = node.value - - // dispose of the old one before overwriting - // split out into 2 ifs for better coverage tracking - if (this[DISPOSE]) { - if (!this[NO_DISPOSE_ON_SET]) { - this[DISPOSE](key, item.value) - } - } - - item.now = now - item.maxAge = maxAge - item.value = value - this[LENGTH] += len - item.length - item.length = len - this.get(key) + this[LENGTH] += hit.length + this[LRU_LIST].unshift(hit) + this[CACHE].set(key, this[LRU_LIST].head) trim(this) return true } - var hit = new Entry(key, value, len, now, maxAge) - - // oversized objects fall out of cache automatically. - if (hit.length > this[MAX]) { - if (this[DISPOSE]) { - this[DISPOSE](key, value) - } - return false + has (key) { + if (!this[CACHE].has(key)) return false + const hit = this[CACHE].get(key).value + return !isStale(this, hit) } - this[LENGTH] += hit.length - this[LRU_LIST].unshift(hit) - this[CACHE].set(key, this[LRU_LIST].head) - trim(this) - return true -} - -LRUCache.prototype.has = function (key) { - if (!this[CACHE].has(key)) return false - var hit = this[CACHE].get(key).value - if (isStale(this, hit)) { - return false + get (key) { + return get(this, key, true) } - return true -} -LRUCache.prototype.get = function (key) { - return get(this, key, true) -} + peek (key) { + return get(this, key, false) + } -LRUCache.prototype.peek = function (key) { - return get(this, key, false) -} + pop () { + const node = this[LRU_LIST].tail + if (!node) + return null -LRUCache.prototype.pop = function () { - var node = this[LRU_LIST].tail - if (!node) return null - del(this, node) - return node.value -} + del(this, node) + return node.value + } -LRUCache.prototype.del = function (key) { - del(this, this[CACHE].get(key)) -} + del (key) { + del(this, this[CACHE].get(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] - 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) + load (arr) { + // reset the cache + this.reset() + + const now = Date.now() + // A previous serialized cache has the most recent items first + for (let l = arr.length - 1; l >= 0; l--) { + const hit = arr[l] + const 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 { + const maxAge = expiresAt - now + // dont add already expired items + if (maxAge > 0) { + this.set(hit.k, hit.v, maxAge) + } } } } -} -LRUCache.prototype.prune = function () { - var self = this - this[CACHE].forEach(function (value, key) { - get(self, key, false) - }) + prune () { + this[CACHE].forEach((value, key) => get(this, key, false)) + } } -function get (self, key, doUse) { - var node = self[CACHE].get(key) +const get = (self, key, doUse) => { + const node = self[CACHE].get(key) if (node) { - var hit = node.value + const hit = node.value if (isStale(self, hit)) { del(self, node) - if (!self[ALLOW_STALE]) hit = undefined + if (!self[ALLOW_STALE]) + return undefined } else { if (doUse) { + if (self[UPDATE_AGE_ON_GET]) + node.value.now = Date.now() self[LRU_LIST].unshiftNode(node) } } - if (hit) hit = hit.value + return hit.value } - return hit } -function isStale (self, hit) { - if (!hit || (!hit.maxAge && !self[MAX_AGE])) { +const isStale = (self, hit) => { + if (!hit || (!hit.maxAge && !self[MAX_AGE])) return false - } - var stale = false - var diff = Date.now() - hit.now - if (hit.maxAge) { - stale = diff > hit.maxAge - } else { - stale = self[MAX_AGE] && (diff > self[MAX_AGE]) - } - return stale + + const diff = Date.now() - hit.now + return hit.maxAge ? diff > hit.maxAge + : self[MAX_AGE] && (diff > self[MAX_AGE]) } -function trim (self) { +const trim = self => { if (self[LENGTH] > self[MAX]) { - for (var walker = self[LRU_LIST].tail; + for (let walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null;) { // We know that we're about to delete this one, and also // what the next least recently used key will be, so just // go ahead and set it now. - var prev = walker.prev + const prev = walker.prev del(self, walker) walker = prev } } } -function del (self, node) { +const del = (self, node) => { if (node) { - var hit = node.value - if (self[DISPOSE]) { + const hit = node.value + if (self[DISPOSE]) self[DISPOSE](hit.key, hit.value) - } + self[LENGTH] -= hit.length self[CACHE].delete(hit.key) self[LRU_LIST].removeNode(node) } } -// classy, since V8 prefers predictable objects. -function Entry (key, value, length, now, maxAge) { - this.key = key - this.value = value - this.length = length - this.now = now - this.maxAge = maxAge || 0 +class Entry { + constructor (key, value, length, now, maxAge) { + this.key = key + this.value = value + this.length = length + this.now = now + this.maxAge = maxAge || 0 + } +} + +const forEachStep = (self, fn, node, thisp) => { + let hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) + hit = undefined + } + if (hit) + fn.call(thisp, hit.value, hit.key, self) } + +module.exports = LRUCache diff --git a/deps/npm/node_modules/lru-cache/package.json b/deps/npm/node_modules/lru-cache/package.json index 14760df46579f5..3b5a1f8b3fa2d9 100644 --- a/deps/npm/node_modules/lru-cache/package.json +++ b/deps/npm/node_modules/lru-cache/package.json @@ -1,32 +1,28 @@ { - "_from": "lru-cache@4.1.5", - "_id": "lru-cache@4.1.5", + "_from": "lru-cache@5.1.1", + "_id": "lru-cache@5.1.1", "_inBundle": false, - "_integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "_integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "_location": "/lru-cache", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "lru-cache@4.1.5", + "raw": "lru-cache@5.1.1", "name": "lru-cache", "escapedName": "lru-cache", - "rawSpec": "4.1.5", + "rawSpec": "5.1.1", "saveSpec": null, - "fetchSpec": "4.1.5" + "fetchSpec": "5.1.1" }, "_requiredBy": [ "#USER", - "/", - "/cross-spawn", - "/foreground-child/cross-spawn", - "/make-fetch-happen", - "/npm-registry-fetch" + "/" ], - "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "_shasum": "8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd", - "_spec": "lru-cache@4.1.5", - "_where": "/Users/aeschright/code/cli", + "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "_shasum": "1da27e6710271947695daf6848e847f01d84b920", + "_spec": "lru-cache@5.1.1", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me" @@ -36,14 +32,12 @@ }, "bundleDependencies": false, "dependencies": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "yallist": "^3.0.2" }, "deprecated": false, "description": "A cache object that deletes the least-recently-used items.", "devDependencies": { "benchmark": "^2.1.4", - "standard": "^12.0.1", "tap": "^12.1.0" }, "files": [ @@ -64,13 +58,11 @@ }, "scripts": { "coveragerport": "tap --coverage-report=html", - "lintfix": "standard --fix test/*.js index.js", "postpublish": "git push origin --all; git push origin --tags", - "posttest": "standard test/*.js index.js", - "postversion": "npm publish --tag=legacy", + "postversion": "npm publish", "preversion": "npm test", "snap": "TAP_SNAPSHOT=1 tap test/*.js -J", "test": "tap test/*.js --100 -J" }, - "version": "4.1.5" + "version": "5.1.1" } diff --git a/deps/npm/node_modules/make-fetch-happen/CHANGELOG.md b/deps/npm/node_modules/make-fetch-happen/CHANGELOG.md index b83beda41379d9..eb28e410f2b707 100644 --- a/deps/npm/node_modules/make-fetch-happen/CHANGELOG.md +++ b/deps/npm/node_modules/make-fetch-happen/CHANGELOG.md @@ -2,6 +2,27 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +# [5.0.0](https://github.com/zkat/make-fetch-happen/compare/v4.0.2...v5.0.0) (2019-07-15) + + +### Features + +* cacache@12, no need for uid/gid opts ([fdb956f](https://github.com/zkat/make-fetch-happen/commit/fdb956f)) + + +### BREAKING CHANGES + +* cache uid and gid are inferred from the cache folder itself, +not passed in as options. + + + + +## [4.0.2](https://github.com/zkat/make-fetch-happen/compare/v4.0.1...v4.0.2) (2019-07-02) + + + ## [4.0.1](https://github.com/zkat/make-fetch-happen/compare/v4.0.0...v4.0.1) (2018-04-12) diff --git a/deps/npm/node_modules/make-fetch-happen/cache.js b/deps/npm/node_modules/make-fetch-happen/cache.js index 0c519e69fbe81f..f842ba19da2e1f 100644 --- a/deps/npm/node_modules/make-fetch-happen/cache.js +++ b/deps/npm/node_modules/make-fetch-happen/cache.js @@ -31,8 +31,6 @@ function cacheKey (req) { module.exports = class Cache { constructor (path, opts) { this._path = path - this._uid = opts && opts.uid - this._gid = opts && opts.gid this.Promise = (opts && opts.Promise) || Promise } @@ -118,8 +116,6 @@ module.exports = class Cache { reqHeaders: req.headers.raw(), resHeaders: response.headers.raw() }, - uid: this._uid, - gid: this._gid, size, memoize: fitInMemory && opts.memoize } diff --git a/deps/npm/node_modules/make-fetch-happen/package.json b/deps/npm/node_modules/make-fetch-happen/package.json index 9aa7f113c59558..d405b7b31fe576 100644 --- a/deps/npm/node_modules/make-fetch-happen/package.json +++ b/deps/npm/node_modules/make-fetch-happen/package.json @@ -1,28 +1,30 @@ { - "_from": "make-fetch-happen@^4.0.1", - "_id": "make-fetch-happen@4.0.1", + "_from": "make-fetch-happen@5.0.0", + "_id": "make-fetch-happen@5.0.0", "_inBundle": false, - "_integrity": "sha512-7R5ivfy9ilRJ1EMKIOziwrns9fGeAD4bAha8EB7BIiBBLHm2KeTUGCrICFt2rbHfzheTLynv50GnNTK1zDTrcQ==", + "_integrity": "sha512-nFr/vpL1Jc60etMVKeaLOqfGjMMb3tAHFVJWxHOFCFS04Zmd7kGlMxo0l1tzfhoQje0/UPnd0X8OeGUiXXnfPA==", "_location": "/make-fetch-happen", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "make-fetch-happen@^4.0.1", + "raw": "make-fetch-happen@5.0.0", "name": "make-fetch-happen", "escapedName": "make-fetch-happen", - "rawSpec": "^4.0.1", + "rawSpec": "5.0.0", "saveSpec": null, - "fetchSpec": "^4.0.1" + "fetchSpec": "5.0.0" }, "_requiredBy": [ - "/libnpmhook/npm-registry-fetch", + "#USER", + "/", + "/npm-registry-fetch", "/pacote" ], - "_resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-4.0.1.tgz", - "_shasum": "141497cb878f243ba93136c83d8aba12c216c083", - "_spec": "make-fetch-happen@^4.0.1", - "_where": "/Users/rebecca/code/npm/node_modules/pacote", + "_resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-5.0.0.tgz", + "_shasum": "a8e3fe41d3415dd656fe7b8e8172e1fb4458b38d", + "_spec": "make-fetch-happen@5.0.0", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Kat Marchán", "email": "kzm@zkat.tech" @@ -33,11 +35,11 @@ "bundleDependencies": false, "dependencies": { "agentkeepalive": "^3.4.1", - "cacache": "^11.0.1", + "cacache": "^12.0.0", "http-cache-semantics": "^3.8.1", "http-proxy-agent": "^2.1.0", "https-proxy-agent": "^2.2.1", - "lru-cache": "^4.1.2", + "lru-cache": "^5.1.1", "mississippi": "^3.0.0", "node-fetch-npm": "^2.0.2", "promise-retry": "^1.1.1", @@ -57,7 +59,7 @@ "standard": "^11.0.1", "standard-version": "^4.3.0", "tacks": "^1.2.6", - "tap": "^11.1.3", + "tap": "^12.7.0", "weallbehave": "^1.0.0", "weallcontribute": "^1.0.7" }, @@ -91,5 +93,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "4.0.1" + "version": "5.0.0" } diff --git a/deps/npm/node_modules/node-gyp/.github/ISSUE_TEMPLATE.md b/deps/npm/node_modules/node-gyp/.github/ISSUE_TEMPLATE.md index cd0e3ce3d8d693..bc89b7e273d142 100644 --- a/deps/npm/node_modules/node-gyp/.github/ISSUE_TEMPLATE.md +++ b/deps/npm/node_modules/node-gyp/.github/ISSUE_TEMPLATE.md @@ -14,10 +14,11 @@ that module's issue tracker (`npm issues modulename`).
      Verbose output (from npm or node-gyp): - - ``` - +Paste your log here, between the backticks. It can be: + - npm --verbose output, + - or contents of npm-debug.log, + - or output of node-gyp rebuild --verbose. ```
      diff --git a/deps/npm/node_modules/node-gyp/.travis.yml b/deps/npm/node_modules/node-gyp/.travis.yml new file mode 100644 index 00000000000000..a6dd2dcf28b1e4 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/.travis.yml @@ -0,0 +1,78 @@ +dist: xenial +language: python +cache: pip +matrix: + include: + - name: "Python 2.7 on Linux" + env: NODE_GYP_FORCE_PYTHON=python2 + python: 2.7 + - name: "Python 2.7 on macOS" + os: osx + osx_image: xcode10.2 + language: shell # 'language: python' is not yet supported on macOS + env: NODE_GYP_FORCE_PYTHON=python2 + before_install: HOMEBREW_NO_AUTO_UPDATE=1 brew install npm + - name: "Node.js 6 & Python 2.7 on Windows" + os: windows + language: node_js + node_js: 6 # node + env: >- + PATH=/c/Python27:/c/Python27/Scripts:$PATH + NODE_GYP_FORCE_PYTHON=/c/Python27/python.exe + before_install: choco install python2 + - name: "Node.js 12 & Python 2.7 on Windows" + os: windows + language: node_js + node_js: 12 # node + env: >- + PATH=/c/Python27:/c/Python27/Scripts:$PATH + NODE_GYP_FORCE_PYTHON=/c/Python27/python.exe + before_install: choco install python2 + - name: "Node.js 6 & Python 3.7 on Linux" + python: 3.7 + env: NODE_GYP_FORCE_PYTHON=python3 EXPERIMENTAL_NODE_GYP_PYTHON3=1 + before_install: nvm install 6 + - name: "Node.js 8 & Python 3.7 on Linux" + python: 3.7 + env: NODE_GYP_FORCE_PYTHON=python3 EXPERIMENTAL_NODE_GYP_PYTHON3=1 + before_install: nvm install 8 + - name: "Node.js 10 & Python 3.7 on Linux" + python: 3.7 + env: NODE_GYP_FORCE_PYTHON=python3 EXPERIMENTAL_NODE_GYP_PYTHON3=1 + before_install: nvm install 10 + - name: "Node.js 12 & Python 3.7 on Linux" + python: 3.7 + env: NODE_GYP_FORCE_PYTHON=python3 EXPERIMENTAL_NODE_GYP_PYTHON3=1 + before_install: nvm install 12 + - name: "Node.js 12 & Python 3.7 on Windows" + os: windows + language: node_js + node_js: 12 # node + env: >- + PATH=/c/Python37:/c/Python37/Scripts:$PATH + NODE_GYP_FORCE_PYTHON=/c/Python37/python.exe + EXPERIMENTAL_NODE_GYP_PYTHON3=1 + before_install: choco install python + allow_failures: + - env: NODE_GYP_FORCE_PYTHON=python3 EXPERIMENTAL_NODE_GYP_PYTHON3=1 + - env: >- + PATH=/c/Python37:/c/Python37/Scripts:$PATH + NODE_GYP_FORCE_PYTHON=/c/Python37/python.exe + EXPERIMENTAL_NODE_GYP_PYTHON3=1 +install: + #- pip install -r requirements.txt + - pip install flake8 # pytest # add another testing frameworks later +before_script: + - flake8 --version + # stop the build if there are Python syntax errors or undefined names + - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. Two space indentation is OK. The GitHub editor is 127 chars wide + - flake8 . --count --exit-zero --ignore=E111,E114,W503 --max-complexity=10 --max-line-length=127 --statistics + - npm install +script: + - node -e 'require("npmlog").level="verbose"; require("./lib/find-python")(null,()=>{})' + - npm test + #- pytest --capture=sys # add other tests here +notifications: + on_success: change + on_failure: change # `always` will be the setting once code changes slow down diff --git a/deps/npm/node_modules/node-gyp/CHANGELOG.md b/deps/npm/node_modules/node-gyp/CHANGELOG.md index 0cb3d1829b1e45..041709cb127aa8 100644 --- a/deps/npm/node_modules/node-gyp/CHANGELOG.md +++ b/deps/npm/node_modules/node-gyp/CHANGELOG.md @@ -1,3 +1,88 @@ +v5.0.3 2019-07-17 +================= + +* [[`66ad305775`](https://github.com/nodejs/node-gyp/commit/66ad305775)] - **python**: accept Python 3 conditionally (João Reis) [#1815](https://github.com/nodejs/node-gyp/pull/1815) +* [[`7e7fce3fed`](https://github.com/nodejs/node-gyp/commit/7e7fce3fed)] - **python**: move Python detection to its own file (João Reis) [#1815](https://github.com/nodejs/node-gyp/pull/1815) +* [[`e40c99e283`](https://github.com/nodejs/node-gyp/commit/e40c99e283)] - **src**: implement standard.js linting (Rod Vagg) [#1794](https://github.com/nodejs/node-gyp/pull/1794) +* [[`bb92c761a9`](https://github.com/nodejs/node-gyp/commit/bb92c761a9)] - **test**: add Node.js 6 on Windows to Travis CI (João Reis) [#1812](https://github.com/nodejs/node-gyp/pull/1812) +* [[`7fd924079f`](https://github.com/nodejs/node-gyp/commit/7fd924079f)] - **test**: increase tap timeout (João Reis) [#1812](https://github.com/nodejs/node-gyp/pull/1812) +* [[`7e8127068f`](https://github.com/nodejs/node-gyp/commit/7e8127068f)] - **test**: cover supported node versions with travis (Rod Vagg) [#1809](https://github.com/nodejs/node-gyp/pull/1809) +* [[`24109148df`](https://github.com/nodejs/node-gyp/commit/24109148df)] - **test**: downgrade to tap@^12 for continued Node 6 support (Rod Vagg) [#1808](https://github.com/nodejs/node-gyp/pull/1808) +* [[`656117cc4a`](https://github.com/nodejs/node-gyp/commit/656117cc4a)] - **win**: make VS path match case-insensitive (João Reis) [#1806](https://github.com/nodejs/node-gyp/pull/1806) + +v5.0.2 2019-06-27 +================= + +* [[`2761afbf73`](https://github.com/nodejs/node-gyp/commit/2761afbf73)] - **build,test**: add duplicate symbol test (Gabriel Schulhof) [#1689](https://github.com/nodejs/node-gyp/pull/1689) +* [[`82f129d6de`](https://github.com/nodejs/node-gyp/commit/82f129d6de)] - **gyp**: replace optparse to argparse (KiYugadgeter) [#1591](https://github.com/nodejs/node-gyp/pull/1591) +* [[`afaaa29c61`](https://github.com/nodejs/node-gyp/commit/afaaa29c61)] - **gyp**: remove from \_\_future\_\_ import with\_statement (cclauss) [#1799](https://github.com/nodejs/node-gyp/pull/1799) +* [[`a991f633d6`](https://github.com/nodejs/node-gyp/commit/a991f633d6)] - **gyp**: fix the remaining Python 3 issues (cclauss) [#1793](https://github.com/nodejs/node-gyp/pull/1793) +* [[`f952b08f84`](https://github.com/nodejs/node-gyp/commit/f952b08f84)] - **gyp**: move from \_\_future\_\_ import to the top of the file (cclauss) [#1789](https://github.com/nodejs/node-gyp/pull/1789) +* [[`4f4a677dfa`](https://github.com/nodejs/node-gyp/commit/4f4a677dfa)] - **gyp**: use different default compiler for z/OS (Shuowang (Wayne) Zhang) [#1768](https://github.com/nodejs/node-gyp/pull/1768) +* [[`03683f09d6`](https://github.com/nodejs/node-gyp/commit/03683f09d6)] - **lib**: code de-duplication (Pavel Medvedev) [#965](https://github.com/nodejs/node-gyp/pull/965) +* [[`611bc3c89f`](https://github.com/nodejs/node-gyp/commit/611bc3c89f)] - **lib**: add .json suffix for explicit require (Rod Vagg) [#1787](https://github.com/nodejs/node-gyp/pull/1787) +* [[`d3478d7b0b`](https://github.com/nodejs/node-gyp/commit/d3478d7b0b)] - **meta**: add to .gitignore (Refael Ackermann) [#1573](https://github.com/nodejs/node-gyp/pull/1573) +* [[`7a9a038e9e`](https://github.com/nodejs/node-gyp/commit/7a9a038e9e)] - **test**: add parallel test runs on macOS and Windows (cclauss) [#1800](https://github.com/nodejs/node-gyp/pull/1800) +* [[`7dd7f2b2a2`](https://github.com/nodejs/node-gyp/commit/7dd7f2b2a2)] - **test**: fix Python syntax error in test-adding.js (cclauss) [#1793](https://github.com/nodejs/node-gyp/pull/1793) +* [[`395f843de0`](https://github.com/nodejs/node-gyp/commit/395f843de0)] - **test**: replace self-signed cert with 'localhost' (Rod Vagg) [#1795](https://github.com/nodejs/node-gyp/pull/1795) +* [[`a52c6eb9e8`](https://github.com/nodejs/node-gyp/commit/a52c6eb9e8)] - **test**: migrate from tape to tap (Rod Vagg) [#1795](https://github.com/nodejs/node-gyp/pull/1795) +* [[`ec2eb44a30`](https://github.com/nodejs/node-gyp/commit/ec2eb44a30)] - **test**: use Nan in duplicate\_symbols (Gabriel Schulhof) [#1689](https://github.com/nodejs/node-gyp/pull/1689) +* [[`1597c84aad`](https://github.com/nodejs/node-gyp/commit/1597c84aad)] - **test**: use Travis CI to run tests on every pull request (cclauss) [#1752](https://github.com/nodejs/node-gyp/pull/1752) +* [[`dd9bf929ac`](https://github.com/nodejs/node-gyp/commit/dd9bf929ac)] - **zos**: update compiler options (Shuowang (Wayne) Zhang) [#1768](https://github.com/nodejs/node-gyp/pull/1768) + +v5.0.1 2019-06-20 +================= + +* [[`e3861722ed`](https://github.com/nodejs/node-gyp/commit/e3861722ed)] - **doc**: document --jobs max (David Sanders) [#1770](https://github.com/nodejs/node-gyp/pull/1770) +* [[`1cfdb28886`](https://github.com/nodejs/node-gyp/commit/1cfdb28886)] - **lib**: reintroduce support for iojs file naming for releases \>= 1 && \< 4 (Samuel Attard) [#1777](https://github.com/nodejs/node-gyp/pull/1777) + +v5.0.0 2019-06-13 +================= + +* [[`8a83972743`](https://github.com/nodejs/node-gyp/commit/8a83972743)] - **(SEMVER-MAJOR)** **bin**: follow XDG OS conventions for storing data (Selwyn) [#1570](https://github.com/nodejs/node-gyp/pull/1570) +* [[`9e46872ea3`](https://github.com/nodejs/node-gyp/commit/9e46872ea3)] - **bin,lib**: remove extra comments/lines/spaces (Jon Moss) [#1508](https://github.com/nodejs/node-gyp/pull/1508) +* [[`8098ebdeb4`](https://github.com/nodejs/node-gyp/commit/8098ebdeb4)] - **deps**: replace `osenv` dependency with native `os` (Selwyn) +* [[`f83b457e03`](https://github.com/nodejs/node-gyp/commit/f83b457e03)] - **deps**: bump request to 2.8.7, fixes heok/hawk issues (Rohit Hazra) [#1492](https://github.com/nodejs/node-gyp/pull/1492) +* [[`323cee7323`](https://github.com/nodejs/node-gyp/commit/323cee7323)] - **deps**: pin `request` version range (Refael Ackermann) [#1300](https://github.com/nodejs/node-gyp/pull/1300) +* [[`c515912d08`](https://github.com/nodejs/node-gyp/commit/c515912d08)] - **doc**: improve issue template (Bartosz Sosnowski) [#1618](https://github.com/nodejs/node-gyp/pull/1618) +* [[`cca2d66727`](https://github.com/nodejs/node-gyp/commit/cca2d66727)] - **doc**: python info needs own header (Taylor D. Lee) [#1245](https://github.com/nodejs/node-gyp/pull/1245) +* [[`3e64c780f5`](https://github.com/nodejs/node-gyp/commit/3e64c780f5)] - **doc**: lint README.md (Jon Moss) [#1498](https://github.com/nodejs/node-gyp/pull/1498) +* [[`a20faedc91`](https://github.com/nodejs/node-gyp/commit/a20faedc91)] - **(SEMVER-MAJOR)** **gyp**: enable MARMASM items only on new VS versions (João Reis) [#1762](https://github.com/nodejs/node-gyp/pull/1762) +* [[`721eb691cf`](https://github.com/nodejs/node-gyp/commit/721eb691cf)] - **gyp**: teach MSVS generator about MARMASM Items (Jon Kunkee) [#1679](https://github.com/nodejs/node-gyp/pull/1679) +* [[`91744bfecc`](https://github.com/nodejs/node-gyp/commit/91744bfecc)] - **gyp**: add support for Windows on Arm (Richard Townsend) [#1739](https://github.com/nodejs/node-gyp/pull/1739) +* [[`a6e0a6c7ed`](https://github.com/nodejs/node-gyp/commit/a6e0a6c7ed)] - **gyp**: move compile\_commands\_json (Paul Maréchal) [#1661](https://github.com/nodejs/node-gyp/pull/1661) +* [[`92e8b52cee`](https://github.com/nodejs/node-gyp/commit/92e8b52cee)] - **gyp**: fix target --\> self.target (cclauss) +* [[`febdfa2137`](https://github.com/nodejs/node-gyp/commit/febdfa2137)] - **gyp**: fix sntex error (cclauss) [#1333](https://github.com/nodejs/node-gyp/pull/1333) +* [[`588d333c14`](https://github.com/nodejs/node-gyp/commit/588d333c14)] - **gyp**: \_winreg module was renamed to winreg in Python 3. (Craig Rodrigues) +* [[`98226d198c`](https://github.com/nodejs/node-gyp/commit/98226d198c)] - **gyp**: replace basestring with str, but only on Python 3. (Craig Rodrigues) +* [[`7535e4478e`](https://github.com/nodejs/node-gyp/commit/7535e4478e)] - **gyp**: replace deprecated functions (Craig Rodrigues) +* [[`2040cd21cc`](https://github.com/nodejs/node-gyp/commit/2040cd21cc)] - **gyp**: use print as a function, as specified in PEP 3105. (Craig Rodrigues) +* [[`abef93ded5`](https://github.com/nodejs/node-gyp/commit/abef93ded5)] - **gyp**: get ready for python 3 (cclauss) +* [[`43031fadcb`](https://github.com/nodejs/node-gyp/commit/43031fadcb)] - **python**: clean-up detection (João Reis) [#1582](https://github.com/nodejs/node-gyp/pull/1582) +* [[`49ab79d221`](https://github.com/nodejs/node-gyp/commit/49ab79d221)] - **python**: more informative error (Refael Ackermann) [#1269](https://github.com/nodejs/node-gyp/pull/1269) +* [[`997bc3c748`](https://github.com/nodejs/node-gyp/commit/997bc3c748)] - **readme**: add ARM64 info to MSVC setup instructions (Jon Kunkee) [#1655](https://github.com/nodejs/node-gyp/pull/1655) +* [[`788e767179`](https://github.com/nodejs/node-gyp/commit/788e767179)] - **test**: remove unused variable (João Reis) +* [[`6f5a408934`](https://github.com/nodejs/node-gyp/commit/6f5a408934)] - **tools**: fix usage of inherited -fPIC and -fPIE (Jens) [#1340](https://github.com/nodejs/node-gyp/pull/1340) +* [[`0efb8fb34b`](https://github.com/nodejs/node-gyp/commit/0efb8fb34b)] - **(SEMVER-MAJOR)** **win**: support running in VS Command Prompt (João Reis) [#1762](https://github.com/nodejs/node-gyp/pull/1762) +* [[`360ddbdf3a`](https://github.com/nodejs/node-gyp/commit/360ddbdf3a)] - **(SEMVER-MAJOR)** **win**: add support for Visual Studio 2019 (João Reis) [#1762](https://github.com/nodejs/node-gyp/pull/1762) +* [[`8f43f68275`](https://github.com/nodejs/node-gyp/commit/8f43f68275)] - **(SEMVER-MAJOR)** **win**: detect all VS versions in node-gyp (João Reis) [#1762](https://github.com/nodejs/node-gyp/pull/1762) +* [[`7fe4095974`](https://github.com/nodejs/node-gyp/commit/7fe4095974)] - **(SEMVER-MAJOR)** **win**: generic Visual Studio 2017 detection (João Reis) [#1762](https://github.com/nodejs/node-gyp/pull/1762) +* [[`7a71d68bce`](https://github.com/nodejs/node-gyp/commit/7a71d68bce)] - **win**: use msbuild from the configure stage (Bartosz Sosnowski) [#1654](https://github.com/nodejs/node-gyp/pull/1654) +* [[`d3b21220a0`](https://github.com/nodejs/node-gyp/commit/d3b21220a0)] - **win**: fix delay-load hook for electron 4 (Andy Dill) +* [[`81f3a92338`](https://github.com/nodejs/node-gyp/commit/81f3a92338)] - Update list of Node.js versions to test against. (Ben Noordhuis) [#1670](https://github.com/nodejs/node-gyp/pull/1670) +* [[`4748f6ab75`](https://github.com/nodejs/node-gyp/commit/4748f6ab75)] - Remove deprecated compatibility code. (Ben Noordhuis) [#1670](https://github.com/nodejs/node-gyp/pull/1670) +* [[`45e3221fd4`](https://github.com/nodejs/node-gyp/commit/45e3221fd4)] - Remove an outdated workaround for Python 2.4 (cclauss) [#1650](https://github.com/nodejs/node-gyp/pull/1650) +* [[`721dc7d314`](https://github.com/nodejs/node-gyp/commit/721dc7d314)] - Add ARM64 to MSBuild /Platform logic (Jon Kunkee) [#1655](https://github.com/nodejs/node-gyp/pull/1655) +* [[`a5b7410497`](https://github.com/nodejs/node-gyp/commit/a5b7410497)] - Add ESLint no-unused-vars rule (Jon Moss) [#1497](https://github.com/nodejs/node-gyp/pull/1497) + +v4.0.0 2019-04-24 +================= + +* [[`ceed5cbe10`](https://github.com/nodejs/node-gyp/commit/ceed5cbe10)] - **deps**: updated tar package version to 4.4.8 (Pobegaylo Maksim) [#1713](https://github.com/nodejs/node-gyp/pull/1713) +* [[`374519e066`](https://github.com/nodejs/node-gyp/commit/374519e066)] - **(SEMVER-MAJOR)** Upgrade to tar v3 (isaacs) [#1212](https://github.com/nodejs/node-gyp/pull/1212) +* [[`e6699d13cd`](https://github.com/nodejs/node-gyp/commit/e6699d13cd)] - **test**: fix addon test for Node.js 12 and V8 7.4 (Richard Lau) [#1705](https://github.com/nodejs/node-gyp/pull/1705) +* [[`0c6bf530a0`](https://github.com/nodejs/node-gyp/commit/0c6bf530a0)] - **lib**: use print() for python version detection (GreenAddress) [#1534](https://github.com/nodejs/node-gyp/pull/1534) + v3.8.0 2018-08-09 ================= diff --git a/deps/npm/node_modules/node-gyp/README.md b/deps/npm/node_modules/node-gyp/README.md index ea94cef31b4e5b..b0900028d734d4 100644 --- a/deps/npm/node_modules/node-gyp/README.md +++ b/deps/npm/node_modules/node-gyp/README.md @@ -1,28 +1,21 @@ -node-gyp -========= -## Node.js native addon build tool +# `node-gyp` - Node.js native addon build tool `node-gyp` is a cross-platform command-line tool written in Node.js for compiling -native addon modules for Node.js. It bundles the [gyp](https://gyp.gsrc.io) +native addon modules for Node.js. It bundles the [gyp](https://gyp.gsrc.io) project used by the Chromium team and takes away the pain of dealing with the -various differences in build platforms. It is the replacement to the `node-waf` -program which is removed for node `v0.8`. If you have a native addon for node that -still has a `wscript` file, then you should definitely add a `binding.gyp` file -to support the latest versions of node. +various differences in build platforms. -Multiple target versions of node are supported (i.e. `0.8`, ..., `4`, `5`, `6`, -etc.), regardless of what version of node is actually installed on your system +Multiple target versions of Node.js are supported (i.e. `0.8`, ..., `4`, `5`, `6`, +etc.), regardless of what version of Node.js is actually installed on your system (`node-gyp` downloads the necessary development files or headers for the target version). ## Features * Easy to use, consistent interface * Same commands to build your module on every platform - * Supports multiple target versions of Node + * Supports multiple target versions of Node.js - -Installation ------------- +## Installation You can install with `npm`: @@ -62,14 +55,18 @@ Install tools and configuration manually: If the above steps didn't work for you, please visit [Microsoft's Node.js Guidelines for Windows](https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules) for additional tips. + To target native ARM64 Node.js on Windows 10 on ARM, add the components "Visual C++ compilers and libraries for ARM64" and "Visual C++ ATL for ARM64". + +### Configuring Python Dependency + If you have multiple Python versions installed, you can identify which Python -version `node-gyp` uses by setting the '--python' variable: +version `node-gyp` uses by setting the `--python` variable: ``` bash $ node-gyp --python /path/to/python2.7 ``` -If `node-gyp` is called by way of `npm` *and* you have multiple versions of +If `node-gyp` is called by way of `npm`, *and* you have multiple versions of Python installed, then you can set `npm`'s 'python' config key to the appropriate value: @@ -77,8 +74,7 @@ value: $ npm config set python /path/to/executable/python2.7 ``` -How to Use ----------- +## How to Use To compile your native addon, first go to its root directory: @@ -99,33 +95,30 @@ needs to be added (not needed when run by npm as configured above): $ node-gyp configure --msvs_version=2015 ``` -__Note__: The `configure` step looks for the `binding.gyp` file in the current -directory to process. See below for instructions on creating the `binding.gyp` file. +__Note__: The `configure` step looks for a `binding.gyp` file in the current +directory to process. See below for instructions on creating a `binding.gyp` file. Now you will have either a `Makefile` (on Unix platforms) or a `vcxproj` file -(on Windows) in the `build/` directory. Next invoke the `build` command: +(on Windows) in the `build/` directory. Next, invoke the `build` command: ``` bash $ node-gyp build ``` Now you have your compiled `.node` bindings file! The compiled bindings end up -in `build/Debug/` or `build/Release/`, depending on the build mode. At this point -you can require the `.node` file with Node and run your tests! +in `build/Debug/` or `build/Release/`, depending on the build mode. At this point, +you can require the `.node` file with Node.js and run your tests! __Note:__ To create a _Debug_ build of the bindings file, pass the `--debug` (or -`-d`) switch when running either the `configure`, `build` or `rebuild` command. +`-d`) switch when running either the `configure`, `build` or `rebuild` commands. +## The `binding.gyp` file -The "binding.gyp" file ----------------------- +A `binding.gyp` file describes the configuration to build your module, in a +JSON-like format. This file gets placed in the root of your package, alongside +`package.json`. -Previously when node had `node-waf` you had to write a `wscript` file. The -replacement for that is the `binding.gyp` file, which describes the configuration -to build your module in a JSON-like format. This file gets placed in the root of -your package, alongside the `package.json` file. - -A barebones `gyp` file appropriate for building a node addon looks like: +A barebones `gyp` file appropriate for building a Node.js addon could look like: ``` python { @@ -147,8 +140,7 @@ Some additional resources for addons and writing `gyp` files: * [*"binding.gyp" files out in the wild* wiki page](https://github.com/nodejs/node-gyp/wiki/%22binding.gyp%22-files-out-in-the-wild) -Commands --------- +## Commands `node-gyp` responds to the following commands: @@ -159,86 +151,74 @@ Commands | `clean` | Removes the `build` directory if it exists | `configure` | Generates project build files for the current platform | `rebuild` | Runs `clean`, `configure` and `build` all in a row -| `install` | Installs node header files for the given version -| `list` | Lists the currently installed node header versions -| `remove` | Removes the node header files for the given version +| `install` | Installs Node.js header files for the given version +| `list` | Lists the currently installed Node.js header versions +| `remove` | Removes the Node.js header files for the given version -Command Options --------- +## Command Options `node-gyp` accepts the following command options: | **Command** | **Description** |:----------------------------------|:------------------------------------------ -| `-j n`, `--jobs n` | Run make in parallel -| `--target=v6.2.1` | Node version to build for (default=process.version) +| `-j n`, `--jobs n` | Run `make` in parallel. The value `max` will use all available CPU cores +| `--target=v6.2.1` | Node.js version to build for (default is `process.version`) | `--silly`, `--loglevel=silly` | Log all progress to console | `--verbose`, `--loglevel=verbose` | Log most progress to console | `--silent`, `--loglevel=silent` | Don't log anything to console -| `debug`, `--debug` | Make Debug build (default=Release) +| `debug`, `--debug` | Make Debug build (default is `Release`) | `--release`, `--no-debug` | Make Release build | `-C $dir`, `--directory=$dir` | Run command in different directory -| `--make=$make` | Override make command (e.g. gmake) +| `--make=$make` | Override `make` command (e.g. `gmake`) | `--thin=yes` | Enable thin static libraries | `--arch=$arch` | Set target architecture (e.g. ia32) | `--tarball=$path` | Get headers from a local tarball -| `--devdir=$path` | SDK download directory (default=~/.node-gyp) +| `--devdir=$path` | SDK download directory (default is OS cache directory) | `--ensure` | Don't reinstall headers if already present | `--dist-url=$url` | Download header tarball from custom URL | `--proxy=$url` | Set HTTP proxy for downloading header tarball | `--cafile=$cafile` | Override default CA chain (to download tarball) | `--nodedir=$path` | Set the path to the node source code -| `--python=$path` | Set path to the python (2) binary -| `--msvs_version=$version` | Set Visual Studio version (win) -| `--solution=$solution` | Set Visual Studio Solution version (win) +| `--python=$path` | Set path to the Python 2 binary +| `--msvs_version=$version` | Set Visual Studio version (Windows only) +| `--solution=$solution` | Set Visual Studio Solution version (Windows only) +## Configuration -Configuration --------- +### Environment variables -__`node-gyp` responds to environment variables or `npm` configuration__ -1. Environment variables take the form `npm_config_OPTION_NAME` for any of the - options listed above (dashes in option names should be replaced by underscores). - These work also when `node-gyp` is invoked directly: - `$ export npm_config_devdir=/tmp/.gyp` - or on Windows - `> set npm_config_devdir=c:\temp\.gyp` -2. As `npm` configuration, variables take the form `OPTION_NAME`. - This way only works when `node-gyp` is executed by `npm`: - `$ npm config set [--global] devdir /tmp/.gyp` - `$ npm i buffertools` +Use the form `npm_config_OPTION_NAME` for any of the command options listed +above (dashes in option names should be replaced by underscores). +For example, to set `devdir` equal to `/tmp/.gyp`, you would: +Run this on Unix: -License -------- +```bash +$ export npm_config_devdir=/tmp/.gyp +``` -(The MIT License) +Or this on Windows: -Copyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net> +```console +> set npm_config_devdir=c:\temp\.gyp +``` + +### `npm` configuration -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: +Use the form `OPTION_NAME` for any of the command options listed above. -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +For example, to set `devdir` equal to `/tmp/.gyp`, you would run: + +```bash +$ npm config set [--global] devdir /tmp/.gyp +``` -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:** Configuration set via `npm` will only be used when `node-gyp` +is run via `npm`, not when `node-gyp` is run directly. +## License -[python-v2.7.10]: https://www.python.org/downloads/release/python-2710/ -[msvc2013]: https://www.microsoft.com/en-gb/download/details.aspx?id=44914 -[win7sdk]: https://www.microsoft.com/en-us/download/details.aspx?id=8279 -[compiler update for the Windows SDK 7.1]: https://www.microsoft.com/en-us/download/details.aspx?id=4422 +`node-gyp` is available under the MIT license. See the [LICENSE +file](LICENSE) for details. diff --git a/deps/npm/node_modules/node-gyp/addon.gypi b/deps/npm/node_modules/node-gyp/addon.gypi index 55fb3211186f44..6462f539ffb725 100644 --- a/deps/npm/node_modules/node-gyp/addon.gypi +++ b/deps/npm/node_modules/node-gyp/addon.gypi @@ -1,6 +1,7 @@ { 'variables' : { 'node_engine_include_dir%': 'deps/v8/include', + 'node_host_binary%': 'node' }, 'target_defaults': { 'type': 'loadable_module', @@ -55,6 +56,14 @@ 'standalone_static_library': '<(standalone_static_library)' }], + ['_type!="executable"', { + 'conditions': [ + [ 'OS=="android"', { + 'cflags!': [ '-fPIE' ], + }] + ] + }], + ['_win_delay_load_hook=="true"', { # If the addon specifies `'win_delay_load_hook': 'true'` in its # binding.gyp, link a delay-load hook into the DLL. This hook ensures @@ -62,12 +71,13 @@ # is named node.exe, iojs.exe, or something else. 'conditions': [ [ 'OS=="win"', { + 'defines': [ 'HOST_BINARY=\"<(node_host_binary)<(EXECUTABLE_SUFFIX)\"', ], 'sources': [ '<(node_gyp_dir)/src/win_delay_load_hook.cc', ], 'msvs_settings': { 'VCLinkerTool': { - 'DelayLoadDLLs': [ 'iojs.exe', 'node.exe' ], + 'DelayLoadDLLs': [ '<(node_host_binary)<(EXECUTABLE_SUFFIX)' ], # Don't print a linker warning when no imports from either .exe # are used. 'AdditionalOptions': [ '/ignore:4199' ], @@ -96,7 +106,14 @@ 'cflags': [ '-q64', '-Wc,DLL', - '-qlonglong' + '-qlonglong', + '-qenum=int', + '-qxclang=-fexec-charset=ISO8859-1' + ], + 'defines': [ + '_ALL_SOURCE=1', + 'MAP_FAILED=-1', + '_UNIX03_SOURCE=1' ], 'ldflags': [ '-q64', @@ -138,10 +155,10 @@ '_FILE_OFFSET_BITS=64' ], }], - [ 'OS in "freebsd openbsd netbsd solaris" or \ + [ 'OS in "freebsd openbsd netbsd solaris android" or \ (OS=="linux" and target_arch!="ia32")', { 'cflags': [ '-fPIC' ], - }] + }], ] } } diff --git a/deps/npm/node_modules/node-gyp/bin/node-gyp.js b/deps/npm/node_modules/node-gyp/bin/node-gyp.js index 70d7d502628bcc..13f2d399f737f5 100755 --- a/deps/npm/node_modules/node-gyp/bin/node-gyp.js +++ b/deps/npm/node_modules/node-gyp/bin/node-gyp.js @@ -1,39 +1,33 @@ #!/usr/bin/env node -/** - * Set the title. - */ +'use strict' process.title = 'node-gyp' -/** - * Module dependencies. - */ - -var gyp = require('../') -var log = require('npmlog') -var osenv = require('osenv') -var path = require('path') +const envPaths = require('env-paths') +const gyp = require('../') +const log = require('npmlog') +const os = require('os') /** * Process and execute the selected commands. */ -var prog = gyp() +const prog = gyp() var completed = false prog.parseArgv(process.argv) prog.devDir = prog.opts.devdir -var homeDir = osenv.home() +var homeDir = os.homedir() if (prog.devDir) { prog.devDir = prog.devDir.replace(/^~/, homeDir) } else if (homeDir) { - prog.devDir = path.resolve(homeDir, '.node-gyp') + prog.devDir = envPaths('node-gyp', { suffix: '' }).cache } else { throw new Error( "node-gyp requires that the user's home directory is specified " + - "in either of the environmental variables HOME or USERPROFILE. " + - "Overide with: --devdir /path/to/.node-gyp") + 'in either of the environmental variables HOME or USERPROFILE. ' + + 'Overide with: --devdir /path/to/.node-gyp') } if (prog.todo.length === 0) { @@ -42,7 +36,7 @@ if (prog.todo.length === 0) { } else { console.log('%s', prog.usage()) } - return process.exit(0) + process.exit(0) } log.info('it worked if it ends with', 'ok') @@ -50,7 +44,6 @@ log.verbose('cli', process.argv) log.info('using', 'node-gyp@%s', prog.version) log.info('using', 'node@%s | %s | %s', process.versions.node, process.platform, process.arch) - /** * Change dir if -C/--directory was passed. */ @@ -92,7 +85,7 @@ function run () { log.error('not ok') return process.exit(1) } - if (command.name == 'list') { + if (command.name === 'list') { var versions = arguments[1] if (versions.length > 0) { versions.forEach(function (version) { @@ -126,11 +119,11 @@ process.on('uncaughtException', function (err) { }) function errorMessage () { - // copied from npm's lib/util/error-handler.js + // copied from npm's lib/utils/error-handler.js var os = require('os') log.error('System', os.type() + ' ' + os.release()) log.error('command', process.argv - .map(JSON.stringify).join(' ')) + .map(JSON.stringify).join(' ')) log.error('cwd', process.cwd()) log.error('node -v', process.version) log.error('node-gyp -v', 'v' + prog.package.version) @@ -138,10 +131,10 @@ function errorMessage () { function issueMessage () { errorMessage() - log.error('', [ 'This is a bug in `node-gyp`.' - , 'Try to update node-gyp and file an Issue if it does not help:' - , ' ' - ].join('\n')) + log.error('', [ 'This is a bug in `node-gyp`.', + 'Try to update node-gyp and file an Issue if it does not help:', + ' ' + ].join('\n')) } // start running the given commands! diff --git a/deps/npm/node_modules/node-gyp/gyp/PRESUBMIT.py b/deps/npm/node_modules/node-gyp/gyp/PRESUBMIT.py index f6c8a357afe149..e52f9d2d22d607 100644 --- a/deps/npm/node_modules/node-gyp/gyp/PRESUBMIT.py +++ b/deps/npm/node_modules/node-gyp/gyp/PRESUBMIT.py @@ -76,8 +76,7 @@ def _LicenseHeader(input_api): # Accept any year number from 2009 to the current year. current_year = int(input_api.time.strftime('%Y')) - allowed_years = (str(s) for s in reversed(xrange(2009, current_year + 1))) - + allowed_years = (str(s) for s in reversed(range(2009, current_year + 1))) years_re = '(' + '|'.join(allowed_years) + ')' # The (c) is deprecated, but tolerate it until it's removed from all files. diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py index 593f0e5b0b2e88..0ec628cc1f759d 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py @@ -4,22 +4,17 @@ """New implementation of Visual Studio project generation.""" +import hashlib import os import random import gyp.common -# hashlib is supplied as of Python 2.5 as the replacement interface for md5 -# and other secure hashes. In 2.6, md5 is deprecated. Import hashlib if -# available, avoiding a deprecation warning under 2.6. Import md5 otherwise, -# preserving 2.4 compatibility. try: - import hashlib - _new_md5 = hashlib.md5 -except ImportError: - import md5 - _new_md5 = md5.new - + cmp +except NameError: + def cmp(x, y): + return (x > y) - (x < y) # Initialize random number generator random.seed() @@ -50,7 +45,7 @@ def MakeGuid(name, seed='msvs_new'): not change when the project for a target is rebuilt. """ # Calculate a MD5 signature for the seed and name. - d = _new_md5(str(seed) + str(name)).hexdigest().upper() + d = hashlib.md5(str(seed) + str(name)).hexdigest().upper() # Convert most of the signature to GUID form (discard the rest) guid = ('{' + d[:8] + '-' + d[8:12] + '-' + d[12:16] + '-' + d[16:20] + '-' + d[20:32] + '}') diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py index c2fb6f995c12f4..065a339a8025e5 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py @@ -14,6 +14,10 @@ MSBuild install directory, e.g. c:\Program Files (x86)\MSBuild """ +from __future__ import print_function + +from gyp import string_types + import sys import re @@ -106,11 +110,11 @@ class _String(_Type): """A setting that's just a string.""" def ValidateMSVS(self, value): - if not isinstance(value, basestring): + if not isinstance(value, string_types): raise ValueError('expected string; got %r' % value) def ValidateMSBuild(self, value): - if not isinstance(value, basestring): + if not isinstance(value, string_types): raise ValueError('expected string; got %r' % value) def ConvertToMSBuild(self, value): @@ -122,11 +126,11 @@ class _StringList(_Type): """A settings that's a list of strings.""" def ValidateMSVS(self, value): - if not isinstance(value, basestring) and not isinstance(value, list): + if not isinstance(value, string_types) and not isinstance(value, list): raise ValueError('expected string list; got %r' % value) def ValidateMSBuild(self, value): - if not isinstance(value, basestring) and not isinstance(value, list): + if not isinstance(value, string_types) and not isinstance(value, list): raise ValueError('expected string list; got %r' % value) def ConvertToMSBuild(self, value): @@ -400,7 +404,7 @@ def _ValidateExclusionSetting(setting, settings, error_msg, stderr=sys.stderr): if unrecognized: # We don't know this setting. Give a warning. - print >> stderr, error_msg + print(error_msg, file=stderr) def FixVCMacroSlashes(s): @@ -433,7 +437,7 @@ def ConvertVCMacrosToMSBuild(s): '$(PlatformName)': '$(Platform)', '$(SafeInputName)': '%(Filename)', } - for old, new in replace_map.iteritems(): + for old, new in replace_map.items(): s = s.replace(old, new) s = FixVCMacroSlashes(s) return s @@ -453,17 +457,17 @@ def ConvertToMSBuildSettings(msvs_settings, stderr=sys.stderr): dictionaries of settings and their values. """ msbuild_settings = {} - for msvs_tool_name, msvs_tool_settings in msvs_settings.iteritems(): + for msvs_tool_name, msvs_tool_settings in msvs_settings.items(): if msvs_tool_name in _msvs_to_msbuild_converters: msvs_tool = _msvs_to_msbuild_converters[msvs_tool_name] - for msvs_setting, msvs_value in msvs_tool_settings.iteritems(): + for msvs_setting, msvs_value in msvs_tool_settings.items(): if msvs_setting in msvs_tool: # Invoke the translation function. try: msvs_tool[msvs_setting](msvs_value, msbuild_settings) - except ValueError, e: - print >> stderr, ('Warning: while converting %s/%s to MSBuild, ' - '%s' % (msvs_tool_name, msvs_setting, e)) + except ValueError as e: + print('Warning: while converting %s/%s to MSBuild, ' + '%s' % (msvs_tool_name, msvs_setting, e), file=stderr) else: _ValidateExclusionSetting(msvs_setting, msvs_tool, @@ -472,8 +476,8 @@ def ConvertToMSBuildSettings(msvs_settings, stderr=sys.stderr): (msvs_tool_name, msvs_setting)), stderr) else: - print >> stderr, ('Warning: unrecognized tool %s while converting to ' - 'MSBuild.' % msvs_tool_name) + print('Warning: unrecognized tool %s while converting to ' + 'MSBuild.' % msvs_tool_name, file=stderr) return msbuild_settings @@ -513,13 +517,13 @@ def _ValidateSettings(validators, settings, stderr): for tool_name in settings: if tool_name in validators: tool_validators = validators[tool_name] - for setting, value in settings[tool_name].iteritems(): + for setting, value in settings[tool_name].items(): if setting in tool_validators: try: tool_validators[setting](value) - except ValueError, e: - print >> stderr, ('Warning: for %s/%s, %s' % - (tool_name, setting, e)) + except ValueError as e: + print('Warning: for %s/%s, %s' % + (tool_name, setting, e), file=stderr) else: _ValidateExclusionSetting(setting, tool_validators, @@ -528,7 +532,7 @@ def _ValidateSettings(validators, settings, stderr): stderr) else: - print >> stderr, ('Warning: unrecognized tool %s' % tool_name) + print('Warning: unrecognized tool %s' % (tool_name), file=stderr) # MSVS and MBuild names of the tools. @@ -539,6 +543,7 @@ def _ValidateSettings(validators, settings, stderr): _lib = _Tool('VCLibrarianTool', 'Lib') _manifest = _Tool('VCManifestTool', 'Manifest') _masm = _Tool('MASM', 'MASM') +_armasm = _Tool('ARMASM', 'ARMASM') _AddTool(_compile) @@ -548,6 +553,7 @@ def _ValidateSettings(validators, settings, stderr): _AddTool(_lib) _AddTool(_manifest) _AddTool(_masm) +_AddTool(_armasm) # Add sections only found in the MSBuild settings. _msbuild_validators[''] = {} _msbuild_validators['ProjectReference'] = {} diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py index 6c07e9a893bac0..2264d640152a29 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py @@ -91,7 +91,7 @@ def AddDebugSettings(self, config_name, command, environment = {}, if environment and isinstance(environment, dict): env_list = ['%s="%s"' % (key, val) - for (key,val) in environment.iteritems()] + for (key,val) in environment.items()] environment = ' '.join(env_list) else: environment = '' @@ -135,7 +135,7 @@ def AddDebugSettings(self, config_name, command, environment = {}, def WriteIfChanged(self): """Writes the user file.""" configs = ['Configurations'] - for config, spec in sorted(self.configurations.iteritems()): + for config, spec in sorted(self.configurations.items()): configs.append(spec) content = ['VisualStudioUserFile', diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py index 0b32e911807844..c8187eb3314471 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py @@ -235,7 +235,7 @@ def InsertLargePdbShims(target_list, target_dicts, vars): # Set up the shim to output its PDB to the same location as the final linker # target. - for config_name, config in shim_dict.get('configurations').iteritems(): + for config_name, config in shim_dict.get('configurations').items(): pdb_path = _GetPdbPath(target_dict, config_name, vars) # A few keys that we don't want to propagate. diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py index d9bfa684fa30c2..13d9777f0e1acc 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py @@ -158,7 +158,7 @@ def _RegistryQuery(key, value=None): text = None try: text = _RegistryQueryBase('Sysnative', key, value) - except OSError, e: + except OSError as e: if e.errno == errno.ENOENT: text = _RegistryQueryBase('System32', key, value) else: @@ -176,12 +176,18 @@ def _RegistryGetValueUsingWinReg(key, value): contents of the registry key's value, or None on failure. Throws ImportError if _winreg is unavailable. """ - import _winreg + try: + # Python 2 + from _winreg import HKEY_LOCAL_MACHINE, OpenKey, QueryValueEx + except ImportError: + # Python 3 + from winreg import HKEY_LOCAL_MACHINE, OpenKey, QueryValueEx + try: root, subkey = key.split('\\', 1) assert root == 'HKLM' # Only need HKLM for now. - with _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, subkey) as hkey: - return _winreg.QueryValueEx(hkey, value)[0] + with OpenKey(HKEY_LOCAL_MACHINE, subkey) as hkey: + return QueryValueEx(hkey, value)[0] except WindowsError: return None diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py index 668f38b60d0093..dee834013f4144 100755 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py @@ -4,9 +4,11 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +from __future__ import print_function + import copy import gyp.input -import optparse +import argparse import os.path import re import shlex @@ -14,6 +16,13 @@ import traceback from gyp.common import GypError +try: + # Python 2 + string_types = basestring +except NameError: + # Python 3 + string_types = str + # Default debug modes for GYP debug = {} @@ -34,8 +43,8 @@ def DebugOutput(mode, message, *args): pass if args: message %= args - print '%s:%s:%d:%s %s' % (mode.upper(), os.path.basename(ctx[0]), - ctx[1], ctx[2], message) + print('%s:%s:%d:%s %s' % (mode.upper(), os.path.basename(ctx[0]), + ctx[1], ctx[2], message)) def FindBuildFiles(): extension = '.gyp' @@ -207,7 +216,7 @@ def Noop(value): # We always want to ignore the environment when regenerating, to avoid # duplicate or changed flags in the environment at the time of regeneration. flags = ['--ignore-environment'] - for name, metadata in options._regeneration_metadata.iteritems(): + for name, metadata in options._regeneration_metadata.items(): opt = metadata['opt'] value = getattr(options, name) value_predicate = metadata['type'] == 'path' and FixPath or Noop @@ -226,24 +235,24 @@ def Noop(value): (action == 'store_false' and not value)): flags.append(opt) elif options.use_environment and env_name: - print >>sys.stderr, ('Warning: environment regeneration unimplemented ' + print('Warning: environment regeneration unimplemented ' 'for %s flag %r env_name %r' % (action, opt, - env_name)) + env_name), file=sys.stderr) else: - print >>sys.stderr, ('Warning: regeneration unimplemented for action %r ' - 'flag %r' % (action, opt)) + print('Warning: regeneration unimplemented for action %r ' + 'flag %r' % (action, opt), file=sys.stderr) return flags -class RegeneratableOptionParser(optparse.OptionParser): - def __init__(self): +class RegeneratableOptionParser(argparse.ArgumentParser): + def __init__(self, usage): self.__regeneratable_options = {} - optparse.OptionParser.__init__(self) + argparse.ArgumentParser.__init__(self, usage=usage) - def add_option(self, *args, **kw): + def add_argument(self, *args, **kw): """Add an option to the parser. - This accepts the same arguments as OptionParser.add_option, plus the + This accepts the same arguments as ArgumentParser.add_argument, plus the following: regenerate: can be set to False to prevent this option from being included in regeneration. @@ -260,7 +269,7 @@ def add_option(self, *args, **kw): # it as a string. type = kw.get('type') if type == 'path': - kw['type'] = 'string' + kw['type'] = str self.__regeneratable_options[dest] = { 'action': kw.get('action'), @@ -269,50 +278,50 @@ def add_option(self, *args, **kw): 'opt': args[0], } - optparse.OptionParser.add_option(self, *args, **kw) + argparse.ArgumentParser.add_argument(self, *args, **kw) def parse_args(self, *args): - values, args = optparse.OptionParser.parse_args(self, *args) + values, args = argparse.ArgumentParser.parse_known_args(self, *args) values._regeneration_metadata = self.__regeneratable_options return values, args def gyp_main(args): my_name = os.path.basename(sys.argv[0]) + usage = 'usage: %(prog)s [options ...] [build_file ...]' + - parser = RegeneratableOptionParser() - usage = 'usage: %s [options ...] [build_file ...]' - parser.set_usage(usage.replace('%s', '%prog')) - parser.add_option('--build', dest='configs', action='append', + parser = RegeneratableOptionParser(usage=usage.replace('%s', '%(prog)s')) + parser.add_argument('--build', dest='configs', action='append', help='configuration for build after project generation') - parser.add_option('--check', dest='check', action='store_true', + parser.add_argument('--check', dest='check', action='store_true', help='check format of gyp files') - parser.add_option('--config-dir', dest='config_dir', action='store', + parser.add_argument('--config-dir', dest='config_dir', action='store', env_name='GYP_CONFIG_DIR', default=None, help='The location for configuration files like ' 'include.gypi.') - parser.add_option('-d', '--debug', dest='debug', metavar='DEBUGMODE', + parser.add_argument('-d', '--debug', dest='debug', metavar='DEBUGMODE', action='append', default=[], help='turn on a debugging ' 'mode for debugging GYP. Supported modes are "variables", ' '"includes" and "general" or "all" for all of them.') - parser.add_option('-D', dest='defines', action='append', metavar='VAR=VAL', + parser.add_argument('-D', dest='defines', action='append', metavar='VAR=VAL', env_name='GYP_DEFINES', help='sets variable VAR to value VAL') - parser.add_option('--depth', dest='depth', metavar='PATH', type='path', + parser.add_argument('--depth', dest='depth', metavar='PATH', type='path', help='set DEPTH gyp variable to a relative path to PATH') - parser.add_option('-f', '--format', dest='formats', action='append', + parser.add_argument('-f', '--format', dest='formats', action='append', env_name='GYP_GENERATORS', regenerate=False, help='output formats to generate') - parser.add_option('-G', dest='generator_flags', action='append', default=[], + parser.add_argument('-G', dest='generator_flags', action='append', default=[], metavar='FLAG=VAL', env_name='GYP_GENERATOR_FLAGS', help='sets generator flag FLAG to VAL') - parser.add_option('--generator-output', dest='generator_output', + parser.add_argument('--generator-output', dest='generator_output', action='store', default=None, metavar='DIR', type='path', env_name='GYP_GENERATOR_OUTPUT', help='puts generated build files under DIR') - parser.add_option('--ignore-environment', dest='use_environment', + parser.add_argument('--ignore-environment', dest='use_environment', action='store_false', default=True, regenerate=False, help='do not read options from environment variables') - parser.add_option('-I', '--include', dest='includes', action='append', + parser.add_argument('-I', '--include', dest='includes', action='append', metavar='INCLUDE', type='path', help='files to include in all loaded .gyp files') # --no-circular-check disables the check for circular relationships between @@ -322,7 +331,7 @@ def gyp_main(args): # option allows the strict behavior to be used on Macs and the lenient # behavior to be used elsewhere. # TODO(mark): Remove this option when http://crbug.com/35878 is fixed. - parser.add_option('--no-circular-check', dest='circular_check', + parser.add_argument('--no-circular-check', dest='circular_check', action='store_false', default=True, regenerate=False, help="don't check for circular relationships between files") # --no-duplicate-basename-check disables the check for duplicate basenames @@ -331,18 +340,18 @@ def gyp_main(args): # when duplicate basenames are passed into Make generator on Mac. # TODO(yukawa): Remove this option when these legacy generators are # deprecated. - parser.add_option('--no-duplicate-basename-check', + parser.add_argument('--no-duplicate-basename-check', dest='duplicate_basename_check', action='store_false', default=True, regenerate=False, help="don't check for duplicate basenames") - parser.add_option('--no-parallel', action='store_true', default=False, + parser.add_argument('--no-parallel', action='store_true', default=False, help='Disable multiprocessing') - parser.add_option('-S', '--suffix', dest='suffix', default='', + parser.add_argument('-S', '--suffix', dest='suffix', default='', help='suffix to add to generated files') - parser.add_option('--toplevel-dir', dest='toplevel_dir', action='store', + parser.add_argument('--toplevel-dir', dest='toplevel_dir', action='store', default=None, metavar='DIR', type='path', help='directory to use as the root of the source tree') - parser.add_option('-R', '--root-target', dest='root_targets', + parser.add_argument('-R', '--root-target', dest='root_targets', action='append', metavar='TARGET', help='include only TARGET and its deep dependencies') @@ -410,7 +419,7 @@ def gyp_main(args): for option, value in sorted(options.__dict__.items()): if option[0] == '_': continue - if isinstance(value, basestring): + if isinstance(value, string_types): DebugOutput(DEBUG_GENERAL, " %s: '%s'", option, value) else: DebugOutput(DEBUG_GENERAL, " %s: %s", option, value) @@ -432,7 +441,7 @@ def gyp_main(args): build_file_dir = os.path.abspath(os.path.dirname(build_file)) build_file_dir_components = build_file_dir.split(os.path.sep) components_len = len(build_file_dir_components) - for index in xrange(components_len - 1, -1, -1): + for index in range(components_len - 1, -1, -1): if build_file_dir_components[index] == 'src': options.depth = os.path.sep.join(build_file_dir_components) break @@ -475,7 +484,7 @@ def gyp_main(args): if home_dot_gyp != None: default_include = os.path.join(home_dot_gyp, 'include.gypi') if os.path.exists(default_include): - print 'Using overrides found in ' + default_include + print('Using overrides found in ' + default_include) includes.append(default_include) # Command-line --include files come after the default include. @@ -536,7 +545,7 @@ def gyp_main(args): def main(args): try: return gyp_main(args) - except GypError, e: + except GypError as e: sys.stderr.write("gyp: %s\n" % e) return 1 diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py index 501118796f00d3..834a8e6c951992 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py @@ -2,8 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -from __future__ import with_statement - import collections import errno import filecmp @@ -363,7 +361,7 @@ def close(self): same = False try: same = filecmp.cmp(self.tmp_path, filename, False) - except OSError, e: + except OSError as e: if e.errno != errno.ENOENT: raise @@ -382,9 +380,9 @@ def close(self): # # No way to get the umask without setting a new one? Set a safe one # and then set it back to the old value. - umask = os.umask(077) + umask = os.umask(0o77) os.umask(umask) - os.chmod(self.tmp_path, 0666 & ~umask) + os.chmod(self.tmp_path, 0o666 & ~umask) if sys.platform == 'win32' and os.path.exists(filename): # NOTE: on windows (but not cygwin) rename will not replace an # existing file, so it must be preceded with a remove. Sadly there @@ -464,7 +462,7 @@ def CopyTool(flavor, out_path): ''.join([source[0], '# Generated by gyp. Do not edit.\n'] + source[1:])) # Make file executable. - os.chmod(tool_path, 0755) + os.chmod(tool_path, 0o755) # From Alex Martelli, diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py index 841f31f925b053..7c3f621f1faff0 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py @@ -5,6 +5,7 @@ import re import os import locale +from functools import reduce def XmlToString(content, encoding='utf-8', pretty=False): @@ -80,7 +81,7 @@ def _ConstructContentList(xml_parts, specification, pretty, level=0): # Optionally in second position is a dictionary of the attributes. rest = specification[1:] if rest and isinstance(rest[0], dict): - for at, val in sorted(rest[0].iteritems()): + for at, val in sorted(rest[0].items()): xml_parts.append(' %s="%s"' % (at, _XmlEscape(val, attr=True))) rest = rest[1:] if rest: diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py index b38d8660f72853..81fb79d136a0a5 100755 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py @@ -39,7 +39,7 @@ def ExecFlock(self, lockfile, *cmd_list): # where fcntl.flock(fd, LOCK_EX) always fails # with EBADF, that's why we use this F_SETLK # hack instead. - fd = os.open(lockfile, os.O_WRONLY|os.O_NOCTTY|os.O_CREAT, 0666) + fd = os.open(lockfile, os.O_WRONLY|os.O_NOCTTY|os.O_CREAT, 0o666) if sys.platform.startswith('aix'): # Python on AIX is compiled with LARGEFILE support, which changes the # struct size. diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py index 921c1a6b714328..dc17c96524fddb 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py @@ -62,6 +62,8 @@ then the "all" target includes "b1" and "b2". """ +from __future__ import print_function + import gyp.common import gyp.ninja_syntax as ninja_syntax import json @@ -155,7 +157,7 @@ def _AddSources(sources, base_path, base_path_components, result): continue result.append(base_path + source) if debug: - print 'AddSource', org_source, result[len(result) - 1] + print('AddSource', org_source, result[len(result) - 1]) def _ExtractSourcesFromAction(action, base_path, base_path_components, @@ -185,7 +187,7 @@ def _ExtractSources(target, target_dict, toplevel_dir): base_path += '/' if debug: - print 'ExtractSources', target, base_path + print('ExtractSources', target, base_path) results = [] if 'sources' in target_dict: @@ -278,7 +280,7 @@ def _WasBuildFileModified(build_file, data, files, toplevel_dir): the root of the source tree.""" if _ToLocalPath(toplevel_dir, _ToGypPath(build_file)) in files: if debug: - print 'gyp file modified', build_file + print('gyp file modified', build_file) return True # First element of included_files is the file itself. @@ -291,8 +293,8 @@ def _WasBuildFileModified(build_file, data, files, toplevel_dir): _ToGypPath(gyp.common.UnrelativePath(include_file, build_file)) if _ToLocalPath(toplevel_dir, rel_include_file) in files: if debug: - print 'included gyp file modified, gyp_file=', build_file, \ - 'included file=', rel_include_file + print('included gyp file modified, gyp_file=', build_file, + 'included file=', rel_include_file) return True return False @@ -373,7 +375,7 @@ def _GenerateTargets(data, target_list, target_dicts, toplevel_dir, files, # If a build file (or any of its included files) is modified we assume all # targets in the file are modified. if build_file_in_files[build_file]: - print 'matching target from modified build file', target_name + print('matching target from modified build file', target_name) target.match_status = MATCH_STATUS_MATCHES matching_targets.append(target) else: @@ -381,7 +383,7 @@ def _GenerateTargets(data, target_list, target_dicts, toplevel_dir, files, toplevel_dir) for source in sources: if _ToGypPath(os.path.normpath(source)) in files: - print 'target', target_name, 'matches', source + print('target', target_name, 'matches', source) target.match_status = MATCH_STATUS_MATCHES matching_targets.append(target) break @@ -433,7 +435,7 @@ def _DoesTargetDependOnMatchingTargets(target): for dep in target.deps: if _DoesTargetDependOnMatchingTargets(dep): target.match_status = MATCH_STATUS_MATCHES_BY_DEPENDENCY - print '\t', target.name, 'matches by dep', dep.name + print('\t', target.name, 'matches by dep', dep.name) return True target.match_status = MATCH_STATUS_DOESNT_MATCH return False @@ -445,7 +447,7 @@ def _GetTargetsDependingOnMatchingTargets(possible_targets): supplied as input to analyzer. possible_targets: targets to search from.""" found = [] - print 'Targets that matched by dependency:' + print('Targets that matched by dependency:') for target in possible_targets: if _DoesTargetDependOnMatchingTargets(target): found.append(target) @@ -484,12 +486,12 @@ def _AddCompileTargets(target, roots, add_if_no_ancestor, result): (add_if_no_ancestor or target.requires_build)) or (target.is_static_library and add_if_no_ancestor and not target.is_or_has_linked_ancestor)): - print '\t\tadding to compile targets', target.name, 'executable', \ - target.is_executable, 'added_to_compile_targets', \ - target.added_to_compile_targets, 'add_if_no_ancestor', \ - add_if_no_ancestor, 'requires_build', target.requires_build, \ - 'is_static_library', target.is_static_library, \ - 'is_or_has_linked_ancestor', target.is_or_has_linked_ancestor + print('\t\tadding to compile targets', target.name, 'executable', + target.is_executable, 'added_to_compile_targets', + target.added_to_compile_targets, 'add_if_no_ancestor', + add_if_no_ancestor, 'requires_build', target.requires_build, + 'is_static_library', target.is_static_library, + 'is_or_has_linked_ancestor', target.is_or_has_linked_ancestor) result.add(target) target.added_to_compile_targets = True @@ -500,7 +502,7 @@ def _GetCompileTargets(matching_targets, supplied_targets): supplied_targets: set of targets supplied to analyzer to search from.""" result = set() for target in matching_targets: - print 'finding compile targets for match', target.name + print('finding compile targets for match', target.name) _AddCompileTargets(target, supplied_targets, True, result) return result @@ -508,46 +510,46 @@ def _GetCompileTargets(matching_targets, supplied_targets): def _WriteOutput(params, **values): """Writes the output, either to stdout or a file is specified.""" if 'error' in values: - print 'Error:', values['error'] + print('Error:', values['error']) if 'status' in values: - print values['status'] + print(values['status']) if 'targets' in values: values['targets'].sort() - print 'Supplied targets that depend on changed files:' + print('Supplied targets that depend on changed files:') for target in values['targets']: - print '\t', target + print('\t', target) if 'invalid_targets' in values: values['invalid_targets'].sort() - print 'The following targets were not found:' + print('The following targets were not found:') for target in values['invalid_targets']: - print '\t', target + print('\t', target) if 'build_targets' in values: values['build_targets'].sort() - print 'Targets that require a build:' + print('Targets that require a build:') for target in values['build_targets']: - print '\t', target + print('\t', target) if 'compile_targets' in values: values['compile_targets'].sort() - print 'Targets that need to be built:' + print('Targets that need to be built:') for target in values['compile_targets']: - print '\t', target + print('\t', target) if 'test_targets' in values: values['test_targets'].sort() - print 'Test targets:' + print('Test targets:') for target in values['test_targets']: - print '\t', target + print('\t', target) output_path = params.get('generator_flags', {}).get( 'analyzer_output_path', None) if not output_path: - print json.dumps(values) + print(json.dumps(values)) return try: f = open(output_path, 'w') f.write(json.dumps(values) + '\n') f.close() except IOError as e: - print 'Error writing to output file', output_path, str(e) + print('Error writing to output file', output_path, str(e)) def _WasGypIncludeFileModified(params, files): @@ -556,7 +558,7 @@ def _WasGypIncludeFileModified(params, files): if params['options'].includes: for include in params['options'].includes: if _ToGypPath(os.path.normpath(include)) in files: - print 'Include file modified, assuming all changed', include + print('Include file modified, assuming all changed', include) return True return False @@ -638,13 +640,13 @@ def find_matching_test_target_names(self): set(self._root_targets))] else: test_targets = [x for x in test_targets_no_all] - print 'supplied test_targets' + print('supplied test_targets') for target_name in self._test_target_names: - print '\t', target_name - print 'found test_targets' + print('\t', target_name) + print('found test_targets') for target in test_targets: - print '\t', target.name - print 'searching for matching test targets' + print('\t', target.name) + print('searching for matching test targets') matching_test_targets = _GetTargetsDependingOnMatchingTargets(test_targets) matching_test_targets_contains_all = (test_target_names_contains_all and set(matching_test_targets) & @@ -654,14 +656,14 @@ def find_matching_test_target_names(self): # 'all' is subsequentely added to the matching names below. matching_test_targets = [x for x in (set(matching_test_targets) & set(test_targets_no_all))] - print 'matched test_targets' + print('matched test_targets') for target in matching_test_targets: - print '\t', target.name + print('\t', target.name) matching_target_names = [gyp.common.ParseQualifiedTarget(target.name)[1] for target in matching_test_targets] if matching_test_targets_contains_all: matching_target_names.append('all') - print '\tall' + print('\tall') return matching_target_names def find_matching_compile_target_names(self): @@ -677,10 +679,10 @@ def find_matching_compile_target_names(self): if 'all' in self._supplied_target_names(): supplied_targets = [x for x in (set(supplied_targets) | set(self._root_targets))] - print 'Supplied test_targets & compile_targets' + print('Supplied test_targets & compile_targets') for target in supplied_targets: - print '\t', target.name - print 'Finding compile targets' + print('\t', target.name) + print('Finding compile targets') compile_targets = _GetCompileTargets(self._changed_targets, supplied_targets) return [gyp.common.ParseQualifiedTarget(target.name)[1] @@ -699,7 +701,7 @@ def GenerateOutput(target_list, target_dicts, data, params): toplevel_dir = _ToGypPath(os.path.abspath(params['options'].toplevel_dir)) if debug: - print 'toplevel_dir', toplevel_dir + print('toplevel_dir', toplevel_dir) if _WasGypIncludeFileModified(params, config.files): result_dict = { 'status': all_changed_string, diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py index 5b26cc785a80e8..b7f98428881af8 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py @@ -14,6 +14,8 @@ # variables set potentially clash with other Android build system variables. # Try to avoid setting global variables where possible. +from __future__ import print_function + import gyp import gyp.common import gyp.generator.make as make # Reuse global functions from make backend. @@ -250,7 +252,7 @@ def WriteActions(self, actions, extra_sources, extra_outputs): dirs = set() for out in outputs: if not out.startswith('$'): - print ('WARNING: Action for target "%s" writes output to local path ' + print('WARNING: Action for target "%s" writes output to local path ' '"%s".' % (self.target, out)) dir = os.path.split(out)[0] if dir: @@ -355,7 +357,7 @@ def WriteRules(self, rules, extra_sources, extra_outputs): dirs = set() for out in outputs: if not out.startswith('$'): - print ('WARNING: Rule for target %s writes output to local path %s' + print('WARNING: Rule for target %s writes output to local path %s' % (self.target, out)) dir = os.path.dirname(out) if dir: @@ -429,7 +431,7 @@ def WriteCopies(self, copies, extra_outputs): # $(gyp_shared_intermediate_dir). Note that we can't use an assertion # because some of the gyp tests depend on this. if not copy['destination'].startswith('$'): - print ('WARNING: Copy rule for target %s writes output to ' + print('WARNING: Copy rule for target %s writes output to ' 'local path %s' % (self.target, copy['destination'])) # LocalPathify() calls normpath, stripping trailing slashes. @@ -458,7 +460,7 @@ def WriteSourceFlags(self, spec, configs): Args: spec, configs: input from gyp. """ - for configname, config in sorted(configs.iteritems()): + for configname, config in sorted(configs.items()): extracted_includes = [] self.WriteLn('\n# Flags passed to both C and C++ files.') @@ -636,7 +638,7 @@ def ComputeOutputParts(self, spec): elif self.type == 'none': target_ext = '.stamp' elif self.type != 'executable': - print ("ERROR: What output file should be generated?", + print("ERROR: What output file should be generated?", "type", self.type, "target", target) if self.type != 'static_library' and self.type != 'shared_library': @@ -788,7 +790,7 @@ def WriteTargetFlags(self, spec, configs, link_deps): static_libs, dynamic_libs, ldflags_libs = self.FilterLibraries(libraries) if self.type != 'static_library': - for configname, config in sorted(configs.iteritems()): + for configname, config in sorted(configs.items()): ldflags = list(config.get('ldflags', [])) self.WriteLn('') self.WriteList(ldflags, 'LOCAL_LDFLAGS_%s' % configname) @@ -837,7 +839,7 @@ def WriteTarget(self, spec, configs, deps, link_deps, part_of_all, settings = spec.get('aosp_build_settings', {}) if settings: self.WriteLn('### Set directly by aosp_build_settings.') - for k, v in settings.iteritems(): + for k, v in settings.items(): if isinstance(v, list): self.WriteList(v, k) else: @@ -956,7 +958,7 @@ def PerformBuild(data, configurations, params): env = dict(os.environ) env['ONE_SHOT_MAKEFILE'] = makefile arguments = ['make', '-C', os.environ['ANDROID_BUILD_TOP'], 'gyp_all_modules'] - print 'Building: %s' % arguments + print('Building: %s' % arguments) subprocess.check_call(arguments, env=env) @@ -1065,7 +1067,7 @@ def CalculateMakefilePath(build_file, base_name): write_alias_target=write_alias_targets, sdk_version=sdk_version) if android_module in android_modules: - print ('ERROR: Android module names must be unique. The following ' + print('ERROR: Android module names must be unique. The following ' 'targets both generate Android module name %s.\n %s\n %s' % (android_module, android_modules[android_module], qualified_target)) diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py index 17f5e6396c6303..7aabddb6331c64 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py @@ -28,6 +28,8 @@ CMakeLists.txt file. """ +from __future__ import print_function + import multiprocessing import os import signal @@ -639,8 +641,8 @@ def WriteTarget(namer, qualified_target, target_dicts, build_dir, config_to_use, cmake_target_type = cmake_target_type_from_gyp_target_type.get(target_type) if cmake_target_type is None: - print ('Target %s has unknown target type %s, skipping.' % - ( target_name, target_type ) ) + print('Target %s has unknown target type %s, skipping.' % + ( target_name, target_type )) return SetVariable(output, 'TARGET', target_name) @@ -863,7 +865,7 @@ def WriteTarget(namer, qualified_target, target_dicts, build_dir, config_to_use, default_product_ext = generator_default_variables['SHARED_LIB_SUFFIX'] elif target_type != 'executable': - print ('ERROR: What output file should be generated?', + print('ERROR: What output file should be generated?', 'type', target_type, 'target', target_name) product_prefix = spec.get('product_prefix', default_product_prefix) @@ -1180,11 +1182,11 @@ def PerformBuild(data, configurations, params): output_dir, config_name)) arguments = ['cmake', '-G', 'Ninja'] - print 'Generating [%s]: %s' % (config_name, arguments) + print('Generating [%s]: %s' % (config_name, arguments)) subprocess.check_call(arguments, cwd=build_dir) arguments = ['ninja', '-C', build_dir] - print 'Building [%s]: %s' % (config_name, arguments) + print('Building [%s]: %s' % (config_name, arguments)) subprocess.check_call(arguments) @@ -1212,7 +1214,7 @@ def GenerateOutput(target_list, target_dicts, data, params): arglists.append((target_list, target_dicts, data, params, config_name)) pool.map(CallGenerateOutputForConfig, arglists) - except KeyboardInterrupt, e: + except KeyboardInterrupt as e: pool.terminate() raise e else: diff --git a/deps/npm/node_modules/node-gyp/tools/gyp/pylib/gyp/generator/compile_commands_json.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py similarity index 100% rename from deps/npm/node_modules/node-gyp/tools/gyp/pylib/gyp/generator/compile_commands_json.py rename to deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py index 160eafe2efeca0..8e4f3168f3e7ef 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py @@ -1,3 +1,4 @@ +from __future__ import print_function # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -96,4 +97,4 @@ def GenerateOutput(target_list, target_dicts, data, params): f = open(filename, 'w') json.dump(edges, f) f.close() - print 'Wrote json to %s.' % filename + print('Wrote json to %s.' % filename) diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py index f4c7c12f597e69..69b24d947a9737 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py @@ -141,7 +141,7 @@ def GetAllIncludeDirectories(target_list, target_dicts, compiler_includes_list.append(include_dir) # Find standard gyp include dirs. - if config.has_key('include_dirs'): + if 'include_dirs' in config: include_dirs = config['include_dirs'] for shared_intermediate_dir in shared_intermediate_dirs: for include_dir in include_dirs: diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py index 3efdb9966a69a1..78eeaa61b2294a 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py @@ -88,7 +88,7 @@ def GenerateOutput(target_list, target_dicts, data, params): if not output_file in output_files: output_files[output_file] = input_file - for output_file, input_file in output_files.iteritems(): + for output_file, input_file in output_files.items(): output = open(output_file, 'w') pprint.pprint(data[input_file], output) output.close() diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py index fe801b77ce3b93..37ac255bfa66da 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py @@ -21,6 +21,8 @@ # toplevel Makefile. It may make sense to generate some .mk files on # the side to keep the files readable. +from __future__ import print_function + import os import re import sys @@ -672,14 +674,13 @@ def _ValidateSourcesForOSX(spec, all_sources): basenames.setdefault(basename, []).append(source) error = '' - for basename, files in basenames.iteritems(): + for basename, files in basenames.items(): if len(files) > 1: error += ' %s: %s\n' % (basename, ' '.join(files)) if error: - print('static library %s has several files with the same basename:\n' % - spec['target_name'] + error + 'libtool on OS X will generate' + - ' warnings for them.') + print(('static library %s has several files with the same basename:\n' % spec['target_name']) + + error + 'libtool on OS X will generate' + ' warnings for them.') raise GypError('Duplicate basenames in sources section, see list above') @@ -1381,7 +1382,7 @@ def ComputeOutputBasename(self, spec): elif self.type == 'none': target = '%s.stamp' % target elif self.type != 'executable': - print ("ERROR: What output file should be generated?", + print("ERROR: What output file should be generated?", "type", self.type, "target", target) target_prefix = spec.get('product_prefix', target_prefix) @@ -1546,7 +1547,7 @@ def WriteTarget(self, spec, configs, deps, link_deps, bundle_deps, # Postbuilds expect to be run in the gyp file's directory, so insert an # implicit postbuild to cd to there. postbuilds.insert(0, gyp.common.EncodePOSIXShellList(['cd', self.path])) - for i in xrange(len(postbuilds)): + for i in range(len(postbuilds)): if not postbuilds[i].startswith('$'): postbuilds[i] = EscapeShellArgument(postbuilds[i]) self.WriteLn('%s: builddir := $(abs_builddir)' % QuoteSpaces(self.output)) @@ -1638,7 +1639,7 @@ def WriteTarget(self, spec, configs, deps, link_deps, bundle_deps, self.WriteDoCmd([self.output_binary], deps, 'touch', part_of_all, postbuilds=postbuilds) else: - print "WARNING: no output for", self.type, target + print("WARNING: no output for", self.type, self.target) # Add an alias for each target (if there are any outputs). # Installable target aliases are created below. @@ -1992,7 +1993,7 @@ def PerformBuild(data, configurations, params): if options.toplevel_dir and options.toplevel_dir != '.': arguments += '-C', options.toplevel_dir arguments.append('BUILDTYPE=' + config) - print 'Building [%s]: %s' % (config, arguments) + print('Building [%s]: %s' % (config, arguments)) subprocess.check_call(arguments) @@ -2058,6 +2059,14 @@ def CalculateMakefilePath(build_file, base_name): 'srcdir': srcdir, 'copy_archive_args': copy_archive_arguments, 'makedep_args': makedep_arguments, + 'CC.target': GetEnvironFallback(('CC_target', 'CC'), '$(CC)'), + 'AR.target': GetEnvironFallback(('AR_target', 'AR'), '$(AR)'), + 'CXX.target': GetEnvironFallback(('CXX_target', 'CXX'), '$(CXX)'), + 'LINK.target': GetEnvironFallback(('LINK_target', 'LINK'), '$(LINK)'), + 'CC.host': GetEnvironFallback(('CC_host', 'CC'), 'gcc'), + 'AR.host': GetEnvironFallback(('AR_host', 'AR'), 'ar'), + 'CXX.host': GetEnvironFallback(('CXX_host', 'CXX'), 'g++'), + 'LINK.host': GetEnvironFallback(('LINK_host', 'LINK'), '$(CXX.host)'), } if flavor == 'mac': flock_command = './gyp-mac-tool flock' @@ -2078,6 +2087,10 @@ def CalculateMakefilePath(build_file, base_name): 'copy_archive_args': copy_archive_arguments, 'makedep_args': makedep_arguments, 'link_commands': LINK_COMMANDS_OS390, + 'CC.target': GetEnvironFallback(('CC_target', 'CC'), 'njsc'), + 'CXX.target': GetEnvironFallback(('CXX_target', 'CXX'), 'njsc++'), + 'CC.host': GetEnvironFallback(('CC_host', 'CC'), 'njsc'), + 'CXX.host': GetEnvironFallback(('CXX_host', 'CXX'), 'njsc++'), }) elif flavor == 'solaris': header_params.update({ @@ -2103,17 +2116,6 @@ def CalculateMakefilePath(build_file, base_name): 'flock_index': 2, }) - header_params.update({ - 'CC.target': GetEnvironFallback(('CC_target', 'CC'), '$(CC)'), - 'AR.target': GetEnvironFallback(('AR_target', 'AR'), '$(AR)'), - 'CXX.target': GetEnvironFallback(('CXX_target', 'CXX'), '$(CXX)'), - 'LINK.target': GetEnvironFallback(('LINK_target', 'LINK'), '$(LINK)'), - 'CC.host': GetEnvironFallback(('CC_host', 'CC'), 'gcc'), - 'AR.host': GetEnvironFallback(('AR_host', 'AR'), 'ar'), - 'CXX.host': GetEnvironFallback(('CXX_host', 'CXX'), 'g++'), - 'LINK.host': GetEnvironFallback(('LINK_host', 'LINK'), '$(CXX.host)'), - }) - build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0]) make_global_settings_array = data[build_file].get('make_global_settings', []) wrappers = {} diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py index 1b383dffe87184..aacbe608360e90 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py @@ -2,6 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +from __future__ import print_function + import copy import ntpath import os @@ -86,6 +88,7 @@ def _import_OrderedDict(): 'msvs_enable_winrt', 'msvs_requires_importlibrary', 'msvs_enable_winphone', + 'msvs_enable_marmasm', 'msvs_application_type_revision', 'msvs_target_platform_version', 'msvs_target_platform_minversion', @@ -449,7 +452,7 @@ def _AddCustomBuildToolForMSVS(p, spec, primary_input, 'CommandLine': cmd, }) # Add to the properties of primary input for each config. - for config_name, c_data in spec['configurations'].iteritems(): + for config_name, c_data in spec['configurations'].items(): p.AddFileConfig(_FixPath(primary_input), _ConfigFullName(config_name, c_data), tools=[tool]) @@ -755,8 +758,8 @@ def _Replace(match): # the VCProj but cause the same problem on the final command-line. Moving # the item to the end of the list does works, but that's only possible if # there's only one such item. Let's just warn the user. - print >> sys.stderr, ('Warning: MSVS may misinterpret the odd number of ' + - 'quotes in ' + s) + print('Warning: MSVS may misinterpret the odd number of ' + + 'quotes in ' + s, file=sys.stderr) return s @@ -969,13 +972,13 @@ def _ValidateSourcesForMSVSProject(spec, version): basenames.setdefault(basename, []).append(source) error = '' - for basename, files in basenames.iteritems(): + for basename, files in basenames.items(): if len(files) > 1: error += ' %s: %s\n' % (basename, ' '.join(files)) if error: - print('static library %s has several files with the same basename:\n' % - spec['target_name'] + error + 'MSVC08 cannot handle that.') + print('static library %s has several files with the same basename:\n' % spec['target_name'] + + error + 'MSVC08 cannot handle that.') raise GypError('Duplicate basenames in sources section, see list above') @@ -1001,7 +1004,7 @@ def _GenerateMSVSProject(project, options, version, generator_flags): relative_path_of_gyp_file = gyp.common.RelativePath(gyp_path, project_dir) config_type = _GetMSVSConfigurationType(spec, project.build_file) - for config_name, config in spec['configurations'].iteritems(): + for config_name, config in spec['configurations'].items(): _AddConfigurationToMSVSProject(p, spec, config_type, config_name, config) # MSVC08 and prior version cannot handle duplicate basenames in the same @@ -1367,10 +1370,10 @@ def _ConvertToolsToExpectedForm(tools): A list of Tool objects. """ tool_list = [] - for tool, settings in tools.iteritems(): + for tool, settings in tools.items(): # Collapse settings with lists. settings_fixed = {} - for setting, value in settings.iteritems(): + for setting, value in settings.items(): if type(value) == list: if ((tool == 'VCLinkerTool' and setting == 'AdditionalDependencies') or @@ -1545,7 +1548,7 @@ def _IdlFilesHandledNonNatively(spec, sources): def _GetPrecompileRelatedFiles(spec): # Gather a list of precompiled header related sources. precompiled_related = [] - for _, config in spec['configurations'].iteritems(): + for _, config in spec['configurations'].items(): for k in precomp_keys: f = config.get(k) if f: @@ -1556,7 +1559,7 @@ def _GetPrecompileRelatedFiles(spec): def _ExcludeFilesFromBeingBuilt(p, spec, excluded_sources, excluded_idl, list_excluded): exclusions = _GetExcludedFilesFromBuild(spec, excluded_sources, excluded_idl) - for file_name, excluded_configs in exclusions.iteritems(): + for file_name, excluded_configs in exclusions.items(): if (not list_excluded and len(excluded_configs) == len(spec['configurations'])): # If we're not listing excluded files, then they won't appear in the @@ -1573,7 +1576,7 @@ def _GetExcludedFilesFromBuild(spec, excluded_sources, excluded_idl): # Exclude excluded sources from being built. for f in excluded_sources: excluded_configs = [] - for config_name, config in spec['configurations'].iteritems(): + for config_name, config in spec['configurations'].items(): precomped = [_FixPath(config.get(i, '')) for i in precomp_keys] # Don't do this for ones that are precompiled header related. if f not in precomped: @@ -1583,7 +1586,7 @@ def _GetExcludedFilesFromBuild(spec, excluded_sources, excluded_idl): # Exclude them now. for f in excluded_idl: excluded_configs = [] - for config_name, config in spec['configurations'].iteritems(): + for config_name, config in spec['configurations'].items(): excluded_configs.append((config_name, config)) exclusions[f] = excluded_configs return exclusions @@ -1592,7 +1595,7 @@ def _GetExcludedFilesFromBuild(spec, excluded_sources, excluded_idl): def _AddToolFilesToMSVS(p, spec): # Add in tool files (rules). tool_files = OrderedSet() - for _, config in spec['configurations'].iteritems(): + for _, config in spec['configurations'].items(): for f in config.get('msvs_tool_files', []): tool_files.add(f) for f in tool_files: @@ -1605,7 +1608,7 @@ def _HandlePreCompiledHeaders(p, sources, spec): # kind (i.e. C vs. C++) as the precompiled header source stub needs # to have use of precompiled headers disabled. extensions_excluded_from_precompile = [] - for config_name, config in spec['configurations'].iteritems(): + for config_name, config in spec['configurations'].items(): source = config.get('msvs_precompiled_source') if source: source = _FixPath(source) @@ -1626,7 +1629,7 @@ def DisableForSourceTree(source_tree): else: basename, extension = os.path.splitext(source) if extension in extensions_excluded_from_precompile: - for config_name, config in spec['configurations'].iteritems(): + for config_name, config in spec['configurations'].items(): tool = MSVSProject.Tool('VCCLCompilerTool', {'UsePrecompiledHeader': '0', 'ForcedIncludeFiles': '$(NOINHERIT)'}) @@ -1677,7 +1680,7 @@ def _WriteMSVSUserFile(project_path, version, spec): return # Nothing to add # Write out the user file. user_file = _CreateMSVSUserFile(project_path, version, spec) - for config_name, c_data in spec['configurations'].iteritems(): + for config_name, c_data in spec['configurations'].items(): user_file.AddDebugSettings(_ConfigFullName(config_name, c_data), action, environment, working_directory) user_file.WriteIfChanged() @@ -1728,7 +1731,7 @@ def _GetPathDict(root, path): def _DictsToFolders(base_path, bucket, flat): # Convert to folders recursively. children = [] - for folder, contents in bucket.iteritems(): + for folder, contents in bucket.items(): if type(contents) == dict: folder_children = _DictsToFolders(os.path.join(base_path, folder), contents, flat) @@ -1800,7 +1803,7 @@ def _GetPlatformOverridesOfProject(spec): # Prepare a dict indicating which project configurations are used for which # solution configurations for this target. config_platform_overrides = {} - for config_name, c in spec['configurations'].iteritems(): + for config_name, c in spec['configurations'].items(): config_fullname = _ConfigFullName(config_name, c) platform = c.get('msvs_target_platform', _ConfigPlatform(c)) fixed_config_fullname = '%s|%s' % ( @@ -1941,7 +1944,7 @@ def PerformBuild(data, configurations, params): msvs_version = params['msvs_version'] devenv = os.path.join(msvs_version.path, 'Common7', 'IDE', 'devenv.com') - for build_file, build_file_dict in data.iteritems(): + for build_file, build_file_dict in data.items(): (build_file_root, build_file_ext) = os.path.splitext(build_file) if build_file_ext != '.gyp': continue @@ -1951,7 +1954,7 @@ def PerformBuild(data, configurations, params): for config in configurations: arguments = [devenv, sln_path, '/Build', config] - print 'Building [%s]: %s' % (config, arguments) + print('Building [%s]: %s' % (config, arguments)) rtn = subprocess.check_call(arguments) @@ -1990,7 +1993,7 @@ def GenerateOutput(target_list, target_dicts, data, params): configs = set() for qualified_target in target_list: spec = target_dicts[qualified_target] - for config_name, config in spec['configurations'].iteritems(): + for config_name, config in spec['configurations'].items(): configs.add(_ConfigFullName(config_name, config)) configs = list(configs) @@ -2033,11 +2036,12 @@ def GenerateOutput(target_list, target_dicts, data, params): if generator_flags.get('msvs_error_on_missing_sources', False): raise GypError(error_message) else: - print >> sys.stdout, "Warning: " + error_message + print("Warning: " + error_message, file=sys.stdout) def _GenerateMSBuildFiltersFile(filters_path, source_files, - rule_dependencies, extension_to_rule_name): + rule_dependencies, extension_to_rule_name, + platforms): """Generate the filters file. This file is used by Visual Studio to organize the presentation of source @@ -2051,7 +2055,8 @@ def _GenerateMSBuildFiltersFile(filters_path, source_files, filter_group = [] source_group = [] _AppendFiltersForMSBuild('', source_files, rule_dependencies, - extension_to_rule_name, filter_group, source_group) + extension_to_rule_name, platforms, + filter_group, source_group) if filter_group: content = ['Project', {'ToolsVersion': '4.0', @@ -2067,7 +2072,7 @@ def _GenerateMSBuildFiltersFile(filters_path, source_files, def _AppendFiltersForMSBuild(parent_filter_name, sources, rule_dependencies, - extension_to_rule_name, + extension_to_rule_name, platforms, filter_group, source_group): """Creates the list of filters and sources to be added in the filter file. @@ -2093,11 +2098,12 @@ def _AppendFiltersForMSBuild(parent_filter_name, sources, rule_dependencies, # Recurse and add its dependents. _AppendFiltersForMSBuild(filter_name, source.contents, rule_dependencies, extension_to_rule_name, - filter_group, source_group) + platforms, filter_group, source_group) else: # It's a source. Create a source entry. _, element = _MapFileToMsBuildSourceType(source, rule_dependencies, - extension_to_rule_name) + extension_to_rule_name, + platforms) source_entry = [element, {'Include': source}] # Specify the filter it is part of, if any. if parent_filter_name: @@ -2106,7 +2112,7 @@ def _AppendFiltersForMSBuild(parent_filter_name, sources, rule_dependencies, def _MapFileToMsBuildSourceType(source, rule_dependencies, - extension_to_rule_name): + extension_to_rule_name, platforms): """Returns the group and element type of the source file. Arguments: @@ -2132,6 +2138,9 @@ def _MapFileToMsBuildSourceType(source, rule_dependencies, elif ext == '.asm': group = 'masm' element = 'MASM' + for platform in platforms: + if platform.lower() in ['arm', 'arm64']: + element = 'MARMASM' elif ext == '.idl': group = 'midl' element = 'Midl' @@ -2630,7 +2639,7 @@ def _GetConfigurationCondition(name, settings): def _GetMSBuildProjectConfigurations(configurations): group = ['ItemGroup', {'Label': 'ProjectConfigurations'}] - for (name, settings) in sorted(configurations.iteritems()): + for (name, settings) in sorted(configurations.items()): configuration, platform = _GetConfigurationAndPlatform(name, settings) designation = '%s|%s' % (configuration, platform) group.append( @@ -2700,7 +2709,7 @@ def _GetMSBuildGlobalProperties(spec, guid, gyp_file_name): def _GetMSBuildConfigurationDetails(spec, build_file): properties = {} - for name, settings in spec['configurations'].iteritems(): + for name, settings in spec['configurations'].items(): msbuild_attributes = _GetMSBuildAttributes(spec, settings, build_file) condition = _GetConfigurationCondition(name, settings) character_set = msbuild_attributes.get('CharacterSet') @@ -2729,9 +2738,9 @@ def _GetMSBuildPropertySheets(configurations): user_props = r'$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props' additional_props = {} props_specified = False - for name, settings in sorted(configurations.iteritems()): + for name, settings in sorted(configurations.items()): configuration = _GetConfigurationCondition(name, settings) - if settings.has_key('msbuild_props'): + if 'msbuild_props' in settings: additional_props[configuration] = _FixPaths(settings['msbuild_props']) props_specified = True else: @@ -2751,7 +2760,7 @@ def _GetMSBuildPropertySheets(configurations): ] else: sheets = [] - for condition, props in additional_props.iteritems(): + for condition, props in additional_props.items(): import_group = [ 'ImportGroup', {'Label': 'PropertySheets', @@ -2784,7 +2793,7 @@ def _ConvertMSVSBuildAttributes(spec, config, build_file): elif a == 'ConfigurationType': msbuild_attributes[a] = _ConvertMSVSConfigurationType(msvs_attributes[a]) else: - print 'Warning: Do not know how to convert MSVS attribute ' + a + print('Warning: Do not know how to convert MSVS attribute ' + a) return msbuild_attributes @@ -2878,7 +2887,7 @@ def _GetMSBuildConfigurationGlobalProperties(spec, configurations, build_file): new_paths = '$(ExecutablePath);' + ';'.join(new_paths) properties = {} - for (name, configuration) in sorted(configurations.iteritems()): + for (name, configuration) in sorted(configurations.items()): condition = _GetConfigurationCondition(name, configuration) attributes = _GetMSBuildAttributes(spec, configuration, build_file) msbuild_settings = configuration['finalized_msbuild_settings'] @@ -2903,7 +2912,7 @@ def _GetMSBuildConfigurationGlobalProperties(spec, configurations, build_file): _AddConditionalProperty(properties, condition, 'ExecutablePath', new_paths) tool_settings = msbuild_settings.get('', {}) - for name, value in sorted(tool_settings.iteritems()): + for name, value in sorted(tool_settings.items()): formatted_value = _GetValueFormattedForMSBuild('', name, value) _AddConditionalProperty(properties, condition, name, formatted_value) return _GetMSBuildPropertyGroup(spec, None, properties) @@ -2972,7 +2981,7 @@ def GetEdges(node): # NOTE: reverse(topsort(DAG)) = topsort(reverse_edges(DAG)) for name in reversed(properties_ordered): values = properties[name] - for value, conditions in sorted(values.iteritems()): + for value, conditions in sorted(values.items()): if len(conditions) == num_configurations: # If the value is the same all configurations, # just add one unconditional entry. @@ -2985,18 +2994,18 @@ def GetEdges(node): def _GetMSBuildToolSettingsSections(spec, configurations): groups = [] - for (name, configuration) in sorted(configurations.iteritems()): + for (name, configuration) in sorted(configurations.items()): msbuild_settings = configuration['finalized_msbuild_settings'] group = ['ItemDefinitionGroup', {'Condition': _GetConfigurationCondition(name, configuration)} ] - for tool_name, tool_settings in sorted(msbuild_settings.iteritems()): + for tool_name, tool_settings in sorted(msbuild_settings.items()): # Skip the tool named '' which is a holder of global settings handled # by _GetMSBuildConfigurationGlobalProperties. if tool_name: if tool_settings: tool = [tool_name] - for name, value in sorted(tool_settings.iteritems()): + for name, value in sorted(tool_settings.items()): formatted_value = _GetValueFormattedForMSBuild(tool_name, name, value) tool.append([name, formatted_value]) @@ -3029,7 +3038,7 @@ def _FinalizeMSBuildSettings(spec, configuration): for ignored_setting in ignored_settings: value = configuration.get(ignored_setting) if value: - print ('Warning: The automatic conversion to MSBuild does not handle ' + print('Warning: The automatic conversion to MSBuild does not handle ' '%s. Ignoring setting of %s' % (ignored_setting, str(value))) defines = [_EscapeCppDefineForMSBuild(d) for d in defines] @@ -3196,7 +3205,7 @@ def _AddSources2(spec, sources, exclusions, grouped_sources, {'Condition': condition}, 'true']) # Add precompile if needed - for config_name, configuration in spec['configurations'].iteritems(): + for config_name, configuration in spec['configurations'].items(): precompiled_source = configuration.get('msvs_precompiled_source', '') if precompiled_source != '': precompiled_source = _FixPath(precompiled_source) @@ -3225,7 +3234,8 @@ def _AddSources2(spec, sources, exclusions, grouped_sources, detail.append(['ForcedIncludeFiles', '']) group, element = _MapFileToMsBuildSourceType(source, rule_dependencies, - extension_to_rule_name) + extension_to_rule_name, + _GetUniquePlatforms(spec)) grouped_sources[group].append([element, {'Include': source}] + detail) @@ -3308,7 +3318,7 @@ def _GenerateMSBuildProject(project, options, version, generator_flags): _GenerateMSBuildFiltersFile(project.path + '.filters', sources, rule_dependencies, - extension_to_rule_name) + extension_to_rule_name, _GetUniquePlatforms(spec)) missing_sources = _VerifySourcesExist(sources, project_dir) for configuration in configurations.itervalues(): @@ -3328,6 +3338,12 @@ def _GenerateMSBuildProject(project, options, version, generator_flags): import_masm_targets_section = [ ['Import', {'Project': r'$(VCTargetsPath)\BuildCustomizations\masm.targets'}]] + import_marmasm_props_section = [ + ['Import', + {'Project': r'$(VCTargetsPath)\BuildCustomizations\marmasm.props'}]] + import_marmasm_targets_section = [ + ['Import', + {'Project': r'$(VCTargetsPath)\BuildCustomizations\marmasm.targets'}]] macro_section = [['PropertyGroup', {'Label': 'UserMacros'}]] content = [ @@ -3347,6 +3363,8 @@ def _GenerateMSBuildProject(project, options, version, generator_flags): content += _GetMSBuildLocalProperties(project.msbuild_toolset) content += import_cpp_props_section content += import_masm_props_section + if spec.get('msvs_enable_marmasm'): + content += import_marmasm_props_section content += _GetMSBuildExtensions(props_files_of_rules) content += _GetMSBuildPropertySheets(configurations) content += macro_section @@ -3359,6 +3377,8 @@ def _GenerateMSBuildProject(project, options, version, generator_flags): content += _GetMSBuildProjectReferences(project) content += import_cpp_targets_section content += import_masm_targets_section + if spec.get('msvs_enable_marmasm'): + content += import_marmasm_targets_section content += _GetMSBuildExtensionTargets(targets_files_of_rules) if spec.get('msvs_external_builder'): @@ -3436,7 +3456,7 @@ def _GenerateActionsForMSBuild(spec, actions_to_add): """ sources_handled_by_action = OrderedSet() actions_spec = [] - for primary_input, actions in actions_to_add.iteritems(): + for primary_input, actions in actions_to_add.items(): inputs = OrderedSet() outputs = OrderedSet() descriptions = [] diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py index a00573ebf23453..aae5b71310445a 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py @@ -1,3 +1,4 @@ +from __future__ import print_function # Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -472,8 +473,8 @@ def WriteSpec(self, spec, config_name, generator_flags): if self.flavor != 'mac' or len(self.archs) == 1: link_deps += [self.GypPathToNinja(o) for o in obj_outputs] else: - print "Warning: Actions/rules writing object files don't work with " \ - "multiarch targets, dropping. (target %s)" % spec['target_name'] + print("Warning: Actions/rules writing object files don't work with " \ + "multiarch targets, dropping. (target %s)" % spec['target_name']) elif self.flavor == 'mac' and len(self.archs) > 1: link_deps = collections.defaultdict(list) @@ -796,7 +797,7 @@ def WriteMacXCassets(self, xcassets, bundle_depends): 'XCASSETS_LAUNCH_IMAGE': 'launch-image', } settings = self.xcode_settings.xcode_settings[self.config_name] - for settings_key, arg_name in settings_to_arg.iteritems(): + for settings_key, arg_name in settings_to_arg.items(): value = settings.get(settings_key) if value: extra_arguments[arg_name] = value @@ -1889,7 +1890,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params, wrappers[key[:-len('_wrapper')]] = os.path.join(build_to_root, value) # Support wrappers from environment variables too. - for key, value in os.environ.iteritems(): + for key, value in os.environ.items(): if key.lower().endswith('_wrapper'): key_prefix = key[:-len('_wrapper')] key_prefix = re.sub(r'\.HOST$', '.host', key_prefix) @@ -1905,7 +1906,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params, configs, generator_flags) cl_paths = gyp.msvs_emulation.GenerateEnvironmentFiles( toplevel_build, generator_flags, shared_system_includes, OpenOutput) - for arch, path in cl_paths.iteritems(): + for arch, path in cl_paths.items(): if clang_cl: # If we have selected clang-cl, use that instead. path = clang_cl @@ -2376,7 +2377,7 @@ def PerformBuild(data, configurations, params): for config in configurations: builddir = os.path.join(options.toplevel_dir, 'out', config) arguments = ['ninja', '-C', builddir] - print 'Building [%s]: %s' % (config, arguments) + print('Building [%s]: %s' % (config, arguments)) subprocess.check_call(arguments) @@ -2413,7 +2414,7 @@ def GenerateOutput(target_list, target_dicts, data, params): arglists.append( (target_list, target_dicts, data, params, config_name)) pool.map(CallGenerateOutputForConfig, arglists) - except KeyboardInterrupt, e: + except KeyboardInterrupt as e: pool.terminate() raise e else: diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py index 0e3fb9301ecb9e..694a28afb122ad 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py @@ -1,3 +1,4 @@ +from __future__ import print_function # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -128,7 +129,7 @@ def __init__(self, gyp_path, path, build_file_dict): try: os.makedirs(self.path) self.created_dir = True - except OSError, e: + except OSError as e: if e.errno != errno.EEXIST: raise @@ -182,7 +183,7 @@ def Finalize1(self, xcode_targets, serialize_all_tests): # the tree tree view for UI display. # Any values set globally are applied to all configurations, then any # per-configuration values are applied. - for xck, xcv in self.build_file_dict.get('xcode_settings', {}).iteritems(): + for xck, xcv in self.build_file_dict.get('xcode_settings', {}).items(): xccl.SetBuildSetting(xck, xcv) if 'xcode_config_file' in self.build_file_dict: config_ref = self.project.AddOrGetFileInRootGroup( @@ -196,7 +197,7 @@ def Finalize1(self, xcode_targets, serialize_all_tests): if build_file_configuration_named: xcc = xccl.ConfigurationNamed(config_name) for xck, xcv in build_file_configuration_named.get('xcode_settings', - {}).iteritems(): + {}).items(): xcc.SetBuildSetting(xck, xcv) if 'xcode_config_file' in build_file_configuration_named: config_ref = self.project.AddOrGetFileInRootGroup( @@ -272,7 +273,7 @@ def Finalize1(self, xcode_targets, serialize_all_tests): script = script + "\n".join( ['export %s="%s"' % (key, gyp.xcodeproj_file.ConvertVariablesToShellSyntax(val)) - for (key, val) in command.get('environment').iteritems()]) + "\n" + for (key, val) in command.get('environment').items()]) + "\n" # Some test end up using sockets, files on disk, etc. and can get # confused if more then one test runs at a time. The generator @@ -453,7 +454,7 @@ def Write(self): same = False try: same = filecmp.cmp(pbxproj_path, new_pbxproj_path, False) - except OSError, e: + except OSError as e: if e.errno != errno.ENOENT: raise @@ -472,10 +473,10 @@ def Write(self): # # No way to get the umask without setting a new one? Set a safe one # and then set it back to the old value. - umask = os.umask(077) + umask = os.umask(0o77) os.umask(umask) - os.chmod(new_pbxproj_path, 0666 & ~umask) + os.chmod(new_pbxproj_path, 0o666 & ~umask) os.rename(new_pbxproj_path, pbxproj_path) except Exception: @@ -565,7 +566,7 @@ def EscapeXcodeDefine(s): def PerformBuild(data, configurations, params): options = params['options'] - for build_file, build_file_dict in data.iteritems(): + for build_file, build_file_dict in data.items(): (build_file_root, build_file_ext) = os.path.splitext(build_file) if build_file_ext != '.gyp': continue @@ -576,7 +577,7 @@ def PerformBuild(data, configurations, params): for config in configurations: arguments = ['xcodebuild', '-project', xcodeproj_path] arguments += ['-configuration', config] - print "Building [%s]: %s" % (config, arguments) + print("Building [%s]: %s" % (config, arguments)) subprocess.check_call(arguments) @@ -624,7 +625,7 @@ def GenerateOutput(target_list, target_dicts, data, params): skip_excluded_files = \ not generator_flags.get('xcode_list_excluded_files', True) xcode_projects = {} - for build_file, build_file_dict in data.iteritems(): + for build_file, build_file_dict in data.items(): (build_file_root, build_file_ext) = os.path.splitext(build_file) if build_file_ext != '.gyp': continue @@ -736,7 +737,7 @@ def GenerateOutput(target_list, target_dicts, data, params): xctarget_type = gyp.xcodeproj_file.PBXNativeTarget try: target_properties['productType'] = _types[type_bundle_key] - except KeyError, e: + except KeyError as e: gyp.common.ExceptionAppend(e, "-- unknown product type while " "writing target %s" % target_name) raise @@ -1013,7 +1014,7 @@ def GenerateOutput(target_list, target_dicts, data, params): # target. makefile.write('all: \\\n') for concrete_output_index in \ - xrange(0, len(concrete_outputs_by_rule_source)): + range(0, len(concrete_outputs_by_rule_source)): # Only list the first (index [0]) concrete output of each input # in the "all" target. Otherwise, a parallel make (-j > 1) would # attempt to process each input multiple times simultaneously. @@ -1036,7 +1037,7 @@ def GenerateOutput(target_list, target_dicts, data, params): # rule source. Collect the names of the directories that are # required. concrete_output_dirs = [] - for concrete_output_index in xrange(0, len(concrete_outputs)): + for concrete_output_index in range(0, len(concrete_outputs)): concrete_output = concrete_outputs[concrete_output_index] if concrete_output_index == 0: bol = '' @@ -1055,7 +1056,7 @@ def GenerateOutput(target_list, target_dicts, data, params): # the set of additional rule inputs, if any. prerequisites = [rule_source] prerequisites.extend(rule.get('inputs', [])) - for prerequisite_index in xrange(0, len(prerequisites)): + for prerequisite_index in range(0, len(prerequisites)): prerequisite = prerequisites[prerequisite_index] if prerequisite_index == len(prerequisites) - 1: eol = '' @@ -1277,7 +1278,7 @@ def GenerateOutput(target_list, target_dicts, data, params): set_define = EscapeXcodeDefine(define) xcbc.AppendBuildSetting('GCC_PREPROCESSOR_DEFINITIONS', set_define) if 'xcode_settings' in configuration: - for xck, xcv in configuration['xcode_settings'].iteritems(): + for xck, xcv in configuration['xcode_settings'].items(): xcbc.SetBuildSetting(xck, xcv) if 'xcode_config_file' in configuration: config_ref = pbxp.AddOrGetFileInRootGroup( @@ -1285,7 +1286,7 @@ def GenerateOutput(target_list, target_dicts, data, params): xcbc.SetBaseConfiguration(config_ref) build_files = [] - for build_file, build_file_dict in data.iteritems(): + for build_file, build_file_dict in data.items(): if build_file.endswith('.gyp'): build_files.append(build_file) diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py index 10f6e0dba16deb..eb9858f0c808f6 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py @@ -2,6 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +from __future__ import print_function + from compiler.ast import Const from compiler.ast import Dict from compiler.ast import Discard @@ -249,10 +251,10 @@ def LoadOneBuildFile(build_file_path, data, aux_data, includes, else: build_file_data = eval(build_file_contents, {'__builtins__': None}, None) - except SyntaxError, e: + except SyntaxError as e: e.filename = build_file_path raise - except Exception, e: + except Exception as e: gyp.common.ExceptionAppend(e, 'while reading ' + build_file_path) raise @@ -272,7 +274,7 @@ def LoadOneBuildFile(build_file_path, data, aux_data, includes, else: LoadBuildFileIncludesIntoDict(build_file_data, build_file_path, data, aux_data, None, check) - except Exception, e: + except Exception as e: gyp.common.ExceptionAppend(e, 'while reading includes of ' + build_file_path) raise @@ -309,7 +311,7 @@ def LoadBuildFileIncludesIntoDict(subdict, subdict_path, data, aux_data, subdict_path, include) # Recurse into subdictionaries. - for k, v in subdict.iteritems(): + for k, v in subdict.items(): if type(v) is dict: LoadBuildFileIncludesIntoDict(v, subdict_path, data, aux_data, None, check) @@ -474,7 +476,7 @@ def LoadTargetBuildFile(build_file_path, data, aux_data, variables, includes, try: LoadTargetBuildFile(dependency, data, aux_data, variables, includes, depth, check, load_dependencies) - except Exception, e: + except Exception as e: gyp.common.ExceptionAppend( e, 'while loading dependencies of %s' % build_file_path) raise @@ -495,7 +497,7 @@ def CallLoadTargetBuildFile(global_flags, signal.signal(signal.SIGINT, signal.SIG_IGN) # Apply globals so that the worker process behaves the same. - for key, value in global_flags.iteritems(): + for key, value in global_flags.items(): globals()[key] = value SetGeneratorGlobals(generator_input_info) @@ -517,12 +519,12 @@ def CallLoadTargetBuildFile(global_flags, return (build_file_path, build_file_data, dependencies) - except GypError, e: + except GypError as e: sys.stderr.write("gyp: %s\n" % e) return None - except Exception, e: - print >>sys.stderr, 'Exception:', e - print >>sys.stderr, traceback.format_exc() + except Exception as e: + print('Exception:', e, file=sys.stderr) + print(traceback.format_exc(), file=sys.stderr) return None @@ -612,7 +614,7 @@ def LoadTargetBuildFilesParallel(build_files, data, variables, includes, depth, args = (global_flags, dependency, variables, includes, depth, check, generator_input_info), callback = parallel_state.LoadTargetBuildFileCallback) - except KeyboardInterrupt, e: + except KeyboardInterrupt as e: parallel_state.pool.terminate() raise e @@ -912,7 +914,7 @@ def ExpandVariables(input, phase, variables, build_file): stderr=subprocess.PIPE, stdin=subprocess.PIPE, cwd=build_file_dir) - except Exception, e: + except Exception as e: raise GypError("%s while executing command '%s' in %s" % (e, contents, build_file)) @@ -1026,7 +1028,7 @@ def ExpandVariables(input, phase, variables, build_file): # Convert all strings that are canonically-represented integers into integers. if type(output) is list: - for index in xrange(0, len(output)): + for index in range(0, len(output)): if IsStrCanonicalInt(output[index]): output[index] = int(output[index]) elif IsStrCanonicalInt(output): @@ -1097,13 +1099,13 @@ def EvalSingleCondition( if eval(ast_code, {'__builtins__': None}, variables): return true_dict return false_dict - except SyntaxError, e: + except SyntaxError as e: syntax_error = SyntaxError('%s while evaluating condition \'%s\' in %s ' 'at character %d.' % (str(e.args[0]), e.text, build_file, e.offset), e.filename, e.lineno, e.offset, e.text) raise syntax_error - except NameError, e: + except NameError as e: gyp.common.ExceptionAppend(e, 'while evaluating condition \'%s\' in %s' % (cond_expr_expanded, build_file)) raise GypError(e) @@ -1158,7 +1160,7 @@ def ProcessConditionsInDict(the_dict, phase, variables, build_file): def LoadAutomaticVariablesFromDict(variables, the_dict): # Any keys with plain string values in the_dict become automatic variables. # The variable name is the key name with a "_" character prepended. - for key, value in the_dict.iteritems(): + for key, value in the_dict.items(): if type(value) in (str, int, list): variables['_' + key] = value @@ -1171,7 +1173,7 @@ def LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key): # the_dict in the_dict's parent dict. If the_dict's parent is not a dict # (it could be a list or it could be parentless because it is a root dict), # the_dict_key will be None. - for key, value in the_dict.get('variables', {}).iteritems(): + for key, value in the_dict.get('variables', {}).items(): if type(value) not in (str, int, list): continue @@ -1180,7 +1182,7 @@ def LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key): if variable_name in variables: # If the variable is already set, don't set it. continue - if the_dict_key is 'variables' and variable_name in the_dict: + if the_dict_key == 'variables' and variable_name in the_dict: # If the variable is set without a % in the_dict, and the_dict is a # variables dict (making |variables| a varaibles sub-dict of a # variables dict), use the_dict's definition. @@ -1210,7 +1212,7 @@ def ProcessVariablesAndConditionsInDict(the_dict, phase, variables_in, # list before we process them so that you can reference one # variable from another. They will be fully expanded by recursion # in ExpandVariables. - for key, value in the_dict['variables'].iteritems(): + for key, value in the_dict['variables'].items(): variables[key] = value # Handle the associated variables dict first, so that any variable @@ -1223,7 +1225,7 @@ def ProcessVariablesAndConditionsInDict(the_dict, phase, variables_in, LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key) - for key, value in the_dict.iteritems(): + for key, value in the_dict.items(): # Skip "variables", which was already processed if present. if key != 'variables' and type(value) is str: expanded = ExpandVariables(value, phase, variables, build_file) @@ -1281,7 +1283,7 @@ def ProcessVariablesAndConditionsInDict(the_dict, phase, variables_in, # Recurse into child dicts, or process child lists which may result in # further recursion into descendant dicts. - for key, value in the_dict.iteritems(): + for key, value in the_dict.items(): # Skip "variables" and string values, which were already processed if # present. if key == 'variables' or type(value) is str: @@ -1378,12 +1380,12 @@ def QualifyDependencies(targets): for dep in dependency_sections for op in ('', '!', '/')] - for target, target_dict in targets.iteritems(): + for target, target_dict in targets.items(): target_build_file = gyp.common.BuildFile(target) toolset = target_dict['toolset'] for dependency_key in all_dependency_sections: dependencies = target_dict.get(dependency_key, []) - for index in xrange(0, len(dependencies)): + for index in range(0, len(dependencies)): dep_file, dep_target, dep_toolset = gyp.common.ResolveTarget( target_build_file, dependencies[index], toolset) if not multiple_toolsets: @@ -1418,13 +1420,13 @@ def ExpandWildcardDependencies(targets, data): dependency list, must be qualified when this function is called. """ - for target, target_dict in targets.iteritems(): + for target, target_dict in targets.items(): toolset = target_dict['toolset'] target_build_file = gyp.common.BuildFile(target) for dependency_key in dependency_sections: dependencies = target_dict.get(dependency_key, []) - # Loop this way instead of "for dependency in" or "for index in xrange" + # Loop this way instead of "for dependency in" or "for index in range" # because the dependencies list will be modified within the loop body. index = 0 while index < len(dependencies): @@ -1480,7 +1482,7 @@ def Unify(l): def RemoveDuplicateDependencies(targets): """Makes sure every dependency appears only once in all targets's dependency lists.""" - for target_name, target_dict in targets.iteritems(): + for target_name, target_dict in targets.items(): for dependency_key in dependency_sections: dependencies = target_dict.get(dependency_key, []) if dependencies: @@ -1496,7 +1498,7 @@ def Filter(l, item): def RemoveSelfDependencies(targets): """Remove self dependencies from targets that have the prune_self_dependency variable set.""" - for target_name, target_dict in targets.iteritems(): + for target_name, target_dict in targets.items(): for dependency_key in dependency_sections: dependencies = target_dict.get(dependency_key, []) if dependencies: @@ -1509,7 +1511,7 @@ def RemoveSelfDependencies(targets): def RemoveLinkDependenciesFromNoneTargets(targets): """Remove dependencies having the 'link_dependency' attribute from the 'none' targets.""" - for target_name, target_dict in targets.iteritems(): + for target_name, target_dict in targets.items(): for dependency_key in dependency_sections: dependencies = target_dict.get(dependency_key, []) if dependencies: @@ -1795,14 +1797,14 @@ def BuildDependencyList(targets): # Create a DependencyGraphNode for each target. Put it into a dict for easy # access. dependency_nodes = {} - for target, spec in targets.iteritems(): + for target, spec in targets.items(): if target not in dependency_nodes: dependency_nodes[target] = DependencyGraphNode(target) # Set up the dependency links. Targets that have no dependencies are treated # as dependent on root_node. root_node = DependencyGraphNode(None) - for target, spec in targets.iteritems(): + for target, spec in targets.items(): target_node = dependency_nodes[target] target_build_file = gyp.common.BuildFile(target) dependencies = spec.get('dependencies') @@ -1851,14 +1853,14 @@ def VerifyNoGYPFileCircularDependencies(targets): dependency_nodes[build_file] = DependencyGraphNode(build_file) # Set up the dependency links. - for target, spec in targets.iteritems(): + for target, spec in targets.items(): build_file = gyp.common.BuildFile(target) build_file_node = dependency_nodes[build_file] target_dependencies = spec.get('dependencies', []) for dependency in target_dependencies: try: dependency_build_file = gyp.common.BuildFile(dependency) - except GypError, e: + except GypError as e: gyp.common.ExceptionAppend( e, 'while computing dependencies of .gyp file %s' % build_file) raise @@ -2116,7 +2118,7 @@ def is_in_set_or_list(x, s, l): def MergeDicts(to, fro, to_file, fro_file): # I wanted to name the parameter "from" but it's a Python keyword... - for k, v in fro.iteritems(): + for k, v in fro.items(): # It would be nice to do "if not k in to: to[k] = v" but that wouldn't give # copy semantics. Something else may want to merge from the |fro| dict # later, and having the same dict ref pointed to twice in the tree isn't @@ -2251,13 +2253,13 @@ def SetUpConfigurations(target, target_dict): if not 'configurations' in target_dict: target_dict['configurations'] = {'Default': {}} if not 'default_configuration' in target_dict: - concrete = [i for (i, config) in target_dict['configurations'].iteritems() + concrete = [i for (i, config) in target_dict['configurations'].items() if not config.get('abstract')] target_dict['default_configuration'] = sorted(concrete)[0] merged_configurations = {} configs = target_dict['configurations'] - for (configuration, old_configuration_dict) in configs.iteritems(): + for (configuration, old_configuration_dict) in configs.items(): # Skip abstract configurations (saves work only). if old_configuration_dict.get('abstract'): continue @@ -2265,7 +2267,7 @@ def SetUpConfigurations(target, target_dict): # Get the inheritance relationship right by making a copy of the target # dict. new_configuration_dict = {} - for (key, target_val) in target_dict.iteritems(): + for (key, target_val) in target_dict.items(): key_ext = key[-1:] if key_ext in key_suffixes: key_base = key[:-1] @@ -2349,7 +2351,7 @@ def ProcessListFiltersInDict(name, the_dict): lists = [] del_lists = [] - for key, value in the_dict.iteritems(): + for key, value in the_dict.items(): operation = key[-1] if operation != '!' and operation != '/': continue @@ -2397,7 +2399,7 @@ def ProcessListFiltersInDict(name, the_dict): exclude_key = list_key + '!' if exclude_key in the_dict: for exclude_item in the_dict[exclude_key]: - for index in xrange(0, len(the_list)): + for index in range(0, len(the_list)): if exclude_item == the_list[index]: # This item matches the exclude_item, so set its action to 0 # (exclude). @@ -2423,7 +2425,7 @@ def ProcessListFiltersInDict(name, the_dict): raise ValueError('Unrecognized action ' + action + ' in ' + name + \ ' key ' + regex_key) - for index in xrange(0, len(the_list)): + for index in range(0, len(the_list)): list_item = the_list[index] if list_actions[index] == action_value: # Even if the regex matches, nothing will change so continue (regex @@ -2454,7 +2456,7 @@ def ProcessListFiltersInDict(name, the_dict): # the indices of items that haven't been seen yet don't shift. That means # that things need to be prepended to excluded_list to maintain them in the # same order that they existed in the_list. - for index in xrange(len(list_actions) - 1, -1, -1): + for index in range(len(list_actions) - 1, -1, -1): if list_actions[index] == 0: # Dump anything with action 0 (exclude). Keep anything with action 1 # (include) or -1 (no include or exclude seen for the item). @@ -2467,7 +2469,7 @@ def ProcessListFiltersInDict(name, the_dict): the_dict[excluded_key] = excluded_list # Now recurse into subdicts and lists that may contain dicts. - for key, value in the_dict.iteritems(): + for key, value in the_dict.items(): if type(value) is dict: ProcessListFiltersInDict(key, value) elif type(value) is list: @@ -2524,13 +2526,13 @@ def ValidateSourcesInTarget(target, target_dict, build_file, basenames.setdefault(basename, []).append(source) error = '' - for basename, files in basenames.iteritems(): + for basename, files in basenames.items(): if len(files) > 1: error += ' %s: %s\n' % (basename, ' '.join(files)) if error: - print('static library %s has several files with the same basename:\n' % - target + error + 'libtool on Mac cannot handle that. Use ' + print('static library %s has several files with the same basename:\n' % target + + error + 'libtool on Mac cannot handle that. Use ' '--no-duplicate-basename-check to disable this validation.') raise GypError('Duplicate basenames in sources section, see list above') @@ -2644,7 +2646,7 @@ def ValidateActionsInTarget(target, target_dict, build_file): def TurnIntIntoStrInDict(the_dict): """Given dict the_dict, recursively converts all integers into strings. """ - # Use items instead of iteritems because there's no need to try to look at + # Use items instead of items because there's no need to try to look at # reinserted keys and their associated values. for k, v in the_dict.items(): if type(v) is int: @@ -2663,7 +2665,7 @@ def TurnIntIntoStrInDict(the_dict): def TurnIntIntoStrInList(the_list): """Given list the_list, recursively converts all integers into strings. """ - for index in xrange(0, len(the_list)): + for index in range(0, len(the_list)): item = the_list[index] if type(item) is int: the_list[index] = str(item) @@ -2781,7 +2783,7 @@ def Load(build_files, variables, includes, depth, generator_input_info, check, try: LoadTargetBuildFile(build_file, data, aux_data, variables, includes, depth, check, True) - except Exception, e: + except Exception as e: gyp.common.ExceptionAppend(e, 'while trying to load %s' % build_file) raise @@ -2803,7 +2805,7 @@ def Load(build_files, variables, includes, depth, generator_input_info, check, RemoveLinkDependenciesFromNoneTargets(targets) # Apply exclude (!) and regex (/) list filters only for dependency_sections. - for target_name, target_dict in targets.iteritems(): + for target_name, target_dict in targets.items(): tmp_dict = {} for key_base in dependency_sections: for op in ('', '!', '/'): diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py index 4234fbb8302eb9..1bc5e3d3081ea6 100755 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py @@ -22,38 +22,38 @@ def _create_dependency(self, dependent, dependency): dependency.dependents.append(dependent) def test_no_cycle_empty_graph(self): - for label, node in self.nodes.iteritems(): - self.assertEquals([], node.FindCycles()) + for label, node in self.nodes.items(): + self.assertEqual([], node.FindCycles()) def test_no_cycle_line(self): self._create_dependency(self.nodes['a'], self.nodes['b']) self._create_dependency(self.nodes['b'], self.nodes['c']) self._create_dependency(self.nodes['c'], self.nodes['d']) - for label, node in self.nodes.iteritems(): - self.assertEquals([], node.FindCycles()) + for label, node in self.nodes.items(): + self.assertEqual([], node.FindCycles()) def test_no_cycle_dag(self): self._create_dependency(self.nodes['a'], self.nodes['b']) self._create_dependency(self.nodes['a'], self.nodes['c']) self._create_dependency(self.nodes['b'], self.nodes['c']) - for label, node in self.nodes.iteritems(): - self.assertEquals([], node.FindCycles()) + for label, node in self.nodes.items(): + self.assertEqual([], node.FindCycles()) def test_cycle_self_reference(self): self._create_dependency(self.nodes['a'], self.nodes['a']) - self.assertEquals([[self.nodes['a'], self.nodes['a']]], + self.assertEqual([[self.nodes['a'], self.nodes['a']]], self.nodes['a'].FindCycles()) def test_cycle_two_nodes(self): self._create_dependency(self.nodes['a'], self.nodes['b']) self._create_dependency(self.nodes['b'], self.nodes['a']) - self.assertEquals([[self.nodes['a'], self.nodes['b'], self.nodes['a']]], + self.assertEqual([[self.nodes['a'], self.nodes['b'], self.nodes['a']]], self.nodes['a'].FindCycles()) - self.assertEquals([[self.nodes['b'], self.nodes['a'], self.nodes['b']]], + self.assertEqual([[self.nodes['b'], self.nodes['a'], self.nodes['b']]], self.nodes['b'].FindCycles()) def test_two_cycles(self): @@ -68,7 +68,7 @@ def test_two_cycles(self): [self.nodes['a'], self.nodes['b'], self.nodes['a']] in cycles) self.assertTrue( [self.nodes['b'], self.nodes['c'], self.nodes['b']] in cycles) - self.assertEquals(2, len(cycles)) + self.assertEqual(2, len(cycles)) def test_big_cycle(self): self._create_dependency(self.nodes['a'], self.nodes['b']) @@ -77,7 +77,7 @@ def test_big_cycle(self): self._create_dependency(self.nodes['d'], self.nodes['e']) self._create_dependency(self.nodes['e'], self.nodes['a']) - self.assertEquals([[self.nodes['a'], + self.assertEqual([[self.nodes['a'], self.nodes['b'], self.nodes['c'], self.nodes['d'], diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py index eeeaceb0c7aa23..b8b7344eff85bf 100755 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py @@ -8,6 +8,8 @@ These functions are executed via gyp-mac-tool when using the Makefile generator. """ +from __future__ import print_function + import fcntl import fnmatch import glob @@ -125,7 +127,7 @@ def _DetectInputEncoding(self, file_name): fp = open(file_name, 'rb') try: header = fp.read(3) - except e: + except Exception: fp.close() return None fp.close() @@ -243,7 +245,7 @@ def ExecFilterLibtool(self, *cmd_list): _, err = libtoolout.communicate() for line in err.splitlines(): if not libtool_re.match(line) and not libtool_re5.match(line): - print >>sys.stderr, line + print(line, file=sys.stderr) # Unconditionally touch the output .a file on the command line if present # and the command succeeded. A bit hacky. if not libtoolout.returncode: @@ -324,7 +326,7 @@ def ExecCompileXcassets(self, keys, *inputs): ]) if keys: keys = json.loads(keys) - for key, value in keys.iteritems(): + for key, value in keys.items(): arg_name = '--' + key if isinstance(value, bool): if value: @@ -440,8 +442,7 @@ def _FindProvisioningProfile(self, profile, bundle_identifier): profiles_dir = os.path.join( os.environ['HOME'], 'Library', 'MobileDevice', 'Provisioning Profiles') if not os.path.isdir(profiles_dir): - print >>sys.stderr, ( - 'cannot find mobile provisioning for %s' % bundle_identifier) + print('cannot find mobile provisioning for %s' % (bundle_identifier), file=sys.stderr) sys.exit(1) provisioning_profiles = None if profile: @@ -462,8 +463,7 @@ def _FindProvisioningProfile(self, profile, bundle_identifier): valid_provisioning_profiles[app_id_pattern] = ( profile_path, profile_data, team_identifier) if not valid_provisioning_profiles: - print >>sys.stderr, ( - 'cannot find mobile provisioning for %s' % bundle_identifier) + print('cannot find mobile provisioning for %s' % (bundle_identifier), file=sys.stderr) sys.exit(1) # If the user has multiple provisioning profiles installed that can be # used for ${bundle_identifier}, pick the most specific one (ie. the @@ -487,7 +487,7 @@ def _LoadProvisioningProfile(self, profile_path): def _MergePlist(self, merged_plist, plist): """Merge |plist| into |merged_plist|.""" - for key, value in plist.iteritems(): + for key, value in plist.items(): if isinstance(value, dict): merged_value = merged_plist.get(key, {}) if isinstance(merged_value, dict): @@ -597,7 +597,7 @@ def _ExpandVariables(self, data, substitutions): the key was not found. """ if isinstance(data, str): - for key, value in substitutions.iteritems(): + for key, value in substitutions.items(): data = data.replace('$(%s)' % key, value) return data if isinstance(data, list): diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py index b1a51b978481b8..4a50b1b74c5c54 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py @@ -205,7 +205,7 @@ def __init__(self, spec, generator_flags): configs = spec['configurations'] for field, default in supported_fields: setattr(self, field, {}) - for configname, config in configs.iteritems(): + for configname, config in configs.items(): getattr(self, field)[configname] = config.get(field, default()) self.msvs_cygwin_dirs = spec.get('msvs_cygwin_dirs', ['.']) @@ -950,7 +950,7 @@ def ExpandMacros(string, expansions): """Expand $(Variable) per expansions dict. See MsvsSettings.GetVSMacroEnv for the canonical way to retrieve a suitable dict.""" if '$' in string: - for old, new in expansions.iteritems(): + for old, new in expansions.items(): assert '$(' not in new, new string = string.replace(old, new) return string @@ -994,7 +994,7 @@ def _FormatAsEnvironmentBlock(envvar_dict): CreateProcess documentation for more details.""" block = '' nul = '\0' - for key, value in envvar_dict.iteritems(): + for key, value in envvar_dict.items(): block += key + '=' + value + nul block += nul return block diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/ordered_dict.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/ordered_dict.py index fd6b7276bec236..01fe4134343038 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/ordered_dict.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/ordered_dict.py @@ -161,8 +161,8 @@ def itervalues(self): for k in self: yield self[k] - def iteritems(self): - 'od.iteritems -> an iterator over the (key, value) items in od' + def items(self): + 'od.items -> an iterator over the (key, value) items in od' for k in self: yield (k, self[k]) diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py index 74c98c5a79594b..94a6f17dab5d1c 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py @@ -28,8 +28,12 @@ def deepcopy(x): def _deepcopy_atomic(x): return x -for x in (type(None), int, long, float, - bool, str, unicode, type): +try: + types = bool, float, int, str, type, type(None), long, unicode +except NameError: # Python 3 + types = bool, float, int, str, type, type(None) + +for x in types: d[x] = _deepcopy_atomic def _deepcopy_list(x): @@ -38,7 +42,7 @@ def _deepcopy_list(x): def _deepcopy_dict(x): y = {} - for key, value in x.iteritems(): + for key, value in x.items(): y[deepcopy(key)] = deepcopy(value) return y d[dict] = _deepcopy_dict diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py index bb6f1ea436f258..bca0b9e346a5ba 100755 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py @@ -9,6 +9,8 @@ These functions are executed via gyp-win-tool when using the ninja generator. """ +from __future__ import print_function + import os import re import shutil @@ -126,7 +128,7 @@ def ExecLinkWrapper(self, arch, use_separate_mspdbsrv, *args): if (not line.startswith(' Creating library ') and not line.startswith('Generating code') and not line.startswith('Finished generating code')): - print line + print(line) return link.returncode def ExecLinkWithManifests(self, arch, embed_manifest, out, ldcmd, resname, @@ -215,7 +217,7 @@ def ExecManifestWrapper(self, arch, *args): out, _ = popen.communicate() for line in out.splitlines(): if line and 'manifest authoring warning 81010002' not in line: - print line + print(line) return popen.returncode def ExecManifestToRc(self, arch, *args): @@ -255,7 +257,7 @@ def ExecMidlWrapper(self, arch, outdir, tlb, h, dlldata, iid, proxy, idl, for x in lines if x.startswith(prefixes)) for line in lines: if not line.startswith(prefixes) and line not in processing: - print line + print(line) return popen.returncode def ExecAsmWrapper(self, arch, *args): @@ -269,7 +271,7 @@ def ExecAsmWrapper(self, arch, *args): not line.startswith('Microsoft (R) Macro Assembler') and not line.startswith(' Assembling: ') and line): - print line + print(line) return popen.returncode def ExecRcWrapper(self, arch, *args): @@ -283,7 +285,7 @@ def ExecRcWrapper(self, arch, *args): if (not line.startswith('Microsoft (R) Windows (R) Resource Compiler') and not line.startswith('Copyright (C) Microsoft Corporation') and line): - print line + print(line) return popen.returncode def ExecActionWrapper(self, arch, rspfile, *dir): @@ -292,7 +294,7 @@ def ExecActionWrapper(self, arch, rspfile, *dir): env = self._GetEnv(arch) # TODO(scottmg): This is a temporary hack to get some specific variables # through to actions that are set after gyp-time. http://crbug.com/333738. - for k, v in os.environ.iteritems(): + for k, v in os.environ.items(): if k not in env: env[k] = v args = open(rspfile).read() diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py index 69f7d97cfa69a2..6ae41e293afd93 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py @@ -7,6 +7,8 @@ other build systems, such as make and ninja. """ +from __future__ import print_function + import copy import gyp.common import os @@ -73,7 +75,7 @@ def _ExpandArchs(self, archs, sdkroot): if arch not in expanded_archs: expanded_archs.append(arch) except KeyError as e: - print 'Warning: Ignoring unsupported variable "%s".' % variable + print('Warning: Ignoring unsupported variable "%s".' % variable) elif arch not in expanded_archs: expanded_archs.append(arch) return expanded_archs @@ -168,7 +170,7 @@ def __init__(self, spec): # the same for all configs are implicitly per-target settings. self.xcode_settings = {} configs = spec['configurations'] - for configname, config in configs.iteritems(): + for configname, config in configs.items(): self.xcode_settings[configname] = config.get('xcode_settings', {}) self._ConvertConditionalKeys(configname) if self.xcode_settings[configname].get('IPHONEOS_DEPLOYMENT_TARGET', @@ -194,8 +196,8 @@ def _ConvertConditionalKeys(self, configname): new_key = key.split("[")[0] settings[new_key] = settings[key] else: - print 'Warning: Conditional keys not implemented, ignoring:', \ - ' '.join(conditional_keys) + print('Warning: Conditional keys not implemented, ignoring:', \ + ' '.join(conditional_keys)) del settings[key] def _Settings(self): @@ -213,7 +215,7 @@ def _Appendf(self, lst, test_key, format_str, default=None): def _WarnUnimplemented(self, test_key): if test_key in self._Settings(): - print 'Warning: Ignoring not yet implemented key "%s".' % test_key + print('Warning: Ignoring not yet implemented key "%s".' % test_key) def IsBinaryOutputFormat(self, configname): default = "binary" if self.isIOS else "xml" @@ -842,7 +844,7 @@ def GetLdflags(self, configname, product_dir, gyp_to_build_path, arch=None): if self._IsXCTest(): platform_root = self._XcodePlatformPath(configname) if platform_root: - cflags.append('-F' + platform_root + '/Developer/Library/Frameworks/') + cflags.append('-F' + platform_root + '/Developer/Library/Frameworks/') # noqa TODO @cclauss is_extension = self._IsIosAppExtension() or self._IsIosWatchKitExtension() if sdk_root and is_extension: @@ -889,7 +891,7 @@ def GetPerTargetSettings(self): result = dict(self.xcode_settings[configname]) first_pass = False else: - for key, value in self.xcode_settings[configname].iteritems(): + for key, value in self.xcode_settings[configname].items(): if key not in result: continue elif result[key] != value: @@ -997,8 +999,8 @@ def _GetIOSPostbuilds(self, configname, output_binary): unimpl = ['OTHER_CODE_SIGN_FLAGS'] unimpl = set(unimpl) & set(self.xcode_settings[configname].keys()) if unimpl: - print 'Warning: Some codesign keys not implemented, ignoring: %s' % ( - ', '.join(sorted(unimpl))) + print('Warning: Some codesign keys not implemented, ignoring: %s' % ( + ', '.join(sorted(unimpl)))) return ['%s code-sign-bundle "%s" "%s" "%s" "%s"' % ( os.path.join('${TARGET_BUILD_DIR}', 'gyp-mac-tool'), key, @@ -1597,7 +1599,7 @@ def GetEdges(node): order = gyp.common.TopologicallySorted(env.keys(), GetEdges) order.reverse() return order - except gyp.common.CycleError, e: + except gyp.common.CycleError as e: raise GypError( 'Xcode environment variables are cyclically dependent: ' + str(e.nodes)) @@ -1637,7 +1639,7 @@ def _AddIOSDeviceConfigurations(targets): for target_dict in targets.itervalues(): toolset = target_dict['toolset'] configs = target_dict['configurations'] - for config_name, config_dict in dict(configs).iteritems(): + for config_name, config_dict in dict(configs).items(): iphoneos_config_dict = copy.deepcopy(config_dict) configs[config_name + '-iphoneos'] = iphoneos_config_dict configs[config_name + '-iphonesimulator'] = config_dict diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py index 3820d6bf04817f..5acd82e004237c 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py @@ -28,7 +28,7 @@ def _WriteWorkspace(main_gyp, sources_gyp, params): workspace_path = os.path.join(options.generator_output, workspace_path) try: os.makedirs(workspace_path) - except OSError, e: + except OSError as e: if e.errno != errno.EEXIST: raise output_string = '\n' + \ @@ -161,7 +161,7 @@ def CreateWrapper(target_list, target_dicts, data, params): params: Dict of global options for gyp. """ orig_gyp = params['build_files'][0] - for gyp_name, gyp_dict in data.iteritems(): + for gyp_name, gyp_dict in data.items(): if gyp_name == orig_gyp: depth = gyp_dict['_DEPTH'] @@ -228,7 +228,7 @@ def CreateWrapper(target_list, target_dicts, data, params): sources_target['configurations'] = {'Default': { 'include_dirs': [ depth ] } } sources = [] - for target, target_dict in target_dicts.iteritems(): + for target, target_dict in target_dicts.items(): base = os.path.dirname(target) files = target_dict.get('sources', []) + \ target_dict.get('mac_bundle_resources', []) diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py index d08b7f777002f0..b0385468c586a0 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py @@ -138,21 +138,18 @@ """ import gyp.common +import hashlib import posixpath import re import struct import sys -# hashlib is supplied as of Python 2.5 as the replacement interface for sha -# and other secure hashes. In 2.6, sha is deprecated. Import hashlib if -# available, avoiding a deprecation warning under 2.6. Import sha otherwise, -# preserving 2.4 compatibility. try: - import hashlib - _new_sha1 = hashlib.sha1 -except ImportError: - import sha - _new_sha1 = sha.new + basestring, cmp, unicode +except NameError: # Python 3 + basestring = unicode = str + def cmp(x, y): + return (x > y) - (x < y) # See XCObject._EncodeString. This pattern is used to determine when a string @@ -314,7 +311,7 @@ def Copy(self): """ that = self.__class__(id=self.id, parent=self.parent) - for key, value in self._properties.iteritems(): + for key, value in self._properties.items(): is_strong = self._schema[key][2] if isinstance(value, XCObject): @@ -324,8 +321,7 @@ def Copy(self): that._properties[key] = new_value else: that._properties[key] = value - elif isinstance(value, str) or isinstance(value, unicode) or \ - isinstance(value, int): + elif isinstance(value, (basestring, int)): that._properties[key] = value elif isinstance(value, list): if is_strong: @@ -422,7 +418,7 @@ def _HashUpdate(hash, data): hash.update(data) if seed_hash is None: - seed_hash = _new_sha1() + seed_hash = hashlib.sha1() hash = seed_hash.copy() @@ -452,7 +448,7 @@ def _HashUpdate(hash, data): digest_int_count = hash.digest_size / 4 digest_ints = struct.unpack('>' + 'I' * digest_int_count, hash.digest()) id_ints = [0, 0, 0] - for index in xrange(0, digest_int_count): + for index in range(0, digest_int_count): id_ints[index % 3] ^= digest_ints[index] self.id = '%08X%08X%08X' % tuple(id_ints) @@ -475,7 +471,7 @@ def Children(self): """Returns a list of all of this object's owned (strong) children.""" children = [] - for property, attributes in self._schema.iteritems(): + for property, attributes in self._schema.items(): (is_list, property_type, is_strong) = attributes[0:3] if is_strong and property in self._properties: if not is_list: @@ -622,7 +618,7 @@ def _XCPrintableValue(self, tabs, value, flatten_list=False): printable += end_tabs + ')' elif isinstance(value, dict): printable = '{' + sep - for item_key, item_value in sorted(value.iteritems()): + for item_key, item_value in sorted(value.items()): printable += element_tabs + \ self._XCPrintableValue(tabs + 1, item_key, flatten_list) + ' = ' + \ self._XCPrintableValue(tabs + 1, item_value, flatten_list) + ';' + \ @@ -691,7 +687,7 @@ def _XCKVPrint(self, file, tabs, key, value): printable_value[0] == '"' and printable_value[-1] == '"': printable_value = printable_value[1:-1] printable += printable_key + ' = ' + printable_value + ';' + after_kv - except TypeError, e: + except TypeError as e: gyp.common.ExceptionAppend(e, 'while printing key "%s"' % key) raise @@ -730,7 +726,7 @@ def Print(self, file=sys.stdout): self._XCKVPrint(file, 3, 'isa', self.__class__.__name__) # The remaining elements of an object dictionary are sorted alphabetically. - for property, value in sorted(self._properties.iteritems()): + for property, value in sorted(self._properties.items()): self._XCKVPrint(file, 3, property, value) # End the object. @@ -752,7 +748,7 @@ def UpdateProperties(self, properties, do_copy=False): if properties is None: return - for property, value in properties.iteritems(): + for property, value in properties.items(): # Make sure the property is in the schema. if not property in self._schema: raise KeyError(property + ' not in ' + self.__class__.__name__) @@ -788,8 +784,7 @@ def UpdateProperties(self, properties, do_copy=False): self._properties[property] = value.Copy() else: self._properties[property] = value - elif isinstance(value, str) or isinstance(value, unicode) or \ - isinstance(value, int): + elif isinstance(value, (basestring, int)): self._properties[property] = value elif isinstance(value, list): if is_strong: @@ -865,7 +860,7 @@ def VerifyHasRequiredProperties(self): # TODO(mark): A stronger verification mechanism is needed. Some # subclasses need to perform validation beyond what the schema can enforce. - for property, attributes in self._schema.iteritems(): + for property, attributes in self._schema.items(): (is_list, property_type, is_strong, is_required) = attributes[0:4] if is_required and not property in self._properties: raise KeyError(self.__class__.__name__ + ' requires ' + property) @@ -875,7 +870,7 @@ def _SetDefaultsFromSchema(self): overwrite properties that have already been set.""" defaults = {} - for property, attributes in self._schema.iteritems(): + for property, attributes in self._schema.items(): (is_list, property_type, is_strong, is_required) = attributes[0:4] if is_required and len(attributes) >= 5 and \ not property in self._properties: @@ -1426,7 +1421,7 @@ def PathHashables(self): xche = self while xche != None and isinstance(xche, XCHierarchicalElement): xche_hashables = xche.Hashables() - for index in xrange(0, len(xche_hashables)): + for index in range(0, len(xche_hashables)): hashables.insert(index, xche_hashables[index]) xche = xche.parent return hashables @@ -2401,7 +2396,7 @@ def HeadersPhase(self): # The headers phase should come before the resources, sources, and # frameworks phases, if any. insert_at = len(self._properties['buildPhases']) - for index in xrange(0, len(self._properties['buildPhases'])): + for index in range(0, len(self._properties['buildPhases'])): phase = self._properties['buildPhases'][index] if isinstance(phase, PBXResourcesBuildPhase) or \ isinstance(phase, PBXSourcesBuildPhase) or \ @@ -2422,7 +2417,7 @@ def ResourcesPhase(self): # The resources phase should come before the sources and frameworks # phases, if any. insert_at = len(self._properties['buildPhases']) - for index in xrange(0, len(self._properties['buildPhases'])): + for index in range(0, len(self._properties['buildPhases'])): phase = self._properties['buildPhases'][index] if isinstance(phase, PBXSourcesBuildPhase) or \ isinstance(phase, PBXFrameworksBuildPhase): @@ -2844,7 +2839,7 @@ def CompareProducts(x, y, remote_products): # determine the sort order. return cmp(x_index, y_index) - for other_pbxproject, ref_dict in self._other_pbxprojects.iteritems(): + for other_pbxproject, ref_dict in self._other_pbxprojects.items(): # Build up a list of products in the remote project file, ordered the # same as the targets that produce them. remote_products = [] @@ -2889,7 +2884,7 @@ def Print(self, file=sys.stdout): self._XCPrint(file, 0, '{ ') else: self._XCPrint(file, 0, '{\n') - for property, value in sorted(self._properties.iteritems(), + for property, value in sorted(self._properties.items(), cmp=lambda x, y: cmp(x, y)): if property == 'objects': self._PrintObjects(file) diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/graphviz.py b/deps/npm/node_modules/node-gyp/gyp/tools/graphviz.py index 326ae221cf8e82..538b059da4a7e6 100755 --- a/deps/npm/node_modules/node-gyp/gyp/tools/graphviz.py +++ b/deps/npm/node_modules/node-gyp/gyp/tools/graphviz.py @@ -8,6 +8,8 @@ generate input suitable for graphviz to render a dependency graph of targets.""" +from __future__ import print_function + import collections import json import sys @@ -50,9 +52,9 @@ def WriteGraph(edges): build_file, target_name, toolset = ParseTarget(src) files[build_file].append(src) - print 'digraph D {' - print ' fontsize=8' # Used by subgraphs. - print ' node [fontsize=8]' + print('digraph D {') + print(' fontsize=8') # Used by subgraphs. + print(' node [fontsize=8]') # Output nodes by file. We must first write out each node within # its file grouping before writing out any edges that may refer @@ -63,31 +65,31 @@ def WriteGraph(edges): # the display by making it a box without an internal node. target = targets[0] build_file, target_name, toolset = ParseTarget(target) - print ' "%s" [shape=box, label="%s\\n%s"]' % (target, filename, - target_name) + print(' "%s" [shape=box, label="%s\\n%s"]' % (target, filename, + target_name)) else: # Group multiple nodes together in a subgraph. - print ' subgraph "cluster_%s" {' % filename - print ' label = "%s"' % filename + print(' subgraph "cluster_%s" {' % filename) + print(' label = "%s"' % filename) for target in targets: build_file, target_name, toolset = ParseTarget(target) - print ' "%s" [label="%s"]' % (target, target_name) - print ' }' + print(' "%s" [label="%s"]' % (target, target_name)) + print(' }') # Now that we've placed all the nodes within subgraphs, output all # the edges between nodes. for src, dsts in edges.items(): for dst in dsts: - print ' "%s" -> "%s"' % (src, dst) + print(' "%s" -> "%s"' % (src, dst)) - print '}' + print('}') def main(): if len(sys.argv) < 2: - print >>sys.stderr, __doc__ - print >>sys.stderr - print >>sys.stderr, 'usage: %s target1 target2...' % (sys.argv[0]) + print(__doc__, file=sys.stderr) + print(file=sys.stderr) + print('usage: %s target1 target2...' % (sys.argv[0]), file=sys.stderr) return 1 edges = LoadEdges('dump.json', sys.argv[1:]) diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py b/deps/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py index c51d35872cce6d..d01c692edcf8d6 100755 --- a/deps/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py +++ b/deps/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py @@ -6,6 +6,8 @@ """Pretty-prints the contents of a GYP file.""" +from __future__ import print_function + import sys import re @@ -119,22 +121,22 @@ def prettyprint_input(lines): last_line = "" for line in lines: if COMMENT_RE.match(line): - print line + print(line) else: line = line.strip('\r\n\t ') # Otherwise doesn't strip \r on Unix. if len(line) > 0: (brace_diff, after) = count_braces(line) if brace_diff != 0: if after: - print " " * (basic_offset * indent) + line + print(" " * (basic_offset * indent) + line) indent += brace_diff else: indent += brace_diff - print " " * (basic_offset * indent) + line + print(" " * (basic_offset * indent) + line) else: - print " " * (basic_offset * indent) + line + print(" " * (basic_offset * indent) + line) else: - print "" + print("") last_line = line diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/pretty_sln.py b/deps/npm/node_modules/node-gyp/gyp/tools/pretty_sln.py index ca8cf4ad3fb836..196566fb9e4470 100755 --- a/deps/npm/node_modules/node-gyp/gyp/tools/pretty_sln.py +++ b/deps/npm/node_modules/node-gyp/gyp/tools/pretty_sln.py @@ -12,13 +12,15 @@ Then it outputs a possible build order. """ -__author__ = 'nsylvain (Nicolas Sylvain)' +from __future__ import print_function import os import re import sys import pretty_vcproj +__author__ = 'nsylvain (Nicolas Sylvain)' + def BuildProject(project, built, projects, deps): # if all dependencies are done, we can build it, otherwise we try to build the # dependency. @@ -26,7 +28,7 @@ def BuildProject(project, built, projects, deps): for dep in deps[project]: if dep not in built: BuildProject(dep, built, projects, deps) - print project + print(project) built.append(project) def ParseSolution(solution_file): @@ -100,44 +102,44 @@ def ParseSolution(solution_file): return (projects, dependencies) def PrintDependencies(projects, deps): - print "---------------------------------------" - print "Dependencies for all projects" - print "---------------------------------------" - print "-- --" + print("---------------------------------------") + print("Dependencies for all projects") + print("---------------------------------------") + print("-- --") for (project, dep_list) in sorted(deps.items()): - print "Project : %s" % project - print "Path : %s" % projects[project][0] + print("Project : %s" % project) + print("Path : %s" % projects[project][0]) if dep_list: for dep in dep_list: - print " - %s" % dep - print "" + print(" - %s" % dep) + print("") - print "-- --" + print("-- --") def PrintBuildOrder(projects, deps): - print "---------------------------------------" - print "Build order " - print "---------------------------------------" - print "-- --" + print("---------------------------------------") + print("Build order ") + print("---------------------------------------") + print("-- --") built = [] for (project, _) in sorted(deps.items()): if project not in built: BuildProject(project, built, projects, deps) - print "-- --" + print("-- --") def PrintVCProj(projects): for project in projects: - print "-------------------------------------" - print "-------------------------------------" - print project - print project - print project - print "-------------------------------------" - print "-------------------------------------" + print("-------------------------------------") + print("-------------------------------------") + print(project) + print(project) + print(project) + print("-------------------------------------") + print("-------------------------------------") project_path = os.path.abspath(os.path.join(os.path.dirname(sys.argv[1]), projects[project][2])) @@ -153,7 +155,7 @@ def PrintVCProj(projects): def main(): # check if we have exactly 1 parameter. if len(sys.argv) < 2: - print 'Usage: %s "c:\\path\\to\\project.sln"' % sys.argv[0] + print('Usage: %s "c:\\path\\to\\project.sln"' % sys.argv[0]) return 1 (projects, deps) = ParseSolution(sys.argv[1]) diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/pretty_vcproj.py b/deps/npm/node_modules/node-gyp/gyp/tools/pretty_vcproj.py index 6099bd7cc4d8cc..e1ec7fee76e321 100755 --- a/deps/npm/node_modules/node-gyp/gyp/tools/pretty_vcproj.py +++ b/deps/npm/node_modules/node-gyp/gyp/tools/pretty_vcproj.py @@ -12,7 +12,7 @@ It outputs the resulting xml to stdout. """ -__author__ = 'nsylvain (Nicolas Sylvain)' +from __future__ import print_function import os import sys @@ -20,6 +20,14 @@ from xml.dom.minidom import parse from xml.dom.minidom import Node +__author__ = 'nsylvain (Nicolas Sylvain)' + +try: + cmp +except NameError: + def cmp(x, y): + return (x > y) - (x < y) + REPLACEMENTS = dict() ARGUMENTS = None @@ -61,7 +69,7 @@ def get_string(node): def PrettyPrintNode(node, indent=0): if node.nodeType == Node.TEXT_NODE: if node.data.strip(): - print '%s%s' % (' '*indent, node.data.strip()) + print('%s%s' % (' '*indent, node.data.strip())) return if node.childNodes: @@ -73,23 +81,23 @@ def PrettyPrintNode(node, indent=0): # Print the main tag if attr_count == 0: - print '%s<%s>' % (' '*indent, node.nodeName) + print('%s<%s>' % (' '*indent, node.nodeName)) else: - print '%s<%s' % (' '*indent, node.nodeName) + print('%s<%s' % (' '*indent, node.nodeName)) all_attributes = [] for (name, value) in node.attributes.items(): all_attributes.append((name, value)) all_attributes.sort(CmpTuple()) for (name, value) in all_attributes: - print '%s %s="%s"' % (' '*indent, name, value) - print '%s>' % (' '*indent) + print('%s %s="%s"' % (' '*indent, name, value)) + print('%s>' % (' '*indent)) if node.nodeValue: - print '%s %s' % (' '*indent, node.nodeValue) + print('%s %s' % (' '*indent, node.nodeValue)) for sub_node in node.childNodes: PrettyPrintNode(sub_node, indent=indent+2) - print '%s' % (' '*indent, node.nodeName) + print('%s' % (' '*indent, node.nodeName)) def FlattenFilter(node): @@ -283,8 +291,8 @@ def main(argv): # check if we have exactly 1 parameter. if len(argv) < 2: - print ('Usage: %s "c:\\path\\to\\vcproj.vcproj" [key1=value1] ' - '[key2=value2]' % argv[0]) + print(('Usage: %s "c:\\path\\to\\vcproj.vcproj" [key1=value1] ' + '[key2=value2]' % argv[0])) return 1 # Parse the keys diff --git a/deps/npm/node_modules/node-gyp/lib/Find-VS2017.cs b/deps/npm/node_modules/node-gyp/lib/Find-VisualStudio.cs similarity index 64% rename from deps/npm/node_modules/node-gyp/lib/Find-VS2017.cs rename to deps/npm/node_modules/node-gyp/lib/Find-VisualStudio.cs index 6e7429b771385f..0a533f42d6a4ff 100644 --- a/deps/npm/node_modules/node-gyp/lib/Find-VS2017.cs +++ b/deps/npm/node_modules/node-gyp/lib/Find-VisualStudio.cs @@ -3,10 +3,13 @@ // See accompanying file LICENSE at https://github.com/node4good/windows-autoconf // Usage: -// powershell -ExecutionPolicy Unrestricted -Version "2.0" -Command "&{Add-Type -Path Find-VS2017.cs; [VisualStudioConfiguration.Main]::Query()}" +// powershell -ExecutionPolicy Unrestricted -Command "Add-Type -Path Find-VisualStudio.cs; [VisualStudioConfiguration.Main]::PrintJson()" +// This script needs to be compatible with PowerShell v2 to run on Windows 2008R2 and Windows 7. + using System; using System.Text; using System.Runtime.InteropServices; +using System.Collections.Generic; namespace VisualStudioConfiguration { @@ -184,7 +187,7 @@ public class SetupConfigurationClass public static class Main { - public static void Query() + public static void PrintJson() { ISetupConfiguration query = new SetupConfiguration(); ISetupConfiguration2 query2 = (ISetupConfiguration2)query; @@ -192,82 +195,49 @@ public static void Query() int pceltFetched; ISetupInstance2[] rgelt = new ISetupInstance2[1]; - StringBuilder log = new StringBuilder(); + List instances = new List(); while (true) { e.Next(1, rgelt, out pceltFetched); if (pceltFetched <= 0) { - Console.WriteLine(String.Format("{{\"log\":\"{0}\"}}", log.ToString())); + Console.WriteLine(String.Format("[{0}]", string.Join(",", instances.ToArray()))); return; } - if (CheckInstance(rgelt[0], ref log)) - return; + + instances.Add(InstanceJson(rgelt[0])); } } - private static bool CheckInstance(ISetupInstance2 setupInstance2, ref StringBuilder log) + private static string JsonString(string s) { - // Visual Studio Community 2017 component directory: - // https://www.visualstudio.com/en-us/productinfo/vs2017-install-product-Community.workloads + return "\"" + s.Replace("\\", "\\\\").Replace("\"", "\\\"") + "\""; + } - string path = setupInstance2.GetInstallationPath().Replace("\\", "\\\\"); - log.Append(String.Format("Found installation at: {0}\\n", path)); + private static string InstanceJson(ISetupInstance2 setupInstance2) + { + // Visual Studio component directory: + // https://docs.microsoft.com/en-us/visualstudio/install/workload-and-component-ids - bool hasMSBuild = false; - bool hasVCTools = false; - uint Win10SDKVer = 0; - bool hasWin8SDK = false; + StringBuilder json = new StringBuilder(); + json.Append("{"); - foreach (ISetupPackageReference package in setupInstance2.GetPackages()) - { - const string Win10SDKPrefix = "Microsoft.VisualStudio.Component.Windows10SDK."; - - string id = package.GetId(); - if (id == "Microsoft.VisualStudio.VC.MSBuild.Base") - hasMSBuild = true; - else if (id == "Microsoft.VisualStudio.Component.VC.Tools.x86.x64") - hasVCTools = true; - else if (id.StartsWith(Win10SDKPrefix)) { - string[] parts = id.Substring(Win10SDKPrefix.Length).Split('.'); - if (parts.Length > 1 && parts[1] != "Desktop") - continue; - uint foundSdkVer; - if (UInt32.TryParse(parts[0], out foundSdkVer)) - Win10SDKVer = Math.Max(Win10SDKVer, foundSdkVer); - } else if (id == "Microsoft.VisualStudio.Component.Windows81SDK") - hasWin8SDK = true; - else - continue; - - log.Append(String.Format(" - Found {0}\\n", id)); - } + string path = JsonString(setupInstance2.GetInstallationPath()); + json.Append(String.Format("\"path\":{0},", path)); - if (!hasMSBuild) - log.Append(" - Missing Visual Studio C++ core features (Microsoft.VisualStudio.VC.MSBuild.Base)\\n"); - if (!hasVCTools) - log.Append(" - Missing VC++ 2017 v141 toolset (x86,x64) (Microsoft.VisualStudio.Component.VC.Tools.x86.x64)\\n"); - if ((Win10SDKVer == 0) && (!hasWin8SDK)) - log.Append(" - Missing a Windows SDK (Microsoft.VisualStudio.Component.Windows10SDK.* or Microsoft.VisualStudio.Component.Windows81SDK)\\n"); + string version = JsonString(setupInstance2.GetInstallationVersion()); + json.Append(String.Format("\"version\":{0},", version)); - if (hasMSBuild && hasVCTools) + List packages = new List(); + foreach (ISetupPackageReference package in setupInstance2.GetPackages()) { - if (Win10SDKVer > 0) - { - log.Append(" - Using this installation with Windows 10 SDK"/*\\n*/); - Console.WriteLine(String.Format("{{\"log\":\"{0}\",\"path\":\"{1}\",\"sdk\":\"10.0.{2}.0\"}}", log.ToString(), path, Win10SDKVer)); - return true; - } - else if (hasWin8SDK) - { - log.Append(" - Using this installation with Windows 8.1 SDK"/*\\n*/); - Console.WriteLine(String.Format("{{\"log\":\"{0}\",\"path\":\"{1}\",\"sdk\":\"8.1\"}}", log.ToString(), path)); - return true; - } + string id = JsonString(package.GetId()); + packages.Add(id); } + json.Append(String.Format("\"packages\":[{0}]", string.Join(",", packages.ToArray()))); - log.Append(" - Some required components are missing, not using this installation\\n"); - return false; + json.Append("}"); + return json.ToString(); } } } diff --git a/deps/npm/node_modules/node-gyp/lib/build.js b/deps/npm/node_modules/node-gyp/lib/build.js index fdb328b84252bc..24cfe38de2f86a 100644 --- a/deps/npm/node_modules/node-gyp/lib/build.js +++ b/deps/npm/node_modules/node-gyp/lib/build.js @@ -1,19 +1,11 @@ +'use strict' -module.exports = exports = build - -/** - * Module dependencies. - */ - -var fs = require('graceful-fs') - , rm = require('rimraf') - , path = require('path') - , glob = require('glob') - , log = require('npmlog') - , which = require('which') - , exec = require('child_process').exec - , processRelease = require('./process-release') - , win = process.platform === 'win32' +const fs = require('graceful-fs') +const path = require('path') +const glob = require('glob') +const log = require('npmlog') +const which = require('which') +const win = process.platform === 'win32' exports.usage = 'Invokes `' + (win ? 'msbuild' : 'make') + '` and builds the module' @@ -24,21 +16,19 @@ function build (gyp, argv, callback) { } else if (process.platform.indexOf('bsd') !== -1) { platformMake = 'gmake' } else if (win && argv.length > 0) { - argv = argv.map(function(target) { + argv = argv.map(function (target) { return '/t:' + target }) } - var release = processRelease(argv, gyp, process.version, process.release) - , makeCommand = gyp.opts.make || process.env.MAKE || platformMake - , command = win ? 'msbuild' : makeCommand - , buildDir = path.resolve('build') - , configPath = path.resolve(buildDir, 'config.gypi') - , jobs = gyp.opts.jobs || process.env.JOBS - , buildType - , config - , arch - , nodeDir + var makeCommand = gyp.opts.make || process.env.MAKE || platformMake + var command = win ? 'msbuild' : makeCommand + var jobs = gyp.opts.jobs || process.env.JOBS + var buildType + var config + var arch + var nodeDir + var guessedSolution loadConfigGypi() @@ -47,16 +37,18 @@ function build (gyp, argv, callback) { */ function loadConfigGypi () { + var configPath = path.resolve('build', 'config.gypi') + fs.readFile(configPath, 'utf8', function (err, data) { if (err) { - if (err.code == 'ENOENT') { + if (err.code === 'ENOENT') { callback(new Error('You must run `node-gyp configure` first!')) } else { callback(err) } return } - config = JSON.parse(data.replace(/\#.+\n/, '')) + config = JSON.parse(data.replace(/#.+\n/, '')) // get the 'arch', 'buildType', and 'nodeDir' vars from the config buildType = config.target_defaults.default_configuration @@ -88,7 +80,9 @@ function build (gyp, argv, callback) { function findSolutionFile () { glob('build/*.sln', function (err, files) { - if (err) return callback(err) + if (err) { + return callback(err) + } if (files.length === 0) { return callback(new Error('Could not find *.sln file. Did you run "configure"?')) } @@ -103,102 +97,42 @@ function build (gyp, argv, callback) { */ function doWhich () { - // First make sure we have the build command in the PATH - which(command, function (err, execPath) { - if (err) { - if (win && /not found/.test(err.message)) { - // On windows and no 'msbuild' found. Let's guess where it is - findMsbuild() - } else { - // Some other error or 'make' not found on Unix, report that to the user - callback(err) - } - return + // On Windows use msbuild provided by node-gyp configure + if (win) { + if (!config.variables.msbuild_path) { + return callback(new Error( + 'MSBuild is not set, please run `node-gyp configure`.')) } - log.verbose('`which` succeeded for `' + command + '`', execPath) - doBuild() - }) - } - - /** - * Search for the location of "msbuild.exe" file on Windows. - */ - - function findMsbuild () { - if (config.variables.msbuild_path) { command = config.variables.msbuild_path log.verbose('using MSBuild:', command) doBuild() return } - - log.verbose('could not find "msbuild.exe" in PATH - finding location in registry') - var notfoundErr = 'Can\'t find "msbuild.exe". Do you have Microsoft Visual Studio C++ 2008+ installed?' - var cmd = 'reg query "HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions" /s' - if (process.arch !== 'ia32') - cmd += ' /reg:32' - exec(cmd, function (err, stdout, stderr) { + // First make sure we have the build command in the PATH + which(command, function (err, execPath) { if (err) { - return callback(new Error(err.message + '\n' + notfoundErr)) + // Some other error or 'make' not found on Unix, report that to the user + callback(err) + return } - var reVers = /ToolsVersions\\([^\\]+)$/i - , rePath = /\r\n[ \t]+MSBuildToolsPath[ \t]+REG_SZ[ \t]+([^\r]+)/i - , msbuilds = [] - , r - , msbuildPath - stdout.split('\r\n\r\n').forEach(function(l) { - if (!l) return - l = l.trim() - if (r = reVers.exec(l.substring(0, l.indexOf('\r\n')))) { - var ver = parseFloat(r[1], 10) - if (ver >= 3.5) { - if (r = rePath.exec(l)) { - msbuilds.push({ - version: ver, - path: r[1] - }) - } - } - } - }) - msbuilds.sort(function (x, y) { - return (x.version < y.version ? -1 : 1) - }) - ;(function verifyMsbuild () { - if (!msbuilds.length) return callback(new Error(notfoundErr)) - msbuildPath = path.resolve(msbuilds.pop().path, 'msbuild.exe') - fs.stat(msbuildPath, function (err, stat) { - if (err) { - if (err.code == 'ENOENT') { - if (msbuilds.length) { - return verifyMsbuild() - } else { - callback(new Error(notfoundErr)) - } - } else { - callback(err) - } - return - } - command = msbuildPath - doBuild() - }) - })() + log.verbose('`which` succeeded for `' + command + '`', execPath) + doBuild() }) } - /** * Actually spawn the process and compile the module. */ function doBuild () { - // Enable Verbose build var verbose = log.levels[log.level] <= log.levels.verbose + var j + if (!win && verbose) { argv.push('V=1') } + if (win && !verbose) { argv.push('/clp:Verbosity=minimal') } @@ -214,12 +148,12 @@ function build (gyp, argv, callback) { // Since there are many ways to state '32-bit Intel', default to it. // N.B. msbuild's Condition string equality tests are case-insensitive. var archLower = arch.toLowerCase() - var p = archLower === 'x64' ? 'x64' : - (archLower === 'arm' ? 'ARM' : - (archLower === 'arm64' ? 'ARM64' : 'Win32')) + var p = archLower === 'x64' ? 'x64' + : (archLower === 'arm' ? 'ARM' + : (archLower === 'arm64' ? 'ARM64' : 'Win32')) argv.push('/p:Configuration=' + buildType + ';Platform=' + p) if (jobs) { - var j = parseInt(jobs, 10) + j = parseInt(jobs, 10) if (!isNaN(j) && j > 0) { argv.push('/m:' + j) } else if (jobs.toUpperCase() === 'MAX') { @@ -232,7 +166,7 @@ function build (gyp, argv, callback) { argv.push('-C') argv.push('build') if (jobs) { - var j = parseInt(jobs, 10) + j = parseInt(jobs, 10) if (!isNaN(j) && j > 0) { argv.push('--jobs') argv.push(j) @@ -246,7 +180,7 @@ function build (gyp, argv, callback) { if (win) { // did the user specify their own .sln file? var hasSln = argv.some(function (arg) { - return path.extname(arg) == '.sln' + return path.extname(arg) === '.sln' }) if (!hasSln) { argv.unshift(gyp.opts.solution || guessedSolution) @@ -257,10 +191,6 @@ function build (gyp, argv, callback) { proc.on('exit', onExit) } - /** - * Invoked after the make/msbuild command exits. - */ - function onExit (code, signal) { if (code !== 0) { return callback(new Error('`' + command + '` failed with exit code: ' + code)) @@ -270,5 +200,6 @@ function build (gyp, argv, callback) { } callback() } - } + +module.exports = build diff --git a/deps/npm/node_modules/node-gyp/lib/clean.js b/deps/npm/node_modules/node-gyp/lib/clean.js index e69164d45afcc5..dbfa4dbb99d3cb 100644 --- a/deps/npm/node_modules/node-gyp/lib/clean.js +++ b/deps/npm/node_modules/node-gyp/lib/clean.js @@ -1,22 +1,15 @@ +'use strict' -module.exports = exports = clean - -exports.usage = 'Removes any generated build files and the "out" dir' - -/** - * Module dependencies. - */ - -var rm = require('rimraf') -var log = require('npmlog') - +const rm = require('rimraf') +const log = require('npmlog') function clean (gyp, argv, callback) { - // Remove the 'build' dir var buildDir = 'build' log.verbose('clean', 'removing "%s" directory', buildDir) rm(buildDir, callback) - } + +module.exports = clean +module.exports.usage = 'Removes any generated build files and the "out" dir' diff --git a/deps/npm/node_modules/node-gyp/lib/configure.js b/deps/npm/node_modules/node-gyp/lib/configure.js index 88444dc5e17c20..267e7587f5db9a 100644 --- a/deps/npm/node_modules/node-gyp/lib/configure.js +++ b/deps/npm/node_modules/node-gyp/lib/configure.js @@ -1,42 +1,28 @@ -module.exports = exports = configure -module.exports.test = { - PythonFinder: PythonFinder, - findAccessibleSync: findAccessibleSync, - findPython: findPython, +'use strict' + +const fs = require('graceful-fs') +const path = require('path') +const log = require('npmlog') +const os = require('os') +const mkdirp = require('mkdirp') +const processRelease = require('./process-release') +const win = process.platform === 'win32' +const findNodeDirectory = require('./find-node-directory') +const msgFormat = require('util').format +var findPython = require('./find-python') +if (win) { + var findVisualStudio = require('./find-visualstudio') } -/** - * Module dependencies. - */ - -var fs = require('graceful-fs') - , path = require('path') - , log = require('npmlog') - , osenv = require('osenv') - , which = require('which') - , semver = require('semver') - , mkdirp = require('mkdirp') - , cp = require('child_process') - , extend = require('util')._extend - , processRelease = require('./process-release') - , win = process.platform === 'win32' - , findNodeDirectory = require('./find-node-directory') - , msgFormat = require('util').format -if (win) - var findVS2017 = require('./find-vs2017') - -exports.usage = 'Generates ' + (win ? 'MSVC project files' : 'a Makefile') + ' for the current module' - function configure (gyp, argv, callback) { - - var python = gyp.opts.python || process.env.PYTHON || 'python2' - , buildDir = path.resolve('build') - , configNames = [ 'config.gypi', 'common.gypi' ] - , configs = [] - , nodeDir - , release = processRelease(argv, gyp, process.version, process.release) - - findPython(python, function (err, found) { + var python + var buildDir = path.resolve('build') + var configNames = [ 'config.gypi', 'common.gypi' ] + var configs = [] + var nodeDir + var release = processRelease(argv, gyp, process.version, process.release) + + findPython(gyp.opts.python, function (err, found) { if (err) { callback(err) } else { @@ -46,17 +32,15 @@ function configure (gyp, argv, callback) { }) function getNodeDir () { - // 'python' should be set by now process.env.PYTHON = python if (gyp.opts.nodedir) { // --nodedir was specified. use that for the dev files - nodeDir = gyp.opts.nodedir.replace(/^~/, osenv.home()) + nodeDir = gyp.opts.nodedir.replace(/^~/, os.homedir()) log.verbose('get node dir', 'compiling against specified --nodedir dev files: %s', nodeDir) createBuildDir() - } else { // if no --nodedir specified, ensure node dependencies are installed if ('v' + release.version !== process.version) { @@ -74,10 +58,12 @@ function configure (gyp, argv, callback) { // If the tarball option is set, always remove and reinstall the headers // into devdir. Otherwise only install if they're not already there. - gyp.opts.ensure = gyp.opts.tarball ? false : true + gyp.opts.ensure = !gyp.opts.tarball - gyp.commands.install([ release.version ], function (err, version) { - if (err) return callback(err) + gyp.commands.install([ release.version ], function (err) { + if (err) { + return callback(err) + } log.verbose('get node dir', 'target node version installed:', release.versionDir) nodeDir = path.resolve(gyp.devDir, release.versionDir) createBuildDir() @@ -88,25 +74,23 @@ function configure (gyp, argv, callback) { function createBuildDir () { log.verbose('build dir', 'attempting to create "build" dir: %s', buildDir) mkdirp(buildDir, function (err, isNew) { - if (err) return callback(err) + if (err) { + return callback(err) + } log.verbose('build dir', '"build" dir needed to be created?', isNew) - if (win && (!gyp.opts.msvs_version || gyp.opts.msvs_version === '2017')) { - findVS2017(function (err, vsSetup) { - if (err) { - log.verbose('Not using VS2017:', err.message) - createConfigFile() - } else { - createConfigFile(null, vsSetup) - } - }) + if (win) { + findVisualStudio(release.semver, gyp.opts.msvs_version, + createConfigFile) } else { createConfigFile() } }) } - function createConfigFile (err, vsSetup) { - if (err) return callback(err) + function createConfigFile (err, vsInfo) { + if (err) { + return callback(err) + } var configFilename = 'config.gypi' var configPath = path.resolve(buildDir, configFilename) @@ -114,14 +98,18 @@ function configure (gyp, argv, callback) { log.verbose('build/' + configFilename, 'creating config file') var config = process.config || {} - , defaults = config.target_defaults - , variables = config.variables + var defaults = config.target_defaults + var variables = config.variables // default "config.variables" - if (!variables) variables = config.variables = {} + if (!variables) { + variables = config.variables = {} + } // default "config.defaults" - if (!defaults) defaults = config.target_defaults = {} + if (!defaults) { + defaults = config.target_defaults = {} + } // don't inherit the "defaults" from node's `process.config` object. // doing so could cause problems in cases where the `node` executable was @@ -136,13 +124,14 @@ function configure (gyp, argv, callback) { if ('debug' in gyp.opts) { defaults.default_configuration = gyp.opts.debug ? 'Debug' : 'Release' } + if (!defaults.default_configuration) { defaults.default_configuration = 'Release' } // set the target_arch variable variables.target_arch = gyp.opts.arch || process.arch || 'ia32' - if (variables.target_arch == 'arm64') { + if (variables.target_arch === 'arm64') { defaults['msvs_configuration_platform'] = 'ARM64' } @@ -152,17 +141,23 @@ function configure (gyp, argv, callback) { // disable -T "thin" static archives by default variables.standalone_static_library = gyp.opts.thin ? 0 : 1 - if (vsSetup) { - // GYP doesn't (yet) have support for VS2017, so we force it to VS2015 - // to avoid pulling a floating patch that has not landed upstream. - // Ref: https://chromium-review.googlesource.com/#/c/433540/ - gyp.opts.msvs_version = '2015' - process.env['GYP_MSVS_VERSION'] = 2015 - process.env['GYP_MSVS_OVERRIDE_PATH'] = vsSetup.path - defaults['msbuild_toolset'] = 'v141' - defaults['msvs_windows_target_platform_version'] = vsSetup.sdk - variables['msbuild_path'] = path.join(vsSetup.path, 'MSBuild', '15.0', - 'Bin', 'MSBuild.exe') + if (win) { + process.env['GYP_MSVS_VERSION'] = Math.min(vsInfo.versionYear, 2015) + process.env['GYP_MSVS_OVERRIDE_PATH'] = vsInfo.path + defaults['msbuild_toolset'] = vsInfo.toolset + if (vsInfo.sdk) { + defaults['msvs_windows_target_platform_version'] = vsInfo.sdk + } + if (variables.target_arch === 'arm64') { + if (vsInfo.versionMajor > 15 || + (vsInfo.versionMajor === 15 && vsInfo.versionMajor >= 9)) { + defaults['msvs_enable_marmasm'] = 1 + } else { + log.warn('Compiling ARM64 assembly is only available in\n' + + 'Visual Studio 2017 version 15.9 and above') + } + } + variables['msbuild_path'] = vsInfo.msBuild } // loop through the rest of the opts and add the unknown ones as variables. @@ -170,15 +165,20 @@ function configure (gyp, argv, callback) { // // $ node-gyp configure --shared-libxml2 Object.keys(gyp.opts).forEach(function (opt) { - if (opt === 'argv') return - if (opt in gyp.configDefs) return + if (opt === 'argv') { + return + } + if (opt in gyp.configDefs) { + return + } variables[opt.replace(/-/g, '_')] = gyp.opts[opt] }) // ensures that any boolean values from `process.config` get stringified function boolsToString (k, v) { - if (typeof v === 'boolean') + if (typeof v === 'boolean') { return String(v) + } return v } @@ -186,21 +186,28 @@ function configure (gyp, argv, callback) { // now write out the config.gypi file to the build/ dir var prefix = '# Do not edit. File was generated by node-gyp\'s "configure" step' - , json = JSON.stringify(config, boolsToString, 2) + + var json = JSON.stringify(config, boolsToString, 2) log.verbose('build/' + configFilename, 'writing out config file: %s', configPath) configs.push(configPath) - fs.writeFile(configPath, [prefix, json, ''].join('\n'), findConfigs) + fs.writeFile(configPath, [ prefix, json, '' ].join('\n'), findConfigs) } function findConfigs (err) { - if (err) return callback(err) + if (err) { + return callback(err) + } + var name = configNames.shift() - if (!name) return runGyp() + if (!name) { + return runGyp() + } var fullPath = path.resolve(name) + log.verbose(name, 'checking for gypi file: %s', fullPath) - fs.stat(fullPath, function (err, stat) { + fs.stat(fullPath, function (err) { if (err) { - if (err.code == 'ENOENT') { + if (err.code === 'ENOENT') { findConfigs() // check next gypi filename } else { callback(err) @@ -214,7 +221,9 @@ function configure (gyp, argv, callback) { } function runGyp (err) { - if (err) return callback(err) + if (err) { + return callback(err) + } if (!~argv.indexOf('-f') && !~argv.indexOf('--format')) { if (win) { @@ -228,20 +237,6 @@ function configure (gyp, argv, callback) { } } - function hasMsvsVersion () { - return argv.some(function (arg) { - return arg.indexOf('msvs_version') === 0 - }) - } - - if (win && !hasMsvsVersion()) { - if ('msvs_version' in gyp.opts) { - argv.push('-G', 'msvs_version=' + gyp.opts.msvs_version) - } else { - argv.push('-G', 'msvs_version=auto') - } - } - // include all the ".gypi" files that were found configs.forEach(function (config) { argv.push('-I', config) @@ -249,63 +244,68 @@ function configure (gyp, argv, callback) { // For AIX and z/OS we need to set up the path to the exports file // which contains the symbols needed for linking. - var node_exp_file = undefined + var nodeExpFile if (process.platform === 'aix' || process.platform === 'os390') { var ext = process.platform === 'aix' ? 'exp' : 'x' - var node_root_dir = findNodeDirectory() - var candidates = undefined + var nodeRootDir = findNodeDirectory() + var candidates + if (process.platform === 'aix') { - candidates = ['include/node/node', - 'out/Release/node', - 'out/Debug/node', - 'node' - ].map(function(file) { - return file + '.' + ext - }) + candidates = [ + 'include/node/node', + 'out/Release/node', + 'out/Debug/node', + 'node' + ].map(function (file) { + return file + '.' + ext + }) } else { - candidates = ['out/Release/obj.target/libnode', - 'out/Debug/obj.target/libnode', - 'lib/libnode' - ].map(function(file) { - return file + '.' + ext - }) + candidates = [ + 'out/Release/obj.target/libnode', + 'out/Debug/obj.target/libnode', + 'lib/libnode' + ].map(function (file) { + return file + '.' + ext + }) } + var logprefix = 'find exports file' - node_exp_file = findAccessibleSync(logprefix, node_root_dir, candidates) - if (node_exp_file !== undefined) { - log.verbose(logprefix, 'Found exports file: %s', node_exp_file) + nodeExpFile = findAccessibleSync(logprefix, nodeRootDir, candidates) + if (nodeExpFile !== undefined) { + log.verbose(logprefix, 'Found exports file: %s', nodeExpFile) } else { - var msg = msgFormat('Could not find node.%s file in %s', ext, node_root_dir) + var msg = msgFormat('Could not find node.%s file in %s', ext, nodeRootDir) log.error(logprefix, 'Could not find exports file') return callback(new Error(msg)) } } // this logic ported from the old `gyp_addon` python file - var gyp_script = path.resolve(__dirname, '..', 'gyp', 'gyp_main.py') - var addon_gypi = path.resolve(__dirname, '..', 'addon.gypi') - var common_gypi = path.resolve(nodeDir, 'include/node/common.gypi') - fs.stat(common_gypi, function (err, stat) { - if (err) - common_gypi = path.resolve(nodeDir, 'common.gypi') - - var output_dir = 'build' + var gypScript = path.resolve(__dirname, '..', 'gyp', 'gyp_main.py') + var addonGypi = path.resolve(__dirname, '..', 'addon.gypi') + var commonGypi = path.resolve(nodeDir, 'include/node/common.gypi') + fs.stat(commonGypi, function (err) { + if (err) { + commonGypi = path.resolve(nodeDir, 'common.gypi') + } + + var outputDir = 'build' if (win) { // Windows expects an absolute path - output_dir = buildDir + outputDir = buildDir } var nodeGypDir = path.resolve(__dirname, '..') var nodeLibFile = path.join(nodeDir, !gyp.opts.nodedir ? '<(target_arch)' : '$(Configuration)', release.name + '.lib') - argv.push('-I', addon_gypi) - argv.push('-I', common_gypi) + argv.push('-I', addonGypi) + argv.push('-I', commonGypi) argv.push('-Dlibrary=shared_library') argv.push('-Dvisibility=default') argv.push('-Dnode_root_dir=' + nodeDir) if (process.platform === 'aix' || process.platform === 'os390') { - argv.push('-Dnode_exp_file=' + node_exp_file) + argv.push('-Dnode_exp_file=' + nodeExpFile) } argv.push('-Dnode_gyp_dir=' + nodeGypDir) argv.push('-Dnode_lib_file=' + nodeLibFile) @@ -316,7 +316,7 @@ function configure (gyp, argv, callback) { argv.push('--no-parallel') // tell gyp to write the Makefile/Solution files into output_dir - argv.push('--generator-output', output_dir) + argv.push('--generator-output', outputDir) // tell make to write its output into the same dir argv.push('-Goutput_dir=.') @@ -325,10 +325,10 @@ function configure (gyp, argv, callback) { argv.unshift('binding.gyp') // execute `gyp` from the current target nodedir - argv.unshift(gyp_script) + argv.unshift(gypScript) // make sure python uses files that came with this particular node package - var pypath = [path.join(__dirname, '..', 'gyp', 'pylib')] + var pypath = [ path.join(__dirname, '..', 'gyp', 'pylib') ] if (process.env.PYTHONPATH) { pypath.push(process.env.PYTHONPATH) } @@ -339,11 +339,7 @@ function configure (gyp, argv, callback) { }) } - /** - * Called when the `gyp` child process exits. - */ - - function onCpExit (code, signal) { + function onCpExit (code) { if (code !== 0) { callback(new Error('`gyp` failed with exit code: ' + code)) } else { @@ -351,7 +347,6 @@ function configure (gyp, argv, callback) { callback() } } - } /** @@ -361,167 +356,24 @@ function configure (gyp, argv, callback) { */ function findAccessibleSync (logprefix, dir, candidates) { for (var next = 0; next < candidates.length; next++) { - var candidate = path.resolve(dir, candidates[next]) - try { - var fd = fs.openSync(candidate, 'r') - } catch (e) { - // this candidate was not found or not readable, do nothing - log.silly(logprefix, 'Could not open %s: %s', candidate, e.message) - continue - } - fs.closeSync(fd) - log.silly(logprefix, 'Found readable %s', candidate) - return candidate + var candidate = path.resolve(dir, candidates[next]) + try { + var fd = fs.openSync(candidate, 'r') + } catch (e) { + // this candidate was not found or not readable, do nothing + log.silly(logprefix, 'Could not open %s: %s', candidate, e.message) + continue + } + fs.closeSync(fd) + log.silly(logprefix, 'Found readable %s', candidate) + return candidate } return undefined } -function PythonFinder(python, callback) { - this.callback = callback - this.python = python -} - -PythonFinder.prototype = { - checkPythonLauncherDepth: 0, - env: process.env, - execFile: cp.execFile, - log: log, - resolve: path.win32 && path.win32.resolve || path.resolve, - stat: fs.stat, - which: which, - win: win, - - checkPython: function checkPython () { - this.log.verbose('check python', - 'checking for Python executable "%s" in the PATH', - this.python) - this.which(this.python, function (err, execPath) { - if (err) { - this.log.verbose('`which` failed', this.python, err) - if (this.python === 'python2') { - this.python = 'python' - return this.checkPython() - } - if (this.win) { - this.checkPythonLauncher() - } else { - this.failNoPython() - } - } else { - this.log.verbose('`which` succeeded', this.python, execPath) - // Found the `python` executable, and from now on we use it explicitly. - // This solves #667 and #750 (`execFile` won't run batch files - // (*.cmd, and *.bat)) - this.python = execPath - this.checkPythonVersion() - } - }.bind(this)) - }, - - // Distributions of Python on Windows by default install with the "py.exe" - // Python launcher which is more likely to exist than the Python executable - // being in the $PATH. - // Because the Python launcher supports all versions of Python, we have to - // explicitly request a Python 2 version. This is done by supplying "-2" as - // the first command line argument. Since "py.exe -2" would be an invalid - // executable for "execFile", we have to use the launcher to figure out - // where the actual "python.exe" executable is located. - checkPythonLauncher: function checkPythonLauncher () { - this.checkPythonLauncherDepth += 1 - - this.log.verbose( - 'could not find "' + this.python + '". checking python launcher') - var env = extend({}, this.env) - env.TERM = 'dumb' - - var launcherArgs = ['-2', '-c', 'import sys; print sys.executable'] - this.execFile('py.exe', launcherArgs, { env: env }, function (err, stdout) { - if (err) { - this.guessPython() - } else { - this.python = stdout.trim() - this.log.verbose('check python launcher', - 'python executable found: %j', - this.python) - this.checkPythonVersion() - } - this.checkPythonLauncherDepth -= 1 - }.bind(this)) - }, - - checkPythonVersion: function checkPythonVersion () { - var args = ['-c', 'import sys; print "%s.%s.%s" % sys.version_info[:3];'] - var env = extend({}, this.env) - env.TERM = 'dumb' - - this.execFile(this.python, args, { env: env }, function (err, stdout) { - if (err) { - return this.callback(err) - } - this.log.verbose('check python version', - '`%s -c "' + args[1] + '"` returned: %j', - this.python, stdout) - var version = stdout.trim() - var range = semver.Range('>=2.5.0 <3.0.0') - var valid = false - try { - valid = range.test(version) - } catch (e) { - this.log.silly('range.test() error', e) - } - if (valid) { - this.callback(null, this.python) - } else if (this.win && this.checkPythonLauncherDepth === 0) { - this.checkPythonLauncher() - } else { - this.failPythonVersion(version) - } - }.bind(this)) - }, - - failNoPython: function failNoPython () { - var errmsg = - 'Can\'t find Python executable "' + this.python + - '", you can set the PYTHON env variable.' - this.callback(new Error(errmsg)) - }, - - failPythonVersion: function failPythonVersion (badVersion) { - var errmsg = - 'Python executable "' + this.python + - '" is v' + badVersion + ', which is not supported by gyp.\n' + - 'You can pass the --python switch to point to ' + - 'Python >= v2.5.0 & < 3.0.0.' - this.callback(new Error(errmsg)) - }, - - // Called on Windows when "python" isn't available in the current $PATH. - // We are going to check if "%SystemDrive%\python27\python.exe" exists. - guessPython: function guessPython () { - this.log.verbose('could not find "' + this.python + '". guessing location') - var rootDir = this.env.SystemDrive || 'C:\\' - if (rootDir[rootDir.length - 1] !== '\\') { - rootDir += '\\' - } - var pythonPath = this.resolve(rootDir, 'Python27', 'python.exe') - this.log.verbose('ensuring that file exists:', pythonPath) - this.stat(pythonPath, function (err, stat) { - if (err) { - if (err.code == 'ENOENT') { - this.failNoPython() - } else { - this.callback(err) - } - return - } - this.python = pythonPath - this.checkPythonVersion() - }.bind(this)) - }, -} - -function findPython (python, callback) { - var finder = new PythonFinder(python, callback) - finder.checkPython() +module.exports = configure +module.exports.test = { + findAccessibleSync: findAccessibleSync } +module.exports.usage = 'Generates ' + (win ? 'MSVC project files' : 'a Makefile') + ' for the current module' diff --git a/deps/npm/node_modules/node-gyp/lib/find-node-directory.js b/deps/npm/node_modules/node-gyp/lib/find-node-directory.js index 3aee8a109ae280..0dd781a6cfae8c 100644 --- a/deps/npm/node_modules/node-gyp/lib/find-node-directory.js +++ b/deps/npm/node_modules/node-gyp/lib/find-node-directory.js @@ -1,7 +1,9 @@ -var path = require('path') - , log = require('npmlog') +'use strict' -function findNodeDirectory(scriptLocation, processObj) { +const path = require('path') +const log = require('npmlog') + +function findNodeDirectory (scriptLocation, processObj) { // set dirname and process if not passed in // this facilitates regression tests if (scriptLocation === undefined) { @@ -12,50 +14,50 @@ function findNodeDirectory(scriptLocation, processObj) { } // Have a look to see what is above us, to try and work out where we are - npm_parent_directory = path.join(scriptLocation, '../../../..') - log.verbose('node-gyp root', 'npm_parent_directory is ' - + path.basename(npm_parent_directory)) - node_root_dir = "" + var npmParentDirectory = path.join(scriptLocation, '../../../..') + log.verbose('node-gyp root', 'npm_parent_directory is ' + + path.basename(npmParentDirectory)) + var nodeRootDir = '' log.verbose('node-gyp root', 'Finding node root directory') - if (path.basename(npm_parent_directory) === 'deps') { + if (path.basename(npmParentDirectory) === 'deps') { // We are in a build directory where this script lives in // deps/npm/node_modules/node-gyp/lib - node_root_dir = path.join(npm_parent_directory, '..') - log.verbose('node-gyp root', 'in build directory, root = ' - + node_root_dir) - } else if (path.basename(npm_parent_directory) === 'node_modules') { + nodeRootDir = path.join(npmParentDirectory, '..') + log.verbose('node-gyp root', 'in build directory, root = ' + + nodeRootDir) + } else if (path.basename(npmParentDirectory) === 'node_modules') { // We are in a node install directory where this script lives in // lib/node_modules/npm/node_modules/node-gyp/lib or // node_modules/npm/node_modules/node-gyp/lib depending on the // platform if (processObj.platform === 'win32') { - node_root_dir = path.join(npm_parent_directory, '..') + nodeRootDir = path.join(npmParentDirectory, '..') } else { - node_root_dir = path.join(npm_parent_directory, '../..') + nodeRootDir = path.join(npmParentDirectory, '../..') } - log.verbose('node-gyp root', 'in install directory, root = ' - + node_root_dir) + log.verbose('node-gyp root', 'in install directory, root = ' + + nodeRootDir) } else { // We don't know where we are, try working it out from the location // of the node binary - var node_dir = path.dirname(processObj.execPath) - var directory_up = path.basename(node_dir) - if (directory_up === 'bin') { - node_root_dir = path.join(node_dir, '..') - } else if (directory_up === 'Release' || directory_up === 'Debug') { + var nodeDir = path.dirname(processObj.execPath) + var directoryUp = path.basename(nodeDir) + if (directoryUp === 'bin') { + nodeRootDir = path.join(nodeDir, '..') + } else if (directoryUp === 'Release' || directoryUp === 'Debug') { // If we are a recently built node, and the directory structure // is that of a repository. If we are on Windows then we only need // to go one level up, everything else, two if (processObj.platform === 'win32') { - node_root_dir = path.join(node_dir, '..') + nodeRootDir = path.join(nodeDir, '..') } else { - node_root_dir = path.join(node_dir, '../..') + nodeRootDir = path.join(nodeDir, '../..') } } // Else return the default blank, "". } - return node_root_dir + return nodeRootDir } module.exports = findNodeDirectory diff --git a/deps/npm/node_modules/node-gyp/lib/find-python.js b/deps/npm/node_modules/node-gyp/lib/find-python.js new file mode 100644 index 00000000000000..1a4390dbd2c9c0 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/lib/find-python.js @@ -0,0 +1,317 @@ +'use strict' + +const path = require('path') +const log = require('npmlog') +const semver = require('semver') +const cp = require('child_process') +const extend = require('util')._extend // eslint-disable-line +const win = process.platform === 'win32' +const logWithPrefix = require('./util').logWithPrefix + +function PythonFinder (configPython, callback) { + this.callback = callback + this.configPython = configPython + this.errorLog = [] +} + +PythonFinder.prototype = { + log: logWithPrefix(log, 'find Python'), + argsExecutable: [ '-c', 'import sys; print(sys.executable);' ], + argsVersion: [ '-c', 'import sys; print("%s.%s.%s" % sys.version_info[:3]);' ], + semverRange: process.env.EXPERIMENTAL_NODE_GYP_PYTHON3 ? '2.7.x || >=3.5.0' + : '>=2.6.0 <3.0.0', + + // These can be overridden for testing: + execFile: cp.execFile, + env: process.env, + win: win, + pyLauncher: 'py.exe', + winDefaultLocations: [ + path.join(process.env.SystemDrive || 'C:', 'Python27', 'python.exe'), + path.join(process.env.SystemDrive || 'C:', 'Python37', 'python.exe') + ], + + // Logs a message at verbose level, but also saves it to be displayed later + // at error level if an error occurs. This should help diagnose the problem. + addLog: function addLog (message) { + this.log.verbose(message) + this.errorLog.push(message) + }, + + // Find Python by trying a sequence of possibilities. + // Ignore errors, keep trying until Python is found. + findPython: function findPython () { + const SKIP = 0; const FAIL = 1 + var toCheck = getChecks.apply(this) + + function getChecks () { + if (this.env.NODE_GYP_FORCE_PYTHON) { + return [ { + before: () => { + this.addLog( + 'checking Python explicitly set from NODE_GYP_FORCE_PYTHON') + this.addLog('- process.env.NODE_GYP_FORCE_PYTHON is ' + + `"${this.env.NODE_GYP_FORCE_PYTHON}"`) + }, + check: this.checkCommand, + arg: this.env.NODE_GYP_FORCE_PYTHON + } ] + } + + var checks = [ + { + before: () => { + if (!this.configPython) { + this.addLog( + 'Python is not set from command line or npm configuration') + return SKIP + } + this.addLog('checking Python explicitly set from command line or ' + + 'npm configuration') + this.addLog('- "--python=" or "npm config get python" is ' + + `"${this.configPython}"`) + }, + check: this.checkCommand, + arg: this.configPython + }, + { + before: () => { + if (!this.env.PYTHON) { + this.addLog('Python is not set from environment variable ' + + 'PYTHON') + return SKIP + } + this.addLog('checking Python explicitly set from environment ' + + 'variable PYTHON') + this.addLog(`- process.env.PYTHON is "${this.env.PYTHON}"`) + }, + check: this.checkCommand, + arg: this.env.PYTHON + }, + { + before: () => { this.addLog('checking if "python" can be used') }, + check: this.checkCommand, + arg: 'python' + }, + { + before: () => { this.addLog('checking if "python2" can be used') }, + check: this.checkCommand, + arg: 'python2' + } + ] + + if (this.win) { + checks.push({ + before: () => { + this.addLog( + 'checking if the py launcher can be used to find Python 2') + }, + check: this.checkPyLauncher + }) + for (var i = 0; i < this.winDefaultLocations.length; ++i) { + const location = this.winDefaultLocations[i] + checks.push({ + before: () => { + this.addLog('checking if Python is ' + + `${location}`) + }, + check: this.checkExecPath, + arg: location + }) + } + } + + return checks + } + + function runChecks (err) { + this.log.silly('runChecks: err = %j', (err && err.stack) || err) + + const check = toCheck.shift() + if (!check) { + return this.fail() + } + + const before = check.before.apply(this) + if (before === SKIP) { + return runChecks.apply(this) + } + if (before === FAIL) { + return this.fail() + } + + const args = [ runChecks.bind(this) ] + if (check.arg) { + args.unshift(check.arg) + } + check.check.apply(this, args) + } + + runChecks.apply(this) + }, + + // Check if command is a valid Python to use. + // Will exit the Python finder on success. + // If on Windows, run in a CMD shell to support BAT/CMD launchers. + checkCommand: function checkCommand (command, errorCallback) { + var exec = command + var args = this.argsExecutable + var shell = false + if (this.win) { + // Arguments have to be manually quoted + exec = `"${exec}"` + args = args.map(a => `"${a}"`) + shell = true + } + + this.log.verbose(`- executing "${command}" to get executable path`) + this.run(exec, args, shell, function (err, execPath) { + // Possible outcomes: + // - Error: not in PATH, not executable or execution fails + // - Gibberish: the next command to check version will fail + // - Absolute path to executable + if (err) { + this.addLog(`- "${command}" is not in PATH or produced an error`) + return errorCallback(err) + } + this.addLog(`- executable path is "${execPath}"`) + this.checkExecPath(execPath, errorCallback) + }.bind(this)) + }, + + // Check if the py launcher can find a valid Python to use. + // Will exit the Python finder on success. + // Distributions of Python on Windows by default install with the "py.exe" + // Python launcher which is more likely to exist than the Python executable + // being in the $PATH. + // Because the Python launcher supports all versions of Python, we have to + // explicitly request a Python 2 version. This is done by supplying "-2" as + // the first command line argument. Since "py.exe -2" would be an invalid + // executable for "execFile", we have to use the launcher to figure out + // where the actual "python.exe" executable is located. + checkPyLauncher: function checkPyLauncher (errorCallback) { + this.log.verbose( + `- executing "${this.pyLauncher}" to get Python 2 executable path`) + this.run(this.pyLauncher, [ '-2', ...this.argsExecutable ], false, + function (err, execPath) { + // Possible outcomes: same as checkCommand + if (err) { + this.addLog( + `- "${this.pyLauncher}" is not in PATH or produced an error`) + return errorCallback(err) + } + this.addLog(`- executable path is "${execPath}"`) + this.checkExecPath(execPath, errorCallback) + }.bind(this)) + }, + + // Check if a Python executable is the correct version to use. + // Will exit the Python finder on success. + checkExecPath: function checkExecPath (execPath, errorCallback) { + this.log.verbose(`- executing "${execPath}" to get version`) + this.run(execPath, this.argsVersion, false, function (err, version) { + // Possible outcomes: + // - Error: executable can not be run (likely meaning the command wasn't + // a Python executable and the previous command produced gibberish) + // - Gibberish: somehow the last command produced an executable path, + // this will fail when verifying the version + // - Version of the Python executable + if (err) { + this.addLog(`- "${execPath}" could not be run`) + return errorCallback(err) + } + this.addLog(`- version is "${version}"`) + + const range = semver.Range(this.semverRange) + var valid = false + try { + valid = range.test(version) + } catch (err) { + this.log.silly('range.test() threw:\n%s', err.stack) + this.addLog(`- "${execPath}" does not have a valid version`) + this.addLog('- is it a Python executable?') + return errorCallback(err) + } + + if (!valid) { + this.addLog(`- version is ${version} - should be ${this.semverRange}`) + this.addLog('- THIS VERSION OF PYTHON IS NOT SUPPORTED') + return errorCallback(new Error( + `Found unsupported Python version ${version}`)) + } + this.succeed(execPath, version) + }.bind(this)) + }, + + // Run an executable or shell command, trimming the output. + run: function run (exec, args, shell, callback) { + var env = extend({}, this.env) + env.TERM = 'dumb' + const opts = { env: env, shell: shell } + + this.log.silly('execFile: exec = %j', exec) + this.log.silly('execFile: args = %j', args) + this.log.silly('execFile: opts = %j', opts) + try { + this.execFile(exec, args, opts, execFileCallback.bind(this)) + } catch (err) { + this.log.silly('execFile: threw:\n%s', err.stack) + return callback(err) + } + + function execFileCallback (err, stdout, stderr) { + this.log.silly('execFile result: err = %j', (err && err.stack) || err) + this.log.silly('execFile result: stdout = %j', stdout) + this.log.silly('execFile result: stderr = %j', stderr) + if (err) { + return callback(err) + } + const execPath = stdout.trim() + callback(null, execPath) + } + }, + + succeed: function succeed (execPath, version) { + this.log.info(`using Python version ${version} found at "${execPath}"`) + process.nextTick(this.callback.bind(null, null, execPath)) + }, + + fail: function fail () { + const errorLog = this.errorLog.join('\n') + + const pathExample = this.win ? 'C:\\Path\\To\\python.exe' + : '/path/to/pythonexecutable' + // For Windows 80 col console, use up to the column before the one marked + // with X (total 79 chars including logger prefix, 58 chars usable here): + // X + const info = [ + '**********************************************************', + 'You need to install the latest version of Python 2.7.', + 'Node-gyp should be able to find and use Python. If not,', + 'you can try one of the following options:', + `- Use the switch --python="${pathExample}"`, + ' (accepted by both node-gyp and npm)', + '- Set the environment variable PYTHON', + '- Set the npm configuration variable python:', + ` npm config set python "${pathExample}"`, + 'For more information consult the documentation at:', + 'https://github.com/nodejs/node-gyp#installation', + '**********************************************************' + ].join('\n') + + this.log.error(`\n${errorLog}\n\n${info}\n`) + process.nextTick(this.callback.bind(null, new Error( + 'Could not find any Python installation to use'))) + } +} + +function findPython (configPython, callback) { + var finder = new PythonFinder(configPython, callback) + finder.findPython() +} + +module.exports = findPython +module.exports.test = { + PythonFinder: PythonFinder, + findPython: findPython +} diff --git a/deps/npm/node_modules/node-gyp/lib/find-visualstudio.js b/deps/npm/node_modules/node-gyp/lib/find-visualstudio.js new file mode 100644 index 00000000000000..b2c00e68355b70 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/lib/find-visualstudio.js @@ -0,0 +1,427 @@ +'use strict' + +const log = require('npmlog') +const execFile = require('child_process').execFile +const path = require('path').win32 +const logWithPrefix = require('./util').logWithPrefix +const regSearchKeys = require('./util').regSearchKeys + +function findVisualStudio (nodeSemver, configMsvsVersion, callback) { + const finder = new VisualStudioFinder(nodeSemver, configMsvsVersion, + callback) + finder.findVisualStudio() +} + +function VisualStudioFinder (nodeSemver, configMsvsVersion, callback) { + this.nodeSemver = nodeSemver + this.configMsvsVersion = configMsvsVersion + this.callback = callback + this.errorLog = [] + this.validVersions = [] +} + +VisualStudioFinder.prototype = { + log: logWithPrefix(log, 'find VS'), + + regSearchKeys: regSearchKeys, + + // Logs a message at verbose level, but also saves it to be displayed later + // at error level if an error occurs. This should help diagnose the problem. + addLog: function addLog (message) { + this.log.verbose(message) + this.errorLog.push(message) + }, + + findVisualStudio: function findVisualStudio () { + this.configVersionYear = null + this.configPath = null + if (this.configMsvsVersion) { + this.addLog('msvs_version was set from command line or npm config') + if (this.configMsvsVersion.match(/^\d{4}$/)) { + this.configVersionYear = parseInt(this.configMsvsVersion, 10) + this.addLog( + `- looking for Visual Studio version ${this.configVersionYear}`) + } else { + this.configPath = path.resolve(this.configMsvsVersion) + this.addLog( + `- looking for Visual Studio installed in "${this.configPath}"`) + } + } else { + this.addLog('msvs_version not set from command line or npm config') + } + + if (process.env.VCINSTALLDIR) { + this.envVcInstallDir = + path.resolve(process.env.VCINSTALLDIR, '..') + this.addLog('running in VS Command Prompt, installation path is:\n' + + `"${this.envVcInstallDir}"\n- will only use this version`) + } else { + this.addLog('VCINSTALLDIR not set, not running in VS Command Prompt') + } + + this.findVisualStudio2017OrNewer((info) => { + if (info) { + return this.succeed(info) + } + this.findVisualStudio2015((info) => { + if (info) { + return this.succeed(info) + } + this.findVisualStudio2013((info) => { + if (info) { + return this.succeed(info) + } + this.fail() + }) + }) + }) + }, + + succeed: function succeed (info) { + this.log.info(`using VS${info.versionYear} (${info.version}) found at:` + + `\n"${info.path}"` + + '\nrun with --verbose for detailed information') + process.nextTick(this.callback.bind(null, null, info)) + }, + + fail: function fail () { + if (this.configMsvsVersion && this.envVcInstallDir) { + this.errorLog.push( + 'msvs_version does not match this VS Command Prompt or the', + 'installation cannot be used.') + } else if (this.configMsvsVersion) { + // If msvs_version was specified but finding VS failed, print what would + // have been accepted + this.errorLog.push('') + if (this.validVersions) { + this.errorLog.push('valid versions for msvs_version:') + this.validVersions.forEach((version) => { + this.errorLog.push(`- "${version}"`) + }) + } else { + this.errorLog.push('no valid versions for msvs_version were found') + } + } + + const errorLog = this.errorLog.join('\n') + + // For Windows 80 col console, use up to the column before the one marked + // with X (total 79 chars including logger prefix, 62 chars usable here): + // X + const infoLog = [ + '**************************************************************', + 'You need to install the latest version of Visual Studio', + 'including the "Desktop development with C++" workload.', + 'For more information consult the documentation at:', + 'https://github.com/nodejs/node-gyp#on-windows', + '**************************************************************' + ].join('\n') + + this.log.error(`\n${errorLog}\n\n${infoLog}\n`) + process.nextTick(this.callback.bind(null, new Error( + 'Could not find any Visual Studio installation to use'))) + }, + + // Invoke the PowerShell script to get information about Visual Studio 2017 + // or newer installations + findVisualStudio2017OrNewer: function findVisualStudio2017OrNewer (cb) { + var ps = path.join(process.env.SystemRoot, 'System32', + 'WindowsPowerShell', 'v1.0', 'powershell.exe') + var csFile = path.join(__dirname, 'Find-VisualStudio.cs') + var psArgs = [ + '-ExecutionPolicy', + 'Unrestricted', + '-NoProfile', + '-Command', + '&{Add-Type -Path \'' + csFile + '\';' + '[VisualStudioConfiguration.Main]::PrintJson()}' + ] + + this.log.silly('Running', ps, psArgs) + var child = execFile(ps, psArgs, { encoding: 'utf8' }, + (err, stdout, stderr) => { + this.parseData(err, stdout, stderr, cb) + }) + child.stdin.end() + }, + + // Parse the output of the PowerShell script and look for an installation + // of Visual Studio 2017 or newer to use + parseData: function parseData (err, stdout, stderr, cb) { + this.log.silly('PS stderr = %j', stderr) + + const failPowershell = () => { + this.addLog( + 'could not use PowerShell to find Visual Studio 2017 or newer') + cb(null) + } + + if (err) { + this.log.silly('PS err = %j', err && (err.stack || err)) + return failPowershell() + } + + var vsInfo + try { + vsInfo = JSON.parse(stdout) + } catch (e) { + this.log.silly('PS stdout = %j', stdout) + this.log.silly(e) + return failPowershell() + } + + if (!Array.isArray(vsInfo)) { + this.log.silly('PS stdout = %j', stdout) + return failPowershell() + } + + vsInfo = vsInfo.map((info) => { + this.log.silly(`processing installation: "${info.path}"`) + info.path = path.resolve(info.path) + var ret = this.getVersionInfo(info) + ret.path = info.path + ret.msBuild = this.getMSBuild(info, ret.versionYear) + ret.toolset = this.getToolset(info, ret.versionYear) + ret.sdk = this.getSDK(info) + return ret + }) + this.log.silly('vsInfo:', vsInfo) + + // Remove future versions or errors parsing version number + vsInfo = vsInfo.filter((info) => { + if (info.versionYear) { + return true + } + this.addLog(`unknown version "${info.version}" found at "${info.path}"`) + return false + }) + + // Sort to place newer versions first + vsInfo.sort((a, b) => b.versionYear - a.versionYear) + + for (var i = 0; i < vsInfo.length; ++i) { + const info = vsInfo[i] + this.addLog(`checking VS${info.versionYear} (${info.version}) found ` + + `at:\n"${info.path}"`) + + if (info.msBuild) { + this.addLog('- found "Visual Studio C++ core features"') + } else { + this.addLog('- "Visual Studio C++ core features" missing') + continue + } + + if (info.toolset) { + this.addLog(`- found VC++ toolset: ${info.toolset}`) + } else { + this.addLog('- missing any VC++ toolset') + continue + } + + if (info.sdk) { + this.addLog(`- found Windows SDK: ${info.sdk}`) + } else { + this.addLog('- missing any Windows SDK') + continue + } + + if (!this.checkConfigVersion(info.versionYear, info.path)) { + continue + } + + return cb(info) + } + + this.addLog( + 'could not find a version of Visual Studio 2017 or newer to use') + cb(null) + }, + + // Helper - process version information + getVersionInfo: function getVersionInfo (info) { + const match = /^(\d+)\.(\d+)\..*/.exec(info.version) + if (!match) { + this.log.silly('- failed to parse version:', info.version) + return {} + } + this.log.silly('- version match = %j', match) + var ret = { + version: info.version, + versionMajor: parseInt(match[1], 10), + versionMinor: parseInt(match[2], 10) + } + if (ret.versionMajor === 15) { + ret.versionYear = 2017 + return ret + } + if (ret.versionMajor === 16) { + ret.versionYear = 2019 + return ret + } + this.log.silly('- unsupported version:', ret.versionMajor) + return {} + }, + + // Helper - process MSBuild information + getMSBuild: function getMSBuild (info, versionYear) { + const pkg = 'Microsoft.VisualStudio.VC.MSBuild.Base' + if (info.packages.indexOf(pkg) !== -1) { + this.log.silly('- found VC.MSBuild.Base') + if (versionYear === 2017) { + return path.join(info.path, 'MSBuild', '15.0', 'Bin', 'MSBuild.exe') + } + if (versionYear === 2019) { + return path.join(info.path, 'MSBuild', 'Current', 'Bin', 'MSBuild.exe') + } + } + return null + }, + + // Helper - process toolset information + getToolset: function getToolset (info, versionYear) { + const pkg = 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64' + if (info.packages.indexOf(pkg) !== -1) { + this.log.silly('- found VC.Tools.x86.x64') + if (versionYear === 2017) { + return 'v141' + } + if (versionYear === 2019) { + return 'v142' + } + } + return null + }, + + // Helper - process Windows SDK information + getSDK: function getSDK (info) { + const win8SDK = 'Microsoft.VisualStudio.Component.Windows81SDK' + const win10SDKPrefix = 'Microsoft.VisualStudio.Component.Windows10SDK.' + + var Win10SDKVer = 0 + info.packages.forEach((pkg) => { + if (!pkg.startsWith(win10SDKPrefix)) { + return + } + const parts = pkg.split('.') + if (parts.length > 5 && parts[5] !== 'Desktop') { + this.log.silly('- ignoring non-Desktop Win10SDK:', pkg) + return + } + const foundSdkVer = parseInt(parts[4], 10) + if (isNaN(foundSdkVer)) { + // Microsoft.VisualStudio.Component.Windows10SDK.IpOverUsb + this.log.silly('- failed to parse Win10SDK number:', pkg) + return + } + this.log.silly('- found Win10SDK:', foundSdkVer) + Win10SDKVer = Math.max(Win10SDKVer, foundSdkVer) + }) + + if (Win10SDKVer !== 0) { + return `10.0.${Win10SDKVer}.0` + } else if (info.packages.indexOf(win8SDK) !== -1) { + this.log.silly('- found Win8SDK') + return '8.1' + } + return null + }, + + // Find an installation of Visual Studio 2015 to use + findVisualStudio2015: function findVisualStudio2015 (cb) { + return this.findOldVS({ + version: '14.0', + versionMajor: 14, + versionMinor: 0, + versionYear: 2015, + toolset: 'v140' + }, cb) + }, + + // Find an installation of Visual Studio 2013 to use + findVisualStudio2013: function findVisualStudio2013 (cb) { + if (this.nodeSemver.major >= 9) { + this.addLog( + 'not looking for VS2013 as it is only supported up to Node.js 8') + return cb(null) + } + return this.findOldVS({ + version: '12.0', + versionMajor: 12, + versionMinor: 0, + versionYear: 2013, + toolset: 'v120' + }, cb) + }, + + // Helper - common code for VS2013 and VS2015 + findOldVS: function findOldVS (info, cb) { + const regVC7 = ['HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7', + 'HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7'] + const regMSBuild = 'HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions' + + this.addLog(`looking for Visual Studio ${info.versionYear}`) + this.regSearchKeys(regVC7, info.version, [], (err, res) => { + if (err) { + this.addLog('- not found') + return cb(null) + } + + const vsPath = path.resolve(res, '..') + this.addLog(`- found in "${vsPath}"`) + + const msBuildRegOpts = process.arch === 'ia32' ? [] : ['/reg:32'] + this.regSearchKeys([`${regMSBuild}\\${info.version}`], + 'MSBuildToolsPath', msBuildRegOpts, (err, res) => { + if (err) { + this.addLog( + '- could not find MSBuild in registry for this version') + return cb(null) + } + + const msBuild = path.join(res, 'MSBuild.exe') + this.addLog(`- MSBuild in "${msBuild}"`) + + if (!this.checkConfigVersion(info.versionYear, vsPath)) { + return cb(null) + } + + info.path = vsPath + info.msBuild = msBuild + info.sdk = null + cb(info) + }) + }) + }, + + // After finding a usable version of Visual Stuido: + // - add it to validVersions to be displayed at the end if a specific + // version was requested and not found; + // - check if this is the version that was requested. + // - check if this matches the Visual Studio Command Prompt + checkConfigVersion: function checkConfigVersion (versionYear, vsPath) { + this.validVersions.push(versionYear) + this.validVersions.push(vsPath) + + if (this.configVersionYear && this.configVersionYear !== versionYear) { + this.addLog('- msvs_version does not match this version') + return false + } + if (this.configPath && + path.relative(this.configPath, vsPath) !== '') { + this.addLog('- msvs_version does not point to this installation') + return false + } + if (this.envVcInstallDir && + path.relative(this.envVcInstallDir, vsPath) !== '') { + this.addLog('- does not match this Visual Studio Command Prompt') + return false + } + + return true + } +} + +module.exports = findVisualStudio +module.exports.test = { + VisualStudioFinder: VisualStudioFinder, + findVisualStudio: findVisualStudio +} diff --git a/deps/npm/node_modules/node-gyp/lib/find-vs2017.js b/deps/npm/node_modules/node-gyp/lib/find-vs2017.js deleted file mode 100644 index ad46ceaf88c988..00000000000000 --- a/deps/npm/node_modules/node-gyp/lib/find-vs2017.js +++ /dev/null @@ -1,46 +0,0 @@ -var log = require('npmlog') - , execFile = require('child_process').execFile - , path = require('path') - -function findVS2017(callback) { - var ps = path.join(process.env.SystemRoot, 'System32', 'WindowsPowerShell', - 'v1.0', 'powershell.exe') - var csFile = path.join(__dirname, 'Find-VS2017.cs') - var psArgs = ['-ExecutionPolicy', 'Unrestricted', '-NoProfile', - '-Command', '&{Add-Type -Path \'' + csFile + '\';' + - '[VisualStudioConfiguration.Main]::Query()}'] - - log.silly('find vs2017', 'Running', ps, psArgs) - var child = execFile(ps, psArgs, { encoding: 'utf8' }, - function (err, stdout, stderr) { - log.silly('find vs2017', 'PS err:', err) - log.silly('find vs2017', 'PS stdout:', stdout) - log.silly('find vs2017', 'PS stderr:', stderr) - - if (err) - return callback(new Error('Could not use PowerShell to find VS2017')) - - var vsSetup - try { - vsSetup = JSON.parse(stdout) - } catch (e) { - log.silly('find vs2017', e) - return callback(new Error('Could not use PowerShell to find VS2017')) - } - log.silly('find vs2017', 'vsSetup:', vsSetup) - - if (vsSetup && vsSetup.log) - log.verbose('find vs2017', vsSetup.log.trimRight()) - - if (!vsSetup || !vsSetup.path || !vsSetup.sdk) { - return callback(new Error('No usable installation of VS2017 found')) - } - - log.verbose('find vs2017', 'using installation:', vsSetup.path) - callback(null, { "path": vsSetup.path, "sdk": vsSetup.sdk }) - }) - - child.stdin.end() -} - -module.exports = findVS2017 diff --git a/deps/npm/node_modules/node-gyp/lib/install.js b/deps/npm/node_modules/node-gyp/lib/install.js index cb84972e183258..6ac8519ef5d6a1 100644 --- a/deps/npm/node_modules/node-gyp/lib/install.js +++ b/deps/npm/node_modules/node-gyp/lib/install.js @@ -1,46 +1,30 @@ -module.exports = exports = function (gyp, argv, callback) { - return install(fs, gyp, argv, callback) -} - -module.exports.test = { - download: download, - install: install, - readCAFile: readCAFile, -} - -exports.usage = 'Install node development files for the specified node version.' - -/** - * Module dependencies. - */ - -var fs = require('graceful-fs') - , osenv = require('osenv') - , tar = require('tar') - , rm = require('rimraf') - , path = require('path') - , crypto = require('crypto') - , zlib = require('zlib') - , log = require('npmlog') - , semver = require('semver') - , fstream = require('fstream') - , request = require('request') - , mkdir = require('mkdirp') - , processRelease = require('./process-release') - , win = process.platform == 'win32' +'use strict' + +const fs = require('graceful-fs') +const os = require('os') +const tar = require('tar') +const path = require('path') +const crypto = require('crypto') +const log = require('npmlog') +const semver = require('semver') +const request = require('request') +const mkdir = require('mkdirp') +const processRelease = require('./process-release') +const win = process.platform === 'win32' function install (fs, gyp, argv, callback) { - var release = processRelease(argv, gyp, process.version, process.release) // ensure no double-callbacks happen function cb (err) { - if (cb.done) return + if (cb.done) { + return + } cb.done = true if (err) { log.warn('install', 'got an error, rolling back install') // roll-back the install if anything went wrong - gyp.commands.remove([ release.versionDir ], function (err2) { + gyp.commands.remove([ release.versionDir ], function () { callback(err) }) } else { @@ -82,12 +66,12 @@ function install (fs, gyp, argv, callback) { // check if it is already installed, and only install when needed if (gyp.opts.ensure) { log.verbose('install', '--ensure was passed, so won\'t reinstall if already installed') - fs.stat(devDir, function (err, stat) { + fs.stat(devDir, function (err) { if (err) { - if (err.code == 'ENOENT') { + if (err.code === 'ENOENT') { log.verbose('install', 'version not already installed, continuing with install', release.version) go() - } else if (err.code == 'EACCES') { + } else if (err.code === 'EACCES') { eaccesFallback(err) } else { cb(err) @@ -97,7 +81,7 @@ function install (fs, gyp, argv, callback) { log.verbose('install', 'version is already installed, need to check "installVersion"') var installVersionFile = path.resolve(devDir, 'installVersion') fs.readFile(installVersionFile, 'ascii', function (err, ver) { - if (err && err.code != 'ENOENT') { + if (err && err.code !== 'ENOENT') { return cb(err) } var installVersion = parseInt(ver, 10) || 0 @@ -116,7 +100,7 @@ function install (fs, gyp, argv, callback) { go() } - function getContentSha(res, callback) { + function getContentSha (res, callback) { var shasum = crypto.createHash('sha256') res.on('data', function (chunk) { shasum.update(chunk) @@ -126,13 +110,12 @@ function install (fs, gyp, argv, callback) { } function go () { - log.verbose('ensuring nodedir is created', devDir) // first create the dir for the node dev files mkdir(devDir, function (err, created) { if (err) { - if (err.code == 'EACCES') { + if (err.code === 'EACCES') { eaccesFallback(err) } else { cb(err) @@ -147,42 +130,32 @@ function install (fs, gyp, argv, callback) { // now download the node tarball var tarPath = gyp.opts.tarball var badDownload = false - , extractCount = 0 - , gunzip = zlib.createGunzip() - , extracter = tar.Extract({ path: devDir, strip: 1, filter: isValid }) - + var extractCount = 0 var contentShasums = {} var expectShasums = {} // checks if a file to be extracted from the tarball is valid. // only .h header files and the gyp files get extracted - function isValid () { - var name = this.path.substring(devDir.length + 1) - var isValid = valid(name) - if (name === '' && this.type === 'Directory') { - // the first directory entry is ok - return true - } + function isValid (path) { + var isValid = valid(path) if (isValid) { - log.verbose('extracted file from tarball', name) + log.verbose('extracted file from tarball', path) extractCount++ } else { // invalid - log.silly('ignoring from tarball', name) + log.silly('ignoring from tarball', path) } return isValid } - gunzip.on('error', cb) - extracter.on('error', cb) - extracter.on('end', afterTarball) - - // download the tarball, gunzip and extract! - + // download the tarball and extract! if (tarPath) { - var input = fs.createReadStream(tarPath) - input.pipe(gunzip).pipe(extracter) - return + return tar.extract({ + file: tarPath, + strip: 1, + filter: isValid, + cwd: devDir + }).then(afterTarball, cb) } try { @@ -222,12 +195,18 @@ function install (fs, gyp, argv, callback) { }) // start unzipping and untaring - req.pipe(gunzip).pipe(extracter) + res.pipe(tar.extract({ + strip: 1, + cwd: devDir, + filter: isValid + }).on('close', afterTarball).on('error', cb)) }) // invoked after the tarball has finished being extracted function afterTarball () { - if (badDownload) return + if (badDownload) { + return + } if (extractCount === 0) { return cb(new Error('There was a fatal problem while downloading/extracting the tarball')) } @@ -258,7 +237,9 @@ function install (fs, gyp, argv, callback) { } function deref (err) { - if (err) return cb(err) + if (err) { + return cb(err) + } async-- if (!async) { @@ -276,10 +257,8 @@ function install (fs, gyp, argv, callback) { } } - function downloadShasums(done) { + function downloadShasums (done) { log.verbose('check download content checksum, need to download `SHASUMS256.txt`...') - var shasumsPath = path.resolve(devDir, 'SHASUMS256.txt') - log.verbose('checksum url', release.shasumsUrl) try { var req = download(gyp, process.env, release.shasumsUrl) @@ -302,7 +281,9 @@ function install (fs, gyp, argv, callback) { var lines = Buffer.concat(chunks).toString().trim().split('\n') lines.forEach(function (line) { var items = line.trim().split(/\s+/) - if (items.length !== 2) return + if (items.length !== 2) { + return + } // 0035d18e2dcf9aad669b1c7c07319e17abfe3762 ./node-v0.11.4.tar.gz var name = items[1].replace(/^\.\//, '') @@ -317,81 +298,50 @@ function install (fs, gyp, argv, callback) { function downloadNodeLib (done) { log.verbose('on Windows; need to download `' + release.name + '.lib`...') - var dir32 = path.resolve(devDir, 'ia32') - , dir64 = path.resolve(devDir, 'x64') - , libPath32 = path.resolve(dir32, release.name + '.lib') - , libPath64 = path.resolve(dir64, release.name + '.lib') - - log.verbose('32-bit ' + release.name + '.lib dir', dir32) - log.verbose('64-bit ' + release.name + '.lib dir', dir64) - log.verbose('`' + release.name + '.lib` 32-bit url', release.libUrl32) - log.verbose('`' + release.name + '.lib` 64-bit url', release.libUrl64) - - var async = 2 - mkdir(dir32, function (err) { - if (err) return done(err) - log.verbose('streaming 32-bit ' + release.name + '.lib to:', libPath32) - - try { - var req = download(gyp, process.env, release.libUrl32, cb) - } catch (e) { - return cb(e) - } - - req.on('error', done) - req.on('response', function (res) { - if (res.statusCode !== 200) { - done(new Error(res.statusCode + ' status code downloading 32-bit ' + release.name + '.lib')) - return + var archs = [ 'ia32', 'x64' ] + var async = archs.length + archs.forEach(function (arch) { + var dir = path.resolve(devDir, arch) + var targetLibPath = path.resolve(dir, release.name + '.lib') + var libUrl = release[arch].libUrl + var libPath = release[arch].libPath + var name = arch + ' ' + release.name + '.lib' + log.verbose(name, 'dir', dir) + log.verbose(name, 'url', libUrl) + + mkdir(dir, function (err) { + if (err) { + return done(err) } + log.verbose('streaming', name, 'to:', targetLibPath) - getContentSha(res, function (_, checksum) { - contentShasums[release.libPath32] = checksum - log.verbose('content checksum', release.libPath32, checksum) - }) + try { + var req = download(gyp, process.env, libUrl, cb) + } catch (e) { + return cb(e) + } - var ws = fs.createWriteStream(libPath32) - ws.on('error', cb) - req.pipe(ws) - }) - req.on('end', function () { - --async || done() - }) - }) - mkdir(dir64, function (err) { - if (err) return done(err) - log.verbose('streaming 64-bit ' + release.name + '.lib to:', libPath64) - - try { - var req = download(gyp, process.env, release.libUrl64, cb) - } catch (e) { - return cb(e) - } + req.on('error', done) + req.on('response', function (res) { + if (res.statusCode !== 200) { + done(new Error(res.statusCode + ' status code downloading ' + name)) + return + } - req.on('error', done) - req.on('response', function (res) { - if (res.statusCode !== 200) { - done(new Error(res.statusCode + ' status code downloading 64-bit ' + release.name + '.lib')) - return - } + getContentSha(res, function (_, checksum) { + contentShasums[libPath] = checksum + log.verbose('content checksum', libPath, checksum) + }) - getContentSha(res, function (_, checksum) { - contentShasums[release.libPath64] = checksum - log.verbose('content checksum', release.libPath64, checksum) + var ws = fs.createWriteStream(targetLibPath) + ws.on('error', cb) + req.pipe(ws) }) - - var ws = fs.createWriteStream(libPath64) - ws.on('error', cb) - req.pipe(ws) - }) - req.on('end', function () { - --async || done() + req.on('end', function () { --async || done() }) }) }) } // downloadNodeLib() - }) // mkdir() - } // go() /** @@ -400,8 +350,8 @@ function install (fs, gyp, argv, callback) { function valid (file) { // header files - var extname = path.extname(file); - return extname === '.h' || extname === '.gypi'; + var extname = path.extname(file) + return extname === '.h' || extname === '.gypi' } /** @@ -415,28 +365,29 @@ function install (fs, gyp, argv, callback) { function eaccesFallback (err) { var noretry = '--node_gyp_internal_noretry' - if (-1 !== argv.indexOf(noretry)) return cb(err) - var tmpdir = osenv.tmpdir() + if (argv.indexOf(noretry) !== -1) { + return cb(err) + } + var tmpdir = os.tmpdir() gyp.devDir = path.resolve(tmpdir, '.node-gyp') - log.warn('EACCES', 'user "%s" does not have permission to access the dev dir "%s"', osenv.user(), devDir) + log.warn('EACCES', 'user "%s" does not have permission to access the dev dir "%s"', os.userInfo().username, devDir) log.warn('EACCES', 'attempting to reinstall using temporary dev dir "%s"', gyp.devDir) - if (process.cwd() == tmpdir) { + if (process.cwd() === tmpdir) { log.verbose('tmpdir == cwd', 'automatically will remove dev files after to save disk space') gyp.todo.push({ name: 'remove', args: argv }) } gyp.commands.install([noretry].concat(argv), cb) } - } function download (gyp, env, url) { log.http('GET', url) var requestOpts = { - uri: url - , headers: { - 'User-Agent': 'node-gyp v' + gyp.version + ' (node ' + process.version + ')' - } + uri: url, + headers: { + 'User-Agent': 'node-gyp v' + gyp.version + ' (node ' + process.version + ')' + } } var cafile = gyp.opts.cafile @@ -445,10 +396,10 @@ function download (gyp, env, url) { } // basic support for a proxy server - var proxyUrl = gyp.opts.proxy - || env.http_proxy - || env.HTTP_PROXY - || env.npm_config_proxy + var proxyUrl = gyp.opts.proxy || + env.http_proxy || + env.HTTP_PROXY || + env.npm_config_proxy if (proxyUrl) { if (/^https?:\/\//i.test(proxyUrl)) { log.verbose('download', 'using proxy url: "%s"', proxyUrl) @@ -473,3 +424,13 @@ function readCAFile (filename) { var re = /(-----BEGIN CERTIFICATE-----[\S\s]*?-----END CERTIFICATE-----)/g return ca.match(re) } + +module.exports = function (gyp, argv, callback) { + return install(fs, gyp, argv, callback) +} +module.exports.test = { + download: download, + install: install, + readCAFile: readCAFile +} +module.exports.usage = 'Install node development files for the specified node version.' diff --git a/deps/npm/node_modules/node-gyp/lib/list.js b/deps/npm/node_modules/node-gyp/lib/list.js index 9d680a56a434ac..3e5de288510283 100644 --- a/deps/npm/node_modules/node-gyp/lib/list.js +++ b/deps/npm/node_modules/node-gyp/lib/list.js @@ -1,33 +1,27 @@ +'use strict' -module.exports = exports = list - -exports.usage = 'Prints a listing of the currently installed node development files' - -/** - * Module dependencies. - */ - -var fs = require('graceful-fs') - , path = require('path') - , log = require('npmlog') +const fs = require('graceful-fs') +const log = require('npmlog') function list (gyp, args, callback) { - var devDir = gyp.devDir log.verbose('list', 'using node-gyp dir:', devDir) - // readdir() the node-gyp dir fs.readdir(devDir, onreaddir) function onreaddir (err, versions) { - if (err && err.code != 'ENOENT') { + if (err && err.code !== 'ENOENT') { return callback(err) } + if (Array.isArray(versions)) { - versions = versions.filter(function (v) { return v != 'current' }) + versions = versions.filter(function (v) { return v !== 'current' }) } else { versions = [] } callback(null, versions) } } + +module.exports = list +exports.usage = 'Prints a listing of the currently installed node development files' diff --git a/deps/npm/node_modules/node-gyp/lib/node-gyp.js b/deps/npm/node_modules/node-gyp/lib/node-gyp.js index 0dcea7298f00c8..91880f94339faa 100644 --- a/deps/npm/node_modules/node-gyp/lib/node-gyp.js +++ b/deps/npm/node_modules/node-gyp/lib/node-gyp.js @@ -1,44 +1,30 @@ - -/** - * Module exports. - */ - -module.exports = exports = gyp - -/** - * Module dependencies. - */ - -var fs = require('graceful-fs') - , path = require('path') - , nopt = require('nopt') - , log = require('npmlog') - , child_process = require('child_process') - , EE = require('events').EventEmitter - , inherits = require('util').inherits - , commands = [ - // Module build commands - 'build' - , 'clean' - , 'configure' - , 'rebuild' - // Development Header File management commands - , 'install' - , 'list' - , 'remove' - ] - , aliases = { - 'ls': 'list' - , 'rm': 'remove' - } +'use strict' + +const path = require('path') +const nopt = require('nopt') +const log = require('npmlog') +const childProcess = require('child_process') +const EE = require('events').EventEmitter +const inherits = require('util').inherits +const commands = [ + // Module build commands + 'build', + 'clean', + 'configure', + 'rebuild', + // Development Header File management commands + 'install', + 'list', + 'remove' +] +const aliases = { + 'ls': 'list', + 'rm': 'remove' +} // differentiate node-gyp's logs from npm's log.heading = 'gyp' -/** - * The `gyp` function. - */ - function gyp () { return new Gyp() } @@ -64,31 +50,31 @@ var proto = Gyp.prototype * Export the contents of the package.json. */ -proto.package = require('../package') +proto.package = require('../package.json') /** * nopt configuration definitions */ proto.configDefs = { - help: Boolean // everywhere - , arch: String // 'configure' - , cafile: String // 'install' - , debug: Boolean // 'build' - , directory: String // bin - , make: String // 'build' - , msvs_version: String // 'configure' - , ensure: Boolean // 'install' - , solution: String // 'build' (windows only) - , proxy: String // 'install' - , devdir: String // everywhere - , nodedir: String // 'configure' - , loglevel: String // everywhere - , python: String // 'configure' - , 'dist-url': String // 'install' - , 'tarball': String // 'install' - , jobs: String // 'build' - , thin: String // 'configure' + help: Boolean, // everywhere + arch: String, // 'configure' + cafile: String, // 'install' + debug: Boolean, // 'build' + directory: String, // bin + make: String, // 'build' + msvs_version: String, // 'configure' + ensure: Boolean, // 'install' + solution: String, // 'build' (windows only) + proxy: String, // 'install' + devdir: String, // everywhere + nodedir: String, // 'configure' + loglevel: String, // everywhere + python: String, // 'configure' + 'dist-url': String, // 'install' + 'tarball': String, // 'install' + jobs: String, // 'build' + thin: String // 'configure' } /** @@ -96,13 +82,13 @@ proto.configDefs = { */ proto.shorthands = { - release: '--no-debug' - , C: '--directory' - , debug: '--debug' - , j: '--jobs' - , silly: '--loglevel=silly' - , verbose: '--loglevel=verbose' - , silent: '--loglevel=silent' + release: '--no-debug', + C: '--directory', + debug: '--debug', + j: '--jobs', + silly: '--loglevel=silly', + verbose: '--loglevel=verbose', + silent: '--loglevel=silent' } /** @@ -147,18 +133,22 @@ proto.parseArgv = function parseOpts (argv) { } // support for inheriting config env variables from npm - var npm_config_prefix = 'npm_config_' + var npmConfigPrefix = 'npm_config_' Object.keys(process.env).forEach(function (name) { - if (name.indexOf(npm_config_prefix) !== 0) return + if (name.indexOf(npmConfigPrefix) !== 0) { + return + } var val = process.env[name] - if (name === npm_config_prefix + 'loglevel') { + if (name === npmConfigPrefix + 'loglevel') { log.level = val } else { // add the user-defined options to the config - name = name.substring(npm_config_prefix.length) + name = name.substring(npmConfigPrefix.length) // gyp@741b7f1 enters an infinite loop when it encounters // zero-length options so ensure those don't get through. - if (name) this.opts[name] = val + if (name) { + this.opts[name] = val + } } }, this) @@ -173,11 +163,13 @@ proto.parseArgv = function parseOpts (argv) { */ proto.spawn = function spawn (command, args, opts) { - if (!opts) opts = {} + if (!opts) { + opts = {} + } if (!opts.silent && !opts.stdio) { opts.stdio = [ 0, 1, 2 ] } - var cp = child_process.spawn(command, args, opts) + var cp = childProcess.spawn(command, args, opts) log.info('spawn', command) log.info('spawn args', args) return cp @@ -189,16 +181,16 @@ proto.spawn = function spawn (command, args, opts) { proto.usage = function usage () { var str = [ - '' - , ' Usage: node-gyp [options]' - , '' - , ' where is one of:' - , commands.map(function (c) { - return ' - ' + c + ' - ' + require('./' + c).usage - }).join('\n') - , '' - , 'node-gyp@' + this.version + ' ' + path.resolve(__dirname, '..') - , 'node@' + process.versions.node + '', + ' Usage: node-gyp [options]', + '', + ' where is one of:', + commands.map(function (c) { + return ' - ' + c + ' - ' + require('./' + c).usage + }).join('\n'), + '', + 'node-gyp@' + this.version + ' ' + path.resolve(__dirname, '..'), + 'node@' + process.versions.node ].join('\n') return str } @@ -208,8 +200,10 @@ proto.usage = function usage () { */ Object.defineProperty(proto, 'version', { - get: function () { - return this.package.version - } - , enumerable: true + get: function () { + return this.package.version + }, + enumerable: true }) + +module.exports = exports = gyp diff --git a/deps/npm/node_modules/node-gyp/lib/process-release.js b/deps/npm/node_modules/node-gyp/lib/process-release.js index f9ba98f199244d..0acab061bd7b56 100644 --- a/deps/npm/node_modules/node-gyp/lib/process-release.js +++ b/deps/npm/node_modules/node-gyp/lib/process-release.js @@ -1,30 +1,32 @@ -var semver = require('semver') - , url = require('url') - , path = require('path') - , log = require('npmlog') +'use strict' - // versions where -headers.tar.gz started shipping - , headersTarballRange = '>= 3.0.0 || ~0.12.10 || ~0.10.42' - , bitsre = /\/win-(x86|x64)\// - , bitsreV3 = /\/win-(x86|ia32|x64)\// // io.js v3.x.x shipped with "ia32" but should - // have been "x86" +const semver = require('semver') +const url = require('url') +const path = require('path') +const log = require('npmlog') + +// versions where -headers.tar.gz started shipping +const headersTarballRange = '>= 3.0.0 || ~0.12.10 || ~0.10.42' +const bitsre = /\/win-(x86|x64)\// +const bitsreV3 = /\/win-(x86|ia32|x64)\// // io.js v3.x.x shipped with "ia32" but should +// have been "x86" // Captures all the logic required to determine download URLs, local directory and // file names. Inputs come from command-line switches (--target, --dist-url), // `process.version` and `process.release` where it exists. function processRelease (argv, gyp, defaultVersion, defaultRelease) { var version = (semver.valid(argv[0]) && argv[0]) || gyp.opts.target || defaultVersion - , versionSemver = semver.parse(version) - , overrideDistUrl = gyp.opts['dist-url'] || gyp.opts.disturl - , isDefaultVersion - , isIojs - , name - , distBaseUrl - , baseUrl - , libUrl32 - , libUrl64 - , tarballUrl - , canGetHeaders + var versionSemver = semver.parse(version) + var overrideDistUrl = gyp.opts['dist-url'] || gyp.opts.disturl + var isDefaultVersion + var isNamedForLegacyIojs + var name + var distBaseUrl + var baseUrl + var libUrl32 + var libUrl64 + var tarballUrl + var canGetHeaders if (!versionSemver) { // not a valid semver string, nothing we can do @@ -37,50 +39,39 @@ function processRelease (argv, gyp, defaultVersion, defaultRelease) { isDefaultVersion = version === semver.parse(defaultVersion).version // can't use process.release if we're using --target=x.y.z - if (!isDefaultVersion) + if (!isDefaultVersion) { defaultRelease = null + } if (defaultRelease) { // v3 onward, has process.release name = defaultRelease.name.replace(/io\.js/, 'iojs') // remove the '.' for directory naming purposes - isIojs = name === 'iojs' } else { // old node or alternative --target= // semver.satisfies() doesn't like prerelease tags so test major directly - isIojs = versionSemver.major >= 1 && versionSemver.major < 4 - name = isIojs ? 'iojs' : 'node' + isNamedForLegacyIojs = versionSemver.major >= 1 && versionSemver.major < 4 + // isNamedForLegacyIojs is required to support Electron < 4 (in particular Electron 3) + // as previously this logic was used to ensure "iojs" was used to download iojs releases + // and "node" for node releases. Unfortunately the logic was broad enough that electron@3 + // published release assets as "iojs" so that the node-gyp logic worked. Once Electron@3 has + // been EOL for a while (late 2019) we should remove this hack. + name = isNamedForLegacyIojs ? 'iojs' : 'node' } // check for the nvm.sh standard mirror env variables - if (!overrideDistUrl) { - if (isIojs) { - if (process.env.IOJS_ORG_MIRROR) { - overrideDistUrl = process.env.IOJS_ORG_MIRROR - } else if (process.env.NVM_IOJS_ORG_MIRROR) {// remove on next semver-major - overrideDistUrl = process.env.NVM_IOJS_ORG_MIRROR - log.warn('download', - 'NVM_IOJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, ' + - 'please use IOJS_ORG_MIRROR') - } - } else { - if (process.env.NODEJS_ORG_MIRROR) { - overrideDistUrl = process.env.NODEJS_ORG_MIRROR - } else if (process.env.NVM_NODEJS_ORG_MIRROR) {// remove on next semver-major - overrideDistUrl = process.env.NVM_NODEJS_ORG_MIRROR - log.warn('download', - 'NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, ' + - 'please use NODEJS_ORG_MIRROR') - } - } + if (!overrideDistUrl && process.env.NODEJS_ORG_MIRROR) { + overrideDistUrl = process.env.NODEJS_ORG_MIRROR } - if (overrideDistUrl) + if (overrideDistUrl) { log.verbose('download', 'using dist-url', overrideDistUrl) + } - if (overrideDistUrl) + if (overrideDistUrl) { distBaseUrl = overrideDistUrl.replace(/\/+$/, '') - else - distBaseUrl = isIojs ? 'https://iojs.org/download/release' : 'https://nodejs.org/dist' + } else { + distBaseUrl = 'https://nodejs.org/dist' + } distBaseUrl += '/v' + version + '/' // new style, based on process.release so we have a lot of the data we need @@ -88,35 +79,22 @@ function processRelease (argv, gyp, defaultVersion, defaultRelease) { baseUrl = url.resolve(defaultRelease.headersUrl, './') libUrl32 = resolveLibUrl(name, defaultRelease.libUrl || baseUrl || distBaseUrl, 'x86', versionSemver.major) libUrl64 = resolveLibUrl(name, defaultRelease.libUrl || baseUrl || distBaseUrl, 'x64', versionSemver.major) - - return { - version: version, - semver: versionSemver, - name: name, - baseUrl: baseUrl, - tarballUrl: defaultRelease.headersUrl, - shasumsUrl: url.resolve(baseUrl, 'SHASUMS256.txt'), - versionDir: (name !== 'node' ? name + '-' : '') + version, - libUrl32: libUrl32, - libUrl64: libUrl64, - libPath32: normalizePath(path.relative(url.parse(baseUrl).path, url.parse(libUrl32).path)), - libPath64: normalizePath(path.relative(url.parse(baseUrl).path, url.parse(libUrl64).path)) - } + tarballUrl = defaultRelease.headersUrl + } else { + // older versions without process.release are captured here and we have to make + // a lot of assumptions, additionally if you --target=x.y.z then we can't use the + // current process.release + baseUrl = distBaseUrl + libUrl32 = resolveLibUrl(name, baseUrl, 'x86', versionSemver.major) + libUrl64 = resolveLibUrl(name, baseUrl, 'x64', versionSemver.major) + + // making the bold assumption that anything with a version number >3.0.0 will + // have a *-headers.tar.gz file in its dist location, even some frankenstein + // custom version + canGetHeaders = semver.satisfies(versionSemver, headersTarballRange) + tarballUrl = url.resolve(baseUrl, name + '-v' + version + (canGetHeaders ? '-headers' : '') + '.tar.gz') } - // older versions without process.release are captured here and we have to make - // a lot of assumptions, additionally if you --target=x.y.z then we can't use the - // current process.release - - baseUrl = distBaseUrl - libUrl32 = resolveLibUrl(name, baseUrl, 'x86', versionSemver.major) - libUrl64 = resolveLibUrl(name, baseUrl, 'x64', versionSemver.major) - // making the bold assumption that anything with a version number >3.0.0 will - // have a *-headers.tar.gz file in its dist location, even some frankenstein - // custom version - canGetHeaders = semver.satisfies(versionSemver, headersTarballRange) - tarballUrl = url.resolve(baseUrl, name + '-v' + version + (canGetHeaders ? '-headers' : '') + '.tar.gz') - return { version: version, semver: versionSemver, @@ -125,10 +103,14 @@ function processRelease (argv, gyp, defaultVersion, defaultRelease) { tarballUrl: tarballUrl, shasumsUrl: url.resolve(baseUrl, 'SHASUMS256.txt'), versionDir: (name !== 'node' ? name + '-' : '') + version, - libUrl32: libUrl32, - libUrl64: libUrl64, - libPath32: normalizePath(path.relative(url.parse(baseUrl).path, url.parse(libUrl32).path)), - libPath64: normalizePath(path.relative(url.parse(baseUrl).path, url.parse(libUrl64).path)) + ia32: { + libUrl: libUrl32, + libPath: normalizePath(path.relative(url.parse(baseUrl).path, url.parse(libUrl32).path)) + }, + x64: { + libUrl: libUrl64, + libPath: normalizePath(path.relative(url.parse(baseUrl).path, url.parse(libUrl64).path)) + } } } @@ -138,12 +120,13 @@ function normalizePath (p) { function resolveLibUrl (name, defaultUrl, arch, versionMajor) { var base = url.resolve(defaultUrl, './') - , hasLibUrl = bitsre.test(defaultUrl) || (versionMajor === 3 && bitsreV3.test(defaultUrl)) + var hasLibUrl = bitsre.test(defaultUrl) || (versionMajor === 3 && bitsreV3.test(defaultUrl)) if (!hasLibUrl) { // let's assume it's a baseUrl then - if (versionMajor >= 1) - return url.resolve(base, 'win-' + arch +'/' + name + '.lib') + if (versionMajor >= 1) { + return url.resolve(base, 'win-' + arch + '/' + name + '.lib') + } // prior to io.js@1.0.0 32-bit node.lib lives in /, 64-bit lives in /x64/ return url.resolve(base, (arch === 'x64' ? 'x64/' : '') + name + '.lib') } diff --git a/deps/npm/node_modules/node-gyp/lib/rebuild.js b/deps/npm/node_modules/node-gyp/lib/rebuild.js index 4c6f472aa7c07d..a1c5b27cbe56a5 100644 --- a/deps/npm/node_modules/node-gyp/lib/rebuild.js +++ b/deps/npm/node_modules/node-gyp/lib/rebuild.js @@ -1,14 +1,13 @@ - -module.exports = exports = rebuild - -exports.usage = 'Runs "clean", "configure" and "build" all at once' +'use strict' function rebuild (gyp, argv, callback) { - gyp.todo.push( - { name: 'clean', args: [] } + { name: 'clean', args: [] } , { name: 'configure', args: argv } , { name: 'build', args: [] } ) process.nextTick(callback) } + +module.exports = rebuild +module.exports.usage = 'Runs "clean", "configure" and "build" all at once' diff --git a/deps/npm/node_modules/node-gyp/lib/remove.js b/deps/npm/node_modules/node-gyp/lib/remove.js index eb80981b88febf..8c945e5659001c 100644 --- a/deps/npm/node_modules/node-gyp/lib/remove.js +++ b/deps/npm/node_modules/node-gyp/lib/remove.js @@ -1,20 +1,12 @@ +'use strict' -module.exports = exports = remove - -exports.usage = 'Removes the node development files for the specified version' - -/** - * Module dependencies. - */ - -var fs = require('fs') - , rm = require('rimraf') - , path = require('path') - , log = require('npmlog') - , semver = require('semver') +const fs = require('fs') +const rm = require('rimraf') +const path = require('path') +const log = require('npmlog') +const semver = require('semver') function remove (gyp, argv, callback) { - var devDir = gyp.devDir log.verbose('remove', 'using node-gyp dir:', devDir) @@ -36,9 +28,9 @@ function remove (gyp, argv, callback) { log.verbose('remove', 'removing development files for version:', version) // first check if its even installed - fs.stat(versionPath, function (err, stat) { + fs.stat(versionPath, function (err) { if (err) { - if (err.code == 'ENOENT') { + if (err.code === 'ENOENT') { callback(null, 'version was already uninstalled: ' + version) } else { callback(err) @@ -48,5 +40,7 @@ function remove (gyp, argv, callback) { // Go ahead and delete the dir rm(versionPath, callback) }) - } + +module.exports = exports = remove +module.exports.usage = 'Removes the node development files for the specified version' diff --git a/deps/npm/node_modules/node-gyp/lib/util.js b/deps/npm/node_modules/node-gyp/lib/util.js new file mode 100644 index 00000000000000..3e23c628e6ad71 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/lib/util.js @@ -0,0 +1,64 @@ +'use strict' + +const log = require('npmlog') +const execFile = require('child_process').execFile +const path = require('path') + +function logWithPrefix (log, prefix) { + function setPrefix (logFunction) { + return (...args) => logFunction.apply(null, [ prefix, ...args ]) // eslint-disable-line + } + return { + silly: setPrefix(log.silly), + verbose: setPrefix(log.verbose), + info: setPrefix(log.info), + warn: setPrefix(log.warn), + error: setPrefix(log.error) + } +} + +function regGetValue (key, value, addOpts, cb) { + const outReValue = value.replace(/\W/g, '.') + const outRe = new RegExp(`^\\s+${outReValue}\\s+REG_\\w+\\s+(\\S.*)$`, 'im') + const reg = path.join(process.env.SystemRoot, 'System32', 'reg.exe') + const regArgs = ['query', key, '/v', value].concat(addOpts) + + log.silly('reg', 'running', reg, regArgs) + const child = execFile(reg, regArgs, { encoding: 'utf8' }, + function (err, stdout, stderr) { + log.silly('reg', 'reg.exe stdout = %j', stdout) + if (err || stderr.trim() !== '') { + log.silly('reg', 'reg.exe err = %j', err && (err.stack || err)) + log.silly('reg', 'reg.exe stderr = %j', stderr) + return cb(err, stderr) + } + + const result = outRe.exec(stdout) + if (!result) { + log.silly('reg', 'error parsing stdout') + return cb(new Error('Could not parse output of reg.exe')) + } + log.silly('reg', 'found: %j', result[1]) + cb(null, result[1]) + }) + child.stdin.end() +} + +function regSearchKeys (keys, value, addOpts, cb) { + var i = 0 + const search = () => { + log.silly('reg-search', 'looking for %j in %j', value, keys[i]) + regGetValue(keys[i], value, addOpts, (err, res) => { + ++i + if (err && i < keys.length) { return search() } + cb(err, res) + }) + } + search() +} + +module.exports = { + logWithPrefix: logWithPrefix, + regGetValue: regGetValue, + regSearchKeys: regSearchKeys +} diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/.travis.yml b/deps/npm/node_modules/node-gyp/node_modules/tar/.travis.yml deleted file mode 100644 index fca8ef019405d5..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.10 - - 0.11 diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/tar/LICENSE deleted file mode 100644 index 019b7e40ea0568..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -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/node-gyp/node_modules/tar/README.md b/deps/npm/node_modules/node-gyp/node_modules/tar/README.md deleted file mode 100644 index cfda2ac180611c..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# node-tar - -Tar for Node.js. - -[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/) - -## API - -See `examples/` for usage examples. - -### var tar = require('tar') - -Returns an object with `.Pack`, `.Extract` and `.Parse` methods. - -### tar.Pack([properties]) - -Returns a through stream. Use -[fstream](https://npmjs.org/package/fstream) to write files into the -pack stream and you will receive tar archive data from the pack -stream. - -This only works with directories, it does not work with individual files. - -The optional `properties` object are used to set properties in the tar -'Global Extended Header'. If the `fromBase` property is set to true, -the tar will contain files relative to the path passed, and not with -the path included. - -### tar.Extract([options]) - -Returns a through stream. Write tar data to the stream and the files -in the tarball will be extracted onto the filesystem. - -`options` can be: - -```js -{ - path: '/path/to/extract/tar/into', - strip: 0, // how many path segments to strip from the root when extracting -} -``` - -`options` also get passed to the `fstream.Writer` instance that `tar` -uses internally. - -### tar.Parse() - -Returns a writable stream. Write tar data to it and it will emit -`entry` events for each entry parsed from the tarball. This is used by -`tar.Extract`. diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/examples/extracter.js b/deps/npm/node_modules/node-gyp/node_modules/tar/examples/extracter.js deleted file mode 100644 index f6253a72c5cd3e..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/examples/extracter.js +++ /dev/null @@ -1,19 +0,0 @@ -var tar = require("../tar.js") - , fs = require("fs") - - -function onError(err) { - console.error('An error occurred:', err) -} - -function onEnd() { - console.log('Extracted!') -} - -var extractor = tar.Extract({path: __dirname + "/extract"}) - .on('error', onError) - .on('end', onEnd); - -fs.createReadStream(__dirname + "/../test/fixtures/c.tar") - .on('error', onError) - .pipe(extractor); diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/examples/packer.js b/deps/npm/node_modules/node-gyp/node_modules/tar/examples/packer.js deleted file mode 100644 index 039969ce300d12..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/examples/packer.js +++ /dev/null @@ -1,24 +0,0 @@ -var tar = require("../tar.js") - , fstream = require("fstream") - , fs = require("fs") - -var dirDest = fs.createWriteStream('dir.tar') - - -function onError(err) { - console.error('An error occurred:', err) -} - -function onEnd() { - console.log('Packed!') -} - -var packer = tar.Pack({ noProprietary: true }) - .on('error', onError) - .on('end', onEnd); - -// This must be a "directory" -fstream.Reader({ path: __dirname, type: "Directory" }) - .on('error', onError) - .pipe(packer) - .pipe(dirDest) diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/examples/reader.js b/deps/npm/node_modules/node-gyp/node_modules/tar/examples/reader.js deleted file mode 100644 index 8d113ad30d05e9..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/examples/reader.js +++ /dev/null @@ -1,35 +0,0 @@ -var tar = require("../tar.js") - , fs = require("fs") - -fs.createReadStream(__dirname + "/../test/fixtures/c.tar") - .pipe(tar.Parse()) - .on("extendedHeader", function (e) { - console.error("extended pax header", e.props) - e.on("end", function () { - console.error("extended pax fields:", e.fields) - }) - }) - .on("ignoredEntry", function (e) { - console.error("ignoredEntry?!?", e.props) - }) - .on("longLinkpath", function (e) { - console.error("longLinkpath entry", e.props) - e.on("end", function () { - console.error("value=%j", e.body.toString()) - }) - }) - .on("longPath", function (e) { - console.error("longPath entry", e.props) - e.on("end", function () { - console.error("value=%j", e.body.toString()) - }) - }) - .on("entry", function (e) { - console.error("entry", e.props) - e.on("data", function (c) { - console.error(" >>>" + c.toString().replace(/\n/g, "\\n")) - }) - e.on("end", function () { - console.error(" << 0 - return !this._needDrain -} - -EntryWriter.prototype.end = function (c) { - // console.error(".. ew end") - if (c) this._buffer.push(c) - this._buffer.push(EOF) - this._ended = true - this._process() - this._needDrain = this._buffer.length > 0 -} - -EntryWriter.prototype.pause = function () { - // console.error(".. ew pause") - this._paused = true - this.emit("pause") -} - -EntryWriter.prototype.resume = function () { - // console.error(".. ew resume") - this._paused = false - this.emit("resume") - this._process() -} - -EntryWriter.prototype.add = function (entry) { - // console.error(".. ew add") - if (!this.parent) return this.emit("error", new Error("no parent")) - - // make sure that the _header and such is emitted, and clear out - // the _currentEntry link on the parent. - if (!this._ended) this.end() - - return this.parent.add(entry) -} - -EntryWriter.prototype._header = function () { - // console.error(".. ew header") - if (this._didHeader) return - this._didHeader = true - - var headerBlock = TarHeader.encode(this.props) - - if (this.props.needExtended && !this._meta) { - var me = this - - ExtendedHeaderWriter = ExtendedHeaderWriter || - require("./extended-header-writer.js") - - ExtendedHeaderWriter(this.props) - .on("data", function (c) { - me.emit("data", c) - }) - .on("error", function (er) { - me.emit("error", er) - }) - .end() - } - - // console.error(".. .. ew headerBlock emitting") - this.emit("data", headerBlock) - this.emit("header") -} - -EntryWriter.prototype._process = function () { - // console.error(".. .. ew process") - if (!this._didHeader && !this._meta) { - this._header() - } - - if (this._paused || this._processing) { - // console.error(".. .. .. paused=%j, processing=%j", this._paused, this._processing) - return - } - - this._processing = true - - var buf = this._buffer - for (var i = 0; i < buf.length; i ++) { - // console.error(".. .. .. i=%d", i) - - var c = buf[i] - - if (c === EOF) this._stream.end() - else this._stream.write(c) - - if (this._paused) { - // console.error(".. .. .. paused mid-emission") - this._processing = false - if (i < buf.length) { - this._needDrain = true - this._buffer = buf.slice(i + 1) - } - return - } - } - - // console.error(".. .. .. emitted") - this._buffer.length = 0 - this._processing = false - - // console.error(".. .. .. emitting drain") - this.emit("drain") -} - -EntryWriter.prototype.destroy = function () {} diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry.js deleted file mode 100644 index 5f5dd3c2688a8b..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry.js +++ /dev/null @@ -1,220 +0,0 @@ -// A passthrough read/write stream that sets its properties -// based on a header, extendedHeader, and globalHeader -// -// Can be either a file system object of some sort, or -// a pax/ustar metadata entry. - -module.exports = Entry - -var TarHeader = require("./header.js") - , tar = require("../tar") - , assert = require("assert").ok - , Stream = require("stream").Stream - , inherits = require("inherits") - , fstream = require("fstream").Abstract - -function Entry (header, extended, global) { - Stream.call(this) - this.readable = true - this.writable = true - - this._needDrain = false - this._paused = false - this._reading = false - this._ending = false - this._ended = false - this._remaining = 0 - this._abort = false - this._queue = [] - this._index = 0 - this._queueLen = 0 - - this._read = this._read.bind(this) - - this.props = {} - this._header = header - this._extended = extended || {} - - // globals can change throughout the course of - // a file parse operation. Freeze it at its current state. - this._global = {} - var me = this - Object.keys(global || {}).forEach(function (g) { - me._global[g] = global[g] - }) - - this._setProps() -} - -inherits(Entry, Stream) - -Entry.prototype.write = function (c) { - if (this._ending) this.error("write() after end()", null, true) - if (this._remaining === 0) { - this.error("invalid bytes past eof") - } - - // often we'll get a bunch of \0 at the end of the last write, - // since chunks will always be 512 bytes when reading a tarball. - if (c.length > this._remaining) { - c = c.slice(0, this._remaining) - } - this._remaining -= c.length - - // put it on the stack. - var ql = this._queueLen - this._queue.push(c) - this._queueLen ++ - - this._read() - - // either paused, or buffered - if (this._paused || ql > 0) { - this._needDrain = true - return false - } - - return true -} - -Entry.prototype.end = function (c) { - if (c) this.write(c) - this._ending = true - this._read() -} - -Entry.prototype.pause = function () { - this._paused = true - this.emit("pause") -} - -Entry.prototype.resume = function () { - // console.error(" Tar Entry resume", this.path) - this.emit("resume") - this._paused = false - this._read() - return this._queueLen - this._index > 1 -} - - // This is bound to the instance -Entry.prototype._read = function () { - // console.error(" Tar Entry _read", this.path) - - if (this._paused || this._reading || this._ended) return - - // set this flag so that event handlers don't inadvertently - // get multiple _read() calls running. - this._reading = true - - // have any data to emit? - while (this._index < this._queueLen && !this._paused) { - var chunk = this._queue[this._index ++] - this.emit("data", chunk) - } - - // check if we're drained - if (this._index >= this._queueLen) { - this._queue.length = this._queueLen = this._index = 0 - if (this._needDrain) { - this._needDrain = false - this.emit("drain") - } - if (this._ending) { - this._ended = true - this.emit("end") - } - } - - // if the queue gets too big, then pluck off whatever we can. - // this should be fairly rare. - var mql = this._maxQueueLen - if (this._queueLen > mql && this._index > 0) { - mql = Math.min(this._index, mql) - this._index -= mql - this._queueLen -= mql - this._queue = this._queue.slice(mql) - } - - this._reading = false -} - -Entry.prototype._setProps = function () { - // props = extended->global->header->{} - var header = this._header - , extended = this._extended - , global = this._global - , props = this.props - - // first get the values from the normal header. - var fields = tar.fields - for (var f = 0; fields[f] !== null; f ++) { - var field = fields[f] - , val = header[field] - if (typeof val !== "undefined") props[field] = val - } - - // next, the global header for this file. - // numeric values, etc, will have already been parsed. - ;[global, extended].forEach(function (p) { - Object.keys(p).forEach(function (f) { - if (typeof p[f] !== "undefined") props[f] = p[f] - }) - }) - - // no nulls allowed in path or linkpath - ;["path", "linkpath"].forEach(function (p) { - if (props.hasOwnProperty(p)) { - props[p] = props[p].split("\0")[0] - } - }) - - - // set date fields to be a proper date - ;["mtime", "ctime", "atime"].forEach(function (p) { - if (props.hasOwnProperty(p)) { - props[p] = new Date(props[p] * 1000) - } - }) - - // set the type so that we know what kind of file to create - var type - switch (tar.types[props.type]) { - case "OldFile": - case "ContiguousFile": - type = "File" - break - - case "GNUDumpDir": - type = "Directory" - break - - case undefined: - type = "Unknown" - break - - case "Link": - case "SymbolicLink": - case "CharacterDevice": - case "BlockDevice": - case "Directory": - case "FIFO": - default: - type = tar.types[props.type] - } - - this.type = type - this.path = props.path - this.size = props.size - - // size is special, since it signals when the file needs to end. - this._remaining = props.size -} - -// the parser may not call write if _abort is true. -// useful for skipping data from some files quickly. -Entry.prototype.abort = function(){ - this._abort = true -} - -Entry.prototype.warn = fstream.warn -Entry.prototype.error = fstream.error diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header-writer.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header-writer.js deleted file mode 100644 index 1728c4583ae060..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header-writer.js +++ /dev/null @@ -1,191 +0,0 @@ - -module.exports = ExtendedHeaderWriter - -var inherits = require("inherits") - , EntryWriter = require("./entry-writer.js") - -inherits(ExtendedHeaderWriter, EntryWriter) - -var tar = require("../tar.js") - , path = require("path") - , TarHeader = require("./header.js") - -// props is the props of the thing we need to write an -// extended header for. -// Don't be shy with it. Just encode everything. -function ExtendedHeaderWriter (props) { - // console.error(">> ehw ctor") - var me = this - - if (!(me instanceof ExtendedHeaderWriter)) { - return new ExtendedHeaderWriter(props) - } - - me.fields = props - - var p = - { path : ("PaxHeader" + path.join("/", props.path || "")) - .replace(/\\/g, "/").substr(0, 100) - , mode : props.mode || 0666 - , uid : props.uid || 0 - , gid : props.gid || 0 - , size : 0 // will be set later - , mtime : props.mtime || Date.now() / 1000 - , type : "x" - , linkpath : "" - , ustar : "ustar\0" - , ustarver : "00" - , uname : props.uname || "" - , gname : props.gname || "" - , devmaj : props.devmaj || 0 - , devmin : props.devmin || 0 - } - - - EntryWriter.call(me, p) - // console.error(">> ehw props", me.props) - me.props = p - - me._meta = true -} - -ExtendedHeaderWriter.prototype.end = function () { - // console.error(">> ehw end") - var me = this - - if (me._ended) return - me._ended = true - - me._encodeFields() - - if (me.props.size === 0) { - // nothing to write! - me._ready = true - me._stream.end() - return - } - - me._stream.write(TarHeader.encode(me.props)) - me.body.forEach(function (l) { - me._stream.write(l) - }) - me._ready = true - - // console.error(">> ehw _process calling end()", me.props) - this._stream.end() -} - -ExtendedHeaderWriter.prototype._encodeFields = function () { - // console.error(">> ehw _encodeFields") - this.body = [] - if (this.fields.prefix) { - this.fields.path = this.fields.prefix + "/" + this.fields.path - this.fields.prefix = "" - } - encodeFields(this.fields, "", this.body, this.fields.noProprietary) - var me = this - this.body.forEach(function (l) { - me.props.size += l.length - }) -} - -function encodeFields (fields, prefix, body, nop) { - // console.error(">> >> ehw encodeFields") - // "%d %s=%s\n", , , - // The length is a decimal number, and includes itself and the \n - // Numeric values are decimal strings. - - Object.keys(fields).forEach(function (k) { - var val = fields[k] - , numeric = tar.numeric[k] - - if (prefix) k = prefix + "." + k - - // already including NODETAR.type, don't need File=true also - if (k === fields.type && val === true) return - - switch (k) { - // don't include anything that's always handled just fine - // in the normal header, or only meaningful in the context - // of nodetar - case "mode": - case "cksum": - case "ustar": - case "ustarver": - case "prefix": - case "basename": - case "dirname": - case "needExtended": - case "block": - case "filter": - return - - case "rdev": - if (val === 0) return - break - - case "nlink": - case "dev": // Truly a hero among men, Creator of Star! - case "ino": // Speak his name with reverent awe! It is: - k = "SCHILY." + k - break - - default: break - } - - if (val && typeof val === "object" && - !Buffer.isBuffer(val)) encodeFields(val, k, body, nop) - else if (val === null || val === undefined) return - else body.push.apply(body, encodeField(k, val, nop)) - }) - - return body -} - -function encodeField (k, v, nop) { - // lowercase keys must be valid, otherwise prefix with - // "NODETAR." - if (k.charAt(0) === k.charAt(0).toLowerCase()) { - var m = k.split(".")[0] - if (!tar.knownExtended[m]) k = "NODETAR." + k - } - - // no proprietary - if (nop && k.charAt(0) !== k.charAt(0).toLowerCase()) { - return [] - } - - if (typeof val === "number") val = val.toString(10) - - var s = new Buffer(" " + k + "=" + v + "\n") - , digits = Math.floor(Math.log(s.length) / Math.log(10)) + 1 - - // console.error("1 s=%j digits=%j s.length=%d", s.toString(), digits, s.length) - - // if adding that many digits will make it go over that length, - // then add one to it. For example, if the string is: - // " foo=bar\n" - // then that's 9 characters. With the "9", that bumps the length - // up to 10. However, this is invalid: - // "10 foo=bar\n" - // but, since that's actually 11 characters, since 10 adds another - // character to the length, and the length includes the number - // itself. In that case, just bump it up again. - if (s.length + digits >= Math.pow(10, digits)) digits += 1 - // console.error("2 s=%j digits=%j s.length=%d", s.toString(), digits, s.length) - - var len = digits + s.length - // console.error("3 s=%j digits=%j s.length=%d len=%d", s.toString(), digits, s.length, len) - var lenBuf = new Buffer("" + len) - if (lenBuf.length + s.length !== len) { - throw new Error("Bad length calculation\n"+ - "len="+len+"\n"+ - "lenBuf="+JSON.stringify(lenBuf.toString())+"\n"+ - "lenBuf.length="+lenBuf.length+"\n"+ - "digits="+digits+"\n"+ - "s="+JSON.stringify(s.toString())+"\n"+ - "s.length="+s.length) - } - - return [lenBuf, s] -} diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header.js deleted file mode 100644 index 74f432ceee5b24..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header.js +++ /dev/null @@ -1,140 +0,0 @@ -// An Entry consisting of: -// -// "%d %s=%s\n", , , -// -// The length is a decimal number, and includes itself and the \n -// \0 does not terminate anything. Only the length terminates the string. -// Numeric values are decimal strings. - -module.exports = ExtendedHeader - -var Entry = require("./entry.js") - , inherits = require("inherits") - , tar = require("../tar.js") - , numeric = tar.numeric - , keyTrans = { "SCHILY.dev": "dev" - , "SCHILY.ino": "ino" - , "SCHILY.nlink": "nlink" } - -function ExtendedHeader () { - Entry.apply(this, arguments) - this.on("data", this._parse) - this.fields = {} - this._position = 0 - this._fieldPos = 0 - this._state = SIZE - this._sizeBuf = [] - this._keyBuf = [] - this._valBuf = [] - this._size = -1 - this._key = "" -} - -inherits(ExtendedHeader, Entry) -ExtendedHeader.prototype._parse = parse - -var s = 0 - , states = ExtendedHeader.states = {} - , SIZE = states.SIZE = s++ - , KEY = states.KEY = s++ - , VAL = states.VAL = s++ - , ERR = states.ERR = s++ - -Object.keys(states).forEach(function (s) { - states[states[s]] = states[s] -}) - -states[s] = null - -// char code values for comparison -var _0 = "0".charCodeAt(0) - , _9 = "9".charCodeAt(0) - , point = ".".charCodeAt(0) - , a = "a".charCodeAt(0) - , Z = "Z".charCodeAt(0) - , a = "a".charCodeAt(0) - , z = "z".charCodeAt(0) - , space = " ".charCodeAt(0) - , eq = "=".charCodeAt(0) - , cr = "\n".charCodeAt(0) - -function parse (c) { - if (this._state === ERR) return - - for ( var i = 0, l = c.length - ; i < l - ; this._position++, this._fieldPos++, i++) { - // console.error("top of loop, size="+this._size) - - var b = c[i] - - if (this._size >= 0 && this._fieldPos > this._size) { - error(this, "field exceeds length="+this._size) - return - } - - switch (this._state) { - case ERR: return - - case SIZE: - // console.error("parsing size, b=%d, rest=%j", b, c.slice(i).toString()) - if (b === space) { - this._state = KEY - // this._fieldPos = this._sizeBuf.length - this._size = parseInt(new Buffer(this._sizeBuf).toString(), 10) - this._sizeBuf.length = 0 - continue - } - if (b < _0 || b > _9) { - error(this, "expected [" + _0 + ".." + _9 + "], got " + b) - return - } - this._sizeBuf.push(b) - continue - - case KEY: - // can be any char except =, not > size. - if (b === eq) { - this._state = VAL - this._key = new Buffer(this._keyBuf).toString() - if (keyTrans[this._key]) this._key = keyTrans[this._key] - this._keyBuf.length = 0 - continue - } - this._keyBuf.push(b) - continue - - case VAL: - // field must end with cr - if (this._fieldPos === this._size - 1) { - // console.error("finished with "+this._key) - if (b !== cr) { - error(this, "expected \\n at end of field") - return - } - var val = new Buffer(this._valBuf).toString() - if (numeric[this._key]) { - val = parseFloat(val) - } - this.fields[this._key] = val - - this._valBuf.length = 0 - this._state = SIZE - this._size = -1 - this._fieldPos = -1 - continue - } - this._valBuf.push(b) - continue - } - } -} - -function error (me, msg) { - msg = "invalid header: " + msg - + "\nposition=" + me._position - + "\nfield position=" + me._fieldPos - - me.error(msg) - me.state = ERR -} diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extract.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extract.js deleted file mode 100644 index fe1bb976eb0ce2..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extract.js +++ /dev/null @@ -1,94 +0,0 @@ -// give it a tarball and a path, and it'll dump the contents - -module.exports = Extract - -var tar = require("../tar.js") - , fstream = require("fstream") - , inherits = require("inherits") - , path = require("path") - -function Extract (opts) { - if (!(this instanceof Extract)) return new Extract(opts) - tar.Parse.apply(this) - - if (typeof opts !== "object") { - opts = { path: opts } - } - - // better to drop in cwd? seems more standard. - opts.path = opts.path || path.resolve("node-tar-extract") - opts.type = "Directory" - opts.Directory = true - - // similar to --strip or --strip-components - opts.strip = +opts.strip - if (!opts.strip || opts.strip <= 0) opts.strip = 0 - - this._fst = fstream.Writer(opts) - - this.pause() - var me = this - - // Hardlinks in tarballs are relative to the root - // of the tarball. So, they need to be resolved against - // the target directory in order to be created properly. - me.on("entry", function (entry) { - // if there's a "strip" argument, then strip off that many - // path components. - if (opts.strip) { - var p = entry.path.split("/").slice(opts.strip).join("/") - entry.path = entry.props.path = p - if (entry.linkpath) { - var lp = entry.linkpath.split("/").slice(opts.strip).join("/") - entry.linkpath = entry.props.linkpath = lp - } - } - if (entry.type === "Link") { - entry.linkpath = entry.props.linkpath = - path.join(opts.path, path.join("/", entry.props.linkpath)) - } - - if (entry.type === "SymbolicLink") { - var dn = path.dirname(entry.path) || "" - var linkpath = entry.props.linkpath - var target = path.resolve(opts.path, dn, linkpath) - if (target.indexOf(opts.path) !== 0) { - linkpath = path.join(opts.path, path.join("/", linkpath)) - } - entry.linkpath = entry.props.linkpath = linkpath - } - }) - - this._fst.on("ready", function () { - me.pipe(me._fst, { end: false }) - me.resume() - }) - - this._fst.on('error', function(err) { - me.emit('error', err) - }) - - this._fst.on('drain', function() { - me.emit('drain') - }) - - // this._fst.on("end", function () { - // console.error("\nEEEE Extract End", me._fst.path) - // }) - - this._fst.on("close", function () { - // console.error("\nEEEE Extract End", me._fst.path) - me.emit("finish") - me.emit("end") - me.emit("close") - }) -} - -inherits(Extract, tar.Parse) - -Extract.prototype._streamEnd = function () { - var me = this - if (!me._ended || me._entry) me.error("unexpected eof") - me._fst.end() - // my .end() is coming later. -} diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/global-header-writer.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/global-header-writer.js deleted file mode 100644 index 0bfc7b80aa7c67..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/global-header-writer.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = GlobalHeaderWriter - -var ExtendedHeaderWriter = require("./extended-header-writer.js") - , inherits = require("inherits") - -inherits(GlobalHeaderWriter, ExtendedHeaderWriter) - -function GlobalHeaderWriter (props) { - if (!(this instanceof GlobalHeaderWriter)) { - return new GlobalHeaderWriter(props) - } - ExtendedHeaderWriter.call(this, props) - this.props.type = "g" -} diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/header.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/header.js deleted file mode 100644 index 3741d5d3f24579..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/header.js +++ /dev/null @@ -1,384 +0,0 @@ -// parse a 512-byte header block to a data object, or vice-versa -// If the data won't fit nicely in a simple header, then generate -// the appropriate extended header file, and return that. - -module.exports = TarHeader - -var tar = require("../tar.js") - , fields = tar.fields - , fieldOffs = tar.fieldOffs - , fieldEnds = tar.fieldEnds - , fieldSize = tar.fieldSize - , numeric = tar.numeric - , assert = require("assert").ok - , space = " ".charCodeAt(0) - , slash = "/".charCodeAt(0) - , bslash = process.platform === "win32" ? "\\".charCodeAt(0) : null - -function TarHeader (block) { - if (!(this instanceof TarHeader)) return new TarHeader(block) - if (block) this.decode(block) -} - -TarHeader.prototype = - { decode : decode - , encode: encode - , calcSum: calcSum - , checkSum: checkSum - } - -TarHeader.parseNumeric = parseNumeric -TarHeader.encode = encode -TarHeader.decode = decode - -// note that this will only do the normal ustar header, not any kind -// of extended posix header file. If something doesn't fit comfortably, -// then it will set obj.needExtended = true, and set the block to -// the closest approximation. -function encode (obj) { - if (!obj && !(this instanceof TarHeader)) throw new Error( - "encode must be called on a TarHeader, or supplied an object") - - obj = obj || this - var block = obj.block = new Buffer(512) - - // if the object has a "prefix", then that's actually an extension of - // the path field. - if (obj.prefix) { - // console.error("%% header encoding, got a prefix", obj.prefix) - obj.path = obj.prefix + "/" + obj.path - // console.error("%% header encoding, prefixed path", obj.path) - obj.prefix = "" - } - - obj.needExtended = false - - if (obj.mode) { - if (typeof obj.mode === "string") obj.mode = parseInt(obj.mode, 8) - obj.mode = obj.mode & 0777 - } - - for (var f = 0; fields[f] !== null; f ++) { - var field = fields[f] - , off = fieldOffs[f] - , end = fieldEnds[f] - , ret - - switch (field) { - case "cksum": - // special, done below, after all the others - break - - case "prefix": - // special, this is an extension of the "path" field. - // console.error("%% header encoding, skip prefix later") - break - - case "type": - // convert from long name to a single char. - var type = obj.type || "0" - if (type.length > 1) { - type = tar.types[obj.type] - if (!type) type = "0" - } - writeText(block, off, end, type) - break - - case "path": - // uses the "prefix" field if > 100 bytes, but <= 255 - var pathLen = Buffer.byteLength(obj.path) - , pathFSize = fieldSize[fields.path] - , prefFSize = fieldSize[fields.prefix] - - // paths between 100 and 255 should use the prefix field. - // longer than 255 - if (pathLen > pathFSize && - pathLen <= pathFSize + prefFSize) { - // need to find a slash somewhere in the middle so that - // path and prefix both fit in their respective fields - var searchStart = pathLen - 1 - pathFSize - , searchEnd = prefFSize - , found = false - , pathBuf = new Buffer(obj.path) - - for ( var s = searchStart - ; (s <= searchEnd) - ; s ++ ) { - if (pathBuf[s] === slash || pathBuf[s] === bslash) { - found = s - break - } - } - - if (found !== false) { - prefix = pathBuf.slice(0, found).toString("utf8") - path = pathBuf.slice(found + 1).toString("utf8") - - ret = writeText(block, off, end, path) - off = fieldOffs[fields.prefix] - end = fieldEnds[fields.prefix] - // console.error("%% header writing prefix", off, end, prefix) - ret = writeText(block, off, end, prefix) || ret - break - } - } - - // paths less than 100 chars don't need a prefix - // and paths longer than 255 need an extended header and will fail - // on old implementations no matter what we do here. - // Null out the prefix, and fallthrough to default. - // console.error("%% header writing no prefix") - var poff = fieldOffs[fields.prefix] - , pend = fieldEnds[fields.prefix] - writeText(block, poff, pend, "") - // fallthrough - - // all other fields are numeric or text - default: - ret = numeric[field] - ? writeNumeric(block, off, end, obj[field]) - : writeText(block, off, end, obj[field] || "") - break - } - obj.needExtended = obj.needExtended || ret - } - - var off = fieldOffs[fields.cksum] - , end = fieldEnds[fields.cksum] - - writeNumeric(block, off, end, calcSum.call(this, block)) - - return block -} - -// if it's a negative number, or greater than will fit, -// then use write256. -var MAXNUM = { 12: 077777777777 - , 11: 07777777777 - , 8 : 07777777 - , 7 : 0777777 } -function writeNumeric (block, off, end, num) { - var writeLen = end - off - , maxNum = MAXNUM[writeLen] || 0 - - num = num || 0 - // console.error(" numeric", num) - - if (num instanceof Date || - Object.prototype.toString.call(num) === "[object Date]") { - num = num.getTime() / 1000 - } - - if (num > maxNum || num < 0) { - write256(block, off, end, num) - // need an extended header if negative or too big. - return true - } - - // god, tar is so annoying - // if the string is small enough, you should put a space - // between the octal string and the \0, but if it doesn't - // fit, then don't. - var numStr = Math.floor(num).toString(8) - if (num < MAXNUM[writeLen - 1]) numStr += " " - - // pad with "0" chars - if (numStr.length < writeLen) { - numStr = (new Array(writeLen - numStr.length).join("0")) + numStr - } - - if (numStr.length !== writeLen - 1) { - throw new Error("invalid length: " + JSON.stringify(numStr) + "\n" + - "expected: "+writeLen) - } - block.write(numStr, off, writeLen, "utf8") - block[end - 1] = 0 -} - -function write256 (block, off, end, num) { - var buf = block.slice(off, end) - var positive = num >= 0 - buf[0] = positive ? 0x80 : 0xFF - - // get the number as a base-256 tuple - if (!positive) num *= -1 - var tuple = [] - do { - var n = num % 256 - tuple.push(n) - num = (num - n) / 256 - } while (num) - - var bytes = tuple.length - - var fill = buf.length - bytes - for (var i = 1; i < fill; i ++) { - buf[i] = positive ? 0 : 0xFF - } - - // tuple is a base256 number, with [0] as the *least* significant byte - // if it's negative, then we need to flip all the bits once we hit the - // first non-zero bit. The 2's-complement is (0x100 - n), and the 1's- - // complement is (0xFF - n). - var zero = true - for (i = bytes; i > 0; i --) { - var byte = tuple[bytes - i] - if (positive) buf[fill + i] = byte - else if (zero && byte === 0) buf[fill + i] = 0 - else if (zero) { - zero = false - buf[fill + i] = 0x100 - byte - } else buf[fill + i] = 0xFF - byte - } -} - -function writeText (block, off, end, str) { - // strings are written as utf8, then padded with \0 - var strLen = Buffer.byteLength(str) - , writeLen = Math.min(strLen, end - off) - // non-ascii fields need extended headers - // long fields get truncated - , needExtended = strLen !== str.length || strLen > writeLen - - // write the string, and null-pad - if (writeLen > 0) block.write(str, off, writeLen, "utf8") - for (var i = off + writeLen; i < end; i ++) block[i] = 0 - - return needExtended -} - -function calcSum (block) { - block = block || this.block - assert(Buffer.isBuffer(block) && block.length === 512) - - if (!block) throw new Error("Need block to checksum") - - // now figure out what it would be if the cksum was " " - var sum = 0 - , start = fieldOffs[fields.cksum] - , end = fieldEnds[fields.cksum] - - for (var i = 0; i < fieldOffs[fields.cksum]; i ++) { - sum += block[i] - } - - for (var i = start; i < end; i ++) { - sum += space - } - - for (var i = end; i < 512; i ++) { - sum += block[i] - } - - return sum -} - - -function checkSum (block) { - var sum = calcSum.call(this, block) - block = block || this.block - - var cksum = block.slice(fieldOffs[fields.cksum], fieldEnds[fields.cksum]) - cksum = parseNumeric(cksum) - - return cksum === sum -} - -function decode (block) { - block = block || this.block - assert(Buffer.isBuffer(block) && block.length === 512) - - this.block = block - this.cksumValid = this.checkSum() - - var prefix = null - - // slice off each field. - for (var f = 0; fields[f] !== null; f ++) { - var field = fields[f] - , val = block.slice(fieldOffs[f], fieldEnds[f]) - - switch (field) { - case "ustar": - // if not ustar, then everything after that is just padding. - if (val.toString() !== "ustar\0") { - this.ustar = false - return - } else { - // console.error("ustar:", val, val.toString()) - this.ustar = val.toString() - } - break - - // prefix is special, since it might signal the xstar header - case "prefix": - var atime = parseNumeric(val.slice(131, 131 + 12)) - , ctime = parseNumeric(val.slice(131 + 12, 131 + 12 + 12)) - if ((val[130] === 0 || val[130] === space) && - typeof atime === "number" && - typeof ctime === "number" && - val[131 + 12] === space && - val[131 + 12 + 12] === space) { - this.atime = atime - this.ctime = ctime - val = val.slice(0, 130) - } - prefix = val.toString("utf8").replace(/\0+$/, "") - // console.error("%% header reading prefix", prefix) - break - - // all other fields are null-padding text - // or a number. - default: - if (numeric[field]) { - this[field] = parseNumeric(val) - } else { - this[field] = val.toString("utf8").replace(/\0+$/, "") - } - break - } - } - - // if we got a prefix, then prepend it to the path. - if (prefix) { - this.path = prefix + "/" + this.path - // console.error("%% header got a prefix", this.path) - } -} - -function parse256 (buf) { - // first byte MUST be either 80 or FF - // 80 for positive, FF for 2's comp - var positive - if (buf[0] === 0x80) positive = true - else if (buf[0] === 0xFF) positive = false - else return null - - // build up a base-256 tuple from the least sig to the highest - var zero = false - , tuple = [] - for (var i = buf.length - 1; i > 0; i --) { - var byte = buf[i] - if (positive) tuple.push(byte) - else if (zero && byte === 0) tuple.push(0) - else if (zero) { - zero = false - tuple.push(0x100 - byte) - } else tuple.push(0xFF - byte) - } - - for (var sum = 0, i = 0, l = tuple.length; i < l; i ++) { - sum += tuple[i] * Math.pow(256, i) - } - - return positive ? sum : -1 * sum -} - -function parseNumeric (f) { - if (f[0] & 0x80) return parse256(f) - - var str = f.toString("utf8").split("\0")[0].trim() - , res = parseInt(str, 8) - - return isNaN(res) ? null : res -} diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/pack.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/pack.js deleted file mode 100644 index 5a3bb95a121bdb..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/pack.js +++ /dev/null @@ -1,236 +0,0 @@ -// pipe in an fstream, and it'll make a tarball. -// key-value pair argument is global extended header props. - -module.exports = Pack - -var EntryWriter = require("./entry-writer.js") - , Stream = require("stream").Stream - , path = require("path") - , inherits = require("inherits") - , GlobalHeaderWriter = require("./global-header-writer.js") - , collect = require("fstream").collect - , eof = new Buffer(512) - -for (var i = 0; i < 512; i ++) eof[i] = 0 - -inherits(Pack, Stream) - -function Pack (props) { - // console.error("-- p ctor") - var me = this - if (!(me instanceof Pack)) return new Pack(props) - - if (props) me._noProprietary = props.noProprietary - else me._noProprietary = false - - me._global = props - - me.readable = true - me.writable = true - me._buffer = [] - // console.error("-- -- set current to null in ctor") - me._currentEntry = null - me._processing = false - - me._pipeRoot = null - me.on("pipe", function (src) { - if (src.root === me._pipeRoot) return - me._pipeRoot = src - src.on("end", function () { - me._pipeRoot = null - }) - me.add(src) - }) -} - -Pack.prototype.addGlobal = function (props) { - // console.error("-- p addGlobal") - if (this._didGlobal) return - this._didGlobal = true - - var me = this - GlobalHeaderWriter(props) - .on("data", function (c) { - me.emit("data", c) - }) - .end() -} - -Pack.prototype.add = function (stream) { - if (this._global && !this._didGlobal) this.addGlobal(this._global) - - if (this._ended) return this.emit("error", new Error("add after end")) - - collect(stream) - this._buffer.push(stream) - this._process() - this._needDrain = this._buffer.length > 0 - return !this._needDrain -} - -Pack.prototype.pause = function () { - this._paused = true - if (this._currentEntry) this._currentEntry.pause() - this.emit("pause") -} - -Pack.prototype.resume = function () { - this._paused = false - if (this._currentEntry) this._currentEntry.resume() - this.emit("resume") - this._process() -} - -Pack.prototype.end = function () { - this._ended = true - this._buffer.push(eof) - this._process() -} - -Pack.prototype._process = function () { - var me = this - if (me._paused || me._processing) { - return - } - - var entry = me._buffer.shift() - - if (!entry) { - if (me._needDrain) { - me.emit("drain") - } - return - } - - if (entry.ready === false) { - // console.error("-- entry is not ready", entry) - me._buffer.unshift(entry) - entry.on("ready", function () { - // console.error("-- -- ready!", entry) - me._process() - }) - return - } - - me._processing = true - - if (entry === eof) { - // need 2 ending null blocks. - me.emit("data", eof) - me.emit("data", eof) - me.emit("end") - me.emit("close") - return - } - - // Change the path to be relative to the root dir that was - // added to the tarball. - // - // XXX This should be more like how -C works, so you can - // explicitly set a root dir, and also explicitly set a pathname - // in the tarball to use. That way we can skip a lot of extra - // work when resolving symlinks for bundled dependencies in npm. - - var root = path.dirname((entry.root || entry).path); - if (me._global && me._global.fromBase && entry.root && entry.root.path) { - // user set 'fromBase: true' indicating tar root should be directory itself - root = entry.root.path; - } - - var wprops = {} - - Object.keys(entry.props || {}).forEach(function (k) { - wprops[k] = entry.props[k] - }) - - if (me._noProprietary) wprops.noProprietary = true - - wprops.path = path.relative(root, entry.path || '') - - // actually not a matter of opinion or taste. - if (process.platform === "win32") { - wprops.path = wprops.path.replace(/\\/g, "/") - } - - if (!wprops.type) - wprops.type = 'Directory' - - switch (wprops.type) { - // sockets not supported - case "Socket": - return - - case "Directory": - wprops.path += "/" - wprops.size = 0 - break - - case "Link": - var lp = path.resolve(path.dirname(entry.path), entry.linkpath) - wprops.linkpath = path.relative(root, lp) || "." - wprops.size = 0 - break - - case "SymbolicLink": - var lp = path.resolve(path.dirname(entry.path), entry.linkpath) - wprops.linkpath = path.relative(path.dirname(entry.path), lp) || "." - wprops.size = 0 - break - } - - // console.error("-- new writer", wprops) - // if (!wprops.type) { - // // console.error("-- no type?", entry.constructor.name, entry) - // } - - // console.error("-- -- set current to new writer", wprops.path) - var writer = me._currentEntry = EntryWriter(wprops) - - writer.parent = me - - // writer.on("end", function () { - // // console.error("-- -- writer end", writer.path) - // }) - - writer.on("data", function (c) { - me.emit("data", c) - }) - - writer.on("header", function () { - Buffer.prototype.toJSON = function () { - return this.toString().split(/\0/).join(".") - } - // console.error("-- -- writer header %j", writer.props) - if (writer.props.size === 0) nextEntry() - }) - writer.on("close", nextEntry) - - var ended = false - function nextEntry () { - if (ended) return - ended = true - - // console.error("-- -- writer close", writer.path) - // console.error("-- -- set current to null", wprops.path) - me._currentEntry = null - me._processing = false - me._process() - } - - writer.on("error", function (er) { - // console.error("-- -- writer error", writer.path) - me.emit("error", er) - }) - - // if it's the root, then there's no need to add its entries, - // or data, since they'll be added directly. - if (entry === me._pipeRoot) { - // console.error("-- is the root, don't auto-add") - writer.add = null - } - - entry.pipe(writer) -} - -Pack.prototype.destroy = function () {} -Pack.prototype.write = function () {} diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js deleted file mode 100644 index 1c66ebdaf0c157..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js +++ /dev/null @@ -1,281 +0,0 @@ - -// A writable stream. -// It emits "entry" events, which provide a readable stream that has -// header info attached. - -module.exports = Parse.create = Parse - -var stream = require("stream") - , Stream = stream.Stream - , BlockStream = require("block-stream") - , tar = require("../tar.js") - , TarHeader = require("./header.js") - , Entry = require("./entry.js") - , BufferEntry = require("./buffer-entry.js") - , ExtendedHeader = require("./extended-header.js") - , assert = require("assert").ok - , inherits = require("inherits") - , fstream = require("fstream") - -// reading a tar is a lot like reading a directory -// However, we're actually not going to run the ctor, -// since it does a stat and various other stuff. -// This inheritance gives us the pause/resume/pipe -// behavior that is desired. -inherits(Parse, fstream.Reader) - -function Parse () { - var me = this - if (!(me instanceof Parse)) return new Parse() - - // doesn't apply fstream.Reader ctor? - // no, becasue we don't want to stat/etc, we just - // want to get the entry/add logic from .pipe() - Stream.apply(me) - - me.writable = true - me.readable = true - me._stream = new BlockStream(512) - me.position = 0 - me._ended = false - me._hardLinks = {} - - me._stream.on("error", function (e) { - me.emit("error", e) - }) - - me._stream.on("data", function (c) { - me._process(c) - }) - - me._stream.on("end", function () { - me._streamEnd() - }) - - me._stream.on("drain", function () { - me.emit("drain") - }) -} - -// overridden in Extract class, since it needs to -// wait for its DirWriter part to finish before -// emitting "end" -Parse.prototype._streamEnd = function () { - var me = this - if (!me._ended || me._entry) me.error("unexpected eof") - me.emit("end") -} - -// a tar reader is actually a filter, not just a readable stream. -// So, you should pipe a tarball stream into it, and it needs these -// write/end methods to do that. -Parse.prototype.write = function (c) { - if (this._ended) { - // gnutar puts a LOT of nulls at the end. - // you can keep writing these things forever. - // Just ignore them. - for (var i = 0, l = c.length; i > l; i ++) { - if (c[i] !== 0) return this.error("write() after end()") - } - return - } - return this._stream.write(c) -} - -Parse.prototype.end = function (c) { - this._ended = true - return this._stream.end(c) -} - -// don't need to do anything, since we're just -// proxying the data up from the _stream. -// Just need to override the parent's "Not Implemented" -// error-thrower. -Parse.prototype._read = function () {} - -Parse.prototype._process = function (c) { - assert(c && c.length === 512, "block size should be 512") - - // one of three cases. - // 1. A new header - // 2. A part of a file/extended header - // 3. One of two or more EOF null blocks - - if (this._entry) { - var entry = this._entry - if(!entry._abort) entry.write(c) - else { - entry._remaining -= c.length - if(entry._remaining < 0) entry._remaining = 0 - } - if (entry._remaining === 0) { - entry.end() - this._entry = null - } - } else { - // either zeroes or a header - var zero = true - for (var i = 0; i < 512 && zero; i ++) { - zero = c[i] === 0 - } - - // eof is *at least* 2 blocks of nulls, and then the end of the - // file. you can put blocks of nulls between entries anywhere, - // so appending one tarball to another is technically valid. - // ending without the eof null blocks is not allowed, however. - if (zero) { - if (this._eofStarted) - this._ended = true - this._eofStarted = true - } else { - this._eofStarted = false - this._startEntry(c) - } - } - - this.position += 512 -} - -// take a header chunk, start the right kind of entry. -Parse.prototype._startEntry = function (c) { - var header = new TarHeader(c) - , self = this - , entry - , ev - , EntryType - , onend - , meta = false - - if (null === header.size || !header.cksumValid) { - var e = new Error("invalid tar file") - e.header = header - e.tar_file_offset = this.position - e.tar_block = this.position / 512 - return this.emit("error", e) - } - - switch (tar.types[header.type]) { - case "File": - case "OldFile": - case "Link": - case "SymbolicLink": - case "CharacterDevice": - case "BlockDevice": - case "Directory": - case "FIFO": - case "ContiguousFile": - case "GNUDumpDir": - // start a file. - // pass in any extended headers - // These ones consumers are typically most interested in. - EntryType = Entry - ev = "entry" - break - - case "GlobalExtendedHeader": - // extended headers that apply to the rest of the tarball - EntryType = ExtendedHeader - onend = function () { - self._global = self._global || {} - Object.keys(entry.fields).forEach(function (k) { - self._global[k] = entry.fields[k] - }) - } - ev = "globalExtendedHeader" - meta = true - break - - case "ExtendedHeader": - case "OldExtendedHeader": - // extended headers that apply to the next entry - EntryType = ExtendedHeader - onend = function () { - self._extended = entry.fields - } - ev = "extendedHeader" - meta = true - break - - case "NextFileHasLongLinkpath": - // set linkpath= in extended header - EntryType = BufferEntry - onend = function () { - self._extended = self._extended || {} - self._extended.linkpath = entry.body - } - ev = "longLinkpath" - meta = true - break - - case "NextFileHasLongPath": - case "OldGnuLongPath": - // set path= in file-extended header - EntryType = BufferEntry - onend = function () { - self._extended = self._extended || {} - self._extended.path = entry.body - } - ev = "longPath" - meta = true - break - - default: - // all the rest we skip, but still set the _entry - // member, so that we can skip over their data appropriately. - // emit an event to say that this is an ignored entry type? - EntryType = Entry - ev = "ignoredEntry" - break - } - - var global, extended - if (meta) { - global = extended = null - } else { - var global = this._global - var extended = this._extended - - // extendedHeader only applies to one entry, so once we start - // an entry, it's over. - this._extended = null - } - entry = new EntryType(header, extended, global) - entry.meta = meta - - // only proxy data events of normal files. - if (!meta) { - entry.on("data", function (c) { - me.emit("data", c) - }) - } - - if (onend) entry.on("end", onend) - - this._entry = entry - - if (entry.type === "Link") { - this._hardLinks[entry.path] = entry - } - - var me = this - - entry.on("pause", function () { - me.pause() - }) - - entry.on("resume", function () { - me.resume() - }) - - if (this.listeners("*").length) { - this.emit("*", ev, entry) - } - - this.emit(ev, entry) - - // Zero-byte entry. End immediately. - if (entry.props.size === 0) { - entry.end() - this._entry = null - } -} diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/package.json b/deps/npm/node_modules/node-gyp/node_modules/tar/package.json deleted file mode 100644 index 6e7fb2ed71093d..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "tar@^2.0.0", - "_id": "tar@2.2.2", - "_inBundle": false, - "_integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", - "_location": "/node-gyp/tar", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "tar@^2.0.0", - "name": "tar", - "escapedName": "tar", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/node-gyp" - ], - "_resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", - "_shasum": "0ca8848562c7299b8b446ff6a4d60cdbb23edc40", - "_spec": "tar@^2.0.0", - "_where": "/Users/isaacs/dev/npm/cli/node_modules/node-gyp", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/node-tar/issues" - }, - "bundleDependencies": false, - "dependencies": { - "block-stream": "*", - "fstream": "^1.0.12", - "inherits": "2" - }, - "deprecated": false, - "description": "tar for node", - "devDependencies": { - "graceful-fs": "^4.1.2", - "mkdirp": "^0.5.0", - "rimraf": "1.x", - "tap": "0.x" - }, - "homepage": "https://github.com/isaacs/node-tar#readme", - "license": "ISC", - "main": "tar.js", - "name": "tar", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-tar.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "2.2.2" -} diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/tar.js b/deps/npm/node_modules/node-gyp/node_modules/tar/tar.js deleted file mode 100644 index a81298b9a0b126..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/tar.js +++ /dev/null @@ -1,173 +0,0 @@ -// field paths that every tar file must have. -// header is padded to 512 bytes. -var f = 0 - , fields = {} - , path = fields.path = f++ - , mode = fields.mode = f++ - , uid = fields.uid = f++ - , gid = fields.gid = f++ - , size = fields.size = f++ - , mtime = fields.mtime = f++ - , cksum = fields.cksum = f++ - , type = fields.type = f++ - , linkpath = fields.linkpath = f++ - , headerSize = 512 - , blockSize = 512 - , fieldSize = [] - -fieldSize[path] = 100 -fieldSize[mode] = 8 -fieldSize[uid] = 8 -fieldSize[gid] = 8 -fieldSize[size] = 12 -fieldSize[mtime] = 12 -fieldSize[cksum] = 8 -fieldSize[type] = 1 -fieldSize[linkpath] = 100 - -// "ustar\0" may introduce another bunch of headers. -// these are optional, and will be nulled out if not present. - -var ustar = fields.ustar = f++ - , ustarver = fields.ustarver = f++ - , uname = fields.uname = f++ - , gname = fields.gname = f++ - , devmaj = fields.devmaj = f++ - , devmin = fields.devmin = f++ - , prefix = fields.prefix = f++ - , fill = fields.fill = f++ - -// terminate fields. -fields[f] = null - -fieldSize[ustar] = 6 -fieldSize[ustarver] = 2 -fieldSize[uname] = 32 -fieldSize[gname] = 32 -fieldSize[devmaj] = 8 -fieldSize[devmin] = 8 -fieldSize[prefix] = 155 -fieldSize[fill] = 12 - -// nb: prefix field may in fact be 130 bytes of prefix, -// a null char, 12 bytes for atime, 12 bytes for ctime. -// -// To recognize this format: -// 1. prefix[130] === ' ' or '\0' -// 2. atime and ctime are octal numeric values -// 3. atime and ctime have ' ' in their last byte - -var fieldEnds = {} - , fieldOffs = {} - , fe = 0 -for (var i = 0; i < f; i ++) { - fieldOffs[i] = fe - fieldEnds[i] = (fe += fieldSize[i]) -} - -// build a translation table of field paths. -Object.keys(fields).forEach(function (f) { - if (fields[f] !== null) fields[fields[f]] = f -}) - -// different values of the 'type' field -// paths match the values of Stats.isX() functions, where appropriate -var types = - { 0: "File" - , "\0": "OldFile" // like 0 - , "": "OldFile" - , 1: "Link" - , 2: "SymbolicLink" - , 3: "CharacterDevice" - , 4: "BlockDevice" - , 5: "Directory" - , 6: "FIFO" - , 7: "ContiguousFile" // like 0 - // posix headers - , g: "GlobalExtendedHeader" // k=v for the rest of the archive - , x: "ExtendedHeader" // k=v for the next file - // vendor-specific stuff - , A: "SolarisACL" // skip - , D: "GNUDumpDir" // like 5, but with data, which should be skipped - , I: "Inode" // metadata only, skip - , K: "NextFileHasLongLinkpath" // data = link path of next file - , L: "NextFileHasLongPath" // data = path of next file - , M: "ContinuationFile" // skip - , N: "OldGnuLongPath" // like L - , S: "SparseFile" // skip - , V: "TapeVolumeHeader" // skip - , X: "OldExtendedHeader" // like x - } - -Object.keys(types).forEach(function (t) { - types[types[t]] = types[types[t]] || t -}) - -// values for the mode field -var modes = - { suid: 04000 // set uid on extraction - , sgid: 02000 // set gid on extraction - , svtx: 01000 // set restricted deletion flag on dirs on extraction - , uread: 0400 - , uwrite: 0200 - , uexec: 0100 - , gread: 040 - , gwrite: 020 - , gexec: 010 - , oread: 4 - , owrite: 2 - , oexec: 1 - , all: 07777 - } - -var numeric = - { mode: true - , uid: true - , gid: true - , size: true - , mtime: true - , devmaj: true - , devmin: true - , cksum: true - , atime: true - , ctime: true - , dev: true - , ino: true - , nlink: true - } - -Object.keys(modes).forEach(function (t) { - modes[modes[t]] = modes[modes[t]] || t -}) - -var knownExtended = - { atime: true - , charset: true - , comment: true - , ctime: true - , gid: true - , gname: true - , linkpath: true - , mtime: true - , path: true - , realtime: true - , security: true - , size: true - , uid: true - , uname: true } - - -exports.fields = fields -exports.fieldSize = fieldSize -exports.fieldOffs = fieldOffs -exports.fieldEnds = fieldEnds -exports.types = types -exports.modes = modes -exports.numeric = numeric -exports.headerSize = headerSize -exports.blockSize = blockSize -exports.knownExtended = knownExtended - -exports.Pack = require("./lib/pack.js") -exports.Parse = require("./lib/parse.js") -exports.Extract = require("./lib/extract.js") diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/00-setup-fixtures.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/00-setup-fixtures.js deleted file mode 100644 index 1524ff7af05700..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/00-setup-fixtures.js +++ /dev/null @@ -1,53 +0,0 @@ -// the fixtures have some weird stuff that is painful -// to include directly in the repo for various reasons. -// -// So, unpack the fixtures with the system tar first. -// -// This means, of course, that it'll only work if you -// already have a tar implementation, and some of them -// will not properly unpack the fixtures anyway. -// -// But, since usually those tests will fail on Windows -// and other systems with less capable filesystems anyway, -// at least this way we don't cause inconveniences by -// merely cloning the repo or installing the package. - -var tap = require("tap") -, child_process = require("child_process") -, rimraf = require("rimraf") -, test = tap.test -, path = require("path") - -test("clean fixtures", function (t) { - rimraf(path.resolve(__dirname, "fixtures"), function (er) { - t.ifError(er, "rimraf ./fixtures/") - t.end() - }) -}) - -test("clean tmp", function (t) { - rimraf(path.resolve(__dirname, "tmp"), function (er) { - t.ifError(er, "rimraf ./tmp/") - t.end() - }) -}) - -test("extract fixtures", function (t) { - var c = child_process.spawn("tar" - ,["xzvf", "fixtures.tgz"] - ,{ cwd: __dirname }) - - c.stdout.on("data", errwrite) - c.stderr.on("data", errwrite) - function errwrite (chunk) { - process.stderr.write(chunk) - } - - c.on("exit", function (code) { - t.equal(code, 0, "extract fixtures should exit with 0") - if (code) { - t.comment("Note, all tests from here on out will fail because of this.") - } - t.end() - }) -}) diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/cb-never-called-1.0.1.tgz b/deps/npm/node_modules/node-gyp/node_modules/tar/test/cb-never-called-1.0.1.tgz deleted file mode 100644 index 9e7014d85abe48a54cb6b4e1ec032df9a2073034..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4096 zcmV+b5dZHViwFP!000001MOI6Sd-h91_Y5NO{$a-kt&eT2}P;Wl@<^X2_bX>Bta4B zh*T+|m(YrHJ$@AVon$2K1bnGjnI=&)j>@+~+y(pY`qa?su)7oxJON zp18u`jxbwz}afxwcd{NMW^{~g@X7#QmGDF4?wzdj4#-{Zds9+3k8KqSl=0fYd6a4R7s;ywZ; z1cx~}A*_Md&dAd>+TI0u#)E}H!r)(7YXlmOvUkP&#{5b;!|Z>q?2*<8kJF#huk5dl z=u_gX*=YiUKx59fA>ei{0CS)!3gv==0FW+#GXj8iMZoQC>=D-HKmZR90O4Ve0f2$0 zO7EZ5VD1<@7u0|Bbh3vdkm#Ss*Dz29l6#Z?*;o26h2MNHa(4Bn-`GE-$C>{nCI3hN zONfJh_rHXsn55{b|3y!q{__7n1NUJl!08151prE$InmxD|dP>VO0+d3I@mgOu8WXfCwZ8^$>UsU~^jIY!>k$ z_#csz!CjDO7bk?UlZ!1MP*vAZ{|*Fr4I%6b!`Pkn@cvzUHh2D$7WFsc(>Pp<* zcMDHUmM`*lommz%IhEqIpfC(=?vs+JU}a`0(8(cZ#l?4UNw^kaK7i7>l&;d3kbSUc z5W{Go@P?7%HAZH~5~c3xN(v5b(G($OtjFj=^vA~TMW6C0!h!JPICEtnsZ6Wk>+-4?xyI*FY5P*X7b18* zQ#;)wb!KCta{=d#O`e1}nLA{Bz1-#8=O3ZjB$@bOMLE^qS1N+M{DYsVde<-Ax~PI-9sxr3cjUIH?G_6g(t%feuXw9=AAUxMz3LTVO`c!x z-iK8l+1Ea?1$Wfgc+0XLF6wk8{@~z1deC>fmDu@4>z_50m}cVFp60T@BtE9^ zfLC2p<{wc@E=|>fqTKrK&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wJ;}m$P;M~_q`Ws!oTG@tIASTaFohN0jW(4Wys~dW zv&H&%2xFyaB|l$KkInQmtnQ4u`O#-zba;D>Vp=+{xYhDo1^<}hIhg?y&L$wKx5*C{ zr4WXy0_Fj9J&8~<%+@{Iv0Z*4CAy*GNz-&=oj>&+=tc898+nvWmPMdINsE-cTouy4 zrK^}eind7L7z`S$TTlVooa}3NM2i-<(%k1T#!a(%EAXdr^|qP}<;il0R}=Hj2KoC1 zh^$(!w~U(47zn-L%(^TYAW-!HoVUq_!kOEjr1Q#9Y^;WS*xbU2i}zF3R?hPoDqT2M z^F~d2X;*s_sL%kd;)BWDdAPRxOXp@M_rHu-J&Q;Rs+i|c66vVN-lcvKrVz805jc+O z!f2?HlA-C?r?f5BwAZHUjm4-Eld?r|f~HYf>-`IYq4Uo4oTMeT)ZwV8sl#gA_q{Tz znWptaRUdk8Q?>g;VAAoh4TtOif7Nyp4(E%<#;@gbrTlQR`GRJ!F2!+j$9a|u>aS%8 zkNlwTdaGySDF-|K<}yunncD&gsvRKudg_NN+cm@R>WQpYsvyRGeRvo}&)Y$ZS2TTV z!?DaM#u?#pYqR<(OWy0Pt-|^RR?9I;uO5NIZrtvT&4dsS%kPtw}<6))- yt=kRJt4#0W>hFnshu(4QecAmmIH4odAf{v@=5VI8kvw%kgq3P?0(H++;E@y9-yRnL diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/dir-normalization.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/dir-normalization.js deleted file mode 100644 index 9719c42f354001..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/dir-normalization.js +++ /dev/null @@ -1,177 +0,0 @@ -// Set the umask, so that it works the same everywhere. -process.umask(parseInt('22', 8)) - -var fs = require('fs') -var path = require('path') - -var fstream = require('fstream') -var test = require('tap').test - -var tar = require('../tar.js') -var file = path.resolve(__dirname, 'dir-normalization.tar') -var target = path.resolve(__dirname, 'tmp/dir-normalization-test') -var ee = 0 - -var expectEntries = [ - { path: 'fixtures/', - mode: '755', - type: '5', - linkpath: '' - }, - { path: 'fixtures/a/', - mode: '755', - type: '5', - linkpath: '' - }, - { path: 'fixtures/the-chumbler', - mode: '755', - type: '2', - linkpath: path.resolve(target, 'a/b/c/d/the-chumbler'), - }, - { path: 'fixtures/a/b/', - mode: '755', - type: '5', - linkpath: '' - }, - { path: 'fixtures/a/x', - mode: '644', - type: '0', - linkpath: '' - }, - { path: 'fixtures/a/b/c/', - mode: '755', - type: '5', - linkpath: '' - }, - { path: 'fixtures/a/b/c/y', - mode: '755', - type: '2', - linkpath: '../../x', - } -] - -var ef = 0 -var expectFiles = [ - { path: '', - mode: '40755', - type: 'Directory', - depth: 0, - linkpath: undefined - }, - { path: '/fixtures', - mode: '40755', - type: 'Directory', - depth: 1, - linkpath: undefined - }, - { path: '/fixtures/a', - mode: '40755', - type: 'Directory', - depth: 2, - linkpath: undefined - }, - { path: '/fixtures/a/b', - mode: '40755', - type: 'Directory', - depth: 3, - linkpath: undefined - }, - { path: '/fixtures/a/b/c', - mode: '40755', - type: 'Directory', - depth: 4, - linkpath: undefined - }, - { path: '/fixtures/a/b/c/y', - mode: '120755', - type: 'SymbolicLink', - depth: 5, - linkpath: '../../x' - }, - { path: '/fixtures/a/x', - mode: '100644', - type: 'File', - depth: 3, - linkpath: undefined - }, - { path: '/fixtures/the-chumbler', - mode: '120755', - type: 'SymbolicLink', - depth: 2, - linkpath: path.resolve(target, 'a/b/c/d/the-chumbler') - } -] - -test('preclean', function (t) { - require('rimraf').sync(path.join(__dirname, '/tmp/dir-normalization-test')) - t.pass('cleaned!') - t.end() -}) - -test('extract test', function (t) { - var extract = tar.Extract(target) - var inp = fs.createReadStream(file) - - inp.pipe(extract) - - extract.on('end', function () { - t.equal(ee, expectEntries.length, 'should see ' + expectEntries.length + ' entries') - - // should get no more entries after end - extract.removeAllListeners('entry') - extract.on('entry', function (e) { - t.fail('Should not get entries after end!') - }) - - next() - }) - - extract.on('entry', function (entry) { - var mode = entry.props.mode & (~parseInt('22', 8)) - var found = { - path: entry.path, - mode: mode.toString(8), - type: entry.props.type, - linkpath: entry.props.linkpath, - } - - var wanted = expectEntries[ee++] - t.equivalent(found, wanted, 'tar entry ' + ee + ' ' + (wanted && wanted.path)) - }) - - function next () { - var r = fstream.Reader({ - path: target, - type: 'Directory', - sort: 'alpha' - }) - - r.on('ready', function () { - foundEntry(r) - }) - - r.on('end', finish) - - function foundEntry (entry) { - var p = entry.path.substr(target.length) - var mode = entry.props.mode & (~parseInt('22', 8)) - var found = { - path: p, - mode: mode.toString(8), - type: entry.props.type, - depth: entry.props.depth, - linkpath: entry.props.linkpath - } - - var wanted = expectFiles[ef++] - t.equivalent(found, wanted, 'unpacked file ' + ef + ' ' + (wanted && wanted.path)) - - entry.on('entry', foundEntry) - } - - function finish () { - t.equal(ef, expectFiles.length, 'should have ' + ef + ' items') - t.end() - } - } -}) diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/dir-normalization.tar b/deps/npm/node_modules/node-gyp/node_modules/tar/test/dir-normalization.tar deleted file mode 100644 index 3c4845356cecb20939b415830a5fa9717fb91341..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4608 zcmeHJS&qUm4DC^J0f_Cy&3Qtn6-dKR7m2w&PN6j7t4Me>Xkt~0n?~MVp55+r8K=G- zY^5gv5SUE`972tqikXFmnFvea&It?*4!@B>h$+50` z-pt$IGqpQZU1J+8}SF0 zCIB7{5IUmDkd5|W8~bGygDd>M_5W1rH{-sT+lc?%|G~}t525gXDWB^4;D59iEk}ZX z?bE#9F#qrUKRCf3v;xZQ7XGjNZ*)4qOZ=A~MLp$ne2HwSHsX(c~XH?({YrM8z diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/error-on-broken.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/error-on-broken.js deleted file mode 100644 index e484920fd9625a..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/error-on-broken.js +++ /dev/null @@ -1,33 +0,0 @@ -var fs = require('fs') -var path = require('path') -var zlib = require('zlib') - -var tap = require('tap') - -var tar = require('../tar.js') - -var file = path.join(__dirname, 'cb-never-called-1.0.1.tgz') -var target = path.join(__dirname, 'tmp/extract-test') - -tap.test('preclean', function (t) { - require('rimraf').sync(__dirname + '/tmp/extract-test') - t.pass('cleaned!') - t.end() -}) - -tap.test('extract test', function (t) { - var extract = tar.Extract(target) - var inp = fs.createReadStream(file) - - inp.pipe(zlib.createGunzip()).pipe(extract) - - extract.on('error', function (er) { - t.equal(er.message, 'unexpected eof', 'error noticed') - t.end() - }) - - extract.on('end', function () { - t.fail('shouldn\'t reach this point due to errors') - t.end() - }) -}) diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract-move.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract-move.js deleted file mode 100644 index 45400cd9bb818d..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract-move.js +++ /dev/null @@ -1,132 +0,0 @@ -// Set the umask, so that it works the same everywhere. -process.umask(parseInt('22', 8)) - -var tap = require("tap") - , tar = require("../tar.js") - , fs = require("fs") - , gfs = require("graceful-fs") - , path = require("path") - , file = path.resolve(__dirname, "fixtures/dir.tar") - , target = path.resolve(__dirname, "tmp/extract-test") - , index = 0 - , fstream = require("fstream") - , rimraf = require("rimraf") - , mkdirp = require("mkdirp") - - , ee = 0 - , expectEntries = [ - { - "path" : "dir/", - "mode" : "750", - "type" : "5", - "depth" : undefined, - "size" : 0, - "linkpath" : "", - "nlink" : undefined, - "dev" : undefined, - "ino" : undefined - }, - { - "path" : "dir/sub/", - "mode" : "750", - "type" : "5", - "depth" : undefined, - "size" : 0, - "linkpath" : "", - "nlink" : undefined, - "dev" : undefined, - "ino" : undefined - } ] - -function slow (fs, method, t1, t2) { - var orig = fs[method] - if (!orig) return null - fs[method] = function () { - var args = [].slice.call(arguments) - console.error("slow", method, args[0]) - var cb = args.pop() - - setTimeout(function () { - orig.apply(fs, args.concat(function(er, data) { - setTimeout(function() { - cb(er, data) - }, t2) - })) - }, t1) - } -} - -// Make sure we get the graceful-fs that fstream is using. -var gfs2 -try { - gfs2 = require("fstream/node_modules/graceful-fs") -} catch (er) {} - -var slowMethods = ["chown", "chmod", "utimes", "lutimes"] -slowMethods.forEach(function (method) { - var t1 = 500 - var t2 = 0 - slow(fs, method, t1, t2) - slow(gfs, method, t1, t2) - if (gfs2) { - slow(gfs2, method, t1, t2) - } -}) - - - -// The extract class basically just pipes the input -// to a Reader, and then to a fstream.DirWriter - -// So, this is as much a test of fstream.Reader and fstream.Writer -// as it is of tar.Extract, but it sort of makes sense. - -tap.test("preclean", function (t) { - rimraf.sync(target) - /mkdirp.sync(target) - t.pass("cleaned!") - t.end() -}) - -tap.test("extract test", function (t) { - var extract = tar.Extract(target) - var inp = fs.createReadStream(file) - - // give it a weird buffer size to try to break in odd places - inp.bufferSize = 1234 - - inp.pipe(extract) - - extract.on("end", function () { - rimraf.sync(target) - - t.equal(ee, expectEntries.length, "should see "+ee+" entries") - - // should get no more entries after end - extract.removeAllListeners("entry") - extract.on("entry", function (e) { - t.fail("Should not get entries after end!") - }) - - t.end() - }) - - - extract.on("entry", function (entry) { - var found = - { path: entry.path - , mode: entry.props.mode.toString(8) - , type: entry.props.type - , depth: entry.props.depth - , size: entry.props.size - , linkpath: entry.props.linkpath - , nlink: entry.props.nlink - , dev: entry.props.dev - , ino: entry.props.ino - } - - var wanted = expectEntries[ee ++] - - t.equivalent(found, wanted, "tar entry " + ee + " " + wanted.path) - }) -}) diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract.js deleted file mode 100644 index eca4e7cc962db6..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract.js +++ /dev/null @@ -1,367 +0,0 @@ -// Set the umask, so that it works the same everywhere. -process.umask(parseInt('22', 8)) - -var tap = require("tap") - , tar = require("../tar.js") - , fs = require("fs") - , path = require("path") - , file = path.resolve(__dirname, "fixtures/c.tar") - , target = path.resolve(__dirname, "tmp/extract-test") - , index = 0 - , fstream = require("fstream") - - , ee = 0 - , expectEntries = -[ { path: 'c.txt', - mode: '644', - type: '0', - depth: undefined, - size: 513, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'cc.txt', - mode: '644', - type: '0', - depth: undefined, - size: 513, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '0', - depth: undefined, - size: 100, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'Ω.txt', - mode: '644', - type: '0', - depth: undefined, - size: 2, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'Ω.txt', - mode: '644', - type: '0', - depth: undefined, - size: 2, - linkpath: '', - nlink: 1, - dev: 234881026, - ino: 51693379 }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '0', - depth: undefined, - size: 200, - linkpath: '', - nlink: 1, - dev: 234881026, - ino: 51681874 }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '0', - depth: undefined, - size: 201, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', - mode: '777', - type: '2', - depth: undefined, - size: 0, - linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: '200-hard', - mode: '644', - type: '0', - depth: undefined, - size: 200, - linkpath: '', - nlink: 2, - dev: 234881026, - ino: 51681874 }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '1', - depth: undefined, - size: 0, - linkpath: path.resolve(target, '200-hard'), - nlink: 2, - dev: 234881026, - ino: 51681874 } ] - - , ef = 0 - , expectFiles = -[ { path: '', - mode: '40755', - type: 'Directory', - depth: 0, - linkpath: undefined }, - { path: '/200-hard', - mode: '100644', - type: 'File', - depth: 1, - size: 200, - linkpath: undefined, - nlink: 2 }, - { path: '/200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', - mode: '120777', - type: 'SymbolicLink', - depth: 1, - size: 200, - linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - nlink: 1 }, - { path: '/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '100644', - type: 'Link', - depth: 1, - size: 200, - linkpath: path.join(target, '200-hard'), - nlink: 2 }, - { path: '/c.txt', - mode: '100644', - type: 'File', - depth: 1, - size: 513, - linkpath: undefined, - nlink: 1 }, - { path: '/cc.txt', - mode: '100644', - type: 'File', - depth: 1, - size: 513, - linkpath: undefined, - nlink: 1 }, - { path: '/r', - mode: '40755', - type: 'Directory', - depth: 1, - linkpath: undefined }, - { path: '/r/e', - mode: '40755', - type: 'Directory', - depth: 2, - linkpath: undefined }, - { path: '/r/e/a', - mode: '40755', - type: 'Directory', - depth: 3, - linkpath: undefined }, - { path: '/r/e/a/l', - mode: '40755', - type: 'Directory', - depth: 4, - linkpath: undefined }, - { path: '/r/e/a/l/l', - mode: '40755', - type: 'Directory', - depth: 5, - linkpath: undefined }, - { path: '/r/e/a/l/l/y', - mode: '40755', - type: 'Directory', - depth: 6, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-', - mode: '40755', - type: 'Directory', - depth: 7, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d', - mode: '40755', - type: 'Directory', - depth: 8, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e', - mode: '40755', - type: 'Directory', - depth: 9, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e', - mode: '40755', - type: 'Directory', - depth: 10, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p', - mode: '40755', - type: 'Directory', - depth: 11, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-', - mode: '40755', - type: 'Directory', - depth: 12, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f', - mode: '40755', - type: 'Directory', - depth: 13, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o', - mode: '40755', - type: 'Directory', - depth: 14, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l', - mode: '40755', - type: 'Directory', - depth: 15, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d', - mode: '40755', - type: 'Directory', - depth: 16, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e', - mode: '40755', - type: 'Directory', - depth: 17, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r', - mode: '40755', - type: 'Directory', - depth: 18, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-', - mode: '40755', - type: 'Directory', - depth: 19, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p', - mode: '40755', - type: 'Directory', - depth: 20, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a', - mode: '40755', - type: 'Directory', - depth: 21, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t', - mode: '40755', - type: 'Directory', - depth: 22, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h', - mode: '40755', - type: 'Directory', - depth: 23, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '100644', - type: 'File', - depth: 24, - size: 100, - linkpath: undefined, - nlink: 1 }, - { path: '/Ω.txt', - mode: '100644', - type: 'File', - depth: 1, - size: 2, - linkpath: undefined, - nlink: 1 } ] - - - -// The extract class basically just pipes the input -// to a Reader, and then to a fstream.DirWriter - -// So, this is as much a test of fstream.Reader and fstream.Writer -// as it is of tar.Extract, but it sort of makes sense. - -tap.test("preclean", function (t) { - require("rimraf").sync(__dirname + "/tmp/extract-test") - t.pass("cleaned!") - t.end() -}) - -tap.test("extract test", function (t) { - var extract = tar.Extract(target) - var inp = fs.createReadStream(file) - - // give it a weird buffer size to try to break in odd places - inp.bufferSize = 1234 - - inp.pipe(extract) - - extract.on("end", function () { - t.equal(ee, expectEntries.length, "should see "+ee+" entries") - - // should get no more entries after end - extract.removeAllListeners("entry") - extract.on("entry", function (e) { - t.fail("Should not get entries after end!") - }) - - next() - }) - - extract.on("entry", function (entry) { - var found = - { path: entry.path - , mode: entry.props.mode.toString(8) - , type: entry.props.type - , depth: entry.props.depth - , size: entry.props.size - , linkpath: entry.props.linkpath - , nlink: entry.props.nlink - , dev: entry.props.dev - , ino: entry.props.ino - } - - var wanted = expectEntries[ee ++] - - t.equivalent(found, wanted, "tar entry " + ee + " " + wanted.path) - }) - - function next () { - var r = fstream.Reader({ path: target - , type: "Directory" - // this is just to encourage consistency - , sort: "alpha" }) - - r.on("ready", function () { - foundEntry(r) - }) - - r.on("end", finish) - - function foundEntry (entry) { - var p = entry.path.substr(target.length) - var found = - { path: p - , mode: entry.props.mode.toString(8) - , type: entry.props.type - , depth: entry.props.depth - , size: entry.props.size - , linkpath: entry.props.linkpath - , nlink: entry.props.nlink - } - - var wanted = expectFiles[ef ++] - - t.has(found, wanted, "unpacked file " + ef + " " + wanted.path) - - entry.on("entry", foundEntry) - } - - function finish () { - t.equal(ef, expectFiles.length, "should have "+ef+" items") - t.end() - } - } -}) diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/fixtures.tgz b/deps/npm/node_modules/node-gyp/node_modules/tar/test/fixtures.tgz deleted file mode 100644 index f1676023afa2bba2aa18b5508c92f03e1d0816c6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19352 zcmdS9Wm8?>6E%oKa0>)?hoHgXLLj)iOK^9Wixb@4-2;JO!GpWILvVM$XZZb}7gIGe zUtnIH+O<#h+1^?)mpt7>+4-uRLlz3qxI~Dff#Gk#6 z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z<~n?4jede;J|?c2M!!Kc-Zj&1MZ2imH?Oo0D?ENMF0Q* diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/header.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/header.js deleted file mode 100644 index 8ea6f79500de73..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/header.js +++ /dev/null @@ -1,183 +0,0 @@ -var tap = require("tap") -var TarHeader = require("../lib/header.js") -var tar = require("../tar.js") -var fs = require("fs") - - -var headers = - { "a.txt file header": - [ "612e747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303430312031313635313336303333332030313234353100203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'a.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 257 - , mtime: 1319493851 - , cksum: 5417 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - - , "omega pax": // the extended header from omega tar. - [ "5061784865616465722fcea92e74787400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303137302031313534333731303631312030313530353100207800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'PaxHeader/Ω.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 120 - , mtime: 1301254537 - , cksum: 6697 - , type: 'x' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } ] - - , "omega file header": - [ "cea92e7478740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303030322031313534333731303631312030313330373200203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'Ω.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 2 - , mtime: 1301254537 - , cksum: 5690 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } ] - - , "foo.js file header": - [ "666f6f2e6a730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303030342031313534333637303734312030313236313700203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'foo.js' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 4 - , mtime: 1301246433 - , cksum: 5519 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - - , "b.txt file header": - [ "622e747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030313030302031313635313336303637372030313234363100203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'b.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 512 - , mtime: 1319494079 - , cksum: 5425 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - - , "deep nested file": - [ "636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363633030303634342000303537373631200030303030323420003030303030303030313434203131363532313531353333203034333331340020300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000075737461720030306973616163730000000000000000000000000000000000000000000000000000737461666600000000000000000000000000000000000000000000000000000030303030303020003030303030302000722f652f612f6c2f6c2f792f2d2f642f652f652f702f2d2f662f6f2f6c2f642f652f722f2d2f702f612f742f680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true, - path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 100 - , mtime: 1319687003 - , cksum: 18124 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - } - -tap.test("parsing", function (t) { - Object.keys(headers).forEach(function (name) { - var h = headers[name] - , header = new Buffer(h[0], "hex") - , expect = h[1] - , parsed = new TarHeader(header) - - // console.error(parsed) - t.has(parsed, expect, "parse " + name) - }) - t.end() -}) - -tap.test("encoding", function (t) { - Object.keys(headers).forEach(function (name) { - var h = headers[name] - , expect = new Buffer(h[0], "hex") - , encoded = TarHeader.encode(h[1]) - - // might have slightly different bytes, since the standard - // isn't very strict, but should have the same semantics - // checkSum will be different, but cksumValid will be true - - var th = new TarHeader(encoded) - delete h[1].block - delete h[1].needExtended - delete h[1].cksum - t.has(th, h[1], "fields "+name) - }) - t.end() -}) - -// test these manually. they're a bit rare to find in the wild -tap.test("parseNumeric tests", function (t) { - var parseNumeric = TarHeader.parseNumeric - , numbers = - { "303737373737373700": 2097151 - , "30373737373737373737373700": 8589934591 - , "303030303036343400": 420 - , "800000ffffffffffff": 281474976710655 - , "ffffff000000000001": -281474976710654 - , "ffffff000000000000": -281474976710655 - , "800000000000200000": 2097152 - , "8000000000001544c5": 1393861 - , "ffffffffffff1544c5": -15383354 } - Object.keys(numbers).forEach(function (n) { - var b = new Buffer(n, "hex") - t.equal(parseNumeric(b), numbers[n], n + " === " + numbers[n]) - }) - t.end() -}) diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack-no-proprietary.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack-no-proprietary.js deleted file mode 100644 index d4b03a1fe936be..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack-no-proprietary.js +++ /dev/null @@ -1,886 +0,0 @@ -// This is exactly like test/pack.js, except that it's excluding -// any proprietary headers. -// -// This loses some information about the filesystem, but creates -// tarballs that are supported by more versions of tar, especially -// old non-spec-compliant copies of gnutar. - -// the symlink file is excluded from git, because it makes -// windows freak the hell out. -var fs = require("fs") - , path = require("path") - , symlink = path.resolve(__dirname, "fixtures/symlink") -try { fs.unlinkSync(symlink) } catch (e) {} -fs.symlinkSync("./hardlink-1", symlink) -process.on("exit", function () { - fs.unlinkSync(symlink) -}) - -var tap = require("tap") - , tar = require("../tar.js") - , pkg = require("../package.json") - , Pack = tar.Pack - , fstream = require("fstream") - , Reader = fstream.Reader - , Writer = fstream.Writer - , input = path.resolve(__dirname, "fixtures/") - , target = path.resolve(__dirname, "tmp/pack.tar") - , uid = process.getuid ? process.getuid() : 0 - , gid = process.getgid ? process.getgid() : 0 - - , entries = - - // the global header and root fixtures/ dir are going to get - // a different date each time, so omit that bit. - // Also, dev/ino values differ across machines, so that's not - // included. - [ [ 'entry', - { path: 'fixtures/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/200cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - uid: uid, - gid: gid, - size: 200 } ] - - , [ 'entry', - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 200, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/a.txt', - mode: 420, - uid: uid, - gid: gid, - size: 257, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/b.txt', - mode: 420, - uid: uid, - gid: gid, - size: 512, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/c.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/cc.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/dir/', - mode: 488, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/dir/sub/', - mode: 488, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/foo.js', - mode: 420, - uid: uid, - gid: gid, - size: 4, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-1', - mode: 420, - uid: uid, - gid: gid, - size: 200, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-2', - mode: 420, - uid: uid, - gid: gid, - size: 0, - type: '1', - linkpath: 'fixtures/hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/star.4.html', - mode: 420, - uid: uid, - gid: gid, - size: 54081, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/packtest/Ω.txt', - uid: uid, - gid: gid, - size: 2 } ] - - , [ 'entry', - { path: 'fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 100, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/symlink', - uid: uid, - gid: gid, - size: 0, - type: '2', - linkpath: 'hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: "fixtures/Ω.txt" - , uid: uid - , gid: gid - , size: 2 } ] - - , [ 'entry', - { path: 'fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - ] - - -// first, make sure that the hardlinks are actually hardlinks, or this -// won't work. Git has a way of replacing them with a copy. -var hard1 = path.resolve(__dirname, "fixtures/hardlink-1") - , hard2 = path.resolve(__dirname, "fixtures/hardlink-2") - , fs = require("fs") - -try { fs.unlinkSync(hard2) } catch (e) {} -fs.linkSync(hard1, hard2) - -tap.test("with global header", { timeout: 10000 }, function (t) { - runTest(t, true) -}) - -tap.test("without global header", { timeout: 10000 }, function (t) { - runTest(t, false) -}) - -function alphasort (a, b) { - return a === b ? 0 - : a.toLowerCase() > b.toLowerCase() ? 1 - : a.toLowerCase() < b.toLowerCase() ? -1 - : a > b ? 1 - : -1 -} - - -function runTest (t, doGH) { - var reader = Reader({ path: input - , filter: function () { - return !this.path.match(/\.(tar|hex)$/) - } - , sort: alphasort - }) - - var props = doGH ? pkg : {} - props.noProprietary = true - var pack = Pack(props) - var writer = Writer(target) - - // global header should be skipped regardless, since it has no content. - var entry = 0 - - t.ok(reader, "reader ok") - t.ok(pack, "pack ok") - t.ok(writer, "writer ok") - - pack.pipe(writer) - - var parse = tar.Parse() - t.ok(parse, "parser should be ok") - - pack.on("data", function (c) { - // console.error("PACK DATA") - if (c.length !== 512) { - // this one is too noisy, only assert if it'll be relevant - t.equal(c.length, 512, "parser should emit data in 512byte blocks") - } - parse.write(c) - }) - - pack.on("end", function () { - // console.error("PACK END") - t.pass("parser ends") - parse.end() - }) - - pack.on("error", function (er) { - t.fail("pack error", er) - }) - - parse.on("error", function (er) { - t.fail("parse error", er) - }) - - writer.on("error", function (er) { - t.fail("writer error", er) - }) - - reader.on("error", function (er) { - t.fail("reader error", er) - }) - - parse.on("*", function (ev, e) { - var wanted = entries[entry++] - if (!wanted) { - t.fail("unexpected event: "+ev) - return - } - t.equal(ev, wanted[0], "event type should be "+wanted[0]) - - if (ev !== wanted[0] || e.path !== wanted[1].path) { - console.error("wanted", wanted) - console.error([ev, e.props]) - e.on("end", function () { - console.error(e.fields) - throw "break" - }) - } - - t.has(e.props, wanted[1], "properties "+wanted[1].path) - if (wanted[2]) { - e.on("end", function () { - if (!e.fields) { - t.ok(e.fields, "should get fields") - } else { - t.has(e.fields, wanted[2], "should get expected fields") - } - }) - } - }) - - reader.pipe(pack) - - writer.on("close", function () { - t.equal(entry, entries.length, "should get all expected entries") - t.pass("it finished") - t.end() - }) - -} diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack.js deleted file mode 100644 index 0f16c07bb0162e..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack.js +++ /dev/null @@ -1,952 +0,0 @@ - -// the symlink file is excluded from git, because it makes -// windows freak the hell out. -var fs = require("fs") - , path = require("path") - , symlink = path.resolve(__dirname, "fixtures/symlink") -try { fs.unlinkSync(symlink) } catch (e) {} -fs.symlinkSync("./hardlink-1", symlink) -process.on("exit", function () { - fs.unlinkSync(symlink) -}) - - -var tap = require("tap") - , tar = require("../tar.js") - , pkg = require("../package.json") - , Pack = tar.Pack - , fstream = require("fstream") - , Reader = fstream.Reader - , Writer = fstream.Writer - , input = path.resolve(__dirname, "fixtures/") - , target = path.resolve(__dirname, "tmp/pack.tar") - , uid = process.getuid ? process.getuid() : 0 - , gid = process.getgid ? process.getgid() : 0 - - , entries = - - // the global header and root fixtures/ dir are going to get - // a different date each time, so omit that bit. - // Also, dev/ino values differ across machines, so that's not - // included. - [ [ 'globalExtendedHeader', - { path: 'PaxHeader/', - mode: 438, - uid: 0, - gid: 0, - type: 'g', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { "NODETAR.author": pkg.author, - "NODETAR.name": pkg.name, - "NODETAR.description": pkg.description, - "NODETAR.version": pkg.version, - "NODETAR.repository.type": pkg.repository.type, - "NODETAR.repository.url": pkg.repository.url, - "NODETAR.main": pkg.main, - "NODETAR.scripts.test": pkg.scripts.test } ] - - , [ 'entry', - { path: 'fixtures/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/200cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - 'NODETAR.depth': '1', - 'NODETAR.type': 'File', - nlink: 1, - uid: uid, - gid: gid, - size: 200, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 200, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '', - 'NODETAR.depth': '1', - 'NODETAR.type': 'File', - nlink: 1, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/a.txt', - mode: 420, - uid: uid, - gid: gid, - size: 257, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/b.txt', - mode: 420, - uid: uid, - gid: gid, - size: 512, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/c.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/cc.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/dir/', - mode: 488, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/dir/sub/', - mode: 488, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - - , [ 'entry', - { path: 'fixtures/foo.js', - mode: 420, - uid: uid, - gid: gid, - size: 4, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-1', - mode: 420, - uid: uid, - gid: gid, - size: 200, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-2', - mode: 420, - uid: uid, - gid: gid, - size: 0, - type: '1', - linkpath: 'fixtures/hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/star.4.html', - mode: 420, - uid: uid, - gid: gid, - size: 54081, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/packtest/Ω.txt', - 'NODETAR.depth': '2', - 'NODETAR.type': 'File', - nlink: 1, - uid: uid, - gid: gid, - size: 2, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '', - 'NODETAR.depth': '2', - 'NODETAR.type': 'File', - nlink: 1, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 100, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/symlink', - uid: uid, - gid: gid, - size: 0, - type: '2', - linkpath: 'hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: "fixtures/Ω.txt" - , "NODETAR.depth": "1" - , "NODETAR.type": "File" - , nlink: 1 - , uid: uid - , gid: gid - , size: 2 - , "NODETAR.blksize": "4096" - , "NODETAR.blocks": "8" } ] - - , [ 'entry', - { path: 'fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '', - 'NODETAR.depth': '1', - 'NODETAR.type': 'File', - nlink: 1, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - ] - - -// first, make sure that the hardlinks are actually hardlinks, or this -// won't work. Git has a way of replacing them with a copy. -var hard1 = path.resolve(__dirname, "fixtures/hardlink-1") - , hard2 = path.resolve(__dirname, "fixtures/hardlink-2") - , fs = require("fs") - -try { fs.unlinkSync(hard2) } catch (e) {} -fs.linkSync(hard1, hard2) - -tap.test("with global header", { timeout: 10000 }, function (t) { - runTest(t, true) -}) - -tap.test("without global header", { timeout: 10000 }, function (t) { - runTest(t, false) -}) - -tap.test("with from base", { timeout: 10000 }, function (t) { - runTest(t, true, true) -}) - -function alphasort (a, b) { - return a === b ? 0 - : a.toLowerCase() > b.toLowerCase() ? 1 - : a.toLowerCase() < b.toLowerCase() ? -1 - : a > b ? 1 - : -1 -} - - -function runTest (t, doGH, doFromBase) { - var reader = Reader({ path: input - , filter: function () { - return !this.path.match(/\.(tar|hex)$/) - } - , sort: alphasort - }) - - var props = doGH ? pkg : {} - if(doFromBase) props.fromBase = true; - - var pack = Pack(props) - var writer = Writer(target) - - // skip the global header if we're not doing that. - var entry = doGH ? 0 : 1 - - t.ok(reader, "reader ok") - t.ok(pack, "pack ok") - t.ok(writer, "writer ok") - - pack.pipe(writer) - - var parse = tar.Parse() - t.ok(parse, "parser should be ok") - - pack.on("data", function (c) { - // console.error("PACK DATA") - if (c.length !== 512) { - // this one is too noisy, only assert if it'll be relevant - t.equal(c.length, 512, "parser should emit data in 512byte blocks") - } - parse.write(c) - }) - - pack.on("end", function () { - // console.error("PACK END") - t.pass("parser ends") - parse.end() - }) - - pack.on("error", function (er) { - t.fail("pack error", er) - }) - - parse.on("error", function (er) { - t.fail("parse error", er) - }) - - writer.on("error", function (er) { - t.fail("writer error", er) - }) - - reader.on("error", function (er) { - t.fail("reader error", er) - }) - - parse.on("*", function (ev, e) { - var wanted = entries[entry++] - if (!wanted) { - t.fail("unexpected event: "+ev) - return - } - t.equal(ev, wanted[0], "event type should be "+wanted[0]) - - if(doFromBase) { - if(wanted[1].path.indexOf('fixtures/') && wanted[1].path.length == 100) - wanted[1].path = wanted[1].path.replace('fixtures/', '') + 'ccccccccc' - - if(wanted[1]) wanted[1].path = wanted[1].path.replace('fixtures/', '').replace('//', '/') - if(wanted[1].path == '') wanted[1].path = '/' - if(wanted[2] && wanted[2].path) wanted[2].path = wanted[2].path.replace('fixtures', '').replace(/^\//, '') - - wanted[1].linkpath = wanted[1].linkpath.replace('fixtures/', '') - } - - if (ev !== wanted[0] || e.path !== wanted[1].path) { - console.error("wanted", wanted) - console.error([ev, e.props]) - e.on("end", function () { - console.error(e.fields) - throw "break" - }) - } - - - t.has(e.props, wanted[1], "properties "+wanted[1].path) - if (wanted[2]) { - e.on("end", function () { - if (!e.fields) { - t.ok(e.fields, "should get fields") - } else { - t.has(e.fields, wanted[2], "should get expected fields") - } - }) - } - }) - - reader.pipe(pack) - - writer.on("close", function () { - t.equal(entry, entries.length, "should get all expected entries") - t.pass("it finished") - t.end() - }) - -} diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/parse-discard.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/parse-discard.js deleted file mode 100644 index 79408c274b96e9..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/parse-discard.js +++ /dev/null @@ -1,29 +0,0 @@ -var tap = require("tap") - , tar = require("../tar.js") - , fs = require("fs") - , path = require("path") - , file = path.resolve(__dirname, "fixtures/c.tar") - -tap.test("parser test", function (t) { - var parser = tar.Parse() - var total = 0 - var dataTotal = 0 - - parser.on("end", function () { - - t.equals(total-513,dataTotal,'should have discarded only c.txt') - - t.end() - }) - - fs.createReadStream(file) - .pipe(parser) - .on('entry',function(entry){ - if(entry.path === 'c.txt') entry.abort() - - total += entry.size; - entry.on('data',function(data){ - dataTotal += data.length - }) - }) -}) diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/parse.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/parse.js deleted file mode 100644 index f765a50129bff1..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/parse.js +++ /dev/null @@ -1,359 +0,0 @@ -var tap = require("tap") - , tar = require("../tar.js") - , fs = require("fs") - , path = require("path") - , file = path.resolve(__dirname, "fixtures/c.tar") - , index = 0 - - , expect = -[ [ 'entry', - { path: 'c.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 513, - mtime: new Date('Wed, 26 Oct 2011 01:10:58 GMT'), - cksum: 5422, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'entry', - { path: 'cc.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 513, - mtime: new Date('Wed, 26 Oct 2011 01:11:02 GMT'), - cksum: 5525, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'entry', - { path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 100, - mtime: new Date('Thu, 27 Oct 2011 03:43:23 GMT'), - cksum: 18124, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'entry', - { path: 'Ω.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 2, - mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - cksum: 5695, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/Ω.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 120, - mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - cksum: 6702, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'Ω.txt', - ctime: 1319737909, - atime: 1319739061, - dev: 234881026, - ino: 51693379, - nlink: 1 } ], - [ 'entry', - { path: 'Ω.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 2, - mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - cksum: 5695, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - atime: new Date('Thu, 27 Oct 2011 18:11:01 GMT'), - dev: 234881026, - ino: 51693379, - nlink: 1 }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 353, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 14488, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - ctime: 1319686868, - atime: 1319741254, - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 1 } ], - [ 'entry', - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 200, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 14570, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - atime: new Date('Thu, 27 Oct 2011 18:47:34 GMT'), - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 1 }, - undefined ], - [ 'longPath', - { path: '././@LongLink', - mode: 0, - uid: 0, - gid: 0, - size: 201, - mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), - cksum: 4976, - type: 'L', - linkpath: '', - ustar: false }, - '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ], - [ 'entry', - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 1000, - gid: 1000, - size: 201, - mtime: new Date('Thu, 27 Oct 2011 22:21:50 GMT'), - cksum: 14086, - type: '0', - linkpath: '', - ustar: false }, - undefined ], - [ 'longLinkpath', - { path: '././@LongLink', - mode: 0, - uid: 0, - gid: 0, - size: 201, - mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), - cksum: 4975, - type: 'K', - linkpath: '', - ustar: false }, - '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ], - [ 'longPath', - { path: '././@LongLink', - mode: 0, - uid: 0, - gid: 0, - size: 201, - mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), - cksum: 4976, - type: 'L', - linkpath: '', - ustar: false }, - '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL' ], - [ 'entry', - { path: '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', - mode: 511, - uid: 1000, - gid: 1000, - size: 0, - mtime: new Date('Fri, 28 Oct 2011 23:05:17 GMT'), - cksum: 21603, - type: '2', - linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - ustar: false }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/200-hard', - mode: 420, - uid: 24561, - gid: 20, - size: 143, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 6533, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { ctime: 1320617144, - atime: 1320617232, - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 } ], - [ 'entry', - { path: '200-hard', - mode: 420, - uid: 24561, - gid: 20, - size: 200, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 5526, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Sun, 06 Nov 2011 22:05:44 GMT'), - atime: new Date('Sun, 06 Nov 2011 22:07:12 GMT'), - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 353, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 14488, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - ctime: 1320617144, - atime: 1320617406, - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 } ], - [ 'entry', - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 15173, - type: '1', - linkpath: '200-hard', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Sun, 06 Nov 2011 22:05:44 GMT'), - atime: new Date('Sun, 06 Nov 2011 22:10:06 GMT'), - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 }, - undefined ] ] - - -tap.test("parser test", function (t) { - var parser = tar.Parse() - - parser.on("end", function () { - t.equal(index, expect.length, "saw all expected events") - t.end() - }) - - fs.createReadStream(file) - .pipe(parser) - .on("*", function (ev, entry) { - var wanted = expect[index] - if (!wanted) { - return t.fail("Unexpected event: " + ev) - } - var result = [ev, entry.props] - entry.on("end", function () { - result.push(entry.fields || entry.body) - - t.equal(ev, wanted[0], index + " event type") - t.equivalent(entry.props, wanted[1], wanted[1].path + " entry properties") - if (wanted[2]) { - t.equivalent(result[2], wanted[2], "metadata values") - } - index ++ - }) - }) -}) diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/zz-cleanup.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/zz-cleanup.js deleted file mode 100644 index a00ff7faa03906..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/zz-cleanup.js +++ /dev/null @@ -1,20 +0,0 @@ -// clean up the fixtures - -var tap = require("tap") -, rimraf = require("rimraf") -, test = tap.test -, path = require("path") - -test("clean fixtures", function (t) { - rimraf(path.resolve(__dirname, "fixtures"), function (er) { - t.ifError(er, "rimraf ./fixtures/") - t.end() - }) -}) - -test("clean tmp", function (t) { - rimraf(path.resolve(__dirname, "tmp"), function (er) { - t.ifError(er, "rimraf ./tmp/") - t.end() - }) -}) diff --git a/deps/npm/node_modules/node-gyp/package.json b/deps/npm/node_modules/node-gyp/package.json index df3a5dfb5e74ec..bffb3c774b4b6e 100644 --- a/deps/npm/node_modules/node-gyp/package.json +++ b/deps/npm/node_modules/node-gyp/package.json @@ -1,33 +1,30 @@ { - "_from": "node-gyp@3", - "_id": "node-gyp@3.8.0", + "_from": "node-gyp@5.0.3", + "_id": "node-gyp@5.0.3", "_inBundle": false, - "_integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==", + "_integrity": "sha512-z/JdtkFGUm0QaQUusvloyYuGDub3nUbOo5de1Fz57cM++osBTvQatBUSTlF1k/w8vFHPxxXW6zxGvkxXSpaBkQ==", "_location": "/node-gyp", "_phantomChildren": { - "abbrev": "1.1.1", - "block-stream": "0.0.9", - "fstream": "1.0.12", - "inherits": "2.0.3" + "abbrev": "1.1.1" }, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "node-gyp@3", + "raw": "node-gyp@5.0.3", "name": "node-gyp", "escapedName": "node-gyp", - "rawSpec": "3", + "rawSpec": "5.0.3", "saveSpec": null, - "fetchSpec": "3" + "fetchSpec": "5.0.3" }, "_requiredBy": [ "#USER", "/", "/npm-lifecycle" ], - "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz", - "_shasum": "540304261c330e80d0d5edce253a68cb3964218c", - "_spec": "node-gyp@3", + "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-5.0.3.tgz", + "_shasum": "80d64c23790244991b6d44532f0a351bedd3dd45", + "_spec": "node-gyp@5.0.3", "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Nathan Rajlich", @@ -42,17 +39,16 @@ }, "bundleDependencies": false, "dependencies": { - "fstream": "^1.0.0", + "env-paths": "^1.0.0", "glob": "^7.0.3", "graceful-fs": "^4.1.2", "mkdirp": "^0.5.0", "nopt": "2 || 3", "npmlog": "0 || 1 || 2 || 3 || 4", - "osenv": "0", "request": "^2.87.0", "rimraf": "2", "semver": "~5.3.0", - "tar": "^2.0.0", + "tar": "^4.4.8", "which": "1" }, "deprecated": false, @@ -61,10 +57,11 @@ "bindings": "~1.2.1", "nan": "^2.0.0", "require-inject": "~1.3.0", - "tape": "~4.2.0" + "standard": "~12.0.1", + "tap": "~12.7.0" }, "engines": { - "node": ">= 0.8.0" + "node": ">= 6.0.0" }, "homepage": "https://github.com/nodejs/node-gyp#readme", "installVersion": 9, @@ -86,7 +83,8 @@ "url": "git://github.com/nodejs/node-gyp.git" }, "scripts": { - "test": "tape test/test-*" + "lint": "standard */*.js test/**/*.js", + "test": "npm run lint && tap --timeout=120 test/test-*" }, - "version": "3.8.0" + "version": "5.0.3" } diff --git a/deps/npm/node_modules/node-gyp/src/win_delay_load_hook.cc b/deps/npm/node_modules/node-gyp/src/win_delay_load_hook.cc index e75954b605101a..5e7f14b2b246ca 100644 --- a/deps/npm/node_modules/node-gyp/src/win_delay_load_hook.cc +++ b/deps/npm/node_modules/node-gyp/src/win_delay_load_hook.cc @@ -1,10 +1,10 @@ /* * When this file is linked to a DLL, it sets up a delay-load hook that - * intervenes when the DLL is trying to load 'node.exe' or 'iojs.exe' - * dynamically. Instead of trying to locate the .exe file it'll just return - * a handle to the process image. + * intervenes when the DLL is trying to load the host executable + * dynamically. Instead of trying to locate the .exe file it'll just + * return a handle to the process image. * - * This allows compiled addons to work when node.exe or iojs.exe is renamed. + * This allows compiled addons to work when the host executable is renamed. */ #ifdef _MSC_VER @@ -23,8 +23,7 @@ static FARPROC WINAPI load_exe_hook(unsigned int event, DelayLoadInfo* info) { if (event != dliNotePreLoadLibrary) return NULL; - if (_stricmp(info->szDll, "iojs.exe") != 0 && - _stricmp(info->szDll, "node.exe") != 0) + if (_stricmp(info->szDll, HOST_BINARY) != 0) return NULL; m = GetModuleHandle(NULL); diff --git a/deps/npm/node_modules/node-gyp/test/docker.sh b/deps/npm/node_modules/node-gyp/test/docker.sh index ac21aa8d75c989..67014209d00038 100755 --- a/deps/npm/node_modules/node-gyp/test/docker.sh +++ b/deps/npm/node_modules/node-gyp/test/docker.sh @@ -2,8 +2,7 @@ #set -e -test_node_versions="0.8.28 0.10.40 0.12.7 4.3.0 5.6.0" -test_iojs_versions="1.8.4 2.4.0 3.3.0" +test_node_versions="6.17.0 8.15.1 10.15.3 11.12.0" myuid=$(id -u) mygid=$(id -g) @@ -77,25 +76,6 @@ for v in $test_node_versions; do " done -# An image for each of the io.js versions we want to test with that version installed and the latest npm -for v in $test_iojs_versions; do - setup_container "node-gyp-test/${v}" "node-gyp-test/clones" " - curl -sL https://iojs.org/dist/v${v}/iojs-v${v}-linux-x64.tar.gz | tar -zxv --strip-components=1 -C /usr/ && - npm install npm@latest -g && - node -v && npm -v - " -done - -# Run the tests for all of the test images we've created, -# we should see node-gyp doing its download, configure and run thing -# _NOTE: bignum doesn't compile on 0.8 currently so it'll fail for that version only_ -for v in $test_node_versions $test_iojs_versions; do - run_tests $v " - cd node-buffertools && npm install --loglevel=info && npm test && cd - " - # removed for now, too noisy: cd node-bignum && npm install --loglevel=info && npm test -done - # Test use of --target=x.y.z to compile against alternate versions test_download_node_version() { local run_with_ver="$1" @@ -112,9 +92,7 @@ test_download_node_version() { } test_download_node_version "0.12.7" "0.10.30/src" "0.10.30" -test_download_node_version "3.3.0" "iojs-1.8.4/src" "1.8.4" # should download the headers file -test_download_node_version "3.3.0" "iojs-3.3.0/include/node" "3.3.0" test_download_node_version "4.3.0" "4.3.0/include/node" "4.3.0" test_download_node_version "5.6.0" "5.6.0/include/node" "5.6.0" @@ -124,36 +102,6 @@ test_download_node_version "5.6.0" "5.6.0/include/node" "5.6.0" # point for tarballs # we can test whether it uses the proxy because after 2 connections the proxy will # die and therefore should not be running at the end of the test, `nc` can tell us this -run_tests "3.3.0" " - (node /node-gyp-src/test/simple-proxy.js 8080 /foobar/ https://iojs.org/dist/ &) && - cd node-buffertools && - /node-gyp-src/bin/node-gyp.js --loglevel=info --dist-url=http://localhost:8080/foobar/ rebuild && - nc -z localhost 8080 && echo -e \"\\n\\n\\033[31mFAILED TO USE LOCAL PROXY\\033[39m\\n\\n\" -" - -# REMOVE after next semver-major -run_tests "3.3.0" " - (node /node-gyp-src/test/simple-proxy.js 8080 /doobar/ https://iojs.org/dist/ &) && - cd node-buffertools && - NVM_IOJS_ORG_MIRROR=http://localhost:8080/doobar/ /node-gyp-src/bin/node-gyp.js --loglevel=info rebuild && - nc -z localhost 8080 && echo -e \"\\n\\n\\033[31mFAILED TO USE LOCAL PROXY\\033[39m\\n\\n\" -" - -# REMOVE after next semver-major -run_tests "0.12.7" " - (node /node-gyp-src/test/simple-proxy.js 8080 /boombar/ https://nodejs.org/dist/ &) && - cd node-buffertools && - NVM_NODEJS_ORG_MIRROR=http://localhost:8080/boombar/ /node-gyp-src/bin/node-gyp.js --loglevel=info rebuild && - nc -z localhost 8080 && echo -e \"\\n\\n\\033[31mFAILED TO USE LOCAL PROXY\\033[39m\\n\\n\" -" - -run_tests "3.3.0" " - (node /node-gyp-src/test/simple-proxy.js 8080 /doobar/ https://iojs.org/dist/ &) && - cd node-buffertools && - IOJS_ORG_MIRROR=http://localhost:8080/doobar/ /node-gyp-src/bin/node-gyp.js --loglevel=info rebuild && - nc -z localhost 8080 && echo -e \"\\n\\n\\033[31mFAILED TO USE LOCAL PROXY\\033[39m\\n\\n\" -" - run_tests "0.12.7" " (node /node-gyp-src/test/simple-proxy.js 8080 /boombar/ https://nodejs.org/dist/ &) && cd node-buffertools && diff --git a/deps/npm/node_modules/node-gyp/test/fixtures/VS_2017_BuildTools_minimal.txt b/deps/npm/node_modules/node-gyp/test/fixtures/VS_2017_BuildTools_minimal.txt new file mode 100644 index 00000000000000..244f6b07982409 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/test/fixtures/VS_2017_BuildTools_minimal.txt @@ -0,0 +1 @@ +[{"path":"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools","version":"15.9.28307.665","packages":["Microsoft.VisualStudio.Product.BuildTools","Microsoft.VisualStudio.Component.VC.CoreIde","Microsoft.VisualStudio.VC.Ide.Pro","Microsoft.VisualStudio.VC.Ide.Pro.Resources","Microsoft.VisualStudio.VC.Templates.Pro","Microsoft.VisualStudio.VC.Templates.Pro.Resources","Microsoft.VisualStudio.VC.Items.Pro","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Reduced","Microsoft.VisualStudio.VC.Ide.MDD","Microsoft.VisualStudio.VC.Ide.x64","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Express","Microsoft.VisualStudio.PackageGroup.Debugger.Script","Microsoft.VisualStudio.JavaScript.LanguageService","Microsoft.VisualStudio.JavaScript.LanguageService.Resources","Microsoft.VisualStudio.Debugger.Script.Msi","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.VC.Ide.WinXPlus","Microsoft.VisualStudio.VC.Ide.Dskx","Microsoft.VisualStudio.VC.Ide.Dskx.Resources","Microsoft.VisualStudio.VC.Ide.Core","Microsoft.VisualStudio.VC.Ide.Core.Resources","Microsoft.VisualStudio.VC.Ide.Base","Microsoft.VisualStudio.VC.Ide.LanguageService","Microsoft.VisualStudio.VC.Ide.ResourceEditor","Microsoft.VisualStudio.VC.Ide.ResourceEditor.Resources","Microsoft.VisualStudio.VC.Ide.ProjectSystem","Microsoft.VisualStudio.VC.Ide.ProjectSystem.Resources","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine.Resources","Microsoft.VisualStudio.VC.Ide.LanguageService.Resources","Microsoft.VisualStudio.VC.Ide.Base.Resources","Microsoft.VisualStudio.PackageGroup.Core","Microsoft.VisualStudio.TestTools.TeamFoundationClient","Microsoft.VisualStudio.PackageGroup.Debugger.Core","Microsoft.VisualStudio.Debugger.VSCodeDebuggerHost","Microsoft.VisualStudio.VC.Ide.Debugger","Microsoft.VisualStudio.VC.Ide.Debugger.Resources","Microsoft.VisualStudio.VC.Ide.Common","Microsoft.VisualStudio.VC.Ide.Common.Resources","Microsoft.VisualStudio.Debugger.Parallel","Microsoft.VisualStudio.Debugger.Parallel.Resources","Microsoft.VisualStudio.Debugger.CollectionAgents","Microsoft.VisualStudio.Debugger.Managed","Microsoft.CodeAnalysis.VisualStudio.Setup.Resources","Microsoft.CodeAnalysis.VisualStudio.Setup","Microsoft.CodeAnalysis.ExpressionEvaluator.Resources","Microsoft.CodeAnalysis.ExpressionEvaluator","Microsoft.VisualStudio.Debugger.Managed.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger","Microsoft.VisualStudio.VC.MSVCDis","Microsoft.VisualStudio.ScriptedHost","Microsoft.VisualStudio.ScriptedHost.Targeted","Microsoft.VisualStudio.ScriptedHost.Resources","Microsoft.IntelliTrace.DiagnosticsHub","Microsoft.VisualStudio.Debugger.Resources","Microsoft.PackageGroup.ClientDiagnostics","Microsoft.VisualStudio.AppResponsiveness","Microsoft.VisualStudio.AppResponsiveness.Targeted","Microsoft.VisualStudio.AppResponsiveness.Resources","Microsoft.VisualStudio.ClientDiagnostics","Microsoft.VisualStudio.ClientDiagnostics.Targeted","Microsoft.VisualStudio.ClientDiagnostics.Resources","Microsoft.VisualStudio.PackageGroup.CommunityCore","Microsoft.VisualStudio.ProjectSystem.Full","Microsoft.VisualStudio.ProjectSystem","Microsoft.VisualStudio.Community.x86","Microsoft.VisualStudio.Community.x64","Microsoft.VisualStudio.Community","Microsoft.IntelliTrace.CollectorCab","Microsoft.VisualStudio.Community.Resources","Microsoft.VisualStudio.WebSiteProject.DTE","Microsoft.MSHtml","Microsoft.VisualStudio.Community.Msi.Resources","Microsoft.VisualStudio.Community.Msi","Microsoft.VisualStudio.MinShell.Interop.Msi","Microsoft.VisualStudio.PackageGroup.CoreEditor","PortableFacades","Microsoft.VisualStudio.VirtualTree","Microsoft.VisualStudio.PackageGroup.Progression","Microsoft.VisualStudio.PerformanceProvider","Microsoft.VisualStudio.GraphModel","Microsoft.VisualStudio.GraphProvider","Microsoft.DiaSymReader","Microsoft.VisualStudio.TextMateGrammars","Microsoft.VisualStudio.PackageGroup.TeamExplorer","Microsoft.TeamFoundation.OfficeIntegration","Microsoft.TeamFoundation.OfficeIntegration.Resources","Microsoft.VisualStudio.TeamExplorer","Microsoft.ServiceHub","Microsoft.VisualStudio.ProjectServices","Microsoft.VisualStudio.SLNX.VSIX","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.PackageGroup.MinShell","Microsoft.VisualStudio.MinShell.Msi","Microsoft.VisualStudio.MinShell.Msi.Resources","Microsoft.VisualStudio.MinShell.Interop","Microsoft.VisualStudio.Log","Microsoft.VisualStudio.Log.Targeted","Microsoft.VisualStudio.Log.Resources","Microsoft.VisualStudio.Finalizer","Microsoft.VisualStudio.CoreEditor","Microsoft.VisualStudio.Connected","Microsoft.VisualStudio.Connected.Resources","Microsoft.VisualStudio.MinShell","Microsoft.VisualStudio.MinShell.Platform","Microsoft.VisualStudio.MinShell.Platform.Resources","Microsoft.VisualStudio.MefHosting","Microsoft.VisualStudio.MefHosting.Resources","Microsoft.VisualStudio.Initializer","Microsoft.VisualStudio.ExtensionManager","Microsoft.VisualStudio.Editors","Microsoft.Net.4.TargetingPack","Microsoft.VisualStudio.Component.Windows10SDK.17134","Win10SDK_10.0.17134","Microsoft.VisualStudio.Component.VC.Tools.x86.x64","Microsoft.VisualCpp.CodeAnalysis.Extensions","Microsoft.VisualCpp.CodeAnalysis.Extensions.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86.Resources","Microsoft.VisualCpp.CodeAnalysis.Extensions.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources","Microsoft.VisualStudio.Component.Static.Analysis.Tools","Microsoft.VisualStudio.StaticAnalysis","Microsoft.VisualStudio.StaticAnalysis.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX86","Microsoft.VisualCpp.VCTip.HostX64.TargetX86","Microsoft.VisualCpp.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX64","Microsoft.VisualCpp.VCTip.HostX64.TargetX64","Microsoft.VisualCpp.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX64","Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.PGO.X86","Microsoft.VisualCpp.PGO.X64","Microsoft.VisualCpp.PGO.Headers","Microsoft.VisualCpp.CRT.x86.Store","Microsoft.VisualCpp.CRT.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.x64.Store","Microsoft.VisualCpp.CRT.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.ClickOnce.Msi","Microsoft.VisualStudio.PackageGroup.VC.Tools.x86","Microsoft.VisualCpp.Tools.HostX86.TargetX64","Microsoft.VisualCpp.VCTip.hostX86.targetX64","Microsoft.VisualCpp.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Tools.HostX86.TargetX86","Microsoft.VisualCpp.VCTip.hostX86.targetX86","Microsoft.VisualCpp.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Tools.Core.Resources","Microsoft.VisualCpp.Tools.Core.x86","Microsoft.VisualCpp.Tools.Common.Utils","Microsoft.VisualCpp.Tools.Common.Utils.Resources","Microsoft.VisualCpp.DIA.SDK","Microsoft.VisualCpp.CRT.x86.Desktop","Microsoft.VisualCpp.CRT.x64.Desktop","Microsoft.VisualCpp.CRT.Source","Microsoft.VisualCpp.CRT.Redist.X86","Microsoft.VisualCpp.CRT.Redist.X64","Microsoft.VisualCpp.CRT.Redist.Resources","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.CRT.Headers","Microsoft.VisualStudio.VC.MSBuild.X86","Microsoft.VisualStudio.VC.MSBuild.X64","Microsoft.VS.VC.MSBuild.X64.Resources","Microsoft.VisualStudio.VC.MSBuild.Base","Microsoft.VisualStudio.VC.MSBuild.Base.Resources","Microsoft.VisualStudio.VC.MSBuild.ARM","Microsoft.VisualStudio.Workload.MSBuildTools","Microsoft.VisualStudio.Component.CoreBuildTools","Microsoft.VisualStudio.Setup.Configuration","Microsoft.VisualStudio.PackageGroup.VsDevCmd","Microsoft.VisualStudio.VsDevCmd.Ext.NetFxSdk","Microsoft.VisualStudio.VsDevCmd.Core.WinSdk","Microsoft.VisualStudio.VsDevCmd.Core.DotNet","Microsoft.VisualStudio.VC.DevCmd","Microsoft.VisualStudio.VC.DevCmd.Resources","Microsoft.VisualStudio.BuildTools.Resources","Microsoft.VisualStudio.Net.Eula.Resources","Microsoft.Build.Dependencies","Microsoft.Build.FileTracker.Msi","Microsoft.Component.MSBuild","Microsoft.PythonTools.BuildCore.Vsix","Microsoft.NuGet.Build.Tasks","Microsoft.VisualStudio.Component.Roslyn.Compiler","Microsoft.CodeAnalysis.Compilers.Resources","Microsoft.CodeAnalysis.Compilers","Microsoft.Net.PackageGroup.4.6.1.Redist","Microsoft.VisualStudio.NativeImageSupport","Microsoft.Build"]}] diff --git a/deps/npm/node_modules/node-gyp/test/fixtures/VS_2017_Community_workload.txt b/deps/npm/node_modules/node-gyp/test/fixtures/VS_2017_Community_workload.txt new file mode 100644 index 00000000000000..dd5e77dafb9dfe --- /dev/null +++ b/deps/npm/node_modules/node-gyp/test/fixtures/VS_2017_Community_workload.txt @@ -0,0 +1 @@ +[{"path":"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community","version":"15.9.28307.665","packages":["Microsoft.VisualStudio.Component.Windows10SDK.IpOverUsb","Win10SDK_IpOverUsb","Microsoft.VisualStudio.Component.VC.ATL.ARM64","Microsoft.VisualCpp.ATL.ARM64","Microsoft.VisualStudio.Component.VC.ATL.ARM","Microsoft.VisualCpp.ATL.ARM","Microsoft.VisualStudio.Component.VC.Tools.ARM","Microsoft.VisualCpp.Tools.HostX64.TargetX86.Resources","Microsoft.VisualStudio.Graphics.Analyzer.Resources","Microsoft.Icecap.Analysis","Microsoft.VisualCpp.CRT.Redist.arm.OneCore.Desktop","Microsoft.VisualCpp.CRT.arm.Store","Microsoft.VisualCpp.CRT.arm.Desktop","Microsoft.VisualStudio.PackageGroup.VC.Tools.x64.ARM","Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetarm","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetARM.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetARM","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetARM.Resources","Microsoft.VisualCpp.Premium.Tools.ARM.Base","Microsoft.VisualCpp.Premium.Tools.ARM.Base.Resources","Microsoft.VisualCpp.PGO.ARM","Microsoft.VisualCpp.Tools.HostX64.TargetX64","Microsoft.VisualStudio.Product.Community","Microsoft.VisualCpp.Tools.Hostx86.Targetarm","Microsoft.VisualStudio.Component.VC.Tools.ARM64","Microsoft.VisualStudio.VC.MSBuild.Arm64","Microsoft.VisualCpp.CRT.Redist.ARM64.OneCore.Desktop","Microsoft.VisualCpp.VCTip.HostX64.TargetX64","Microsoft.VisualCpp.CRT.ARM64.OneCore.Desktop","Microsoft.VisualCpp.CRT.ARM64.Store","Microsoft.VisualCpp.CRT.ARM64.Desktop","Microsoft.VisualCpp.Tools.HostX64.TargetX64.Resources","Microsoft.Icecap.Analysis.Resources","Microsoft.VisualCpp.VCTip.hostX86.targetARM","Microsoft.VisualStudio.PackageGroup.VC.Tools.x64.ARM64","Microsoft.VisualCpp.Tools.Core","Microsoft.VisualCpp.PGO.ARM64","Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetarm64","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetARM64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetARM64","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetARM64.Resources","Microsoft.VisualCpp.Premium.Tools.ARM64.Base","Microsoft.VisualCpp.Tools.HostX86.TargetX64","Microsoft.VisualCpp.Tools.HostX86.TargetARM.Resources","Microsoft.VisualCpp.CRT.Redist.ARM64","Microsoft.VisualCpp.CRT.arm.OneCore.Desktop","Microsoft.VisualCpp.CodeAnalysis.Extensions.X86","Microsoft.VisualCpp.CodeAnalysis.Extensions.X64","Microsoft.VisualCpp.VCTip.HostX64.TargetX86","Component.WixToolset.VisualStudioExtension.Dev15","WixToolset.VisualStudioExtension.Dev15","Microsoft.VisualCpp.MFC.X64","Microsoft.VisualCpp.ATL.Headers","Microsoft.VisualStudio.Component.VC.CMake.Project","Microsoft.VisualStudio.VC.CMake","Microsoft.VisualStudio.VC.CMake.Project","Microsoft.VisualStudio.Component.Windows10SDK.17763","Microsoft.VisualStudio.VC.MSBuild.Base.Resources","MLGen","Microsoft.VisualStudio.Graphics.Analyzer","Microsoft.VisualStudio.Component.TestTools.Core","Microsoft.VisualCpp.Tools.Core.x86","Microsoft.VisualCpp.CRT.x86.OneCore.Desktop","Microsoft.VisualCpp.DIA.SDK","Microsoft.VisualCpp.CRT.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.ClickOnce.Msi","Microsoft.VisualStudio.NuGet.Licenses","SQLCommon","Microsoft.VisualStudio.VC.MSBuild.X86","Microsoft.VisualCpp.Tools.HostX64.TargetARM","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources","Microsoft.VisualCpp.HTMLHelpWorkshop.Msi","Microsoft.Icecap.Collection.Msi.Resources","Microsoft.VisualCpp.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.VCTip.hostX64.targetARM","Microsoft.VisualStudio.VC.Ide.Dskx.Resources","Microsoft.VisualStudio.VC.Templates.UnitTest","Microsoft.VisualStudio.TestTools.TestPlatform.V1.CPP","Microsoft.VisualStudio.VC.Ide.Core","Microsoft.VisualStudio.Graphics.Appid","Microsoft.VisualCpp.ATL.Source","Microsoft.VisualStudio.VC.Ide.Core.Resources","Microsoft.VisualStudio.Debugger.ImmersiveActivateHelper.Msi","Microsoft.VisualStudio.Debugger.JustInTime","Microsoft.DiagnosticsHub.CpuSampling","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Common","Microsoft.VisualStudio.TestTools.TP.Legacy.Common.Res","Microsoft.VisualStudio.ProTools.Resources","Microsoft.VisualStudio.Community.Msi","Microsoft.VisualCpp.Tools.HostX64.TargetARM.Resources","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Agent","Microsoft.Component.MSBuild","Microsoft.VisualStudio.Graphics.Msi","Microsoft.VisualStudio.WebToolsExtensions","Microsoft.VisualCpp.Tools.Hostx86.Targetarm64","Microsoft.VisualStudio.TextTemplating.MSBuild","Microsoft.VisualCpp.VCTip.hostX86.targetARM64","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine","Microsoft.VisualCpp.Tools.HostX86.TargetARM64.Resources","Microsoft.VisualStudio.RazorExtension","Microsoft.VisualCpp.CRT.x86.Store","Microsoft.VisualCpp.Tools.Core.Resources","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualCpp.MFC.Source","Microsoft.VisualCpp.CRT.x86.Desktop","Microsoft.VisualStudio.VC.MSBuild.X64","Microsoft.VisualStudio.VC.Items.Pro","Microsoft.VisualStudio.Graphics.Viewers","Microsoft.VisualCpp.CRT.x64.Desktop","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86.Resources","Microsoft.VisualCpp.MFC.Redist.X86","Microsoft.VisualStudio.WebToolsExtensions.Chip","Microsoft.DiagnosticsHub.Runtime.Resources","Microsoft.DiagnosticsHub.CpuSampling.Targeted","Microsoft.VisualStudio.VC.Ide.LanguageService.Resources","Microsoft.VisualStudio.Component.VC.DiagnosticTools","Microsoft.VisualCpp.MFC.Redist.X64","Microsoft.VisualStudio.PackageGroup.TestTools.Native","Microsoft.VisualStudio.Graphics.Viewers.Resources","Microsoft.VisualCpp.MFC.MBCS","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Component.TextTemplating","Win10SDK_10.0.17763","Microsoft.VisualStudio.VC.Ide.Base.Resources","Microsoft.VisualCpp.MFC.MBCS.X64","Microsoft.VisualStudio.PackageGroup.TestTools.CodeCoverage","Microsoft.VisualStudio.Graphics.EnableTools","Microsoft.VisualStudio.Graphics.Appid.Resources","Microsoft.VisualStudio.VC.MSBuild.Base","Microsoft.VisualStudio.VC.MSBuild.ARM","Microsoft.VisualCpp.MFC.Headers","Microsoft.VisualCpp.CRT.Redist.x86.OneCore.Desktop","Microsoft.VisualCpp.Tools.HostX86.TargetX86","Microsoft.VisualStudio.VC.Ide.Base","Microsoft.VisualStudio.Graphics.Analyzer.Targeted","Microsoft.VisualCpp.CRT.Headers","Microsoft.DiagnosticsHub.Runtime.Targeted","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86","Microsoft.VisualCpp.Tools.HostX64.TargetARM64","Microsoft.VisualCpp.VCTip.hostX64.targetARM64","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86.Resources","Microsoft.Icecap.Collection.Msi","Microsoft.VisualCpp.ATL.X86","Microsoft.VisualCpp.Tools.HostX64.TargetARM64.Resources","Microsoft.VisualStudio.Component.VC.ATLMFC","Microsoft.VisualCpp.VCTip.hostX86.targetX86","Microsoft.Icecap.Collection.Msi.Resources.Targeted","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86","Microsoft.VisualStudio.Component.Graphics.Tools","Microsoft.VisualStudio.WebTools.Resources","Microsoft.VisualCpp.ATL.X64","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86.Resources","Microsoft.VisualStudio.Component.Graphics.Win81","Microsoft.VisualStudio.VC.Ide.MDD","Microsoft.VisualStudio.VC.Ide.ResourceEditor","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64","Microsoft.Icecap.Analysis.Resources.Targeted","Microsoft.VisualStudio.Debugger.Script.Msi","Microsoft.VisualStudio.Component.VC.CoreIde","Microsoft.VisualStudio.VC.Ide.MFC.Resources","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.PackageGroup.VC.Tools.x86","Microsoft.VisualStudio.TextTemplating.Core","Microsoft.VisualStudio.JavaScript.LanguageService","Microsoft.VisualStudio.VC.Ide.ResourceEditor.Resources","Microsoft.VisualStudio.VC.Ide.ProjectSystem.Resources","Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest","Microsoft.VisualStudio.VC.Ide.ProjectSystem","Microsoft.VisualStudio.VC.Ide.Dskx","Microsoft.VisualCpp.Tools.HostX86.TargetX86.Resources","Microsoft.CredentialProvider","Microsoft.VisualStudio.VC.Templates.Desktop","Microsoft.VisualStudio.VC.Ide.Pro.Resources","Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core","Microsoft.VisualStudio.TextTemplating.Integration","Microsoft.VisualStudio.Component.NuGet","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Reduced","Microsoft.VisualCpp.PGO.Headers","Microsoft.DiagnosticsHub.Collection","Microsoft.Icecap.Collection.Msi.Targeted","Microsoft.VisualStudio.VC.Ide.LanguageService","Microsoft.VisualStudio.WebTools.WSP.FSA","Microsoft.VisualStudio.Graphics.Msi","Microsoft.VisualCpp.CRT.Redist.X86","Microsoft.VisualStudio.Branding.Community","Microsoft.VisualStudio.VC.Ide.x64","Microsoft.VisualStudio.WebToolsExtensions.Common","Microsoft.VisualStudio.WebTools.MSBuild","Microsoft.VisualStudio.NuGet.Core","Microsoft.DiagnosticsHub.Collection.Service","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine.Resources","Microsoft.CodeAnalysis.ExpressionEvaluator","Microsoft.VisualCpp.CRT.Redist.X64","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VS.VC.MSBuild.X64.Resources","Microsoft.VisualCpp.CRT.Source","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Tips.Resources","Microsoft.VisualStudio.VC.Ide.WinXPlus","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.Redist.14.Latest","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX64","Microsoft.VisualCpp.CRT.Redist.Resources","Microsoft.VisualCpp.Redist.14.Latest","Microsoft.Net.4.TargetingPack","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualCpp.CRT.x64.Store","Microsoft.VisualStudio.VC.Ide.Debugger.Resources","Microsoft.DiaSymReader.Native","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.Redist.14","Microsoft.VisualStudio.StaticAnalysis","Microsoft.VisualStudio.TestTools.TeamFoundationClient","Microsoft.VisualStudio.TestTools.TestPlatform.V1.CLI","Microsoft.VisualStudio.VC.Ide.Common","Microsoft.VisualStudio.Community.Extra.Resources","Microsoft.VisualStudio.Component.Roslyn.LanguageServices","Microsoft.DiagnosticsHub.Collection.StopService.Install","Microsoft.VisualStudio.InteractiveWindow","Microsoft.PackageGroup.DiagnosticsHub.Platform","Microsoft.VisualStudio.StaticAnalysis.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.VC.Ide.Common.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX86","Microsoft.VisualStudio.VC.DevCmd","Microsoft.VisualStudio.Community.Extra","Microsoft.VisualStudio.TestTools.TP.Legacy.Tips.Msi","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.TestTools","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core.Resources","Microsoft.VisualStudio.PackageGroup.TestTools.Core","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.V2.CLI","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.V1.CLI","Microsoft.VisualStudio.Component.VC.Tools.x86.x64","Microsoft.VisualStudio.TestTools.Pex.Common","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.Legacy","Microsoft.VisualStudio.PackageGroup.MinShell.Interop","Microsoft.CodeAnalysis.ExpressionEvaluator.Resources","Microsoft.VisualCpp.CodeAnalysis.Extensions","Microsoft.VisualStudio.PackageGroup.CoreEditor","Microsoft.VisualStudio.Component.Roslyn.Compiler","Microsoft.VisualStudio.ScriptedHost.Targeted","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Professional","Microsoft.VisualStudio.Debugger.Resources","Microsoft.VisualStudio.Debugger.Parallel","Microsoft.VisualStudio.Debugger.Parallel.Resources","Microsoft.VisualCpp.PGO.X64","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.IDE","Microsoft.VisualStudio.GraphModel","Microsoft.VisualStudio.PackageGroup.TestTools.DataCollectors","sqlsysclrtypes","Microsoft.VisualStudio.ProTools","Component.Microsoft.VisualStudio.RazorExtension","Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI","Microsoft.Build.Dependencies","Microsoft.VisualStudio.WebTools.WSP.FSA.Resources","Microsoft.VisualStudio.Component.Static.Analysis.Tools","Microsoft.VisualStudio.VC.Ide.ATL.Resources","Microsoft.VisualStudio.VC.Templates.UnitTest.Resources","Microsoft.VisualStudio.Debugger.Managed","Microsoft.VisualStudio.Workload.NativeDesktop","Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest","Microsoft.VisualStudio.Debugger.JustInTime.Msi","Microsoft.Net.PackageGroup.4.6.1.Redist","Microsoft.VisualStudio.Debugger.VSCodeDebuggerHost","sqlsysclrtypes","Microsoft.VisualStudio.Debugger.Managed.Resources","Microsoft.VisualStudio.TestTools.TP.Legacy.Tips.Common","Microsoft.VisualStudio.VC.Ide.Debugger","Microsoft.VisualStudio.AppResponsiveness","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.TestTools.TestWIExtension","Microsoft.VisualStudio.VC.Ide.Pro","Microsoft.VisualStudio.PackageGroup.Debugger.Core","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Express","Microsoft.VisualStudio.WebTools","Microsoft.VisualStudio.Component.VC.Redist.14.Latest","Microsoft.VisualStudio.VsDevCmd.Core.WinSdk","Microsoft.VisualStudio.TestTools.TestPlatform.IDE","Microsoft.VisualStudio.TextTemplating.Integration.Resources","Microsoft.VisualStudio.Debugger.CollectionAgents","Microsoft.VisualStudio.Debugger","Microsoft.VisualStudio.PackageGroup.Debugger.Script","Microsoft.VisualStudio.VC.MSVCDis","Microsoft.VisualStudio.ScriptedHost","Microsoft.VisualStudio.ClientDiagnostics.Targeted","Microsoft.VisualStudio.ScriptedHost.Resources","Microsoft.TeamFoundation.OfficeIntegration.Resources","Microsoft.IntelliTrace.DiagnosticsHub","Microsoft.VisualStudio.JavaScript.LanguageService.Resources","Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest","Microsoft.VisualStudio.PackageGroup.Community","Microsoft.VisualStudio.ClientDiagnostics","Microsoft.VisualStudio.Component.Windows10SDK.17134","Microsoft.VisualStudio.PackageGroup.Core","PortableFacades","Microsoft.DiaSymReader","Microsoft.DiagnosticsHub.Runtime","Microsoft.VisualStudio.Component.CoreEditor","Microsoft.VisualStudio.AppResponsiveness.Targeted","Microsoft.VisualStudio.AppResponsiveness.Resources","Microsoft.VisualStudio.Community","Microsoft.TeamFoundation.OfficeIntegration","Microsoft.VisualStudio.WebSiteProject.DTE","Microsoft.VisualStudio.ClientDiagnostics.Resources","Microsoft.VisualStudio.ProjectSystem.Full","Microsoft.VisualStudio.ProjectSystem","Microsoft.VisualCpp.Tools.Common.UtilsPrereq","Microsoft.IntelliTrace.CollectorCab","Microsoft.VisualStudio.Community.Resources","Microsoft.VisualCpp.Tools.Common.Utils","Microsoft.ServiceHub","Microsoft.VisualStudio.Editors","Microsoft.VisualStudio.TeamExplorer","Microsoft.CodeAnalysis.VisualStudio.InteractiveComponents.Resources","Microsoft.VisualStudio.MinShell.Interop.Msi","Microsoft.VisualStudio.GraphProvider","Microsoft.CodeAnalysis.VisualStudio.InteractiveComponents","Microsoft.CodeAnalysis.VisualStudio.Setup.Interactive.Resources","Microsoft.CodeAnalysis.VisualStudio.Setup.Resources","Microsoft.VisualStudio.Community.x86","Microsoft.VisualStudio.Community.x64","Microsoft.CodeAnalysis.VisualStudio.Setup","Microsoft.NuGet.Build.Tasks","Microsoft.PackageGroup.ClientDiagnostics","Microsoft.CodeAnalysis.Compilers.Resources","Microsoft.CodeAnalysis.Compilers","Microsoft.VisualCpp.Tools.Common.Utils.Resources","Microsoft.VisualStudio.Net.Eula.Resources","Microsoft.VisualStudio.PackageGroup.CommunityCore","Microsoft.Build","Microsoft.VisualStudio.VC.Ide.TestAdapterForBoostTest","Microsoft.VisualStudio.VC.Ide.ATL","Microsoft.VisualStudio.TextMateGrammars","Microsoft.VisualStudio.Workload.CoreEditor","Microsoft.VisualStudio.MinShell.Interop","Microsoft.Build.FileTracker.Msi","Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core","Microsoft.MSHtml","Microsoft.VisualStudio.Community.Msi.Resources","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Tips","Microsoft.VisualStudio.Devenv.Msi","Microsoft.VisualStudio.Component.VC.ATL","Microsoft.VisualStudio.VC.Templates.Pro","Microsoft.VisualCpp.CRT.Redist.x64.OneCore.Desktop","Microsoft.VisualStudio.SLNX.VSIX","Microsoft.VisualStudio.CoreEditor","Win10SDK_10.0.17134","Microsoft.VisualStudio.VsDevCmd.Ext.NetFxSdk","Microsoft.VisualStudio.Component.Debugger.JustInTime","Microsoft.VisualStudio.VC.Ide.MFC","Microsoft.VisualStudio.VsDevCmd.Core.DotNet","Microsoft.VisualStudio.PackageGroup.VsDevCmd","Microsoft.VisualStudio.Finalizer","Microsoft.VisualStudio.VirtualTree","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.ProjectServices","Microsoft.VisualStudio.VC.DevCmd.Resources","Microsoft.VisualStudio.MinShell","Microsoft.VisualStudio.PackageGroup.Progression","Microsoft.VisualStudio.PerformanceProvider","Microsoft.VisualStudio.Connected.Resources","Microsoft.VisualStudio.Log","Microsoft.VisualStudio.PackageGroup.TeamExplorer","Microsoft.VisualStudio.Log.Targeted","Microsoft.VisualStudio.MinShell.Platform","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.VC.Templates.Pro.Resources","Microsoft.VisualStudio.Devenv","Microsoft.VisualCpp.VCTip.hostX86.targetX64","Microsoft.VisualStudio.Devenv.Resources","Microsoft.VisualStudio.MinShell.Platform.Resources","Microsoft.VisualStudio.Connected","Microsoft.VisualStudio.MefHosting","Microsoft.DiagnosticsHub.Collection.StopService.Uninstall","Microsoft.VisualStudio.PackageGroup.MinShell","Microsoft.VisualStudio.MefHosting.Resources","Microsoft.VisualCpp.MFC.X86","Microsoft.VisualStudio.Log.Resources","Microsoft.Icecap.Analysis.Targeted","Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.PGO.X86","Microsoft.VisualStudio.ExtensionManager","Microsoft.VisualStudio.MinShell.x86","Microsoft.VisualStudio.MinShell.Msi","Microsoft.VisualStudio.Setup.Configuration","Microsoft.VisualStudio.LanguageServer","Microsoft.VisualStudio.NativeImageSupport","Microsoft.VisualStudio.MinShell.Msi.Resources","Microsoft.VisualStudio.Devenv.Config","Microsoft.VisualStudio.MinShell.Resources","Microsoft.VisualStudio.Initializer","Microsoft.Net.PackageGroup.4.6.Redist"]}] diff --git a/deps/npm/node_modules/node-gyp/test/fixtures/VS_2017_Unusable.txt b/deps/npm/node_modules/node-gyp/test/fixtures/VS_2017_Unusable.txt new file mode 100644 index 00000000000000..fc0a257f447830 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/test/fixtures/VS_2017_Unusable.txt @@ -0,0 +1 @@ +[{"path":"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildToolsUnusable","version":"15.9.28307.665","packages":["Microsoft.VisualStudio.Product.BuildTools","Microsoft.VisualStudio.Component.Windows10SDK.17134","Win10SDK_10.0.17134","Microsoft.VisualStudio.Component.VC.Tools.x86.x64","Microsoft.VisualCpp.CodeAnalysis.Extensions","Microsoft.VisualCpp.CodeAnalysis.Extensions.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86.Resources","Microsoft.VisualCpp.CodeAnalysis.Extensions.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources","Microsoft.VisualStudio.Component.Static.Analysis.Tools","Microsoft.VisualStudio.StaticAnalysis","Microsoft.VisualStudio.StaticAnalysis.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX86","Microsoft.VisualCpp.VCTip.HostX64.TargetX86","Microsoft.VisualCpp.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX64","Microsoft.VisualCpp.VCTip.HostX64.TargetX64","Microsoft.VisualCpp.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX64","Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.PGO.X86","Microsoft.VisualCpp.PGO.X64","Microsoft.VisualCpp.PGO.Headers","Microsoft.VisualCpp.CRT.x86.Store","Microsoft.VisualCpp.CRT.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.x64.Store","Microsoft.VisualCpp.CRT.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.ClickOnce.Msi","Microsoft.VisualStudio.PackageGroup.VC.Tools.x86","Microsoft.VisualCpp.Tools.HostX86.TargetX64","Microsoft.VisualCpp.VCTip.hostX86.targetX64","Microsoft.VisualCpp.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Tools.HostX86.TargetX86","Microsoft.VisualCpp.VCTip.hostX86.targetX86","Microsoft.VisualCpp.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Tools.Core.Resources","Microsoft.VisualCpp.Tools.Core.x86","Microsoft.VisualCpp.Tools.Common.Utils","Microsoft.VisualCpp.Tools.Common.Utils.Resources","Microsoft.VisualCpp.DIA.SDK","Microsoft.VisualCpp.CRT.x86.Desktop","Microsoft.VisualCpp.CRT.x64.Desktop","Microsoft.VisualCpp.CRT.Source","Microsoft.VisualCpp.CRT.Redist.X86","Microsoft.VisualCpp.CRT.Redist.X64","Microsoft.VisualCpp.CRT.Redist.Resources","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.CRT.Headers","Microsoft.VisualStudio.Workload.MSBuildTools","Microsoft.VisualStudio.Component.CoreBuildTools","Microsoft.VisualStudio.Setup.Configuration","Microsoft.VisualStudio.PackageGroup.VsDevCmd","Microsoft.VisualStudio.VsDevCmd.Ext.NetFxSdk","Microsoft.VisualStudio.VsDevCmd.Core.WinSdk","Microsoft.VisualStudio.VsDevCmd.Core.DotNet","Microsoft.VisualStudio.VC.DevCmd","Microsoft.VisualStudio.VC.DevCmd.Resources","Microsoft.VisualStudio.BuildTools.Resources","Microsoft.VisualStudio.Net.Eula.Resources","Microsoft.Build.Dependencies","Microsoft.Build.FileTracker.Msi","Microsoft.Component.MSBuild","Microsoft.PythonTools.BuildCore.Vsix","Microsoft.NuGet.Build.Tasks","Microsoft.VisualStudio.Component.Roslyn.Compiler","Microsoft.CodeAnalysis.Compilers.Resources","Microsoft.CodeAnalysis.Compilers","Microsoft.Net.PackageGroup.4.6.1.Redist","Microsoft.Net.4.6.1.FullRedist.NonThreshold","Microsoft.Windows.UniversalCRT.Msu.81","Microsoft.VisualStudio.NativeImageSupport","Microsoft.Build"]}] diff --git a/deps/npm/node_modules/node-gyp/test/fixtures/VS_2019_BuildTools_minimal.txt b/deps/npm/node_modules/node-gyp/test/fixtures/VS_2019_BuildTools_minimal.txt new file mode 100644 index 00000000000000..f07d2541648829 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/test/fixtures/VS_2019_BuildTools_minimal.txt @@ -0,0 +1 @@ +[{"path":"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools","version":"16.1.28922.388","packages":["Microsoft.VisualStudio.Product.BuildTools","Microsoft.VisualStudio.Component.VC.CoreIde","Microsoft.VisualStudio.VC.Ide.Pro","Microsoft.VisualStudio.VC.Ide.Pro.Resources","Microsoft.VisualStudio.VC.Templates.Pro","Microsoft.VisualStudio.VC.Templates.Pro.Resources","Microsoft.VisualStudio.VC.Items.Pro","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Reduced","Microsoft.VisualStudio.VC.Ide.MDD","Microsoft.VisualStudio.PackageGroup.Core","Microsoft.VisualStudio.CodeSense.Community","Microsoft.VisualStudio.TestTools.TeamFoundationClient","Microsoft.PackageGroup.ClientDiagnostics","Microsoft.VisualStudio.AppResponsiveness","Microsoft.VisualStudio.AppResponsiveness.Targeted","Microsoft.VisualStudio.AppResponsiveness.Resources","Microsoft.VisualStudio.ClientDiagnostics","Microsoft.VisualStudio.ClientDiagnostics.Targeted","Microsoft.VisualStudio.ClientDiagnostics.Resources","Microsoft.VisualStudio.PackageGroup.CommunityCore","Microsoft.VisualStudio.ProjectSystem.Full","Microsoft.VisualStudio.ProjectSystem","Microsoft.VisualStudio.Community.x86","Microsoft.VisualStudio.Community.x64","Microsoft.VisualStudio.Community","Microsoft.IntelliTrace.CollectorCab","Microsoft.VisualStudio.Community.Resources","Microsoft.VisualStudio.WebSiteProject.DTE","Microsoft.MSHtml","Microsoft.VisualStudio.Platform.CallHierarchy","Microsoft.VisualStudio.Community.Msi.Resources","Microsoft.VisualStudio.Community.Msi","Microsoft.VisualStudio.MinShell.Interop.Msi","Microsoft.VisualStudio.PackageGroup.CoreEditor","Microsoft.VisualStudio.VirtualTree","Microsoft.VisualStudio.PackageGroup.Progression","Microsoft.VisualStudio.PerformanceProvider","Microsoft.VisualStudio.GraphModel","Microsoft.VisualStudio.GraphProvider","Microsoft.VisualStudio.TextMateGrammars","Microsoft.VisualStudio.PackageGroup.TeamExplorer.Common","Microsoft.VisualStudio.TeamExplorer","Microsoft.ServiceHub","Microsoft.VisualStudio.ProjectServices","Microsoft.VisualStudio.OpenFolder.VSIX","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.PackageGroup.MinShell","Microsoft.VisualStudio.MinShell.Msi","Microsoft.VisualStudio.MinShell.Msi.Resources","Microsoft.VisualStudio.MinShell.Interop","Microsoft.VisualStudio.Log","Microsoft.VisualStudio.Log.Targeted","Microsoft.VisualStudio.Log.Resources","Microsoft.VisualStudio.Finalizer","Microsoft.VisualStudio.CoreEditor","Microsoft.VisualStudio.Platform.NavigateTo","Microsoft.VisualStudio.Connected","Microsoft.VisualStudio.Connected.Resources","Microsoft.VisualStudio.VC.Ide.x64","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Express","Microsoft.VisualStudio.PackageGroup.Debugger.Script","Microsoft.VisualStudio.Debugger.Script.Msi","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.VC.Ide.WinXPlus","Microsoft.VisualStudio.VC.Ide.Dskx","Microsoft.VisualStudio.VC.Ide.Dskx.Resources","Microsoft.VisualStudio.VC.Ide.Base","Microsoft.VisualStudio.VC.Ide.LanguageService","Microsoft.VisualStudio.VC.Ide.Core","Microsoft.VisualStudio.VisualC.Logging","Microsoft.VisualStudio.VC.Ide.Core.Resources","Microsoft.VisualStudio.VC.Ide.VCPkgDatabase","Microsoft.VisualStudio.VC.Ide.ResourceEditor","Microsoft.VisualStudio.VC.Ide.ResourceEditor.Resources","Microsoft.VisualStudio.VC.Ide.ProjectSystem","Microsoft.VisualStudio.VC.Ide.ProjectSystem.Resources","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine.Resources","Microsoft.VisualStudio.VC.Ide.LanguageService.Resources","Microsoft.VisualStudio.VC.Ide.Base.Resources","Microsoft.Net.4.TargetingPack","Microsoft.VisualStudio.PackageGroup.Debugger.Core","Microsoft.VisualStudio.PackageGroup.Debugger.TimeTravel.Record","Microsoft.VisualStudio.Debugger.TimeTravel.Runtime","Microsoft.VisualStudio.Debugger.TimeTravel.Runtime","Microsoft.VisualStudio.Debugger.TimeTravel.Agent","Microsoft.VisualStudio.Debugger.TimeTravel.Record","Microsoft.VisualStudio.Debugger.VSCodeDebuggerHost","Microsoft.VisualStudio.VC.Ide.Debugger","Microsoft.VisualStudio.VC.Ide.Debugger.Concord","Microsoft.VisualStudio.VC.Ide.Debugger.Concord.Resources","Microsoft.VisualStudio.VC.Ide.Debugger.Resources","Microsoft.VisualStudio.VC.Ide.Common","Microsoft.VisualStudio.VC.Ide.Common.Resources","Microsoft.VisualStudio.Debugger.Parallel","Microsoft.VisualStudio.Debugger.Parallel.Resources","Microsoft.VisualStudio.Debugger.CollectionAgents","Microsoft.VisualStudio.Debugger.Managed","Microsoft.DiaSymReader","Microsoft.CodeAnalysis.ExpressionEvaluator","Microsoft.VisualStudio.Debugger.Concord.Managed","Microsoft.VisualStudio.Debugger.Concord.Managed.Resources","Microsoft.VisualStudio.Debugger.Managed.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger","Microsoft.VisualStudio.PerfLib","Microsoft.VisualStudio.Debugger.Package.DiagHub.Client.VSx86","Microsoft.VisualStudio.Debugger.Remote.DiagHub.Client","Microsoft.VisualStudio.Debugger.Remote.DiagHub.Client","Microsoft.VisualStudio.VC.MSVCDis","Microsoft.VisualStudio.ScriptedHost","Microsoft.VisualStudio.ScriptedHost.Targeted","Microsoft.VisualStudio.ScriptedHost.Resources","Microsoft.VisualStudio.Editors","Microsoft.IntelliTrace.DiagnosticsHub","Microsoft.VisualStudio.MinShell","Microsoft.VisualStudio.MinShell.Platform","Microsoft.VisualStudio.MinShell.Platform.Resources","Microsoft.VisualStudio.MefHosting","Microsoft.VisualStudio.MefHosting.Resources","Microsoft.VisualStudio.Initializer","Microsoft.VisualStudio.ExtensionManager","Microsoft.VisualStudio.Platform.Editor","Microsoft.VisualStudio.Debugger.Concord","Microsoft.VisualStudio.Debugger.Concord.Resources","Microsoft.VisualStudio.Debugger.Resources","Microsoft.CodeAnalysis.VisualStudio.Setup","Microsoft.VisualStudio.Component.Windows10SDK.17134","Win10SDK_10.0.17134","Microsoft.VisualStudio.Component.VC.Tools.x86.x64","Microsoft.VisualCpp.CodeAnalysis.Extensions","Microsoft.VisualCpp.CodeAnalysis.Extensions.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86.Resources","Microsoft.VisualCpp.CodeAnalysis.Extensions.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources","Microsoft.VisualStudio.StaticAnalysis","Microsoft.VisualStudio.StaticAnalysis.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX86","Microsoft.VisualCpp.VCTip.HostX64.TargetX86","Microsoft.VisualCpp.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX64","Microsoft.VisualCpp.VCTip.HostX64.TargetX64","Microsoft.VisualCpp.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX64","Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.PGO.X86","Microsoft.VisualCpp.PGO.X64","Microsoft.VisualCpp.PGO.Headers","Microsoft.VisualCpp.CRT.x86.Store","Microsoft.VisualCpp.CRT.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.x64.Store","Microsoft.VisualCpp.CRT.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.ClickOnce.Msi","Microsoft.VisualStudio.PackageGroup.VC.Tools.x86","Microsoft.VisualCpp.Tools.HostX86.TargetX64","Microsoft.VisualCpp.VCTip.hostX86.targetX64","Microsoft.VisualCpp.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Tools.HostX86.TargetX86","Microsoft.VisualCpp.VCTip.hostX86.targetX86","Microsoft.VisualCpp.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Tools.Core.Resources","Microsoft.VisualCpp.Tools.Core.x86","Microsoft.VisualCpp.Tools.Common.Utils","Microsoft.VisualCpp.Tools.Common.Utils.Resources","Microsoft.VisualCpp.DIA.SDK","Microsoft.VisualCpp.CRT.x86.Desktop","Microsoft.VisualCpp.CRT.x64.Desktop","Microsoft.VisualCpp.CRT.Source","Microsoft.VisualCpp.CRT.Redist.X86","Microsoft.VisualCpp.CRT.Redist.X64","Microsoft.VisualCpp.CRT.Redist.Resources","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.Redist.14.Latest","Microsoft.VisualCpp.Redist.14.Latest","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.CRT.Headers","Microsoft.VisualStudio.VC.MSBuild.x86.v142","Microsoft.VisualStudio.VC.MSBuild.X86","Microsoft.VisualStudio.VC.MSBuild.X64.v142","Microsoft.VisualStudio.VC.MSBuild.X64","Microsoft.VS.VC.MSBuild.X64.Resources","Microsoft.VisualStudio.VC.MSBuild.ARM.v142","Microsoft.VisualStudio.VC.MSBuild.ARM","Microsoft.VisualStudio.VC.MSBuild.Base","Microsoft.VisualStudio.VC.MSBuild.Base.Resources","Microsoft.VisualStudio.Workload.MSBuildTools","Microsoft.VisualStudio.Component.CoreBuildTools","Microsoft.VisualStudio.Setup.Configuration","Microsoft.VisualStudio.PackageGroup.VsDevCmd","Microsoft.VisualStudio.VsDevCmd.Ext.NetFxSdk","Microsoft.VisualStudio.VsDevCmd.Core.WinSdk","Microsoft.VisualStudio.VsDevCmd.Core.DotNet","Microsoft.VisualStudio.VC.DevCmd","Microsoft.VisualStudio.VC.DevCmd.Resources","Microsoft.VisualStudio.BuildTools.Resources","Microsoft.VisualStudio.Net.Eula.Resources","Microsoft.Build.Dependencies","Microsoft.Build.FileTracker.Msi","Microsoft.Component.MSBuild","Microsoft.PythonTools.BuildCore.Vsix","Microsoft.NuGet.Build.Tasks","Microsoft.VisualStudio.Component.Roslyn.Compiler","Microsoft.CodeAnalysis.Compilers","Microsoft.Net.PackageGroup.4.7.2.Redist","Microsoft.VisualStudio.NativeImageSupport","Microsoft.Build","Microsoft.VisualStudio.PackageGroup.NuGet","Microsoft.VisualStudio.NuGet.BuildTools"]}] diff --git a/deps/npm/node_modules/node-gyp/test/fixtures/VS_2019_Community_workload.txt b/deps/npm/node_modules/node-gyp/test/fixtures/VS_2019_Community_workload.txt new file mode 100644 index 00000000000000..50071c25f189e5 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/test/fixtures/VS_2019_Community_workload.txt @@ -0,0 +1 @@ +[{"path":"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community","version":"16.1.28922.388","packages":["Microsoft.VisualStudio.Workload.NativeDesktop","Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest","Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest","Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest","Microsoft.VisualStudio.VC.Ide.TestAdapterForBoostTest","Microsoft.VisualStudio.Component.VC.ATL","Microsoft.VisualStudio.VC.Ide.ATL","Microsoft.VisualStudio.VC.Ide.ATL.Resources","Microsoft.VisualCpp.ATL.X86","Microsoft.VisualCpp.ATL.X64","Microsoft.VisualCpp.ATL.Source","Microsoft.VisualCpp.ATL.Headers","Microsoft.VisualStudio.Component.VC.CMake.Project","Microsoft.VisualStudio.VC.CMake","Microsoft.VisualStudio.VC.CMake.Project","Microsoft.VisualStudio.VC.ExternalBuildFramework","Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core","Microsoft.VisualStudio.PackageGroup.TestTools.Native","Microsoft.VisualStudio.Component.VC.Redist.14.Latest","Microsoft.VisualStudio.VC.Templates.UnitTest","Microsoft.VisualStudio.VC.UnitTest.Desktop.Build.Core","Microsoft.VisualStudio.TestTools.TestPlatform.V1.CPP","Microsoft.VisualStudio.VC.Templates.UnitTest.Resources","Microsoft.VisualStudio.VC.Templates.Desktop","Microsoft.VisualStudio.Component.Debugger.JustInTime","Microsoft.VisualStudio.Debugger.ImmersiveActivateHelper.Msi","Microsoft.VisualStudio.Debugger.JustInTime","Microsoft.VisualStudio.Debugger.JustInTime.Msi","Microsoft.VisualStudio.Component.Windows10SDK.17763","Win10SDK_10.0.17763","Microsoft.VisualStudio.Component.VC.DiagnosticTools","Microsoft.VisualStudio.Component.Graphics.Tools","Microsoft.VisualStudio.Component.VC.Tools.x86.x64","Microsoft.VisualCpp.CodeAnalysis.Extensions","Microsoft.VisualCpp.CodeAnalysis.Extensions.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86.Resources","Microsoft.VisualCpp.CodeAnalysis.Extensions.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX86","Microsoft.VisualCpp.VCTip.HostX64.TargetX86","Microsoft.VisualCpp.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX64","Microsoft.VisualCpp.VCTip.HostX64.TargetX64","Microsoft.VisualCpp.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX64","Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.PGO.X86","Microsoft.VisualCpp.PGO.X64","Microsoft.VisualCpp.PGO.Headers","Microsoft.VisualCpp.CRT.x86.Store","Microsoft.VisualCpp.CRT.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.x64.Store","Microsoft.VisualCpp.CRT.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x64.OneCore.Desktop","Microsoft.VisualStudio.PackageGroup.VC.Tools.x86","Microsoft.VisualCpp.Tools.HostX86.TargetX64","Microsoft.VisualCpp.VCTip.hostX86.targetX64","Microsoft.VisualCpp.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Tools.HostX86.TargetX86","Microsoft.VisualCpp.VCTip.hostX86.targetX86","Microsoft.VisualCpp.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Tools.Core.Resources","Microsoft.VisualCpp.Tools.Core.x86","Microsoft.VisualCpp.DIA.SDK","Microsoft.VisualCpp.CRT.x86.Desktop","Microsoft.VisualCpp.CRT.x64.Desktop","Microsoft.VisualCpp.CRT.Source","Microsoft.VisualCpp.CRT.Redist.X86","Microsoft.VisualCpp.CRT.Redist.X64","Microsoft.VisualCpp.CRT.Redist.Resources","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.Redist.14.Latest","Microsoft.VisualCpp.Redist.14.Latest","Microsoft.VisualCpp.CRT.Headers","Microsoft.VisualStudio.Graphics.Viewers","Microsoft.VisualStudio.Graphics.Viewers.Resources","Microsoft.VisualStudio.Graphics.Msi","Microsoft.VisualStudio.Graphics.Msi","Microsoft.VisualStudio.Graphics.Analyzer","Microsoft.VisualStudio.Graphics.Analyzer.Targeted","Microsoft.VisualStudio.Graphics.Analyzer.Resources","Microsoft.VisualStudio.Graphics.Appid","Microsoft.VisualStudio.Graphics.Appid.Resources","Microsoft.VisualStudio.Component.VC.CoreIde","Microsoft.VisualStudio.VC.Ide.Pro","Microsoft.VisualStudio.VC.Ide.Pro.Resources","Microsoft.VisualStudio.VC.Templates.Pro","Microsoft.VisualStudio.VC.Templates.Pro.Resources","Microsoft.VisualStudio.VC.Items.Pro","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Reduced","Microsoft.VisualStudio.VC.Ide.x64","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Express","Microsoft.VisualStudio.VC.MSBuild.X64.v142","Microsoft.VisualStudio.VC.MSBuild.X64","Microsoft.VS.VC.MSBuild.X64.Resources","Microsoft.VisualStudio.VC.MSBuild.ARM.v142","Microsoft.VisualStudio.VC.MSBuild.ARM","Microsoft.VisualStudio.VC.MSBuild.x86.v142","Microsoft.VisualStudio.VC.MSBuild.X86","Microsoft.VisualStudio.VC.MSBuild.Base","Microsoft.VisualStudio.VC.MSBuild.Base.Resources","Microsoft.VisualStudio.VC.Ide.WinXPlus","Microsoft.VisualStudio.VC.Ide.Dskx","Microsoft.VisualStudio.VC.Ide.Dskx.Resources","Microsoft.VisualStudio.VC.Ide.Base","Microsoft.VisualStudio.VC.Ide.LanguageService","Microsoft.VisualStudio.VC.Ide.Core","Microsoft.VisualStudio.VC.Ide.Core.Resources","Microsoft.VisualStudio.VC.Ide.VCPkgDatabase","Microsoft.VisualStudio.VC.Ide.ProjectSystem","Microsoft.VisualStudio.VC.Ide.ProjectSystem.Resources","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine.Resources","Microsoft.VisualStudio.VC.Ide.LanguageService.Resources","Microsoft.VisualStudio.VC.Ide.Base.Resources","Component.Microsoft.VisualStudio.LiveShare","Microsoft.VisualStudio.LiveShare","Microsoft.Icecap.Analysis","Microsoft.Icecap.Analysis.Targeted","Microsoft.Icecap.Analysis.Resources","Microsoft.Icecap.Analysis.Resources.Targeted","Microsoft.Icecap.Collection.Msi","Microsoft.Icecap.Collection.Msi.Targeted","Microsoft.Icecap.Collection.Msi.Resources","Microsoft.Icecap.Collection.Msi.Resources.Targeted","Microsoft.DiagnosticsHub.Instrumentation","Microsoft.DiagnosticsHub.CpuSampling.ExternalDependencies","Microsoft.DiagnosticsHub.CpuSampling","Microsoft.DiagnosticsHub.CpuSampling.Targeted","Microsoft.PackageGroup.DiagnosticsHub.Platform","Microsoft.DiagnosticsHub.Runtime.ExternalDependencies","Microsoft.DiagnosticsHub.Runtime.ExternalDependencies.Targeted","Microsoft.DiagnosticsHub.Collection.ExternalDependencies.x64","Microsoft.DiagnosticsHub.Collection.StopService.Uninstall","Microsoft.DiagnosticsHub.Runtime","Microsoft.DiagnosticsHub.Runtime.Targeted","Microsoft.DiagnosticsHub.Collection","Microsoft.DiagnosticsHub.Collection.Service","Microsoft.DiagnosticsHub.Collection.StopService.Install","Microsoft.VisualStudio.Component.IntelliCode","Microsoft.VisualStudio.IntelliCode","Microsoft.Net.4.TargetingPack","Microsoft.VisualStudio.VC.Ide.ResourceEditor","Microsoft.VisualStudio.VC.Ide.ResourceEditor.Resources","Microsoft.VisualStudio.PackageGroup.TestTools.CodeCoverage","Microsoft.VisualStudio.PackageGroup.TestTools.Core","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.V2.CLI","Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.V1.CLI","Microsoft.VisualStudio.TestTools.TestPlatform.V1.CLI","Microsoft.VisualStudio.TestTools.Pex.Common","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.Legacy","Microsoft.VisualStudio.PackageGroup.MinShell.Interop","Microsoft.VisualStudio.TestTools.TP.Legacy.Tips.Msi","Microsoft.VisualStudio.TestTools.TP.Legacy.Tips.Common","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Tips","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Tips.Resources","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.TestTools","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Professional","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Common","Microsoft.VisualStudio.TestTools.TP.Legacy.Common.Res","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core.Resources","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Agent","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.IDE","Microsoft.VisualStudio.TestTools.TestWIExtension","Microsoft.VisualStudio.TestTools.TestPlatform.IDE","Microsoft.VisualStudio.PackageGroup.TestTools.DataCollectors","Microsoft.VisualStudio.LiveShareApi","Microsoft.VisualStudio.Component.TextTemplating","Microsoft.VisualStudio.TextTemplating.MSBuild","Microsoft.VisualStudio.TextTemplating.Integration","Microsoft.VisualStudio.TextTemplating.Core","Microsoft.VisualStudio.TextTemplating.Integration.Resources","Microsoft.VisualCpp.CRT.ClickOnce.Msi","Microsoft.Component.MSBuild","Microsoft.NuGet.Build.Tasks","Microsoft.DiagnosticsHub.KB2882822.Win7","Microsoft.VisualStudio.PackageGroup.Debugger.Script","Microsoft.VisualStudio.Debugger.Script.Msi","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions","Microsoft.VisualStudio.ProTools","sqlsysclrtypes","sqlsysclrtypes","SQLCommon","Microsoft.VisualStudio.ProTools.Resources","Microsoft.VisualStudio.WebToolsExtensions","Microsoft.VisualStudio.WebTools","Microsoft.VisualStudio.WebTools.Resources","Microsoft.VisualStudio.WebTools.MSBuild","Microsoft.VisualStudio.WebTools.WSP.FSA","Microsoft.VisualStudio.WebTools.WSP.FSA.Resources","Microsoft.VisualStudio.VC.Ide.MDD","Microsoft.VisualStudio.VisualC.Logging","Microsoft.WebTools.Shared","Microsoft.WebTools.DotNet.Core.ItemTemplates","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.Redist.14","Microsoft.Windows.UniversalCRT.Msu.7","Microsoft.VisualStudio.StaticAnalysis","Microsoft.VisualStudio.StaticAnalysis.Resources","Microsoft.VisualStudio.Component.Roslyn.Compiler","Microsoft.CodeAnalysis.Compilers","Microsoft.VisualStudio.Component.NuGet","Microsoft.CredentialProvider","Microsoft.VisualStudio.NuGet.PowershellBindingRedirect","Microsoft.VisualStudio.NuGet.Licenses","Microsoft.VisualStudio.PackageGroup.Community","Microsoft.VisualStudio.Community.Extra.Resources","Microsoft.VisualStudio.Community.Extra","Microsoft.VisualStudio.PackageGroup.Core","Microsoft.VisualStudio.CodeSense.Community","Microsoft.VisualStudio.TestTools.TeamFoundationClient","Microsoft.VisualStudio.PackageGroup.Debugger.Core","Microsoft.VisualStudio.PackageGroup.Debugger.TimeTravel.Record","Microsoft.VisualStudio.Debugger.TimeTravel.Runtime","Microsoft.VisualStudio.Debugger.TimeTravel.Runtime","Microsoft.VisualStudio.Debugger.TimeTravel.Agent","Microsoft.VisualStudio.Debugger.TimeTravel.Record","Microsoft.VisualStudio.Debugger.VSCodeDebuggerHost","Microsoft.VisualStudio.VC.Ide.Debugger","Microsoft.VisualStudio.VC.Ide.Debugger.Concord","Microsoft.VisualStudio.VC.Ide.Debugger.Concord.Resources","Microsoft.VisualStudio.VC.Ide.Debugger.Resources","Microsoft.VisualStudio.VC.Ide.Common","Microsoft.VisualStudio.VC.Ide.Common.Resources","Microsoft.VisualStudio.Debugger.Parallel","Microsoft.VisualStudio.Debugger.Parallel.Resources","Microsoft.VisualStudio.Debugger.CollectionAgents","Microsoft.VisualStudio.Debugger.Managed","Microsoft.CodeAnalysis.VisualStudio.Setup","Microsoft.CodeAnalysis.ExpressionEvaluator","Microsoft.VisualStudio.Debugger.Concord.Managed","Microsoft.VisualStudio.Debugger.Concord.Managed.Resources","Microsoft.VisualStudio.Debugger.Managed.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Remote.DbgHelp.Win8","Microsoft.VisualStudio.Debugger.Concord.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Remote.DbgHelp.Win8","Microsoft.VisualStudio.Debugger.Concord.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger","Microsoft.VisualStudio.Debugger.Package.DiagHub.Client.VSx86","Microsoft.VisualStudio.Debugger.Remote.DiagHub.Client","Microsoft.VisualStudio.Debugger.Remote.DiagHub.Client","Microsoft.VisualStudio.Debugger.DbgHelp.Win8","Microsoft.VisualStudio.VC.MSVCDis","Microsoft.VisualStudio.ScriptedHost","Microsoft.VisualStudio.ScriptedHost.Targeted","Microsoft.VisualStudio.ScriptedHost.Resources","Microsoft.IntelliTrace.DiagnosticsHub","Microsoft.VisualStudio.Debugger.Concord","Microsoft.VisualStudio.Debugger.Concord.Resources","Microsoft.VisualStudio.Debugger.Resources","Microsoft.PackageGroup.ClientDiagnostics","Microsoft.VisualStudio.AppResponsiveness","Microsoft.VisualStudio.AppResponsiveness.Targeted","Microsoft.VisualStudio.AppResponsiveness.Resources","Microsoft.VisualStudio.ClientDiagnostics","Microsoft.VisualStudio.ClientDiagnostics.Targeted","Microsoft.VisualStudio.ClientDiagnostics.Resources","Microsoft.VisualStudio.PackageGroup.CommunityCore","Microsoft.VisualStudio.ProjectSystem.Full","Microsoft.VisualStudio.ProjectSystem","Microsoft.VisualStudio.Community.x86","Microsoft.VisualStudio.Community.x64","Microsoft.VisualStudio.Community","Microsoft.IntelliTrace.CollectorCab","Microsoft.VisualStudio.Community.Resources","Microsoft.VisualStudio.Net.Eula.Resources","Microsoft.VisualStudio.WebSiteProject.DTE","Microsoft.MSHtml","Microsoft.VisualStudio.Platform.CallHierarchy","Microsoft.VisualStudio.Community.Msi.Resources","Microsoft.VisualStudio.Community.Msi","Microsoft.VisualStudio.Devenv.Msi","Microsoft.VisualStudio.MinShell.Interop.Msi","Microsoft.VisualStudio.Editors","Microsoft.VisualStudio.Product.Community","Microsoft.VisualStudio.Workload.CoreEditor","Microsoft.VisualStudio.Component.CoreEditor","Microsoft.VisualStudio.PackageGroup.CoreEditor","Microsoft.VisualCpp.Tools.Common.UtilsPrereq","Microsoft.VisualCpp.Tools.Common.Utils","Microsoft.VisualCpp.Tools.Common.Utils.Resources","Microsoft.VisualStudio.PackageGroup.VsDevCmd","Microsoft.VisualStudio.VsDevCmd.Ext.NetFxSdk","Microsoft.VisualStudio.VsDevCmd.Core.WinSdk","Microsoft.VisualStudio.VsDevCmd.Core.DotNet","Microsoft.VisualStudio.VC.DevCmd","Microsoft.VisualStudio.VC.DevCmd.Resources","Microsoft.VisualStudio.VirtualTree","Microsoft.VisualStudio.PackageGroup.Progression","Microsoft.VisualStudio.PerformanceProvider","Microsoft.VisualStudio.GraphModel","Microsoft.VisualStudio.GraphProvider","Microsoft.DiaSymReader","Microsoft.Build.Dependencies","Microsoft.Build.FileTracker.Msi","Microsoft.Build","Microsoft.VisualStudio.PackageGroup.NuGet","Microsoft.VisualStudio.NuGet.Core","Microsoft.VisualStudio.TextMateGrammars","Microsoft.VisualStudio.PackageGroup.TeamExplorer.Common","Microsoft.VisualStudio.TeamExplorer","Microsoft.ServiceHub","Microsoft.VisualStudio.ProjectServices","Microsoft.VisualStudio.OpenFolder.VSIX","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.PackageGroup.MinShell","Microsoft.VisualStudio.MinShell.Interop","Microsoft.VisualStudio.Log","Microsoft.VisualStudio.Log.Targeted","Microsoft.VisualStudio.Log.Resources","Microsoft.VisualStudio.Finalizer","Microsoft.VisualStudio.Devenv","Microsoft.VisualStudio.Devenv.Resources","Microsoft.VisualStudio.CoreEditor","Microsoft.VisualStudio.Platform.NavigateTo","Microsoft.VisualStudio.Connected","Microsoft.VisualStudio.PerfLib","Microsoft.VisualStudio.Connected.Resources","Microsoft.VisualStudio.MinShell","Microsoft.VisualStudio.Setup.Configuration","Microsoft.VisualStudio.MinShell.Platform","Microsoft.VisualStudio.MinShell.Platform.Resources","Microsoft.VisualStudio.MefHosting","Microsoft.VisualStudio.MefHosting.Resources","Microsoft.VisualStudio.Initializer","Microsoft.VisualStudio.ExtensionManager","Microsoft.VisualStudio.Platform.Editor","Microsoft.VisualStudio.MinShell.x86","Microsoft.VisualStudio.NativeImageSupport","Microsoft.VisualStudio.MinShell.Msi","Microsoft.VisualStudio.MinShell.Msi.Resources","Microsoft.VisualStudio.LanguageServer","Microsoft.VisualStudio.Devenv.Config","Microsoft.VisualStudio.MinShell.Resources","Microsoft.Net.PackageGroup.4.7.2.Redist","Microsoft.Net.4.7.2.FullRedist","Microsoft.VisualStudio.Branding.Community"]}] diff --git a/deps/npm/node_modules/node-gyp/test/fixtures/VS_2019_Preview.txt b/deps/npm/node_modules/node-gyp/test/fixtures/VS_2019_Preview.txt new file mode 100644 index 00000000000000..806509e7ce8652 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/test/fixtures/VS_2019_Preview.txt @@ -0,0 +1 @@ +[{"path":"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Preview","version":"16.0.28608.199","packages":["Microsoft.VisualStudio.Product.Enterprise","Microsoft.VisualStudio.Workload.NativeDesktop","Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest","Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest","Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest","Microsoft.VisualStudio.VC.Ide.TestAdapterForBoostTest","Microsoft.VisualStudio.Component.VC.ATL","Microsoft.VisualStudio.VC.Ide.ATL","Microsoft.VisualStudio.VC.Ide.ATL.Resources","Microsoft.VisualCpp.ATL.X86","Microsoft.VisualCpp.ATL.X64","Microsoft.VisualCpp.ATL.Source","Microsoft.VisualCpp.ATL.Headers","Microsoft.VisualStudio.Component.VC.CMake.Project","Microsoft.VisualStudio.VC.CMake","Microsoft.VisualStudio.VC.CMake.Project","Microsoft.VisualStudio.VC.ExternalBuildFramework","Microsoft.VisualStudio.Component.VC.DiagnosticTools","Microsoft.VisualStudio.Component.Graphics.Tools","Microsoft.VisualStudio.Graphics.Viewers","Microsoft.VisualStudio.Graphics.Viewers.Resources","Microsoft.VisualStudio.Graphics.EnableTools","Microsoft.VisualStudio.Graphics.Msi","Microsoft.VisualStudio.Graphics.Msi","Microsoft.VisualStudio.Graphics.Analyzer","Microsoft.VisualStudio.Graphics.Analyzer.Targeted","Microsoft.VisualStudio.Graphics.Analyzer.Resources","Microsoft.VisualStudio.Graphics.Appid","Microsoft.VisualStudio.Graphics.Appid.Resources","Microsoft.VisualStudio.Component.Windows10SDK.17763","Win10SDK_10.0.17763","Microsoft.VisualStudio.Component.VC.Tools.x86.x64","Microsoft.VisualCpp.CodeAnalysis.Extensions","Microsoft.VisualCpp.CodeAnalysis.Extensions.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86.Resources","Microsoft.VisualCpp.CodeAnalysis.Extensions.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX86","Microsoft.VisualCpp.VCTip.HostX64.TargetX86","Microsoft.VisualCpp.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX64","Microsoft.VisualCpp.VCTip.HostX64.TargetX64","Microsoft.VisualCpp.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX64","Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.PGO.X86","Microsoft.VisualCpp.PGO.X64","Microsoft.VisualCpp.PGO.Headers","Microsoft.VisualCpp.CRT.x86.Store","Microsoft.VisualCpp.CRT.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.x64.Store","Microsoft.VisualCpp.CRT.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x64.OneCore.Desktop","Microsoft.VisualStudio.PackageGroup.VC.Tools.x86","Microsoft.VisualCpp.Tools.HostX86.TargetX64","Microsoft.VisualCpp.VCTip.hostX86.targetX64","Microsoft.VisualCpp.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Tools.HostX86.TargetX86","Microsoft.VisualCpp.VCTip.hostX86.targetX86","Microsoft.VisualCpp.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Tools.Core.Resources","Microsoft.VisualCpp.Tools.Core.x86","Microsoft.VisualCpp.DIA.SDK","Microsoft.VisualCpp.CRT.x86.Desktop","Microsoft.VisualCpp.CRT.x64.Desktop","Microsoft.VisualCpp.CRT.Source","Microsoft.VisualCpp.CRT.Redist.X86","Microsoft.VisualCpp.CRT.Redist.X64","Microsoft.VisualCpp.CRT.Redist.Resources","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.CRT.Headers","Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core","Microsoft.VisualStudio.PackageGroup.TestTools.Native","Microsoft.VisualStudio.ComponentGroup.ArchitectureTools.Native","Microsoft.VisualStudio.Component.ClassDesigner","Microsoft.VisualStudio.ClassDesigner","Microsoft.VisualStudio.ClassDesigner.Resources","Microsoft.VisualStudio.Component.VC.Redist.14.Latest","Microsoft.VisualCpp.Redist.14.Latest","Microsoft.VisualCpp.Redist.14.Latest","Microsoft.VisualStudio.VC.Templates.UnitTest","Microsoft.VisualStudio.VC.UnitTest.Desktop.Build.Core","Microsoft.VisualStudio.TestTools.TestPlatform.V1.CPP","Microsoft.VisualStudio.VC.Templates.UnitTest.Resources","Microsoft.VisualStudio.VC.Templates.Desktop","Microsoft.VisualStudio.Component.VC.CoreIde","Microsoft.VisualStudio.VC.Ide.Pro","Microsoft.VisualStudio.VC.Ide.Pro.Resources","Microsoft.VisualStudio.VC.Templates.Pro","Microsoft.VisualStudio.VC.Templates.Pro.Resources","Microsoft.VisualStudio.VC.Items.Pro","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Reduced","Microsoft.VisualStudio.VC.Ide.x64","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Express","Microsoft.VisualStudio.VC.MSBuild.X64.v142","Microsoft.VisualStudio.VC.MSBuild.X64","Microsoft.VS.VC.MSBuild.X64.Resources","Microsoft.VisualStudio.VC.MSBuild.ARM.v142","Microsoft.VisualStudio.VC.MSBuild.ARM","Microsoft.VisualStudio.VC.MSBuild.x86.v142","Microsoft.VisualStudio.VC.MSBuild.X86","Microsoft.VisualStudio.VC.MSBuild.Base","Microsoft.VisualStudio.VC.MSBuild.Base.Resources","Microsoft.VisualStudio.VC.Ide.WinXPlus","Microsoft.VisualStudio.VC.Ide.Dskx","Microsoft.VisualStudio.VC.Ide.Dskx.Resources","Microsoft.VisualStudio.VC.Ide.Base","Microsoft.VisualStudio.VC.Ide.LanguageService","Microsoft.VisualStudio.VC.Ide.Core","Microsoft.VisualStudio.VC.Ide.Core.Resources","Microsoft.VisualStudio.VC.Ide.VCPkgDatabase","Microsoft.VisualStudio.VC.Ide.Progression.Enterprise","Microsoft.VisualStudio.VC.Ide.ProjectSystem","Microsoft.VisualStudio.VC.Ide.ProjectSystem.Resources","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine.Resources","Microsoft.VisualStudio.VC.Ide.LanguageService.Resources","Microsoft.VisualStudio.VC.Ide.Base.Resources","Microsoft.VisualStudio.Component.CodeMap","Microsoft.VisualStudio.Component.GraphDocument","Microsoft.VisualStudio.Vmp","Microsoft.VisualStudio.GraphDocument","Microsoft.VisualStudio.GraphDocument.Resources","Microsoft.VisualStudio.CodeMap","Microsoft.VisualStudio.Component.SQL.LocalDB.Runtime","Microsoft.VisualStudio.Component.SQL.NCLI","sqllocaldb","sqlncli","Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions","Microsoft.VisualStudio.WebToolsExtensions","Microsoft.VisualStudio.WebTools","Microsoft.VisualStudio.WebTools.Resources","Microsoft.VisualStudio.WebTools.MSBuild","Microsoft.VisualStudio.PackageGroup.Debugger.Script","Microsoft.VisualStudio.Debugger.Script.Msi","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.VC.Ide.MDD","Microsoft.VisualStudio.Component.NuGet","Microsoft.CredentialProvider","Component.Microsoft.VisualStudio.LiveShare","Microsoft.VisualStudio.LiveShare","Microsoft.VisualStudio.Component.Debugger.JustInTime","Microsoft.VisualStudio.Debugger.ImmersiveActivateHelper.Msi","Microsoft.VisualStudio.Debugger.JustInTime","Microsoft.VisualStudio.Debugger.JustInTime.Msi","Microsoft.VisualStudio.Component.IntelliTrace.FrontEnd","Microsoft.IntelliTrace.DiagnosticsHubAgent.Targeted","Microsoft.IntelliTrace.Debugger","Microsoft.IntelliTrace.Debugger.Targeted","Microsoft.IntelliTrace.FrontEnd","Microsoft.DiagnosticsHub.Instrumentation","Microsoft.DiagnosticsHub.CpuSampling","Microsoft.DiagnosticsHub.CpuSampling.Targeted","Microsoft.PackageGroup.DiagnosticsHub.Platform","Microsoft.DiagnosticsHub.Collection.StopService.Uninstall","Microsoft.DiagnosticsHub.Runtime","Microsoft.DiagnosticsHub.Runtime.Targeted","Microsoft.DiagnosticsHub.Runtime.Resources","Microsoft.DiagnosticsHub.Collection","Microsoft.DiagnosticsHub.Collection.Service","Microsoft.DiagnosticsHub.Collection.StopService.Install","Microsoft.VisualStudio.Dsl.GraphObject","Microsoft.Net.4.TargetingPack","Microsoft.VisualStudio.VC.Ide.ResourceEditor","Microsoft.VisualStudio.VC.Ide.ResourceEditor.Resources","Microsoft.VisualStudio.NuGet.Licenses","Microsoft.WebTools.Shared","Microsoft.VisualStudio.WebToolsExtensions.DotNet.Core.ItemTemplates","Microsoft.VisualStudio.Component.TextTemplating","Microsoft.VisualStudio.TextTemplating.MSBuild","Microsoft.VisualStudio.TextTemplating.Integration","Microsoft.VisualStudio.TextTemplating.Core","Microsoft.VisualStudio.TextTemplating.Integration.Resources","Microsoft.VisualStudio.ProTools","sqlsysclrtypes","sqlsysclrtypes","SQLCommon","Microsoft.VisualStudio.ProTools.Resources","Microsoft.VisualStudio.NuGet.Core","Microsoft.VisualStudio.PackageGroup.TestTools.CodeCoverage","Microsoft.VisualStudio.PackageGroup.IntelliTrace.Core","Microsoft.IntelliTrace.Core","Microsoft.IntelliTrace.Core.Concord","Microsoft.IntelliTrace.Core.Targeted","Microsoft.IntelliTrace.ProfilerProxy.Msi.x64","Microsoft.IntelliTrace.ProfilerProxy.Msi","Microsoft.VisualStudio.TestTools.DynamicCodeCoverage","Microsoft.VisualStudio.TestTools.CodeCoverage.Msi","Microsoft.VisualStudio.TestTools.CodeCoverage","Microsoft.Icecap.Analysis","Microsoft.Icecap.Analysis.Targeted","Microsoft.Icecap.Analysis.Resources","Microsoft.Icecap.Analysis.Resources.Targeted","Microsoft.Icecap.Collection.Msi","Microsoft.Icecap.Collection.Msi.Targeted","Microsoft.Icecap.Collection.Msi.Resources","Microsoft.Icecap.Collection.Msi.Resources.Targeted","Microsoft.VisualStudio.PackageGroup.TestTools.Core","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.V2.CLI","Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.V1.CLI","Microsoft.VisualStudio.TestTools.TestPlatform.V1.CLI","Microsoft.VisualStudio.TestTools.Pex.Common","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.Legacy","Microsoft.VisualStudio.PackageGroup.MinShell.Interop","Microsoft.VisualStudio.TestTools.TP.Legacy.Tips.Msi","Microsoft.VisualStudio.TestTools.TP.Legacy.Tips.Common","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Tips","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Tips.Resources","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.TestTools","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Remote","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Professional","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core.Premium","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Common","Microsoft.VisualStudio.TestTools.TP.Legacy.Common.Res","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core.Resources","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Agent","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.IDE","Microsoft.VisualStudio.TestTools.TestWIExtension","Microsoft.VisualStudio.TestTools.TestPlatform.IDE","Microsoft.VisualStudio.PackageGroup.TestTools.DataCollectors","Microsoft.VisualStudio.TestTools.NE.Msi.Targeted","Microsoft.VisualStudio.TestTools.NetworkEmulation","Microsoft.VisualStudio.TestTools.DataCollectors","Microsoft.VisualCpp.CRT.ClickOnce.Msi","Microsoft.VisualStudio.WebTools.WSP.FSA","Microsoft.VisualStudio.WebTools.WSP.FSA.Resources","Microsoft.VisualStudio.Component.Static.Analysis.Tools","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.Redist.14","Microsoft.VisualStudio.StaticAnalysis","Microsoft.VisualStudio.StaticAnalysis.Resources","Microsoft.VisualStudio.PackageGroup.Community","Microsoft.VisualStudio.Community.Extra.Resources","Microsoft.VisualStudio.Community.Extra","Microsoft.VisualStudio.PackageGroup.Core","Microsoft.VisualStudio.CodeSense","Microsoft.VisualStudio.CodeSense.Community","Microsoft.VisualStudio.TestTools.TeamFoundationClient","Microsoft.VisualStudio.PackageGroup.Debugger.Core","Microsoft.VisualStudio.PackageGroup.Debugger.TimeTravel.Record","Microsoft.VisualStudio.Debugger.TimeTravel.Runtime","Microsoft.VisualStudio.Debugger.TimeTravel.Runtime","Microsoft.VisualStudio.Debugger.TimeTravel.Agent","Microsoft.VisualStudio.Debugger.TimeTravel.Record","Microsoft.VisualStudio.Debugger.VSCodeDebuggerHost","Microsoft.VisualStudio.VC.Ide.Debugger","Microsoft.VisualStudio.VC.Ide.Debugger.Concord","Microsoft.VisualStudio.VC.Ide.Debugger.Concord.Resources","Microsoft.VisualStudio.VC.Ide.Debugger.Resources","Microsoft.VisualStudio.VC.Ide.Common","Microsoft.VisualStudio.VC.Ide.Common.Resources","Microsoft.VisualStudio.Debugger.Parallel","Microsoft.VisualStudio.Debugger.Parallel.Resources","Microsoft.VisualStudio.Debugger.CollectionAgents","Microsoft.VisualStudio.Debugger.Managed","Microsoft.VisualStudio.Debugger.Concord.Managed","Microsoft.VisualStudio.Debugger.Concord.Managed.Resources","Microsoft.VisualStudio.Debugger.Managed.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger","Microsoft.VisualStudio.Debugger.Package.DiagHub.Client.VSx86","Microsoft.VisualStudio.Debugger.Remote.DiagHub.Client","Microsoft.VisualStudio.Debugger.Remote.DiagHub.Client","Microsoft.VisualStudio.VC.MSVCDis","Microsoft.VisualStudio.ScriptedHost","Microsoft.VisualStudio.ScriptedHost.Targeted","Microsoft.VisualStudio.ScriptedHost.Resources","Microsoft.IntelliTrace.DiagnosticsHub","Microsoft.VisualStudio.Debugger.Concord","Microsoft.VisualStudio.Debugger.Concord.Resources","Microsoft.VisualStudio.Debugger.Resources","Microsoft.PackageGroup.ClientDiagnostics","Microsoft.VisualStudio.AppResponsiveness","Microsoft.VisualStudio.AppResponsiveness.Targeted","Microsoft.VisualStudio.AppResponsiveness.Resources","Microsoft.VisualStudio.ClientDiagnostics","Microsoft.VisualStudio.ClientDiagnostics.Targeted","Microsoft.VisualStudio.ClientDiagnostics.Resources","Microsoft.VisualStudio.PackageGroup.ProfessionalCore","Microsoft.VisualStudio.Professional","Microsoft.VisualStudio.Professional.Msi","Microsoft.VisualStudio.PackageGroup.EnterpriseCore","Microsoft.VisualStudio.Enterprise.Msi","Microsoft.VisualStudio.Enterprise","Microsoft.ShDocVw","Microsoft.VisualStudio.PackageGroup.CommunityCore","Microsoft.VisualStudio.ProjectSystem.Full","Microsoft.VisualStudio.ProjectSystem","Microsoft.VisualStudio.Community.x86","Microsoft.VisualStudio.Community.x64","Microsoft.VisualStudio.Community","Microsoft.IntelliTrace.CollectorCab","Microsoft.VisualStudio.Community.Resources","Microsoft.VisualStudio.WebSiteProject.DTE","Microsoft.MSHtml","Microsoft.VisualStudio.Platform.CallHierarchy","Microsoft.VisualStudio.Community.Msi.Resources","Microsoft.VisualStudio.Community.Msi","Microsoft.VisualStudio.Devenv.Msi","Microsoft.VisualStudio.MinShell.Interop.Msi","Microsoft.VisualStudio.Editors","Microsoft.VisualStudio.Net.Eula.Resources","Microsoft.CodeAnalysis.ExpressionEvaluator","Microsoft.CodeAnalysis.VisualStudio.Setup","Microsoft.Component.MSBuild","Microsoft.NuGet.Build.Tasks","Microsoft.VisualStudio.Component.Roslyn.Compiler","Microsoft.CodeAnalysis.Compilers","Microsoft.VisualStudio.Workload.CoreEditor","Microsoft.VisualStudio.Component.CoreEditor","Microsoft.VisualStudio.PackageGroup.CoreEditor","Microsoft.VisualCpp.Tools.Common.UtilsPrereq","Microsoft.VisualCpp.Tools.Common.Utils","Microsoft.VisualCpp.Tools.Common.Utils.Resources","Microsoft.VisualStudio.PackageGroup.VsDevCmd","Microsoft.VisualStudio.VsDevCmd.Ext.NetFxSdk","Microsoft.VisualStudio.VsDevCmd.Core.WinSdk","Microsoft.VisualStudio.VsDevCmd.Core.DotNet","Microsoft.VisualStudio.VC.DevCmd","Microsoft.VisualStudio.VC.DevCmd.Resources","Microsoft.VisualStudio.VirtualTree","Microsoft.VisualStudio.PackageGroup.Progression","Microsoft.VisualStudio.PerformanceProvider","Microsoft.VisualStudio.GraphModel","Microsoft.VisualStudio.GraphProvider","Microsoft.DiaSymReader","Microsoft.Build.Dependencies","Microsoft.Build.FileTracker.Msi","Microsoft.Build","Microsoft.VisualStudio.TextMateGrammars","Microsoft.VisualStudio.PackageGroup.TeamExplorer.Common","Microsoft.VisualStudio.TeamExplorer","Microsoft.ServiceHub","Microsoft.VisualStudio.ProjectServices","Microsoft.VisualStudio.SLNX.VSIX","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.PackageGroup.MinShell","Microsoft.VisualStudio.MinShell.Interop","Microsoft.VisualStudio.Log","Microsoft.VisualStudio.Log.Targeted","Microsoft.VisualStudio.Log.Resources","Microsoft.VisualStudio.Finalizer","Microsoft.VisualStudio.Devenv","Microsoft.VisualStudio.Devenv.Resources","Microsoft.VisualStudio.CoreEditor","Microsoft.VisualStudio.Platform.NavigateTo","Microsoft.VisualStudio.Connected","Microsoft.VisualStudio.Connected.Resources","Microsoft.VisualStudio.MinShell","Microsoft.VisualStudio.Setup.Configuration","Microsoft.VisualStudio.Platform.Search","Microsoft.VisualStudio.MinShell.Platform","Microsoft.VisualStudio.MinShell.Platform.Resources","Microsoft.VisualStudio.MefHosting","Microsoft.VisualStudio.MefHosting.Resources","Microsoft.VisualStudio.Initializer","Microsoft.VisualStudio.ExtensionManager","Microsoft.VisualStudio.Platform.Editor","Microsoft.VisualStudio.MinShell.x86","Microsoft.VisualStudio.NativeImageSupport","Microsoft.VisualStudio.MinShell.Msi","Microsoft.VisualStudio.MinShell.Msi.Resources","Microsoft.VisualStudio.LanguageServer","Microsoft.VisualStudio.Devenv.Config","Microsoft.VisualStudio.MinShell.Resources","Microsoft.Net.PackageGroup.4.7.2.Redist","Microsoft.VisualStudio.Branding.Enterprise"]}] diff --git a/deps/npm/node_modules/node-gyp/test/fixtures/ca.crt b/deps/npm/node_modules/node-gyp/test/fixtures/ca.crt index 9d2755a74f6cde..aaf97575b18b4c 100644 --- a/deps/npm/node_modules/node-gyp/test/fixtures/ca.crt +++ b/deps/npm/node_modules/node-gyp/test/fixtures/ca.crt @@ -1,21 +1,21 @@ -----BEGIN CERTIFICATE----- -MIIDbzCCAlcCAmm6MA0GCSqGSIb3DQEBCwUAMH0xCzAJBgNVBAYTAlVTMQswCQYD -VQQIDAJDQTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzEZMBcGA1UECgwQU3Ryb25n -TG9vcCwgSW5jLjESMBAGA1UECwwJU3Ryb25nT3BzMRowGAYDVQQDDBFjYS5zdHJv -bmdsb29wLmNvbT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HNBWc6oicr3YK/IDb0cp9kiLvnUu1pHy+LWQGqtC +rceJuGsnJEQ= -----END CERTIFICATE----- diff --git a/deps/npm/node_modules/node-gyp/test/fixtures/server.crt b/deps/npm/node_modules/node-gyp/test/fixtures/server.crt index fe13bb96c599cf..5d0c440e0788ac 100644 --- a/deps/npm/node_modules/node-gyp/test/fixtures/server.crt +++ b/deps/npm/node_modules/node-gyp/test/fixtures/server.crt @@ -1,19 +1,21 @@ -----BEGIN CERTIFICATE----- -MIIDJjCCAg4CAhnOMA0GCSqGSIb3DQEBBQUAMH0xCzAJBgNVBAYTAlVTMQswCQYD -VQQIDAJDQTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzEZMBcGA1UECgwQU3Ryb25n -TG9vcCwgSW5jLjESMBAGA1UECwwJU3Ryb25nT3BzMRowGAYDVQQDDBFjYS5zdHJv -bmdsb29wLmNvbTAeFw0xNTEyMDgyMzM1MzNaFw00MzA0MjQyMzM1MzNaMBkxFzAV -BgNVBAMMDnN0cm9uZ2xvb3AuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEAwOYI7OZ2FX/YjRgLZoDQlbPc5UZXU/j0e1wwiJNPtPEax9Y5Uoza0Pnt -Ikzkc2SfvQ+IJrhXo385tI0W5juuqbHnE7UrjUuPjUX6NHevkxcs/flmjan5wnZM -cPsGhH71WDuUEEflvZihf2Se2x+xgZtMhc5XGmVmRuZFYKvkgUhA2/w8/QrK+jPT -n9QRJxZjWNh2RBdC1B7u4jffSmOSUljYFH1I2eTeY+Rdi6YUIYSU9gEoZxsv3Tia -SomfMF5jt2Mouo6MzA+IhLvvFjcrcph1Qxgi9RkfdCMMd+Ipm9YWELkyG1bDRpQy -0iyHD4gvVsAqz1Y2KdRSdc3Kt+nTqwIDAQABoxkwFzAVBgNVHREEDjAMhwQAAAAA -hwR/AAABMA0GCSqGSIb3DQEBBQUAA4IBAQAhy4J0hML3NgmDRHdL5/iTucBe22Mf -jJjg2aif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HA2VUHDllcNhpDWlmInXA+I +tHdGZHCp95ohqpCPgQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQCdvYj6CD0ZLwT2 +3t1r+deC3TJuHlNVSeKeT7wIfFnh2FW5riGV0q/w6eXPLTHjuiS6YmpAAbdNUgX/ +sq64FqI2RLpX6pgY5yB0SKopMcJxMLKqmF4zHpIHxtYN5EmN3PR0vehneBR/nZ2T +3ikvWD5JeXlm7Dfw+tjijdxM/sEoDWErGup4mMKMd1s5s830p+ITJUa50d0DLFdH +mqPSbUZF8mMPwGJd+nu1Ht3gTLtK7+gYJgGtXMJmGC0Qg77EJHDB2NbotgDGNmSU +1H9BpAeFHHIcbh2Rr7kkTvnh/c03vFe+CsDZmezcmRpRzW1fKj3YbfqBxU4XwJrL +a5T/N9xU -----END CERTIFICATE----- diff --git a/deps/npm/node_modules/node-gyp/test/fixtures/server.key b/deps/npm/node_modules/node-gyp/test/fixtures/server.key index f8227f4c0c2d43..a8447391e02e2f 100644 --- a/deps/npm/node_modules/node-gyp/test/fixtures/server.key +++ b/deps/npm/node_modules/node-gyp/test/fixtures/server.key @@ -1,28 +1,27 @@ ------BEGIN PRIVATE KEY----- -MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDA5gjs5nYVf9iN -GAtmgNCVs9zlRldT+PR7XDCIk0+08RrH1jlSjNrQ+e0iTORzZJ+9D4gmuFejfzm0 -jRbmO66psecTtSuNS4+NRfo0d6+TFyz9+WaNqfnCdkxw+waEfvVYO5QQR+W9mKF/ -ZJ7bH7GBm0yFzlcaZWZG5kVgq+SBSEDb/Dz9Csr6M9Of1BEnFmNY2HZEF0LUHu7i -N99KY5JSWNgUfUjZ5N5j5F2LphQhhJT2AShnGy/dOJpKiZ8wXmO3Yyi6jozMD4iE -u+8WNytymHVDGCL1GR90Iwx34imb1hYQuTIbVsNGlDLSLIcPiC9WwCrPVjYp1FJ1 -zcq36dOrAgMBAAECggEACg60Xm2xsHNG/ixHw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8CgYEA7Itw +UM37URma08Bj9VTMoL9ZCyURewX+ZLDb2+O8sXGXJs28i1RkE6PTBlnRmedn+Jjk +byzQ5Cs5wA5uMbhYTA7kgXOs1bvgQqmlLmyL6FfHkucoMhr2Di7VeGf4OxE26JZ8 +JdY4+1MOyI3A2rR8WU+GmHxy0ay4K2xe6W0vsi8CgYBoGLEKIPDe8jkDtgOYivOT +jT9MaLXALB+dc8DIpU4swpHTaxP6qyUIrbcReTEolJSU6Ci16BxiwRkVU8D3yMYJ +VbfSX/zE3fh37FUaToa/nXHN0SjJBZdpeXhcHE//PIgaf48zxKNvnhYJmPB/luQ+ +m/PRaMsnOzfCM2JniYEe7QKBgGwjnxhB4tgDtaWCue/pcZc3gzS2IJS2e8N6mzie +l6Ajhu+FdOHZldrotUuc+la61OxwsVYmDeWR4VftAPGYDj3PPSX1RRl9R5wSRGLB +2wBASQvew6CMdNqtDIh8N56BUzHnwh/mHKzBHuwO6hDSHFsUITtLAY7bwGKRq55Z +fUmfAoGBANOYFyoJoDLcl+Jd750lyqfCifcGtkRdmZMtrPXaYnD8ZGme9vz1vsK/ +4iUkV3mi7Z9s1LXMa/tPPfKdVhCM1PXost3/si0+u1Bz5yKqEPXlyy2ltpIVyGu8 +yiy7y75asp8Iii/1cgtwyp9+VeSif8wJ+MHQoGdGxvAQP80R3EjF +-----END RSA PRIVATE KEY----- diff --git a/deps/npm/node_modules/node-gyp/test/fixtures/test-charmap.py b/deps/npm/node_modules/node-gyp/test/fixtures/test-charmap.py index d9fa6fb25e6c6c..b338f915bc38ff 100644 --- a/deps/npm/node_modules/node-gyp/test/fixtures/test-charmap.py +++ b/deps/npm/node_modules/node-gyp/test/fixtures/test-charmap.py @@ -1,22 +1,30 @@ +from __future__ import print_function import sys import locale -reload(sys) +try: + reload(sys) +except NameError: # Python 3 + pass def main(): encoding = locale.getdefaultlocale()[1] if not encoding: return False - sys.setdefaultencoding(encoding) + try: + sys.setdefaultencoding(encoding) + except AttributeError: # Python 3 + pass + textmap = { 'cp936': u'\u4e2d\u6587', 'cp1252': u'Lat\u012Bna', 'cp932': u'\u306b\u307b\u3093\u3054' } - if textmap.has_key(encoding): - print textmap[encoding] + if encoding in textmap: + print(textmap[encoding]) return True if __name__ == '__main__': - print main() + print(main()) diff --git a/deps/npm/node_modules/node-gyp/test/process-exec-sync.js b/deps/npm/node_modules/node-gyp/test/process-exec-sync.js index 859cbc1f6fe2b8..f786484027cde3 100644 --- a/deps/npm/node_modules/node-gyp/test/process-exec-sync.js +++ b/deps/npm/node_modules/node-gyp/test/process-exec-sync.js @@ -1,16 +1,18 @@ 'use strict' -var fs = require('graceful-fs') -var child_process = require('child_process') +const fs = require('graceful-fs') +const childProcess = require('child_process') -if (!String.prototype.startsWith) { - String.prototype.startsWith = function(search, pos) { - return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search +function startsWith (str, search, pos) { + if (String.prototype.startsWith) { + return str.startsWith(search, pos) } + + return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search } -function processExecSync(file, args, options) { - var child, error, timeout, tmpdir, command, quote +function processExecSync (file, args, options) { + var child, error, timeout, tmpdir, command command = makeCommand(file, args) /* @@ -22,19 +24,19 @@ function processExecSync(file, args, options) { // init timeout timeout = Date.now() + options.timeout // init tmpdir - var os_temp_base = '/tmp' - var os = determine_os() - os_temp_base = '/tmp' + var osTempBase = '/tmp' + var os = determineOS() + osTempBase = '/tmp' if (process.env.TMP) { - os_temp_base = process.env.TMP + osTempBase = process.env.TMP } - if (os_temp_base[os_temp_base.length - 1] !== '/') { - os_temp_base += '/' + if (osTempBase[osTempBase.length - 1] !== '/') { + osTempBase += '/' } - tmpdir = os_temp_base + 'processExecSync.' + Date.now() + Math.random() + tmpdir = osTempBase + 'processExecSync.' + Date.now() + Math.random() fs.mkdirSync(tmpdir) // init command @@ -47,7 +49,7 @@ function processExecSync(file, args, options) { } // init child - child = child_process.exec(command, options) + child = childProcess.exec(command, options) var maxTry = 100000 // increases the test time by 6 seconds on win-2016-node-0.10 var tryCount = 0 @@ -65,7 +67,7 @@ function processExecSync(file, args, options) { } } - ['stdout', 'stderr', 'status'].forEach(function (file) { + [ 'stdout', 'stderr', 'status' ].forEach(function (file) { child[file] = fs.readFileSync(tmpdir + '/' + file, options.encoding) setTimeout(unlinkFile, 500, tmpdir + '/' + file) }) @@ -84,23 +86,23 @@ function processExecSync(file, args, options) { return child.stdout } -function makeCommand(file, args) { +function makeCommand (file, args) { var command, quote command = file if (args.length > 0) { - for(var i in args) { + for (var i in args) { command = command + ' ' if (args[i][0] === '-') { command = command + args[i] } else { if (!quote) { - command = command + '\"' + command = command + '"' quote = true } command = command + args[i] if (quote) { if (args.length === (parseInt(i) + 1)) { - command = command + '\"' + command = command + '"' } } } @@ -109,29 +111,29 @@ function makeCommand(file, args) { return command } -function determine_os() { +function determineOS () { var os = '' var tmpVar = '' if (process.env.OSTYPE) { tmpVar = process.env.OSTYPE - } else if (process.env.OS) { + } else if (process.env.OS) { tmpVar = process.env.OS } else { - //default is linux + // default is linux tmpVar = 'linux' } - if (tmpVar.startsWith('linux')) { + if (startsWith(tmpVar, 'linux')) { os = 'linux' } - if (tmpVar.startsWith('win')) { + if (startsWith(tmpVar, 'win')) { os = 'win' } return os } -function unlinkFile(file) { +function unlinkFile (file) { fs.unlinkSync(file) } diff --git a/deps/npm/node_modules/node-gyp/test/simple-proxy.js b/deps/npm/node_modules/node-gyp/test/simple-proxy.js index e55330c445bf6e..cb0dfcfec7edcd 100644 --- a/deps/npm/node_modules/node-gyp/test/simple-proxy.js +++ b/deps/npm/node_modules/node-gyp/test/simple-proxy.js @@ -1,23 +1,26 @@ -var http = require('http') - , https = require('https') - , server = http.createServer(handler) - , port = +process.argv[2] - , prefix = process.argv[3] - , upstream = process.argv[4] - , calls = 0 +'use strict' + +const http = require('http') +const https = require('https') +const server = http.createServer(handler) +const port = +process.argv[2] +const prefix = process.argv[3] +const upstream = process.argv[4] +var calls = 0 server.listen(port) function handler (req, res) { - if (req.url.indexOf(prefix) != 0) + if (req.url.indexOf(prefix) !== 0) { throw new Error('request url [' + req.url + '] does not start with [' + prefix + ']') + } var upstreamUrl = upstream + req.url.substring(prefix.length) - console.log(req.url + ' -> ' + upstreamUrl) https.get(upstreamUrl, function (ures) { ures.on('end', function () { - if (++calls == 2) + if (++calls === 2) { server.close() + } }) ures.pipe(res) }) diff --git a/deps/npm/node_modules/node-gyp/test/test-addon.js b/deps/npm/node_modules/node-gyp/test/test-addon.js index 89350effc46b43..f97215c0a26528 100644 --- a/deps/npm/node_modules/node-gyp/test/test-addon.js +++ b/deps/npm/node_modules/node-gyp/test/test-addon.js @@ -1,29 +1,33 @@ 'use strict' -var test = require('tape') -var path = require('path') -var fs = require('graceful-fs') -var child_process = require('child_process') -var addonPath = path.resolve(__dirname, 'node_modules', 'hello_world') -var nodeGyp = path.resolve(__dirname, '..', 'bin', 'node-gyp.js') -var execFileSync = child_process.execFileSync || require('./process-exec-sync') -var execFile = child_process.execFile - -function runHello() { +const test = require('tap').test +const path = require('path') +const fs = require('graceful-fs') +const childProcess = require('child_process') +const os = require('os') +const addonPath = path.resolve(__dirname, 'node_modules', 'hello_world') +const nodeGyp = path.resolve(__dirname, '..', 'bin', 'node-gyp.js') +const execFileSync = childProcess.execFileSync || require('./process-exec-sync') +const execFile = childProcess.execFile + +function runHello (hostProcess) { + if (!hostProcess) { + hostProcess = process.execPath + } var testCode = "console.log(require('hello_world').hello())" - return execFileSync(process.execPath, ['-e', testCode], { cwd: __dirname }).toString() + return execFileSync(hostProcess, [ '-e', testCode ], { cwd: __dirname }).toString() } -function getEncoding() { - var code = 'import locale;print locale.getdefaultlocale()[1]' - return execFileSync('python', ['-c', code]).toString().trim() +function getEncoding () { + var code = 'import locale;print(locale.getdefaultlocale()[1])' + return execFileSync('python', [ '-c', code ]).toString().trim() } -function checkCharmapValid() { +function checkCharmapValid () { var data try { - data = execFileSync('python', ['fixtures/test-charmap.py'], - { cwd: __dirname }) + data = execFileSync('python', [ 'fixtures/test-charmap.py' ], + { cwd: __dirname }) } catch (err) { return false } @@ -35,10 +39,10 @@ test('build simple addon', function (t) { t.plan(3) // Set the loglevel otherwise the output disappears when run via 'npm test' - var cmd = [nodeGyp, 'rebuild', '-C', addonPath, '--loglevel=verbose'] + var cmd = [ nodeGyp, 'rebuild', '-C', addonPath, '--loglevel=verbose' ] var proc = execFile(process.execPath, cmd, function (err, stdout, stderr) { var logLines = stderr.toString().trim().split(/\r?\n/) - var lastLine = logLines[logLines.length-1] + var lastLine = logLines[logLines.length - 1] t.strictEqual(err, null) t.strictEqual(lastLine, 'gyp info ok', 'should end in ok') t.strictEqual(runHello().trim(), 'world') @@ -68,14 +72,15 @@ test('build simple addon in path with non-ascii characters', function (t) { t.plan(3) - var data, configPath = path.join(addonPath, 'build', 'config.gypi') + var data + var configPath = path.join(addonPath, 'build', 'config.gypi') try { data = fs.readFileSync(configPath, 'utf8') } catch (err) { t.error(err) return } - var config = JSON.parse(data.replace(/\#.+\n/, '')) + var config = JSON.parse(data.replace(/#.+\n/, '')) var nodeDir = config.variables.nodedir var testNodeDir = path.join(addonPath, testDirName) // Create symbol link to path with non-ascii characters @@ -93,8 +98,14 @@ test('build simple addon in path with non-ascii characters', function (t) { } } - var cmd = [nodeGyp, 'rebuild', '-C', addonPath, - '--loglevel=verbose', '-nodedir=' + testNodeDir] + var cmd = [ + nodeGyp, + 'rebuild', + '-C', + addonPath, + '--loglevel=verbose', + '-nodedir=' + testNodeDir + ] var proc = execFile(process.execPath, cmd, function (err, stdout, stderr) { try { fs.unlink(testNodeDir) @@ -103,7 +114,7 @@ test('build simple addon in path with non-ascii characters', function (t) { } var logLines = stderr.toString().trim().split(/\r?\n/) - var lastLine = logLines[logLines.length-1] + var lastLine = logLines[logLines.length - 1] t.strictEqual(err, null) t.strictEqual(lastLine, 'gyp info ok', 'should end in ok') t.strictEqual(runHello().trim(), 'world') @@ -111,3 +122,29 @@ test('build simple addon in path with non-ascii characters', function (t) { proc.stdout.setEncoding('utf-8') proc.stderr.setEncoding('utf-8') }) + +test('addon works with renamed host executable', function (t) { + // No `fs.copyFileSync` before node8. + if (process.version.substr(1).split('.')[0] < 8) { + t.skip('skipping test for old node version') + t.end() + return + } + + t.plan(3) + + var notNodePath = path.join(os.tmpdir(), 'notnode' + path.extname(process.execPath)) + fs.copyFileSync(process.execPath, notNodePath) + + var cmd = [ nodeGyp, 'rebuild', '-C', addonPath, '--loglevel=verbose' ] + var proc = execFile(process.execPath, cmd, function (err, stdout, stderr) { + var logLines = stderr.toString().trim().split(/\r?\n/) + var lastLine = logLines[logLines.length - 1] + t.strictEqual(err, null) + t.strictEqual(lastLine, 'gyp info ok', 'should end in ok') + t.strictEqual(runHello(notNodePath).trim(), 'world') + fs.unlinkSync(notNodePath) + }) + proc.stdout.setEncoding('utf-8') + proc.stderr.setEncoding('utf-8') +}) diff --git a/deps/npm/node_modules/node-gyp/test/test-configure-python.js b/deps/npm/node_modules/node-gyp/test/test-configure-python.js index f235bdbba1c9f5..41b8c70427336a 100644 --- a/deps/npm/node_modules/node-gyp/test/test-configure-python.js +++ b/deps/npm/node_modules/node-gyp/test/test-configure-python.js @@ -1,21 +1,23 @@ 'use strict' -var test = require('tape') -var path = require('path') -var gyp = require('../lib/node-gyp') -var requireInject = require('require-inject') -var configure = requireInject('../lib/configure', { +const test = require('tap').test +const path = require('path') +const gyp = require('../lib/node-gyp') +const requireInject = require('require-inject') +const configure = requireInject('../lib/configure', { 'graceful-fs': { - 'openSync': function (file, mode) { return 0; }, - 'closeSync': function (fd) { }, + 'openSync': function () { return 0 }, + 'closeSync': function () { }, 'writeFile': function (file, data, cb) { cb() }, 'stat': function (file, cb) { cb(null, {}) } } }) -var EXPECTED_PYPATH = path.join(__dirname, '..', 'gyp', 'pylib') -var SEPARATOR = process.platform == 'win32' ? ';' : ':' -var SPAWN_RESULT = { on: function () { } } +const EXPECTED_PYPATH = path.join(__dirname, '..', 'gyp', 'pylib') +const SEPARATOR = process.platform === 'win32' ? ';' : ':' +const SPAWN_RESULT = { on: function () { } } + +require('npmlog').level = 'warn' test('configure PYTHONPATH with no existing env', function (t) { t.plan(1) @@ -40,11 +42,10 @@ test('configure PYTHONPATH with existing env of one dir', function (t) { var prog = gyp() prog.parseArgv([]) prog.spawn = function () { - - t.equal(process.env.PYTHONPATH, [EXPECTED_PYPATH, existingPath].join(SEPARATOR)) + t.equal(process.env.PYTHONPATH, [ EXPECTED_PYPATH, existingPath ].join(SEPARATOR)) var dirs = process.env.PYTHONPATH.split(SEPARATOR) - t.deepEqual(dirs, [EXPECTED_PYPATH, existingPath]) + t.deepEqual(dirs, [ EXPECTED_PYPATH, existingPath ]) return SPAWN_RESULT } @@ -56,17 +57,16 @@ test('configure PYTHONPATH with existing env of multiple dirs', function (t) { var pythonDir1 = path.join('a', 'b') var pythonDir2 = path.join('b', 'c') - var existingPath = [pythonDir1, pythonDir2].join(SEPARATOR) + var existingPath = [ pythonDir1, pythonDir2 ].join(SEPARATOR) process.env.PYTHONPATH = existingPath var prog = gyp() prog.parseArgv([]) prog.spawn = function () { - - t.equal(process.env.PYTHONPATH, [EXPECTED_PYPATH, existingPath].join(SEPARATOR)) + t.equal(process.env.PYTHONPATH, [ EXPECTED_PYPATH, existingPath ].join(SEPARATOR)) var dirs = process.env.PYTHONPATH.split(SEPARATOR) - t.deepEqual(dirs, [EXPECTED_PYPATH, pythonDir1, pythonDir2]) + t.deepEqual(dirs, [ EXPECTED_PYPATH, pythonDir1, pythonDir2 ]) return SPAWN_RESULT } diff --git a/deps/npm/node_modules/node-gyp/test/test-download.js b/deps/npm/node_modules/node-gyp/test/test-download.js index 6e6f64f058c2e6..dbffb20246267b 100644 --- a/deps/npm/node_modules/node-gyp/test/test-download.js +++ b/deps/npm/node_modules/node-gyp/test/test-download.js @@ -1,37 +1,40 @@ 'use strict' -var fs = require('fs') -var http = require('http') -var https = require('https') -var test = require('tape') -var install = require('../lib/install') +const test = require('tap').test +const fs = require('fs') +const path = require('path') +const http = require('http') +const https = require('https') +const install = require('../lib/install') + +require('npmlog').level = 'warn' test('download over http', function (t) { t.plan(2) var server = http.createServer(function (req, res) { t.strictEqual(req.headers['user-agent'], - 'node-gyp v42 (node ' + process.version + ')') + 'node-gyp v42 (node ' + process.version + ')') res.end('ok') server.close() }) - var host = '127.0.0.1' + var host = 'localhost' server.listen(0, host, function () { var port = this.address().port var gyp = { opts: {}, - version: '42', + version: '42' } var url = 'http://' + host + ':' + port var req = install.test.download(gyp, {}, url) req.on('response', function (res) { var body = '' res.setEncoding('utf8') - res.on('data', function(data) { + res.on('data', function (data) { body += data }) - res.on('end', function() { + res.on('end', function () { t.strictEqual(body, 'ok') }) }) @@ -41,17 +44,17 @@ test('download over http', function (t) { test('download over https with custom ca', function (t) { t.plan(3) - var cert = fs.readFileSync(__dirname + '/fixtures/server.crt', 'utf8') - var key = fs.readFileSync(__dirname + '/fixtures/server.key', 'utf8') + var cert = fs.readFileSync(path.join(__dirname, 'fixtures/server.crt'), 'utf8') + var key = fs.readFileSync(path.join(__dirname, 'fixtures/server.key'), 'utf8') - var cafile = __dirname + '/fixtures/ca.crt' + var cafile = path.join(__dirname, '/fixtures/ca.crt') var ca = install.test.readCAFile(cafile) t.strictEqual(ca.length, 1) var options = { ca: ca, cert: cert, key: key } var server = https.createServer(options, function (req, res) { t.strictEqual(req.headers['user-agent'], - 'node-gyp v42 (node ' + process.version + ')') + 'node-gyp v42 (node ' + process.version + ')') res.end('ok') server.close() }) @@ -60,22 +63,22 @@ test('download over https with custom ca', function (t) { throw err }) - var host = '127.0.0.1' + var host = 'localhost' server.listen(8000, host, function () { var port = this.address().port var gyp = { opts: { cafile: cafile }, - version: '42', + version: '42' } var url = 'https://' + host + ':' + port var req = install.test.download(gyp, {}, url) req.on('response', function (res) { var body = '' res.setEncoding('utf8') - res.on('data', function(data) { + res.on('data', function (data) { body += data }) - res.on('end', function() { + res.on('end', function () { t.strictEqual(body, 'ok') }) }) @@ -85,7 +88,7 @@ test('download over https with custom ca', function (t) { test('download with missing cafile', function (t) { t.plan(1) var gyp = { - opts: { cafile: 'no.such.file' }, + opts: { cafile: 'no.such.file' } } try { install.test.download(gyp, {}, 'http://bad/') @@ -95,7 +98,7 @@ test('download with missing cafile', function (t) { }) test('check certificate splitting', function (t) { - var cas = install.test.readCAFile(__dirname + '/fixtures/ca-bundle.crt') + var cas = install.test.readCAFile(path.join(__dirname, 'fixtures/ca-bundle.crt')) t.plan(2) t.strictEqual(cas.length, 2) t.notStrictEqual(cas[0], cas[1]) diff --git a/deps/npm/node_modules/node-gyp/test/test-find-accessible-sync.js b/deps/npm/node_modules/node-gyp/test/test-find-accessible-sync.js index d336243dd0d7b7..32234f5389c1db 100644 --- a/deps/npm/node_modules/node-gyp/test/test-find-accessible-sync.js +++ b/deps/npm/node_modules/node-gyp/test/test-find-accessible-sync.js @@ -1,13 +1,13 @@ 'use strict' -var test = require('tape') -var path = require('path') -var requireInject = require('require-inject') -var configure = requireInject('../lib/configure', { +const test = require('tap').test +const path = require('path') +const requireInject = require('require-inject') +const configure = requireInject('../lib/configure', { 'graceful-fs': { - 'closeSync': function (fd) { return undefined }, + 'closeSync': function () { return undefined }, 'openSync': function (path) { - if (readableFiles.some(function (f) { return f === path} )) { + if (readableFiles.some(function (f) { return f === path })) { return 0 } else { var error = new Error('ENOENT - not found') @@ -17,11 +17,11 @@ var configure = requireInject('../lib/configure', { } }) -var dir = path.sep + 'testdir' -var readableFile = 'readable_file' -var anotherReadableFile = 'another_readable_file' -var readableFileInDir = 'somedir' + path.sep + readableFile -var readableFiles = [ +const dir = path.sep + 'testdir' +const readableFile = 'readable_file' +const anotherReadableFile = 'another_readable_file' +const readableFileInDir = 'somedir' + path.sep + readableFile +const readableFiles = [ path.resolve(dir, readableFile), path.resolve(dir, anotherReadableFile), path.resolve(dir, readableFileInDir) @@ -59,7 +59,6 @@ test('find accessible - single item array, unreadable', function (t) { t.strictEqual(found, undefined) }) - test('find accessible - multi item array, no matches', function (t) { t.plan(1) @@ -68,7 +67,6 @@ test('find accessible - multi item array, no matches', function (t) { t.strictEqual(found, undefined) }) - test('find accessible - multi item array, single match', function (t) { t.plan(1) diff --git a/deps/npm/node_modules/node-gyp/test/test-find-node-directory.js b/deps/npm/node_modules/node-gyp/test/test-find-node-directory.js index 46659d0cfe8fa2..767b6f6b37d208 100644 --- a/deps/npm/node_modules/node-gyp/test/test-find-node-directory.js +++ b/deps/npm/node_modules/node-gyp/test/test-find-node-directory.js @@ -1,8 +1,10 @@ -var test = require('tape') -var path = require('path') -var findNodeDirectory = require('../lib/find-node-directory') +'use strict' -var platforms = ['darwin', 'freebsd', 'linux', 'sunos', 'win32', 'aix'] +const test = require('tap').test +const path = require('path') +const findNodeDirectory = require('../lib/find-node-directory') + +const platforms = [ 'darwin', 'freebsd', 'linux', 'sunos', 'win32', 'aix' ] // we should find the directory based on the directory // the script is running in and it should match the layout @@ -11,10 +13,10 @@ var platforms = ['darwin', 'freebsd', 'linux', 'sunos', 'win32', 'aix'] test('test find-node-directory - node install', function (t) { t.plan(platforms.length) for (var next = 0; next < platforms.length; next++) { - var processObj = {execPath: '/x/y/bin/node', platform: platforms[next]} + var processObj = { execPath: '/x/y/bin/node', platform: platforms[next] } t.equal( findNodeDirectory('/x/deps/npm/node_modules/node-gyp/lib', processObj), - path.join('/x')) + path.join('/x')) } }) @@ -26,15 +28,15 @@ test('test find-node-directory - node install', function (t) { test('test find-node-directory - node build', function (t) { t.plan(platforms.length) for (var next = 0; next < platforms.length; next++) { - var processObj = {execPath: '/x/y/bin/node', platform: platforms[next]} + var processObj = { execPath: '/x/y/bin/node', platform: platforms[next] } if (platforms[next] === 'win32') { t.equal( findNodeDirectory('/y/node_modules/npm/node_modules/node-gyp/lib', - processObj), path.join('/y')) + processObj), path.join('/y')) } else { t.equal( findNodeDirectory('/y/lib/node_modules/npm/node_modules/node-gyp/lib', - processObj), path.join('/y')) + processObj), path.join('/y')) } } }) @@ -44,7 +46,7 @@ test('test find-node-directory - node build', function (t) { test('test find-node-directory - node in bin directory', function (t) { t.plan(platforms.length) for (var next = 0; next < platforms.length; next++) { - var processObj = {execPath: '/x/y/bin/node', platform: platforms[next]} + var processObj = { execPath: '/x/y/bin/node', platform: platforms[next] } t.equal( findNodeDirectory('/nothere/npm/node_modules/node-gyp/lib', processObj), path.join('/x/y')) @@ -58,15 +60,15 @@ test('test find-node-directory - node in build release dir', function (t) { for (var next = 0; next < platforms.length; next++) { var processObj if (platforms[next] === 'win32') { - processObj = {execPath: '/x/y/Release/node', platform: platforms[next]} + processObj = { execPath: '/x/y/Release/node', platform: platforms[next] } } else { - processObj = {execPath: '/x/y/out/Release/node', - platform: platforms[next]} + processObj = { execPath: '/x/y/out/Release/node', + platform: platforms[next] } } t.equal( findNodeDirectory('/nothere/npm/node_modules/node-gyp/lib', processObj), - path.join('/x/y')) + path.join('/x/y')) } }) @@ -77,14 +79,14 @@ test('test find-node-directory - node in Debug release dir', function (t) { for (var next = 0; next < platforms.length; next++) { var processObj if (platforms[next] === 'win32') { - processObj = {execPath: '/a/b/Debug/node', platform: platforms[next]} + processObj = { execPath: '/a/b/Debug/node', platform: platforms[next] } } else { - processObj = {execPath: '/a/b/out/Debug/node', platform: platforms[next]} + processObj = { execPath: '/a/b/out/Debug/node', platform: platforms[next] } } t.equal( findNodeDirectory('/nothere/npm/node_modules/node-gyp/lib', processObj), - path.join('/a/b')) + path.join('/a/b')) } }) @@ -93,7 +95,7 @@ test('test find-node-directory - node in Debug release dir', function (t) { test('test find-node-directory - not found', function (t) { t.plan(platforms.length) for (var next = 0; next < platforms.length; next++) { - var processObj = {execPath: '/x/y/z/y', platform:next} + var processObj = { execPath: '/x/y/z/y', platform: next } t.equal(findNodeDirectory('/a/b/c/d', processObj), '') } }) @@ -107,9 +109,9 @@ test('test find-node-directory - not found', function (t) { test('test find-node-directory - node install', function (t) { t.plan(platforms.length) for (var next = 0; next < platforms.length; next++) { - var processObj = {execPath: '/x/y/bin/node', platform: platforms[next]} + var processObj = { execPath: '/x/y/bin/node', platform: platforms[next] } t.equal( findNodeDirectory('/x/y/z/a/b/c/deps/npm/node_modules/node-gyp/lib', - processObj), path.join('/x/y/z/a/b/c')) + processObj), path.join('/x/y/z/a/b/c')) } }) diff --git a/deps/npm/node_modules/node-gyp/test/test-find-python.js b/deps/npm/node_modules/node-gyp/test/test-find-python.js index 570eb180de7c77..c52a5796663eef 100644 --- a/deps/npm/node_modules/node-gyp/test/test-find-python.js +++ b/deps/npm/node_modules/node-gyp/test/test-find-python.js @@ -1,15 +1,19 @@ 'use strict' -var test = require('tape') -var path = require('path') -var configure = require('../lib/configure') -var execFile = require('child_process').execFile -var PythonFinder = configure.test.PythonFinder +const test = require('tap').test +const findPython = require('../lib/find-python') +const execFile = require('child_process').execFile +const PythonFinder = findPython.test.PythonFinder + +delete process.env.PYTHON +delete process.env.NODE_GYP_FORCE_PYTHON + +require('npmlog').level = 'warn' test('find python', function (t) { t.plan(4) - configure.test.findPython('python', function (err, found) { + findPython.test.findPython(null, function (err, found) { t.strictEqual(err, null) var proc = execFile(found, ['-V'], function (err, stdout, stderr) { t.strictEqual(err, null) @@ -21,319 +25,203 @@ test('find python', function (t) { }) }) -function poison(object, property) { - function fail() { - throw new Error('Property ' + property + ' should not have been accessed.') +function poison (object, property) { + function fail () { + console.error(Error(`Property ${property} should not have been accessed.`)) + process.abort() } var descriptor = { - configurable: true, + configurable: false, enumerable: false, - writable: true, - getter: fail, - setter: fail, + get: fail, + set: fail } Object.defineProperty(object, property, descriptor) } -// Work around a v0.10.x CI issue where path.resolve() on UNIX systems prefixes -// Windows paths with the current working directory. v0.12 and up are free of -// this issue because they use path.win32.resolve() which does the right thing. -var resolve = path.win32 && path.win32.resolve || function() { - function rstrip(s) { return s.replace(/\\+$/, '') } - return [].slice.call(arguments).map(rstrip).join('\\') +function TestPythonFinder () { + PythonFinder.apply(this, arguments) } - -function TestPythonFinder() { PythonFinder.apply(this, arguments) } TestPythonFinder.prototype = Object.create(PythonFinder.prototype) -poison(TestPythonFinder.prototype, 'env') -poison(TestPythonFinder.prototype, 'execFile') -poison(TestPythonFinder.prototype, 'resolve') -poison(TestPythonFinder.prototype, 'stat') -poison(TestPythonFinder.prototype, 'which') -poison(TestPythonFinder.prototype, 'win') +// Silence npmlog - remove for debugging +TestPythonFinder.prototype.log = { + silly: () => {}, + verbose: () => {}, + info: () => {}, + warn: () => {}, + error: () => {} +} test('find python - python', function (t) { - t.plan(5) + t.plan(6) var f = new TestPythonFinder('python', done) - f.which = function(program, cb) { - t.strictEqual(program, 'python') - cb(null, program) - } - f.execFile = function(program, args, opts, cb) { - t.strictEqual(program, 'python') - t.ok(/import sys/.test(args[1])) - cb(null, '2.7.0') + f.execFile = function (program, args, opts, cb) { + f.execFile = function (program, args, opts, cb) { + poison(f, 'execFile') + t.strictEqual(program, '/path/python') + t.ok(/sys\.version_info/.test(args[1])) + cb(null, '2.7.15') + } + t.strictEqual(program, + process.platform === 'win32' ? '"python"' : 'python') + t.ok(/sys\.executable/.test(args[1])) + cb(null, '/path/python') } - f.checkPython() + f.findPython() - function done(err, python) { + function done (err, python) { t.strictEqual(err, null) - t.strictEqual(python, 'python') + t.strictEqual(python, '/path/python') } }) test('find python - python too old', function (t) { - t.plan(4) - - var f = new TestPythonFinder('python', done) - f.which = function(program, cb) { - t.strictEqual(program, 'python') - cb(null, program) - } - f.execFile = function(program, args, opts, cb) { - t.strictEqual(program, 'python') - t.ok(/import sys/.test(args[1])) - cb(null, '2.3.4') - } - f.checkPython() - - function done(err, python) { - t.ok(/is not supported by gyp/.test(err)) - } -}) - -test('find python - python too new', function (t) { - t.plan(4) + t.plan(2) - var f = new TestPythonFinder('python', done) - f.which = function(program, cb) { - t.strictEqual(program, 'python') - cb(null, program) - } - f.execFile = function(program, args, opts, cb) { - t.strictEqual(program, 'python') - t.ok(/import sys/.test(args[1])) - cb(null, '3.0.0') + var f = new TestPythonFinder(null, done) + f.execFile = function (program, args, opts, cb) { + if (/sys\.executable/.test(args[args.length - 1])) { + cb(null, '/path/python') + } else if (/sys\.version_info/.test(args[args.length - 1])) { + cb(null, '2.3.4') + } else { + t.fail() + } } - f.checkPython() + f.findPython() - function done(err, python) { - t.ok(/is not supported by gyp/.test(err)) + function done (err) { + t.ok(/Could not find any Python/.test(err)) + t.ok(/not supported/i.test(f.errorLog)) } }) test('find python - no python', function (t) { t.plan(2) - var f = new TestPythonFinder('python', done) - f.which = function(program, cb) { - t.strictEqual(program, 'python') - cb(new Error('not found')) - } - f.checkPython() - - function done(err, python) { - t.ok(/Can't find Python executable/.test(err)) - } -}) - -test('find python - no python2', function (t) { - t.plan(6) - - var f = new TestPythonFinder('python2', done) - f.which = function(program, cb) { - f.which = function(program, cb) { - t.strictEqual(program, 'python') - cb(null, program) + var f = new TestPythonFinder(null, done) + f.execFile = function (program, args, opts, cb) { + if (/sys\.executable/.test(args[args.length - 1])) { + cb(new Error('not found')) + } else if (/sys\.version_info/.test(args[args.length - 1])) { + cb(new Error('not a Python executable')) + } else { + t.fail() } - t.strictEqual(program, 'python2') - cb(new Error('not found')) - } - f.execFile = function(program, args, opts, cb) { - t.strictEqual(program, 'python') - t.ok(/import sys/.test(args[1])) - cb(null, '2.7.0') } - f.checkPython() + f.findPython() - function done(err, python) { - t.strictEqual(err, null) - t.strictEqual(python, 'python') + function done (err) { + t.ok(/Could not find any Python/.test(err)) + t.ok(/not in PATH/.test(f.errorLog)) } }) test('find python - no python2, no python, unix', function (t) { - t.plan(3) + t.plan(2) - var f = new TestPythonFinder('python2', done) - poison(f, 'checkPythonLauncher') + var f = new TestPythonFinder(null, done) + f.checkPyLauncher = t.fail f.win = false - f.which = function(program, cb) { - f.which = function(program, cb) { - t.strictEqual(program, 'python') + f.execFile = function (program, args, opts, cb) { + if (/sys\.executable/.test(args[args.length - 1])) { cb(new Error('not found')) + } else { + t.fail() } - t.strictEqual(program, 'python2') - cb(new Error('not found')) } - f.checkPython() + f.findPython() - function done(err, python) { - t.ok(/Can't find Python executable/.test(err)) + function done (err) { + t.ok(/Could not find any Python/.test(err)) + t.ok(/not in PATH/.test(f.errorLog)) } }) test('find python - no python, use python launcher', function (t) { - t.plan(8) - - var f = new TestPythonFinder('python', done) - f.env = {} - f.win = true - - f.which = function(program, cb) { - t.strictEqual(program, 'python') - cb(new Error('not found')) - } - f.execFile = function(program, args, opts, cb) { - f.execFile = function(program, args, opts, cb) { - t.strictEqual(program, 'Z:\\snake.exe') - t.ok(/import sys/.test(args[1])) - cb(null, '2.7.0') - } - t.strictEqual(program, 'py.exe') - t.notEqual(args.indexOf('-2'), -1) - t.notEqual(args.indexOf('-c'), -1) - cb(null, 'Z:\\snake.exe') - } - f.checkPython() - - function done(err, python) { - t.strictEqual(err, null) - t.strictEqual(python, 'Z:\\snake.exe') - } -}) - -test('find python - python 3, use python launcher', function (t) { - t.plan(10) + t.plan(4) - var f = new TestPythonFinder('python', done) - f.env = {} + var f = new TestPythonFinder(null, done) f.win = true - f.which = function(program, cb) { - t.strictEqual(program, 'python') - cb(null, program) - } - f.execFile = function(program, args, opts, cb) { - f.execFile = function(program, args, opts, cb) { - f.execFile = function(program, args, opts, cb) { - t.strictEqual(program, 'Z:\\snake.exe') - t.ok(/import sys/.test(args[1])) - cb(null, '2.7.0') - } - t.strictEqual(program, 'py.exe') + f.execFile = function (program, args, opts, cb) { + if (program === 'py.exe') { t.notEqual(args.indexOf('-2'), -1) t.notEqual(args.indexOf('-c'), -1) - cb(null, 'Z:\\snake.exe') + return cb(null, 'Z:\\snake.exe') + } + if (/sys\.executable/.test(args[args.length - 1])) { + cb(new Error('not found')) + } else if (/sys\.version_info/.test(args[args.length - 1])) { + if (program === 'Z:\\snake.exe') { + cb(null, '2.7.14') + } else { + t.fail() + } + } else { + t.fail() } - t.strictEqual(program, 'python') - t.ok(/import sys/.test(args[1])) - cb(null, '3.0.0') } - f.checkPython() + f.findPython() - function done(err, python) { + function done (err, python) { t.strictEqual(err, null) t.strictEqual(python, 'Z:\\snake.exe') } }) -test('find python - python 3, use python launcher, python 2 too old', - function (t) { - t.plan(9) +test('find python - no python, no python launcher, good guess', function (t) { + t.plan(4) - var f = new TestPythonFinder('python', done) - f.checkedPythonLauncher = false - f.env = {} + var re = /C:[\\/]Python27[\\/]python[.]exe/ + var f = new TestPythonFinder(null, done) f.win = true - f.which = function(program, cb) { - t.strictEqual(program, 'python') - cb(null, program) - } - f.execFile = function(program, args, opts, cb) { - f.execFile = function(program, args, opts, cb) { - f.execFile = function(program, args, opts, cb) { - t.strictEqual(program, 'Z:\\snake.exe') - t.ok(/import sys/.test(args[1])) - cb(null, '2.3.4') + f.execFile = function (program, args, opts, cb) { + if (program === 'py.exe') { + f.execFile = function (program, args, opts, cb) { + poison(f, 'execFile') + t.ok(re.test(program)) + t.ok(/sys\.version_info/.test(args[args.length - 1])) + cb(null, '2.7.14') } - t.strictEqual(program, 'py.exe') - t.notEqual(args.indexOf('-2'), -1) - t.notEqual(args.indexOf('-c'), -1) - cb(null, 'Z:\\snake.exe') + return cb(new Error('not found')) } - t.strictEqual(program, 'python') - t.ok(/import sys/.test(args[1])) - cb(null, '3.0.0') - } - f.checkPython() - - function done(err, python) { - t.ok(/is not supported by gyp/.test(err)) - } -}) - -test('find python - no python, no python launcher, good guess', function (t) { - t.plan(6) - - var re = /C:[\\\/]Python27[\\\/]python[.]exe/ - var f = new TestPythonFinder('python', done) - f.env = {} - f.win = true - - f.which = function(program, cb) { - t.strictEqual(program, 'python') - cb(new Error('not found')) - } - f.execFile = function(program, args, opts, cb) { - f.execFile = function(program, args, opts, cb) { - t.ok(re.test(program)) - t.ok(/import sys/.test(args[1])) - cb(null, '2.7.0') + if (/sys\.executable/.test(args[args.length - 1])) { + cb(new Error('not found')) + } else { + t.fail() } - t.strictEqual(program, 'py.exe') - cb(new Error('not found')) - } - f.resolve = resolve - f.stat = function(path, cb) { - t.ok(re.test(path)) - cb(null, {}) } - f.checkPython() + f.findPython() - function done(err, python) { + function done (err, python) { + t.strictEqual(err, null) t.ok(re.test(python)) } }) test('find python - no python, no python launcher, bad guess', function (t) { - t.plan(4) + t.plan(2) - var f = new TestPythonFinder('python', done) - f.env = { SystemDrive: 'Z:\\' } + var f = new TestPythonFinder(null, done) f.win = true - f.which = function(program, cb) { - t.strictEqual(program, 'python') - cb(new Error('not found')) - } - f.execFile = function(program, args, opts, cb) { - t.strictEqual(program, 'py.exe') - cb(new Error('not found')) - } - f.resolve = resolve - f.stat = function(path, cb) { - t.ok(/Z:[\\\/]Python27[\\\/]python.exe/.test(path)) - var err = new Error('not found') - err.code = 'ENOENT' - cb(err) + f.execFile = function (program, args, opts, cb) { + if (/sys\.executable/.test(args[args.length - 1])) { + cb(new Error('not found')) + } else if (/sys\.version_info/.test(args[args.length - 1])) { + cb(new Error('not a Python executable')) + } else { + t.fail() + } } - f.checkPython() + f.findPython() - function done(err, python) { - t.ok(/Can't find Python executable/.test(err)) + function done (err) { + t.ok(/Could not find any Python/.test(err)) + t.ok(/not in PATH/.test(f.errorLog)) } }) diff --git a/deps/npm/node_modules/node-gyp/test/test-find-visualstudio.js b/deps/npm/node_modules/node-gyp/test/test-find-visualstudio.js new file mode 100644 index 00000000000000..b00adf022719ae --- /dev/null +++ b/deps/npm/node_modules/node-gyp/test/test-find-visualstudio.js @@ -0,0 +1,646 @@ +'use strict' + +const test = require('tap').test +const fs = require('fs') +const path = require('path') +const findVisualStudio = require('../lib/find-visualstudio') +const VisualStudioFinder = findVisualStudio.test.VisualStudioFinder + +const semverV1 = { major: 1, minor: 0, patch: 0 } + +delete process.env.VCINSTALLDIR + +function poison (object, property) { + function fail () { + console.error(Error(`Property ${property} should not have been accessed.`)) + process.abort() + } + var descriptor = { + configurable: false, + enumerable: false, + get: fail, + set: fail + } + Object.defineProperty(object, property, descriptor) +} + +function TestVisualStudioFinder () { VisualStudioFinder.apply(this, arguments) } +TestVisualStudioFinder.prototype = Object.create(VisualStudioFinder.prototype) +// Silence npmlog - remove for debugging +TestVisualStudioFinder.prototype.log = { + silly: () => {}, + verbose: () => {}, + info: () => {}, + warn: () => {}, + error: () => {} +} + +test('VS2013', function (t) { + t.plan(4) + + const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => { + t.strictEqual(err, null) + t.deepEqual(info, { + msBuild: 'C:\\MSBuild12\\MSBuild.exe', + path: 'C:\\VS2013', + sdk: null, + toolset: 'v120', + version: '12.0', + versionMajor: 12, + versionMinor: 0, + versionYear: 2013 + }) + }) + + finder.findVisualStudio2017OrNewer = (cb) => { + finder.parseData(new Error(), '', '', cb) + } + finder.regSearchKeys = (keys, value, addOpts, cb) => { + for (var i = 0; i < keys.length; ++i) { + const fullName = `${keys[i]}\\${value}` + switch (fullName) { + case 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0': + case 'HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0': + continue + case 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7\\12.0': + t.pass(`expected search for registry value ${fullName}`) + return cb(null, 'C:\\VS2013\\VC\\') + case 'HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions\\12.0\\MSBuildToolsPath': + t.pass(`expected search for registry value ${fullName}`) + return cb(null, 'C:\\MSBuild12\\') + default: + t.fail(`unexpected search for registry value ${fullName}`) + } + } + return cb(new Error()) + } + finder.findVisualStudio() +}) + +test('VS2013 should not be found on new node versions', function (t) { + t.plan(2) + + const finder = new TestVisualStudioFinder({ + major: 10, + minor: 0, + patch: 0 + }, null, (err, info) => { + t.ok(/find .* Visual Studio/i.test(err), 'expect error') + t.false(info, 'no data') + }) + + finder.findVisualStudio2017OrNewer = (cb) => { + const file = path.join(__dirname, 'fixtures', 'VS_2017_Unusable.txt') + const data = fs.readFileSync(file) + finder.parseData(null, data, '', cb) + } + finder.regSearchKeys = (keys, value, addOpts, cb) => { + for (var i = 0; i < keys.length; ++i) { + const fullName = `${keys[i]}\\${value}` + switch (fullName) { + case 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0': + case 'HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0': + continue + default: + t.fail(`unexpected search for registry value ${fullName}`) + } + } + return cb(new Error()) + } + finder.findVisualStudio() +}) + +test('VS2015', function (t) { + t.plan(4) + + const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => { + t.strictEqual(err, null) + t.deepEqual(info, { + msBuild: 'C:\\MSBuild14\\MSBuild.exe', + path: 'C:\\VS2015', + sdk: null, + toolset: 'v140', + version: '14.0', + versionMajor: 14, + versionMinor: 0, + versionYear: 2015 + }) + }) + + finder.findVisualStudio2017OrNewer = (cb) => { + finder.parseData(new Error(), '', '', cb) + } + finder.regSearchKeys = (keys, value, addOpts, cb) => { + for (var i = 0; i < keys.length; ++i) { + const fullName = `${keys[i]}\\${value}` + switch (fullName) { + case 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0': + t.pass(`expected search for registry value ${fullName}`) + return cb(null, 'C:\\VS2015\\VC\\') + case 'HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions\\14.0\\MSBuildToolsPath': + t.pass(`expected search for registry value ${fullName}`) + return cb(null, 'C:\\MSBuild14\\') + default: + t.fail(`unexpected search for registry value ${fullName}`) + } + } + return cb(new Error()) + } + finder.findVisualStudio() +}) + +test('error from PowerShell', function (t) { + t.plan(2) + + const finder = new TestVisualStudioFinder(semverV1, null, null) + + finder.parseData(new Error(), '', '', (info) => { + t.ok(/use PowerShell/i.test(finder.errorLog[0]), 'expect error') + t.false(info, 'no data') + }) +}) + +test('empty output from PowerShell', function (t) { + t.plan(2) + + const finder = new TestVisualStudioFinder(semverV1, null, null) + + finder.parseData(null, '', '', (info) => { + t.ok(/use PowerShell/i.test(finder.errorLog[0]), 'expect error') + t.false(info, 'no data') + }) +}) + +test('output from PowerShell not JSON', function (t) { + t.plan(2) + + const finder = new TestVisualStudioFinder(semverV1, null, null) + + finder.parseData(null, 'AAAABBBB', '', (info) => { + t.ok(/use PowerShell/i.test(finder.errorLog[0]), 'expect error') + t.false(info, 'no data') + }) +}) + +test('wrong JSON from PowerShell', function (t) { + t.plan(2) + + const finder = new TestVisualStudioFinder(semverV1, null, null) + + finder.parseData(null, '{}', '', (info) => { + t.ok(/use PowerShell/i.test(finder.errorLog[0]), 'expect error') + t.false(info, 'no data') + }) +}) + +test('empty JSON from PowerShell', function (t) { + t.plan(2) + + const finder = new TestVisualStudioFinder(semverV1, null, null) + + finder.parseData(null, '[]', '', (info) => { + t.ok(/find .* Visual Studio/i.test(finder.errorLog[0]), 'expect error') + t.false(info, 'no data') + }) +}) + +test('future version', function (t) { + t.plan(3) + + const finder = new TestVisualStudioFinder(semverV1, null, null) + + finder.parseData(null, JSON.stringify([{ + packages: [ + 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64', + 'Microsoft.VisualStudio.Component.Windows10SDK.17763', + 'Microsoft.VisualStudio.VC.MSBuild.Base' + ], + path: 'C:\\VS', + version: '9999.9999.9999.9999' + }]), '', (info) => { + t.ok(/unknown version/i.test(finder.errorLog[0]), 'expect error') + t.ok(/find .* Visual Studio/i.test(finder.errorLog[1]), 'expect error') + t.false(info, 'no data') + }) +}) + +test('single unusable VS2017', function (t) { + t.plan(3) + + const finder = new TestVisualStudioFinder(semverV1, null, null) + + const file = path.join(__dirname, 'fixtures', 'VS_2017_Unusable.txt') + const data = fs.readFileSync(file) + finder.parseData(null, data, '', (info) => { + t.ok(/checking/i.test(finder.errorLog[0]), 'expect error') + t.ok(/find .* Visual Studio/i.test(finder.errorLog[2]), 'expect error') + t.false(info, 'no data') + }) +}) + +test('minimal VS2017 Build Tools', function (t) { + t.plan(2) + + const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => { + t.strictEqual(err, null) + t.deepEqual(info, { + msBuild: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\' + + 'BuildTools\\MSBuild\\15.0\\Bin\\MSBuild.exe', + path: + 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools', + sdk: '10.0.17134.0', + toolset: 'v141', + version: '15.9.28307.665', + versionMajor: 15, + versionMinor: 9, + versionYear: 2017 + }) + }) + + poison(finder, 'regSearchKeys') + finder.findVisualStudio2017OrNewer = (cb) => { + const file = path.join(__dirname, 'fixtures', + 'VS_2017_BuildTools_minimal.txt') + const data = fs.readFileSync(file) + finder.parseData(null, data, '', cb) + } + finder.findVisualStudio() +}) + +test('VS2017 Community with C++ workload', function (t) { + t.plan(2) + + const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => { + t.strictEqual(err, null) + t.deepEqual(info, { + msBuild: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\' + + 'Community\\MSBuild\\15.0\\Bin\\MSBuild.exe', + path: + 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community', + sdk: '10.0.17763.0', + toolset: 'v141', + version: '15.9.28307.665', + versionMajor: 15, + versionMinor: 9, + versionYear: 2017 + }) + }) + + poison(finder, 'regSearchKeys') + finder.findVisualStudio2017OrNewer = (cb) => { + const file = path.join(__dirname, 'fixtures', + 'VS_2017_Community_workload.txt') + const data = fs.readFileSync(file) + finder.parseData(null, data, '', cb) + } + finder.findVisualStudio() +}) + +test('VS2019 Preview with C++ workload', function (t) { + t.plan(2) + + const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => { + t.strictEqual(err, null) + t.deepEqual(info, { + msBuild: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\' + + 'Preview\\MSBuild\\Current\\Bin\\MSBuild.exe', + path: + 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Preview', + sdk: '10.0.17763.0', + toolset: 'v142', + version: '16.0.28608.199', + versionMajor: 16, + versionMinor: 0, + versionYear: 2019 + }) + }) + + poison(finder, 'regSearchKeys') + finder.findVisualStudio2017OrNewer = (cb) => { + const file = path.join(__dirname, 'fixtures', + 'VS_2019_Preview.txt') + const data = fs.readFileSync(file) + finder.parseData(null, data, '', cb) + } + finder.findVisualStudio() +}) + +test('minimal VS2019 Build Tools', function (t) { + t.plan(2) + + const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => { + t.strictEqual(err, null) + t.deepEqual(info, { + msBuild: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\' + + 'BuildTools\\MSBuild\\Current\\Bin\\MSBuild.exe', + path: + 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools', + sdk: '10.0.17134.0', + toolset: 'v142', + version: '16.1.28922.388', + versionMajor: 16, + versionMinor: 1, + versionYear: 2019 + }) + }) + + poison(finder, 'regSearchKeys') + finder.findVisualStudio2017OrNewer = (cb) => { + const file = path.join(__dirname, 'fixtures', + 'VS_2019_BuildTools_minimal.txt') + const data = fs.readFileSync(file) + finder.parseData(null, data, '', cb) + } + finder.findVisualStudio() +}) + +test('VS2019 Community with C++ workload', function (t) { + t.plan(2) + + const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => { + t.strictEqual(err, null) + t.deepEqual(info, { + msBuild: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\' + + 'Community\\MSBuild\\Current\\Bin\\MSBuild.exe', + path: + 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community', + sdk: '10.0.17763.0', + toolset: 'v142', + version: '16.1.28922.388', + versionMajor: 16, + versionMinor: 1, + versionYear: 2019 + }) + }) + + poison(finder, 'regSearchKeys') + finder.findVisualStudio2017OrNewer = (cb) => { + const file = path.join(__dirname, 'fixtures', + 'VS_2019_Community_workload.txt') + const data = fs.readFileSync(file) + finder.parseData(null, data, '', cb) + } + finder.findVisualStudio() +}) + +function allVsVersions (t, finder) { + finder.findVisualStudio2017OrNewer = (cb) => { + const data0 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures', + 'VS_2017_Unusable.txt'))) + const data1 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures', + 'VS_2017_BuildTools_minimal.txt'))) + const data2 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures', + 'VS_2017_Community_workload.txt'))) + const data3 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures', + 'VS_2019_Preview.txt'))) + const data4 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures', + 'VS_2019_BuildTools_minimal.txt'))) + const data5 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures', + 'VS_2019_Community_workload.txt'))) + const data = JSON.stringify(data0.concat(data1, data2, data3, data4, + data5)) + finder.parseData(null, data, '', cb) + } + finder.regSearchKeys = (keys, value, addOpts, cb) => { + for (var i = 0; i < keys.length; ++i) { + const fullName = `${keys[i]}\\${value}` + switch (fullName) { + case 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0': + case 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7\\12.0': + continue + case 'HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\12.0': + return cb(null, 'C:\\VS2013\\VC\\') + case 'HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions\\12.0\\MSBuildToolsPath': + return cb(null, 'C:\\MSBuild12\\') + case 'HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0': + return cb(null, 'C:\\VS2015\\VC\\') + case 'HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions\\14.0\\MSBuildToolsPath': + return cb(null, 'C:\\MSBuild14\\') + default: + t.fail(`unexpected search for registry value ${fullName}`) + } + } + return cb(new Error()) + } +} + +test('fail when looking for invalid path', function (t) { + t.plan(2) + + const finder = new TestVisualStudioFinder(semverV1, 'AABB', (err, info) => { + t.ok(/find .* Visual Studio/i.test(err), 'expect error') + t.false(info, 'no data') + }) + + allVsVersions(t, finder) + finder.findVisualStudio() +}) + +test('look for VS2013 by version number', function (t) { + t.plan(2) + + const finder = new TestVisualStudioFinder(semverV1, '2013', (err, info) => { + t.strictEqual(err, null) + t.deepEqual(info.versionYear, 2013) + }) + + allVsVersions(t, finder) + finder.findVisualStudio() +}) + +test('look for VS2013 by installation path', function (t) { + t.plan(2) + + const finder = new TestVisualStudioFinder(semverV1, 'C:\\VS2013', + (err, info) => { + t.strictEqual(err, null) + t.deepEqual(info.path, 'C:\\VS2013') + }) + + allVsVersions(t, finder) + finder.findVisualStudio() +}) + +test('look for VS2015 by version number', function (t) { + t.plan(2) + + const finder = new TestVisualStudioFinder(semverV1, '2015', (err, info) => { + t.strictEqual(err, null) + t.deepEqual(info.versionYear, 2015) + }) + + allVsVersions(t, finder) + finder.findVisualStudio() +}) + +test('look for VS2015 by installation path', function (t) { + t.plan(2) + + const finder = new TestVisualStudioFinder(semverV1, 'C:\\VS2015', + (err, info) => { + t.strictEqual(err, null) + t.deepEqual(info.path, 'C:\\VS2015') + }) + + allVsVersions(t, finder) + finder.findVisualStudio() +}) + +test('look for VS2017 by version number', function (t) { + t.plan(2) + + const finder = new TestVisualStudioFinder(semverV1, '2017', (err, info) => { + t.strictEqual(err, null) + t.deepEqual(info.versionYear, 2017) + }) + + allVsVersions(t, finder) + finder.findVisualStudio() +}) + +test('look for VS2017 by installation path', function (t) { + t.plan(2) + + const finder = new TestVisualStudioFinder(semverV1, + 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community', + (err, info) => { + t.strictEqual(err, null) + t.deepEqual(info.path, + 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community') + }) + + allVsVersions(t, finder) + finder.findVisualStudio() +}) + +test('look for VS2019 by version number', function (t) { + t.plan(2) + + const finder = new TestVisualStudioFinder(semverV1, '2019', (err, info) => { + t.strictEqual(err, null) + t.deepEqual(info.versionYear, 2019) + }) + + allVsVersions(t, finder) + finder.findVisualStudio() +}) + +test('look for VS2019 by installation path', function (t) { + t.plan(2) + + const finder = new TestVisualStudioFinder(semverV1, + 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools', + (err, info) => { + t.strictEqual(err, null) + t.deepEqual(info.path, + 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools') + }) + + allVsVersions(t, finder) + finder.findVisualStudio() +}) + +test('msvs_version match should be case insensitive', function (t) { + t.plan(2) + + const finder = new TestVisualStudioFinder(semverV1, + 'c:\\program files (x86)\\microsoft visual studio\\2019\\BUILDTOOLS', + (err, info) => { + t.strictEqual(err, null) + t.deepEqual(info.path, + 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools') + }) + + allVsVersions(t, finder) + finder.findVisualStudio() +}) + +test('latest version should be found by default', function (t) { + t.plan(2) + + const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => { + t.strictEqual(err, null) + t.deepEqual(info.versionYear, 2019) + }) + + allVsVersions(t, finder) + finder.findVisualStudio() +}) + +test('run on a usable VS Command Prompt', function (t) { + t.plan(2) + + process.env.VCINSTALLDIR = 'C:\\VS2015\\VC' + // VSINSTALLDIR is not defined on Visual C++ Build Tools 2015 + delete process.env.VSINSTALLDIR + + const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => { + t.strictEqual(err, null) + t.deepEqual(info.path, 'C:\\VS2015') + }) + + allVsVersions(t, finder) + finder.findVisualStudio() +}) + +test('VCINSTALLDIR match should be case insensitive', function (t) { + t.plan(2) + + process.env.VCINSTALLDIR = + 'c:\\program files (x86)\\microsoft visual studio\\2019\\BUILDTOOLS\\VC' + + const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => { + t.strictEqual(err, null) + t.deepEqual(info.path, + 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools') + }) + + allVsVersions(t, finder) + finder.findVisualStudio() +}) + +test('run on a unusable VS Command Prompt', function (t) { + t.plan(2) + + process.env.VCINSTALLDIR = + 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildToolsUnusable\\VC' + + const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => { + t.ok(/find .* Visual Studio/i.test(err), 'expect error') + t.false(info, 'no data') + }) + + allVsVersions(t, finder) + finder.findVisualStudio() +}) + +test('run on a VS Command Prompt with matching msvs_version', function (t) { + t.plan(2) + + process.env.VCINSTALLDIR = 'C:\\VS2015\\VC' + + const finder = new TestVisualStudioFinder(semverV1, 'C:\\VS2015', + (err, info) => { + t.strictEqual(err, null) + t.deepEqual(info.path, 'C:\\VS2015') + }) + + allVsVersions(t, finder) + finder.findVisualStudio() +}) + +test('run on a VS Command Prompt with mismatched msvs_version', function (t) { + t.plan(2) + + process.env.VCINSTALLDIR = + 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC' + + const finder = new TestVisualStudioFinder(semverV1, 'C:\\VS2015', + (err, info) => { + t.ok(/find .* Visual Studio/i.test(err), 'expect error') + t.false(info, 'no data') + }) + + allVsVersions(t, finder) + finder.findVisualStudio() +}) diff --git a/deps/npm/node_modules/node-gyp/test/test-install.js b/deps/npm/node_modules/node-gyp/test/test-install.js index f647326a7fc660..c3317155e0f3d7 100644 --- a/deps/npm/node_modules/node-gyp/test/test-install.js +++ b/deps/npm/node_modules/node-gyp/test/test-install.js @@ -1,7 +1,9 @@ 'use strict' -var test = require('tape') -var install = require('../lib/install').test.install +const test = require('tap').test +const install = require('../lib/install').test.install + +require('npmlog').level = 'error' // we expect a warning test('EACCES retry once', function (t) { t.plan(3) @@ -11,10 +13,9 @@ test('EACCES retry once', function (t) { var err = new Error() err.code = 'EACCES' cb(err) - t.ok(true); + t.ok(true) } - var gyp = {} gyp.devDir = __dirname gyp.opts = {} diff --git a/deps/npm/node_modules/node-gyp/test/test-options.js b/deps/npm/node_modules/node-gyp/test/test-options.js index d097f81be62c8f..252baa2035e0c5 100644 --- a/deps/npm/node_modules/node-gyp/test/test-options.js +++ b/deps/npm/node_modules/node-gyp/test/test-options.js @@ -1,15 +1,15 @@ -'use strict'; +'use strict' -var test = require('tape') -var gyp = require('../lib/node-gyp') +const test = require('tap').test +const gyp = require('../lib/node-gyp') test('options in environment', function (t) { t.plan(1) // `npm test` dumps a ton of npm_config_* variables in the environment. Object.keys(process.env) - .filter(function(key) { return /^npm_config_/.test(key) }) - .forEach(function(key) { delete process.env[key] }) + .filter(function (key) { return /^npm_config_/.test(key) }) + .forEach(function (key) { delete process.env[key] }) // Zero-length keys should get filtered out. process.env.npm_config_ = '42' @@ -18,8 +18,8 @@ test('options in environment', function (t) { // Except loglevel. process.env.npm_config_loglevel = 'debug' - var g = gyp(); - g.parseArgv(['rebuild']) // Also sets opts.argv. + var g = gyp() + g.parseArgv(['rebuild']) // Also sets opts.argv. t.deepEqual(Object.keys(g.opts).sort(), ['argv', 'x']) }) diff --git a/deps/npm/node_modules/node-gyp/test/test-process-release.js b/deps/npm/node_modules/node-gyp/test/test-process-release.js index 48411ae0a7d5a9..e4370e59eed9a1 100644 --- a/deps/npm/node_modules/node-gyp/test/test-process-release.js +++ b/deps/npm/node_modules/node-gyp/test/test-process-release.js @@ -1,5 +1,7 @@ -var test = require('tape') -var processRelease = require('../lib/process-release') +'use strict' + +const test = require('tap').test +const processRelease = require('../lib/process-release') test('test process release - process.version = 0.8.20', function (t) { t.plan(2) @@ -16,10 +18,8 @@ test('test process release - process.version = 0.8.20', function (t) { tarballUrl: 'https://nodejs.org/dist/v0.8.20/node-v0.8.20.tar.gz', shasumsUrl: 'https://nodejs.org/dist/v0.8.20/SHASUMS256.txt', versionDir: '0.8.20', - libUrl32: 'https://nodejs.org/dist/v0.8.20/node.lib', - libUrl64: 'https://nodejs.org/dist/v0.8.20/x64/node.lib', - libPath32: 'node.lib', - libPath64: 'x64/node.lib' + ia32: { libUrl: 'https://nodejs.org/dist/v0.8.20/node.lib', libPath: 'node.lib' }, + x64: { libUrl: 'https://nodejs.org/dist/v0.8.20/x64/node.lib', libPath: 'x64/node.lib' } }) }) @@ -38,10 +38,8 @@ test('test process release - process.version = 0.10.21', function (t) { tarballUrl: 'https://nodejs.org/dist/v0.10.21/node-v0.10.21.tar.gz', shasumsUrl: 'https://nodejs.org/dist/v0.10.21/SHASUMS256.txt', versionDir: '0.10.21', - libUrl32: 'https://nodejs.org/dist/v0.10.21/node.lib', - libUrl64: 'https://nodejs.org/dist/v0.10.21/x64/node.lib', - libPath32: 'node.lib', - libPath64: 'x64/node.lib' + ia32: { libUrl: 'https://nodejs.org/dist/v0.10.21/node.lib', libPath: 'node.lib' }, + x64: { libUrl: 'https://nodejs.org/dist/v0.10.21/x64/node.lib', libPath: 'x64/node.lib' } }) }) @@ -61,10 +59,8 @@ test('test process release - process.version = 0.12.9', function (t) { tarballUrl: 'https://nodejs.org/dist/v0.12.9/node-v0.12.9.tar.gz', shasumsUrl: 'https://nodejs.org/dist/v0.12.9/SHASUMS256.txt', versionDir: '0.12.9', - libUrl32: 'https://nodejs.org/dist/v0.12.9/node.lib', - libUrl64: 'https://nodejs.org/dist/v0.12.9/x64/node.lib', - libPath32: 'node.lib', - libPath64: 'x64/node.lib' + ia32: { libUrl: 'https://nodejs.org/dist/v0.12.9/node.lib', libPath: 'node.lib' }, + x64: { libUrl: 'https://nodejs.org/dist/v0.12.9/x64/node.lib', libPath: 'x64/node.lib' } }) }) @@ -84,10 +80,8 @@ test('test process release - process.version = 0.10.41', function (t) { tarballUrl: 'https://nodejs.org/dist/v0.10.41/node-v0.10.41.tar.gz', shasumsUrl: 'https://nodejs.org/dist/v0.10.41/SHASUMS256.txt', versionDir: '0.10.41', - libUrl32: 'https://nodejs.org/dist/v0.10.41/node.lib', - libUrl64: 'https://nodejs.org/dist/v0.10.41/x64/node.lib', - libPath32: 'node.lib', - libPath64: 'x64/node.lib' + ia32: { libUrl: 'https://nodejs.org/dist/v0.10.41/node.lib', libPath: 'node.lib' }, + x64: { libUrl: 'https://nodejs.org/dist/v0.10.41/x64/node.lib', libPath: 'x64/node.lib' } }) }) @@ -107,10 +101,8 @@ test('test process release - process.release ~ node@0.10.42', function (t) { tarballUrl: 'https://nodejs.org/dist/v0.10.42/node-v0.10.42-headers.tar.gz', shasumsUrl: 'https://nodejs.org/dist/v0.10.42/SHASUMS256.txt', versionDir: '0.10.42', - libUrl32: 'https://nodejs.org/dist/v0.10.42/node.lib', - libUrl64: 'https://nodejs.org/dist/v0.10.42/x64/node.lib', - libPath32: 'node.lib', - libPath64: 'x64/node.lib' + ia32: { libUrl: 'https://nodejs.org/dist/v0.10.42/node.lib', libPath: 'node.lib' }, + x64: { libUrl: 'https://nodejs.org/dist/v0.10.42/x64/node.lib', libPath: 'x64/node.lib' } }) }) @@ -130,10 +122,8 @@ test('test process release - process.release ~ node@0.12.10', function (t) { tarballUrl: 'https://nodejs.org/dist/v0.12.10/node-v0.12.10-headers.tar.gz', shasumsUrl: 'https://nodejs.org/dist/v0.12.10/SHASUMS256.txt', versionDir: '0.12.10', - libUrl32: 'https://nodejs.org/dist/v0.12.10/node.lib', - libUrl64: 'https://nodejs.org/dist/v0.12.10/x64/node.lib', - libPath32: 'node.lib', - libPath64: 'x64/node.lib' + ia32: { libUrl: 'https://nodejs.org/dist/v0.12.10/node.lib', libPath: 'node.lib' }, + x64: { libUrl: 'https://nodejs.org/dist/v0.12.10/x64/node.lib', libPath: 'x64/node.lib' } }) }) @@ -155,10 +145,8 @@ test('test process release - process.release ~ node@4.1.23', function (t) { tarballUrl: 'https://nodejs.org/dist/v4.1.23/node-v4.1.23-headers.tar.gz', shasumsUrl: 'https://nodejs.org/dist/v4.1.23/SHASUMS256.txt', versionDir: '4.1.23', - libUrl32: 'https://nodejs.org/dist/v4.1.23/win-x86/node.lib', - libUrl64: 'https://nodejs.org/dist/v4.1.23/win-x64/node.lib', - libPath32: 'win-x86/node.lib', - libPath64: 'win-x64/node.lib' + ia32: { libUrl: 'https://nodejs.org/dist/v4.1.23/win-x86/node.lib', libPath: 'win-x86/node.lib' }, + x64: { libUrl: 'https://nodejs.org/dist/v4.1.23/win-x64/node.lib', libPath: 'win-x64/node.lib' } }) }) @@ -180,135 +168,8 @@ test('test process release - process.release ~ node@4.1.23 / corp build', functi tarballUrl: 'https://some.custom.location/node-v4.1.23-headers.tar.gz', shasumsUrl: 'https://some.custom.location/SHASUMS256.txt', versionDir: '4.1.23', - libUrl32: 'https://some.custom.location/win-x86/node.lib', - libUrl64: 'https://some.custom.location/win-x64/node.lib', - libPath32: 'win-x86/node.lib', - libPath64: 'win-x64/node.lib' - }) -}) - -test('test process release - process.version = 1.8.4', function (t) { - t.plan(2) - - var release = processRelease([], { opts: {} }, 'v1.8.4', null) - - t.equal(release.semver.version, '1.8.4') - delete release.semver - - t.deepEqual(release, { - version: '1.8.4', - name: 'iojs', - baseUrl: 'https://iojs.org/download/release/v1.8.4/', - tarballUrl: 'https://iojs.org/download/release/v1.8.4/iojs-v1.8.4.tar.gz', - shasumsUrl: 'https://iojs.org/download/release/v1.8.4/SHASUMS256.txt', - versionDir: 'iojs-1.8.4', - libUrl32: 'https://iojs.org/download/release/v1.8.4/win-x86/iojs.lib', - libUrl64: 'https://iojs.org/download/release/v1.8.4/win-x64/iojs.lib', - libPath32: 'win-x86/iojs.lib', - libPath64: 'win-x64/iojs.lib' - }) -}) - -test('test process release - process.release ~ iojs@3.2.24', function (t) { - t.plan(2) - - var release = processRelease([], { opts: {} }, 'v3.2.24', { - name: 'io.js', - headersUrl: 'https://iojs.org/download/release/v3.2.24/iojs-v3.2.24-headers.tar.gz' - }) - - t.equal(release.semver.version, '3.2.24') - delete release.semver - - t.deepEqual(release, { - version: '3.2.24', - name: 'iojs', - baseUrl: 'https://iojs.org/download/release/v3.2.24/', - tarballUrl: 'https://iojs.org/download/release/v3.2.24/iojs-v3.2.24-headers.tar.gz', - shasumsUrl: 'https://iojs.org/download/release/v3.2.24/SHASUMS256.txt', - versionDir: 'iojs-3.2.24', - libUrl32: 'https://iojs.org/download/release/v3.2.24/win-x86/iojs.lib', - libUrl64: 'https://iojs.org/download/release/v3.2.24/win-x64/iojs.lib', - libPath32: 'win-x86/iojs.lib', - libPath64: 'win-x64/iojs.lib' - }) -}) - -test('test process release - process.release ~ iojs@3.2.11 +libUrl32', function (t) { - t.plan(2) - - var release = processRelease([], { opts: {} }, 'v3.2.11', { - name: 'io.js', - headersUrl: 'https://iojs.org/download/release/v3.2.11/iojs-v3.2.11-headers.tar.gz', - libUrl: 'https://iojs.org/download/release/v3.2.11/win-x86/iojs.lib' // custom - }) - - t.equal(release.semver.version, '3.2.11') - delete release.semver - - t.deepEqual(release, { - version: '3.2.11', - name: 'iojs', - baseUrl: 'https://iojs.org/download/release/v3.2.11/', - tarballUrl: 'https://iojs.org/download/release/v3.2.11/iojs-v3.2.11-headers.tar.gz', - shasumsUrl: 'https://iojs.org/download/release/v3.2.11/SHASUMS256.txt', - versionDir: 'iojs-3.2.11', - libUrl32: 'https://iojs.org/download/release/v3.2.11/win-x86/iojs.lib', - libUrl64: 'https://iojs.org/download/release/v3.2.11/win-x64/iojs.lib', - libPath32: 'win-x86/iojs.lib', - libPath64: 'win-x64/iojs.lib' - }) -}) - -test('test process release - process.release ~ iojs@3.2.101 +libUrl64', function (t) { - t.plan(2) - - var release = processRelease([], { opts: {} }, 'v3.2.101', { - name: 'io.js', - headersUrl: 'https://iojs.org/download/release/v3.2.101/iojs-v3.2.101-headers.tar.gz', - libUrl: 'https://iojs.org/download/release/v3.2.101/win-x64/iojs.lib' // custom - }) - - t.equal(release.semver.version, '3.2.101') - delete release.semver - - t.deepEqual(release, { - version: '3.2.101', - name: 'iojs', - baseUrl: 'https://iojs.org/download/release/v3.2.101/', - tarballUrl: 'https://iojs.org/download/release/v3.2.101/iojs-v3.2.101-headers.tar.gz', - shasumsUrl: 'https://iojs.org/download/release/v3.2.101/SHASUMS256.txt', - versionDir: 'iojs-3.2.101', - libUrl32: 'https://iojs.org/download/release/v3.2.101/win-x86/iojs.lib', - libUrl64: 'https://iojs.org/download/release/v3.2.101/win-x64/iojs.lib', - libPath32: 'win-x86/iojs.lib', - libPath64: 'win-x64/iojs.lib' - }) -}) - -test('test process release - process.release ~ iojs@3.3.0 - borked win-ia32', function (t) { - t.plan(2) - - var release = processRelease([], { opts: {} }, 'v3.2.101', { - name: 'io.js', - headersUrl: 'https://iojs.org/download/release/v3.2.101/iojs-v3.2.101-headers.tar.gz', - libUrl: 'https://iojs.org/download/release/v3.2.101/win-ia32/iojs.lib' // custom - }) - - t.equal(release.semver.version, '3.2.101') - delete release.semver - - t.deepEqual(release, { - version: '3.2.101', - name: 'iojs', - baseUrl: 'https://iojs.org/download/release/v3.2.101/', - tarballUrl: 'https://iojs.org/download/release/v3.2.101/iojs-v3.2.101-headers.tar.gz', - shasumsUrl: 'https://iojs.org/download/release/v3.2.101/SHASUMS256.txt', - versionDir: 'iojs-3.2.101', - libUrl32: 'https://iojs.org/download/release/v3.2.101/win-x86/iojs.lib', - libUrl64: 'https://iojs.org/download/release/v3.2.101/win-x64/iojs.lib', - libPath32: 'win-x86/iojs.lib', - libPath64: 'win-x64/iojs.lib' + ia32: { libUrl: 'https://some.custom.location/win-x86/node.lib', libPath: 'win-x86/node.lib' }, + x64: { libUrl: 'https://some.custom.location/win-x64/node.lib', libPath: 'win-x64/node.lib' } }) }) @@ -330,35 +191,8 @@ test('test process release - process.release ~ node@4.1.23 --target=0.10.40', fu tarballUrl: 'https://nodejs.org/dist/v0.10.40/node-v0.10.40.tar.gz', shasumsUrl: 'https://nodejs.org/dist/v0.10.40/SHASUMS256.txt', versionDir: '0.10.40', - libUrl32: 'https://nodejs.org/dist/v0.10.40/node.lib', - libUrl64: 'https://nodejs.org/dist/v0.10.40/x64/node.lib', - libPath32: 'node.lib', - libPath64: 'x64/node.lib' - }) -}) - -test('test process release - process.release ~ node@4.1.23 --target=1.8.4', function (t) { - t.plan(2) - - var release = processRelease([], { opts: { target: '1.8.4' } }, 'v4.1.23', { - name: 'node', - headersUrl: 'https://nodejs.org/dist/v4.1.23/node-v4.1.23-headers.tar.gz' - }) - - t.equal(release.semver.version, '1.8.4') - delete release.semver - - t.deepEqual(release, { - version: '1.8.4', - name: 'iojs', - baseUrl: 'https://iojs.org/download/release/v1.8.4/', - tarballUrl: 'https://iojs.org/download/release/v1.8.4/iojs-v1.8.4.tar.gz', - shasumsUrl: 'https://iojs.org/download/release/v1.8.4/SHASUMS256.txt', - versionDir: 'iojs-1.8.4', - libUrl32: 'https://iojs.org/download/release/v1.8.4/win-x86/iojs.lib', - libUrl64: 'https://iojs.org/download/release/v1.8.4/win-x64/iojs.lib', - libPath32: 'win-x86/iojs.lib', - libPath64: 'win-x64/iojs.lib' + ia32: { libUrl: 'https://nodejs.org/dist/v0.10.40/node.lib', libPath: 'node.lib' }, + x64: { libUrl: 'https://nodejs.org/dist/v0.10.40/x64/node.lib', libPath: 'x64/node.lib' } }) }) @@ -380,10 +214,8 @@ test('test process release - process.release ~ node@4.1.23 --dist-url=https://fo tarballUrl: 'https://foo.bar/baz/v4.1.23/node-v4.1.23-headers.tar.gz', shasumsUrl: 'https://foo.bar/baz/v4.1.23/SHASUMS256.txt', versionDir: '4.1.23', - libUrl32: 'https://foo.bar/baz/v4.1.23/win-x86/node.lib', - libUrl64: 'https://foo.bar/baz/v4.1.23/win-x64/node.lib', - libPath32: 'win-x86/node.lib', - libPath64: 'win-x64/node.lib' + ia32: { libUrl: 'https://foo.bar/baz/v4.1.23/win-x86/node.lib', libPath: 'win-x86/node.lib' }, + x64: { libUrl: 'https://foo.bar/baz/v4.1.23/win-x64/node.lib', libPath: 'win-x64/node.lib' } }) }) @@ -405,14 +237,11 @@ test('test process release - process.release ~ frankenstein@4.1.23', function (t tarballUrl: 'https://frankensteinjs.org/dist/v4.1.23/frankenstein-v4.1.23-headers.tar.gz', shasumsUrl: 'https://frankensteinjs.org/dist/v4.1.23/SHASUMS256.txt', versionDir: 'frankenstein-4.1.23', - libUrl32: 'https://frankensteinjs.org/dist/v4.1.23/win-x86/frankenstein.lib', - libUrl64: 'https://frankensteinjs.org/dist/v4.1.23/win-x64/frankenstein.lib', - libPath32: 'win-x86/frankenstein.lib', - libPath64: 'win-x64/frankenstein.lib' + ia32: { libUrl: 'https://frankensteinjs.org/dist/v4.1.23/win-x86/frankenstein.lib', libPath: 'win-x86/frankenstein.lib' }, + x64: { libUrl: 'https://frankensteinjs.org/dist/v4.1.23/win-x64/frankenstein.lib', libPath: 'win-x64/frankenstein.lib' } }) }) - test('test process release - process.release ~ frankenstein@4.1.23 --dist-url=http://foo.bar/baz/', function (t) { t.plan(2) @@ -431,10 +260,8 @@ test('test process release - process.release ~ frankenstein@4.1.23 --dist-url=ht tarballUrl: 'http://foo.bar/baz/v4.1.23/frankenstein-v4.1.23-headers.tar.gz', shasumsUrl: 'http://foo.bar/baz/v4.1.23/SHASUMS256.txt', versionDir: 'frankenstein-4.1.23', - libUrl32: 'http://foo.bar/baz/v4.1.23/win-x86/frankenstein.lib', - libUrl64: 'http://foo.bar/baz/v4.1.23/win-x64/frankenstein.lib', - libPath32: 'win-x86/frankenstein.lib', - libPath64: 'win-x64/frankenstein.lib' + ia32: { libUrl: 'http://foo.bar/baz/v4.1.23/win-x86/frankenstein.lib', libPath: 'win-x86/frankenstein.lib' }, + x64: { libUrl: 'http://foo.bar/baz/v4.1.23/win-x64/frankenstein.lib', libPath: 'win-x64/frankenstein.lib' } }) }) @@ -456,14 +283,11 @@ test('test process release - process.release ~ node@4.0.0-rc.4', function (t) { tarballUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz', shasumsUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/SHASUMS256.txt', versionDir: '4.0.0-rc.4', - libUrl32: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x86/node.lib', - libUrl64: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x64/node.lib', - libPath32: 'win-x86/node.lib', - libPath64: 'win-x64/node.lib' + ia32: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x86/node.lib', libPath: 'win-x86/node.lib' }, + x64: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x64/node.lib', libPath: 'win-x64/node.lib' } }) }) - test('test process release - process.release ~ node@4.0.0-rc.4 passed as argv[0]', function (t) { t.plan(2) @@ -484,14 +308,11 @@ test('test process release - process.release ~ node@4.0.0-rc.4 passed as argv[0] tarballUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz', shasumsUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/SHASUMS256.txt', versionDir: '4.0.0-rc.4', - libUrl32: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x86/node.lib', - libUrl64: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x64/node.lib', - libPath32: 'win-x86/node.lib', - libPath64: 'win-x64/node.lib' + ia32: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x86/node.lib', libPath: 'win-x86/node.lib' }, + x64: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x64/node.lib', libPath: 'win-x64/node.lib' } }) }) - test('test process release - process.release ~ node@4.0.0-rc.4 - bogus string passed as argv[0]', function (t) { t.plan(2) @@ -512,10 +333,8 @@ test('test process release - process.release ~ node@4.0.0-rc.4 - bogus string pa tarballUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz', shasumsUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/SHASUMS256.txt', versionDir: '4.0.0-rc.4', - libUrl32: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x86/node.lib', - libUrl64: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x64/node.lib', - libPath32: 'win-x86/node.lib', - libPath64: 'win-x64/node.lib' + ia32: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x86/node.lib', libPath: 'win-x86/node.lib' }, + x64: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x64/node.lib', libPath: 'win-x64/node.lib' } }) }) @@ -539,99 +358,9 @@ test('test process release - NODEJS_ORG_MIRROR', function (t) { tarballUrl: 'http://foo.bar/v4.1.23/node-v4.1.23-headers.tar.gz', shasumsUrl: 'http://foo.bar/v4.1.23/SHASUMS256.txt', versionDir: '4.1.23', - libUrl32: 'http://foo.bar/v4.1.23/win-x86/node.lib', - libUrl64: 'http://foo.bar/v4.1.23/win-x64/node.lib', - libPath32: 'win-x86/node.lib', - libPath64: 'win-x64/node.lib' + ia32: { libUrl: 'http://foo.bar/v4.1.23/win-x86/node.lib', libPath: 'win-x86/node.lib' }, + x64: { libUrl: 'http://foo.bar/v4.1.23/win-x64/node.lib', libPath: 'win-x64/node.lib' } }) delete process.env.NODEJS_ORG_MIRROR }) - -test('test process release - NVM_NODEJS_ORG_MIRROR', function (t) { - t.plan(2) - - process.env.NVM_NODEJS_ORG_MIRROR = 'http://foo.bar' - - var release = processRelease([], { opts: {} }, 'v4.1.23', { - name: 'node', - headersUrl: 'https://nodejs.org/dist/v4.1.23/node-v4.1.23-headers.tar.gz' - }) - - t.equal(release.semver.version, '4.1.23') - delete release.semver - - t.deepEqual(release, { - version: '4.1.23', - name: 'node', - baseUrl: 'http://foo.bar/v4.1.23/', - tarballUrl: 'http://foo.bar/v4.1.23/node-v4.1.23-headers.tar.gz', - shasumsUrl: 'http://foo.bar/v4.1.23/SHASUMS256.txt', - versionDir: '4.1.23', - libUrl32: 'http://foo.bar/v4.1.23/win-x86/node.lib', - libUrl64: 'http://foo.bar/v4.1.23/win-x64/node.lib', - libPath32: 'win-x86/node.lib', - libPath64: 'win-x64/node.lib' - }) - - delete process.env.NVM_NODEJS_ORG_MIRROR -}) - -test('test process release - IOJS_ORG_MIRROR', function (t) { - t.plan(2) - - process.env.IOJS_ORG_MIRROR = 'http://foo.bar' - - var release = processRelease([], { opts: {} }, 'v3.2.24', { - name: 'io.js', - headersUrl: 'https://iojs.org/download/release/v3.2.24/iojs-v3.2.24-headers.tar.gz' - }) - - t.equal(release.semver.version, '3.2.24') - delete release.semver - - t.deepEqual(release, { - version: '3.2.24', - name: 'iojs', - baseUrl: 'http://foo.bar/v3.2.24/', - tarballUrl: 'http://foo.bar/v3.2.24/iojs-v3.2.24-headers.tar.gz', - shasumsUrl: 'http://foo.bar/v3.2.24/SHASUMS256.txt', - versionDir: 'iojs-3.2.24', - libUrl32: 'http://foo.bar/v3.2.24/win-x86/iojs.lib', - libUrl64: 'http://foo.bar/v3.2.24/win-x64/iojs.lib', - libPath32: 'win-x86/iojs.lib', - libPath64: 'win-x64/iojs.lib' - }) - - delete process.env.IOJS_ORG_MIRROR -}) - - -test('test process release - NVM_IOJS_ORG_MIRROR', function (t) { - t.plan(2) - - process.env.NVM_IOJS_ORG_MIRROR = 'http://foo.bar' - - var release = processRelease([], { opts: {} }, 'v3.2.24', { - name: 'io.js', - headersUrl: 'https://iojs.org/download/release/v3.2.24/iojs-v3.2.24-headers.tar.gz' - }) - - t.equal(release.semver.version, '3.2.24') - delete release.semver - - t.deepEqual(release, { - version: '3.2.24', - name: 'iojs', - baseUrl: 'http://foo.bar/v3.2.24/', - tarballUrl: 'http://foo.bar/v3.2.24/iojs-v3.2.24-headers.tar.gz', - shasumsUrl: 'http://foo.bar/v3.2.24/SHASUMS256.txt', - versionDir: 'iojs-3.2.24', - libUrl32: 'http://foo.bar/v3.2.24/win-x86/iojs.lib', - libUrl64: 'http://foo.bar/v3.2.24/win-x64/iojs.lib', - libPath32: 'win-x86/iojs.lib', - libPath64: 'win-x64/iojs.lib' - }) - - delete process.env.NVM_IOJS_ORG_MIRROR -}) diff --git a/deps/npm/node_modules/npm-lifecycle/CHANGELOG.md b/deps/npm/node_modules/npm-lifecycle/CHANGELOG.md index 7e7bc92e2922e6..1a8c916bf3d39d 100644 --- a/deps/npm/node_modules/npm-lifecycle/CHANGELOG.md +++ b/deps/npm/node_modules/npm-lifecycle/CHANGELOG.md @@ -2,6 +2,62 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [3.1.2](https://github.com/npm/lifecycle/compare/v3.1.1...v3.1.2) (2019-07-22) + + +### Bug Fixes + +* do not exclude /path/ from process.env copying ([53e6318](https://github.com/npm/lifecycle/commit/53e6318)) + + + + +# [3.1.0](https://github.com/npm/lifecycle/compare/v3.0.0...v3.1.0) (2019-07-17) + + +### Bug Fixes + +* remove procInterrupt listener on SIGINT in procError ([ea18ed2](https://github.com/npm/lifecycle/commit/ea18ed2)), closes [#36](https://github.com/npm/lifecycle/issues/36) [#11](https://github.com/npm/lifecycle/issues/11) [#18](https://github.com/npm/lifecycle/issues/18) +* set only one PATH env variable for child proc ([3aaf954](https://github.com/npm/lifecycle/commit/3aaf954)), closes [#22](https://github.com/npm/lifecycle/issues/22) [#25](https://github.com/npm/lifecycle/issues/25) + + +### Features + +* **process.env.path:** Use platform specific path casing if present ([5523951](https://github.com/npm/lifecycle/commit/5523951)), closes [#29](https://github.com/npm/lifecycle/issues/29) [#30](https://github.com/npm/lifecycle/issues/30) + + + + +# [3.0.0](https://github.com/npm/lifecycle/compare/v2.1.1...v3.0.0) (2019-07-10) + + +* node-gyp@5.0.2 ([3c5aae6](https://github.com/npm/lifecycle/commit/3c5aae6)) + + +### BREAKING CHANGES + +* requires modifying the version of node-gyp in npm cli. + +Required for https://github.com/npm/cli/pull/208 +Fix: https://github.com/npm/npm-lifecycle/issues/37 +Close: https://github.com/npm/npm-lifecycle/issues/38 +PR-URL: https://github.com/npm/npm-lifecycle/pull/38 +Credit: @irega +Reviewed-by: @isaacs + + + + +## [2.1.1](https://github.com/npm/lifecycle/compare/v2.1.0...v2.1.1) (2019-05-08) + + +### Bug Fixes + +* **test:** update postinstall script for fixture ([220cd70](https://github.com/npm/lifecycle/commit/220cd70)) + + + # [2.1.0](https://github.com/npm/lifecycle/compare/v2.0.3...v2.1.0) (2018-08-13) diff --git a/deps/npm/node_modules/npm-lifecycle/index.js b/deps/npm/node_modules/npm-lifecycle/index.js index 4eb83255a94a23..0972870b18c972 100644 --- a/deps/npm/node_modules/npm-lifecycle/index.js +++ b/deps/npm/node_modules/npm-lifecycle/index.js @@ -4,6 +4,9 @@ exports = module.exports = lifecycle exports.makeEnv = makeEnv exports._incorrectWorkingDirectory = _incorrectWorkingDirectory +// for testing +const platform = process.env.__TESTING_FAKE_PLATFORM__ || process.platform +const isWindows = platform === 'win32' const spawn = require('./lib/spawn') const path = require('path') const Stream = require('stream').Stream @@ -18,17 +21,28 @@ const resolveFrom = require('resolve-from') const DEFAULT_NODE_GYP_PATH = resolveFrom(__dirname, 'node-gyp/bin/node-gyp') const hookStatCache = new Map() -let PATH = 'PATH' - -// windows calls it's path 'Path' usually, but this is not guaranteed. -if (process.platform === 'win32') { - PATH = 'Path' - Object.keys(process.env).forEach(function (e) { - if (e.match(/^PATH$/i)) { - PATH = e - } - }) +let PATH = isWindows ? 'Path' : 'PATH' +exports._pathEnvName = PATH +const delimiter = path.delimiter + +// windows calls its path 'Path' usually, but this is not guaranteed. +// merge them all together in the order they appear in the object. +const mergePath = env => + Object.keys(env).filter(p => /^path$/i.test(p) && env[p]) + .map(p => env[p].split(delimiter)) + .reduce((set, p) => set.concat(p.filter(p => !set.includes(p))), []) + .join(delimiter) +exports._mergePath = mergePath + +const setPathEnv = (env, path) => { + // first ensure that the canonical value is set. + env[PATH] = path + // also set any other case values, because windows. + Object.keys(env) + .filter(p => p !== PATH && /^path$/i.test(p)) + .forEach(p => { env[p] = path }) } +exports._setPathEnv = setPathEnv function logid (pkg, stage) { return pkg._id + '~' + stage + ':' @@ -120,8 +134,10 @@ function lifecycle_ (pkg, stage, wd, opts, env, cb) { pathArr.push(path.dirname(process.execPath)) } - if (env[PATH]) pathArr.push(env[PATH]) - env[PATH] = pathArr.join(process.platform === 'win32' ? ';' : ':') + const existingPath = mergePath(env) + if (existingPath) pathArr.push(existingPath) + const envPath = pathArr.join(isWindows ? ';' : ':') + setPathEnv(env, envPath) var packageLifecycle = pkg.scripts && pkg.scripts.hasOwnProperty(stage) @@ -164,10 +180,9 @@ function shouldPrependCurrentNodeDirToPATH (opts) { var isDifferentNodeInPath - var isWindows = process.platform === 'win32' var foundExecPath try { - foundExecPath = which.sync(path.basename(process.execPath), {pathExt: isWindows ? ';' : ':'}) + foundExecPath = which.sync(path.basename(process.execPath), { pathExt: isWindows ? ';' : ':' }) // Apply `fs.realpath()` here to avoid false positives when `node` is a symlinked executable. isDifferentNodeInPath = fs.realpathSync(process.execPath).toUpperCase() !== fs.realpathSync(foundExecPath).toUpperCase() @@ -242,7 +257,7 @@ function runCmd (note, cmd, pkg, env, stage, wd, opts, cb) { } opts.log.verbose('lifecycle', logid(pkg, stage), 'unsafe-perm in lifecycle', unsafe) - if (process.platform === 'win32') { + if (isWindows) { unsafe = true } @@ -255,14 +270,8 @@ function runCmd (note, cmd, pkg, env, stage, wd, opts, cb) { } } -function runCmd_ (cmd, pkg, env, wd, opts, stage, unsafe, uid, gid, cb_) { - function cb (er) { - cb_.apply(null, arguments) - opts.log.resume() - process.nextTick(dequeue) - } - - var conf = { +const getSpawnArgs = ({ cmd, wd, opts, uid, gid, unsafe, env }) => { + const conf = { cwd: wd, env: env, stdio: opts.stdio || [ 0, 1, 2 ] @@ -273,24 +282,40 @@ function runCmd_ (cmd, pkg, env, wd, opts, stage, unsafe, uid, gid, cb_) { conf.gid = gid ^ 0 } - var sh = 'sh' - var shFlag = '-c' - - var customShell = opts.scriptShell + const customShell = opts.scriptShell + let sh = 'sh' + let shFlag = '-c' if (customShell) { sh = customShell - } else if (process.platform === 'win32') { + } else if (isWindows || opts._TESTING_FAKE_WINDOWS_) { sh = process.env.comspec || 'cmd' - shFlag = '/d /s /c' - conf.windowsVerbatimArguments = true + // '/d /s /c' is used only for cmd.exe. + if (/^(?:.*\\)?cmd(?:\.exe)?$/i.test(sh)) { + shFlag = '/d /s /c' + conf.windowsVerbatimArguments = true + } } + return [sh, [shFlag, cmd], conf] +} + +exports._getSpawnArgs = getSpawnArgs + +function runCmd_ (cmd, pkg, env, wd, opts, stage, unsafe, uid, gid, cb_) { + function cb (er) { + cb_.apply(null, arguments) + opts.log.resume() + process.nextTick(dequeue) + } + + const [sh, args, conf] = getSpawnArgs({ cmd, wd, opts, uid, gid, unsafe, env }) + opts.log.verbose('lifecycle', logid(pkg, stage), 'PATH:', env[PATH]) opts.log.verbose('lifecycle', logid(pkg, stage), 'CWD:', wd) - opts.log.silly('lifecycle', logid(pkg, stage), 'Args:', [shFlag, cmd]) + opts.log.silly('lifecycle', logid(pkg, stage), 'Args:', args) - var proc = spawn(sh, [shFlag, cmd], conf, opts.log) + var proc = spawn(sh, args, conf, opts.log) proc.on('error', procError) proc.on('close', function (code, signal) { @@ -333,6 +358,7 @@ function runCmd_ (cmd, pkg, env, wd, opts, stage, unsafe, uid, gid, cb_) { process.removeListener('SIGTERM', procKill) process.removeListener('SIGTERM', procInterupt) process.removeListener('SIGINT', procKill) + process.removeListener('SIGINT', procInterupt) return cb(er) } function procKill () { diff --git a/deps/npm/node_modules/npm-lifecycle/package.json b/deps/npm/node_modules/npm-lifecycle/package.json index 6f63b06fd51c4d..80cbae3a5fb4fc 100644 --- a/deps/npm/node_modules/npm-lifecycle/package.json +++ b/deps/npm/node_modules/npm-lifecycle/package.json @@ -1,29 +1,30 @@ { - "_from": "npm-lifecycle@2.1.0", - "_id": "npm-lifecycle@2.1.0", + "_from": "npm-lifecycle@3.1.2", + "_id": "npm-lifecycle@3.1.2", "_inBundle": false, - "_integrity": "sha512-QbBfLlGBKsktwBZLj6AviHC6Q9Y3R/AY4a2PYSIRhSKSS0/CxRyD/PfxEX6tPeOCXQgMSNdwGeECacstgptc+g==", + "_integrity": "sha512-nhfOcoTHrW1lJJlM2o77vTE2RWR4YOVyj7YzmY0y5itsMjEuoJHteio/ez0BliENEPsNxIUQgwhyEW9dShj3Ww==", "_location": "/npm-lifecycle", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "npm-lifecycle@2.1.0", + "raw": "npm-lifecycle@3.1.2", "name": "npm-lifecycle", "escapedName": "npm-lifecycle", - "rawSpec": "2.1.0", + "rawSpec": "3.1.2", "saveSpec": null, - "fetchSpec": "2.1.0" + "fetchSpec": "3.1.2" }, "_requiredBy": [ "#USER", "/", - "/libcipm" + "/libcipm", + "/libnpm" ], - "_resolved": "https://registry.npmjs.org/npm-lifecycle/-/npm-lifecycle-2.1.0.tgz", - "_shasum": "1eda2eedb82db929e3a0c50341ab0aad140ed569", - "_spec": "npm-lifecycle@2.1.0", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/npm-lifecycle/-/npm-lifecycle-3.1.2.tgz", + "_shasum": "06f2253ea3b9e122ce3e55e3496670a810afcc84", + "_spec": "npm-lifecycle@3.1.2", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Mike Sherov" }, @@ -33,8 +34,8 @@ "bundleDependencies": false, "dependencies": { "byline": "^5.0.0", - "graceful-fs": "^4.1.11", - "node-gyp": "^3.8.0", + "graceful-fs": "^4.1.15", + "node-gyp": "^5.0.2", "resolve-from": "^4.0.0", "slide": "^1.1.6", "uid-number": "0.0.6", @@ -44,11 +45,11 @@ "deprecated": false, "description": "JavaScript package lifecycle hook runner", "devDependencies": { - "nyc": "^12.0.2", - "sinon": "^6.1.5", - "standard": "^11.0.1", + "nyc": "^14.1.0", + "sinon": "^7.2.3", + "standard": "^12.0.1", "standard-version": "^4.4.0", - "tap": "^12.0.1", + "tap": "^12.7.0", "weallbehave": "^1.2.0", "weallcontribute": "^1.0.8" }, @@ -76,9 +77,10 @@ "prerelease": "npm t", "pretest": "standard", "release": "standard-version -s", - "test": "tap -J --coverage test/*.js", + "snap": "TAP_SNAPSHOT=1 npm test", + "test": "tap -J --cov test/*.js", "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "2.1.0" + "version": "3.1.2" } diff --git a/deps/npm/node_modules/npm-profile/package.json b/deps/npm/node_modules/npm-profile/package.json index 082da1efcaf8f9..2f252aac85ab0d 100644 --- a/deps/npm/node_modules/npm-profile/package.json +++ b/deps/npm/node_modules/npm-profile/package.json @@ -1,28 +1,28 @@ { - "_from": "npm-profile@latest", - "_id": "npm-profile@4.0.1", + "_from": "npm-profile@4.0.2", + "_id": "npm-profile@4.0.2", "_inBundle": false, - "_integrity": "sha512-NQ1I/1Q7YRtHZXkcuU1/IyHeLy6pd+ScKg4+DQHdfsm769TGq6HPrkbuNJVJS4zwE+0mvvmeULzQdWn2L2EsVA==", + "_integrity": "sha512-VRsC04pvRH+9cF+PoVh2nTmJjiG21yu59IHpsBpkxk+jaGAV8lxx96G4SDc0jOHAkfWLXbc6kIph3dGAuRnotQ==", "_location": "/npm-profile", "_phantomChildren": {}, "_requested": { - "type": "tag", + "type": "version", "registry": true, - "raw": "npm-profile@latest", + "raw": "npm-profile@4.0.2", "name": "npm-profile", "escapedName": "npm-profile", - "rawSpec": "latest", + "rawSpec": "4.0.2", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "4.0.2" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/npm-profile/-/npm-profile-4.0.1.tgz", - "_shasum": "d350f7a5e6b60691c7168fbb8392c3603583f5aa", - "_spec": "npm-profile@latest", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/npm-profile/-/npm-profile-4.0.2.tgz", + "_shasum": "8272a71c19634d0dce9c35a5daf8ee589cbb0f52", + "_spec": "npm-profile@4.0.2", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Rebecca Turner", "email": "me@re-becca.org", @@ -35,7 +35,7 @@ "dependencies": { "aproba": "^1.1.2 || 2", "figgy-pudding": "^3.4.1", - "npm-registry-fetch": "^3.8.0" + "npm-registry-fetch": "^4.0.0" }, "deprecated": false, "description": "Library for updating an npmjs.com profile", @@ -52,5 +52,5 @@ "type": "git", "url": "git+https://github.com/npm/npm-profile.git" }, - "version": "4.0.1" + "version": "4.0.2" } diff --git a/deps/npm/node_modules/npm-registry-fetch/CHANGELOG.md b/deps/npm/node_modules/npm-registry-fetch/CHANGELOG.md index 56d849a7730371..fc6ba4f7e3fec5 100644 --- a/deps/npm/node_modules/npm-registry-fetch/CHANGELOG.md +++ b/deps/npm/node_modules/npm-registry-fetch/CHANGELOG.md @@ -2,6 +2,25 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +# [4.0.0](https://github.com/npm/registry-fetch/compare/v3.9.1...v4.0.0) (2019-07-15) + + +* cacache@12.0.0, infer uid from cache folder ([0c4f060](https://github.com/npm/registry-fetch/commit/0c4f060)) + + +### BREAKING CHANGES + +* uid and gid are inferred from cache folder, rather than +being passed in as options. + + + + +## [3.9.1](https://github.com/npm/registry-fetch/compare/v3.9.0...v3.9.1) (2019-07-02) + + + # [3.9.0](https://github.com/npm/registry-fetch/compare/v3.8.0...v3.9.0) (2019-01-24) diff --git a/deps/npm/node_modules/npm-registry-fetch/config.js b/deps/npm/node_modules/npm-registry-fetch/config.js index 7fe5dacc94362c..1c43b26eadd4c4 100644 --- a/deps/npm/node_modules/npm-registry-fetch/config.js +++ b/deps/npm/node_modules/npm-registry-fetch/config.js @@ -19,7 +19,6 @@ module.exports = figgyPudding({ 'fetch-retry-mintimeout': {}, 'force-auth': {}, forceAuth: 'force-auth', - 'gid': {}, 'gzip': {}, 'headers': {}, 'https-proxy': {}, @@ -77,7 +76,6 @@ module.exports = figgyPudding({ 'spec': {}, 'strict-ssl': {}, 'timeout': {}, - 'uid': {}, 'user-agent': { default: `${ pkg.name diff --git a/deps/npm/node_modules/npm-registry-fetch/index.js b/deps/npm/node_modules/npm-registry-fetch/index.js index 4ba3c19243471a..c18487388b269f 100644 --- a/deps/npm/node_modules/npm-registry-fetch/index.js +++ b/deps/npm/node_modules/npm-registry-fetch/index.js @@ -99,9 +99,7 @@ function regFetch (uri, opts) { maxTimeout: opts['fetch-retry-maxtimeout'] }, strictSSL: !!opts['strict-ssl'], - timeout: opts.timeout, - uid: opts.uid, - gid: opts.gid + timeout: opts.timeout }).then(res => checkResponse( opts.method || 'GET', res, registry, startTime, opts ))) diff --git a/deps/npm/node_modules/npm-registry-fetch/package.json b/deps/npm/node_modules/npm-registry-fetch/package.json index 0ffa9a8b9e823b..10671d568b5710 100644 --- a/deps/npm/node_modules/npm-registry-fetch/package.json +++ b/deps/npm/node_modules/npm-registry-fetch/package.json @@ -1,19 +1,19 @@ { - "_from": "npm-registry-fetch@latest", - "_id": "npm-registry-fetch@3.9.0", + "_from": "npm-registry-fetch@4.0.0", + "_id": "npm-registry-fetch@4.0.0", "_inBundle": false, - "_integrity": "sha512-srwmt8YhNajAoSAaDWndmZgx89lJwIZ1GWxOuckH4Coek4uHv5S+o/l9FLQe/awA+JwTnj4FJHldxhlXdZEBmw==", + "_integrity": "sha512-Jllq35Jag8dtv0M17ue74XtdQTyqKzuAYGiX9mAjOhkmNjib3bBUgK6mUY61+AHnXeSRobQkpY3/xIOS/omptw==", "_location": "/npm-registry-fetch", "_phantomChildren": {}, "_requested": { - "type": "tag", + "type": "version", "registry": true, - "raw": "npm-registry-fetch@latest", + "raw": "npm-registry-fetch@4.0.0", "name": "npm-registry-fetch", "escapedName": "npm-registry-fetch", - "rawSpec": "latest", + "rawSpec": "4.0.0", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "4.0.0" }, "_requiredBy": [ "#USER", @@ -28,10 +28,10 @@ "/npm-profile", "/pacote" ], - "_resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-3.9.0.tgz", - "_shasum": "44d841780e2833f06accb34488f8c7450d1a6856", - "_spec": "npm-registry-fetch@latest", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-4.0.0.tgz", + "_shasum": "5ef75845b605855c7964472542c25da172af8677", + "_spec": "npm-registry-fetch@4.0.0", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Kat Marchán", "email": "kzm@sykosomatic.org" @@ -52,14 +52,14 @@ "JSONStream": "^1.3.4", "bluebird": "^3.5.1", "figgy-pudding": "^3.4.1", - "lru-cache": "^4.1.3", - "make-fetch-happen": "^4.0.1", + "lru-cache": "^5.1.1", + "make-fetch-happen": "^5.0.0", "npm-package-arg": "^6.1.0" }, "deprecated": false, "description": "Fetch-based http client for use with npm registry APIs", "devDependencies": { - "cacache": "^11.0.2", + "cacache": "^12.0.0", "get-stream": "^4.0.0", "mkdirp": "^0.5.1", "nock": "^9.4.3", @@ -98,5 +98,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "3.9.0" + "version": "4.0.0" } diff --git a/deps/npm/node_modules/pacote/CHANGELOG.md b/deps/npm/node_modules/pacote/CHANGELOG.md index 433c0f470f51c0..8559760b3eb395 100644 --- a/deps/npm/node_modules/pacote/CHANGELOG.md +++ b/deps/npm/node_modules/pacote/CHANGELOG.md @@ -2,133 +2,158 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [9.5.4](https://github.com/npm/pacote/compare/v9.5.3...v9.5.4) (2019-07-16) + + +### Bug Fixes + +* **git:** ensure stream failures are reported ([7f07b5d](https://github.com/npm/pacote/commit/7f07b5d)), closes [#1](https://github.com/npm/pacote/issues/1) + + + + +## [9.5.3](https://github.com/npm/pacote/compare/v9.5.2...v9.5.3) (2019-07-16) + + + + +## [9.5.2](https://github.com/npm/pacote/compare/v9.5.1...v9.5.2) (2019-07-12) + + +### Bug Fixes + +* always pass uid/gid to cacache.put ([3d08925](https://github.com/npm/pacote/commit/3d08925)) + + + -## [9.5.1](https://github.com/zkat/pacote/compare/v9.5.0...v9.5.1) (2019-06-17) +## [9.5.1](https://github.com/npm/pacote/compare/v9.5.0...v9.5.1) (2019-06-17) ### Bug Fixes -* **audit:** npm audit fix ([127a28b](https://github.com/zkat/pacote/commit/127a28b)) -* **errors:** Fix "TypeError: err.code.match is not a function" error ([#170](https://github.com/zkat/pacote/issues/170)) ([92f5e4c](https://github.com/zkat/pacote/commit/92f5e4c)) -* **git:** limit retry times, avoid unlimited retries ([#172](https://github.com/zkat/pacote/issues/172)) ([8bbd051](https://github.com/zkat/pacote/commit/8bbd051)) +* **audit:** npm audit fix ([127a28b](https://github.com/npm/pacote/commit/127a28b)) +* **errors:** Fix "TypeError: err.code.match is not a function" error ([#170](https://github.com/npm/pacote/issues/170)) ([92f5e4c](https://github.com/zkat/pacote/commit/92f5e4c)) +* **git:** limit retry times, avoid unlimited retries ([#172](https://github.com/npm/pacote/issues/172)) ([8bbd051](https://github.com/zkat/pacote/commit/8bbd051)) -# [9.5.0](https://github.com/zkat/pacote/compare/v9.4.1...v9.5.0) (2019-02-18) +# [9.5.0](https://github.com/npm/pacote/compare/v9.4.1...v9.5.0) (2019-02-18) ### Features -* **enjoy-by:** add `before` as an alias to enjoy-by ([75d62b7](https://github.com/zkat/pacote/commit/75d62b7)) +* **enjoy-by:** add `before` as an alias to enjoy-by ([75d62b7](https://github.com/npm/pacote/commit/75d62b7)) -## [9.4.1](https://github.com/zkat/pacote/compare/v9.4.0...v9.4.1) (2019-01-24) +## [9.4.1](https://github.com/npm/pacote/compare/v9.4.0...v9.4.1) (2019-01-24) ### Bug Fixes -* **directory, finalize-manifest:** strip byte order marker from JSON ([723ad63](https://github.com/zkat/pacote/commit/723ad63)) +* **directory, finalize-manifest:** strip byte order marker from JSON ([723ad63](https://github.com/npm/pacote/commit/723ad63)) -# [9.4.0](https://github.com/zkat/pacote/compare/v9.3.0...v9.4.0) (2019-01-14) +# [9.4.0](https://github.com/npm/pacote/compare/v9.3.0...v9.4.0) (2019-01-14) ### Features -* **registry:** fall back to fullfat if something might be wrong with corgis ([0e71d6b](https://github.com/zkat/pacote/commit/0e71d6b)) +* **registry:** fall back to fullfat if something might be wrong with corgis ([0e71d6b](https://github.com/npm/pacote/commit/0e71d6b)) -# [9.3.0](https://github.com/zkat/pacote/compare/v9.2.3...v9.3.0) (2018-12-21) +# [9.3.0](https://github.com/npm/pacote/compare/v9.2.3...v9.3.0) (2018-12-21) ### Bug Fixes -* **git, file:** properly catch otherwise unhandled errors ([89d4897](https://github.com/zkat/pacote/commit/89d4897)) -* **test:** set umask opt to fix extract-stream 'accepts dmode/fmode/umask opts' ([e51de83](https://github.com/zkat/pacote/commit/e51de83)) +* **git, file:** properly catch otherwise unhandled errors ([89d4897](https://github.com/npm/pacote/commit/89d4897)) +* **test:** set umask opt to fix extract-stream 'accepts dmode/fmode/umask opts' ([e51de83](https://github.com/npm/pacote/commit/e51de83)) ### Features -* **git:** accept git path option ([#164](https://github.com/zkat/pacote/issues/164)) ([f06c8c5](https://github.com/zkat/pacote/commit/f06c8c5)) +* **git:** accept git path option ([#164](https://github.com/npm/pacote/issues/164)) ([f06c8c5](https://github.com/zkat/pacote/commit/f06c8c5)) -## [9.2.3](https://github.com/zkat/pacote/compare/v9.2.2...v9.2.3) (2018-10-31) +## [9.2.3](https://github.com/npm/pacote/compare/v9.2.2...v9.2.3) (2018-10-31) -## [9.2.2](https://github.com/zkat/pacote/compare/v9.2.1...v9.2.2) (2018-10-31) +## [9.2.2](https://github.com/npm/pacote/compare/v9.2.1...v9.2.2) (2018-10-31) -## [9.2.1](https://github.com/zkat/pacote/compare/v9.2.0...v9.2.1) (2018-10-31) +## [9.2.1](https://github.com/npm/pacote/compare/v9.2.0...v9.2.1) (2018-10-31) -# [9.2.0](https://github.com/zkat/pacote/compare/v9.1.1...v9.2.0) (2018-10-30) +# [9.2.0](https://github.com/npm/pacote/compare/v9.1.1...v9.2.0) (2018-10-30) ### Features -* **enjoyBy:** add opts.enjoy-by option ([7df399c](https://github.com/zkat/pacote/commit/7df399c)) +* **enjoyBy:** add opts.enjoy-by option ([7df399c](https://github.com/npm/pacote/commit/7df399c)) -## [9.1.1](https://github.com/zkat/pacote/compare/v9.1.0...v9.1.1) (2018-10-26) +## [9.1.1](https://github.com/npm/pacote/compare/v9.1.0...v9.1.1) (2018-10-26) ### Bug Fixes -* **deps:** bump protoduck to remove CC0-1.0 license in dep ([3d9d9a6](https://github.com/zkat/pacote/commit/3d9d9a6)) -* **git:** Fix temp directory permissions for git fetcher ([#159](https://github.com/zkat/pacote/issues/159)) ([97c3aeb](https://github.com/zkat/pacote/commit/97c3aeb)) -* **packument:** group together all registry specs in silly log ([2333a17](https://github.com/zkat/pacote/commit/2333a17)) -* **standard:** standard --fix ([0ecb188](https://github.com/zkat/pacote/commit/0ecb188)) +* **deps:** bump protoduck to remove CC0-1.0 license in dep ([3d9d9a6](https://github.com/npm/pacote/commit/3d9d9a6)) +* **git:** Fix temp directory permissions for git fetcher ([#159](https://github.com/npm/pacote/issues/159)) ([97c3aeb](https://github.com/zkat/pacote/commit/97c3aeb)) +* **packument:** group together all registry specs in silly log ([2333a17](https://github.com/npm/pacote/commit/2333a17)) +* **standard:** standard --fix ([0ecb188](https://github.com/npm/pacote/commit/0ecb188)) -# [9.1.0](https://github.com/zkat/pacote/compare/v9.0.0...v9.1.0) (2018-08-15) +# [9.1.0](https://github.com/npm/pacote/compare/v9.0.0...v9.1.0) (2018-08-15) ### Bug Fixes -* **docs:** tweaking ToC ([1eeb8a0](https://github.com/zkat/pacote/commit/1eeb8a0)) -* **packument:** take accept header into account when memoizing ([3c637e8](https://github.com/zkat/pacote/commit/3c637e8)) +* **docs:** tweaking ToC ([1eeb8a0](https://github.com/npm/pacote/commit/1eeb8a0)) +* **packument:** take accept header into account when memoizing ([3c637e8](https://github.com/npm/pacote/commit/3c637e8)) ### Features -* **aliases:** add support for registry alias specs ([b173f26](https://github.com/zkat/pacote/commit/b173f26)) -* **packument:** add packument api ([97888d9](https://github.com/zkat/pacote/commit/97888d9)) +* **aliases:** add support for registry alias specs ([b173f26](https://github.com/npm/pacote/commit/b173f26)) +* **packument:** add packument api ([97888d9](https://github.com/npm/pacote/commit/97888d9)) -# [9.0.0](https://github.com/zkat/pacote/compare/v8.1.6...v9.0.0) (2018-07-31) +# [9.0.0](https://github.com/npm/pacote/compare/v8.1.6...v9.0.0) (2018-07-31) ### Bug Fixes -* **travis:** idk why travis was failing ([ab593c9](https://github.com/zkat/pacote/commit/ab593c9)) +* **travis:** idk why travis was failing ([ab593c9](https://github.com/npm/pacote/commit/ab593c9)) ### Features -* **config:** convert to use figgy-pudding ([0b5bb82](https://github.com/zkat/pacote/commit/0b5bb82)) -* **log:** use process.emit-style logging by default ([29ff8b3](https://github.com/zkat/pacote/commit/29ff8b3)) -* **registry:** switch to npm-registry-fetch ([c43d6b0](https://github.com/zkat/pacote/commit/c43d6b0)) +* **config:** convert to use figgy-pudding ([0b5bb82](https://github.com/npm/pacote/commit/0b5bb82)) +* **log:** use process.emit-style logging by default ([29ff8b3](https://github.com/npm/pacote/commit/29ff8b3)) +* **registry:** switch to npm-registry-fetch ([c43d6b0](https://github.com/npm/pacote/commit/c43d6b0)) ### BREAKING CHANGES @@ -141,83 +166,83 @@ for available options. -## [8.1.6](https://github.com/zkat/pacote/compare/v8.1.5...v8.1.6) (2018-05-24) +## [8.1.6](https://github.com/npm/pacote/compare/v8.1.5...v8.1.6) (2018-05-24) -## [8.1.5](https://github.com/zkat/pacote/compare/v8.1.4...v8.1.5) (2018-05-22) +## [8.1.5](https://github.com/npm/pacote/compare/v8.1.4...v8.1.5) (2018-05-22) -## [8.1.4](https://github.com/zkat/pacote/compare/v8.1.3...v8.1.4) (2018-05-22) +## [8.1.4](https://github.com/npm/pacote/compare/v8.1.3...v8.1.4) (2018-05-22) -## [8.1.3](https://github.com/zkat/pacote/compare/v8.1.2...v8.1.3) (2018-05-20) +## [8.1.3](https://github.com/npm/pacote/compare/v8.1.2...v8.1.3) (2018-05-20) ### Bug Fixes -* **deps:** try reverting tar ([574ecff](https://github.com/zkat/pacote/commit/574ecff)) -* **extract-stream:** address "write after end" issue ([#151](https://github.com/zkat/pacote/issues/151)) ([50ed408](https://github.com/zkat/pacote/commit/50ed408)), closes [#142](https://github.com/zkat/pacote/issues/142) +* **deps:** try reverting tar ([574ecff](https://github.com/npm/pacote/commit/574ecff)) +* **extract-stream:** address "write after end" issue ([#151](https://github.com/npm/pacote/issues/151)) ([50ed408](https://github.com/zkat/pacote/commit/50ed408)), closes [#142](https://github.com/zkat/pacote/issues/142) -## [8.1.2](https://github.com/zkat/pacote/compare/v8.1.1...v8.1.2) (2018-05-16) +## [8.1.2](https://github.com/npm/pacote/compare/v8.1.1...v8.1.2) (2018-05-16) ### Bug Fixes -* **extract-stream:** nudge things to stop write-after-end heisenbug, hopefully ([a398715](https://github.com/zkat/pacote/commit/a398715)) +* **extract-stream:** nudge things to stop write-after-end heisenbug, hopefully ([a398715](https://github.com/npm/pacote/commit/a398715)) -## [8.1.1](https://github.com/zkat/pacote/compare/v8.1.0...v8.1.1) (2018-04-24) +## [8.1.1](https://github.com/npm/pacote/compare/v8.1.0...v8.1.1) (2018-04-24) ### Bug Fixes -* **tarball:** Remove promise handler error ([#148](https://github.com/zkat/pacote/issues/148)) ([47da3f6](https://github.com/zkat/pacote/commit/47da3f6)), closes [#145](https://github.com/zkat/pacote/issues/145) +* **tarball:** Remove promise handler error ([#148](https://github.com/npm/pacote/issues/148)) ([47da3f6](https://github.com/zkat/pacote/commit/47da3f6)), closes [#145](https://github.com/zkat/pacote/issues/145) -# [8.1.0](https://github.com/zkat/pacote/compare/v8.0.0...v8.1.0) (2018-04-18) +# [8.1.0](https://github.com/npm/pacote/compare/v8.0.0...v8.1.0) (2018-04-18) ### Bug Fixes -* **git:** workaround for mississippi.finished intermitent failures ([#144](https://github.com/zkat/pacote/issues/144)) ([788fd13](https://github.com/zkat/pacote/commit/788fd13)), closes [#143](https://github.com/zkat/pacote/issues/143) +* **git:** workaround for mississippi.finished intermitent failures ([#144](https://github.com/npm/pacote/issues/144)) ([788fd13](https://github.com/zkat/pacote/commit/788fd13)), closes [#143](https://github.com/zkat/pacote/issues/143) ### Features -* **tarball:** calculate shasum when missing, not just integrity ([#149](https://github.com/zkat/pacote/issues/149)) ([ccc6e90](https://github.com/zkat/pacote/commit/ccc6e90)) +* **tarball:** calculate shasum when missing, not just integrity ([#149](https://github.com/npm/pacote/issues/149)) ([ccc6e90](https://github.com/zkat/pacote/commit/ccc6e90)) -# [8.0.0](https://github.com/zkat/pacote/compare/v7.6.1...v8.0.0) (2018-04-12) +# [8.0.0](https://github.com/npm/pacote/compare/v7.6.1...v8.0.0) (2018-04-12) ### Bug Fixes -* **git:** make full clones do a full mirror ([85b269b](https://github.com/zkat/pacote/commit/85b269b)) +* **git:** make full clones do a full mirror ([85b269b](https://github.com/npm/pacote/commit/85b269b)) ### deps -* bump deps ([6737bf6](https://github.com/zkat/pacote/commit/6737bf6)) +* bump deps ([6737bf6](https://github.com/npm/pacote/commit/6737bf6)) ### meta -* drop support for node@4 ([11478ff](https://github.com/zkat/pacote/commit/11478ff)) +* drop support for node@4 ([11478ff](https://github.com/npm/pacote/commit/11478ff)) ### BREAKING CHANGES @@ -229,217 +254,217 @@ support node@4. -## [7.6.1](https://github.com/zkat/pacote/compare/v7.6.0...v7.6.1) (2018-03-08) +## [7.6.1](https://github.com/npm/pacote/compare/v7.6.0...v7.6.1) (2018-03-08) ### Bug Fixes -* **standard:** update to new standard rules ([bb52d02](https://github.com/zkat/pacote/commit/bb52d02)) +* **standard:** update to new standard rules ([bb52d02](https://github.com/npm/pacote/commit/bb52d02)) -# [7.6.0](https://github.com/zkat/pacote/compare/v7.5.3...v7.6.0) (2018-03-08) +# [7.6.0](https://github.com/npm/pacote/compare/v7.5.3...v7.6.0) (2018-03-08) ### Features -* **git:** added retry logic for all git operations. ([#136](https://github.com/zkat/pacote/issues/136)) ([425c58d](https://github.com/zkat/pacote/commit/425c58d)) +* **git:** added retry logic for all git operations. ([#136](https://github.com/npm/pacote/issues/136)) ([425c58d](https://github.com/zkat/pacote/commit/425c58d)) -## [7.5.3](https://github.com/zkat/pacote/compare/v7.5.2...v7.5.3) (2018-03-02) +## [7.5.3](https://github.com/npm/pacote/compare/v7.5.2...v7.5.3) (2018-03-02) ### Bug Fixes -* **tarball:** stop dropping stream errors on the floor ([3db03c2](https://github.com/zkat/pacote/commit/3db03c2)) +* **tarball:** stop dropping stream errors on the floor ([3db03c2](https://github.com/npm/pacote/commit/3db03c2)) -## [7.5.2](https://github.com/zkat/pacote/compare/v7.5.1...v7.5.2) (2018-03-02) +## [7.5.2](https://github.com/npm/pacote/compare/v7.5.1...v7.5.2) (2018-03-02) ### Bug Fixes -* **console:** remove spurious debugging console.log :< ([5b8b509](https://github.com/zkat/pacote/commit/5b8b509)) +* **console:** remove spurious debugging console.log :< ([5b8b509](https://github.com/npm/pacote/commit/5b8b509)) -## [7.5.1](https://github.com/zkat/pacote/compare/v7.5.0...v7.5.1) (2018-03-01) +## [7.5.1](https://github.com/npm/pacote/compare/v7.5.0...v7.5.1) (2018-03-01) ### Bug Fixes -* **tarball:** catch errors thrown from stream handler ([bdd6628](https://github.com/zkat/pacote/commit/bdd6628)) +* **tarball:** catch errors thrown from stream handler ([bdd6628](https://github.com/npm/pacote/commit/bdd6628)) -# [7.5.0](https://github.com/zkat/pacote/compare/v7.4.2...v7.5.0) (2018-03-01) +# [7.5.0](https://github.com/npm/pacote/compare/v7.4.2...v7.5.0) (2018-03-01) ### Features -* **logging:** let users know when file: resolved packages fail integrity check ([0fb8037](https://github.com/zkat/pacote/commit/0fb8037)) +* **logging:** let users know when file: resolved packages fail integrity check ([0fb8037](https://github.com/npm/pacote/commit/0fb8037)) -## [7.4.2](https://github.com/zkat/pacote/compare/v7.4.1...v7.4.2) (2018-02-23) +## [7.4.2](https://github.com/npm/pacote/compare/v7.4.1...v7.4.2) (2018-02-23) ### Bug Fixes -* **deps:** move mkdirp and rimraf to dependencies ([#140](https://github.com/zkat/pacote/issues/140)) ([bba20c8](https://github.com/zkat/pacote/commit/bba20c8)), closes [#128](https://github.com/zkat/pacote/issues/128) +* **deps:** move mkdirp and rimraf to dependencies ([#140](https://github.com/npm/pacote/issues/140)) ([bba20c8](https://github.com/zkat/pacote/commit/bba20c8)), closes [#128](https://github.com/zkat/pacote/issues/128) -## [7.4.1](https://github.com/zkat/pacote/compare/v7.4.0...v7.4.1) (2018-02-23) +## [7.4.1](https://github.com/npm/pacote/compare/v7.4.0...v7.4.1) (2018-02-23) ### Bug Fixes -* **tarball:** fix spurious errors from tarball.stream() ([0286ba5](https://github.com/zkat/pacote/commit/0286ba5)) +* **tarball:** fix spurious errors from tarball.stream() ([0286ba5](https://github.com/npm/pacote/commit/0286ba5)) -# [7.4.0](https://github.com/zkat/pacote/compare/v7.3.3...v7.4.0) (2018-02-17) +# [7.4.0](https://github.com/npm/pacote/compare/v7.3.3...v7.4.0) (2018-02-17) ### Features -* **tarball:** support file: opts.resolved shortcut ([a6cf279](https://github.com/zkat/pacote/commit/a6cf279)) +* **tarball:** support file: opts.resolved shortcut ([a6cf279](https://github.com/npm/pacote/commit/a6cf279)) -## [7.3.3](https://github.com/zkat/pacote/compare/v7.3.2...v7.3.3) (2018-02-15) +## [7.3.3](https://github.com/npm/pacote/compare/v7.3.2...v7.3.3) (2018-02-15) ### Bug Fixes -* **tarball:** another attempt at fixing opts.resolved ([aff3b6a](https://github.com/zkat/pacote/commit/aff3b6a)) +* **tarball:** another attempt at fixing opts.resolved ([aff3b6a](https://github.com/npm/pacote/commit/aff3b6a)) -## [7.3.2](https://github.com/zkat/pacote/compare/v7.3.1...v7.3.2) (2018-02-15) +## [7.3.2](https://github.com/npm/pacote/compare/v7.3.1...v7.3.2) (2018-02-15) ### Bug Fixes -* **tarball:** opts.resolved impl was triggering extra registry lookups ([0a4729d](https://github.com/zkat/pacote/commit/0a4729d)) +* **tarball:** opts.resolved impl was triggering extra registry lookups ([0a4729d](https://github.com/npm/pacote/commit/0a4729d)) -## [7.3.1](https://github.com/zkat/pacote/compare/v7.3.0...v7.3.1) (2018-02-14) +## [7.3.1](https://github.com/npm/pacote/compare/v7.3.0...v7.3.1) (2018-02-14) ### Bug Fixes -* **tarball:** stop using mississippi.pipe() in tarball.js and extract.js ([f5c1da9](https://github.com/zkat/pacote/commit/f5c1da9)) +* **tarball:** stop using mississippi.pipe() in tarball.js and extract.js ([f5c1da9](https://github.com/npm/pacote/commit/f5c1da9)) -# [7.3.0](https://github.com/zkat/pacote/compare/v7.2.0...v7.3.0) (2018-02-07) +# [7.3.0](https://github.com/npm/pacote/compare/v7.2.0...v7.3.0) (2018-02-07) ### Bug Fixes -* **git:** fix resolution of prerelease versions ([#130](https://github.com/zkat/pacote/issues/130)) ([83be46b](https://github.com/zkat/pacote/commit/83be46b)), closes [#129](https://github.com/zkat/pacote/issues/129) +* **git:** fix resolution of prerelease versions ([#130](https://github.com/npm/pacote/issues/130)) ([83be46b](https://github.com/zkat/pacote/commit/83be46b)), closes [#129](https://github.com/zkat/pacote/issues/129) ### Features -* **extract:** append _resolved and _integrity automatically ([#134](https://github.com/zkat/pacote/issues/134)) ([6886b65](https://github.com/zkat/pacote/commit/6886b65)) +* **extract:** append _resolved and _integrity automatically ([#134](https://github.com/npm/pacote/issues/134)) ([6886b65](https://github.com/zkat/pacote/commit/6886b65)) -# [7.2.0](https://github.com/zkat/pacote/compare/v7.1.1...v7.2.0) (2018-01-19) +# [7.2.0](https://github.com/npm/pacote/compare/v7.1.1...v7.2.0) (2018-01-19) ### Features -* **resolved:** tarball shortcut when opts.resolved is provided ([46a2f58](https://github.com/zkat/pacote/commit/46a2f58)) +* **resolved:** tarball shortcut when opts.resolved is provided ([46a2f58](https://github.com/npm/pacote/commit/46a2f58)) -## [7.1.1](https://github.com/zkat/pacote/compare/v7.1.0...v7.1.1) (2018-01-08) +## [7.1.1](https://github.com/npm/pacote/compare/v7.1.0...v7.1.1) (2018-01-08) ### Bug Fixes -* **publish:** a spurious file was included in the previous release ([296741a](https://github.com/zkat/pacote/commit/296741a)) +* **publish:** a spurious file was included in the previous release ([296741a](https://github.com/npm/pacote/commit/296741a)) -# [7.1.0](https://github.com/zkat/pacote/compare/v7.0.2...v7.1.0) (2018-01-07) +# [7.1.0](https://github.com/npm/pacote/compare/v7.0.2...v7.1.0) (2018-01-07) ### Bug Fixes -* **security:** deep-update debug due to vulnerabilities ([ff16da7](https://github.com/zkat/pacote/commit/ff16da7)) +* **security:** deep-update debug due to vulnerabilities ([ff16da7](https://github.com/npm/pacote/commit/ff16da7)) ### Features -* **resolved:** add opts.resolved for cache stuff ([#131](https://github.com/zkat/pacote/issues/131)) ([149a4b5](https://github.com/zkat/pacote/commit/149a4b5)) +* **resolved:** add opts.resolved for cache stuff ([#131](https://github.com/npm/pacote/issues/131)) ([149a4b5](https://github.com/zkat/pacote/commit/149a4b5)) -## [7.0.2](https://github.com/zkat/pacote/compare/v7.0.1...v7.0.2) (2017-11-28) +## [7.0.2](https://github.com/npm/pacote/compare/v7.0.1...v7.0.2) (2017-11-28) ### Bug Fixes -* **git:** only resolvedRefs can be shallow-cloned ([899720f](https://github.com/zkat/pacote/commit/899720f)) +* **git:** only resolvedRefs can be shallow-cloned ([899720f](https://github.com/npm/pacote/commit/899720f)) -## [7.0.1](https://github.com/zkat/pacote/compare/v7.0.0...v7.0.1) (2017-11-15) +## [7.0.1](https://github.com/npm/pacote/compare/v7.0.0...v7.0.1) (2017-11-15) ### Bug Fixes -* **git:** use resolved ref if available when doing a full clone (#125) ([46ca45a](https://github.com/zkat/pacote/commit/46ca45a)), closes [#125](https://github.com/zkat/pacote/issues/125) -* **move:** bump cacache for some cross-platform move fixes ([eebdcda](https://github.com/zkat/pacote/commit/eebdcda)) -* **test:** missed a spot converting tests to promises ([c43caed](https://github.com/zkat/pacote/commit/c43caed)) +* **git:** use resolved ref if available when doing a full clone (#125) ([46ca45a](https://github.com/npm/pacote/commit/46ca45a)), closes [#125](https://github.com/zkat/pacote/issues/125) +* **move:** bump cacache for some cross-platform move fixes ([eebdcda](https://github.com/npm/pacote/commit/eebdcda)) +* **test:** missed a spot converting tests to promises ([c43caed](https://github.com/npm/pacote/commit/c43caed)) -# [7.0.0](https://github.com/zkat/pacote/compare/v6.1.0...v7.0.0) (2017-11-15) +# [7.0.0](https://github.com/npm/pacote/compare/v6.1.0...v7.0.0) (2017-11-15) ### Bug Fixes -* **docs:** You totally should use pacote now (#126) ([d49a9b5](https://github.com/zkat/pacote/commit/d49a9b5)) -* **git:** stop generating integrity for git ([d45363b](https://github.com/zkat/pacote/commit/d45363b)) -* **integrity:** stop defaulting to sha1 hashes ([62f8cdf](https://github.com/zkat/pacote/commit/62f8cdf)) -* **license:** relicense to MIT for OSI-compat ([ba6b3e0](https://github.com/zkat/pacote/commit/ba6b3e0)) +* **docs:** You totally should use pacote now (#126) ([d49a9b5](https://github.com/npm/pacote/commit/d49a9b5)) +* **git:** stop generating integrity for git ([d45363b](https://github.com/npm/pacote/commit/d45363b)) +* **integrity:** stop defaulting to sha1 hashes ([62f8cdf](https://github.com/npm/pacote/commit/62f8cdf)) +* **license:** relicense to MIT for OSI-compat ([ba6b3e0](https://github.com/npm/pacote/commit/ba6b3e0)) ### Features -* **tarball:** add externall pacote.tarball() api ([e30bd49](https://github.com/zkat/pacote/commit/e30bd49)) +* **tarball:** add externall pacote.tarball() api ([e30bd49](https://github.com/npm/pacote/commit/e30bd49)) ### prefetch -* deprecate pacote.prefetch ([e47e521](https://github.com/zkat/pacote/commit/e47e521)) +* deprecate pacote.prefetch ([e47e521](https://github.com/npm/pacote/commit/e47e521)) ### BREAKING CHANGES @@ -450,75 +475,75 @@ support node@4. -# [6.1.0](https://github.com/zkat/pacote/compare/v6.0.4...v6.1.0) (2017-10-19) +# [6.1.0](https://github.com/npm/pacote/compare/v6.0.4...v6.1.0) (2017-10-19) ### Bug Fixes -* **git:** use actual default git branch instead of assuming master (#122) ([79ce949](https://github.com/zkat/pacote/commit/79ce949)) -* **npa:** ensure spec is a valid npa instance ([1757b2b](https://github.com/zkat/pacote/commit/1757b2b)) +* **git:** use actual default git branch instead of assuming master (#122) ([79ce949](https://github.com/npm/pacote/commit/79ce949)) +* **npa:** ensure spec is a valid npa instance ([1757b2b](https://github.com/npm/pacote/commit/1757b2b)) ### Features -* **selection:** add opts.includeDeprecated (#123) ([2001549](https://github.com/zkat/pacote/commit/2001549)) +* **selection:** add opts.includeDeprecated (#123) ([2001549](https://github.com/npm/pacote/commit/2001549)) -## [6.0.4](https://github.com/zkat/pacote/compare/v6.0.3...v6.0.4) (2017-10-05) +## [6.0.4](https://github.com/npm/pacote/compare/v6.0.3...v6.0.4) (2017-10-05) ### Bug Fixes -* **file:** include integrity hash for streamed tarballs too ([030cee7](https://github.com/zkat/pacote/commit/030cee7)) +* **file:** include integrity hash for streamed tarballs too ([030cee7](https://github.com/npm/pacote/commit/030cee7)) -## [6.0.3](https://github.com/zkat/pacote/compare/v6.0.2...v6.0.3) (2017-10-05) +## [6.0.3](https://github.com/npm/pacote/compare/v6.0.2...v6.0.3) (2017-10-05) ### Bug Fixes -* **extract:** clean up mode/fmode/dmode tests ([f915045](https://github.com/zkat/pacote/commit/f915045)) -* **file:** make sure file tarballs are written to cache and have integrity data ([dae391a](https://github.com/zkat/pacote/commit/dae391a)) -* **git:** version resolution regression from #115 (#119) ([9a68205](https://github.com/zkat/pacote/commit/9a68205)) +* **extract:** clean up mode/fmode/dmode tests ([f915045](https://github.com/npm/pacote/commit/f915045)) +* **file:** make sure file tarballs are written to cache and have integrity data ([dae391a](https://github.com/npm/pacote/commit/dae391a)) +* **git:** version resolution regression from #115 (#119) ([9a68205](https://github.com/npm/pacote/commit/9a68205)) -## [6.0.2](https://github.com/zkat/pacote/compare/v6.0.1...v6.0.2) (2017-09-06) +## [6.0.2](https://github.com/npm/pacote/compare/v6.0.1...v6.0.2) (2017-09-06) ### Bug Fixes -* **extract:** preserve executable perms on extracted files ([19b3dfd](https://github.com/zkat/pacote/commit/19b3dfd)) +* **extract:** preserve executable perms on extracted files ([19b3dfd](https://github.com/npm/pacote/commit/19b3dfd)) ### Performance Improvements -* replace some calls to .match() with .starts/endsWith() (#115) ([192a02f](https://github.com/zkat/pacote/commit/192a02f)) +* replace some calls to .match() with .starts/endsWith() (#115) ([192a02f](https://github.com/npm/pacote/commit/192a02f)) -## [6.0.1](https://github.com/zkat/pacote/compare/v6.0.0...v6.0.1) (2017-08-22) +## [6.0.1](https://github.com/npm/pacote/compare/v6.0.0...v6.0.1) (2017-08-22) ### Bug Fixes -* **finalize:** insist on getting a package.json ([f72ee91](https://github.com/zkat/pacote/commit/f72ee91)) +* **finalize:** insist on getting a package.json ([f72ee91](https://github.com/npm/pacote/commit/f72ee91)) -# [6.0.0](https://github.com/zkat/pacote/compare/v5.0.1...v6.0.0) (2017-08-19) +# [6.0.0](https://github.com/npm/pacote/compare/v5.0.1...v6.0.0) (2017-08-19) ### Bug Fixes -* **tar:** bring back the .gitignore -> .npmignore logic (#113) ([0dd518e](https://github.com/zkat/pacote/commit/0dd518e)) +* **tar:** bring back the .gitignore -> .npmignore logic (#113) ([0dd518e](https://github.com/npm/pacote/commit/0dd518e)) ### BREAKING CHANGES @@ -528,28 +553,28 @@ support node@4. -## [5.0.1](https://github.com/zkat/pacote/compare/v5.0.0...v5.0.1) (2017-08-17) +## [5.0.1](https://github.com/npm/pacote/compare/v5.0.0...v5.0.1) (2017-08-17) ### Bug Fixes -* **tar:** chown directories on extract as well ([2fa4598](https://github.com/zkat/pacote/commit/2fa4598)) +* **tar:** chown directories on extract as well ([2fa4598](https://github.com/npm/pacote/commit/2fa4598)) -# [5.0.0](https://github.com/zkat/pacote/compare/v4.0.0...v5.0.0) (2017-08-16) +# [5.0.0](https://github.com/npm/pacote/compare/v4.0.0...v5.0.0) (2017-08-16) ### Bug Fixes -* **registry:** Pass maxSockets options down (#110) ([3f05b79](https://github.com/zkat/pacote/commit/3f05b79)) +* **registry:** Pass maxSockets options down (#110) ([3f05b79](https://github.com/npm/pacote/commit/3f05b79)) ### Features -* **deps:** replace tar-fs/tar-stream with tar[@3](https://github.com/3) ([28c80a9](https://github.com/zkat/pacote/commit/28c80a9)) -* **tar:** switch to tarv3 ([53899c7](https://github.com/zkat/pacote/commit/53899c7)) +* **deps:** replace tar-fs/tar-stream with tar[@3](https://github.com/3) ([28c80a9](https://github.com/npm/pacote/commit/28c80a9)) +* **tar:** switch to tarv3 ([53899c7](https://github.com/npm/pacote/commit/53899c7)) ### BREAKING CHANGES @@ -563,12 +588,12 @@ support node@4. -# [4.0.0](https://github.com/zkat/pacote/compare/v3.0.0...v4.0.0) (2017-06-29) +# [4.0.0](https://github.com/npm/pacote/compare/v3.0.0...v4.0.0) (2017-06-29) ### Bug Fixes -* **extract:** revert uid/gid change ([41852e0](https://github.com/zkat/pacote/commit/41852e0)) +* **extract:** revert uid/gid change ([41852e0](https://github.com/npm/pacote/commit/41852e0)) ### BREAKING CHANGES @@ -578,12 +603,12 @@ support node@4. -# [3.0.0](https://github.com/zkat/pacote/compare/v2.7.38...v3.0.0) (2017-06-29) +# [3.0.0](https://github.com/npm/pacote/compare/v2.7.38...v3.0.0) (2017-06-29) ### Bug Fixes -* **extract:** always extract as current user gid/uid ([6fc01a5](https://github.com/zkat/pacote/commit/6fc01a5)) +* **extract:** always extract as current user gid/uid ([6fc01a5](https://github.com/npm/pacote/commit/6fc01a5)) ### BREAKING CHANGES @@ -595,655 +620,655 @@ details. -## [2.7.38](https://github.com/zkat/pacote/compare/v2.7.37...v2.7.38) (2017-06-29) +## [2.7.38](https://github.com/npm/pacote/compare/v2.7.37...v2.7.38) (2017-06-29) ### Bug Fixes -* **manifest:** bump npm-pick-manifest for loose semver fix ([b3d45ef](https://github.com/zkat/pacote/commit/b3d45ef)) +* **manifest:** bump npm-pick-manifest for loose semver fix ([b3d45ef](https://github.com/npm/pacote/commit/b3d45ef)) -## [2.7.37](https://github.com/zkat/pacote/compare/v2.7.36...v2.7.37) (2017-06-29) +## [2.7.37](https://github.com/npm/pacote/compare/v2.7.36...v2.7.37) (2017-06-29) ### Bug Fixes -* **deps:** bump deps for fixes ([f156655](https://github.com/zkat/pacote/commit/f156655)) +* **deps:** bump deps for fixes ([f156655](https://github.com/npm/pacote/commit/f156655)) -## [2.7.36](https://github.com/zkat/pacote/compare/v2.7.35...v2.7.36) (2017-06-10) +## [2.7.36](https://github.com/npm/pacote/compare/v2.7.35...v2.7.36) (2017-06-10) ### Bug Fixes -* **deps:** update tar-fs with the special characters patch (#102) ([ed43aa3](https://github.com/zkat/pacote/commit/ed43aa3)) +* **deps:** update tar-fs with the special characters patch (#102) ([ed43aa3](https://github.com/npm/pacote/commit/ed43aa3)) -## [2.7.35](https://github.com/zkat/pacote/compare/v2.7.34...v2.7.35) (2017-06-09) +## [2.7.35](https://github.com/npm/pacote/compare/v2.7.34...v2.7.35) (2017-06-09) ### Bug Fixes -* **registry:** only print one 199 warning (#100) ([b395138](https://github.com/zkat/pacote/commit/b395138)) +* **registry:** only print one 199 warning (#100) ([b395138](https://github.com/npm/pacote/commit/b395138)) -## [2.7.34](https://github.com/zkat/pacote/compare/v2.7.33...v2.7.34) (2017-06-09) +## [2.7.34](https://github.com/npm/pacote/compare/v2.7.33...v2.7.34) (2017-06-09) ### Bug Fixes -* **git:** whitelist specific shallow-cloneable hosts ([b210cc8](https://github.com/zkat/pacote/commit/b210cc8)) +* **git:** whitelist specific shallow-cloneable hosts ([b210cc8](https://github.com/npm/pacote/commit/b210cc8)) -## [2.7.33](https://github.com/zkat/pacote/compare/v2.7.32...v2.7.33) (2017-06-08) +## [2.7.33](https://github.com/npm/pacote/compare/v2.7.32...v2.7.33) (2017-06-08) ### Bug Fixes -* **git:** better error reporting when ls-remote fails ([10aae8f](https://github.com/zkat/pacote/commit/10aae8f)) +* **git:** better error reporting when ls-remote fails ([10aae8f](https://github.com/npm/pacote/commit/10aae8f)) -## [2.7.32](https://github.com/zkat/pacote/compare/v2.7.31...v2.7.32) (2017-06-07) +## [2.7.32](https://github.com/npm/pacote/compare/v2.7.31...v2.7.32) (2017-06-07) ### Bug Fixes -* **registry:** print both 111 and 199 warnings ([2f8c201](https://github.com/zkat/pacote/commit/2f8c201)) +* **registry:** print both 111 and 199 warnings ([2f8c201](https://github.com/npm/pacote/commit/2f8c201)) -## [2.7.31](https://github.com/zkat/pacote/compare/v2.7.30...v2.7.31) (2017-06-06) +## [2.7.31](https://github.com/npm/pacote/compare/v2.7.30...v2.7.31) (2017-06-06) ### Bug Fixes -* **extract:** always return a bluebird promise ([06ca91d](https://github.com/zkat/pacote/commit/06ca91d)) -* **registry:** bump make-fetch-happen for local cache header issue fix ([868615c](https://github.com/zkat/pacote/commit/868615c)) +* **extract:** always return a bluebird promise ([06ca91d](https://github.com/npm/pacote/commit/06ca91d)) +* **registry:** bump make-fetch-happen for local cache header issue fix ([868615c](https://github.com/npm/pacote/commit/868615c)) -## [2.7.30](https://github.com/zkat/pacote/compare/v2.7.29...v2.7.30) (2017-06-05) +## [2.7.30](https://github.com/npm/pacote/compare/v2.7.29...v2.7.30) (2017-06-05) ### Bug Fixes -* **ssri:** bump ssri for bugfix ([70a859c](https://github.com/zkat/pacote/commit/70a859c)) +* **ssri:** bump ssri for bugfix ([70a859c](https://github.com/npm/pacote/commit/70a859c)) -## [2.7.29](https://github.com/zkat/pacote/compare/v2.7.28...v2.7.29) (2017-06-05) +## [2.7.29](https://github.com/npm/pacote/compare/v2.7.28...v2.7.29) (2017-06-05) ### Bug Fixes -* **registry:** use cert instead of certfile opt ([a45880d](https://github.com/zkat/pacote/commit/a45880d)) +* **registry:** use cert instead of certfile opt ([a45880d](https://github.com/npm/pacote/commit/a45880d)) -## [2.7.28](https://github.com/zkat/pacote/compare/v2.7.27...v2.7.28) (2017-06-05) +## [2.7.28](https://github.com/npm/pacote/compare/v2.7.27...v2.7.28) (2017-06-05) ### Bug Fixes -* **git:** limit ls-remote output to heads/tags (#97) ([c1e3dcd](https://github.com/zkat/pacote/commit/c1e3dcd)) -* **proxy:** send certificate authority, key and other options (#95) ([c4b6128](https://github.com/zkat/pacote/commit/c4b6128)) -* **registry:** add support for global auth and _auth token (#96) ([7919fb7](https://github.com/zkat/pacote/commit/7919fb7)) -* **registry:** emit npm-session header (#98) ([9816b18](https://github.com/zkat/pacote/commit/9816b18)) +* **git:** limit ls-remote output to heads/tags (#97) ([c1e3dcd](https://github.com/npm/pacote/commit/c1e3dcd)) +* **proxy:** send certificate authority, key and other options (#95) ([c4b6128](https://github.com/npm/pacote/commit/c4b6128)) +* **registry:** add support for global auth and _auth token (#96) ([7919fb7](https://github.com/npm/pacote/commit/7919fb7)) +* **registry:** emit npm-session header (#98) ([9816b18](https://github.com/npm/pacote/commit/9816b18)) -## [2.7.27](https://github.com/zkat/pacote/compare/v2.7.26...v2.7.27) (2017-06-01) +## [2.7.27](https://github.com/npm/pacote/compare/v2.7.26...v2.7.27) (2017-06-01) ### Bug Fixes -* **git:** fix semver range detection. oops ([76d9233](https://github.com/zkat/pacote/commit/76d9233)) +* **git:** fix semver range detection. oops ([76d9233](https://github.com/npm/pacote/commit/76d9233)) -## [2.7.26](https://github.com/zkat/pacote/compare/v2.7.25...v2.7.26) (2017-06-01) +## [2.7.26](https://github.com/npm/pacote/compare/v2.7.25...v2.7.26) (2017-06-01) ### Bug Fixes -* **git:** hash was not being replaced/appended correctly ([6fcbed5](https://github.com/zkat/pacote/commit/6fcbed5)) +* **git:** hash was not being replaced/appended correctly ([6fcbed5](https://github.com/npm/pacote/commit/6fcbed5)) -## [2.7.25](https://github.com/zkat/pacote/compare/v2.7.24...v2.7.25) (2017-05-31) +## [2.7.25](https://github.com/npm/pacote/compare/v2.7.24...v2.7.25) (2017-05-31) ### Bug Fixes -* **git:** git deps were getting _resolved without shasums ([96f0675](https://github.com/zkat/pacote/commit/96f0675)) +* **git:** git deps were getting _resolved without shasums ([96f0675](https://github.com/npm/pacote/commit/96f0675)) -## [2.7.24](https://github.com/zkat/pacote/compare/v2.7.23...v2.7.24) (2017-05-31) +## [2.7.24](https://github.com/npm/pacote/compare/v2.7.23...v2.7.24) (2017-05-31) ### Bug Fixes -* **deps:** update dep versions with new patches ([dc2e4ff](https://github.com/zkat/pacote/commit/dc2e4ff)) +* **deps:** update dep versions with new patches ([dc2e4ff](https://github.com/npm/pacote/commit/dc2e4ff)) -## [2.7.23](https://github.com/zkat/pacote/compare/v2.7.22...v2.7.23) (2017-05-31) +## [2.7.23](https://github.com/npm/pacote/compare/v2.7.22...v2.7.23) (2017-05-31) ### Bug Fixes -* **git:** fix ls-remote command and throw away ^{} junk ([62ba84d](https://github.com/zkat/pacote/commit/62ba84d)) -* **git:** use the parsed git committish from npa ([77a676a](https://github.com/zkat/pacote/commit/77a676a)) +* **git:** fix ls-remote command and throw away ^{} junk ([62ba84d](https://github.com/npm/pacote/commit/62ba84d)) +* **git:** use the parsed git committish from npa ([77a676a](https://github.com/npm/pacote/commit/77a676a)) -## [2.7.22](https://github.com/zkat/pacote/compare/v2.7.21...v2.7.22) (2017-05-31) +## [2.7.22](https://github.com/npm/pacote/compare/v2.7.21...v2.7.22) (2017-05-31) ### Bug Fixes -* **git:** accept shortened git hashes (#91) ([4466388](https://github.com/zkat/pacote/commit/4466388)) +* **git:** accept shortened git hashes (#91) ([4466388](https://github.com/npm/pacote/commit/4466388)) -## [2.7.21](https://github.com/zkat/pacote/compare/v2.7.20...v2.7.21) (2017-05-25) +## [2.7.21](https://github.com/npm/pacote/compare/v2.7.20...v2.7.21) (2017-05-25) ### Bug Fixes -* **registry:** stop URIEncoding username/password ([011c9a2](https://github.com/zkat/pacote/commit/011c9a2)) +* **registry:** stop URIEncoding username/password ([011c9a2](https://github.com/npm/pacote/commit/011c9a2)) -## [2.7.20](https://github.com/zkat/pacote/compare/v2.7.19...v2.7.20) (2017-05-25) +## [2.7.20](https://github.com/npm/pacote/compare/v2.7.19...v2.7.20) (2017-05-25) ### Bug Fixes -* **registry:** encode username and password for auth ([c48b651](https://github.com/zkat/pacote/commit/c48b651)) +* **registry:** encode username and password for auth ([c48b651](https://github.com/npm/pacote/commit/c48b651)) -## [2.7.19](https://github.com/zkat/pacote/compare/v2.7.18...v2.7.19) (2017-05-25) +## [2.7.19](https://github.com/npm/pacote/compare/v2.7.18...v2.7.19) (2017-05-25) ### Bug Fixes -* **registry:** respect alwaysAuth ([150788a](https://github.com/zkat/pacote/commit/150788a)) +* **registry:** respect alwaysAuth ([150788a](https://github.com/npm/pacote/commit/150788a)) -## [2.7.18](https://github.com/zkat/pacote/compare/v2.7.17...v2.7.18) (2017-05-25) +## [2.7.18](https://github.com/npm/pacote/compare/v2.7.17...v2.7.18) (2017-05-25) ### Bug Fixes -* **cache:** pass uid/gid settings through to mfh ([d8845df](https://github.com/zkat/pacote/commit/d8845df)) -* **deps:** update m-f-h for cache opts fix ([faab6cd](https://github.com/zkat/pacote/commit/faab6cd)) +* **cache:** pass uid/gid settings through to mfh ([d8845df](https://github.com/npm/pacote/commit/d8845df)) +* **deps:** update m-f-h for cache opts fix ([faab6cd](https://github.com/npm/pacote/commit/faab6cd)) -## [2.7.17](https://github.com/zkat/pacote/compare/v2.7.16...v2.7.17) (2017-05-25) +## [2.7.17](https://github.com/npm/pacote/compare/v2.7.16...v2.7.17) (2017-05-25) ### Bug Fixes -* **deps:** bump cacache ([34bd656](https://github.com/zkat/pacote/commit/34bd656)) +* **deps:** bump cacache ([34bd656](https://github.com/npm/pacote/commit/34bd656)) -## [2.7.16](https://github.com/zkat/pacote/compare/v2.7.15...v2.7.16) (2017-05-24) +## [2.7.16](https://github.com/npm/pacote/compare/v2.7.15...v2.7.16) (2017-05-24) ### Bug Fixes -* **deps:** pull in various fixes from deps ([4354703](https://github.com/zkat/pacote/commit/4354703)) +* **deps:** pull in various fixes from deps ([4354703](https://github.com/npm/pacote/commit/4354703)) -## [2.7.15](https://github.com/zkat/pacote/compare/v2.7.14...v2.7.15) (2017-05-24) +## [2.7.15](https://github.com/npm/pacote/compare/v2.7.14...v2.7.15) (2017-05-24) ### Bug Fixes -* **proxy:** bump m-f-h with more patches ([26d4170](https://github.com/zkat/pacote/commit/26d4170)) +* **proxy:** bump m-f-h with more patches ([26d4170](https://github.com/npm/pacote/commit/26d4170)) -## [2.7.14](https://github.com/zkat/pacote/compare/v2.7.13...v2.7.14) (2017-05-24) +## [2.7.14](https://github.com/npm/pacote/compare/v2.7.13...v2.7.14) (2017-05-24) ### Bug Fixes -* **proxy:** pull in new m-f-h with fixed http proxies ([d6a14e0](https://github.com/zkat/pacote/commit/d6a14e0)) +* **proxy:** pull in new m-f-h with fixed http proxies ([d6a14e0](https://github.com/npm/pacote/commit/d6a14e0)) -## [2.7.13](https://github.com/zkat/pacote/compare/v2.7.12...v2.7.13) (2017-05-23) +## [2.7.13](https://github.com/npm/pacote/compare/v2.7.12...v2.7.13) (2017-05-23) ### Bug Fixes -* **deps:** bump dep versions to fix http redirect issues ([b23a9fa](https://github.com/zkat/pacote/commit/b23a9fa)) +* **deps:** bump dep versions to fix http redirect issues ([b23a9fa](https://github.com/npm/pacote/commit/b23a9fa)) -## [2.7.12](https://github.com/zkat/pacote/compare/v2.7.11...v2.7.12) (2017-05-16) +## [2.7.12](https://github.com/npm/pacote/compare/v2.7.11...v2.7.12) (2017-05-16) ### Bug Fixes -* **fetch:** fix default userAgent ([4b9d344](https://github.com/zkat/pacote/commit/4b9d344)) -* **registry:** log failed requests too ([0f23f06](https://github.com/zkat/pacote/commit/0f23f06)) -* **remote:** send a useful pkg id header for remote tarballs ([ac13356](https://github.com/zkat/pacote/commit/ac13356)) +* **fetch:** fix default userAgent ([4b9d344](https://github.com/npm/pacote/commit/4b9d344)) +* **registry:** log failed requests too ([0f23f06](https://github.com/npm/pacote/commit/0f23f06)) +* **remote:** send a useful pkg id header for remote tarballs ([ac13356](https://github.com/npm/pacote/commit/ac13356)) -## [2.7.11](https://github.com/zkat/pacote/compare/v2.7.10...v2.7.11) (2017-05-12) +## [2.7.11](https://github.com/npm/pacote/compare/v2.7.10...v2.7.11) (2017-05-12) ### Bug Fixes -* **fetch:** make it play nicer with bundlers ([67cd713](https://github.com/zkat/pacote/commit/67cd713)) +* **fetch:** make it play nicer with bundlers ([67cd713](https://github.com/npm/pacote/commit/67cd713)) -## [2.7.10](https://github.com/zkat/pacote/compare/v2.7.9...v2.7.10) (2017-05-12) +## [2.7.10](https://github.com/npm/pacote/compare/v2.7.9...v2.7.10) (2017-05-12) ### Bug Fixes -* **logging:** shhhhhhh ([e7ea56e](https://github.com/zkat/pacote/commit/e7ea56e)) -* **manifest:** _resolved is the only main field we do not overwrite ([4c12421](https://github.com/zkat/pacote/commit/4c12421)) +* **logging:** shhhhhhh ([e7ea56e](https://github.com/npm/pacote/commit/e7ea56e)) +* **manifest:** _resolved is the only main field we do not overwrite ([4c12421](https://github.com/npm/pacote/commit/4c12421)) -## [2.7.9](https://github.com/zkat/pacote/compare/v2.7.8...v2.7.9) (2017-05-09) +## [2.7.9](https://github.com/npm/pacote/compare/v2.7.8...v2.7.9) (2017-05-09) ### Bug Fixes -* **git:** Resolve to ref git specs w/o committishes (#88) ([cb885f5](https://github.com/zkat/pacote/commit/cb885f5)), closes [#88](https://github.com/zkat/pacote/issues/88) +* **git:** Resolve to ref git specs w/o committishes (#88) ([cb885f5](https://github.com/npm/pacote/commit/cb885f5)), closes [#88](https://github.com/zkat/pacote/issues/88) -## [2.7.8](https://github.com/zkat/pacote/compare/v2.7.7...v2.7.8) (2017-05-07) +## [2.7.8](https://github.com/npm/pacote/compare/v2.7.7...v2.7.8) (2017-05-07) ### Bug Fixes -* **git:** integrity hash was not always emitted ([97ed9e1](https://github.com/zkat/pacote/commit/97ed9e1)) +* **git:** integrity hash was not always emitted ([97ed9e1](https://github.com/npm/pacote/commit/97ed9e1)) -## [2.7.7](https://github.com/zkat/pacote/compare/v2.7.6...v2.7.7) (2017-05-06) +## [2.7.7](https://github.com/npm/pacote/compare/v2.7.6...v2.7.7) (2017-05-06) ### Bug Fixes -* **auth:** redirects no longer send auth to different host ([82e78c5](https://github.com/zkat/pacote/commit/82e78c5)) +* **auth:** redirects no longer send auth to different host ([82e78c5](https://github.com/npm/pacote/commit/82e78c5)) -## [2.7.6](https://github.com/zkat/pacote/compare/v2.7.5...v2.7.6) (2017-05-05) +## [2.7.6](https://github.com/npm/pacote/compare/v2.7.5...v2.7.6) (2017-05-05) ### Bug Fixes -* **git:** only use longpaths on win32 because old gits ([32846fc](https://github.com/zkat/pacote/commit/32846fc)) +* **git:** only use longpaths on win32 because old gits ([32846fc](https://github.com/npm/pacote/commit/32846fc)) -## [2.7.5](https://github.com/zkat/pacote/compare/v2.7.4...v2.7.5) (2017-05-04) +## [2.7.5](https://github.com/npm/pacote/compare/v2.7.4...v2.7.5) (2017-05-04) ### Bug Fixes -* **registry-key:** Use pathname instead of path in registryKey (#85) ([5339831](https://github.com/zkat/pacote/commit/5339831)) +* **registry-key:** Use pathname instead of path in registryKey (#85) ([5339831](https://github.com/npm/pacote/commit/5339831)) -## [2.7.4](https://github.com/zkat/pacote/compare/v2.7.3...v2.7.4) (2017-05-04) +## [2.7.4](https://github.com/npm/pacote/compare/v2.7.3...v2.7.4) (2017-05-04) ### Bug Fixes -* **pick-manifest:** fix =1.2.3 semver range requests ([dd6911c](https://github.com/zkat/pacote/commit/dd6911c)) +* **pick-manifest:** fix =1.2.3 semver range requests ([dd6911c](https://github.com/npm/pacote/commit/dd6911c)) -## [2.7.3](https://github.com/zkat/pacote/compare/v2.7.2...v2.7.3) (2017-05-04) +## [2.7.3](https://github.com/npm/pacote/compare/v2.7.2...v2.7.3) (2017-05-04) ### Bug Fixes -* **pick-manifest:** spaces in requested version are now trimmed out ([6422b28](https://github.com/zkat/pacote/commit/6422b28)) +* **pick-manifest:** spaces in requested version are now trimmed out ([6422b28](https://github.com/npm/pacote/commit/6422b28)) -## [2.7.2](https://github.com/zkat/pacote/compare/v2.7.1...v2.7.2) (2017-05-04) +## [2.7.2](https://github.com/npm/pacote/compare/v2.7.1...v2.7.2) (2017-05-04) ### Bug Fixes -* **extract:** missing or corrupted content properly re-fetched again ([46f60c2](https://github.com/zkat/pacote/commit/46f60c2)) +* **extract:** missing or corrupted content properly re-fetched again ([46f60c2](https://github.com/npm/pacote/commit/46f60c2)) -## [2.7.1](https://github.com/zkat/pacote/compare/v2.7.0...v2.7.1) (2017-05-01) +## [2.7.1](https://github.com/npm/pacote/compare/v2.7.0...v2.7.1) (2017-05-01) ### Bug Fixes -* **logging:** log specs correctly on extract ([4b5bab0](https://github.com/zkat/pacote/commit/4b5bab0)) -* **manifest:** obey opts.preferOnline when fetching from memoized ([26928a7](https://github.com/zkat/pacote/commit/26928a7)) +* **logging:** log specs correctly on extract ([4b5bab0](https://github.com/npm/pacote/commit/4b5bab0)) +* **manifest:** obey opts.preferOnline when fetching from memoized ([26928a7](https://github.com/npm/pacote/commit/26928a7)) -# [2.7.0](https://github.com/zkat/pacote/compare/v2.6.0...v2.7.0) (2017-04-29) +# [2.7.0](https://github.com/npm/pacote/compare/v2.6.0...v2.7.0) (2017-04-29) ### Bug Fixes -* **registry:** stop using integrity hashes for metadata. again. ([4595ab2](https://github.com/zkat/pacote/commit/4595ab2)) +* **registry:** stop using integrity hashes for metadata. again. ([4595ab2](https://github.com/npm/pacote/commit/4595ab2)) ### Features -* **manifest:** include _shasum for legacy compat ([b3a7eed](https://github.com/zkat/pacote/commit/b3a7eed)) +* **manifest:** include _shasum for legacy compat ([b3a7eed](https://github.com/npm/pacote/commit/b3a7eed)) -# [2.6.0](https://github.com/zkat/pacote/compare/v2.5.0...v2.6.0) (2017-04-29) +# [2.6.0](https://github.com/npm/pacote/compare/v2.5.0...v2.6.0) (2017-04-29) ### Features -* **manifest:** annotate manifests with _from ([e45e968](https://github.com/zkat/pacote/commit/e45e968)) +* **manifest:** annotate manifests with _from ([e45e968](https://github.com/npm/pacote/commit/e45e968)) -# [2.5.0](https://github.com/zkat/pacote/compare/v2.4.0...v2.5.0) (2017-04-28) +# [2.5.0](https://github.com/npm/pacote/compare/v2.4.0...v2.5.0) (2017-04-28) ### Bug Fixes -* **registry:** JSON text is not a valid header value ([78951ea](https://github.com/zkat/pacote/commit/78951ea)) +* **registry:** JSON text is not a valid header value ([78951ea](https://github.com/npm/pacote/commit/78951ea)) ### Features -* **memoization:** allow injection and control of memoizers ([d8a2be7](https://github.com/zkat/pacote/commit/d8a2be7)) +* **memoization:** allow injection and control of memoizers ([d8a2be7](https://github.com/npm/pacote/commit/d8a2be7)) -# [2.4.0](https://github.com/zkat/pacote/compare/v2.3.2...v2.4.0) (2017-04-27) +# [2.4.0](https://github.com/npm/pacote/compare/v2.3.2...v2.4.0) (2017-04-27) ### Bug Fixes -* **tests:** nicer error message on registry 404 ([e8e71c8](https://github.com/zkat/pacote/commit/e8e71c8)) +* **tests:** nicer error message on registry 404 ([e8e71c8](https://github.com/npm/pacote/commit/e8e71c8)) ### Features -* **auth:** added basic auth and always-auth support ([548aeb5](https://github.com/zkat/pacote/commit/548aeb5)) -* **proxy:** proxy support for registry and remote deps ([3766bbb](https://github.com/zkat/pacote/commit/3766bbb)) +* **auth:** added basic auth and always-auth support ([548aeb5](https://github.com/npm/pacote/commit/548aeb5)) +* **proxy:** proxy support for registry and remote deps ([3766bbb](https://github.com/npm/pacote/commit/3766bbb)) -## [2.3.2](https://github.com/zkat/pacote/compare/v2.3.1...v2.3.2) (2017-04-26) +## [2.3.2](https://github.com/npm/pacote/compare/v2.3.1...v2.3.2) (2017-04-26) ### Bug Fixes -* **deps:** reduce deps size with m-f-h upgrade ([ba75461](https://github.com/zkat/pacote/commit/ba75461)) +* **deps:** reduce deps size with m-f-h upgrade ([ba75461](https://github.com/npm/pacote/commit/ba75461)) -## [2.3.1](https://github.com/zkat/pacote/compare/v2.3.0...v2.3.1) (2017-04-26) +## [2.3.1](https://github.com/npm/pacote/compare/v2.3.0...v2.3.1) (2017-04-26) ### Bug Fixes -* **git:** another attempt at fixing EPERM b.s. ([e445bef](https://github.com/zkat/pacote/commit/e445bef)) +* **git:** another attempt at fixing EPERM b.s. ([e445bef](https://github.com/npm/pacote/commit/e445bef)) -# [2.3.0](https://github.com/zkat/pacote/compare/v2.2.2...v2.3.0) (2017-04-26) +# [2.3.0](https://github.com/npm/pacote/compare/v2.2.2...v2.3.0) (2017-04-26) ### Bug Fixes -* **git:** had ENOTSUP error on windows ([ee17c35](https://github.com/zkat/pacote/commit/ee17c35)) -* **memoization:** actually memoize package metadata ([e2078c0](https://github.com/zkat/pacote/commit/e2078c0)) +* **git:** had ENOTSUP error on windows ([ee17c35](https://github.com/npm/pacote/commit/ee17c35)) +* **memoization:** actually memoize package metadata ([e2078c0](https://github.com/npm/pacote/commit/e2078c0)) ### Features -* **memoization:** better packument memoization + pacote.clearMemoized() ([eb1bd4f](https://github.com/zkat/pacote/commit/eb1bd4f)) +* **memoization:** better packument memoization + pacote.clearMemoized() ([eb1bd4f](https://github.com/npm/pacote/commit/eb1bd4f)) -## [2.2.2](https://github.com/zkat/pacote/compare/v2.2.1...v2.2.2) (2017-04-24) +## [2.2.2](https://github.com/npm/pacote/compare/v2.2.1...v2.2.2) (2017-04-24) ### Bug Fixes -* **prefetch:** pull in new cacache + fix prefetch hasContent call ([9f476b8](https://github.com/zkat/pacote/commit/9f476b8)) +* **prefetch:** pull in new cacache + fix prefetch hasContent call ([9f476b8](https://github.com/npm/pacote/commit/9f476b8)) -## [2.2.1](https://github.com/zkat/pacote/compare/v2.2.0...v2.2.1) (2017-04-23) +## [2.2.1](https://github.com/npm/pacote/compare/v2.2.0...v2.2.1) (2017-04-23) ### Bug Fixes -* **finalize:** pass on engines/cpu/os ([0a73c78](https://github.com/zkat/pacote/commit/0a73c78)) +* **finalize:** pass on engines/cpu/os ([0a73c78](https://github.com/npm/pacote/commit/0a73c78)) -# [2.2.0](https://github.com/zkat/pacote/compare/v2.1.2...v2.2.0) (2017-04-22) +# [2.2.0](https://github.com/npm/pacote/compare/v2.1.2...v2.2.0) (2017-04-22) ### Bug Fixes -* **git:** fix shortcut fallback order again ([5759d40](https://github.com/zkat/pacote/commit/5759d40)) -* **registry:** fix infinite manifetch loop ([6c6a62b](https://github.com/zkat/pacote/commit/6c6a62b)) +* **git:** fix shortcut fallback order again ([5759d40](https://github.com/npm/pacote/commit/5759d40)) +* **registry:** fix infinite manifetch loop ([6c6a62b](https://github.com/npm/pacote/commit/6c6a62b)) ### Features -* **manifest:** opts.fullMetadata to get unfiltered manifests ([ff2945b](https://github.com/zkat/pacote/commit/ff2945b)) +* **manifest:** opts.fullMetadata to get unfiltered manifests ([ff2945b](https://github.com/npm/pacote/commit/ff2945b)) -## [2.1.2](https://github.com/zkat/pacote/compare/v2.1.1...v2.1.2) (2017-04-20) +## [2.1.2](https://github.com/npm/pacote/compare/v2.1.1...v2.1.2) (2017-04-20) -## [2.1.1](https://github.com/zkat/pacote/compare/v2.1.0...v2.1.1) (2017-04-19) +## [2.1.1](https://github.com/npm/pacote/compare/v2.1.0...v2.1.1) (2017-04-19) ### Bug Fixes -* **git:** use sshurl instead of ssh for ssh clones ([ff20803](https://github.com/zkat/pacote/commit/ff20803)) -* **notice:** only log npm-notice if the packument came from network ([eeeb411](https://github.com/zkat/pacote/commit/eeeb411)) -* **registry:** improve 404 error messages ([6a5cbdb](https://github.com/zkat/pacote/commit/6a5cbdb)) +* **git:** use sshurl instead of ssh for ssh clones ([ff20803](https://github.com/npm/pacote/commit/ff20803)) +* **notice:** only log npm-notice if the packument came from network ([eeeb411](https://github.com/npm/pacote/commit/eeeb411)) +* **registry:** improve 404 error messages ([6a5cbdb](https://github.com/npm/pacote/commit/6a5cbdb)) -# [2.1.0](https://github.com/zkat/pacote/compare/v2.0.5...v2.1.0) (2017-04-18) +# [2.1.0](https://github.com/npm/pacote/compare/v2.0.5...v2.1.0) (2017-04-18) ### Bug Fixes -* **cache:** bump deps for cache fixes ([9596434](https://github.com/zkat/pacote/commit/9596434)) +* **cache:** bump deps for cache fixes ([9596434](https://github.com/npm/pacote/commit/9596434)) ### Features -* **warn:** http warning headers now logged ([f22ce1d](https://github.com/zkat/pacote/commit/f22ce1d)) +* **warn:** http warning headers now logged ([f22ce1d](https://github.com/npm/pacote/commit/f22ce1d)) -## [2.0.5](https://github.com/zkat/pacote/compare/v2.0.4...v2.0.5) (2017-04-18) +## [2.0.5](https://github.com/npm/pacote/compare/v2.0.4...v2.0.5) (2017-04-18) ### Bug Fixes -* **file:** oops, the type for these is file ([e7a3d35](https://github.com/zkat/pacote/commit/e7a3d35)) +* **file:** oops, the type for these is file ([e7a3d35](https://github.com/npm/pacote/commit/e7a3d35)) -## [2.0.4](https://github.com/zkat/pacote/compare/v2.0.3...v2.0.4) (2017-04-18) +## [2.0.4](https://github.com/npm/pacote/compare/v2.0.3...v2.0.4) (2017-04-18) ### Bug Fixes -* **deps:** remove normalize-git-url ([12d464a](https://github.com/zkat/pacote/commit/12d464a)) -* **git:** Correctly read in the HEAD ref after cloning ([dbe1b15](https://github.com/zkat/pacote/commit/dbe1b15)) -* **git:** The full clone path doesn't have _resolved set ([ddce561](https://github.com/zkat/pacote/commit/ddce561)) -* **manifest:** no _from ever ([15087c4](https://github.com/zkat/pacote/commit/15087c4)) +* **deps:** remove normalize-git-url ([12d464a](https://github.com/npm/pacote/commit/12d464a)) +* **git:** Correctly read in the HEAD ref after cloning ([dbe1b15](https://github.com/npm/pacote/commit/dbe1b15)) +* **git:** The full clone path doesn't have _resolved set ([ddce561](https://github.com/npm/pacote/commit/ddce561)) +* **manifest:** no _from ever ([15087c4](https://github.com/npm/pacote/commit/15087c4)) -## [2.0.3](https://github.com/zkat/pacote/compare/v2.0.2...v2.0.3) (2017-04-15) +## [2.0.3](https://github.com/npm/pacote/compare/v2.0.2...v2.0.3) (2017-04-15) ### Bug Fixes -* **manifest:** meh just shove _from in there ([4396f09](https://github.com/zkat/pacote/commit/4396f09)) -* **registry:** include CI header ([86ad911](https://github.com/zkat/pacote/commit/86ad911)) -* **registry:** include npm-scope header ([574cd93](https://github.com/zkat/pacote/commit/574cd93)) -* **registry:** make sure to send referer header ([2d3aaac](https://github.com/zkat/pacote/commit/2d3aaac)) +* **manifest:** meh just shove _from in there ([4396f09](https://github.com/npm/pacote/commit/4396f09)) +* **registry:** include CI header ([86ad911](https://github.com/npm/pacote/commit/86ad911)) +* **registry:** include npm-scope header ([574cd93](https://github.com/npm/pacote/commit/574cd93)) +* **registry:** make sure to send referer header ([2d3aaac](https://github.com/npm/pacote/commit/2d3aaac)) -## [2.0.2](https://github.com/zkat/pacote/compare/v2.0.1...v2.0.2) (2017-04-15) +## [2.0.2](https://github.com/npm/pacote/compare/v2.0.1...v2.0.2) (2017-04-15) ### Bug Fixes -* **directory:** fix default pack-dir and write a test for it ([9d9266f](https://github.com/zkat/pacote/commit/9d9266f)) -* **extract:** brainfart with extractByManifest fixed. lol. ([a1367fb](https://github.com/zkat/pacote/commit/a1367fb)) +* **directory:** fix default pack-dir and write a test for it ([9d9266f](https://github.com/npm/pacote/commit/9d9266f)) +* **extract:** brainfart with extractByManifest fixed. lol. ([a1367fb](https://github.com/npm/pacote/commit/a1367fb)) -## [2.0.1](https://github.com/zkat/pacote/compare/v2.0.0...v2.0.1) (2017-04-15) +## [2.0.1](https://github.com/npm/pacote/compare/v2.0.0...v2.0.1) (2017-04-15) ### Bug Fixes -* **tarball:** missed the local->tarball rename ([ac42dc4](https://github.com/zkat/pacote/commit/ac42dc4)) +* **tarball:** missed the local->tarball rename ([ac42dc4](https://github.com/npm/pacote/commit/ac42dc4)) -# [2.0.0](https://github.com/zkat/pacote/compare/v1.0.0...v2.0.0) (2017-04-15) - - -### Bug Fixes - -* **api:** use npa[@5](https://github.com/5) for spec parsing (#78) ([3f56298](https://github.com/zkat/pacote/commit/3f56298)) -* **deprecated:** remove underscore from manifest._deprecated ([9f4af93](https://github.com/zkat/pacote/commit/9f4af93)) -* **directory:** add _resolved to directory manifests ([1d305db](https://github.com/zkat/pacote/commit/1d305db)) -* **directory:** return null instead of throwing ([d35630d](https://github.com/zkat/pacote/commit/d35630d)) -* **finalize:** don't try to cache manifests we can't get a good key for ([8ab1758](https://github.com/zkat/pacote/commit/8ab1758)) -* **finalize:** refactored finalize-manifest code + add _integrity=false sentinel ([657b7fa](https://github.com/zkat/pacote/commit/657b7fa)) -* **git:** cleaner handling of git tarball streams when caching ([11acd0a](https://github.com/zkat/pacote/commit/11acd0a)) -* **git:** emit manifests from git tarball handler ([b139d4b](https://github.com/zkat/pacote/commit/b139d4b)) -* **git:** fix .git exclusion, set mtime = 0 to make tarballs idempotent ([9a9fa1b](https://github.com/zkat/pacote/commit/9a9fa1b)) -* **git:** fix fallback order and only fall back on hosted shortcuts ([551cb33](https://github.com/zkat/pacote/commit/551cb33)) -* **git:** fix filling-out of git manifests ([95e807c](https://github.com/zkat/pacote/commit/95e807c)) -* **git:** got dir packer option working with git ([7669b3e](https://github.com/zkat/pacote/commit/7669b3e)) -* **headers:** nudge around some headers to make things behave ([db1e0a1](https://github.com/zkat/pacote/commit/db1e0a1)) -* **manifest:** get rid of resolved-with-non-error warning ([d4d4917](https://github.com/zkat/pacote/commit/d4d4917)) -* **manifest:** stop using digest for manifests ([4ddd2f5](https://github.com/zkat/pacote/commit/4ddd2f5)) -* **opts:** bring opt-check up to date ([564419e](https://github.com/zkat/pacote/commit/564419e)) -* **opts:** rename refreshCache to preferOnline cause much clearer ([94171d6](https://github.com/zkat/pacote/commit/94171d6)) -* **prefetch:** fall back to the _integrity in the manifest if none calculated ([083ac79](https://github.com/zkat/pacote/commit/083ac79)) -* **prefetch:** if there's no stream, just skip (for directory) ([714de91](https://github.com/zkat/pacote/commit/714de91)) -* **registry:** fix error handling for registry tarballs ([e69539f](https://github.com/zkat/pacote/commit/e69539f)) -* **registry:** nudging logging stuff around a bit ([61d62cc](https://github.com/zkat/pacote/commit/61d62cc)) -* **registry:** only send auth info if tarball is hosted on the same registry ([1de5a2b](https://github.com/zkat/pacote/commit/1de5a2b)) -* **registry:** redirect tarball urls to provided registry port+protocol if same host ([f50167e](https://github.com/zkat/pacote/commit/f50167e)) -* **registry:** support memoizing packuments ([e7fff31](https://github.com/zkat/pacote/commit/e7fff31)) -* **registry:** treat registry cache as "private" -- bumps m-f-h ([6fa1503](https://github.com/zkat/pacote/commit/6fa1503)) +# [2.0.0](https://github.com/npm/pacote/compare/v1.0.0...v2.0.0) (2017-04-15) + + +### Bug Fixes + +* **api:** use npa[@5](https://github.com/5) for spec parsing (#78) ([3f56298](https://github.com/npm/pacote/commit/3f56298)) +* **deprecated:** remove underscore from manifest._deprecated ([9f4af93](https://github.com/npm/pacote/commit/9f4af93)) +* **directory:** add _resolved to directory manifests ([1d305db](https://github.com/npm/pacote/commit/1d305db)) +* **directory:** return null instead of throwing ([d35630d](https://github.com/npm/pacote/commit/d35630d)) +* **finalize:** don't try to cache manifests we can't get a good key for ([8ab1758](https://github.com/npm/pacote/commit/8ab1758)) +* **finalize:** refactored finalize-manifest code + add _integrity=false sentinel ([657b7fa](https://github.com/npm/pacote/commit/657b7fa)) +* **git:** cleaner handling of git tarball streams when caching ([11acd0a](https://github.com/npm/pacote/commit/11acd0a)) +* **git:** emit manifests from git tarball handler ([b139d4b](https://github.com/npm/pacote/commit/b139d4b)) +* **git:** fix .git exclusion, set mtime = 0 to make tarballs idempotent ([9a9fa1b](https://github.com/npm/pacote/commit/9a9fa1b)) +* **git:** fix fallback order and only fall back on hosted shortcuts ([551cb33](https://github.com/npm/pacote/commit/551cb33)) +* **git:** fix filling-out of git manifests ([95e807c](https://github.com/npm/pacote/commit/95e807c)) +* **git:** got dir packer option working with git ([7669b3e](https://github.com/npm/pacote/commit/7669b3e)) +* **headers:** nudge around some headers to make things behave ([db1e0a1](https://github.com/npm/pacote/commit/db1e0a1)) +* **manifest:** get rid of resolved-with-non-error warning ([d4d4917](https://github.com/npm/pacote/commit/d4d4917)) +* **manifest:** stop using digest for manifests ([4ddd2f5](https://github.com/npm/pacote/commit/4ddd2f5)) +* **opts:** bring opt-check up to date ([564419e](https://github.com/npm/pacote/commit/564419e)) +* **opts:** rename refreshCache to preferOnline cause much clearer ([94171d6](https://github.com/npm/pacote/commit/94171d6)) +* **prefetch:** fall back to the _integrity in the manifest if none calculated ([083ac79](https://github.com/npm/pacote/commit/083ac79)) +* **prefetch:** if there's no stream, just skip (for directory) ([714de91](https://github.com/npm/pacote/commit/714de91)) +* **registry:** fix error handling for registry tarballs ([e69539f](https://github.com/npm/pacote/commit/e69539f)) +* **registry:** nudging logging stuff around a bit ([61d62cc](https://github.com/npm/pacote/commit/61d62cc)) +* **registry:** only send auth info if tarball is hosted on the same registry ([1de5a2b](https://github.com/npm/pacote/commit/1de5a2b)) +* **registry:** redirect tarball urls to provided registry port+protocol if same host ([f50167e](https://github.com/npm/pacote/commit/f50167e)) +* **registry:** support memoizing packuments ([e7fff31](https://github.com/npm/pacote/commit/e7fff31)) +* **registry:** treat registry cache as "private" -- bumps m-f-h ([6fa1503](https://github.com/npm/pacote/commit/6fa1503)) ### Features -* **directory:** implement local dir packing ([017d989](https://github.com/zkat/pacote/commit/017d989)) -* **fetch:** bump make-fetch-happen for new restarts ([cf90716](https://github.com/zkat/pacote/commit/cf90716)) -* **git:** support pulling in git submodules ([5825d33](https://github.com/zkat/pacote/commit/5825d33)) -* **integrity:** replace http client (#72) ([189cdd2](https://github.com/zkat/pacote/commit/189cdd2)) -* **prefetch:** return cache-related info on prefetch ([623b7f3](https://github.com/zkat/pacote/commit/623b7f3)) -* **registry:** allow injection of request agents ([805e5ae](https://github.com/zkat/pacote/commit/805e5ae)) -* **registry:** fast request pooling ([321f84b](https://github.com/zkat/pacote/commit/321f84b)) -* **registry:** registry requests now follow cache spec more closely, respect Age, etc ([9e47098](https://github.com/zkat/pacote/commit/9e47098)) +* **directory:** implement local dir packing ([017d989](https://github.com/npm/pacote/commit/017d989)) +* **fetch:** bump make-fetch-happen for new restarts ([cf90716](https://github.com/npm/pacote/commit/cf90716)) +* **git:** support pulling in git submodules ([5825d33](https://github.com/npm/pacote/commit/5825d33)) +* **integrity:** replace http client (#72) ([189cdd2](https://github.com/npm/pacote/commit/189cdd2)) +* **prefetch:** return cache-related info on prefetch ([623b7f3](https://github.com/npm/pacote/commit/623b7f3)) +* **registry:** allow injection of request agents ([805e5ae](https://github.com/npm/pacote/commit/805e5ae)) +* **registry:** fast request pooling ([321f84b](https://github.com/npm/pacote/commit/321f84b)) +* **registry:** registry requests now follow cache spec more closely, respect Age, etc ([9e47098](https://github.com/npm/pacote/commit/9e47098)) ### BREAKING CHANGES @@ -1264,50 +1289,50 @@ details. -# [1.0.0](https://github.com/zkat/pacote/compare/v0.1.1...v1.0.0) (2017-03-17) +# [1.0.0](https://github.com/npm/pacote/compare/v0.1.1...v1.0.0) (2017-03-17) ### Bug Fixes -* **extract-stream:** adapt to tar-fs api ([aa21308](https://github.com/zkat/pacote/commit/aa21308)) -* add 'use strict' to all .js files (#26) ([021bd59](https://github.com/zkat/pacote/commit/021bd59)) -* **cache:** this is really a user error, so just throw ([5c9c0fa](https://github.com/zkat/pacote/commit/5c9c0fa)) -* **deps:** cacache[@5](https://github.com/5).0.3 ([37cddc5](https://github.com/zkat/pacote/commit/37cddc5)) -* **deps:** tar-fs[@1](https://github.com/1).15.1 ([e0d853a](https://github.com/zkat/pacote/commit/e0d853a)) -* **docs:** correct fixtures table (#57) ([23d2eb4](https://github.com/zkat/pacote/commit/23d2eb4)) -* **extract:** correctly detect digest cache misses ([ec6672b](https://github.com/zkat/pacote/commit/ec6672b)) -* **extract:** fixed race condition ([14fd2a8](https://github.com/zkat/pacote/commit/14fd2a8)) -* **finalize-manifest:** use digest to uniquify cached manifests ([931a9cb](https://github.com/zkat/pacote/commit/931a9cb)) -* **http:** Fixed cache-related race condition ([b70a4b1](https://github.com/zkat/pacote/commit/b70a4b1)) -* **manifest:** dir manifests should throw ENOPACKAGEJSON ([b06882d](https://github.com/zkat/pacote/commit/b06882d)) -* **manifest:** ETARGET when no packages match ([ea2127d](https://github.com/zkat/pacote/commit/ea2127d)) -* **manifest:** local manifest fn should return a promise ([c700622](https://github.com/zkat/pacote/commit/c700622)) -* **manifest:** retry registry manifests once on ETARGET (#66) ([3b99adc](https://github.com/zkat/pacote/commit/3b99adc)) -* **prefetch:** hashAlgorithm is required for hasContent ([f03d51c](https://github.com/zkat/pacote/commit/f03d51c)) -* **request:** report cache write errors on end ([c102b86](https://github.com/zkat/pacote/commit/c102b86)) +* **extract-stream:** adapt to tar-fs api ([aa21308](https://github.com/npm/pacote/commit/aa21308)) +* add 'use strict' to all .js files (#26) ([021bd59](https://github.com/npm/pacote/commit/021bd59)) +* **cache:** this is really a user error, so just throw ([5c9c0fa](https://github.com/npm/pacote/commit/5c9c0fa)) +* **deps:** cacache[@5](https://github.com/5).0.3 ([37cddc5](https://github.com/npm/pacote/commit/37cddc5)) +* **deps:** tar-fs[@1](https://github.com/1).15.1 ([e0d853a](https://github.com/npm/pacote/commit/e0d853a)) +* **docs:** correct fixtures table (#57) ([23d2eb4](https://github.com/npm/pacote/commit/23d2eb4)) +* **extract:** correctly detect digest cache misses ([ec6672b](https://github.com/npm/pacote/commit/ec6672b)) +* **extract:** fixed race condition ([14fd2a8](https://github.com/npm/pacote/commit/14fd2a8)) +* **finalize-manifest:** use digest to uniquify cached manifests ([931a9cb](https://github.com/npm/pacote/commit/931a9cb)) +* **http:** Fixed cache-related race condition ([b70a4b1](https://github.com/npm/pacote/commit/b70a4b1)) +* **manifest:** dir manifests should throw ENOPACKAGEJSON ([b06882d](https://github.com/npm/pacote/commit/b06882d)) +* **manifest:** ETARGET when no packages match ([ea2127d](https://github.com/npm/pacote/commit/ea2127d)) +* **manifest:** local manifest fn should return a promise ([c700622](https://github.com/npm/pacote/commit/c700622)) +* **manifest:** retry registry manifests once on ETARGET (#66) ([3b99adc](https://github.com/npm/pacote/commit/3b99adc)) +* **prefetch:** hashAlgorithm is required for hasContent ([f03d51c](https://github.com/npm/pacote/commit/f03d51c)) +* **request:** report cache write errors on end ([c102b86](https://github.com/npm/pacote/commit/c102b86)) ### Features -* **api:** support pre-realized specifiers as specs (#62) ([1d5bf39](https://github.com/zkat/pacote/commit/1d5bf39)) -* **cache:** grabbing info and hasContent ([a559711](https://github.com/zkat/pacote/commit/a559711)) -* **deps:** minimatch[@3](https://github.com/3).0.3 ([2bb8cd5](https://github.com/zkat/pacote/commit/2bb8cd5)) -* **deps:** normalize-package-data[@2](https://github.com/2).3.5 ([4250e0d](https://github.com/zkat/pacote/commit/4250e0d)) -* **directory:** directory dep support (#68) ([6d5307a](https://github.com/zkat/pacote/commit/6d5307a)) -* **git:** baseline git support (#69) ([6d7eaf5](https://github.com/zkat/pacote/commit/6d7eaf5)) -* **handlers:** added remote tarball support (#64) ([add1808](https://github.com/zkat/pacote/commit/add1808)) -* **local:** local tarball support (#67) ([e50d625](https://github.com/zkat/pacote/commit/e50d625)) -* **manifest:** handle deprecation notice (#60) ([db82dae](https://github.com/zkat/pacote/commit/db82dae)) -* **manifest:** standardize manifest format ([3dd9a72](https://github.com/zkat/pacote/commit/3dd9a72)) -* **manifest:** switch to cacache for caching ([8ba7249](https://github.com/zkat/pacote/commit/8ba7249)) -* **prefetch:** added tarball prefetch support ([26c34ce](https://github.com/zkat/pacote/commit/26c34ce)) -* **request:** accept maxSockets opt ([3987807](https://github.com/zkat/pacote/commit/3987807)) -* **scopes:** new scopeTargets option (#59) ([b5db7ae](https://github.com/zkat/pacote/commit/b5db7ae)) +* **api:** support pre-realized specifiers as specs (#62) ([1d5bf39](https://github.com/npm/pacote/commit/1d5bf39)) +* **cache:** grabbing info and hasContent ([a559711](https://github.com/npm/pacote/commit/a559711)) +* **deps:** minimatch[@3](https://github.com/3).0.3 ([2bb8cd5](https://github.com/npm/pacote/commit/2bb8cd5)) +* **deps:** normalize-package-data[@2](https://github.com/2).3.5 ([4250e0d](https://github.com/npm/pacote/commit/4250e0d)) +* **directory:** directory dep support (#68) ([6d5307a](https://github.com/npm/pacote/commit/6d5307a)) +* **git:** baseline git support (#69) ([6d7eaf5](https://github.com/npm/pacote/commit/6d7eaf5)) +* **handlers:** added remote tarball support (#64) ([add1808](https://github.com/npm/pacote/commit/add1808)) +* **local:** local tarball support (#67) ([e50d625](https://github.com/npm/pacote/commit/e50d625)) +* **manifest:** handle deprecation notice (#60) ([db82dae](https://github.com/npm/pacote/commit/db82dae)) +* **manifest:** standardize manifest format ([3dd9a72](https://github.com/npm/pacote/commit/3dd9a72)) +* **manifest:** switch to cacache for caching ([8ba7249](https://github.com/npm/pacote/commit/8ba7249)) +* **prefetch:** added tarball prefetch support ([26c34ce](https://github.com/npm/pacote/commit/26c34ce)) +* **request:** accept maxSockets opt ([3987807](https://github.com/npm/pacote/commit/3987807)) +* **scopes:** new scopeTargets option (#59) ([b5db7ae](https://github.com/npm/pacote/commit/b5db7ae)) ### Performance Improvements -* **finalize-manifest:** cache finalized manifests ([fa3c430](https://github.com/zkat/pacote/commit/fa3c430)) +* **finalize-manifest:** cache finalized manifests ([fa3c430](https://github.com/npm/pacote/commit/fa3c430)) ### BREAKING CHANGES diff --git a/deps/npm/node_modules/pacote/README.md b/deps/npm/node_modules/pacote/README.md index bf2e5f4f61e9fc..f29d330d8cb546 100644 --- a/deps/npm/node_modules/pacote/README.md +++ b/deps/npm/node_modules/pacote/README.md @@ -1,6 +1,6 @@ -# pacote [![npm version](https://img.shields.io/npm/v/pacote.svg)](https://npm.im/pacote) [![license](https://img.shields.io/npm/l/pacote.svg)](https://npm.im/pacote) [![Travis](https://img.shields.io/travis/zkat/pacote.svg)](https://travis-ci.org/zkat/pacote) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/pacote?svg=true)](https://ci.appveyor.com/project/zkat/pacote) [![Coverage Status](https://coveralls.io/repos/github/zkat/pacote/badge.svg?branch=latest)](https://coveralls.io/github/zkat/pacote?branch=latest) +# pacote [![npm version](https://img.shields.io/npm/v/pacote.svg)](https://npm.im/pacote) [![license](https://img.shields.io/npm/l/pacote.svg)](https://npm.im/pacote) [![Travis](https://img.shields.io/travis/npm/pacote.svg)](https://travis-ci.org/npm/pacote) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/npm/pacote?svg=true)](https://ci.appveyor.com/project/npm/pacote) [![Coverage Status](https://coveralls.io/repos/github/npm/pacote/badge.svg?branch=latest)](https://coveralls.io/github/npm/pacote?branch=latest) -[`pacote`](https://github.com/zkat/pacote) is a Node.js library for downloading +[`pacote`](https://github.com/npm/pacote) is a Node.js library for downloading [npm](https://npmjs.org)-compatible packages. It supports all package specifier syntax that `npm install` and its ilk support. It transparently caches anything needed to reduce excess operations, using [`cacache`](https://npm.im/cacache). diff --git a/deps/npm/node_modules/pacote/extract.js b/deps/npm/node_modules/pacote/extract.js index d2ab47deba3513..f49a54420242ae 100644 --- a/deps/npm/node_modules/pacote/extract.js +++ b/deps/npm/node_modules/pacote/extract.js @@ -50,21 +50,22 @@ function extract (spec, dest, opts) { function tryExtract (spec, tarStream, dest, opts) { return new BB((resolve, reject) => { tarStream.on('error', reject) - setImmediate(resolve) + + rimraf(dest) + .then(() => mkdirp(dest)) + .then(() => { + const xtractor = extractStream(spec, dest, opts) + xtractor.on('error', reject) + xtractor.on('close', resolve) + tarStream.pipe(xtractor) + }) + .catch(reject) }) - .then(() => rimraf(dest)) - .then(() => mkdirp(dest)) - .then(() => new BB((resolve, reject) => { - const xtractor = extractStream(spec, dest, opts) - tarStream.on('error', reject) - xtractor.on('error', reject) - xtractor.on('close', resolve) - tarStream.pipe(xtractor) - })) .catch(err => { if (err.code === 'EINTEGRITY') { err.message = `Verification failed while extracting ${spec}:\n${err.message}` } + throw err }) } diff --git a/deps/npm/node_modules/pacote/lib/fetchers/file.js b/deps/npm/node_modules/pacote/lib/fetchers/file.js index a58e329130987f..7348a7ec634c1d 100644 --- a/deps/npm/node_modules/pacote/lib/fetchers/file.js +++ b/deps/npm/node_modules/pacote/lib/fetchers/file.js @@ -60,6 +60,8 @@ Fetcher.impl(fetchFile, { : (pipe( fs.createReadStream(src), cacache.put.stream(opts.cache, `pacote:tarball:${src}`, { + uid: opts.uid, + gid: opts.gid, integrity: opts.integrity }).on('integrity', d => { integrity = d }) )) diff --git a/deps/npm/node_modules/pacote/lib/fetchers/git.js b/deps/npm/node_modules/pacote/lib/fetchers/git.js index 7db4a79de3dc74..a1579d1f943125 100644 --- a/deps/npm/node_modules/pacote/lib/fetchers/git.js +++ b/deps/npm/node_modules/pacote/lib/fetchers/git.js @@ -157,7 +157,7 @@ function resolve (url, spec, name, opts) { function withTmp (opts, cb) { if (opts.cache) { // cacache has a special facility for working in a tmp dir - return cacache.tmp.withTmp(opts.cache, { tmpPrefix: 'git-clone', uid: opts.uid, gid: opts.gid }, cb) + return cacache.tmp.withTmp(opts.cache, { tmpPrefix: 'git-clone' }, cb) } else { const tmpDir = path.join(osenv.tmpdir(), 'pacote-git-tmp') const tmpName = uniqueFilename(tmpDir, 'git-clone') diff --git a/deps/npm/node_modules/pacote/node_modules/lru-cache/LICENSE b/deps/npm/node_modules/pacote/node_modules/lru-cache/LICENSE deleted file mode 100644 index 19129e315fe593..00000000000000 --- a/deps/npm/node_modules/pacote/node_modules/lru-cache/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -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/pacote/node_modules/lru-cache/README.md b/deps/npm/node_modules/pacote/node_modules/lru-cache/README.md deleted file mode 100644 index 435dfebb7e27d0..00000000000000 --- a/deps/npm/node_modules/pacote/node_modules/lru-cache/README.md +++ /dev/null @@ -1,166 +0,0 @@ -# lru cache - -A cache object that deletes the least-recently-used items. - -[![Build Status](https://travis-ci.org/isaacs/node-lru-cache.svg?branch=master)](https://travis-ci.org/isaacs/node-lru-cache) [![Coverage Status](https://coveralls.io/repos/isaacs/node-lru-cache/badge.svg?service=github)](https://coveralls.io/github/isaacs/node-lru-cache) - -## Installation: - -```javascript -npm install lru-cache --save -``` - -## Usage: - -```javascript -var LRU = require("lru-cache") - , options = { max: 500 - , length: function (n, key) { return n * 2 + key.length } - , dispose: function (key, n) { n.close() } - , maxAge: 1000 * 60 * 60 } - , cache = new LRU(options) - , otherCache = new LRU(50) // sets just the max size - -cache.set("key", "value") -cache.get("key") // "value" - -// non-string keys ARE fully supported -// but note that it must be THE SAME object, not -// just a JSON-equivalent object. -var someObject = { a: 1 } -cache.set(someObject, 'a value') -// Object keys are not toString()-ed -cache.set('[object Object]', 'a different value') -assert.equal(cache.get(someObject), 'a value') -// A similar object with same keys/values won't work, -// because it's a different object identity -assert.equal(cache.get({ a: 1 }), undefined) - -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. - -## 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`. Setting it to a non-number or negative number will - throw a `TypeError`. Setting it to 0 makes it be `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. - Setting this to a negative value will make everything seem old! - Setting it to a non-number will throw a `TypeError`. -* `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, key){return n.length}`. The default is - `function(){return 1}`, which is fine if you want to store `max` - like-sized things. The item is passed as the first argument, and - the key is passed as the second argumnet. -* `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. -* `noDisposeOnSet` By default, if you set a `dispose()` method, then - it'll be called whenever a `set()` operation overwrites an existing - key. If you set this option, `dispose()` will only be called when a - key falls out of the cache, not when it is overwritten. -* `updateAgeOnGet` When using time-expiring entries with `maxAge`, - setting this to `true` will make each item's effective time update - to the current time whenever it is retrieved from cache, causing it - to not expire. (It can still fall out of cache based on recency of - use, of course.) - -## 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. `maxAge` is optional and overrides the - cache `maxAge` option if provided. - - If the key is not found, `get()` will return `undefined`. - - The key and val can be any value. - -* `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.) - -* `rforEach(function(value,key,cache), [thisp])` - - The same as `cache.forEach(...)` but items are iterated over in - reverse order. (ie, less 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 - -* `prune()` - - Manually iterates over the entire cache proactively pruning old entries diff --git a/deps/npm/node_modules/pacote/node_modules/lru-cache/index.js b/deps/npm/node_modules/pacote/node_modules/lru-cache/index.js deleted file mode 100644 index 573b6b85b9779d..00000000000000 --- a/deps/npm/node_modules/pacote/node_modules/lru-cache/index.js +++ /dev/null @@ -1,334 +0,0 @@ -'use strict' - -// A linked list to keep track of recently-used-ness -const Yallist = require('yallist') - -const MAX = Symbol('max') -const LENGTH = Symbol('length') -const LENGTH_CALCULATOR = Symbol('lengthCalculator') -const ALLOW_STALE = Symbol('allowStale') -const MAX_AGE = Symbol('maxAge') -const DISPOSE = Symbol('dispose') -const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet') -const LRU_LIST = Symbol('lruList') -const CACHE = Symbol('cache') -const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet') - -const naiveLength = () => 1 - -// lruList is a yallist where the head is the youngest -// item, and the tail is the oldest. the list contains the Hit -// objects as the entries. -// Each Hit object has a reference to its Yallist.Node. This -// never changes. -// -// cache is a Map (or PseudoMap) that matches the keys to -// the Yallist.Node object. -class LRUCache { - constructor (options) { - if (typeof options === 'number') - options = { max: options } - - if (!options) - options = {} - - if (options.max && (typeof options.max !== 'number' || options.max < 0)) - throw new TypeError('max must be a non-negative number') - // Kind of weird to have a default max of Infinity, but oh well. - const max = this[MAX] = options.max || Infinity - - const lc = options.length || naiveLength - this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc - this[ALLOW_STALE] = options.stale || false - if (options.maxAge && typeof options.maxAge !== 'number') - throw new TypeError('maxAge must be a number') - this[MAX_AGE] = options.maxAge || 0 - this[DISPOSE] = options.dispose - this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false - this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false - this.reset() - } - - // resize the cache when the max changes. - set max (mL) { - if (typeof mL !== 'number' || mL < 0) - throw new TypeError('max must be a non-negative number') - - this[MAX] = mL || Infinity - trim(this) - } - get max () { - return this[MAX] - } - - set allowStale (allowStale) { - this[ALLOW_STALE] = !!allowStale - } - get allowStale () { - return this[ALLOW_STALE] - } - - set maxAge (mA) { - if (typeof mA !== 'number') - throw new TypeError('maxAge must be a non-negative number') - - this[MAX_AGE] = mA - trim(this) - } - get maxAge () { - return this[MAX_AGE] - } - - // resize the cache when the lengthCalculator changes. - set lengthCalculator (lC) { - if (typeof lC !== 'function') - lC = naiveLength - - if (lC !== this[LENGTH_CALCULATOR]) { - this[LENGTH_CALCULATOR] = lC - this[LENGTH] = 0 - this[LRU_LIST].forEach(hit => { - hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) - this[LENGTH] += hit.length - }) - } - trim(this) - } - get lengthCalculator () { return this[LENGTH_CALCULATOR] } - - get length () { return this[LENGTH] } - get itemCount () { return this[LRU_LIST].length } - - rforEach (fn, thisp) { - thisp = thisp || this - for (let walker = this[LRU_LIST].tail; walker !== null;) { - const prev = walker.prev - forEachStep(this, fn, walker, thisp) - walker = prev - } - } - - forEach (fn, thisp) { - thisp = thisp || this - for (let walker = this[LRU_LIST].head; walker !== null;) { - const next = walker.next - forEachStep(this, fn, walker, thisp) - walker = next - } - } - - keys () { - return this[LRU_LIST].toArray().map(k => k.key) - } - - values () { - return this[LRU_LIST].toArray().map(k => k.value) - } - - reset () { - if (this[DISPOSE] && - this[LRU_LIST] && - this[LRU_LIST].length) { - this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value)) - } - - this[CACHE] = new Map() // hash of items by key - this[LRU_LIST] = new Yallist() // list of items in order of use recency - this[LENGTH] = 0 // length of items in the list - } - - dump () { - return this[LRU_LIST].map(hit => - isStale(this, hit) ? false : { - k: hit.key, - v: hit.value, - e: hit.now + (hit.maxAge || 0) - }).toArray().filter(h => h) - } - - dumpLru () { - return this[LRU_LIST] - } - - set (key, value, maxAge) { - maxAge = maxAge || this[MAX_AGE] - - if (maxAge && typeof maxAge !== 'number') - throw new TypeError('maxAge must be a number') - - const now = maxAge ? Date.now() : 0 - const len = this[LENGTH_CALCULATOR](value, key) - - if (this[CACHE].has(key)) { - if (len > this[MAX]) { - del(this, this[CACHE].get(key)) - return false - } - - const node = this[CACHE].get(key) - const item = node.value - - // dispose of the old one before overwriting - // split out into 2 ifs for better coverage tracking - if (this[DISPOSE]) { - if (!this[NO_DISPOSE_ON_SET]) - this[DISPOSE](key, item.value) - } - - item.now = now - item.maxAge = maxAge - item.value = value - this[LENGTH] += len - item.length - item.length = len - this.get(key) - trim(this) - return true - } - - const hit = new Entry(key, value, 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[LRU_LIST].unshift(hit) - this[CACHE].set(key, this[LRU_LIST].head) - trim(this) - return true - } - - has (key) { - if (!this[CACHE].has(key)) return false - const hit = this[CACHE].get(key).value - return !isStale(this, hit) - } - - get (key) { - return get(this, key, true) - } - - peek (key) { - return get(this, key, false) - } - - pop () { - const node = this[LRU_LIST].tail - if (!node) - return null - - del(this, node) - return node.value - } - - del (key) { - del(this, this[CACHE].get(key)) - } - - load (arr) { - // reset the cache - this.reset() - - const now = Date.now() - // A previous serialized cache has the most recent items first - for (let l = arr.length - 1; l >= 0; l--) { - const hit = arr[l] - const 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 { - const maxAge = expiresAt - now - // dont add already expired items - if (maxAge > 0) { - this.set(hit.k, hit.v, maxAge) - } - } - } - } - - prune () { - this[CACHE].forEach((value, key) => get(this, key, false)) - } -} - -const get = (self, key, doUse) => { - const node = self[CACHE].get(key) - if (node) { - const hit = node.value - if (isStale(self, hit)) { - del(self, node) - if (!self[ALLOW_STALE]) - return undefined - } else { - if (doUse) { - if (self[UPDATE_AGE_ON_GET]) - node.value.now = Date.now() - self[LRU_LIST].unshiftNode(node) - } - } - return hit.value - } -} - -const isStale = (self, hit) => { - if (!hit || (!hit.maxAge && !self[MAX_AGE])) - return false - - const diff = Date.now() - hit.now - return hit.maxAge ? diff > hit.maxAge - : self[MAX_AGE] && (diff > self[MAX_AGE]) -} - -const trim = self => { - if (self[LENGTH] > self[MAX]) { - for (let walker = self[LRU_LIST].tail; - self[LENGTH] > self[MAX] && walker !== null;) { - // We know that we're about to delete this one, and also - // what the next least recently used key will be, so just - // go ahead and set it now. - const prev = walker.prev - del(self, walker) - walker = prev - } - } -} - -const del = (self, node) => { - if (node) { - const hit = node.value - if (self[DISPOSE]) - self[DISPOSE](hit.key, hit.value) - - self[LENGTH] -= hit.length - self[CACHE].delete(hit.key) - self[LRU_LIST].removeNode(node) - } -} - -class Entry { - constructor (key, value, length, now, maxAge) { - this.key = key - this.value = value - this.length = length - this.now = now - this.maxAge = maxAge || 0 - } -} - -const forEachStep = (self, fn, node, thisp) => { - let hit = node.value - if (isStale(self, hit)) { - del(self, node) - if (!self[ALLOW_STALE]) - hit = undefined - } - if (hit) - fn.call(thisp, hit.value, hit.key, self) -} - -module.exports = LRUCache diff --git a/deps/npm/node_modules/pacote/node_modules/lru-cache/package.json b/deps/npm/node_modules/pacote/node_modules/lru-cache/package.json deleted file mode 100644 index a7fbba4b55ddd7..00000000000000 --- a/deps/npm/node_modules/pacote/node_modules/lru-cache/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "_from": "lru-cache@^5.1.1", - "_id": "lru-cache@5.1.1", - "_inBundle": false, - "_integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "_location": "/pacote/lru-cache", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "lru-cache@^5.1.1", - "name": "lru-cache", - "escapedName": "lru-cache", - "rawSpec": "^5.1.1", - "saveSpec": null, - "fetchSpec": "^5.1.1" - }, - "_requiredBy": [ - "/pacote" - ], - "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "_shasum": "1da27e6710271947695daf6848e847f01d84b920", - "_spec": "lru-cache@^5.1.1", - "_where": "/Users/aeschright/code/cli/node_modules/pacote", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me" - }, - "bugs": { - "url": "https://github.com/isaacs/node-lru-cache/issues" - }, - "bundleDependencies": false, - "dependencies": { - "yallist": "^3.0.2" - }, - "deprecated": false, - "description": "A cache object that deletes the least-recently-used items.", - "devDependencies": { - "benchmark": "^2.1.4", - "tap": "^12.1.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/isaacs/node-lru-cache#readme", - "keywords": [ - "mru", - "lru", - "cache" - ], - "license": "ISC", - "main": "index.js", - "name": "lru-cache", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-lru-cache.git" - }, - "scripts": { - "coveragerport": "tap --coverage-report=html", - "postpublish": "git push origin --all; git push origin --tags", - "postversion": "npm publish", - "preversion": "npm test", - "snap": "TAP_SNAPSHOT=1 tap test/*.js -J", - "test": "tap test/*.js --100 -J" - }, - "version": "5.1.1" -} diff --git a/deps/npm/node_modules/pacote/node_modules/yallist/README.md b/deps/npm/node_modules/pacote/node_modules/yallist/README.md deleted file mode 100644 index f5861018696688..00000000000000 --- a/deps/npm/node_modules/pacote/node_modules/yallist/README.md +++ /dev/null @@ -1,204 +0,0 @@ -# yallist - -Yet Another Linked List - -There are many doubly-linked list implementations like it, but this -one is mine. - -For when an array would be too big, and a Map can't be iterated in -reverse order. - - -[![Build Status](https://travis-ci.org/isaacs/yallist.svg?branch=master)](https://travis-ci.org/isaacs/yallist) [![Coverage Status](https://coveralls.io/repos/isaacs/yallist/badge.svg?service=github)](https://coveralls.io/github/isaacs/yallist) - -## basic usage - -```javascript -var yallist = require('yallist') -var myList = yallist.create([1, 2, 3]) -myList.push('foo') -myList.unshift('bar') -// of course pop() and shift() are there, too -console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo'] -myList.forEach(function (k) { - // walk the list head to tail -}) -myList.forEachReverse(function (k, index, list) { - // walk the list tail to head -}) -var myDoubledList = myList.map(function (k) { - return k + k -}) -// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo'] -// mapReverse is also a thing -var myDoubledListReverse = myList.mapReverse(function (k) { - return k + k -}) // ['foofoo', 6, 4, 2, 'barbar'] - -var reduced = myList.reduce(function (set, entry) { - set += entry - return set -}, 'start') -console.log(reduced) // 'startfoo123bar' -``` - -## api - -The whole API is considered "public". - -Functions with the same name as an Array method work more or less the -same way. - -There's reverse versions of most things because that's the point. - -### Yallist - -Default export, the class that holds and manages a list. - -Call it with either a forEach-able (like an array) or a set of -arguments, to initialize the list. - -The Array-ish methods all act like you'd expect. No magic length, -though, so if you change that it won't automatically prune or add -empty spots. - -### Yallist.create(..) - -Alias for Yallist function. Some people like factories. - -#### yallist.head - -The first node in the list - -#### yallist.tail - -The last node in the list - -#### yallist.length - -The number of nodes in the list. (Change this at your peril. It is -not magic like Array length.) - -#### yallist.toArray() - -Convert the list to an array. - -#### yallist.forEach(fn, [thisp]) - -Call a function on each item in the list. - -#### yallist.forEachReverse(fn, [thisp]) - -Call a function on each item in the list, in reverse order. - -#### yallist.get(n) - -Get the data at position `n` in the list. If you use this a lot, -probably better off just using an Array. - -#### yallist.getReverse(n) - -Get the data at position `n`, counting from the tail. - -#### yallist.map(fn, thisp) - -Create a new Yallist with the result of calling the function on each -item. - -#### yallist.mapReverse(fn, thisp) - -Same as `map`, but in reverse. - -#### yallist.pop() - -Get the data from the list tail, and remove the tail from the list. - -#### yallist.push(item, ...) - -Insert one or more items to the tail of the list. - -#### yallist.reduce(fn, initialValue) - -Like Array.reduce. - -#### yallist.reduceReverse - -Like Array.reduce, but in reverse. - -#### yallist.reverse - -Reverse the list in place. - -#### yallist.shift() - -Get the data from the list head, and remove the head from the list. - -#### yallist.slice([from], [to]) - -Just like Array.slice, but returns a new Yallist. - -#### yallist.sliceReverse([from], [to]) - -Just like yallist.slice, but the result is returned in reverse. - -#### yallist.toArray() - -Create an array representation of the list. - -#### yallist.toArrayReverse() - -Create a reversed array representation of the list. - -#### yallist.unshift(item, ...) - -Insert one or more items to the head of the list. - -#### yallist.unshiftNode(node) - -Move a Node object to the front of the list. (That is, pull it out of -wherever it lives, and make it the new head.) - -If the node belongs to a different list, then that list will remove it -first. - -#### yallist.pushNode(node) - -Move a Node object to the end of the list. (That is, pull it out of -wherever it lives, and make it the new tail.) - -If the node belongs to a list already, then that list will remove it -first. - -#### yallist.removeNode(node) - -Remove a node from the list, preserving referential integrity of head -and tail and other nodes. - -Will throw an error if you try to have a list remove a node that -doesn't belong to it. - -### Yallist.Node - -The class that holds the data and is actually the list. - -Call with `var n = new Node(value, previousNode, nextNode)` - -Note that if you do direct operations on Nodes themselves, it's very -easy to get into weird states where the list is broken. Be careful :) - -#### node.next - -The next node in the list. - -#### node.prev - -The previous node in the list. - -#### node.value - -The data the node contains. - -#### node.list - -The list to which this node belongs. (Null if it does not belong to -any list.) diff --git a/deps/npm/node_modules/pacote/node_modules/yallist/iterator.js b/deps/npm/node_modules/pacote/node_modules/yallist/iterator.js deleted file mode 100644 index d41c97a19f9849..00000000000000 --- a/deps/npm/node_modules/pacote/node_modules/yallist/iterator.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict' -module.exports = function (Yallist) { - Yallist.prototype[Symbol.iterator] = function* () { - for (let walker = this.head; walker; walker = walker.next) { - yield walker.value - } - } -} diff --git a/deps/npm/node_modules/pacote/node_modules/yallist/package.json b/deps/npm/node_modules/pacote/node_modules/yallist/package.json deleted file mode 100644 index 9dd5bf96b017c1..00000000000000 --- a/deps/npm/node_modules/pacote/node_modules/yallist/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_from": "yallist@^3.0.0", - "_id": "yallist@3.0.3", - "_inBundle": false, - "_integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", - "_location": "/pacote/yallist", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "yallist@^3.0.0", - "name": "yallist", - "escapedName": "yallist", - "rawSpec": "^3.0.0", - "saveSpec": null, - "fetchSpec": "^3.0.0" - }, - "_requiredBy": [ - "/pacote/minipass" - ], - "_resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "_shasum": "b4b049e314be545e3ce802236d6cd22cd91c3de9", - "_spec": "yallist@^3.0.0", - "_where": "/Users/zkat/Documents/code/work/npm/node_modules/pacote/node_modules/minipass", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/yallist/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Yet Another Linked List", - "devDependencies": { - "tap": "^12.1.0" - }, - "directories": { - "test": "test" - }, - "files": [ - "yallist.js", - "iterator.js" - ], - "homepage": "https://github.com/isaacs/yallist#readme", - "license": "ISC", - "main": "yallist.js", - "name": "yallist", - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/yallist.git" - }, - "scripts": { - "postpublish": "git push origin --all; git push origin --tags", - "postversion": "npm publish", - "preversion": "npm test", - "test": "tap test/*.js --100" - }, - "version": "3.0.3" -} diff --git a/deps/npm/node_modules/pacote/node_modules/yallist/yallist.js b/deps/npm/node_modules/pacote/node_modules/yallist/yallist.js deleted file mode 100644 index b0ab36cf31b7a6..00000000000000 --- a/deps/npm/node_modules/pacote/node_modules/yallist/yallist.js +++ /dev/null @@ -1,376 +0,0 @@ -'use strict' -module.exports = Yallist - -Yallist.Node = Node -Yallist.create = Yallist - -function Yallist (list) { - var self = this - if (!(self instanceof Yallist)) { - self = new Yallist() - } - - self.tail = null - self.head = null - self.length = 0 - - if (list && typeof list.forEach === 'function') { - list.forEach(function (item) { - self.push(item) - }) - } else if (arguments.length > 0) { - for (var i = 0, l = arguments.length; i < l; i++) { - self.push(arguments[i]) - } - } - - return self -} - -Yallist.prototype.removeNode = function (node) { - if (node.list !== this) { - throw new Error('removing node which does not belong to this list') - } - - var next = node.next - var prev = node.prev - - if (next) { - next.prev = prev - } - - if (prev) { - prev.next = next - } - - if (node === this.head) { - this.head = next - } - if (node === this.tail) { - this.tail = prev - } - - node.list.length-- - node.next = null - node.prev = null - node.list = null -} - -Yallist.prototype.unshiftNode = function (node) { - if (node === this.head) { - return - } - - if (node.list) { - node.list.removeNode(node) - } - - var head = this.head - node.list = this - node.next = head - if (head) { - head.prev = node - } - - this.head = node - if (!this.tail) { - this.tail = node - } - this.length++ -} - -Yallist.prototype.pushNode = function (node) { - if (node === this.tail) { - return - } - - if (node.list) { - node.list.removeNode(node) - } - - var tail = this.tail - node.list = this - node.prev = tail - if (tail) { - tail.next = node - } - - this.tail = node - if (!this.head) { - this.head = node - } - this.length++ -} - -Yallist.prototype.push = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - push(this, arguments[i]) - } - return this.length -} - -Yallist.prototype.unshift = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - unshift(this, arguments[i]) - } - return this.length -} - -Yallist.prototype.pop = function () { - if (!this.tail) { - return undefined - } - - var res = this.tail.value - this.tail = this.tail.prev - if (this.tail) { - this.tail.next = null - } else { - this.head = null - } - this.length-- - return res -} - -Yallist.prototype.shift = function () { - if (!this.head) { - return undefined - } - - var res = this.head.value - this.head = this.head.next - if (this.head) { - this.head.prev = null - } else { - this.tail = null - } - this.length-- - return res -} - -Yallist.prototype.forEach = function (fn, thisp) { - thisp = thisp || this - for (var walker = this.head, i = 0; walker !== null; i++) { - fn.call(thisp, walker.value, i, this) - walker = walker.next - } -} - -Yallist.prototype.forEachReverse = function (fn, thisp) { - thisp = thisp || this - for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { - fn.call(thisp, walker.value, i, this) - walker = walker.prev - } -} - -Yallist.prototype.get = function (n) { - for (var i = 0, walker = this.head; walker !== null && i < n; i++) { - // abort out of the list early if we hit a cycle - walker = walker.next - } - if (i === n && walker !== null) { - return walker.value - } -} - -Yallist.prototype.getReverse = function (n) { - for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { - // abort out of the list early if we hit a cycle - walker = walker.prev - } - if (i === n && walker !== null) { - return walker.value - } -} - -Yallist.prototype.map = function (fn, thisp) { - thisp = thisp || this - var res = new Yallist() - for (var walker = this.head; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)) - walker = walker.next - } - return res -} - -Yallist.prototype.mapReverse = function (fn, thisp) { - thisp = thisp || this - var res = new Yallist() - for (var walker = this.tail; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)) - walker = walker.prev - } - return res -} - -Yallist.prototype.reduce = function (fn, initial) { - var acc - var walker = this.head - if (arguments.length > 1) { - acc = initial - } else if (this.head) { - walker = this.head.next - acc = this.head.value - } else { - throw new TypeError('Reduce of empty list with no initial value') - } - - for (var i = 0; walker !== null; i++) { - acc = fn(acc, walker.value, i) - walker = walker.next - } - - return acc -} - -Yallist.prototype.reduceReverse = function (fn, initial) { - var acc - var walker = this.tail - if (arguments.length > 1) { - acc = initial - } else if (this.tail) { - walker = this.tail.prev - acc = this.tail.value - } else { - throw new TypeError('Reduce of empty list with no initial value') - } - - for (var i = this.length - 1; walker !== null; i--) { - acc = fn(acc, walker.value, i) - walker = walker.prev - } - - return acc -} - -Yallist.prototype.toArray = function () { - var arr = new Array(this.length) - for (var i = 0, walker = this.head; walker !== null; i++) { - arr[i] = walker.value - walker = walker.next - } - return arr -} - -Yallist.prototype.toArrayReverse = function () { - var arr = new Array(this.length) - for (var i = 0, walker = this.tail; walker !== null; i++) { - arr[i] = walker.value - walker = walker.prev - } - return arr -} - -Yallist.prototype.slice = function (from, to) { - to = to || this.length - if (to < 0) { - to += this.length - } - from = from || 0 - if (from < 0) { - from += this.length - } - var ret = new Yallist() - if (to < from || to < 0) { - return ret - } - if (from < 0) { - from = 0 - } - if (to > this.length) { - to = this.length - } - for (var i = 0, walker = this.head; walker !== null && i < from; i++) { - walker = walker.next - } - for (; walker !== null && i < to; i++, walker = walker.next) { - ret.push(walker.value) - } - return ret -} - -Yallist.prototype.sliceReverse = function (from, to) { - to = to || this.length - if (to < 0) { - to += this.length - } - from = from || 0 - if (from < 0) { - from += this.length - } - var ret = new Yallist() - if (to < from || to < 0) { - return ret - } - if (from < 0) { - from = 0 - } - if (to > this.length) { - to = this.length - } - for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { - walker = walker.prev - } - for (; walker !== null && i > from; i--, walker = walker.prev) { - ret.push(walker.value) - } - return ret -} - -Yallist.prototype.reverse = function () { - var head = this.head - var tail = this.tail - for (var walker = head; walker !== null; walker = walker.prev) { - var p = walker.prev - walker.prev = walker.next - walker.next = p - } - this.head = tail - this.tail = head - return this -} - -function push (self, item) { - self.tail = new Node(item, self.tail, null, self) - if (!self.head) { - self.head = self.tail - } - self.length++ -} - -function unshift (self, item) { - self.head = new Node(item, null, self.head, self) - if (!self.tail) { - self.tail = self.head - } - self.length++ -} - -function Node (value, prev, next, list) { - if (!(this instanceof Node)) { - return new Node(value, prev, next, list) - } - - this.list = list - this.value = value - - if (prev) { - prev.next = this - this.prev = prev - } else { - this.prev = null - } - - if (next) { - next.prev = this - this.next = next - } else { - this.next = null - } -} - -try { - // add if support for Symbol.iterator is present - require('./iterator.js')(Yallist) -} catch (er) {} diff --git a/deps/npm/node_modules/pacote/package.json b/deps/npm/node_modules/pacote/package.json index 2fd3d4151f4e3a..215e5dce843f12 100644 --- a/deps/npm/node_modules/pacote/package.json +++ b/deps/npm/node_modules/pacote/package.json @@ -1,21 +1,22 @@ { - "_from": "pacote@^9.5.1", - "_id": "pacote@9.5.1", + "_from": "pacote@9.5.4", + "_id": "pacote@9.5.4", "_inBundle": false, - "_integrity": "sha512-Zqvczvf/zZ7QNosdE9uTC7SRuvSs9tFqRkF6cJl+2HH7COBnx4BRAGpeXJlrbN+mM0CMHpbi620xdEHhCflghA==", + "_integrity": "sha512-nWr0ari6E+apbdoN0hToTKZElO5h4y8DGFa2pyNA5GQIdcP0imC96bA0bbPw1gpeguVIiUgHHaAlq/6xfPp8Qw==", "_location": "/pacote", "_phantomChildren": { - "safe-buffer": "5.1.2" + "safe-buffer": "5.1.2", + "yallist": "3.0.3" }, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "pacote@^9.5.1", + "raw": "pacote@9.5.4", "name": "pacote", "escapedName": "pacote", - "rawSpec": "^9.5.1", + "rawSpec": "9.5.4", "saveSpec": null, - "fetchSpec": "^9.5.1" + "fetchSpec": "9.5.4" }, "_requiredBy": [ "#USER", @@ -23,16 +24,16 @@ "/libcipm", "/libnpm" ], - "_resolved": "https://registry.npmjs.org/pacote/-/pacote-9.5.1.tgz", - "_shasum": "adb0d23daeef6d0b813ab5891d0c6459ccec998d", - "_spec": "pacote@^9.5.1", + "_resolved": "https://registry.npmjs.org/pacote/-/pacote-9.5.4.tgz", + "_shasum": "8baa26f3d1326d13dc2fe0fe84040a364ae30aad", + "_spec": "pacote@9.5.4", "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Kat Marchán", "email": "kzm@sykosomatic.org" }, "bugs": { - "url": "https://github.com/zkat/pacote/issues" + "url": "https://github.com/npm/pacote/issues" }, "bundleDependencies": false, "contributors": [ @@ -47,12 +48,12 @@ ], "dependencies": { "bluebird": "^3.5.3", - "cacache": "^11.3.2", + "cacache": "^12.0.0", "figgy-pudding": "^3.5.1", "get-stream": "^4.1.0", "glob": "^7.1.3", "lru-cache": "^5.1.1", - "make-fetch-happen": "^4.0.1", + "make-fetch-happen": "^5.0.0", "minimatch": "^3.0.4", "minipass": "^2.3.5", "mississippi": "^3.0.0", @@ -61,7 +62,7 @@ "npm-package-arg": "^6.1.0", "npm-packlist": "^1.1.12", "npm-pick-manifest": "^2.2.3", - "npm-registry-fetch": "^3.8.0", + "npm-registry-fetch": "^4.0.0", "osenv": "^0.1.5", "promise-inflight": "^1.0.1", "promise-retry": "^1.1.1", @@ -93,7 +94,7 @@ "*.js", "lib" ], - "homepage": "https://github.com/zkat/pacote#readme", + "homepage": "https://github.com/npm/pacote#readme", "keywords": [ "packages", "npm", @@ -104,7 +105,7 @@ "name": "pacote", "repository": { "type": "git", - "url": "git+https://github.com/zkat/pacote.git" + "url": "git+https://github.com/npm/pacote.git" }, "scripts": { "postrelease": "npm publish && git push --follow-tags", @@ -116,5 +117,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "9.5.1" + "version": "9.5.4" } diff --git a/deps/npm/node_modules/query-string/index.d.ts b/deps/npm/node_modules/query-string/index.d.ts index 90b3658aee1088..a5bd661c2991d7 100644 --- a/deps/npm/node_modules/query-string/index.d.ts +++ b/deps/npm/node_modules/query-string/index.d.ts @@ -1,52 +1,108 @@ export interface ParseOptions { /** - * Decode the keys and values. URI components are decoded with [`decode-uri-component`](https://github.com/SamVerschueren/decode-uri-component). - * - * @default true - */ + Decode the keys and values. URI components are decoded with [`decode-uri-component`](https://github.com/SamVerschueren/decode-uri-component). + + @default true + */ readonly decode?: boolean; /** - * @default 'none' - * - * - `bracket`: Parse arrays with bracket representation: - * - * - * queryString.parse('foo[]=1&foo[]=2&foo[]=3', {arrayFormat: 'bracket'}); - * //=> foo: [1, 2, 3] - * - * - `index`: Parse arrays with index representation: - * - * - * queryString.parse('foo[0]=1&foo[1]=2&foo[3]=3', {arrayFormat: 'index'}); - * //=> foo: [1, 2, 3] - * - * - `comma`: Parse arrays with elements separated by comma: - * - * - * queryString.parse('foo=1,2,3', {arrayFormat: 'comma'}); - * //=> foo: [1, 2, 3] - * - * - `none`: Parse arrays with elements using duplicate keys: - * - * - * queryString.parse('foo=1&foo=2&foo=3'); - * //=> foo: [1, 2, 3] - */ + @default 'none' + + - `bracket`: Parse arrays with bracket representation: + + ``` + queryString.parse('foo[]=1&foo[]=2&foo[]=3', {arrayFormat: 'bracket'}); + //=> {foo: ['1', '2', '3']} + ``` + + - `index`: Parse arrays with index representation: + + ``` + queryString.parse('foo[0]=1&foo[1]=2&foo[3]=3', {arrayFormat: 'index'}); + //=> {foo: ['1', '2', '3']} + ``` + + - `comma`: Parse arrays with elements separated by comma: + + ``` + queryString.parse('foo=1,2,3', {arrayFormat: 'comma'}); + //=> {foo: ['1', '2', '3']} + ``` + + - `none`: Parse arrays with elements using duplicate keys: + + ``` + queryString.parse('foo=1&foo=2&foo=3'); + //=> {foo: ['1', '2', '3']} + ``` + */ readonly arrayFormat?: 'bracket' | 'index' | 'comma' | 'none'; + + /** + Supports both `Function` as a custom sorting function or `false` to disable sorting. + + If omitted, keys are sorted using `Array#sort`, which means, converting them to strings and comparing strings in Unicode code point order. + + @default true + + @example + ``` + const order = ['c', 'a', 'b']; + + queryString.parse('?a=one&b=two&c=three', { + sort: (itemLeft, itemRight) => order.indexOf(itemLeft) - order.indexOf(itemRight) + }); + // => {c: 'three', a: 'one', b: 'two'} + ``` + + queryString.parse('?a=one&c=three&b=two', {sort: false}); + // => {a: 'one', c: 'three', b: 'two'} + ``` + */ + readonly sort?: ((itemLeft: string, itemRight: string) => number) | false; + + /** + Parse the value as a number type instead of string type if it's a number. + + @default false + + @example + ```js + queryString.parse('foo=1', {parseNumbers: true}); + //=> {foo: 1} + ``` + */ + readonly parseNumbers?: boolean; + + /** + Parse the value as a boolean type instead of string type if it's a boolean. + + @default false + + @example + ``` + queryString.parse('foo=true', {parseBooleans: true}); + //=> {foo: true} + ``` + */ + readonly parseBooleans?: boolean; } -export interface ParsedQuery { - readonly [key: string]: string | string[] | null | undefined; +export interface ParsedQuery { + [key: string]: T | T[] | null | undefined; } /** - * Parse a query string into an object. Leading `?` or `#` are ignored, so you can pass `location.search` or `location.hash` directly. - * - * The returned object is created with [`Object.create(null)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create) and thus does not have a `prototype`. - * - * @param query - The query string to parse. - */ +Parse a query string into an object. Leading `?` or `#` are ignored, so you can pass `location.search` or `location.hash` directly. + +The returned object is created with [`Object.create(null)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create) and thus does not have a `prototype`. + +@param query - The query string to parse. +*/ +export function parse(query: string, options: {parseBooleans: true, parseNumbers: true} & ParseOptions): ParsedQuery; +export function parse(query: string, options: {parseBooleans: true} & ParseOptions): ParsedQuery; +export function parse(query: string, options: {parseNumbers: true} & ParseOptions): ParsedQuery; export function parse(query: string, options?: ParseOptions): ParsedQuery; export interface ParsedUrl { @@ -55,89 +111,98 @@ export interface ParsedUrl { } /** - * Extract the URL and the query string as an object. - * - * @param url - The URL to parse. - * - * @example - * - * queryString.parseUrl('https://foo.bar?foo=bar'); - * //=> {url: 'https://foo.bar', query: {foo: 'bar'}} - */ +Extract the URL and the query string as an object. + +@param url - The URL to parse. + +@example +``` +queryString.parseUrl('https://foo.bar?foo=bar'); +//=> {url: 'https://foo.bar', query: {foo: 'bar'}} +``` +*/ export function parseUrl(url: string, options?: ParseOptions): ParsedUrl; export interface StringifyOptions { /** - * Strictly encode URI components with [`strict-uri-encode`](https://github.com/kevva/strict-uri-encode). It uses [`encodeURIComponent`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) if set to `false`. You probably [don't care](https://github.com/sindresorhus/query-string/issues/42) about this option. - * - * @default true - */ + Strictly encode URI components with [`strict-uri-encode`](https://github.com/kevva/strict-uri-encode). It uses [`encodeURIComponent`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) if set to `false`. You probably [don't care](https://github.com/sindresorhus/query-string/issues/42) about this option. + + @default true + */ readonly strict?: boolean; /** - * [URL encode](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) the keys and values. - * - * @default true - */ + [URL encode](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) the keys and values. + + @default true + */ readonly encode?: boolean; /** - * @default 'none' - * - * - `bracket`: Serialize arrays using bracket representation: - * - * - * queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'bracket'}); - * //=> 'foo[]=1&foo[]=2&foo[]=3' - * - * - `index`: Serialize arrays using index representation: - * - * - * queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'index'}); - * //=> 'foo[0]=1&foo[1]=2&foo[3]=3' - * - * - `comma`: Serialize arrays by separating elements with comma: - * - * - * queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'comma'}); - * //=> 'foo=1,2,3' - * - * - `none`: Serialize arrays by using duplicate keys: - * - * - * queryString.stringify({foo: [1, 2, 3]}); - * //=> 'foo=1&foo=2&foo=3' - */ + @default 'none' + + - `bracket`: Serialize arrays using bracket representation: + + ``` + queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'bracket'}); + //=> 'foo[]=1&foo[]=2&foo[]=3' + ``` + + - `index`: Serialize arrays using index representation: + + ``` + queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'index'}); + //=> 'foo[0]=1&foo[1]=2&foo[2]=3' + ``` + + - `comma`: Serialize arrays by separating elements with comma: + + ``` + queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'comma'}); + //=> 'foo=1,2,3' + ``` + + - `none`: Serialize arrays by using duplicate keys: + + ``` + queryString.stringify({foo: [1, 2, 3]}); + //=> 'foo=1&foo=2&foo=3' + ``` + */ readonly arrayFormat?: 'bracket' | 'index' | 'comma' | 'none'; /** - * Supports both `Function` as a custom sorting function or `false` to disable sorting. - * - * If omitted, keys are sorted using `Array#sort`, which means, converting them to strings and comparing strings in Unicode code point order. - * - * @example - * - * const order = ['c', 'a', 'b']; - * queryString.stringify({a: 1, b: 2, c: 3}, { - * sort: (itemLeft, itemRight) => order.indexOf(itemLeft) - order.indexOf(itemRight) - * }); - * // => 'c=3&a=1&b=2' - * - * queryString.stringify({b: 1, c: 2, a: 3}, {sort: false}); - * // => 'b=1&c=2&a=3' - */ + Supports both `Function` as a custom sorting function or `false` to disable sorting. + + If omitted, keys are sorted using `Array#sort`, which means, converting them to strings and comparing strings in Unicode code point order. + + @default true + + @example + ``` + const order = ['c', 'a', 'b']; + + queryString.stringify({a: 1, b: 2, c: 3}, { + sort: (itemLeft, itemRight) => order.indexOf(itemLeft) - order.indexOf(itemRight) + }); + // => 'c=3&a=1&b=2' + + queryString.stringify({b: 1, c: 2, a: 3}, {sort: false}); + // => 'b=1&c=2&a=3' + ``` + */ readonly sort?: ((itemLeft: string, itemRight: string) => number) | false; } /** - * Stringify an object into a query string and sorting the keys. - */ +Stringify an object into a query string and sort the keys. +*/ export function stringify( - object: {[key: string]: unknown}, + object: {[key: string]: any}, options?: StringifyOptions ): string; /** - * Extract a query string from a URL that can be passed into `.parse()`. - */ +Extract a query string from a URL that can be passed into `.parse()`. +*/ export function extract(url: string): string; diff --git a/deps/npm/node_modules/query-string/index.js b/deps/npm/node_modules/query-string/index.js index 3cb1adf8d30450..da459c9404d0b3 100644 --- a/deps/npm/node_modules/query-string/index.js +++ b/deps/npm/node_modules/query-string/index.js @@ -1,6 +1,7 @@ 'use strict'; const strictUriEncode = require('strict-uri-encode'); const decodeComponent = require('decode-uri-component'); +const splitOnFirst = require('split-on-first'); function encoderForArrayFormat(options) { switch (options.arrayFormat) { @@ -36,7 +37,7 @@ function encoderForArrayFormat(options) { case 'comma': return key => (result, value, index) => { - if (!value) { + if (value === null || value === undefined || value.length === 0) { return result; } @@ -151,7 +152,17 @@ function keysSorter(input) { return input; } +function removeHash(input) { + const hashStart = input.indexOf('#'); + if (hashStart !== -1) { + input = input.slice(0, hashStart); + } + + return input; +} + function extract(input) { + input = removeHash(input); const queryStart = input.indexOf('?'); if (queryStart === -1) { return ''; @@ -163,7 +174,10 @@ function extract(input) { function parse(input, options) { options = Object.assign({ decode: true, - arrayFormat: 'none' + sort: true, + arrayFormat: 'none', + parseNumbers: false, + parseBooleans: false }, options); const formatter = parserForArrayFormat(options); @@ -182,16 +196,26 @@ function parse(input, options) { } for (const param of input.split('&')) { - let [key, value] = param.replace(/\+/g, ' ').split('='); + let [key, value] = splitOnFirst(param.replace(/\+/g, ' '), '='); // Missing `=` should be `null`: // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters value = value === undefined ? null : decode(value, options); + if (options.parseNumbers && !Number.isNaN(Number(value))) { + value = Number(value); + } else if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) { + value = value.toLowerCase() === 'true'; + } + formatter(decode(key, options), value, ret); } - return Object.keys(ret).sort().reduce((result, key) => { + if (options.sort === false) { + return ret; + } + + return (options.sort === true ? Object.keys(ret).sort() : Object.keys(ret).sort(options.sort)).reduce((result, key) => { const value = ret[key]; if (Boolean(value) && typeof value === 'object' && !Array.isArray(value)) { // Sort object keys, not values @@ -247,13 +271,8 @@ exports.stringify = (object, options) => { }; exports.parseUrl = (input, options) => { - const hashStart = input.indexOf('#'); - if (hashStart !== -1) { - input = input.slice(0, hashStart); - } - return { - url: input.split('?')[0] || '', + url: removeHash(input).split('?')[0] || '', query: parse(extract(input), options) }; }; diff --git a/deps/npm/node_modules/query-string/package.json b/deps/npm/node_modules/query-string/package.json index cd62b3cf54fba2..916b3fe5a1714e 100644 --- a/deps/npm/node_modules/query-string/package.json +++ b/deps/npm/node_modules/query-string/package.json @@ -1,28 +1,28 @@ { - "_from": "query-string@6.4.0", - "_id": "query-string@6.4.0", + "_from": "query-string@6.8.1", + "_id": "query-string@6.8.1", "_inBundle": false, - "_integrity": "sha512-Werid2I41/tJTqOGPJ3cC3vwrIh/8ZupBQbp7BSsqXzr+pTin3aMJ/EZb8UEuk7ZO3VqQFvq2qck/ihc6wqIdw==", + "_integrity": "sha512-g6y0Lbq10a5pPQpjlFuojfMfV1Pd2Jw9h75ypiYPPia3Gcq2rgkKiIwbkS6JxH7c5f5u/B/sB+d13PU+g1eu4Q==", "_location": "/query-string", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "query-string@6.4.0", + "raw": "query-string@6.8.1", "name": "query-string", "escapedName": "query-string", - "rawSpec": "6.4.0", + "rawSpec": "6.8.1", "saveSpec": null, - "fetchSpec": "6.4.0" + "fetchSpec": "6.8.1" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/query-string/-/query-string-6.4.0.tgz", - "_shasum": "1566c0cec3a2da2d82c222ed3f9e2a921dba5e6a", - "_spec": "query-string@6.4.0", - "_where": "/Users/aeschright/code/cli", + "_resolved": "https://registry.npmjs.org/query-string/-/query-string-6.8.1.tgz", + "_shasum": "62c54a7ef37d01b538c8fd56f95740c81d438a26", + "_spec": "query-string@6.8.1", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -34,15 +34,16 @@ "bundleDependencies": false, "dependencies": { "decode-uri-component": "^0.2.0", + "split-on-first": "^1.0.0", "strict-uri-encode": "^2.0.0" }, "deprecated": false, "description": "Parse and stringify URL query strings", "devDependencies": { - "ava": "^1.3.1", + "ava": "^1.4.1", "deep-equal": "^1.0.1", "fast-check": "^1.5.0", - "tsd-check": "^0.3.0", + "tsd": "^0.7.3", "xo": "^0.24.0" }, "engines": { @@ -75,7 +76,7 @@ "url": "git+https://github.com/sindresorhus/query-string.git" }, "scripts": { - "test": "xo && ava && tsd-check" + "test": "xo && ava && tsd" }, - "version": "6.4.0" + "version": "6.8.1" } diff --git a/deps/npm/node_modules/query-string/readme.md b/deps/npm/node_modules/query-string/readme.md index fda9323cdecf93..297a47d5a00e96 100644 --- a/deps/npm/node_modules/query-string/readme.md +++ b/deps/npm/node_modules/query-string/readme.md @@ -11,10 +11,6 @@ $ npm install query-string This module targets Node.js 6 or later and the latest version of Chrome, Firefox, and Safari. If you want support for older browsers, or, [if your project is using create-react-app v1](https://github.com/sindresorhus/query-string/pull/148#issuecomment-399656020), use version 5: `npm install query-string@5`. - - - - ## Usage @@ -50,7 +46,7 @@ console.log(location.search); ## API -### .parse(string, [options]) +### .parse(string, options?) Parse a query string into an object. Leading `?` or `#` are ignored, so you can pass `location.search` or `location.hash` directly. @@ -58,7 +54,7 @@ The returned object is created with [`Object.create(null)`](https://developer.mo #### options -Type: `Object` +Type: `object` ##### decode @@ -70,43 +66,74 @@ Decode the keys and values. URL components are decoded with [`decode-uri-compone ##### arrayFormat Type: `string`
      -Default: `none` +Default: `'none'` -- `bracket`: Parse arrays with bracket representation: +- `'bracket'`: Parse arrays with bracket representation: ```js queryString.parse('foo[]=1&foo[]=2&foo[]=3', {arrayFormat: 'bracket'}); -//=> foo: [1, 2, 3] +//=> {foo: ['1', '2', '3']} ``` -- `index`: Parse arrays with index representation: +- `'index'`: Parse arrays with index representation: ```js queryString.parse('foo[0]=1&foo[1]=2&foo[3]=3', {arrayFormat: 'index'}); -//=> foo: [1, 2, 3] +//=> {foo: ['1', '2', '3']} ``` -- `comma`: Parse arrays with elements separated by comma: +- `'comma'`: Parse arrays with elements separated by comma: ```js queryString.parse('foo=1,2,3', {arrayFormat: 'comma'}); -//=> foo: [1, 2, 3] +//=> {foo: ['1', '2', '3']} ``` -- `none`: Parse arrays with elements using duplicate keys: +- `'none'`: Parse arrays with elements using duplicate keys: ```js queryString.parse('foo=1&foo=2&foo=3'); -//=> foo: [1, 2, 3] +//=> {foo: ['1', '2', '3']} ``` +##### sort + +Type: `Function | boolean`
      +Default: `true` + +Supports both `Function` as a custom sorting function or `false` to disable sorting. + +##### parseNumbers + +Type: `boolean`
      +Default: `false` + +```js +queryString.parse('foo=1', {parseNumbers: true}); +//=> {foo: 1} +``` + +Parse the value as a number type instead of string type if it's a number. + +##### parseBooleans + +Type: `boolean`
      +Default: `false` + +```js +queryString.parse('foo=true', {parseBooleans: true}); +//=> {foo: true} +``` + +Parse the value as a boolean type instead of string type if it's a boolean. + ### .stringify(object, [options]) Stringify an object into a query string and sorting the keys. #### options -Type: `Object` +Type: `object` ##### strict @@ -125,30 +152,30 @@ Default: `true` ##### arrayFormat Type: `string`
      -Default: `none` +Default: `'none'` -- `bracket`: Serialize arrays using bracket representation: +- `'bracket'`: Serialize arrays using bracket representation: ```js queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'bracket'}); //=> 'foo[]=1&foo[]=2&foo[]=3' ``` -- `index`: Serialize arrays using index representation: +- `'index'`: Serialize arrays using index representation: ```js queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'index'}); -//=> 'foo[0]=1&foo[1]=2&foo[3]=3' +//=> 'foo[0]=1&foo[1]=2&foo[2]=3' ``` -- `comma`: Serialize arrays by separating elements with comma: +- `'comma'`: Serialize arrays by separating elements with comma: ```js queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'comma'}); //=> 'foo=1,2,3' ``` -- `none`: Serialize arrays by using duplicate keys: +- `'none'`: Serialize arrays by using duplicate keys: ```js queryString.stringify({foo: [1, 2, 3]}); @@ -181,7 +208,7 @@ If omitted, keys are sorted using `Array#sort()`, which means, converting them t Extract a query string from a URL that can be passed into `.parse()`. -### .parseUrl(string, [options]) +### .parseUrl(string, options?) Extract the URL and the query string as an object. @@ -218,7 +245,7 @@ queryString.parse('likes=cake&name=bob&likes=icecream'); //=> {likes: ['cake', 'icecream'], name: 'bob'} queryString.stringify({color: ['taupe', 'chartreuse'], id: '515'}); -//=> 'color=chartreuse&color=taupe&id=515' +//=> 'color=taupe&color=chartreuse&id=515' ``` @@ -238,6 +265,14 @@ queryString.stringify({foo: undefined}); ``` -## License +--- -MIT © [Sindre Sorhus](https://sindresorhus.com) +
      + + Get professional support for this package with a Tidelift subscription + +
      + + Tidelift helps make open source sustainable for maintainers while giving companies
      assurances about security, maintenance, and licensing for their dependencies. +
      +
      diff --git a/deps/npm/node_modules/readable-stream/package.json b/deps/npm/node_modules/readable-stream/package.json index e2cd943594977b..67c7e602f26275 100644 --- a/deps/npm/node_modules/readable-stream/package.json +++ b/deps/npm/node_modules/readable-stream/package.json @@ -1,19 +1,19 @@ { - "_from": "readable-stream@3.3.0", - "_id": "readable-stream@3.3.0", + "_from": "readable-stream@3.4.0", + "_id": "readable-stream@3.4.0", "_inBundle": false, - "_integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==", + "_integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", "_location": "/readable-stream", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "readable-stream@3.3.0", + "raw": "readable-stream@3.4.0", "name": "readable-stream", "escapedName": "readable-stream", - "rawSpec": "3.3.0", + "rawSpec": "3.4.0", "saveSpec": null, - "fetchSpec": "3.3.0" + "fetchSpec": "3.4.0" }, "_requiredBy": [ "#USER", @@ -21,9 +21,9 @@ "/bl", "/tar-stream" ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz", - "_shasum": "cb8011aad002eb717bf040291feba8569c986fb9", - "_spec": "readable-stream@3.3.0", + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", + "_shasum": "a51c26754658e0a3c21dbf59163bd45ba6f447fc", + "_spec": "readable-stream@3.4.0", "_where": "/Users/isaacs/dev/npm/cli", "browser": { "util": false, @@ -59,7 +59,7 @@ "nyc": "^11.0.0", "pump": "^3.0.0", "rimraf": "^2.6.2", - "tap": "^11.0.0", + "tap": "^12.0.0", "tape": "^4.9.0", "tar-fs": "^1.16.2", "util-promisify": "^2.1.0" @@ -86,13 +86,13 @@ "url": "git://github.com/nodejs/readable-stream.git" }, "scripts": { - "ci": "TAP=1 tap test/parallel/*.js test/ours/*.js | tee test.tap", + "ci": "TAP=1 tap --no-esm test/parallel/*.js test/ours/*.js | tee test.tap", "cover": "nyc npm test", "report": "nyc report --reporter=lcov", - "test": "tap -j 4 test/parallel/*.js test/ours/*.js", + "test": "tap -J --no-esm test/parallel/*.js test/ours/*.js", "test-browser-local": "airtap --open --local -- test/browser.js", "test-browsers": "airtap --sauce-connect --loopback airtap.local -- test/browser.js", "update-browser-errors": "babel -o errors-browser.js errors.js" }, - "version": "3.3.0" + "version": "3.4.0" } diff --git a/deps/npm/node_modules/readable-stream/readable-browser.js b/deps/npm/node_modules/readable-stream/readable-browser.js index e50372592ee6c6..adbf60de832f9d 100644 --- a/deps/npm/node_modules/readable-stream/readable-browser.js +++ b/deps/npm/node_modules/readable-stream/readable-browser.js @@ -5,3 +5,5 @@ 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'); +exports.finished = require('./lib/internal/streams/end-of-stream.js'); +exports.pipeline = require('./lib/internal/streams/pipeline.js'); diff --git a/deps/npm/node_modules/semver/CHANGELOG.md b/deps/npm/node_modules/semver/CHANGELOG.md new file mode 100644 index 00000000000000..66304fdd23678a --- /dev/null +++ b/deps/npm/node_modules/semver/CHANGELOG.md @@ -0,0 +1,39 @@ +# changes log + +## 5.7 + +* Add `minVersion` method + +## 5.6 + +* Move boolean `loose` param to an options object, with + backwards-compatibility protection. +* Add ability to opt out of special prerelease version handling with + the `includePrerelease` option flag. + +## 5.5 + +* Add version coercion capabilities + +## 5.4 + +* Add intersection checking + +## 5.3 + +* Add `minSatisfying` method + +## 5.2 + +* Add `prerelease(v)` that returns prerelease components + +## 5.1 + +* Add Backus-Naur for ranges +* Remove excessively cute inspection methods + +## 5.0 + +* Remove AMD/Browserified build artifacts +* Fix ltr and gtr when using the `*` range +* Fix for range `*` with a prerelease identifier diff --git a/deps/npm/node_modules/semver/README.md b/deps/npm/node_modules/semver/README.md index e0edbb7333112c..e5ccececf4808f 100644 --- a/deps/npm/node_modules/semver/README.md +++ b/deps/npm/node_modules/semver/README.md @@ -20,6 +20,7 @@ semver.clean(' =v1.2.3 ') // '1.2.3' semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true semver.gt('1.2.3', '9.8.7') // false semver.lt('1.2.3', '9.8.7') // true +semver.minVersion('>=1.0.0') // '1.0.0' semver.valid(semver.coerce('v2')) // '2.0.0' semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' ``` @@ -29,7 +30,7 @@ As a command-line utility: ``` $ semver -h -A JavaScript implementation of the http://semver.org/ specification +A JavaScript implementation of the https://semver.org/ specification Copyright Isaac Z. Schlueter Usage: semver [options] [ [...]] @@ -71,7 +72,7 @@ multiple versions to the utility will just sort them. ## Versions A "version" is described by the `v2.0.0` specification found at -. +. A leading `"="` or `"v"` character is stripped off and ignored. @@ -137,6 +138,13 @@ the user is indicating that they are aware of the risk. However, it is still not appropriate to assume that they have opted into taking a similar risk on the *next* set of prerelease versions. +Note that this behavior can be suppressed (treating all prerelease +versions as if they were normal versions, for the purpose of range +matching) by setting the `includePrerelease` flag on the options +object to any +[functions](https://github.com/npm/node-semver#functions) that do +range matching. + #### Prerelease Identifiers The method `.inc` takes an additional `identifier` string argument that @@ -325,6 +333,8 @@ strings that they parse. * `patch(v)`: Return the patch version number. * `intersects(r1, r2, loose)`: Return true if the two supplied ranges or comparators intersect. +* `parse(v)`: Attempt to parse a string as a semantic version, returning either + a `SemVer` object or `null`. ### Comparison @@ -361,6 +371,8 @@ strings that they parse. that satisfies the range, or `null` if none of them do. * `minSatisfying(versions, range)`: Return the lowest version in the list that satisfies the range, or `null` if none of them do. +* `minVersion(range)`: Return the lowest version that can possibly match + the given range. * `gtr(version, range)`: Return `true` if version is greater than all the versions possible in the range. * `ltr(version, range)`: Return `true` if version is less than all the diff --git a/deps/npm/node_modules/semver/bin/semver b/deps/npm/node_modules/semver/bin/semver index 9100ed42b8821d..801e77f1303c15 100755 --- a/deps/npm/node_modules/semver/bin/semver +++ b/deps/npm/node_modules/semver/bin/semver @@ -4,20 +4,28 @@ // any supplied version is valid and passes all tests. var argv = process.argv.slice(2) - , versions = [] - , range = [] - , gt = [] - , lt = [] - , eq = [] - , inc = null - , version = require("../package.json").version - , loose = false - , includePrerelease = false - , coerce = false - , identifier = undefined - , semver = require("../semver") - , reverse = false - , options = {} + +var versions = [] + +var range = [] + +var inc = null + +var version = require('../package.json').version + +var loose = false + +var includePrerelease = false + +var coerce = false + +var identifier + +var semver = require('../semver') + +var reverse = false + +var options = {} main() @@ -25,45 +33,45 @@ function main () { if (!argv.length) return help() while (argv.length) { var a = argv.shift() - var i = a.indexOf('=') - if (i !== -1) { - a = a.slice(0, i) - argv.unshift(a.slice(i + 1)) + var indexOfEqualSign = a.indexOf('=') + if (indexOfEqualSign !== -1) { + a = a.slice(0, indexOfEqualSign) + argv.unshift(a.slice(indexOfEqualSign + 1)) } switch (a) { - case "-rv": case "-rev": case "--rev": case "--reverse": + case '-rv': case '-rev': case '--rev': case '--reverse': reverse = true break - case "-l": case "--loose": + case '-l': case '--loose': loose = true break - case "-p": case "--include-prerelease": + case '-p': case '--include-prerelease': includePrerelease = true break - case "-v": case "--version": + case '-v': case '--version': versions.push(argv.shift()) break - case "-i": case "--inc": case "--increment": + case '-i': case '--inc': case '--increment': switch (argv[0]) { - case "major": case "minor": case "patch": case "prerelease": - case "premajor": case "preminor": case "prepatch": + case 'major': case 'minor': case 'patch': case 'prerelease': + case 'premajor': case 'preminor': case 'prepatch': inc = argv.shift() break default: - inc = "patch" + inc = 'patch' break } break - case "--preid": + case '--preid': identifier = argv.shift() break - case "-r": case "--range": + case '-r': case '--range': range.push(argv.shift()) break - case "-c": case "--coerce": + case '-c': case '--coerce': coerce = true break - case "-h": case "--help": case "-?": + case '-h': case '--help': case '-?': return help() default: versions.push(a) @@ -74,15 +82,14 @@ function main () { var options = { loose: loose, includePrerelease: includePrerelease } versions = versions.map(function (v) { - return coerce ? (semver.coerce(v) || {version: v}).version : v + return coerce ? (semver.coerce(v) || { version: v }).version : v }).filter(function (v) { return semver.valid(v) }) if (!versions.length) return fail() - if (inc && (versions.length !== 1 || range.length)) - return failInc() + if (inc && (versions.length !== 1 || range.length)) { return failInc() } - for (var i = 0, l = range.length; i < l ; i ++) { + for (var i = 0, l = range.length; i < l; i++) { versions = versions.filter(function (v) { return semver.satisfies(v, range[i], options) }) @@ -92,62 +99,62 @@ function main () { } function failInc () { - console.error("--inc can only be used on a single version with no range") + console.error('--inc can only be used on a single version with no range') fail() } function fail () { process.exit(1) } function success () { - var compare = reverse ? "rcompare" : "compare" + var compare = reverse ? 'rcompare' : 'compare' versions.sort(function (a, b) { return semver[compare](a, b, options) }).map(function (v) { return semver.clean(v, options) }).map(function (v) { return inc ? semver.inc(v, inc, options, identifier) : v - }).forEach(function (v,i,_) { console.log(v) }) + }).forEach(function (v, i, _) { console.log(v) }) } function help () { - console.log(["SemVer " + version - ,"" - ,"A JavaScript implementation of the http://semver.org/ specification" - ,"Copyright Isaac Z. Schlueter" - ,"" - ,"Usage: semver [options] [ [...]]" - ,"Prints valid versions sorted by SemVer precedence" - ,"" - ,"Options:" - ,"-r --range " - ," Print versions that match the specified range." - ,"" - ,"-i --increment []" - ," Increment a version by the specified level. Level can" - ," be one of: major, minor, patch, premajor, preminor," - ," prepatch, or prerelease. Default level is 'patch'." - ," Only one version may be specified." - ,"" - ,"--preid " - ," Identifier to be used to prefix premajor, preminor," - ," prepatch or prerelease version increments." - ,"" - ,"-l --loose" - ," Interpret versions and ranges loosely" - ,"" - ,"-p --include-prerelease" - ," Always include prerelease versions in range matching" - ,"" - ,"-c --coerce" - ," Coerce a string into SemVer if possible" - ," (does not imply --loose)" - ,"" - ,"Program exits successfully if any valid version satisfies" - ,"all supplied ranges, and prints all satisfying versions." - ,"" - ,"If no satisfying versions are found, then exits failure." - ,"" - ,"Versions are printed in ascending order, so supplying" - ,"multiple versions to the utility will just sort them." - ].join("\n")) + console.log(['SemVer ' + version, + '', + 'A JavaScript implementation of the https://semver.org/ specification', + 'Copyright Isaac Z. Schlueter', + '', + 'Usage: semver [options] [ [...]]', + 'Prints valid versions sorted by SemVer precedence', + '', + 'Options:', + '-r --range ', + ' Print versions that match the specified range.', + '', + '-i --increment []', + ' Increment a version by the specified level. Level can', + ' be one of: major, minor, patch, premajor, preminor,', + " prepatch, or prerelease. Default level is 'patch'.", + ' Only one version may be specified.', + '', + '--preid ', + ' Identifier to be used to prefix premajor, preminor,', + ' prepatch or prerelease version increments.', + '', + '-l --loose', + ' Interpret versions and ranges loosely', + '', + '-p --include-prerelease', + ' Always include prerelease versions in range matching', + '', + '-c --coerce', + ' Coerce a string into SemVer if possible', + ' (does not imply --loose)', + '', + 'Program exits successfully if any valid version satisfies', + 'all supplied ranges, and prints all satisfying versions.', + '', + 'If no satisfying versions are found, then exits failure.', + '', + 'Versions are printed in ascending order, so supplying', + 'multiple versions to the utility will just sort them.' + ].join('\n')) } diff --git a/deps/npm/node_modules/semver/package.json b/deps/npm/node_modules/semver/package.json index 2d1c04f1b9f2cc..6673fdeb17329e 100644 --- a/deps/npm/node_modules/semver/package.json +++ b/deps/npm/node_modules/semver/package.json @@ -1,41 +1,48 @@ { - "_from": "semver@5.6.0", - "_id": "semver@5.6.0", + "_from": "semver@5.7.0", + "_id": "semver@5.7.0", "_inBundle": false, - "_integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "_integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "_location": "/semver", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "semver@5.6.0", + "raw": "semver@5.7.0", "name": "semver", "escapedName": "semver", - "rawSpec": "5.6.0", + "rawSpec": "5.7.0", "saveSpec": null, - "fetchSpec": "5.6.0" + "fetchSpec": "5.7.0" }, "_requiredBy": [ "#USER", "/", + "/caching-transform/make-dir", + "/cp-file/make-dir", "/eslint", "/eslint-plugin-node", + "/find-cache-dir/make-dir", "/init-package-json", + "/istanbul-lib-report/make-dir", + "/istanbul-lib-source-maps/make-dir", "/libnpmpublish", - "/licensee", "/lock-verify", "/normalize-package-data", "/npm-install-checks", "/npm-package-arg", "/npm-pick-manifest", + "/nyc/cross-spawn", + "/nyc/make-dir", "/package-json", + "/pacote", "/read-installed", "/semver-diff" ], - "_resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "_shasum": "7e74256fbaa49c75aa7c7a205cc22799cac80004", - "_spec": "semver@5.6.0", - "_where": "/Users/aeschright/code/cli", + "_resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "_shasum": "790a7cf6fea5459bac96110b29b60412dc8ff96b", + "_spec": "semver@5.7.0", + "_where": "/Users/isaacs/dev/npm/cli", "bin": { "semver": "./bin/semver" }, @@ -46,7 +53,7 @@ "deprecated": false, "description": "The semantic version parser used by npm.", "devDependencies": { - "tap": "^12.0.1" + "tap": "^13.0.0-rc.18" }, "files": [ "bin", @@ -62,7 +69,13 @@ "url": "git+https://github.com/npm/node-semver.git" }, "scripts": { - "test": "tap test/*.js --cov -J" + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap" }, - "version": "5.6.0" + "tap": { + "check-coverage": true + }, + "version": "5.7.0" } diff --git a/deps/npm/node_modules/semver/semver.js b/deps/npm/node_modules/semver/semver.js index 16e9a6754c2bf9..d315d5d68b179e 100644 --- a/deps/npm/node_modules/semver/semver.js +++ b/deps/npm/node_modules/semver/semver.js @@ -1,33 +1,35 @@ -exports = module.exports = SemVer; - -// The debug function is excluded entirely from the minified version. -/* nomin */ var debug; -/* nomin */ if (typeof process === 'object' && - /* nomin */ process.env && - /* nomin */ process.env.NODE_DEBUG && - /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG)) - /* nomin */ debug = function() { - /* nomin */ var args = Array.prototype.slice.call(arguments, 0); - /* nomin */ args.unshift('SEMVER'); - /* nomin */ console.log.apply(console, args); - /* nomin */ }; -/* nomin */ else - /* nomin */ debug = function() {}; +exports = module.exports = SemVer + +var debug +/* istanbul ignore next */ +if (typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG)) { + debug = function () { + var args = Array.prototype.slice.call(arguments, 0) + args.unshift('SEMVER') + console.log.apply(console, args) + } +} else { + debug = function () {} +} // Note: this is the semver.org version of the spec that it implements // Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0'; +exports.SEMVER_SPEC_VERSION = '2.0.0' -var MAX_LENGTH = 256; -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; +var MAX_LENGTH = 256 +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || + /* istanbul ignore next */ 9007199254740991 // Max safe segment length for coercion. -var MAX_SAFE_COMPONENT_LENGTH = 16; +var MAX_SAFE_COMPONENT_LENGTH = 16 // The actual regexps go on exports.re -var re = exports.re = []; -var src = exports.src = []; -var R = 0; +var re = exports.re = [] +var src = exports.src = [] +var R = 0 // The following Regular Expressions can be used for tokenizing, // validating, and parsing SemVer version strings. @@ -35,71 +37,67 @@ var R = 0; // ## Numeric Identifier // A single `0`, or a non-zero digit followed by zero or more digits. -var NUMERICIDENTIFIER = R++; -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; -var NUMERICIDENTIFIERLOOSE = R++; -src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; - +var NUMERICIDENTIFIER = R++ +src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' +var NUMERICIDENTIFIERLOOSE = R++ +src[NUMERICIDENTIFIERLOOSE] = '[0-9]+' // ## Non-numeric Identifier // Zero or more digits, followed by a letter or hyphen, and then zero or // more letters, digits, or hyphens. -var NONNUMERICIDENTIFIER = R++; -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; - +var NONNUMERICIDENTIFIER = R++ +src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' // ## Main Version // Three dot-separated numeric identifiers. -var MAINVERSION = R++; +var MAINVERSION = R++ src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')'; + '(' + src[NUMERICIDENTIFIER] + ')' -var MAINVERSIONLOOSE = R++; +var MAINVERSIONLOOSE = R++ src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; + '(' + src[NUMERICIDENTIFIERLOOSE] + ')' // ## Pre-release Version Identifier // A numeric identifier, or a non-numeric identifier. -var PRERELEASEIDENTIFIER = R++; +var PRERELEASEIDENTIFIER = R++ src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')'; + '|' + src[NONNUMERICIDENTIFIER] + ')' -var PRERELEASEIDENTIFIERLOOSE = R++; +var PRERELEASEIDENTIFIERLOOSE = R++ src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')'; - + '|' + src[NONNUMERICIDENTIFIER] + ')' // ## Pre-release Version // Hyphen, followed by one or more dot-separated pre-release version // identifiers. -var PRERELEASE = R++; +var PRERELEASE = R++ src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' -var PRERELEASELOOSE = R++; +var PRERELEASELOOSE = R++ src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' // ## Build Metadata Identifier // Any combination of digits, letters, or hyphens. -var BUILDIDENTIFIER = R++; -src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; +var BUILDIDENTIFIER = R++ +src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+' // ## Build Metadata // Plus sign, followed by one or more period-separated build metadata // identifiers. -var BUILD = R++; +var BUILD = R++ src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; - + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' // ## Full Version String // A main version, followed optionally by a pre-release version and @@ -110,802 +108,870 @@ src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + // capturing group, because it should not ever be used in version // comparison. -var FULL = R++; +var FULL = R++ var FULLPLAIN = 'v?' + src[MAINVERSION] + src[PRERELEASE] + '?' + - src[BUILD] + '?'; + src[BUILD] + '?' -src[FULL] = '^' + FULLPLAIN + '$'; +src[FULL] = '^' + FULLPLAIN + '$' // like full, but allows v1.2.3 and =1.2.3, which people do sometimes. // also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty // common in the npm registry. var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?'; + src[BUILD] + '?' -var LOOSE = R++; -src[LOOSE] = '^' + LOOSEPLAIN + '$'; +var LOOSE = R++ +src[LOOSE] = '^' + LOOSEPLAIN + '$' -var GTLT = R++; -src[GTLT] = '((?:<|>)?=?)'; +var GTLT = R++ +src[GTLT] = '((?:<|>)?=?)' // Something like "2.*" or "1.2.x". // Note that "x.x" is a valid xRange identifer, meaning "any version" // Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++; -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; -var XRANGEIDENTIFIER = R++; -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; +var XRANGEIDENTIFIERLOOSE = R++ +src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' +var XRANGEIDENTIFIER = R++ +src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' -var XRANGEPLAIN = R++; +var XRANGEPLAIN = R++ src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + '(?:' + src[PRERELEASE] + ')?' + src[BUILD] + '?' + - ')?)?'; + ')?)?' -var XRANGEPLAINLOOSE = R++; +var XRANGEPLAINLOOSE = R++ src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:' + src[PRERELEASELOOSE] + ')?' + src[BUILD] + '?' + - ')?)?'; + ')?)?' -var XRANGE = R++; -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; -var XRANGELOOSE = R++; -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; +var XRANGE = R++ +src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' +var XRANGELOOSE = R++ +src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' // Coercion. // Extract anything that could conceivably be a part of a valid semver -var COERCE = R++; +var COERCE = R++ src[COERCE] = '(?:^|[^\\d])' + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:$|[^\\d])'; + '(?:$|[^\\d])' // Tilde ranges. // Meaning is "reasonably at or greater than" -var LONETILDE = R++; -src[LONETILDE] = '(?:~>?)'; +var LONETILDE = R++ +src[LONETILDE] = '(?:~>?)' -var TILDETRIM = R++; -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); -var tildeTrimReplace = '$1~'; +var TILDETRIM = R++ +src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' +re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') +var tildeTrimReplace = '$1~' -var TILDE = R++; -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; -var TILDELOOSE = R++; -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; +var TILDE = R++ +src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' +var TILDELOOSE = R++ +src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' // Caret ranges. // Meaning is "at least and backwards compatible with" -var LONECARET = R++; -src[LONECARET] = '(?:\\^)'; +var LONECARET = R++ +src[LONECARET] = '(?:\\^)' -var CARETTRIM = R++; -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); -var caretTrimReplace = '$1^'; +var CARETTRIM = R++ +src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' +re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') +var caretTrimReplace = '$1^' -var CARET = R++; -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; -var CARETLOOSE = R++; -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; +var CARET = R++ +src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' +var CARETLOOSE = R++ +src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' // A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++; -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; -var COMPARATOR = R++; -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; - +var COMPARATORLOOSE = R++ +src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' +var COMPARATOR = R++ +src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' // An expression to strip any whitespace between the gtlt and the thing // it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++; +var COMPARATORTRIM = R++ src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' // this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); -var comparatorTrimReplace = '$1$2$3'; - +re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') +var comparatorTrimReplace = '$1$2$3' // Something like `1.2.3 - 1.2.4` // Note that these all use the loose form, because they'll be // checked against either the strict or loose comparator form // later. -var HYPHENRANGE = R++; +var HYPHENRANGE = R++ src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + '\\s+-\\s+' + '(' + src[XRANGEPLAIN] + ')' + - '\\s*$'; + '\\s*$' -var HYPHENRANGELOOSE = R++; +var HYPHENRANGELOOSE = R++ src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + '\\s+-\\s+' + '(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s*$'; + '\\s*$' // Star ranges basically just allow anything at all. -var STAR = R++; -src[STAR] = '(<|>)?=?\\s*\\*'; +var STAR = R++ +src[STAR] = '(<|>)?=?\\s*\\*' // Compile to actual regexp objects. // All are flag-free, unless they were created above with a flag. for (var i = 0; i < R; i++) { - debug(i, src[i]); - if (!re[i]) - re[i] = new RegExp(src[i]); + debug(i, src[i]) + if (!re[i]) { + re[i] = new RegExp(src[i]) + } } -exports.parse = parse; -function parse(version, options) { - if (!options || typeof options !== 'object') - options = { loose: !!options, includePrerelease: false } +exports.parse = parse +function parse (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } - if (version instanceof SemVer) - return version; + if (version instanceof SemVer) { + return version + } - if (typeof version !== 'string') - return null; + if (typeof version !== 'string') { + return null + } - if (version.length > MAX_LENGTH) - return null; + if (version.length > MAX_LENGTH) { + return null + } - var r = options.loose ? re[LOOSE] : re[FULL]; - if (!r.test(version)) - return null; + var r = options.loose ? re[LOOSE] : re[FULL] + if (!r.test(version)) { + return null + } try { - return new SemVer(version, options); + return new SemVer(version, options) } catch (er) { - return null; + return null } } -exports.valid = valid; -function valid(version, options) { - var v = parse(version, options); - return v ? v.version : null; +exports.valid = valid +function valid (version, options) { + var v = parse(version, options) + return v ? v.version : null } - -exports.clean = clean; -function clean(version, options) { - var s = parse(version.trim().replace(/^[=v]+/, ''), options); - return s ? s.version : null; +exports.clean = clean +function clean (version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null } -exports.SemVer = SemVer; +exports.SemVer = SemVer -function SemVer(version, options) { - if (!options || typeof options !== 'object') - options = { loose: !!options, includePrerelease: false } +function SemVer (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } if (version instanceof SemVer) { - if (version.loose === options.loose) - return version; - else - version = version.version; + if (version.loose === options.loose) { + return version + } else { + version = version.version + } } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version); + throw new TypeError('Invalid Version: ' + version) } - if (version.length > MAX_LENGTH) + if (version.length > MAX_LENGTH) { throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + } - if (!(this instanceof SemVer)) - return new SemVer(version, options); + if (!(this instanceof SemVer)) { + return new SemVer(version, options) + } - debug('SemVer', version, options); - this.options = options; - this.loose = !!options.loose; + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose - var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]); + var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]) - if (!m) - throw new TypeError('Invalid Version: ' + version); + if (!m) { + throw new TypeError('Invalid Version: ' + version) + } - this.raw = version; + this.raw = version // these are actually numbers - this.major = +m[1]; - this.minor = +m[2]; - this.patch = +m[3]; + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] - if (this.major > MAX_SAFE_INTEGER || this.major < 0) + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { throw new TypeError('Invalid major version') + } - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { throw new TypeError('Invalid minor version') + } - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { throw new TypeError('Invalid patch version') + } // numberify any prerelease numeric ids - if (!m[4]) - this.prerelease = []; - else - this.prerelease = m[4].split('.').map(function(id) { + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map(function (id) { if (/^[0-9]+$/.test(id)) { - var num = +id; - if (num >= 0 && num < MAX_SAFE_INTEGER) - return num; + var num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } } - return id; - }); + return id + }) + } - this.build = m[5] ? m[5].split('.') : []; - this.format(); + this.build = m[5] ? m[5].split('.') : [] + this.format() } -SemVer.prototype.format = function() { - this.version = this.major + '.' + this.minor + '.' + this.patch; - if (this.prerelease.length) - this.version += '-' + this.prerelease.join('.'); - return this.version; -}; +SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch + if (this.prerelease.length) { + this.version += '-' + this.prerelease.join('.') + } + return this.version +} -SemVer.prototype.toString = function() { - return this.version; -}; +SemVer.prototype.toString = function () { + return this.version +} -SemVer.prototype.compare = function(other) { - debug('SemVer.compare', this.version, this.options, other); - if (!(other instanceof SemVer)) - other = new SemVer(other, this.options); +SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } - return this.compareMain(other) || this.comparePre(other); -}; + return this.compareMain(other) || this.comparePre(other) +} -SemVer.prototype.compareMain = function(other) { - if (!(other instanceof SemVer)) - other = new SemVer(other, this.options); +SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch); -}; + compareIdentifiers(this.patch, other.patch) +} -SemVer.prototype.comparePre = function(other) { - if (!(other instanceof SemVer)) - other = new SemVer(other, this.options); +SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) - return -1; - else if (!this.prerelease.length && other.prerelease.length) - return 1; - else if (!this.prerelease.length && !other.prerelease.length) - return 0; - - var i = 0; + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + + var i = 0 do { - var a = this.prerelease[i]; - var b = other.prerelease[i]; - debug('prerelease compare', i, a, b); - if (a === undefined && b === undefined) - return 0; - else if (b === undefined) - return 1; - else if (a === undefined) - return -1; - else if (a === b) - continue; - else - return compareIdentifiers(a, b); - } while (++i); -}; + var a = this.prerelease[i] + var b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} // preminor will bump the version up to the next minor release, and immediately // down to pre-release. premajor and prepatch work the same way. -SemVer.prototype.inc = function(release, identifier) { +SemVer.prototype.inc = function (release, identifier) { switch (release) { case 'premajor': - this.prerelease.length = 0; - this.patch = 0; - this.minor = 0; - this.major++; - this.inc('pre', identifier); - break; + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier) + break case 'preminor': - this.prerelease.length = 0; - this.patch = 0; - this.minor++; - this.inc('pre', identifier); - break; + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier) + break case 'prepatch': // If this is already a prerelease, it will bump to the next version // drop any prereleases that might already exist, since they are not // relevant at this point. - this.prerelease.length = 0; - this.inc('patch', identifier); - this.inc('pre', identifier); - break; + this.prerelease.length = 0 + this.inc('patch', identifier) + this.inc('pre', identifier) + break // If the input is a non-prerelease version, this acts the same as // prepatch. case 'prerelease': - if (this.prerelease.length === 0) - this.inc('patch', identifier); - this.inc('pre', identifier); - break; + if (this.prerelease.length === 0) { + this.inc('patch', identifier) + } + this.inc('pre', identifier) + break case 'major': // If this is a pre-major version, bump up to the same major version. // Otherwise increment major. // 1.0.0-5 bumps to 1.0.0 // 1.1.0 bumps to 2.0.0 - if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) - this.major++; - this.minor = 0; - this.patch = 0; - this.prerelease = []; - break; + if (this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break case 'minor': // If this is a pre-minor version, bump up to the same minor version. // Otherwise increment minor. // 1.2.0-5 bumps to 1.2.0 // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) - this.minor++; - this.patch = 0; - this.prerelease = []; - break; + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break case 'patch': // If this is not a pre-release version, it will increment the patch. // If it is a pre-release it will bump up to the same patch version. // 1.2.0-5 patches to 1.2.0 // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) - this.patch++; - this.prerelease = []; - break; + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break // This probably shouldn't be used publicly. // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. case 'pre': - if (this.prerelease.length === 0) - this.prerelease = [0]; - else { - var i = this.prerelease.length; + if (this.prerelease.length === 0) { + this.prerelease = [0] + } else { + var i = this.prerelease.length while (--i >= 0) { if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++; - i = -2; + this.prerelease[i]++ + i = -2 } } - if (i === -1) // didn't increment anything - this.prerelease.push(0); + if (i === -1) { + // didn't increment anything + this.prerelease.push(0) + } } if (identifier) { // 1.2.0-beta.1 bumps to 1.2.0-beta.2, // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) - this.prerelease = [identifier, 0]; - } else - this.prerelease = [identifier, 0]; + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0] + } + } else { + this.prerelease = [identifier, 0] + } } - break; + break default: - throw new Error('invalid increment argument: ' + release); + throw new Error('invalid increment argument: ' + release) } - this.format(); - this.raw = this.version; - return this; -}; + this.format() + this.raw = this.version + return this +} -exports.inc = inc; -function inc(version, release, loose, identifier) { - if (typeof(loose) === 'string') { - identifier = loose; - loose = undefined; +exports.inc = inc +function inc (version, release, loose, identifier) { + if (typeof (loose) === 'string') { + identifier = loose + loose = undefined } try { - return new SemVer(version, loose).inc(release, identifier).version; + return new SemVer(version, loose).inc(release, identifier).version } catch (er) { - return null; + return null } } -exports.diff = diff; -function diff(version1, version2) { +exports.diff = diff +function diff (version1, version2) { if (eq(version1, version2)) { - return null; + return null } else { - var v1 = parse(version1); - var v2 = parse(version2); + var v1 = parse(version1) + var v2 = parse(version2) + var prefix = '' if (v1.prerelease.length || v2.prerelease.length) { - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return 'pre'+key; - } - } - } - return 'prerelease'; + prefix = 'pre' + var defaultResult = 'prerelease' } for (var key in v1) { if (key === 'major' || key === 'minor' || key === 'patch') { if (v1[key] !== v2[key]) { - return key; + return prefix + key } } } + return defaultResult // may be undefined } } -exports.compareIdentifiers = compareIdentifiers; +exports.compareIdentifiers = compareIdentifiers -var numeric = /^[0-9]+$/; -function compareIdentifiers(a, b) { - var anum = numeric.test(a); - var bnum = numeric.test(b); +var numeric = /^[0-9]+$/ +function compareIdentifiers (a, b) { + var anum = numeric.test(a) + var bnum = numeric.test(b) if (anum && bnum) { - a = +a; - b = +b; + a = +a + b = +b } - return (anum && !bnum) ? -1 : - (bnum && !anum) ? 1 : - a < b ? -1 : - a > b ? 1 : - 0; + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 } -exports.rcompareIdentifiers = rcompareIdentifiers; -function rcompareIdentifiers(a, b) { - return compareIdentifiers(b, a); +exports.rcompareIdentifiers = rcompareIdentifiers +function rcompareIdentifiers (a, b) { + return compareIdentifiers(b, a) } -exports.major = major; -function major(a, loose) { - return new SemVer(a, loose).major; +exports.major = major +function major (a, loose) { + return new SemVer(a, loose).major } -exports.minor = minor; -function minor(a, loose) { - return new SemVer(a, loose).minor; +exports.minor = minor +function minor (a, loose) { + return new SemVer(a, loose).minor } -exports.patch = patch; -function patch(a, loose) { - return new SemVer(a, loose).patch; +exports.patch = patch +function patch (a, loose) { + return new SemVer(a, loose).patch } -exports.compare = compare; -function compare(a, b, loose) { - return new SemVer(a, loose).compare(new SemVer(b, loose)); +exports.compare = compare +function compare (a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)) } -exports.compareLoose = compareLoose; -function compareLoose(a, b) { - return compare(a, b, true); +exports.compareLoose = compareLoose +function compareLoose (a, b) { + return compare(a, b, true) } -exports.rcompare = rcompare; -function rcompare(a, b, loose) { - return compare(b, a, loose); +exports.rcompare = rcompare +function rcompare (a, b, loose) { + return compare(b, a, loose) } -exports.sort = sort; -function sort(list, loose) { - return list.sort(function(a, b) { - return exports.compare(a, b, loose); - }); +exports.sort = sort +function sort (list, loose) { + return list.sort(function (a, b) { + return exports.compare(a, b, loose) + }) } -exports.rsort = rsort; -function rsort(list, loose) { - return list.sort(function(a, b) { - return exports.rcompare(a, b, loose); - }); +exports.rsort = rsort +function rsort (list, loose) { + return list.sort(function (a, b) { + return exports.rcompare(a, b, loose) + }) } -exports.gt = gt; -function gt(a, b, loose) { - return compare(a, b, loose) > 0; +exports.gt = gt +function gt (a, b, loose) { + return compare(a, b, loose) > 0 } -exports.lt = lt; -function lt(a, b, loose) { - return compare(a, b, loose) < 0; +exports.lt = lt +function lt (a, b, loose) { + return compare(a, b, loose) < 0 } -exports.eq = eq; -function eq(a, b, loose) { - return compare(a, b, loose) === 0; +exports.eq = eq +function eq (a, b, loose) { + return compare(a, b, loose) === 0 } -exports.neq = neq; -function neq(a, b, loose) { - return compare(a, b, loose) !== 0; +exports.neq = neq +function neq (a, b, loose) { + return compare(a, b, loose) !== 0 } -exports.gte = gte; -function gte(a, b, loose) { - return compare(a, b, loose) >= 0; +exports.gte = gte +function gte (a, b, loose) { + return compare(a, b, loose) >= 0 } -exports.lte = lte; -function lte(a, b, loose) { - return compare(a, b, loose) <= 0; +exports.lte = lte +function lte (a, b, loose) { + return compare(a, b, loose) <= 0 } -exports.cmp = cmp; -function cmp(a, op, b, loose) { - var ret; +exports.cmp = cmp +function cmp (a, op, b, loose) { switch (op) { case '===': - if (typeof a === 'object') a = a.version; - if (typeof b === 'object') b = b.version; - ret = a === b; - break; + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a === b + case '!==': - if (typeof a === 'object') a = a.version; - if (typeof b === 'object') b = b.version; - ret = a !== b; - break; - case '': case '=': case '==': ret = eq(a, b, loose); break; - case '!=': ret = neq(a, b, loose); break; - case '>': ret = gt(a, b, loose); break; - case '>=': ret = gte(a, b, loose); break; - case '<': ret = lt(a, b, loose); break; - case '<=': ret = lte(a, b, loose); break; - default: throw new TypeError('Invalid operator: ' + op); - } - return ret; -} - -exports.Comparator = Comparator; -function Comparator(comp, options) { - if (!options || typeof options !== 'object') - options = { loose: !!options, includePrerelease: false } + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError('Invalid operator: ' + op) + } +} + +exports.Comparator = Comparator +function Comparator (comp, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) - return comp; - else - comp = comp.value; + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } } - if (!(this instanceof Comparator)) - return new Comparator(comp, options); + if (!(this instanceof Comparator)) { + return new Comparator(comp, options) + } - debug('comparator', comp, options); - this.options = options; - this.loose = !!options.loose; - this.parse(comp); + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) - if (this.semver === ANY) - this.value = ''; - else - this.value = this.operator + this.semver.version; + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } - debug('comp', this); + debug('comp', this) } -var ANY = {}; -Comparator.prototype.parse = function(comp) { - var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; - var m = comp.match(r); +var ANY = {} +Comparator.prototype.parse = function (comp) { + var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR] + var m = comp.match(r) - if (!m) - throw new TypeError('Invalid comparator: ' + comp); + if (!m) { + throw new TypeError('Invalid comparator: ' + comp) + } - this.operator = m[1]; - if (this.operator === '=') - this.operator = ''; + this.operator = m[1] + if (this.operator === '=') { + this.operator = '' + } // if it literally is just '>' or '' then allow anything. - if (!m[2]) - this.semver = ANY; - else - this.semver = new SemVer(m[2], this.options.loose); -}; + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } +} -Comparator.prototype.toString = function() { - return this.value; -}; +Comparator.prototype.toString = function () { + return this.value +} -Comparator.prototype.test = function(version) { - debug('Comparator.test', version, this.options.loose); +Comparator.prototype.test = function (version) { + debug('Comparator.test', version, this.options.loose) - if (this.semver === ANY) - return true; + if (this.semver === ANY) { + return true + } - if (typeof version === 'string') - version = new SemVer(version, this.options); + if (typeof version === 'string') { + version = new SemVer(version, this.options) + } - return cmp(version, this.operator, this.semver, this.options); -}; + return cmp(version, this.operator, this.semver, this.options) +} -Comparator.prototype.intersects = function(comp, options) { +Comparator.prototype.intersects = function (comp, options) { if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required'); + throw new TypeError('a Comparator is required') } - if (!options || typeof options !== 'object') - options = { loose: !!options, includePrerelease: false } + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } - var rangeTmp; + var rangeTmp if (this.operator === '') { - rangeTmp = new Range(comp.value, options); - return satisfies(this.value, rangeTmp, options); + rangeTmp = new Range(comp.value, options) + return satisfies(this.value, rangeTmp, options) } else if (comp.operator === '') { - rangeTmp = new Range(this.value, options); - return satisfies(comp.semver, rangeTmp, options); + rangeTmp = new Range(this.value, options) + return satisfies(comp.semver, rangeTmp, options) } var sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>'); + (comp.operator === '>=' || comp.operator === '>') var sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<'); - var sameSemVer = this.semver.version === comp.semver.version; + (comp.operator === '<=' || comp.operator === '<') + var sameSemVer = this.semver.version === comp.semver.version var differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<='); + (comp.operator === '>=' || comp.operator === '<=') var oppositeDirectionsLessThan = cmp(this.semver, '<', comp.semver, options) && ((this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<')); + (comp.operator === '<=' || comp.operator === '<')) var oppositeDirectionsGreaterThan = cmp(this.semver, '>', comp.semver, options) && ((this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>')); + (comp.operator === '>=' || comp.operator === '>')) return sameDirectionIncreasing || sameDirectionDecreasing || (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; -}; - + oppositeDirectionsLessThan || oppositeDirectionsGreaterThan +} -exports.Range = Range; -function Range(range, options) { - if (!options || typeof options !== 'object') - options = { loose: !!options, includePrerelease: false } +exports.Range = Range +function Range (range, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } if (range instanceof Range) { if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { - return range; + return range } else { - return new Range(range.raw, options); + return new Range(range.raw, options) } } if (range instanceof Comparator) { - return new Range(range.value, options); + return new Range(range.value, options) } - if (!(this instanceof Range)) - return new Range(range, options); + if (!(this instanceof Range)) { + return new Range(range, options) + } - this.options = options; - this.loose = !!options.loose; + this.options = options + this.loose = !!options.loose this.includePrerelease = !!options.includePrerelease // First, split based on boolean or || - this.raw = range; - this.set = range.split(/\s*\|\|\s*/).map(function(range) { - return this.parseRange(range.trim()); - }, this).filter(function(c) { + this.raw = range + this.set = range.split(/\s*\|\|\s*/).map(function (range) { + return this.parseRange(range.trim()) + }, this).filter(function (c) { // throw out any that are not relevant for whatever reason - return c.length; - }); + return c.length + }) if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + range); + throw new TypeError('Invalid SemVer Range: ' + range) } - this.format(); + this.format() } -Range.prototype.format = function() { - this.range = this.set.map(function(comps) { - return comps.join(' ').trim(); - }).join('||').trim(); - return this.range; -}; +Range.prototype.format = function () { + this.range = this.set.map(function (comps) { + return comps.join(' ').trim() + }).join('||').trim() + return this.range +} -Range.prototype.toString = function() { - return this.range; -}; +Range.prototype.toString = function () { + return this.range +} -Range.prototype.parseRange = function(range) { - var loose = this.options.loose; - range = range.trim(); +Range.prototype.parseRange = function (range) { + var loose = this.options.loose + range = range.trim() // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; - range = range.replace(hr, hyphenReplace); - debug('hyphen replace', range); + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE] + range = range.replace(hr, hyphenReplace) + debug('hyphen replace', range) // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); - debug('comparator trim', range, re[COMPARATORTRIM]); + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, re[COMPARATORTRIM]) // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[TILDETRIM], tildeTrimReplace); + range = range.replace(re[TILDETRIM], tildeTrimReplace) // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[CARETTRIM], caretTrimReplace); + range = range.replace(re[CARETTRIM], caretTrimReplace) // normalize spaces - range = range.split(/\s+/).join(' '); + range = range.split(/\s+/).join(' ') // At this point, the range is completely trimmed and // ready to be split into comparators. - var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; - var set = range.split(' ').map(function(comp) { - return parseComparator(comp, this.options); - }, this).join(' ').split(/\s+/); + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR] + var set = range.split(' ').map(function (comp) { + return parseComparator(comp, this.options) + }, this).join(' ').split(/\s+/) if (this.options.loose) { // in loose mode, throw out any that are not valid comparators - set = set.filter(function(comp) { - return !!comp.match(compRe); - }); + set = set.filter(function (comp) { + return !!comp.match(compRe) + }) } - set = set.map(function(comp) { - return new Comparator(comp, this.options); - }, this); + set = set.map(function (comp) { + return new Comparator(comp, this.options) + }, this) - return set; -}; + return set +} -Range.prototype.intersects = function(range, options) { +Range.prototype.intersects = function (range, options) { if (!(range instanceof Range)) { - throw new TypeError('a Range is required'); + throw new TypeError('a Range is required') } - return this.set.some(function(thisComparators) { - return thisComparators.every(function(thisComparator) { - return range.set.some(function(rangeComparators) { - return rangeComparators.every(function(rangeComparator) { - return thisComparator.intersects(rangeComparator, options); - }); - }); - }); - }); -}; + return this.set.some(function (thisComparators) { + return thisComparators.every(function (thisComparator) { + return range.set.some(function (rangeComparators) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options) + }) + }) + }) + }) +} // Mostly just for testing and legacy API reasons -exports.toComparators = toComparators; -function toComparators(range, options) { - return new Range(range, options).set.map(function(comp) { - return comp.map(function(c) { - return c.value; - }).join(' ').trim().split(' '); - }); +exports.toComparators = toComparators +function toComparators (range, options) { + return new Range(range, options).set.map(function (comp) { + return comp.map(function (c) { + return c.value + }).join(' ').trim().split(' ') + }) } // comprised of xranges, tildes, stars, and gtlt's at this point. // already replaced the hyphen ranges // turn into a set of JUST comparators. -function parseComparator(comp, options) { - debug('comp', comp, options); - comp = replaceCarets(comp, options); - debug('caret', comp); - comp = replaceTildes(comp, options); - debug('tildes', comp); - comp = replaceXRanges(comp, options); - debug('xrange', comp); - comp = replaceStars(comp, options); - debug('stars', comp); - return comp; +function parseComparator (comp, options) { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp } -function isX(id) { - return !id || id.toLowerCase() === 'x' || id === '*'; +function isX (id) { + return !id || id.toLowerCase() === 'x' || id === '*' } // ~, ~> --> * (any, kinda silly) @@ -914,41 +980,38 @@ function isX(id) { // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes(comp, options) { - return comp.trim().split(/\s+/).map(function(comp) { - return replaceTilde(comp, options); - }).join(' '); -} - -function replaceTilde(comp, options) { - if (!options || typeof options !== 'object') - options = { loose: !!options, includePrerelease: false } - var r = options.loose ? re[TILDELOOSE] : re[TILDE]; - return comp.replace(r, function(_, M, m, p, pr) { - debug('tilde', comp, _, M, m, p, pr); - var ret; - - if (isX(M)) - ret = ''; - else if (isX(m)) - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; - else if (isX(p)) +function replaceTildes (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, options) + }).join(' ') +} + +function replaceTilde (comp, options) { + var r = options.loose ? re[TILDELOOSE] : re[TILDE] + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { // ~1.2 == >=1.2.0 <1.3.0 - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; - else if (pr) { - debug('replaceTilde pr', pr); - if (pr.charAt(0) !== '-') - pr = '-' + pr; - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + (+m + 1) + '.0'; - } else + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else if (pr) { + debug('replaceTilde pr', pr) + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } else { // ~1.2.3 == >=1.2.3 <1.3.0 ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0'; + ' <' + M + '.' + (+m + 1) + '.0' + } - debug('tilde return', ret); - return ret; - }); + debug('tilde return', ret) + return ret + }) } // ^ --> * (any, kinda silly) @@ -957,142 +1020,144 @@ function replaceTilde(comp, options) { // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 // ^1.2.3 --> >=1.2.3 <2.0.0 // ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets(comp, options) { - return comp.trim().split(/\s+/).map(function(comp) { - return replaceCaret(comp, options); - }).join(' '); -} - -function replaceCaret(comp, options) { - debug('caret', comp, options); - if (!options || typeof options !== 'object') - options = { loose: !!options, includePrerelease: false } - var r = options.loose ? re[CARETLOOSE] : re[CARET]; - return comp.replace(r, function(_, M, m, p, pr) { - debug('caret', comp, _, M, m, p, pr); - var ret; - - if (isX(M)) - ret = ''; - else if (isX(m)) - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; - else if (isX(p)) { - if (M === '0') - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; - else - ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'; +function replaceCarets (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, options) + }).join(' ') +} + +function replaceCaret (comp, options) { + debug('caret', comp, options) + var r = options.loose ? re[CARETLOOSE] : re[CARET] + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + if (M === '0') { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else { + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' + } } else if (pr) { - debug('replaceCaret pr', pr); - if (pr.charAt(0) !== '-') - pr = '-' + pr; + debug('replaceCaret pr', pr) if (M === '0') { - if (m === '0') - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + m + '.' + (+p + 1); - else - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + (+m + 1) + '.0'; - } else - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + (+M + 1) + '.0.0'; + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + (+M + 1) + '.0.0' + } } else { - debug('no pr'); + debug('no pr') if (M === '0') { - if (m === '0') + if (m === '0') { ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + m + '.' + (+p + 1); - else + ' <' + M + '.' + m + '.' + (+p + 1) + } else { ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0'; - } else + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { ret = '>=' + M + '.' + m + '.' + p + - ' <' + (+M + 1) + '.0.0'; + ' <' + (+M + 1) + '.0.0' + } } - debug('caret return', ret); - return ret; - }); + debug('caret return', ret) + return ret + }) } -function replaceXRanges(comp, options) { - debug('replaceXRanges', comp, options); - return comp.split(/\s+/).map(function(comp) { - return replaceXRange(comp, options); - }).join(' '); +function replaceXRanges (comp, options) { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, options) + }).join(' ') } -function replaceXRange(comp, options) { - comp = comp.trim(); - if (!options || typeof options !== 'object') - options = { loose: !!options, includePrerelease: false } - var r = options.loose ? re[XRANGELOOSE] : re[XRANGE]; - return comp.replace(r, function(ret, gtlt, M, m, p, pr) { - debug('xRange', comp, ret, gtlt, M, m, p, pr); - var xM = isX(M); - var xm = xM || isX(m); - var xp = xm || isX(p); - var anyX = xp; - - if (gtlt === '=' && anyX) - gtlt = ''; +function replaceXRange (comp, options) { + comp = comp.trim() + var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + var xM = isX(M) + var xm = xM || isX(m) + var xp = xm || isX(p) + var anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } if (xM) { if (gtlt === '>' || gtlt === '<') { // nothing is allowed - ret = '<0.0.0'; + ret = '<0.0.0' } else { // nothing is forbidden - ret = '*'; + ret = '*' } } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. // replace X with 0 - if (xm) - m = 0; - if (xp) - p = 0; + if (xm) { + m = 0 + } + p = 0 if (gtlt === '>') { // >1 => >=2.0.0 // >1.2 => >=1.3.0 // >1.2.3 => >= 1.2.4 - gtlt = '>='; + gtlt = '>=' if (xm) { - M = +M + 1; - m = 0; - p = 0; - } else if (xp) { - m = +m + 1; - p = 0; + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 } } else if (gtlt === '<=') { // <=0.7.x is actually <0.8.0, since any 0.7.x should // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<'; - if (xm) - M = +M + 1; - else - m = +m + 1; + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } } - ret = gtlt + M + '.' + m + '.' + p; + ret = gtlt + M + '.' + m + '.' + p } else if (xm) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' } else if (xp) { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' } - debug('xRange return', ret); + debug('xRange return', ret) - return ret; - }); + return ret + }) } // Because * is AND-ed with everything else in the comparator, // and '' means "any version", just remove the *s entirely. -function replaceStars(comp, options) { - debug('replaceStars', comp, options); +function replaceStars (comp, options) { + debug('replaceStars', comp, options) // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[STAR], ''); + return comp.trim().replace(re[STAR], '') } // This function is passed to string.replace(re[HYPHENRANGE]) @@ -1100,253 +1165,319 @@ function replaceStars(comp, options) { // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 // 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do // 1.2 - 3.4 => >=1.2.0 <3.5.0 -function hyphenReplace($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - - if (isX(fM)) - from = ''; - else if (isX(fm)) - from = '>=' + fM + '.0.0'; - else if (isX(fp)) - from = '>=' + fM + '.' + fm + '.0'; - else - from = '>=' + from; - - if (isX(tM)) - to = ''; - else if (isX(tm)) - to = '<' + (+tM + 1) + '.0.0'; - else if (isX(tp)) - to = '<' + tM + '.' + (+tm + 1) + '.0'; - else if (tpr) - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr; - else - to = '<=' + to; - - return (from + ' ' + to).trim(); -} +function hyphenReplace ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = '>=' + fM + '.0.0' + } else if (isX(fp)) { + from = '>=' + fM + '.' + fm + '.0' + } else { + from = '>=' + from + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = '<' + (+tM + 1) + '.0.0' + } else if (isX(tp)) { + to = '<' + tM + '.' + (+tm + 1) + '.0' + } else if (tpr) { + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr + } else { + to = '<=' + to + } + return (from + ' ' + to).trim() +} // if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function(version) { - if (!version) - return false; +Range.prototype.test = function (version) { + if (!version) { + return false + } - if (typeof version === 'string') - version = new SemVer(version, this.options); + if (typeof version === 'string') { + version = new SemVer(version, this.options) + } for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) - return true; + if (testSet(this.set[i], version, this.options)) { + return true + } } - return false; -}; + return false +} -function testSet(set, version, options) { +function testSet (set, version, options) { for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) - return false; + if (!set[i].test(version)) { + return false + } } - if (!options) - options = {} - if (version.prerelease.length && !options.includePrerelease) { // Find the set of versions that are allowed to have prereleases // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 // That should allow `1.2.3-pr.2` to pass. // However, `1.2.4-alpha.notready` should NOT be allowed, // even though it's within the range set by the comparators. - for (var i = 0; i < set.length; i++) { - debug(set[i].semver); - if (set[i].semver === ANY) - continue; + for (i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === ANY) { + continue + } if (set[i].semver.prerelease.length > 0) { - var allowed = set[i].semver; + var allowed = set[i].semver if (allowed.major === version.major && allowed.minor === version.minor && - allowed.patch === version.patch) - return true; + allowed.patch === version.patch) { + return true + } } } // Version has a -pre, but it's not one of the ones we like. - return false; + return false } - return true; + return true } -exports.satisfies = satisfies; -function satisfies(version, range, options) { +exports.satisfies = satisfies +function satisfies (version, range, options) { try { - range = new Range(range, options); + range = new Range(range, options) } catch (er) { - return false; + return false } - return range.test(version); + return range.test(version) } -exports.maxSatisfying = maxSatisfying; -function maxSatisfying(versions, range, options) { - var max = null; - var maxSV = null; +exports.maxSatisfying = maxSatisfying +function maxSatisfying (versions, range, options) { + var max = null + var maxSV = null try { - var rangeObj = new Range(range, options); + var rangeObj = new Range(range, options) } catch (er) { - return null; + return null } versions.forEach(function (v) { - if (rangeObj.test(v)) { // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { // compare(max, v, true) - max = v; - maxSV = new SemVer(max, options); + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) } } }) - return max; + return max } -exports.minSatisfying = minSatisfying; -function minSatisfying(versions, range, options) { - var min = null; - var minSV = null; +exports.minSatisfying = minSatisfying +function minSatisfying (versions, range, options) { + var min = null + var minSV = null try { - var rangeObj = new Range(range, options); + var rangeObj = new Range(range, options) } catch (er) { - return null; + return null } versions.forEach(function (v) { - if (rangeObj.test(v)) { // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { // compare(min, v, true) - min = v; - minSV = new SemVer(min, options); + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) } } }) - return min; + return min } -exports.validRange = validRange; -function validRange(range, options) { +exports.minVersion = minVersion +function minVersion (range, loose) { + range = new Range(range, loose) + + var minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + comparators.forEach(function (comparator) { + // Clone to avoid manipulating the comparator's semver object. + var compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!minver || gt(minver, compver)) { + minver = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error('Unexpected operation: ' + comparator.operator) + } + }) + } + + if (minver && range.test(minver)) { + return minver + } + + return null +} + +exports.validRange = validRange +function validRange (range, options) { try { // Return '*' instead of '' so that truthiness works. // This will throw if it's invalid anyway - return new Range(range, options).range || '*'; + return new Range(range, options).range || '*' } catch (er) { - return null; + return null } } // Determine if version is less than all the versions possible in the range -exports.ltr = ltr; -function ltr(version, range, options) { - return outside(version, range, '<', options); +exports.ltr = ltr +function ltr (version, range, options) { + return outside(version, range, '<', options) } // Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr; -function gtr(version, range, options) { - return outside(version, range, '>', options); +exports.gtr = gtr +function gtr (version, range, options) { + return outside(version, range, '>', options) } -exports.outside = outside; -function outside(version, range, hilo, options) { - version = new SemVer(version, options); - range = new Range(range, options); +exports.outside = outside +function outside (version, range, hilo, options) { + version = new SemVer(version, options) + range = new Range(range, options) - var gtfn, ltefn, ltfn, comp, ecomp; + var gtfn, ltefn, ltfn, comp, ecomp switch (hilo) { case '>': - gtfn = gt; - ltefn = lte; - ltfn = lt; - comp = '>'; - ecomp = '>='; - break; + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break case '<': - gtfn = lt; - ltefn = gte; - ltfn = gt; - comp = '<'; - ecomp = '<='; - break; + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break default: - throw new TypeError('Must provide a hilo val of "<" or ">"'); + throw new TypeError('Must provide a hilo val of "<" or ">"') } // If it satisifes the range it is not outside if (satisfies(version, range, options)) { - return false; + return false } // From now on, variable terms are as if we're in "gtr" mode. // but note that everything is flipped for the "ltr" function. for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i]; + var comparators = range.set[i] - var high = null; - var low = null; + var high = null + var low = null - comparators.forEach(function(comparator) { + comparators.forEach(function (comparator) { if (comparator.semver === ANY) { comparator = new Comparator('>=0.0.0') } - high = high || comparator; - low = low || comparator; + high = high || comparator + low = low || comparator if (gtfn(comparator.semver, high.semver, options)) { - high = comparator; + high = comparator } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator; + low = comparator } - }); + }) // If the edge version comparator has a operator then our version // isn't outside it if (high.operator === comp || high.operator === ecomp) { - return false; + return false } // If the lowest version comparator has an operator and our version // is less than it then it isn't higher than the range if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) { - return false; + return false } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false; + return false } } - return true; + return true } -exports.prerelease = prerelease; -function prerelease(version, options) { - var parsed = parse(version, options); - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null; +exports.prerelease = prerelease +function prerelease (version, options) { + var parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null } -exports.intersects = intersects; -function intersects(r1, r2, options) { +exports.intersects = intersects +function intersects (r1, r2, options) { r1 = new Range(r1, options) r2 = new Range(r2, options) return r1.intersects(r2) } -exports.coerce = coerce; -function coerce(version) { - if (version instanceof SemVer) - return version; +exports.coerce = coerce +function coerce (version) { + if (version instanceof SemVer) { + return version + } - if (typeof version !== 'string') - return null; + if (typeof version !== 'string') { + return null + } - var match = version.match(re[COERCE]); + var match = version.match(re[COERCE]) - if (match == null) - return null; + if (match == null) { + return null + } - return parse((match[1] || '0') + '.' + (match[2] || '0') + '.' + (match[3] || '0')); + return parse(match[1] + + '.' + (match[2] || '0') + + '.' + (match[3] || '0')) } diff --git a/deps/npm/node_modules/smart-buffer/.prettierrc.yaml b/deps/npm/node_modules/smart-buffer/.prettierrc.yaml new file mode 100644 index 00000000000000..9a4f5ed754dd24 --- /dev/null +++ b/deps/npm/node_modules/smart-buffer/.prettierrc.yaml @@ -0,0 +1,5 @@ +parser: typescript +printWidth: 120 +tabWidth: 2 +singleQuote: true +trailingComma: none \ No newline at end of file diff --git a/deps/npm/node_modules/smart-buffer/build/smartbuffer.js b/deps/npm/node_modules/smart-buffer/build/smartbuffer.js index 3e1b95f308c84a..b1fcead2aa2bc4 100644 --- a/deps/npm/node_modules/smart-buffer/build/smartbuffer.js +++ b/deps/npm/node_modules/smart-buffer/build/smartbuffer.js @@ -7,10 +7,10 @@ const DEFAULT_SMARTBUFFER_SIZE = 4096; const DEFAULT_SMARTBUFFER_ENCODING = 'utf8'; class SmartBuffer { /** - * Creates a new SmartBuffer instance. - * - * @param options { SmartBufferOptions } The SmartBufferOptions to apply to this instance. - */ + * Creates a new SmartBuffer instance. + * + * @param options { SmartBufferOptions } The SmartBufferOptions to apply to this instance. + */ constructor(options) { this.length = 0; this._encoding = DEFAULT_SMARTBUFFER_ENCODING; @@ -55,13 +55,13 @@ class SmartBuffer { } } /** - * Creates a new SmartBuffer instance with the provided internal Buffer size and optional encoding. - * - * @param size { Number } The size of the internal Buffer. - * @param encoding { String } The BufferEncoding to use for strings. - * - * @return { SmartBuffer } - */ + * Creates a new SmartBuffer instance with the provided internal Buffer size and optional encoding. + * + * @param size { Number } The size of the internal Buffer. + * @param encoding { String } The BufferEncoding to use for strings. + * + * @return { SmartBuffer } + */ static fromSize(size, encoding) { return new this({ size: size, @@ -69,13 +69,13 @@ class SmartBuffer { }); } /** - * Creates a new SmartBuffer instance with the provided Buffer and optional encoding. - * - * @param buffer { Buffer } The Buffer to use as the internal Buffer value. - * @param encoding { String } The BufferEncoding to use for strings. - * - * @return { SmartBuffer } - */ + * Creates a new SmartBuffer instance with the provided Buffer and optional encoding. + * + * @param buffer { Buffer } The Buffer to use as the internal Buffer value. + * @param encoding { String } The BufferEncoding to use for strings. + * + * @return { SmartBuffer } + */ static fromBuffer(buff, encoding) { return new this({ buff: buff, @@ -83,496 +83,470 @@ class SmartBuffer { }); } /** - * Creates a new SmartBuffer instance with the provided SmartBufferOptions options. - * - * @param options { SmartBufferOptions } The options to use when creating the SmartBuffer instance. - */ + * Creates a new SmartBuffer instance with the provided SmartBufferOptions options. + * + * @param options { SmartBufferOptions } The options to use when creating the SmartBuffer instance. + */ static fromOptions(options) { return new this(options); } /** - * Type checking function that determines if an object is a SmartBufferOptions object. - */ + * Type checking function that determines if an object is a SmartBufferOptions object. + */ static isSmartBufferOptions(options) { const castOptions = options; - return castOptions && (castOptions.encoding !== undefined || castOptions.size !== undefined || castOptions.buff !== undefined); + return (castOptions && + (castOptions.encoding !== undefined || castOptions.size !== undefined || castOptions.buff !== undefined)); } // Signed integers /** - * Reads an Int8 value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an Int8 value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readInt8(offset) { return this._readNumberValue(Buffer.prototype.readInt8, 1, offset); } /** - * Reads an Int16BE value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an Int16BE value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readInt16BE(offset) { return this._readNumberValue(Buffer.prototype.readInt16BE, 2, offset); } /** - * Reads an Int16LE value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an Int16LE value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readInt16LE(offset) { return this._readNumberValue(Buffer.prototype.readInt16LE, 2, offset); } /** - * Reads an Int32BE value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an Int32BE value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readInt32BE(offset) { return this._readNumberValue(Buffer.prototype.readInt32BE, 4, offset); } /** - * Reads an Int32LE value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an Int32LE value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readInt32LE(offset) { return this._readNumberValue(Buffer.prototype.readInt32LE, 4, offset); } /** - * Writes an Int8 value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes an Int8 value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeInt8(value, offset) { this._writeNumberValue(Buffer.prototype.writeInt8, 1, value, offset); return this; } /** - * Inserts an Int8 value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts an Int8 value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertInt8(value, offset) { - this._insertNumberValue(Buffer.prototype.writeInt8, 1, value, offset); - return this; + return this._insertNumberValue(Buffer.prototype.writeInt8, 1, value, offset); } /** - * Writes an Int16BE value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes an Int16BE value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeInt16BE(value, offset) { - this._writeNumberValue(Buffer.prototype.writeInt16BE, 2, value, offset); - return this; + return this._writeNumberValue(Buffer.prototype.writeInt16BE, 2, value, offset); } /** - * Inserts an Int16BE value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts an Int16BE value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertInt16BE(value, offset) { - this._insertNumberValue(Buffer.prototype.writeInt16BE, 2, value, offset); - return this; + return this._insertNumberValue(Buffer.prototype.writeInt16BE, 2, value, offset); } /** - * Writes an Int16LE value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes an Int16LE value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeInt16LE(value, offset) { - this._writeNumberValue(Buffer.prototype.writeInt16LE, 2, value, offset); - return this; + return this._writeNumberValue(Buffer.prototype.writeInt16LE, 2, value, offset); } /** - * Inserts an Int16LE value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts an Int16LE value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertInt16LE(value, offset) { - this._insertNumberValue(Buffer.prototype.writeInt16LE, 2, value, offset); - return this; + return this._insertNumberValue(Buffer.prototype.writeInt16LE, 2, value, offset); } /** - * Writes an Int32BE value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes an Int32BE value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeInt32BE(value, offset) { - this._writeNumberValue(Buffer.prototype.writeInt32BE, 4, value, offset); - return this; + return this._writeNumberValue(Buffer.prototype.writeInt32BE, 4, value, offset); } /** - * Inserts an Int32BE value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts an Int32BE value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertInt32BE(value, offset) { - this._insertNumberValue(Buffer.prototype.writeInt32BE, 4, value, offset); - return this; + return this._insertNumberValue(Buffer.prototype.writeInt32BE, 4, value, offset); } /** - * Writes an Int32LE value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes an Int32LE value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeInt32LE(value, offset) { - this._writeNumberValue(Buffer.prototype.writeInt32LE, 4, value, offset); - return this; + return this._writeNumberValue(Buffer.prototype.writeInt32LE, 4, value, offset); } /** - * Inserts an Int32LE value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts an Int32LE value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertInt32LE(value, offset) { - this._insertNumberValue(Buffer.prototype.writeInt32LE, 4, value, offset); - return this; + return this._insertNumberValue(Buffer.prototype.writeInt32LE, 4, value, offset); } // Unsigned Integers /** - * Reads an UInt8 value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an UInt8 value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readUInt8(offset) { return this._readNumberValue(Buffer.prototype.readUInt8, 1, offset); } /** - * Reads an UInt16BE value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an UInt16BE value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readUInt16BE(offset) { return this._readNumberValue(Buffer.prototype.readUInt16BE, 2, offset); } /** - * Reads an UInt16LE value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an UInt16LE value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readUInt16LE(offset) { return this._readNumberValue(Buffer.prototype.readUInt16LE, 2, offset); } /** - * Reads an UInt32BE value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an UInt32BE value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readUInt32BE(offset) { return this._readNumberValue(Buffer.prototype.readUInt32BE, 4, offset); } /** - * Reads an UInt32LE value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an UInt32LE value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readUInt32LE(offset) { return this._readNumberValue(Buffer.prototype.readUInt32LE, 4, offset); } /** - * Writes an UInt8 value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes an UInt8 value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeUInt8(value, offset) { - this._writeNumberValue(Buffer.prototype.writeUInt8, 1, value, offset); - return this; + return this._writeNumberValue(Buffer.prototype.writeUInt8, 1, value, offset); } /** - * Inserts an UInt8 value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts an UInt8 value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertUInt8(value, offset) { - this._insertNumberValue(Buffer.prototype.writeUInt8, 1, value, offset); - return this; + return this._insertNumberValue(Buffer.prototype.writeUInt8, 1, value, offset); } /** - * Writes an UInt16BE value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes an UInt16BE value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeUInt16BE(value, offset) { - this._writeNumberValue(Buffer.prototype.writeUInt16BE, 2, value, offset); - return this; + return this._writeNumberValue(Buffer.prototype.writeUInt16BE, 2, value, offset); } /** - * Inserts an UInt16BE value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts an UInt16BE value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertUInt16BE(value, offset) { - this._insertNumberValue(Buffer.prototype.writeUInt16BE, 2, value, offset); - return this; + return this._insertNumberValue(Buffer.prototype.writeUInt16BE, 2, value, offset); } /** - * Writes an UInt16LE value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes an UInt16LE value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeUInt16LE(value, offset) { - this._writeNumberValue(Buffer.prototype.writeUInt16LE, 2, value, offset); - return this; + return this._writeNumberValue(Buffer.prototype.writeUInt16LE, 2, value, offset); } /** - * Inserts an UInt16LE value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts an UInt16LE value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertUInt16LE(value, offset) { - this._insertNumberValue(Buffer.prototype.writeUInt16LE, 2, value, offset); - return this; + return this._insertNumberValue(Buffer.prototype.writeUInt16LE, 2, value, offset); } /** - * Writes an UInt32BE value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes an UInt32BE value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeUInt32BE(value, offset) { - this._writeNumberValue(Buffer.prototype.writeUInt32BE, 4, value, offset); - return this; + return this._writeNumberValue(Buffer.prototype.writeUInt32BE, 4, value, offset); } /** - * Inserts an UInt32BE value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts an UInt32BE value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertUInt32BE(value, offset) { - this._insertNumberValue(Buffer.prototype.writeUInt32BE, 4, value, offset); - return this; + return this._insertNumberValue(Buffer.prototype.writeUInt32BE, 4, value, offset); } /** - * Writes an UInt32LE value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes an UInt32LE value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeUInt32LE(value, offset) { - this._writeNumberValue(Buffer.prototype.writeUInt32LE, 4, value, offset); - return this; + return this._writeNumberValue(Buffer.prototype.writeUInt32LE, 4, value, offset); } /** - * Inserts an UInt32LE value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts an UInt32LE value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertUInt32LE(value, offset) { - this._insertNumberValue(Buffer.prototype.writeUInt32LE, 4, value, offset); - return this; + return this._insertNumberValue(Buffer.prototype.writeUInt32LE, 4, value, offset); } // Floating Point /** - * Reads an FloatBE value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an FloatBE value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readFloatBE(offset) { return this._readNumberValue(Buffer.prototype.readFloatBE, 4, offset); } /** - * Reads an FloatLE value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an FloatLE value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readFloatLE(offset) { return this._readNumberValue(Buffer.prototype.readFloatLE, 4, offset); } /** - * Writes a FloatBE value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes a FloatBE value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeFloatBE(value, offset) { - this._writeNumberValue(Buffer.prototype.writeFloatBE, 4, value, offset); - return this; + return this._writeNumberValue(Buffer.prototype.writeFloatBE, 4, value, offset); } /** - * Inserts a FloatBE value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts a FloatBE value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertFloatBE(value, offset) { - this._insertNumberValue(Buffer.prototype.writeFloatBE, 4, value, offset); - return this; + return this._insertNumberValue(Buffer.prototype.writeFloatBE, 4, value, offset); } /** - * Writes a FloatLE value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes a FloatLE value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeFloatLE(value, offset) { - this._writeNumberValue(Buffer.prototype.writeFloatLE, 4, value, offset); - return this; + return this._writeNumberValue(Buffer.prototype.writeFloatLE, 4, value, offset); } /** - * Inserts a FloatLE value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts a FloatLE value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertFloatLE(value, offset) { - this._insertNumberValue(Buffer.prototype.writeFloatLE, 4, value, offset); - return this; + return this._insertNumberValue(Buffer.prototype.writeFloatLE, 4, value, offset); } // Double Floating Point /** - * Reads an DoublEBE value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an DoublEBE value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readDoubleBE(offset) { return this._readNumberValue(Buffer.prototype.readDoubleBE, 8, offset); } /** - * Reads an DoubleLE value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an DoubleLE value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readDoubleLE(offset) { return this._readNumberValue(Buffer.prototype.readDoubleLE, 8, offset); } /** - * Writes a DoubleBE value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes a DoubleBE value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeDoubleBE(value, offset) { - this._writeNumberValue(Buffer.prototype.writeDoubleBE, 8, value, offset); - return this; + return this._writeNumberValue(Buffer.prototype.writeDoubleBE, 8, value, offset); } /** - * Inserts a DoubleBE value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts a DoubleBE value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertDoubleBE(value, offset) { - this._insertNumberValue(Buffer.prototype.writeDoubleBE, 8, value, offset); - return this; + return this._insertNumberValue(Buffer.prototype.writeDoubleBE, 8, value, offset); } /** - * Writes a DoubleLE value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes a DoubleLE value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeDoubleLE(value, offset) { - this._writeNumberValue(Buffer.prototype.writeDoubleLE, 8, value, offset); - return this; + return this._writeNumberValue(Buffer.prototype.writeDoubleLE, 8, value, offset); } /** - * Inserts a DoubleLE value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts a DoubleLE value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertDoubleLE(value, offset) { - this._insertNumberValue(Buffer.prototype.writeDoubleLE, 8, value, offset); - return this; + return this._insertNumberValue(Buffer.prototype.writeDoubleLE, 8, value, offset); } // Strings /** - * Reads a String from the current read position. - * - * @param arg1 { Number | String } The number of bytes to read as a String, or the BufferEncoding to use for - * the string (Defaults to instance level encoding). - * @param encoding { String } The BufferEncoding to use for the string (Defaults to instance level encoding). - * - * @return { String } - */ + * Reads a String from the current read position. + * + * @param arg1 { Number | String } The number of bytes to read as a String, or the BufferEncoding to use for + * the string (Defaults to instance level encoding). + * @param encoding { String } The BufferEncoding to use for the string (Defaults to instance level encoding). + * + * @return { String } + */ readString(arg1, encoding) { let lengthVal; // Length provided @@ -593,33 +567,37 @@ class SmartBuffer { return value; } /** - * Inserts a String - * - * @param value { String } The String value to insert. - * @param offset { Number } The offset to insert the string at. - * @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding). - */ + * Inserts a String + * + * @param value { String } The String value to insert. + * @param offset { Number } The offset to insert the string at. + * @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding). + * + * @return this + */ insertString(value, offset, encoding) { utils_1.checkOffsetValue(offset); return this._handleString(value, true, offset, encoding); } /** - * Writes a String - * - * @param value { String } The String value to write. - * @param arg2 { Number | String } The offset to write the string at, or the BufferEncoding to use. - * @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding). - */ + * Writes a String + * + * @param value { String } The String value to write. + * @param arg2 { Number | String } The offset to write the string at, or the BufferEncoding to use. + * @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding). + * + * @return this + */ writeString(value, arg2, encoding) { return this._handleString(value, false, arg2, encoding); } /** - * Reads a null-terminated String from the current read position. - * - * @param encoding { String } The BufferEncoding to use for the string (Defaults to instance level encoding). - * - * @return { String } - */ + * Reads a null-terminated String from the current read position. + * + * @param encoding { String } The BufferEncoding to use for the string (Defaults to instance level encoding). + * + * @return { String } + */ readStringNT(encoding) { if (typeof encoding !== 'undefined') { utils_1.checkEncoding(encoding); @@ -640,38 +618,44 @@ class SmartBuffer { return value.toString(encoding || this._encoding); } /** - * Inserts a null-terminated String. - * - * @param value { String } The String value to write. - * @param arg2 { Number | String } The offset to write the string to, or the BufferEncoding to use. - * @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding). - */ + * Inserts a null-terminated String. + * + * @param value { String } The String value to write. + * @param arg2 { Number | String } The offset to write the string to, or the BufferEncoding to use. + * @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding). + * + * @return this + */ insertStringNT(value, offset, encoding) { utils_1.checkOffsetValue(offset); // Write Values this.insertString(value, offset, encoding); this.insertUInt8(0x00, offset + value.length); + return this; } /** - * Writes a null-terminated String. - * - * @param value { String } The String value to write. - * @param arg2 { Number | String } The offset to write the string to, or the BufferEncoding to use. - * @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding). - */ + * Writes a null-terminated String. + * + * @param value { String } The String value to write. + * @param arg2 { Number | String } The offset to write the string to, or the BufferEncoding to use. + * @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding). + * + * @return this + */ writeStringNT(value, arg2, encoding) { // Write Values this.writeString(value, arg2, encoding); this.writeUInt8(0x00, typeof arg2 === 'number' ? arg2 + value.length : this.writeOffset); + return this; } // Buffers /** - * Reads a Buffer from the internal read position. - * - * @param length { Number } The length of data to read as a Buffer. - * - * @return { Buffer } - */ + * Reads a Buffer from the internal read position. + * + * @param length { Number } The length of data to read as a Buffer. + * + * @return { Buffer } + */ readBuffer(length) { if (typeof length !== 'undefined') { utils_1.checkLengthValue(length); @@ -685,29 +669,33 @@ class SmartBuffer { return value; } /** - * Writes a Buffer to the current write position. - * - * @param value { Buffer } The Buffer to write. - * @param offset { Number } The offset to write the Buffer to. - */ + * Writes a Buffer to the current write position. + * + * @param value { Buffer } The Buffer to write. + * @param offset { Number } The offset to write the Buffer to. + * + * @return this + */ insertBuffer(value, offset) { utils_1.checkOffsetValue(offset); return this._handleBuffer(value, true, offset); } /** - * Writes a Buffer to the current write position. - * - * @param value { Buffer } The Buffer to write. - * @param offset { Number } The offset to write the Buffer to. - */ + * Writes a Buffer to the current write position. + * + * @param value { Buffer } The Buffer to write. + * @param offset { Number } The offset to write the Buffer to. + * + * @return this + */ writeBuffer(value, offset) { return this._handleBuffer(value, false, offset); } /** - * Reads a null-terminated Buffer from the current read poisiton. - * - * @return { Buffer } - */ + * Reads a null-terminated Buffer from the current read poisiton. + * + * @return { Buffer } + */ readBufferNT() { // Set null character position to the end SmartBuffer instance. let nullPos = this.length; @@ -725,11 +713,13 @@ class SmartBuffer { return value; } /** - * Inserts a null-terminated Buffer. - * - * @param value { Buffer } The Buffer to write. - * @param offset { Number } The offset to write the Buffer to. - */ + * Inserts a null-terminated Buffer. + * + * @param value { Buffer } The Buffer to write. + * @param offset { Number } The offset to write the Buffer to. + * + * @return this + */ insertBufferNT(value, offset) { utils_1.checkOffsetValue(offset); // Write Values @@ -738,11 +728,13 @@ class SmartBuffer { return this; } /** - * Writes a null-terminated Buffer. - * - * @param value { Buffer } The Buffer to write. - * @param offset { Number } The offset to write the Buffer to. - */ + * Writes a null-terminated Buffer. + * + * @param value { Buffer } The Buffer to write. + * @param offset { Number } The offset to write the Buffer to. + * + * @return this + */ writeBufferNT(value, offset) { // Checks for valid numberic value; if (typeof offset !== 'undefined') { @@ -754,8 +746,8 @@ class SmartBuffer { return this; } /** - * Clears the SmartBuffer instance to its original empty state. - */ + * Clears the SmartBuffer instance to its original empty state. + */ clear() { this._writeOffset = 0; this._readOffset = 0; @@ -763,26 +755,26 @@ class SmartBuffer { return this; } /** - * Gets the remaining data left to be read from the SmartBuffer instance. - * - * @return { Number } - */ + * Gets the remaining data left to be read from the SmartBuffer instance. + * + * @return { Number } + */ remaining() { return this.length - this._readOffset; } /** - * Gets the current read offset value of the SmartBuffer instance. - * - * @return { Number } - */ + * Gets the current read offset value of the SmartBuffer instance. + * + * @return { Number } + */ get readOffset() { return this._readOffset; } /** - * Sets the read offset value of the SmartBuffer instance. - * - * @param offset { Number } - The offset value to set. - */ + * Sets the read offset value of the SmartBuffer instance. + * + * @param offset { Number } - The offset value to set. + */ set readOffset(offset) { utils_1.checkOffsetValue(offset); // Check for bounds. @@ -790,18 +782,18 @@ class SmartBuffer { this._readOffset = offset; } /** - * Gets the current write offset value of the SmartBuffer instance. - * - * @return { Number } - */ + * Gets the current write offset value of the SmartBuffer instance. + * + * @return { Number } + */ get writeOffset() { return this._writeOffset; } /** - * Sets the write offset value of the SmartBuffer instance. - * - * @param offset { Number } - The offset value to set. - */ + * Sets the write offset value of the SmartBuffer instance. + * + * @param offset { Number } - The offset value to set. + */ set writeOffset(offset) { utils_1.checkOffsetValue(offset); // Check for bounds. @@ -809,43 +801,43 @@ class SmartBuffer { this._writeOffset = offset; } /** - * Gets the currently set string encoding of the SmartBuffer instance. - * - * @return { BufferEncoding } The string Buffer encoding currently set. - */ + * Gets the currently set string encoding of the SmartBuffer instance. + * + * @return { BufferEncoding } The string Buffer encoding currently set. + */ get encoding() { return this._encoding; } /** - * Sets the string encoding of the SmartBuffer instance. - * - * @param encoding { BufferEncoding } The string Buffer encoding to set. - */ + * Sets the string encoding of the SmartBuffer instance. + * + * @param encoding { BufferEncoding } The string Buffer encoding to set. + */ set encoding(encoding) { utils_1.checkEncoding(encoding); this._encoding = encoding; } /** - * Gets the underlying internal Buffer. (This includes unmanaged data in the Buffer) - * - * @return { Buffer } The Buffer value. - */ + * Gets the underlying internal Buffer. (This includes unmanaged data in the Buffer) + * + * @return { Buffer } The Buffer value. + */ get internalBuffer() { return this._buff; } /** - * Gets the value of the internal managed Buffer (Includes managed data only) - * - * @param { Buffer } - */ + * Gets the value of the internal managed Buffer (Includes managed data only) + * + * @param { Buffer } + */ toBuffer() { return this._buff.slice(0, this.length); } /** - * Gets the String value of the internal managed Buffer - * - * @param encoding { String } The BufferEncoding to display the Buffer as (defaults to instance level encoding). - */ + * Gets the String value of the internal managed Buffer + * + * @param encoding { String } The BufferEncoding to display the Buffer as (defaults to instance level encoding). + */ toString(encoding) { const encodingVal = typeof encoding === 'string' ? encoding : this._encoding; // Check for invalid encoding. @@ -853,20 +845,20 @@ class SmartBuffer { return this._buff.toString(encodingVal, 0, this.length); } /** - * Destroys the SmartBuffer instance. - */ + * Destroys the SmartBuffer instance. + */ destroy() { this.clear(); return this; } /** - * Handles inserting and writing strings. - * - * @param value { String } The String value to insert. - * @param isInsert { Boolean } True if inserting a string, false if writing. - * @param arg2 { Number | String } The offset to insert the string at, or the BufferEncoding to use. - * @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding). - */ + * Handles inserting and writing strings. + * + * @param value { String } The String value to insert. + * @param isInsert { Boolean } True if inserting a string, false if writing. + * @param arg2 { Number | String } The offset to insert the string at, or the BufferEncoding to use. + * @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding). + */ _handleString(value, isInsert, arg3, encoding) { let offsetVal = this._writeOffset; let encodingVal = this._encoding; @@ -912,11 +904,11 @@ class SmartBuffer { return this; } /** - * Handles writing or insert of a Buffer. - * - * @param value { Buffer } The Buffer to write. - * @param offset { Number } The offset to write the Buffer to. - */ + * Handles writing or insert of a Buffer. + * + * @param value { Buffer } The Buffer to write. + * @param offset { Number } The offset to write the Buffer to. + */ _handleBuffer(value, isInsert, offset) { const offsetVal = typeof offset === 'number' ? offset : this._writeOffset; // Ensure there is enough internal Buffer capacity. @@ -945,11 +937,11 @@ class SmartBuffer { return this; } /** - * Ensures that the internal Buffer is large enough to read data. - * - * @param length { Number } The length of the data that needs to be read. - * @param offset { Number } The offset of the data that needs to be read. - */ + * Ensures that the internal Buffer is large enough to read data. + * + * @param length { Number } The length of the data that needs to be read. + * @param offset { Number } The offset of the data that needs to be read. + */ ensureReadable(length, offset) { // Offset value defaults to managed read offset. let offsetVal = this._readOffset; @@ -966,11 +958,11 @@ class SmartBuffer { } } /** - * Ensures that the internal Buffer is large enough to insert data. - * - * @param dataLength { Number } The length of the data that needs to be written. - * @param offset { Number } The offset of the data to be written. - */ + * Ensures that the internal Buffer is large enough to insert data. + * + * @param dataLength { Number } The length of the data that needs to be written. + * @param offset { Number } The offset of the data to be written. + */ ensureInsertable(dataLength, offset) { // Checks for valid numberic value; utils_1.checkOffsetValue(offset); @@ -989,11 +981,11 @@ class SmartBuffer { } } /** - * Ensures that the internal Buffer is large enough to write data. - * - * @param dataLength { Number } The length of the data that needs to be written. - * @param offset { Number } The offset of the data to be written (defaults to writeOffset). - */ + * Ensures that the internal Buffer is large enough to write data. + * + * @param dataLength { Number } The length of the data that needs to be written. + * @param offset { Number } The offset of the data to be written (defaults to writeOffset). + */ _ensureWriteable(dataLength, offset) { const offsetVal = typeof offset === 'number' ? offset : this._writeOffset; // Ensure enough capacity to write data. @@ -1004,15 +996,15 @@ class SmartBuffer { } } /** - * Ensures that the internal Buffer is large enough to write at least the given amount of data. - * - * @param minLength { Number } The minimum length of the data needs to be written. - */ + * Ensures that the internal Buffer is large enough to write at least the given amount of data. + * + * @param minLength { Number } The minimum length of the data needs to be written. + */ _ensureCapacity(minLength) { const oldLength = this._buff.length; if (minLength > oldLength) { let data = this._buff; - let newLength = oldLength * 3 / 2 + 1; + let newLength = (oldLength * 3) / 2 + 1; if (newLength < minLength) { newLength = minLength; } @@ -1021,14 +1013,14 @@ class SmartBuffer { } } /** - * Reads a numeric number value using the provided function. - * - * @param func { Function(offset: number) => number } The function to read data on the internal Buffer with. - * @param byteSize { Number } The number of bytes read. - * @param offset { Number } The offset to read from (optional). When this is not provided, the managed readOffset is used instead. - * - * @param { Number } - */ + * Reads a numeric number value using the provided function. + * + * @param func { Function(offset: number) => number } The function to read data on the internal Buffer with. + * @param byteSize { Number } The number of bytes read. + * @param offset { Number } The offset to read from (optional). When this is not provided, the managed readOffset is used instead. + * + * @param { Number } + */ _readNumberValue(func, byteSize, offset) { this.ensureReadable(byteSize, offset); // Call Buffer.readXXXX(); @@ -1040,14 +1032,14 @@ class SmartBuffer { return value; } /** - * Inserts a numeric number value based on the given offset and value. - * - * @param func { Function(offset: number, offset?) => number} The function to write data on the internal Buffer with. - * @param byteSize { Number } The number of bytes written. - * @param value { Number } The number value to write. - * @param offset { Number } the offset to write the number at (REQUIRED). - * - */ + * Inserts a numeric number value based on the given offset and value. + * + * @param func { Function(offset: number, offset?) => number} The function to write data on the internal Buffer with. + * @param byteSize { Number } The number of bytes written. + * @param value { Number } The number value to write. + * @param offset { Number } the offset to write the number at (REQUIRED). + * + */ _insertNumberValue(func, byteSize, value, offset) { // Check for invalid offset values. utils_1.checkOffsetValue(offset); @@ -1057,16 +1049,17 @@ class SmartBuffer { func.call(this._buff, value, offset); // Adjusts internally managed write offset. this._writeOffset += byteSize; + return this; } /** - * Writes a numeric number value based on the given offset and value. - * - * @param func { Function(offset: number, offset?) => number} The function to write data on the internal Buffer with. - * @param byteSize { Number } The number of bytes written. - * @param value { Number } The number value to write. - * @param offset { Number } the offset to write the number at (REQUIRED). - * - */ + * Writes a numeric number value based on the given offset and value. + * + * @param func { Function(offset: number, offset?) => number} The function to write data on the internal Buffer with. + * @param byteSize { Number } The number of bytes written. + * @param value { Number } The number value to write. + * @param offset { Number } the offset to write the number at (REQUIRED). + * + */ _writeNumberValue(func, byteSize, value, offset) { // If an offset was provided, validate it. if (typeof offset === 'number') { @@ -1089,6 +1082,7 @@ class SmartBuffer { // If no numeric offset was given, we wrote to the end of the SmartBuffer so increment writeOffset. this._writeOffset += byteSize; } + return this; } } exports.SmartBuffer = SmartBuffer; diff --git a/deps/npm/node_modules/smart-buffer/build/smartbuffer.js.map b/deps/npm/node_modules/smart-buffer/build/smartbuffer.js.map index 4a1efcd0559f62..cf6ee6eca1720d 100644 --- a/deps/npm/node_modules/smart-buffer/build/smartbuffer.js.map +++ b/deps/npm/node_modules/smart-buffer/build/smartbuffer.js.map @@ -1 +1 @@ -{"version":3,"file":"smartbuffer.js","sourceRoot":"","sources":["../src/smartbuffer.ts"],"names":[],"mappings":";;AA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;QAErC,2CAA2C;QAC3C,IAAI,CAAC,YAAY,IAAI,QAAQ,CAAC;QAC9B,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;OAQG;IACK,iBAAiB,CACvB,IAAgD,EAChD,QAAgB,EAChB,KAAa,EACb,MAAe;QAEf,0CAA0C;QAC1C,EAAE,CAAC,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC;YAC/B,gEAAgE;YAChE,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,cAAM,CAAC,2BAA2B,CAAC,CAAC;YACtD,CAAC;YAED,wBAAgB,CAAC,MAAM,CAAC,CAAC;QAC3B,CAAC;QAED,uDAAuD;QACvD,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC;QAE1E,0EAA0E;QAC1E,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;QAE3C,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;QAExC,mFAAmF;QACnF,EAAE,CAAC,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC;YAC/B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,QAAQ,CAAC,CAAC;QACxE,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,mGAAmG;YACnG,IAAI,CAAC,YAAY,IAAI,QAAQ,CAAC;QAChC,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;CACF;AAE4B,kCAAW"} \ No newline at end of file diff --git a/deps/npm/node_modules/smart-buffer/package.json b/deps/npm/node_modules/smart-buffer/package.json index f5365e499ca495..ca94fd0908658f 100644 --- a/deps/npm/node_modules/smart-buffer/package.json +++ b/deps/npm/node_modules/smart-buffer/package.json @@ -1,27 +1,27 @@ { - "_from": "smart-buffer@^4.0.1", - "_id": "smart-buffer@4.0.1", + "_from": "smart-buffer@4.0.2", + "_id": "smart-buffer@4.0.2", "_inBundle": false, - "_integrity": "sha512-RFqinRVJVcCAL9Uh1oVqE6FZkqsyLiVOYEZ20TqIOjuX7iFVJ+zsbs4RIghnw/pTs7mZvt8ZHhvm1ZUrR4fykg==", + "_integrity": "sha512-JDhEpTKzXusOqXZ0BUIdH+CjFdO/CR3tLlf5CN34IypI+xMmXW1uB16OOY8z3cICbJlDAVJzNbwBhNO0wt9OAw==", "_location": "/smart-buffer", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "smart-buffer@^4.0.1", + "raw": "smart-buffer@4.0.2", "name": "smart-buffer", "escapedName": "smart-buffer", - "rawSpec": "^4.0.1", + "rawSpec": "4.0.2", "saveSpec": null, - "fetchSpec": "^4.0.1" + "fetchSpec": "4.0.2" }, "_requiredBy": [ "/socks" ], - "_resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.0.1.tgz", - "_shasum": "07ea1ca8d4db24eb4cac86537d7d18995221ace3", - "_spec": "smart-buffer@^4.0.1", - "_where": "/Users/rebecca/code/npm/node_modules/socks", + "_resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.0.2.tgz", + "_shasum": "5207858c3815cc69110703c6b94e46c15634395d", + "_spec": "smart-buffer@4.0.2", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/socks", "author": { "name": "Josh Glazebrook" }, @@ -100,5 +100,5 @@ "test": "NODE_ENV=test mocha --recursive --compilers ts:ts-node/register test/**/*.ts" }, "typings": "typings/smartbuffer.d.ts", - "version": "4.0.1" + "version": "4.0.2" } diff --git a/deps/npm/node_modules/smart-buffer/typings/smartbuffer.d.ts b/deps/npm/node_modules/smart-buffer/typings/smartbuffer.d.ts index 79fa6306a4c14a..19456754b43813 100644 --- a/deps/npm/node_modules/smart-buffer/typings/smartbuffer.d.ts +++ b/deps/npm/node_modules/smart-buffer/typings/smartbuffer.d.ts @@ -1,654 +1,647 @@ /// -declare module 'smart-buffer' { - /** +/** * Object interface for constructing new SmartBuffer instances. */ - interface SmartBufferOptions { +interface SmartBufferOptions { encoding?: BufferEncoding; size?: number; buff?: Buffer; - } - class SmartBuffer { +} +declare class SmartBuffer { length: number; private _encoding; private _buff; private _writeOffset; private _readOffset; /** - * Creates a new SmartBuffer instance. - * - * @param options { SmartBufferOptions } The SmartBufferOptions to apply to this instance. - */ + * Creates a new SmartBuffer instance. + * + * @param options { SmartBufferOptions } The SmartBufferOptions to apply to this instance. + */ constructor(options?: SmartBufferOptions); /** - * Creates a new SmartBuffer instance with the provided internal Buffer size and optional encoding. - * - * @param size { Number } The size of the internal Buffer. - * @param encoding { String } The BufferEncoding to use for strings. - * - * @return { SmartBuffer } - */ + * Creates a new SmartBuffer instance with the provided internal Buffer size and optional encoding. + * + * @param size { Number } The size of the internal Buffer. + * @param encoding { String } The BufferEncoding to use for strings. + * + * @return { SmartBuffer } + */ static fromSize(size: number, encoding?: BufferEncoding): SmartBuffer; /** - * Creates a new SmartBuffer instance with the provided Buffer and optional encoding. - * - * @param buffer { Buffer } The Buffer to use as the internal Buffer value. - * @param encoding { String } The BufferEncoding to use for strings. - * - * @return { SmartBuffer } - */ + * Creates a new SmartBuffer instance with the provided Buffer and optional encoding. + * + * @param buffer { Buffer } The Buffer to use as the internal Buffer value. + * @param encoding { String } The BufferEncoding to use for strings. + * + * @return { SmartBuffer } + */ static fromBuffer(buff: Buffer, encoding?: BufferEncoding): SmartBuffer; /** - * Creates a new SmartBuffer instance with the provided SmartBufferOptions options. - * - * @param options { SmartBufferOptions } The options to use when creating the SmartBuffer instance. - */ + * Creates a new SmartBuffer instance with the provided SmartBufferOptions options. + * + * @param options { SmartBufferOptions } The options to use when creating the SmartBuffer instance. + */ static fromOptions(options: SmartBufferOptions): SmartBuffer; /** - * Type checking function that determines if an object is a SmartBufferOptions object. - */ - static isSmartBufferOptions( - options: SmartBufferOptions - ): options is SmartBufferOptions; - /** - * Reads an Int8 value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Type checking function that determines if an object is a SmartBufferOptions object. + */ + static isSmartBufferOptions(options: SmartBufferOptions): options is SmartBufferOptions; + /** + * Reads an Int8 value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readInt8(offset?: number): number; /** - * Reads an Int16BE value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an Int16BE value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readInt16BE(offset?: number): number; /** - * Reads an Int16LE value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an Int16LE value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readInt16LE(offset?: number): number; /** - * Reads an Int32BE value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an Int32BE value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readInt32BE(offset?: number): number; /** - * Reads an Int32LE value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an Int32LE value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readInt32LE(offset?: number): number; /** - * Writes an Int8 value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes an Int8 value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeInt8(value: number, offset?: number): SmartBuffer; /** - * Inserts an Int8 value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts an Int8 value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertInt8(value: number, offset: number): SmartBuffer; /** - * Writes an Int16BE value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes an Int16BE value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeInt16BE(value: number, offset?: number): SmartBuffer; /** - * Inserts an Int16BE value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts an Int16BE value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertInt16BE(value: number, offset: number): SmartBuffer; /** - * Writes an Int16LE value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes an Int16LE value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeInt16LE(value: number, offset?: number): SmartBuffer; /** - * Inserts an Int16LE value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts an Int16LE value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertInt16LE(value: number, offset: number): SmartBuffer; /** - * Writes an Int32BE value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes an Int32BE value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeInt32BE(value: number, offset?: number): SmartBuffer; /** - * Inserts an Int32BE value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts an Int32BE value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertInt32BE(value: number, offset: number): SmartBuffer; /** - * Writes an Int32LE value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes an Int32LE value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeInt32LE(value: number, offset?: number): SmartBuffer; /** - * Inserts an Int32LE value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts an Int32LE value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertInt32LE(value: number, offset: number): SmartBuffer; /** - * Reads an UInt8 value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an UInt8 value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readUInt8(offset?: number): number; /** - * Reads an UInt16BE value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an UInt16BE value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readUInt16BE(offset?: number): number; /** - * Reads an UInt16LE value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an UInt16LE value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readUInt16LE(offset?: number): number; /** - * Reads an UInt32BE value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an UInt32BE value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readUInt32BE(offset?: number): number; /** - * Reads an UInt32LE value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an UInt32LE value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readUInt32LE(offset?: number): number; /** - * Writes an UInt8 value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes an UInt8 value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeUInt8(value: number, offset?: number): SmartBuffer; /** - * Inserts an UInt8 value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts an UInt8 value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertUInt8(value: number, offset: number): SmartBuffer; /** - * Writes an UInt16BE value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes an UInt16BE value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeUInt16BE(value: number, offset?: number): SmartBuffer; /** - * Inserts an UInt16BE value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts an UInt16BE value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertUInt16BE(value: number, offset: number): SmartBuffer; /** - * Writes an UInt16LE value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes an UInt16LE value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeUInt16LE(value: number, offset?: number): SmartBuffer; /** - * Inserts an UInt16LE value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts an UInt16LE value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertUInt16LE(value: number, offset: number): SmartBuffer; /** - * Writes an UInt32BE value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes an UInt32BE value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeUInt32BE(value: number, offset?: number): SmartBuffer; /** - * Inserts an UInt32BE value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts an UInt32BE value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertUInt32BE(value: number, offset: number): SmartBuffer; /** - * Writes an UInt32LE value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes an UInt32LE value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeUInt32LE(value: number, offset?: number): SmartBuffer; /** - * Inserts an UInt32LE value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts an UInt32LE value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertUInt32LE(value: number, offset: number): SmartBuffer; /** - * Reads an FloatBE value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an FloatBE value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readFloatBE(offset?: number): number; /** - * Reads an FloatLE value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an FloatLE value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readFloatLE(offset?: number): number; /** - * Writes a FloatBE value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes a FloatBE value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeFloatBE(value: number, offset?: number): SmartBuffer; /** - * Inserts a FloatBE value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts a FloatBE value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertFloatBE(value: number, offset: number): SmartBuffer; /** - * Writes a FloatLE value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes a FloatLE value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeFloatLE(value: number, offset?: number): SmartBuffer; /** - * Inserts a FloatLE value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts a FloatLE value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertFloatLE(value: number, offset: number): SmartBuffer; /** - * Reads an DoublEBE value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an DoublEBE value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readDoubleBE(offset?: number): number; /** - * Reads an DoubleLE value from the current read position or an optionally provided offset. - * - * @param offset { Number } The offset to read data from (optional) - * @return { Number } - */ + * Reads an DoubleLE value from the current read position or an optionally provided offset. + * + * @param offset { Number } The offset to read data from (optional) + * @return { Number } + */ readDoubleLE(offset?: number): number; /** - * Writes a DoubleBE value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes a DoubleBE value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeDoubleBE(value: number, offset?: number): SmartBuffer; /** - * Inserts a DoubleBE value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts a DoubleBE value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertDoubleBE(value: number, offset: number): SmartBuffer; /** - * Writes a DoubleLE value to the current write position (or at optional offset). - * - * @param value { Number } The value to write. - * @param offset { Number } The offset to write the value at. - * - * @return this - */ + * Writes a DoubleLE value to the current write position (or at optional offset). + * + * @param value { Number } The value to write. + * @param offset { Number } The offset to write the value at. + * + * @return this + */ writeDoubleLE(value: number, offset?: number): SmartBuffer; /** - * Inserts a DoubleLE value at the given offset value. - * - * @param value { Number } The value to insert. - * @param offset { Number } The offset to insert the value at. - * - * @return this - */ + * Inserts a DoubleLE value at the given offset value. + * + * @param value { Number } The value to insert. + * @param offset { Number } The offset to insert the value at. + * + * @return this + */ insertDoubleLE(value: number, offset: number): SmartBuffer; /** - * Reads a String from the current read position. - * - * @param arg1 { Number | String } The number of bytes to read as a String, or the BufferEncoding to use for - * the string (Defaults to instance level encoding). - * @param encoding { String } The BufferEncoding to use for the string (Defaults to instance level encoding). - * - * @return { String } - */ - readString( - arg1?: number | BufferEncoding, - encoding?: BufferEncoding - ): string; - /** - * Inserts a String - * - * @param value { String } The String value to insert. - * @param offset { Number } The offset to insert the string at. - * @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding). - */ - insertString( - value: string, - offset: number, - encoding?: BufferEncoding - ): SmartBuffer; - /** - * Writes a String - * - * @param value { String } The String value to write. - * @param arg2 { Number | String } The offset to write the string at, or the BufferEncoding to use. - * @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding). - */ - writeString( - value: string, - arg2?: number | BufferEncoding, - encoding?: BufferEncoding - ): SmartBuffer; - /** - * Reads a null-terminated String from the current read position. - * - * @param encoding { String } The BufferEncoding to use for the string (Defaults to instance level encoding). - * - * @return { String } - */ + * Reads a String from the current read position. + * + * @param arg1 { Number | String } The number of bytes to read as a String, or the BufferEncoding to use for + * the string (Defaults to instance level encoding). + * @param encoding { String } The BufferEncoding to use for the string (Defaults to instance level encoding). + * + * @return { String } + */ + readString(arg1?: number | BufferEncoding, encoding?: BufferEncoding): string; + /** + * Inserts a String + * + * @param value { String } The String value to insert. + * @param offset { Number } The offset to insert the string at. + * @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding). + * + * @return this + */ + insertString(value: string, offset: number, encoding?: BufferEncoding): SmartBuffer; + /** + * Writes a String + * + * @param value { String } The String value to write. + * @param arg2 { Number | String } The offset to write the string at, or the BufferEncoding to use. + * @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding). + * + * @return this + */ + writeString(value: string, arg2?: number | BufferEncoding, encoding?: BufferEncoding): SmartBuffer; + /** + * Reads a null-terminated String from the current read position. + * + * @param encoding { String } The BufferEncoding to use for the string (Defaults to instance level encoding). + * + * @return { String } + */ readStringNT(encoding?: BufferEncoding): string; /** - * Inserts a null-terminated String. - * - * @param value { String } The String value to write. - * @param arg2 { Number | String } The offset to write the string to, or the BufferEncoding to use. - * @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding). - */ - insertStringNT( - value: string, - offset: number, - encoding?: BufferEncoding - ): void; - /** - * Writes a null-terminated String. - * - * @param value { String } The String value to write. - * @param arg2 { Number | String } The offset to write the string to, or the BufferEncoding to use. - * @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding). - */ - writeStringNT( - value: string, - arg2?: number | BufferEncoding, - encoding?: BufferEncoding - ): void; - /** - * Reads a Buffer from the internal read position. - * - * @param length { Number } The length of data to read as a Buffer. - * - * @return { Buffer } - */ + * Inserts a null-terminated String. + * + * @param value { String } The String value to write. + * @param arg2 { Number | String } The offset to write the string to, or the BufferEncoding to use. + * @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding). + * + * @return this + */ + insertStringNT(value: string, offset: number, encoding?: BufferEncoding): SmartBuffer; + /** + * Writes a null-terminated String. + * + * @param value { String } The String value to write. + * @param arg2 { Number | String } The offset to write the string to, or the BufferEncoding to use. + * @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding). + * + * @return this + */ + writeStringNT(value: string, arg2?: number | BufferEncoding, encoding?: BufferEncoding): SmartBuffer; + /** + * Reads a Buffer from the internal read position. + * + * @param length { Number } The length of data to read as a Buffer. + * + * @return { Buffer } + */ readBuffer(length?: number): Buffer; /** - * Writes a Buffer to the current write position. - * - * @param value { Buffer } The Buffer to write. - * @param offset { Number } The offset to write the Buffer to. - */ + * Writes a Buffer to the current write position. + * + * @param value { Buffer } The Buffer to write. + * @param offset { Number } The offset to write the Buffer to. + * + * @return this + */ insertBuffer(value: Buffer, offset: number): SmartBuffer; /** - * Writes a Buffer to the current write position. - * - * @param value { Buffer } The Buffer to write. - * @param offset { Number } The offset to write the Buffer to. - */ + * Writes a Buffer to the current write position. + * + * @param value { Buffer } The Buffer to write. + * @param offset { Number } The offset to write the Buffer to. + * + * @return this + */ writeBuffer(value: Buffer, offset?: number): SmartBuffer; /** - * Reads a null-terminated Buffer from the current read poisiton. - * - * @return { Buffer } - */ + * Reads a null-terminated Buffer from the current read poisiton. + * + * @return { Buffer } + */ readBufferNT(): Buffer; /** - * Inserts a null-terminated Buffer. - * - * @param value { Buffer } The Buffer to write. - * @param offset { Number } The offset to write the Buffer to. - */ + * Inserts a null-terminated Buffer. + * + * @param value { Buffer } The Buffer to write. + * @param offset { Number } The offset to write the Buffer to. + * + * @return this + */ insertBufferNT(value: Buffer, offset: number): SmartBuffer; /** - * Writes a null-terminated Buffer. - * - * @param value { Buffer } The Buffer to write. - * @param offset { Number } The offset to write the Buffer to. - */ + * Writes a null-terminated Buffer. + * + * @param value { Buffer } The Buffer to write. + * @param offset { Number } The offset to write the Buffer to. + * + * @return this + */ writeBufferNT(value: Buffer, offset?: number): SmartBuffer; /** - * Clears the SmartBuffer instance to its original empty state. - */ + * Clears the SmartBuffer instance to its original empty state. + */ clear(): SmartBuffer; /** - * Gets the remaining data left to be read from the SmartBuffer instance. - * - * @return { Number } - */ + * Gets the remaining data left to be read from the SmartBuffer instance. + * + * @return { Number } + */ remaining(): number; /** - * Gets the current read offset value of the SmartBuffer instance. - * - * @return { Number } - */ + * Gets the current read offset value of the SmartBuffer instance. + * + * @return { Number } + */ /** - * Sets the read offset value of the SmartBuffer instance. - * - * @param offset { Number } - The offset value to set. - */ + * Sets the read offset value of the SmartBuffer instance. + * + * @param offset { Number } - The offset value to set. + */ readOffset: number; /** - * Gets the current write offset value of the SmartBuffer instance. - * - * @return { Number } - */ + * Gets the current write offset value of the SmartBuffer instance. + * + * @return { Number } + */ /** - * Sets the write offset value of the SmartBuffer instance. - * - * @param offset { Number } - The offset value to set. - */ + * Sets the write offset value of the SmartBuffer instance. + * + * @param offset { Number } - The offset value to set. + */ writeOffset: number; /** - * Gets the currently set string encoding of the SmartBuffer instance. - * - * @return { BufferEncoding } The string Buffer encoding currently set. - */ + * Gets the currently set string encoding of the SmartBuffer instance. + * + * @return { BufferEncoding } The string Buffer encoding currently set. + */ /** - * Sets the string encoding of the SmartBuffer instance. - * - * @param encoding { BufferEncoding } The string Buffer encoding to set. - */ + * Sets the string encoding of the SmartBuffer instance. + * + * @param encoding { BufferEncoding } The string Buffer encoding to set. + */ encoding: BufferEncoding; /** - * Gets the underlying internal Buffer. (This includes unmanaged data in the Buffer) - * - * @return { Buffer } The Buffer value. - */ + * Gets the underlying internal Buffer. (This includes unmanaged data in the Buffer) + * + * @return { Buffer } The Buffer value. + */ readonly internalBuffer: Buffer; /** - * Gets the value of the internal managed Buffer (Includes managed data only) - * - * @param { Buffer } - */ + * Gets the value of the internal managed Buffer (Includes managed data only) + * + * @param { Buffer } + */ toBuffer(): Buffer; /** - * Gets the String value of the internal managed Buffer - * - * @param encoding { String } The BufferEncoding to display the Buffer as (defaults to instance level encoding). - */ + * Gets the String value of the internal managed Buffer + * + * @param encoding { String } The BufferEncoding to display the Buffer as (defaults to instance level encoding). + */ toString(encoding?: BufferEncoding): string; /** - * Destroys the SmartBuffer instance. - */ + * Destroys the SmartBuffer instance. + */ destroy(): SmartBuffer; /** - * Handles inserting and writing strings. - * - * @param value { String } The String value to insert. - * @param isInsert { Boolean } True if inserting a string, false if writing. - * @param arg2 { Number | String } The offset to insert the string at, or the BufferEncoding to use. - * @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding). - */ + * Handles inserting and writing strings. + * + * @param value { String } The String value to insert. + * @param isInsert { Boolean } True if inserting a string, false if writing. + * @param arg2 { Number | String } The offset to insert the string at, or the BufferEncoding to use. + * @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding). + */ private _handleString(value, isInsert, arg3?, encoding?); /** - * Handles writing or insert of a Buffer. - * - * @param value { Buffer } The Buffer to write. - * @param offset { Number } The offset to write the Buffer to. - */ + * Handles writing or insert of a Buffer. + * + * @param value { Buffer } The Buffer to write. + * @param offset { Number } The offset to write the Buffer to. + */ private _handleBuffer(value, isInsert, offset?); /** - * Ensures that the internal Buffer is large enough to read data. - * - * @param length { Number } The length of the data that needs to be read. - * @param offset { Number } The offset of the data that needs to be read. - */ + * Ensures that the internal Buffer is large enough to read data. + * + * @param length { Number } The length of the data that needs to be read. + * @param offset { Number } The offset of the data that needs to be read. + */ private ensureReadable(length, offset?); /** - * Ensures that the internal Buffer is large enough to insert data. - * - * @param dataLength { Number } The length of the data that needs to be written. - * @param offset { Number } The offset of the data to be written. - */ + * Ensures that the internal Buffer is large enough to insert data. + * + * @param dataLength { Number } The length of the data that needs to be written. + * @param offset { Number } The offset of the data to be written. + */ private ensureInsertable(dataLength, offset); /** - * Ensures that the internal Buffer is large enough to write data. - * - * @param dataLength { Number } The length of the data that needs to be written. - * @param offset { Number } The offset of the data to be written (defaults to writeOffset). - */ + * Ensures that the internal Buffer is large enough to write data. + * + * @param dataLength { Number } The length of the data that needs to be written. + * @param offset { Number } The offset of the data to be written (defaults to writeOffset). + */ private _ensureWriteable(dataLength, offset?); /** - * Ensures that the internal Buffer is large enough to write at least the given amount of data. - * - * @param minLength { Number } The minimum length of the data needs to be written. - */ + * Ensures that the internal Buffer is large enough to write at least the given amount of data. + * + * @param minLength { Number } The minimum length of the data needs to be written. + */ private _ensureCapacity(minLength); /** - * Reads a numeric number value using the provided function. - * - * @param func { Function(offset: number) => number } The function to read data on the internal Buffer with. - * @param byteSize { Number } The number of bytes read. - * @param offset { Number } The offset to read from (optional). When this is not provided, the managed readOffset is used instead. - * - * @param { Number } - */ + * Reads a numeric number value using the provided function. + * + * @param func { Function(offset: number) => number } The function to read data on the internal Buffer with. + * @param byteSize { Number } The number of bytes read. + * @param offset { Number } The offset to read from (optional). When this is not provided, the managed readOffset is used instead. + * + * @param { Number } + */ private _readNumberValue(func, byteSize, offset?); /** - * Inserts a numeric number value based on the given offset and value. - * - * @param func { Function(offset: number, offset?) => number} The function to write data on the internal Buffer with. - * @param byteSize { Number } The number of bytes written. - * @param value { Number } The number value to write. - * @param offset { Number } the offset to write the number at (REQUIRED). - * - */ + * Inserts a numeric number value based on the given offset and value. + * + * @param func { Function(offset: number, offset?) => number} The function to write data on the internal Buffer with. + * @param byteSize { Number } The number of bytes written. + * @param value { Number } The number value to write. + * @param offset { Number } the offset to write the number at (REQUIRED). + * + */ private _insertNumberValue(func, byteSize, value, offset); /** - * Writes a numeric number value based on the given offset and value. - * - * @param func { Function(offset: number, offset?) => number} The function to write data on the internal Buffer with. - * @param byteSize { Number } The number of bytes written. - * @param value { Number } The number value to write. - * @param offset { Number } the offset to write the number at (REQUIRED). - * - */ + * Writes a numeric number value based on the given offset and value. + * + * @param func { Function(offset: number, offset?) => number} The function to write data on the internal Buffer with. + * @param byteSize { Number } The number of bytes written. + * @param value { Number } The number value to write. + * @param offset { Number } the offset to write the number at (REQUIRED). + * + */ private _writeNumberValue(func, byteSize, value, offset?); - } - export { SmartBufferOptions, SmartBuffer }; } +export { SmartBufferOptions, SmartBuffer }; diff --git a/deps/npm/node_modules/socks-proxy-agent/README.md b/deps/npm/node_modules/socks-proxy-agent/README.md index 30d33500af43e7..36028ad9f689fc 100644 --- a/deps/npm/node_modules/socks-proxy-agent/README.md +++ b/deps/npm/node_modules/socks-proxy-agent/README.md @@ -66,8 +66,7 @@ console.log('attempting to GET %j', endpoint); var opts = url.parse(endpoint); // create an instance of the `SocksProxyAgent` class with the proxy server information -// NOTE: the `true` second argument! Means to use TLS encryption on the socket -var agent = new SocksProxyAgent(proxy, true); +var agent = new SocksProxyAgent(proxy); opts.agent = agent; https.get(opts, function (res) { diff --git a/deps/npm/node_modules/socks-proxy-agent/index.js b/deps/npm/node_modules/socks-proxy-agent/index.js index 5c0f13ae17611c..5418abfac6635d 100644 --- a/deps/npm/node_modules/socks-proxy-agent/index.js +++ b/deps/npm/node_modules/socks-proxy-agent/index.js @@ -131,8 +131,8 @@ SocksProxyAgent.prototype.callback = function connect(req, opts, fn) { }; if (proxy.authentication) { - options.proxy.authentication = proxy.authentication; - options.proxy.userid = proxy.userid; + options.proxy.userId = proxy.userid; + options.proxy.password = proxy.authentication.password; } if (proxy.lookup) { diff --git a/deps/npm/node_modules/https-proxy-agent/.travis.yml b/deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/.travis.yml similarity index 97% rename from deps/npm/node_modules/https-proxy-agent/.travis.yml rename to deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/.travis.yml index 805d3d50d2a1fe..6ce862c6f63a77 100644 --- a/deps/npm/node_modules/https-proxy-agent/.travis.yml +++ b/deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/.travis.yml @@ -8,6 +8,7 @@ node_js: - "6" - "7" - "8" + - "9" install: - PATH="`npm bin`:`npm bin -g`:$PATH" diff --git a/deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/History.md b/deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/History.md new file mode 100644 index 00000000000000..80c88dc401f960 --- /dev/null +++ b/deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/History.md @@ -0,0 +1,113 @@ + +4.2.0 / 2018-01-15 +================== + + * Add support for returning an `http.Agent` instance + * Optimize promisifying logic + * Set `timeout` to null for proper cleanup + * Remove Node.js <= 0.11.3 special-casing from test case + +4.1.2 / 2017-11-20 +================== + + * test Node 9 on Travis + * ensure that `https.get()` uses the patched `https.request()` + +4.1.1 / 2017-07-20 +================== + + * Correct `https.request()` with a String (#9) + +4.1.0 / 2017-06-26 +================== + + * mix in Agent options into Request options + * throw when nothing is returned from agent-base callback + * do not modify the options object for https requests + +4.0.1 / 2017-06-13 +================== + + * add `this` context tests and fixes + +4.0.0 / 2017-06-06 +================== + + * drop support for Node.js < 4 + * drop old versions of Node.js from Travis-CI + * specify Node.js >= 4.0.0 in `engines.node` + * remove more old code + * remove "extend" dependency + * remove "semver" dependency + * make the Promise logic a bit cleaner + * add async function pseudo-example to README + * use direct return in README example + +3.0.0 / 2017-06-02 +================== + + * drop support for Node.js v0.8 and v0.10 + * add support for async, Promises, and direct return + * add a couple `options` test cases + * implement a `"timeout"` option + * rename main file to `index.js` + * test Node 8 on Travis + +2.1.1 / 2017-05-30 +================== + + * Revert [`fe2162e`](https://github.com/TooTallNate/node-agent-base/commit/fe2162e0ba18123f5b301cba4de1e9dd74e437cd) and [`270bdc9`](https://github.com/TooTallNate/node-agent-base/commit/270bdc92eb8e3bd0444d1e5266e8e9390aeb3095) (fixes #7) + +2.1.0 / 2017-05-26 +================== + + * unref is not supported for node < 0.9.1 (@pi0) + * add tests to dangling socket (@pi0) + * check unref() is supported (@pi0) + * fix dangling sockets problem (@pi0) + * add basic "ws" module tests + * make `Agent` be subclassable + * turn `addRequest()` into a named function + * test: Node.js v4 likes to call `cork` on the stream (#3, @tomhughes) + * travis: test node v4, v5, v6 and v7 + +2.0.1 / 2015-09-10 +================== + + * package: update "semver" to v5.0.1 for WebPack (#1, @vhpoet) + +2.0.0 / 2015-07-10 +================== + + * refactor to patch Node.js core for more consistent `opts` values + * ensure that HTTP(s) default port numbers are always given + * test: use ssl-cert-snakeoil SSL certs + * test: add tests for arbitrary options + * README: add API section + * README: make the Agent HTTP/HTTPS generic in the example + * README: use SVG for Travis-CI badge + +1.0.2 / 2015-06-27 +================== + + * agent: set `req._hadError` to true after emitting "error" + * package: update "mocha" to v2 + * test: add artificial HTTP GET request test + * test: add artificial data events test + * test: fix artifical GET response test on node > v0.11.3 + * test: use a real timeout for the async error test + +1.0.1 / 2013-09-09 +================== + + * Fix passing an "error" object to the callback function on the first tick + +1.0.0 / 2013-09-09 +================== + + * New API: now you pass a callback function directly + +0.0.1 / 2013-07-09 +================== + + * Initial release diff --git a/deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/README.md b/deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/README.md new file mode 100644 index 00000000000000..dbeceab8a125f6 --- /dev/null +++ b/deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/README.md @@ -0,0 +1,145 @@ +agent-base +========== +### Turn a function into an [`http.Agent`][http.Agent] instance +[![Build Status](https://travis-ci.org/TooTallNate/node-agent-base.svg?branch=master)](https://travis-ci.org/TooTallNate/node-agent-base) + +This module provides an `http.Agent` generator. That is, you pass it an async +callback function, and it returns a new `http.Agent` instance that will invoke the +given callback function when sending outbound HTTP requests. + +#### Some subclasses: + +Here's some more interesting uses of `agent-base`. +Send a pull request to list yours! + + * [`http-proxy-agent`][http-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTP endpoints + * [`https-proxy-agent`][https-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTPS endpoints + * [`pac-proxy-agent`][pac-proxy-agent]: A PAC file proxy `http.Agent` implementation for HTTP and HTTPS + * [`socks-proxy-agent`][socks-proxy-agent]: A SOCKS (v4a) proxy `http.Agent` implementation for HTTP and HTTPS + + +Installation +------------ + +Install with `npm`: + +``` bash +$ npm install agent-base +``` + + +Example +------- + +Here's a minimal example that creates a new `net.Socket` connection to the server +for every HTTP request (i.e. the equivalent of `agent: false` option): + +```js +var net = require('net'); +var tls = require('tls'); +var url = require('url'); +var http = require('http'); +var agent = require('agent-base'); + +var endpoint = 'http://nodejs.org/api/'; +var parsed = url.parse(endpoint); + +// This is the important part! +parsed.agent = agent(function (req, opts) { + var socket; + // `secureEndpoint` is true when using the https module + if (opts.secureEndpoint) { + socket = tls.connect(opts); + } else { + socket = net.connect(opts); + } + return socket; +}); + +// Everything else works just like normal... +http.get(parsed, function (res) { + console.log('"response" event!', res.headers); + res.pipe(process.stdout); +}); +``` + +Returning a Promise or using an `async` function is also supported: + +```js +agent(async function (req, opts) { + await sleep(1000); + // etc… +}); +``` + +Return another `http.Agent` instance to "pass through" the responsibility +for that HTTP request to that agent: + +```js +agent(function (req, opts) { + return opts.secureEndpoint ? https.globalAgent : http.globalAgent; +}); +``` + + +API +--- + +## Agent(Function callback[, Object options]) → [http.Agent][] + +Creates a base `http.Agent` that will execute the callback function `callback` +for every HTTP request that it is used as the `agent` for. The callback function +is responsible for creating a `stream.Duplex` instance of some kind that will be +used as the underlying socket in the HTTP request. + +The `options` object accepts the following properties: + + * `timeout` - Number - Timeout for the `callback()` function in milliseconds. Defaults to Infinity (optional). + +The callback function should have the following signature: + +### callback(http.ClientRequest req, Object options, Function cb) → undefined + +The ClientRequest `req` can be accessed to read request headers and +and the path, etc. The `options` object contains the options passed +to the `http.request()`/`https.request()` function call, and is formatted +to be directly passed to `net.connect()`/`tls.connect()`, or however +else you want a Socket to be created. Pass the created socket to +the callback function `cb` once created, and the HTTP request will +continue to proceed. + +If the `https` module is used to invoke the HTTP request, then the +`secureEndpoint` property on `options` _will be set to `true`_. + + +License +------- + +(The MIT License) + +Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net> + +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. + +[http-proxy-agent]: https://github.com/TooTallNate/node-http-proxy-agent +[https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent +[pac-proxy-agent]: https://github.com/TooTallNate/node-pac-proxy-agent +[socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent +[http.Agent]: https://nodejs.org/api/http.html#http_class_http_agent diff --git a/deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/index.js b/deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/index.js new file mode 100644 index 00000000000000..0ee6b29699a670 --- /dev/null +++ b/deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/index.js @@ -0,0 +1,170 @@ +'use strict'; +require('./patch-core'); +const inherits = require('util').inherits; +const promisify = require('es6-promisify'); +const EventEmitter = require('events').EventEmitter; + +module.exports = Agent; + +function isAgent(v) { + return v && typeof v.addRequest === 'function'; +} + +/** + * Base `http.Agent` implementation. + * No pooling/keep-alive is implemented by default. + * + * @param {Function} callback + * @api public + */ +function Agent(callback, _opts) { + if (!(this instanceof Agent)) { + return new Agent(callback, _opts); + } + + EventEmitter.call(this); + + // The callback gets promisified if it has 3 parameters + // (i.e. it has a callback function) lazily + this._promisifiedCallback = false; + + let opts = _opts; + if ('function' === typeof callback) { + this.callback = callback; + } else if (callback) { + opts = callback; + } + + // timeout for the socket to be returned from the callback + this.timeout = (opts && opts.timeout) || null; + + this.options = opts; +} +inherits(Agent, EventEmitter); + +/** + * Override this function in your subclass! + */ +Agent.prototype.callback = function callback(req, opts) { + throw new Error( + '"agent-base" has no default implementation, you must subclass and override `callback()`' + ); +}; + +/** + * Called by node-core's "_http_client.js" module when creating + * a new HTTP request with this Agent instance. + * + * @api public + */ +Agent.prototype.addRequest = function addRequest(req, _opts) { + const ownOpts = Object.assign({}, _opts); + + // Set default `host` for HTTP to localhost + if (null == ownOpts.host) { + ownOpts.host = 'localhost'; + } + + // Set default `port` for HTTP if none was explicitly specified + if (null == ownOpts.port) { + ownOpts.port = ownOpts.secureEndpoint ? 443 : 80; + } + + const opts = Object.assign({}, this.options, ownOpts); + + if (opts.host && opts.path) { + // If both a `host` and `path` are specified then it's most likely the + // result of a `url.parse()` call... we need to remove the `path` portion so + // that `net.connect()` doesn't attempt to open that as a unix socket file. + delete opts.path; + } + + delete opts.agent; + delete opts.hostname; + delete opts._defaultAgent; + delete opts.defaultPort; + delete opts.createConnection; + + // Hint to use "Connection: close" + // XXX: non-documented `http` module API :( + req._last = true; + req.shouldKeepAlive = false; + + // Create the `stream.Duplex` instance + let timeout; + let timedOut = false; + const timeoutMs = this.timeout; + const freeSocket = this.freeSocket; + + function onerror(err) { + if (req._hadError) return; + req.emit('error', err); + // For Safety. Some additional errors might fire later on + // and we need to make sure we don't double-fire the error event. + req._hadError = true; + } + + function ontimeout() { + timeout = null; + timedOut = true; + const err = new Error( + 'A "socket" was not created for HTTP request before ' + timeoutMs + 'ms' + ); + err.code = 'ETIMEOUT'; + onerror(err); + } + + function callbackError(err) { + if (timedOut) return; + if (timeout != null) { + clearTimeout(timeout); + timeout = null; + } + onerror(err); + } + + function onsocket(socket) { + if (timedOut) return; + if (timeout != null) { + clearTimeout(timeout); + timeout = null; + } + if (isAgent(socket)) { + // `socket` is actually an http.Agent instance, so relinquish + // responsibility for this `req` to the Agent from here on + socket.addRequest(req, opts); + } else if (socket) { + function onfree() { + freeSocket(socket, opts); + } + socket.on('free', onfree); + req.onSocket(socket); + } else { + const err = new Error( + 'no Duplex stream was returned to agent-base for `' + req.method + ' ' + req.path + '`' + ); + onerror(err); + } + } + + if (!this._promisifiedCallback && this.callback.length >= 3) { + // Legacy callback function - convert to a Promise + this.callback = promisify(this.callback, this); + this._promisifiedCallback = true; + } + + if (timeoutMs > 0) { + timeout = setTimeout(ontimeout, timeoutMs); + } + + try { + Promise.resolve(this.callback(req, opts)).then(onsocket, callbackError); + } catch (err) { + Promise.reject(err).catch(callbackError); + } +}; + +Agent.prototype.freeSocket = function freeSocket(socket, opts) { + // TODO reuse sockets + socket.destroy(); +}; diff --git a/deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/package.json b/deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/package.json new file mode 100644 index 00000000000000..01139d0a640006 --- /dev/null +++ b/deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/package.json @@ -0,0 +1,65 @@ +{ + "_from": "agent-base@~4.2.1", + "_id": "agent-base@4.2.1", + "_inBundle": false, + "_integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", + "_location": "/socks-proxy-agent/agent-base", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "agent-base@~4.2.1", + "name": "agent-base", + "escapedName": "agent-base", + "rawSpec": "~4.2.1", + "saveSpec": null, + "fetchSpec": "~4.2.1" + }, + "_requiredBy": [ + "/socks-proxy-agent" + ], + "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", + "_shasum": "d89e5999f797875674c07d87f260fc41e83e8ca9", + "_spec": "agent-base@~4.2.1", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/socks-proxy-agent", + "author": { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", + "url": "http://n8.io/" + }, + "bugs": { + "url": "https://github.com/TooTallNate/node-agent-base/issues" + }, + "bundleDependencies": false, + "dependencies": { + "es6-promisify": "^5.0.0" + }, + "deprecated": false, + "description": "Turn a function into an `http.Agent` instance", + "devDependencies": { + "mocha": "^3.4.2", + "ws": "^3.0.0" + }, + "engines": { + "node": ">= 4.0.0" + }, + "homepage": "https://github.com/TooTallNate/node-agent-base#readme", + "keywords": [ + "http", + "agent", + "base", + "barebones", + "https" + ], + "license": "MIT", + "main": "./index.js", + "name": "agent-base", + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/node-agent-base.git" + }, + "scripts": { + "test": "mocha --reporter spec" + }, + "version": "4.2.1" +} diff --git a/deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js b/deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js new file mode 100644 index 00000000000000..47d26a72b0a65e --- /dev/null +++ b/deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js @@ -0,0 +1,37 @@ +'use strict'; +const url = require('url'); +const https = require('https'); + +/** + * This currently needs to be applied to all Node.js versions + * in order to determine if the `req` is an HTTP or HTTPS request. + * + * There is currently no PR attempting to move this property upstream. + */ +https.request = (function(request) { + return function(_options, cb) { + let options; + if (typeof _options === 'string') { + options = url.parse(_options); + } else { + options = Object.assign({}, _options); + } + if (null == options.port) { + options.port = 443; + } + options.secureEndpoint = true; + return request.call(https, options, cb); + }; +})(https.request); + +/** + * This is needed for Node.js >= 9.0.0 to make sure `https.get()` uses the + * patched `https.request()`. + * + * Ref: https://github.com/nodejs/node/commit/5118f31 + */ +https.get = function(options, cb) { + const req = https.request(options, cb); + req.end(); + return req; +}; diff --git a/deps/npm/node_modules/https-proxy-agent/test/ssl-cert-snakeoil.key b/deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/test/ssl-cert-snakeoil.key similarity index 100% rename from deps/npm/node_modules/https-proxy-agent/test/ssl-cert-snakeoil.key rename to deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/test/ssl-cert-snakeoil.key diff --git a/deps/npm/node_modules/https-proxy-agent/test/ssl-cert-snakeoil.pem b/deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/test/ssl-cert-snakeoil.pem similarity index 100% rename from deps/npm/node_modules/https-proxy-agent/test/ssl-cert-snakeoil.pem rename to deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/test/ssl-cert-snakeoil.pem diff --git a/deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js b/deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js new file mode 100644 index 00000000000000..6a8ca68e0dcbf7 --- /dev/null +++ b/deps/npm/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js @@ -0,0 +1,697 @@ +/** + * Module dependencies. + */ + +var fs = require('fs'); +var url = require('url'); +var net = require('net'); +var tls = require('tls'); +var http = require('http'); +var https = require('https'); +var WebSocket = require('ws'); +var assert = require('assert'); +var events = require('events'); +var inherits = require('util').inherits; +var Agent = require('../'); + +var PassthroughAgent = Agent(function(req, opts) { + return opts.secureEndpoint ? https.globalAgent : http.globalAgent; +}); + +describe('Agent', function() { + describe('subclass', function() { + it('should be subclassable', function(done) { + function MyAgent() { + Agent.call(this); + } + inherits(MyAgent, Agent); + + MyAgent.prototype.callback = function(req, opts, fn) { + assert.equal(req.path, '/foo'); + assert.equal(req.getHeader('host'), '127.0.0.1:1234'); + assert.equal(opts.secureEndpoint, true); + done(); + }; + + var info = url.parse('https://127.0.0.1:1234/foo'); + info.agent = new MyAgent(); + https.get(info); + }); + }); + describe('options', function() { + it('should support an options Object as first argument', function() { + var agent = new Agent({ timeout: 1000 }); + assert.equal(1000, agent.timeout); + }); + it('should support an options Object as second argument', function() { + var agent = new Agent(function() {}, { timeout: 1000 }); + assert.equal(1000, agent.timeout); + }); + it('should be mixed in with HTTP request options', function(done) { + var agent = new Agent({ + host: 'my-proxy.com', + port: 3128, + foo: 'bar' + }); + agent.callback = function(req, opts, fn) { + assert.equal('bar', opts.foo); + assert.equal('a', opts.b); + + // `host` and `port` are special-cases, and should always be + // overwritten in the request `opts` inside the agent-base callback + assert.equal('localhost', opts.host); + assert.equal(80, opts.port); + done(); + }; + var opts = { + b: 'a', + agent: agent + }; + http.get(opts); + }); + }); + describe('`this` context', function() { + it('should be the Agent instance', function(done) { + var called = false; + var agent = new Agent(); + agent.callback = function() { + called = true; + assert.equal(this, agent); + }; + var info = url.parse('http://127.0.0.1/foo'); + info.agent = agent; + var req = http.get(info); + req.on('error', function(err) { + assert(/no Duplex stream was returned/.test(err.message)); + done(); + }); + }); + it('should be the Agent instance with callback signature', function(done) { + var called = false; + var agent = new Agent(); + agent.callback = function(req, opts, fn) { + called = true; + assert.equal(this, agent); + fn(); + }; + var info = url.parse('http://127.0.0.1/foo'); + info.agent = agent; + var req = http.get(info); + req.on('error', function(err) { + assert(/no Duplex stream was returned/.test(err.message)); + done(); + }); + }); + }); + describe('"error" event', function() { + it('should be invoked on `http.ClientRequest` instance if `callback()` has not been defined', function( + done + ) { + var agent = new Agent(); + var info = url.parse('http://127.0.0.1/foo'); + info.agent = agent; + var req = http.get(info); + req.on('error', function(err) { + assert.equal( + '"agent-base" has no default implementation, you must subclass and override `callback()`', + err.message + ); + done(); + }); + }); + it('should be invoked on `http.ClientRequest` instance if Error passed to callback function on the first tick', function( + done + ) { + var agent = new Agent(function(req, opts, fn) { + fn(new Error('is this caught?')); + }); + var info = url.parse('http://127.0.0.1/foo'); + info.agent = agent; + var req = http.get(info); + req.on('error', function(err) { + assert.equal('is this caught?', err.message); + done(); + }); + }); + it('should be invoked on `http.ClientRequest` instance if Error passed to callback function after the first tick', function( + done + ) { + var agent = new Agent(function(req, opts, fn) { + setTimeout(function() { + fn(new Error('is this caught?')); + }, 10); + }); + var info = url.parse('http://127.0.0.1/foo'); + info.agent = agent; + var req = http.get(info); + req.on('error', function(err) { + assert.equal('is this caught?', err.message); + done(); + }); + }); + }); + describe('artificial "streams"', function() { + it('should send a GET request', function(done) { + var stream = new events.EventEmitter(); + + // needed for the `http` module to call .write() on the stream + stream.writable = true; + + stream.write = function(str) { + assert(0 == str.indexOf('GET / HTTP/1.1')); + done(); + }; + + // needed for `http` module in Node.js 4 + stream.cork = function() {}; + + var opts = { + method: 'GET', + host: '127.0.0.1', + path: '/', + port: 80, + agent: new Agent(function(req, opts, fn) { + fn(null, stream); + }) + }; + var req = http.request(opts); + req.end(); + }); + it('should receive a GET response', function(done) { + var stream = new events.EventEmitter(); + var opts = { + method: 'GET', + host: '127.0.0.1', + path: '/', + port: 80, + agent: new Agent(function(req, opts, fn) { + fn(null, stream); + }) + }; + var req = http.request(opts, function(res) { + assert.equal('0.9', res.httpVersion); + assert.equal(111, res.statusCode); + assert.equal('bar', res.headers.foo); + done(); + }); + + // have to wait for the "socket" event since `http.ClientRequest` + // doesn't *actually* attach the listeners to the "stream" until + // this happens + req.once('socket', function() { + var buf = new Buffer( + 'HTTP/0.9 111\r\n' + + 'Foo: bar\r\n' + + 'Set-Cookie: 1\r\n' + + 'Set-Cookie: 2\r\n\r\n' + ); + stream.emit('data', buf); + }); + + req.end(); + }); + }); +}); + +describe('"http" module', function() { + var server; + var port; + + // setup test HTTP server + before(function(done) { + server = http.createServer(); + server.listen(0, function() { + port = server.address().port; + done(); + }); + }); + + // shut down test HTTP server + after(function(done) { + server.once('close', function() { + done(); + }); + server.close(); + }); + + it('should work for basic HTTP requests', function(done) { + var called = false; + var agent = new Agent(function(req, opts, fn) { + called = true; + var socket = net.connect(opts); + fn(null, socket); + }); + + // add HTTP server "request" listener + var gotReq = false; + server.once('request', function(req, res) { + gotReq = true; + res.setHeader('X-Foo', 'bar'); + res.setHeader('X-Url', req.url); + res.end(); + }); + + var info = url.parse('http://127.0.0.1:' + port + '/foo'); + info.agent = agent; + http.get(info, function(res) { + assert.equal('bar', res.headers['x-foo']); + assert.equal('/foo', res.headers['x-url']); + assert(gotReq); + assert(called); + done(); + }); + }); + + it('should support direct return in `connect()`', function(done) { + var called = false; + var agent = new Agent(function(req, opts) { + called = true; + return net.connect(opts); + }); + + // add HTTP server "request" listener + var gotReq = false; + server.once('request', function(req, res) { + gotReq = true; + res.setHeader('X-Foo', 'bar'); + res.setHeader('X-Url', req.url); + res.end(); + }); + + var info = url.parse('http://127.0.0.1:' + port + '/foo'); + info.agent = agent; + http.get(info, function(res) { + assert.equal('bar', res.headers['x-foo']); + assert.equal('/foo', res.headers['x-url']); + assert(gotReq); + assert(called); + done(); + }); + }); + + it('should support returning a Promise in `connect()`', function(done) { + var called = false; + var agent = new Agent(function(req, opts) { + return new Promise(function(resolve, reject) { + called = true; + resolve(net.connect(opts)); + }); + }); + + // add HTTP server "request" listener + var gotReq = false; + server.once('request', function(req, res) { + gotReq = true; + res.setHeader('X-Foo', 'bar'); + res.setHeader('X-Url', req.url); + res.end(); + }); + + var info = url.parse('http://127.0.0.1:' + port + '/foo'); + info.agent = agent; + http.get(info, function(res) { + assert.equal('bar', res.headers['x-foo']); + assert.equal('/foo', res.headers['x-url']); + assert(gotReq); + assert(called); + done(); + }); + }); + + it('should set the `Connection: close` response header', function(done) { + var called = false; + var agent = new Agent(function(req, opts, fn) { + called = true; + var socket = net.connect(opts); + fn(null, socket); + }); + + // add HTTP server "request" listener + var gotReq = false; + server.once('request', function(req, res) { + gotReq = true; + res.setHeader('X-Url', req.url); + assert.equal('close', req.headers.connection); + res.end(); + }); + + var info = url.parse('http://127.0.0.1:' + port + '/bar'); + info.agent = agent; + http.get(info, function(res) { + assert.equal('/bar', res.headers['x-url']); + assert.equal('close', res.headers.connection); + assert(gotReq); + assert(called); + done(); + }); + }); + + it('should pass through options from `http.request()`', function(done) { + var agent = new Agent(function(req, opts, fn) { + assert.equal('google.com', opts.host); + assert.equal('bar', opts.foo); + done(); + }); + + http.get({ + host: 'google.com', + foo: 'bar', + agent: agent + }); + }); + + it('should default to port 80', function(done) { + var agent = new Agent(function(req, opts, fn) { + assert.equal(80, opts.port); + done(); + }); + + // (probably) not hitting a real HTTP server here, + // so no need to add a httpServer request listener + http.get({ + host: '127.0.0.1', + path: '/foo', + agent: agent + }); + }); + + it('should support the "timeout" option', function(done) { + // ensure we timeout after the "error" event had a chance to trigger + this.timeout(1000); + this.slow(800); + + var agent = new Agent( + function(req, opts, fn) { + // this function will time out + }, + { timeout: 100 } + ); + + var opts = url.parse('http://nodejs.org'); + opts.agent = agent; + + var req = http.get(opts); + req.once('error', function(err) { + assert.equal('ETIMEOUT', err.code); + req.abort(); + done(); + }); + }); + + it('should free sockets after use', function(done) { + var agent = new Agent(function(req, opts, fn) { + var socket = net.connect(opts); + fn(null, socket); + }); + + // add HTTP server "request" listener + var gotReq = false; + server.once('request', function(req, res) { + gotReq = true; + res.end(); + }); + + var info = url.parse('http://127.0.0.1:' + port + '/foo'); + info.agent = agent; + http.get(info, function(res) { + res.socket.emit('free'); + assert.equal(true, res.socket.destroyed); + assert(gotReq); + done(); + }); + }); + + + describe('PassthroughAgent', function() { + it('should pass through to `http.globalAgent`', function(done) { + // add HTTP server "request" listener + var gotReq = false; + server.once('request', function(req, res) { + gotReq = true; + res.setHeader('X-Foo', 'bar'); + res.setHeader('X-Url', req.url); + res.end(); + }); + + var info = url.parse('http://127.0.0.1:' + port + '/foo'); + info.agent = PassthroughAgent; + http.get(info, function(res) { + assert.equal('bar', res.headers['x-foo']); + assert.equal('/foo', res.headers['x-url']); + assert(gotReq); + done(); + }); + }); + }); +}); + +describe('"https" module', function() { + var server; + var port; + + // setup test HTTPS server + before(function(done) { + var options = { + key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'), + cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem') + }; + server = https.createServer(options); + server.listen(0, function() { + port = server.address().port; + done(); + }); + }); + + // shut down test HTTP server + after(function(done) { + server.once('close', function() { + done(); + }); + server.close(); + }); + + it('should not modify the passed in Options object', function(done) { + var called = false; + var agent = new Agent(function(req, opts, fn) { + called = true; + assert.equal(true, opts.secureEndpoint); + assert.equal(443, opts.port); + assert.equal('localhost', opts.host); + }); + var opts = { agent: agent }; + var req = https.request(opts); + assert.equal(true, called); + assert.equal(false, 'secureEndpoint' in opts); + assert.equal(false, 'port' in opts); + done(); + }); + + it('should work with a String URL', function(done) { + var endpoint = 'https://127.0.0.1:' + port; + var req = https.get(endpoint); + + // it's gonna error out since `rejectUnauthorized` is not being passed in + req.on('error', function(err) { + assert.equal(err.code, 'DEPTH_ZERO_SELF_SIGNED_CERT'); + done(); + }); + }); + + it('should work for basic HTTPS requests', function(done) { + var called = false; + var agent = new Agent(function(req, opts, fn) { + called = true; + assert(opts.secureEndpoint); + var socket = tls.connect(opts); + fn(null, socket); + }); + + // add HTTPS server "request" listener + var gotReq = false; + server.once('request', function(req, res) { + gotReq = true; + res.setHeader('X-Foo', 'bar'); + res.setHeader('X-Url', req.url); + res.end(); + }); + + var info = url.parse('https://127.0.0.1:' + port + '/foo'); + info.agent = agent; + info.rejectUnauthorized = false; + https.get(info, function(res) { + assert.equal('bar', res.headers['x-foo']); + assert.equal('/foo', res.headers['x-url']); + assert(gotReq); + assert(called); + done(); + }); + }); + + it('should pass through options from `https.request()`', function(done) { + var agent = new Agent(function(req, opts, fn) { + assert.equal('google.com', opts.host); + assert.equal('bar', opts.foo); + done(); + }); + + https.get({ + host: 'google.com', + foo: 'bar', + agent: agent + }); + }); + + it('should default to port 443', function(done) { + var agent = new Agent(function(req, opts, fn) { + assert.equal(true, opts.secureEndpoint); + assert.equal(false, opts.rejectUnauthorized); + assert.equal(443, opts.port); + done(); + }); + + // (probably) not hitting a real HTTPS server here, + // so no need to add a httpsServer request listener + https.get({ + host: '127.0.0.1', + path: '/foo', + agent: agent, + rejectUnauthorized: false + }); + }); + + describe('PassthroughAgent', function() { + it('should pass through to `https.globalAgent`', function(done) { + // add HTTP server "request" listener + var gotReq = false; + server.once('request', function(req, res) { + gotReq = true; + res.setHeader('X-Foo', 'bar'); + res.setHeader('X-Url', req.url); + res.end(); + }); + + var info = url.parse('https://127.0.0.1:' + port + '/foo'); + info.agent = PassthroughAgent; + info.rejectUnauthorized = false; + https.get(info, function(res) { + assert.equal('bar', res.headers['x-foo']); + assert.equal('/foo', res.headers['x-url']); + assert(gotReq); + done(); + }); + }); + }); +}); + +describe('"ws" server', function() { + var wss; + var server; + var port; + + // setup test HTTP server + before(function(done) { + server = http.createServer(); + wss = new WebSocket.Server({ server: server }); + server.listen(0, function() { + port = server.address().port; + done(); + }); + }); + + // shut down test HTTP server + after(function(done) { + server.once('close', function() { + done(); + }); + server.close(); + }); + + it('should work for basic WebSocket connections', function(done) { + function onconnection(ws) { + ws.on('message', function(data) { + assert.equal('ping', data); + ws.send('pong'); + }); + } + wss.on('connection', onconnection); + + var agent = new Agent(function(req, opts, fn) { + var socket = net.connect(opts); + fn(null, socket); + }); + + var client = new WebSocket('ws://127.0.0.1:' + port + '/', { + agent: agent + }); + + client.on('open', function() { + client.send('ping'); + }); + + client.on('message', function(data) { + assert.equal('pong', data); + client.close(); + wss.removeListener('connection', onconnection); + done(); + }); + }); +}); + +describe('"wss" server', function() { + var wss; + var server; + var port; + + // setup test HTTP server + before(function(done) { + var options = { + key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'), + cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem') + }; + server = https.createServer(options); + wss = new WebSocket.Server({ server: server }); + server.listen(0, function() { + port = server.address().port; + done(); + }); + }); + + // shut down test HTTP server + after(function(done) { + server.once('close', function() { + done(); + }); + server.close(); + }); + + it('should work for secure WebSocket connections', function(done) { + function onconnection(ws) { + ws.on('message', function(data) { + assert.equal('ping', data); + ws.send('pong'); + }); + } + wss.on('connection', onconnection); + + var agent = new Agent(function(req, opts, fn) { + var socket = tls.connect(opts); + fn(null, socket); + }); + + var client = new WebSocket('wss://127.0.0.1:' + port + '/', { + agent: agent, + rejectUnauthorized: false + }); + + client.on('open', function() { + client.send('ping'); + }); + + client.on('message', function(data) { + assert.equal('pong', data); + client.close(); + wss.removeListener('connection', onconnection); + done(); + }); + }); +}); diff --git a/deps/npm/node_modules/socks-proxy-agent/package.json b/deps/npm/node_modules/socks-proxy-agent/package.json index 02ca38c7923c9b..7f7023f5a76d22 100644 --- a/deps/npm/node_modules/socks-proxy-agent/package.json +++ b/deps/npm/node_modules/socks-proxy-agent/package.json @@ -1,10 +1,12 @@ { "_from": "socks-proxy-agent@^4.0.0", - "_id": "socks-proxy-agent@4.0.1", + "_id": "socks-proxy-agent@4.0.2", "_inBundle": false, - "_integrity": "sha512-Kezx6/VBguXOsEe5oU3lXYyKMi4+gva72TwJ7pQY5JfqUx2nMk7NXA6z/mpNqIlfQjWYVfeuNvQjexiTaTn6Nw==", + "_integrity": "sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg==", "_location": "/socks-proxy-agent", - "_phantomChildren": {}, + "_phantomChildren": { + "es6-promisify": "5.0.0" + }, "_requested": { "type": "range", "registry": true, @@ -18,10 +20,10 @@ "_requiredBy": [ "/make-fetch-happen" ], - "_resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.1.tgz", - "_shasum": "5936bf8b707a993079c6f37db2091821bffa6473", + "_resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz", + "_shasum": "3c8991f3145b2799e70e11bd5fbc8b1963116386", "_spec": "socks-proxy-agent@^4.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/make-fetch-happen", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/make-fetch-happen", "author": { "name": "Nathan Rajlich", "email": "nathan@tootallnate.net", @@ -32,8 +34,8 @@ }, "bundleDependencies": false, "dependencies": { - "agent-base": "~4.2.0", - "socks": "~2.2.0" + "agent-base": "~4.2.1", + "socks": "~2.3.2" }, "deprecated": false, "description": "A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS", @@ -65,5 +67,5 @@ "scripts": { "test": "mocha --reporter spec" }, - "version": "4.0.1" + "version": "4.0.2" } diff --git a/deps/npm/node_modules/socks-proxy-agent/yarn.lock b/deps/npm/node_modules/socks-proxy-agent/yarn.lock new file mode 100644 index 00000000000000..337f8152b79dcf --- /dev/null +++ b/deps/npm/node_modules/socks-proxy-agent/yarn.lock @@ -0,0 +1,354 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +agent-base@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" + integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg== + dependencies: + es6-promisify "^5.0.0" + +async@0.2.x: + version "0.2.10" + resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" + integrity sha1-trvgsGdLnXGXCMo43owjfLUmw9E= + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +bytes@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" + integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= + +cli@0.4.x: + version "0.4.5" + resolved "https://registry.yarnpkg.com/cli/-/cli-0.4.5.tgz#78f9485cd161b566e9a6c72d7170c4270e81db61" + integrity sha1-ePlIXNFhtWbppsctcXDEJw6B22E= + dependencies: + glob ">= 3.1.4" + +cliff@0.1.x: + version "0.1.10" + resolved "https://registry.yarnpkg.com/cliff/-/cliff-0.1.10.tgz#53be33ea9f59bec85609ee300ac4207603e52013" + integrity sha1-U74z6p9ZvshWCe4wCsQgdgPlIBM= + dependencies: + colors "~1.0.3" + eyes "~0.1.8" + winston "0.8.x" + +colors@0.6.x: + version "0.6.2" + resolved "https://registry.yarnpkg.com/colors/-/colors-0.6.2.tgz#2423fe6678ac0c5dae8852e5d0e5be08c997abcc" + integrity sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w= + +colors@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" + integrity sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs= + +commander@2.11.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" + integrity sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +cycle@1.0.x: + version "1.0.3" + resolved "https://registry.yarnpkg.com/cycle/-/cycle-1.0.3.tgz#21e80b2be8580f98b468f379430662b046c34ad2" + integrity sha1-IegLK+hYD5i0aPN5QwZisEbDStI= + +debug@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + +diff@3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== + +es6-promise@^4.0.3: + version "4.2.6" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.6.tgz#b685edd8258886365ea62b57d30de28fadcd974f" + integrity sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= + dependencies: + es6-promise "^4.0.3" + +escape-string-regexp@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +eyes@0.1.x, eyes@~0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" + integrity sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A= + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +glob@7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + integrity sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +"glob@>= 3.1.4": + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +growl@1.10.3: + version "1.10.3" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.3.tgz#1926ba90cf3edfe2adb4927f5880bc22c66c790f" + integrity sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q== + +has-flag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" + integrity sha1-6CB68cx7MNRGzHC3NLXovhj4jVE= + +he@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" + integrity sha1-k0EP0hsAlzUVH4howvJx80J+I/0= + +http-errors@1.6.3: + version "1.6.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" + integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.0" + statuses ">= 1.4.0 < 2" + +iconv-lite@0.4.23: + version "0.4.23" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" + integrity sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + +ip@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" + integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= + +ipv6@*: + version "3.1.3" + resolved "https://registry.yarnpkg.com/ipv6/-/ipv6-3.1.3.tgz#4d9064f9c2dafa0dd10b8b7d76ffca4aad31b3b9" + integrity sha1-TZBk+cLa+g3RC4t9dv/KSq0xs7k= + dependencies: + cli "0.4.x" + cliff "0.1.x" + sprintf "0.1.x" + +isstream@0.1.x: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + +minimatch@3.0.4, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= + +mkdirp@0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= + dependencies: + minimist "0.0.8" + +mocha@~5.1.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.1.1.tgz#b774c75609dac05eb48f4d9ba1d827b97fde8a7b" + integrity sha512-kKKs/H1KrMMQIEsWNxGmb4/BGsmj0dkeyotEvbrAuQ01FcWRLssUNXCEUZk6SZtyJBi6EE7SL0zDDtItw1rGhw== + dependencies: + browser-stdout "1.3.1" + commander "2.11.0" + debug "3.1.0" + diff "3.5.0" + escape-string-regexp "1.0.5" + glob "7.1.2" + growl "1.10.3" + he "1.1.1" + minimatch "3.0.4" + mkdirp "0.5.1" + supports-color "4.4.0" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +pkginfo@0.3.x: + version "0.3.1" + resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.3.1.tgz#5b29f6a81f70717142e09e765bbeab97b4f81e21" + integrity sha1-Wyn2qB9wcXFC4J52W76rl7T4HiE= + +raw-body@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3" + integrity sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw== + dependencies: + bytes "3.0.0" + http-errors "1.6.3" + iconv-lite "0.4.23" + unpipe "1.0.0" + +"safer-buffer@>= 2.1.2 < 3": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +setprototypeof@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== + +smart-buffer@4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.0.2.tgz#5207858c3815cc69110703c6b94e46c15634395d" + integrity sha512-JDhEpTKzXusOqXZ0BUIdH+CjFdO/CR3tLlf5CN34IypI+xMmXW1uB16OOY8z3cICbJlDAVJzNbwBhNO0wt9OAw== + +socks@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.3.2.tgz#ade388e9e6d87fdb11649c15746c578922a5883e" + integrity sha512-pCpjxQgOByDHLlNqlnh/mNSAxIUkyBBuwwhTcV+enZGbDaClPvHdvm6uvOwZfFJkam7cGhBNbb4JxiP8UZkRvQ== + dependencies: + ip "^1.1.5" + smart-buffer "4.0.2" + +socksv5@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/socksv5/-/socksv5-0.0.6.tgz#1327235ff7e8de21ac434a0a579dc69c3f071061" + integrity sha1-EycjX/fo3iGsQ0oKV53GnD8HEGE= + dependencies: + ipv6 "*" + +sprintf@0.1.x: + version "0.1.5" + resolved "https://registry.yarnpkg.com/sprintf/-/sprintf-0.1.5.tgz#8f83e39a9317c1a502cb7db8050e51c679f6edcf" + integrity sha1-j4PjmpMXwaUCy324BQ5Rxnn27c8= + +stack-trace@0.0.x: + version "0.0.10" + resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" + integrity sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA= + +"statuses@>= 1.4.0 < 2": + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + +supports-color@4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e" + integrity sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ== + dependencies: + has-flag "^2.0.0" + +unpipe@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + +winston@0.8.x: + version "0.8.3" + resolved "https://registry.yarnpkg.com/winston/-/winston-0.8.3.tgz#64b6abf4cd01adcaefd5009393b1d8e8bec19db0" + integrity sha1-ZLar9M0Brcrv1QCTk7HY6L7BnbA= + dependencies: + async "0.2.x" + colors "0.6.x" + cycle "1.0.x" + eyes "0.1.x" + isstream "0.1.x" + pkginfo "0.3.x" + stack-trace "0.0.x" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= diff --git a/deps/npm/node_modules/socks/README.md b/deps/npm/node_modules/socks/README.md index e45e9a277f9bc4..1aca04ac147387 100644 --- a/deps/npm/node_modules/socks/README.md +++ b/deps/npm/node_modules/socks/README.md @@ -47,7 +47,7 @@ Connect to github.com (192.30.253.113) on port 80, using a SOCKS proxy. ```javascript const options = { proxy: { - ipaddress: '159.203.75.200', + host: '159.203.75.200', // ipv4 or ipv6 or hostname port: 1080, type: 5 // Proxy version (4 or 5) }, @@ -106,12 +106,12 @@ const options = { command: 'connect', // Only the connect command is supported when chaining proxies. proxies: [ // The chain order is the order in the proxies array, meaning the last proxy will establish a connection to the destination. { - ipaddress: '159.203.75.235', + host: '159.203.75.235', // ipv4, ipv6, or hostname port: 1081, type: 5 }, { - ipaddress: '104.131.124.203', + host: '104.131.124.203', // ipv4, ipv6, or hostname port: 1081, type: 5 } @@ -252,7 +252,7 @@ When the bind command is sent to a SOCKS v4/v5 proxy server, the proxy server st ```javascript const options = { proxy: { - ipaddress: '159.203.75.235', + host: '159.203.75.235', // ipv4, ipv6, or hostname port: 1081, type: 5 }, @@ -314,7 +314,7 @@ When the associate command is sent to a SOCKS v5 proxy server, it sets up a UDP ```javascript const options = { proxy: { - ipaddress: '159.203.75.235', + host: '159.203.75.235', // ipv4, ipv6, or hostname port: 1081, type: 5 }, @@ -417,7 +417,7 @@ SocksClient supports creating connections using callbacks, promises, and async/a ```typescript { proxy: { - ipaddress: '159.203.75.200', // ipv4 or ipv6 + host: '159.203.75.200', // ipv4, ipv6, or hostname port: 1080, type: 5 // Proxy version (4 or 5). For v4a, just use 4. @@ -434,7 +434,9 @@ SocksClient supports creating connections using callbacks, promises, and async/a }, // Optional fields - timeout: 30000; // How long to wait to establish a proxy connection. (defaults to 30 seconds) + timeout: 30000, // How long to wait to establish a proxy connection. (defaults to 30 seconds) + + set_tcp_nodelay: true // If true, will turn on the underlying sockets TCP_NODELAY option. } ``` @@ -450,7 +452,7 @@ Creates a new proxy connection through the given proxy to the given destination ```typescript const options = { proxy: { - ipaddress: '159.203.75.200', // ipv4 or ipv6 + host: '159.203.75.200', // ipv4, ipv6, or hostname port: 1080, type: 5 // Proxy version (4 or 5) }, @@ -458,7 +460,7 @@ const options = { command: 'connect', // connect, bind, associate destination: { - host: '192.30.253.113', // ipv4, ipv6, hostname + host: '192.30.253.113', // ipv4, ipv6, or hostname port: 80 } } @@ -522,12 +524,12 @@ Creates a new proxy connection chain through a list of at least two SOCKS proxie const options = { proxies: [ // The chain order is the order in the proxies array, meaning the last proxy will establish a connection to the destination. { - ipaddress: '159.203.75.235', // ipv4 or ipv6 + host: '159.203.75.235', // ipv4, ipv6, or hostname port: 1081, type: 5 }, { - ipaddress: '104.131.124.203', // ipv4 or ipv6 + host: '104.131.124.203', // ipv4, ipv6, or hostname port: 1081, type: 5 } diff --git a/deps/npm/node_modules/socks/build/client/socksclient.js b/deps/npm/node_modules/socks/build/client/socksclient.js index 0a58fe53372c76..10871ff625c265 100644 --- a/deps/npm/node_modules/socks/build/client/socksclient.js +++ b/deps/npm/node_modules/socks/build/client/socksclient.js @@ -202,7 +202,11 @@ class SocksClient extends events_1.EventEmitter { this._onError = (err) => this.onError(err); this._onConnect = () => this.onConnect(); // Start timeout timer (defaults to 30 seconds) - setTimeout(() => this.onEstablishedTimeout(), this._options.timeout || constants_1.DEFAULT_TIMEOUT); + const timer = setTimeout(() => this.onEstablishedTimeout(), this._options.timeout || constants_1.DEFAULT_TIMEOUT); + // check whether unref is available as it differs from browser to NodeJS (#33) + if (timer.unref && typeof timer.unref === 'function') { + timer.unref(); + } // If an existing socket is provided, use it to negotiate SOCKS handshake. Otherwise create a new Socket. if (existing_socket) { this._socket = existing_socket; @@ -221,7 +225,11 @@ class SocksClient extends events_1.EventEmitter { this._socket.emit('connect'); } else { - this._socket.connect(this._options.proxy.port, this._options.proxy.ipaddress); + this._socket.connect(this._options.proxy.port, this._options.proxy.host || this._options.proxy.ipaddress); + if (this._options.set_tcp_nodelay !== undefined && + this._options.set_tcp_nodelay !== null) { + this._socket.setNoDelay(!!this._options.set_tcp_nodelay); + } } // Listen for established event so we can re-emit any excess data received during handshakes. this.prependOnceListener('established', info => { @@ -442,9 +450,17 @@ class SocksClient extends events_1.EventEmitter { sendSocks5InitialHandshake() { const buff = new smart_buffer_1.SmartBuffer(); buff.writeUInt8(0x05); - buff.writeUInt8(2); - buff.writeUInt8(constants_1.Socks5Auth.NoAuth); - buff.writeUInt8(constants_1.Socks5Auth.UserPass); + // We should only tell the proxy we support user/pass auth if auth info is actually provided. + // Note: As of Tor v0.3.5.7+, if user/pass auth is an option from the client, by default it will always take priority. + if (this._options.proxy.userId || this._options.proxy.password) { + buff.writeUInt8(2); + buff.writeUInt8(constants_1.Socks5Auth.NoAuth); + buff.writeUInt8(constants_1.Socks5Auth.UserPass); + } + else { + buff.writeUInt8(1); + buff.writeUInt8(constants_1.Socks5Auth.NoAuth); + } this._nextRequiredPacketBufferSize = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse; this._socket.write(buff.toBuffer()); diff --git a/deps/npm/node_modules/socks/build/client/socksclient.js.map b/deps/npm/node_modules/socks/build/client/socksclient.js.map index 95931210322f9e..ac57b4b6c152a2 100644 --- a/deps/npm/node_modules/socks/build/client/socksclient.js.map +++ b/deps/npm/node_modules/socks/build/client/socksclient.js.map @@ -1 +1 @@ -{"version":3,"file":"socksclient.js","sourceRoot":"","sources":["../../src/client/socksclient.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,mCAAsC;AACtC,2BAA2B;AAC3B,yBAAyB;AACzB,+CAA2C;AAC3C,mDAiB6B;AAC7B,+CAG2B;AAC3B,2DAAwD;AACxD,yCAAgE;AA0BhE,iBAAkB,SAAQ,qBAAY;IAepC,YAAY,OAA2B;QACrC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,QAAQ,qBACR,OAAO,CACX,CAAC;QAEF,8BAA8B;QAC9B,oCAA0B,CAAC,OAAO,CAAC,CAAC;QAEpC,gBAAgB;QAChB,IAAI,CAAC,KAAK,GAAG,4BAAgB,CAAC,OAAO,CAAC;IACxC,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,gBAAgB,CACrB,OAA2B,EAC3B,QAAmB;QAEnB,8BAA8B;QAC9B,oCAA0B,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;QAEjD,OAAO,IAAI,OAAO,CAA8B,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAClE,MAAM,MAAM,GAAG,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC;YACxC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;YACxC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AU,CAAC,EAAE,CAAC,CAAC;oBACtC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE;iBAC1B,CAAC;aACH;YAED,IAAI,CAAC,KAAK,GAAG,4BAAgB,CAAC,WAAW,CAAC;YAC1C,IAAI,CAAC,4BAA4B,EAAE,CAAC;YACpC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;SAChE;IACH,CAAC;IAED,IAAI,kBAAkB;QACpB,yBACK,IAAI,CAAC,QAAQ,EAChB;IACJ,CAAC;CACF;AAGC,kCAAW"} \ No newline at end of file +{"version":3,"file":"socksclient.js","sourceRoot":"","sources":["../../src/client/socksclient.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,mCAAsC;AACtC,2BAA2B;AAC3B,yBAAyB;AACzB,+CAA2C;AAC3C,mDAiB6B;AAC7B,+CAG2B;AAC3B,2DAAwD;AACxD,yCAAgE;AA0BhE,iBAAkB,SAAQ,qBAAY;IAepC,YAAY,OAA2B;QACrC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,QAAQ,qBACR,OAAO,CACX,CAAC;QAEF,8BAA8B;QAC9B,oCAA0B,CAAC,OAAO,CAAC,CAAC;QAEpC,gBAAgB;QAChB,IAAI,CAAC,KAAK,GAAG,4BAAgB,CAAC,OAAO,CAAC;IACxC,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,gBAAgB,CACrB,OAA2B,EAC3B,QAAmB;QAEnB,8BAA8B;QAC9B,oCAA0B,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;QAEjD,OAAO,IAAI,OAAO,CAA8B,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAClE,MAAM,MAAM,GAAG,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC;YACxC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;YACxC,MAAM,CAAC,IAAI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AC,KAAK,CAAC,CAAC,CAAC,CAAC,iCAAiC;iBAC/E,CAAC;gBAEF,UAAU,GAAG;oBACX,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;oBACjC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE;iBAC1B,CAAC;gBACF,OAAO;aACR;iBAAM,IAAI,WAAW,KAAK,0BAAc,CAAC,IAAI,EAAE;gBAC9C,8BAA8B;gBAC9B,MAAM,UAAU,GAAG,uCAA2B,CAAC,kBAAkB,CAAC;gBAClE,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,UAAU,EAAE;oBAC3C,IAAI,CAAC,6BAA6B,GAAG,UAAU,CAAC;oBAChD,OAAO;iBACR;gBAED,IAAI,GAAG,0BAAW,CAAC,UAAU,CAC3B,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAC7C,CAAC;gBAEF,UAAU,GAAG;oBACX,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;oBACtC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE;iBAC1B,CAAC;aACH;YAED,IAAI,CAAC,KAAK,GAAG,4BAAgB,CAAC,WAAW,CAAC;YAC1C,IAAI,CAAC,4BAA4B,EAAE,CAAC;YACpC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;SAChE;IACH,CAAC;IAED,IAAI,kBAAkB;QACpB,yBACK,IAAI,CAAC,QAAQ,EAChB;IACJ,CAAC;CACF;AAGC,kCAAW"} \ No newline at end of file diff --git a/deps/npm/node_modules/socks/build/common/constants.js.map b/deps/npm/node_modules/socks/build/common/constants.js.map index 4fc7357a6e7cf4..cd5e6690bc913b 100644 --- a/deps/npm/node_modules/socks/build/common/constants.js.map +++ b/deps/npm/node_modules/socks/build/common/constants.js.map @@ -1 +1 @@ -{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/common/constants.ts"],"names":[],"mappings":";;AAGA,MAAM,eAAe,GAAG,KAAK,CAAC;AAoL5B,0CAAe;AAhLjB,kBAAkB;AAClB,MAAM,MAAM,GAAG;IACb,mBAAmB,EAAE,wFAAwF;IAC7G,+BAA+B,EAAE,oGAAoG;IACrI,wBAAwB,EAAE,8FAA8F;IACxH,oCAAoC,EAAE,2CAA2C;IACjF,uCAAuC,EAAE,uFAAuF;IAChI,8BAA8B,EAAE,4CAA4C;IAC5E,gCAAgC,EAAE,8EAA8E;IAChH,sCAAsC,EAAE,2DAA2D;IACnG,gBAAgB,EAAE,mBAAmB;IACrC,YAAY,EAAE,eAAe;IAC7B,uBAAuB,EAAE,4BAA4B;IACrD,aAAa,EAAE,qDAAqD;IACpE,8BAA8B,EAAE,4CAA4C;IAC5E,6BAA6B,EAAE,kCAAkC;IACjE,uCAAuC,EAAE,6CAA6C;IACtF,0CAA0C,EAAE,iDAAiD;IAC7F,qCAAqC,EAAE,oDAAoD;IAC3F,yCAAyC,EAAE,mEAAmE;IAC9G,+CAA+C,EAAE,6EAA6E;IAC9H,4CAA4C,EAAE,yEAAyE;IACvH,0BAA0B,EAAE,8BAA8B;IAC1D,2BAA2B,EAAE,kDAAkD;IAC/E,mCAAmC,EAAE,kCAAkC;IACvE,uCAAuC,EAAE,sDAAsD;IAC/F,0CAA0C,EAAE,iDAAiD;CAC9F,CAAC;AAsJA,wBAAM;AApJR,MAAM,2BAA2B,GAAG;IAClC,8BAA8B,EAAE,CAAC;IACjC,oCAAoC,EAAE,CAAC;IACvC,gDAAgD;IAChD,oBAAoB,EAAE,CAAC;IACvB,kBAAkB,EAAE,EAAE;IACtB,kBAAkB,EAAE,EAAE;IACtB,sBAAsB,EAAE,CAAC,cAAsB,EAAE,EAAE,CAAC,cAAc,GAAG,CAAC;IACtE,gDAAgD;IAChD,cAAc,EAAE,CAAC,CAAC,2B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,CAAA;AACZ,CAAC,EAdI,gBAAgB,KAAhB,gBAAgB,QAcpB;AA0FC,4CAAgB"} \ No newline at end of file +{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/common/constants.ts"],"names":[],"mappings":";;AAIA,MAAM,eAAe,GAAG,KAAK,CAAC;AA2L5B,0CAAe;AAvLjB,kBAAkB;AAClB,MAAM,MAAM,GAAG;IACb,mBAAmB,EAAE,wFAAwF;IAC7G,+BAA+B,EAAE,oGAAoG;IACrI,wBAAwB,EAAE,8FAA8F;IACxH,oCAAoC,EAAE,2CAA2C;IACjF,uCAAuC,EAAE,uFAAuF;IAChI,8BAA8B,EAAE,4CAA4C;IAC5E,gCAAgC,EAAE,8EAA8E;IAChH,sCAAsC,EAAE,2DAA2D;IACnG,gBAAgB,EAAE,mBAAmB;IACrC,YAAY,EAAE,eAAe;IAC7B,uBAAuB,EAAE,4BAA4B;IACrD,aAAa,EAAE,qDAAqD;IACpE,8BAA8B,EAAE,4CAA4C;IAC5E,6BAA6B,EAAE,kCAAkC;IACjE,uCAAuC,EAAE,6CAA6C;IACtF,0CAA0C,EAAE,iDAAiD;IAC7F,qCAAqC,EAAE,oDAAoD;IAC3F,yCAAyC,EAAE,mEAAmE;IAC9G,+CAA+C,EAAE,6EAA6E;IAC9H,4CAA4C,EAAE,yEAAyE;IACvH,0BAA0B,EAAE,8BAA8B;IAC1D,2BAA2B,EAAE,kDAAkD;IAC/E,mCAAmC,EAAE,kCAAkC;IACvE,uCAAuC,EAAE,sDAAsD;IAC/F,0CAA0C,EAAE,iDAAiD;CAC9F,CAAC;AA6JA,wBAAM;AA3JR,MAAM,2BAA2B,GAAG;IAClC,8BAA8B,EAAE,CAAC;IACjC,oCAAoC,EAAE,CAAC;IACvC,gDAAgD;IAChD,oBAAoB,EAAE,CAAC;IACvB,kBAAkB,EAAE,EAAE;IACtB,kBAAkB,EAAE,EAAE;IACtB,sBAAsB,EAAE,CAAC,cAAsB,EAAE,EAAE,CAAC,cAAc,GAA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AC7B,sEAAgB,CAAA;IAChB,wEAAiB,CAAA;IACjB,0DAAU,CAAA;AACZ,CAAC,EAdI,gBAAgB,KAAhB,gBAAgB,QAcpB;AAiGC,4CAAgB"} \ No newline at end of file diff --git a/deps/npm/node_modules/socks/build/common/helpers.js b/deps/npm/node_modules/socks/build/common/helpers.js index ffed4a740c02b2..88153aabdd1b2e 100644 --- a/deps/npm/node_modules/socks/build/common/helpers.js +++ b/deps/npm/node_modules/socks/build/common/helpers.js @@ -2,7 +2,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); const util_1 = require("./util"); const constants_1 = require("./constants"); -const net = require("net"); const stream = require("stream"); /** * Validates the provided SocksClientOptions @@ -85,7 +84,7 @@ function isValidSocksRemoteHost(remoteHost) { */ function isValidSocksProxy(proxy) { return (proxy && - net.isIP(proxy.ipaddress) && + (typeof proxy.host === 'string' || typeof proxy.ipaddress === 'string') && typeof proxy.port === 'number' && proxy.port >= 0 && proxy.port <= 65535 && diff --git a/deps/npm/node_modules/socks/build/common/helpers.js.map b/deps/npm/node_modules/socks/build/common/helpers.js.map index ab844fe58314f2..66fca6fafa177e 100644 --- a/deps/npm/node_modules/socks/build/common/helpers.js.map +++ b/deps/npm/node_modules/socks/build/common/helpers.js.map @@ -1 +1 @@ -{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/common/helpers.ts"],"names":[],"mappings":";;AAKA,iCAA0C;AAC1C,2CAA+D;AAC/D,2BAA2B;AAC3B,iCAAiC;AAEjC;;;;GAIG;AACH,oCACE,OAA2B,EAC3B,gBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC;IAEnD,8BAA8B;IAC9B,IAAI,CAAC,wBAAY,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAClC,MAAM,IAAI,uBAAgB,CAAC,kBAAM,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;KACjE;IAED,6CAA6C;IAC7C,IAAI,gBAAgB,CAAC,OAAO,CAAC,OA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C;AACJ,CAAC;AAED;;;GAGG;AACH,6BAA6B,KAAa;IACxC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC;AAChD,CAAC"} \ No newline at end of file +{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/common/helpers.ts"],"names":[],"mappings":";;AAKA,iCAA0C;AAC1C,2CAA+D;AAC/D,iCAAiC;AAEjC;;;;GAIG;AACH,oCACE,OAA2B,EAC3B,gBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC;IAEnD,8BAA8B;IAC9B,IAAI,CAAC,wBAAY,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAClC,MAAM,IAAI,uBAAgB,CAAC,kBAAM,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;KACjE;IAED,6CAA6C;IAC7C,IAAI,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE;QACpD,MAAM,IAAI,uBAAgB,CAAC,kBAAM,CAAC,+BAA+B,EAAE,OAAO,CAAC,CAAC;KAC7E;IAED,oBAAoB;IACpB,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;QAChD,MAAM,IAAI,uBAAgB,CACxB,kBAAM,CAAC,oCAAoC,EAC3C,OAAO,CACR,CAAC;KACH;IAED,2BAA2B;IAC3B,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACrC,MAAM,IAAI,uBAAgB,CAAC,kBAAM,CAAC,8BAA8B,EAAE,OAAO,CAAC,CAAC;KAC5E;IAED,gBAAgB;IAChB,IAAI,OAAO,CAAC,OAAO,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAC5D,MAAM,IAAI,uBAAgB,CACxB,kBAAM,CAAC,gCAAgC,EACvC,OAAO,CACR,CAAC;KACH;IAED,sCAAsC;IACtC,IACE,OAAO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EAA+B;AArCpE;;;GAGG;AACH,gCAAgC,UAA2B;IACzD,OAAO,CACL,UAAU;QACV,OAAO,UAAU,CAAC,IAAI,KAAK,QAAQ;QACnC,OAAO,UAAU,CAAC,IAAI,KAAK,QAAQ;QACnC,UAAU,CAAC,IAAI,IAAI,CAAC;QACpB,UAAU,CAAC,IAAI,IAAI,KAAK,CACzB,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,2BAA2B,KAAiB;IAC1C,OAAO,CACL,KAAK;QACL,CAAC,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,KAAK,CAAC,SAAS,KAAK,QAAQ,CAAC;QACvE,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;QAC9B,KAAK,CAAC,IAAI,IAAI,CAAC;QACf,KAAK,CAAC,IAAI,IAAI,KAAK;QACnB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,CACvC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,6BAA6B,KAAa;IACxC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC;AAChD,CAAC"} \ No newline at end of file diff --git a/deps/npm/node_modules/socks/build/common/util.js.map b/deps/npm/node_modules/socks/build/common/util.js.map index 7fa4071d709fa9..21ad0c1b42775a 100644 --- a/deps/npm/node_modules/socks/build/common/util.js.map +++ b/deps/npm/node_modules/socks/build/common/util.js.map @@ -1 +1 @@ -{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/common/util.ts"],"names":[],"mappings":";;AAEA;;GAEG;AACH,sBAAuB,SAAQ,KAAK;IAClC,YACE,OAAe,EACR,OAAqD;QAE5D,KAAK,CAAC,OAAO,CAAC,CAAC;QAFR,YAAO,GAAP,OAAO,CAA8C;IAG9D,CAAC;CACF;AAaQ,4CAAgB;AAXzB;;;GAGG;AACH,sBAAsB,KAAY;IAChC,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;QACzC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC5C,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KAC7C;AACH,CAAC;AAE0B,oCAAY"} \ No newline at end of file +{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/common/util.ts"],"names":[],"mappings":";;AAEA;;GAEG;AACH,sBAAuB,SAAQ,KAAK;IAClC,YACE,OAAe,EACR,OAAqD;QAE5D,KAAK,CAAC,OAAO,CAAC,CAAC;QAFR,YAAO,GAAP,OAAO,CAA8C;IAG9D,CAAC;CACF;AAuBwB,4CAAgB;AArBzC;;;GAGG;AACH,sBAAsB,KAAY;IAChC,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;QACzC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC5C,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KAC7C;AACH,CAAC;AAY0C,oCAAY"} \ No newline at end of file diff --git a/deps/npm/node_modules/socks/docs/examples/javascript/associateExample.md b/deps/npm/node_modules/socks/docs/examples/javascript/associateExample.md index a29cb2fc29e7e8..c2c7b17b737977 100644 --- a/deps/npm/node_modules/socks/docs/examples/javascript/associateExample.md +++ b/deps/npm/node_modules/socks/docs/examples/javascript/associateExample.md @@ -43,7 +43,7 @@ udpSocket.on('message', (message, rinfo) => { const options = { proxy: { - ipaddress: '104.131.124.203', + host: '104.131.124.203', port: 1081, type: 5 }, diff --git a/deps/npm/node_modules/socks/docs/examples/javascript/bindExample.md b/deps/npm/node_modules/socks/docs/examples/javascript/bindExample.md index ee60bff448b78c..be601d522e7890 100644 --- a/deps/npm/node_modules/socks/docs/examples/javascript/bindExample.md +++ b/deps/npm/node_modules/socks/docs/examples/javascript/bindExample.md @@ -26,7 +26,7 @@ const SocksClient = require('socks').SocksClient; const options = { proxy: { - ipaddress: '104.131.124.203', + host: '104.131.124.203', port: 1081, type: 5 }, diff --git a/deps/npm/node_modules/socks/docs/examples/javascript/connectExample.md b/deps/npm/node_modules/socks/docs/examples/javascript/connectExample.md index ae98c8ff0d2e86..66244c5b839b55 100644 --- a/deps/npm/node_modules/socks/docs/examples/javascript/connectExample.md +++ b/deps/npm/node_modules/socks/docs/examples/javascript/connectExample.md @@ -19,7 +19,7 @@ const SocksClient = require('socks').SocksClient; const options = { proxy: { - ipaddress: '104.131.124.203', + host: '104.131.124.203', port: 1081, type: 5 }, diff --git a/deps/npm/node_modules/socks/docs/examples/typescript/associateExample.md b/deps/npm/node_modules/socks/docs/examples/typescript/associateExample.md index d00947938ab3cd..e8ca193444b3d5 100644 --- a/deps/npm/node_modules/socks/docs/examples/typescript/associateExample.md +++ b/deps/npm/node_modules/socks/docs/examples/typescript/associateExample.md @@ -43,7 +43,7 @@ udpSocket.on('message', (message, rinfo) => { const options: SocksClientOptions = { proxy: { - ipaddress: '104.131.124.203', + host: '104.131.124.203', port: 1081, type: 5 }, diff --git a/deps/npm/node_modules/socks/docs/examples/typescript/bindExample.md b/deps/npm/node_modules/socks/docs/examples/typescript/bindExample.md index f0f4ae3998123b..6b7607df727f31 100644 --- a/deps/npm/node_modules/socks/docs/examples/typescript/bindExample.md +++ b/deps/npm/node_modules/socks/docs/examples/typescript/bindExample.md @@ -26,7 +26,7 @@ import { SocksClient, SocksClientOptions } from 'socks'; const options: SocksClientOptions = { proxy: { - ipaddress: '104.131.124.203', + host: '104.131.124.203', port: 1081, type: 5 }, diff --git a/deps/npm/node_modules/socks/docs/examples/typescript/connectExample.md b/deps/npm/node_modules/socks/docs/examples/typescript/connectExample.md index 04369df3ee3734..30606d0ba507bd 100644 --- a/deps/npm/node_modules/socks/docs/examples/typescript/connectExample.md +++ b/deps/npm/node_modules/socks/docs/examples/typescript/connectExample.md @@ -19,7 +19,7 @@ import { SocksClient, SocksClientOptions } from 'socks'; const options: SocksClientOptions = { proxy: { - ipaddress: '104.131.124.203', + host: '104.131.124.203', port: 1081, type: 5 }, diff --git a/deps/npm/node_modules/socks/package.json b/deps/npm/node_modules/socks/package.json index 59a7776bf597f6..01402a426ac315 100644 --- a/deps/npm/node_modules/socks/package.json +++ b/deps/npm/node_modules/socks/package.json @@ -1,27 +1,27 @@ { - "_from": "socks@~2.2.0", - "_id": "socks@2.2.0", + "_from": "socks@~2.3.2", + "_id": "socks@2.3.2", "_inBundle": false, - "_integrity": "sha512-uRKV9uXQ9ytMbGm2+DilS1jB7N3AC0mmusmW5TVWjNuBZjxS8+lX38fasKVY9I4opv/bY/iqTbcpFFaTwpfwRg==", + "_integrity": "sha512-pCpjxQgOByDHLlNqlnh/mNSAxIUkyBBuwwhTcV+enZGbDaClPvHdvm6uvOwZfFJkam7cGhBNbb4JxiP8UZkRvQ==", "_location": "/socks", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "socks@~2.2.0", + "raw": "socks@~2.3.2", "name": "socks", "escapedName": "socks", - "rawSpec": "~2.2.0", + "rawSpec": "~2.3.2", "saveSpec": null, - "fetchSpec": "~2.2.0" + "fetchSpec": "~2.3.2" }, "_requiredBy": [ "/socks-proxy-agent" ], - "_resolved": "https://registry.npmjs.org/socks/-/socks-2.2.0.tgz", - "_shasum": "144985b3331ced3ab5ccbee640ab7cb7d43fdd1f", - "_spec": "socks@~2.2.0", - "_where": "/Users/rebecca/code/npm/node_modules/socks-proxy-agent", + "_resolved": "https://registry.npmjs.org/socks/-/socks-2.3.2.tgz", + "_shasum": "ade388e9e6d87fdb11649c15746c578922a5883e", + "_spec": "socks@~2.3.2", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/socks-proxy-agent", "author": { "name": "Josh Glazebrook" }, @@ -29,9 +29,14 @@ "url": "https://github.com/JoshGlazebrook/socks/issues" }, "bundleDependencies": false, + "contributors": [ + { + "name": "castorw" + } + ], "dependencies": { "ip": "^1.1.5", - "smart-buffer": "^4.0.1" + "smart-buffer": "4.0.2" }, "deprecated": false, "description": "Fully featured SOCKS proxy client supporting SOCKSv4, SOCKSv4a, and SOCKSv5. Includes Bind and Associate functionality.", @@ -104,5 +109,5 @@ "test": "NODE_ENV=test mocha --recursive --compilers ts:ts-node/register test/**/*.ts" }, "typings": "typings", - "version": "2.2.0" + "version": "2.3.2" } diff --git a/deps/npm/node_modules/socks/typings/common/constants.d.ts b/deps/npm/node_modules/socks/typings/common/constants.d.ts index 366e578cc0ade9..c8870be6234e4c 100644 --- a/deps/npm/node_modules/socks/typings/common/constants.d.ts +++ b/deps/npm/node_modules/socks/typings/common/constants.d.ts @@ -1,6 +1,7 @@ /// import { Duplex } from 'stream'; import { Socket } from 'net'; +import { RequireOnlyOne } from './util'; declare const DEFAULT_TIMEOUT = 30000; declare type SocksProxyType = 4 | 5; declare const ERRORS: { @@ -90,13 +91,14 @@ declare enum SocksClientState { /** * Represents a SocksProxy */ -interface SocksProxy { - ipaddress: string; +declare type SocksProxy = RequireOnlyOne<{ + ipaddress?: string; + host?: string; port: number; type: SocksProxyType; userId?: string; password?: string; -} +}, 'host' | 'ipaddress'>; /** * Represents a remote host */ @@ -113,6 +115,7 @@ interface SocksClientOptions { proxy: SocksProxy; timeout?: number; existing_socket?: Duplex; + set_tcp_nodelay?: boolean; } /** * SocksClient chain connection options. diff --git a/deps/npm/node_modules/socks/typings/common/util.d.ts b/deps/npm/node_modules/socks/typings/common/util.d.ts index 14f658e22f2b01..29c539adaabc45 100644 --- a/deps/npm/node_modules/socks/typings/common/util.d.ts +++ b/deps/npm/node_modules/socks/typings/common/util.d.ts @@ -11,4 +11,7 @@ declare class SocksClientError extends Error { * @param array The array to shuffle. */ declare function shuffleArray(array: any[]): void; -export { SocksClientError, shuffleArray }; +declare type RequireOnlyOne = Pick> & { + [K in Keys]?: Required> & Partial, undefined>>; +}[Keys]; +export { RequireOnlyOne, SocksClientError, shuffleArray }; diff --git a/deps/npm/node_modules/socks/yarn-error.log b/deps/npm/node_modules/socks/yarn-error.log deleted file mode 100644 index 7513f0a6196618..00000000000000 --- a/deps/npm/node_modules/socks/yarn-error.log +++ /dev/null @@ -1,2416 +0,0 @@ -Arguments: - /usr/local/Cellar/node/9.8.0/bin/node /usr/local/bin/yarn run buld - -PATH: - /opt/dropbox-override/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/whoseisit/bin:/usr/local/engtools/darwin/bin:/usr/local/engtools/common/bin:/usr/local/arcanist/bin:/usr/local/munki:/opt/dbit/bin - -Yarn version: - 1.5.1 - -Node version: - 9.8.0 - -Platform: - darwin x64 - -npm manifest: - { - "name": "socks", - "private": false, - "version": "2.1.6", - "description": "Fully featured SOCKS proxy client supporting SOCKSv4, SOCKSv4a, and SOCKSv5. Includes Bind and Associate functionality.", - "main": "build/index.js", - "typings": "typings", - "homepage": "https://github.com/JoshGlazebrook/socks/", - "repository": { - "type": "git", - "url": "https://github.com/JoshGlazebrook/socks.git" - }, - "bugs": { - "url": "https://github.com/JoshGlazebrook/socks/issues" - }, - "keywords": [ - "socks", - "proxy", - "tor", - "socks 4", - "socks 5", - "socks4", - "socks5" - ], - "engines": { - "node": ">= 6.0.0", - "npm": ">= 3.0.0" - }, - "author": "Josh Glazebrook", - "license": "MIT", - "readmeFilename": "README.md", - "devDependencies": { - "@types/chai": "4.1.2", - "@types/ip": "^0.0.30", - "@types/mocha": "5.0.0", - "@types/node": "9.6.2", - "chai": "^4.1.2", - "coveralls": "^3.0.0", - "mocha": "5.0.5", - "nyc": "11.6.0", - "prettier": "^1.9.2", - "socks5-server": "^0.1.1", - "ts-node": "5.0.1", - "tslint": "^5.8.0", - "typescript": "2.8.1" - }, - "dependencies": { - "ip": "^1.1.5", - "smart-buffer": "^4.0.1" - }, - "scripts": { - "prepublish": "npm install -g typescript && npm run build", - "test": "NODE_ENV=test mocha --recursive --compilers ts:ts-node/register test/**/*.ts", - "coverage": "NODE_ENV=test nyc npm test", - "coveralls": "NODE_ENV=test nyc npm test && nyc report --reporter=text-lcov | coveralls", - "lint": "tslint --project tsconfig.json 'src/**/*.ts'", - "build": "tslint --project tsconfig.json && prettier --write ./src/**/*.ts --config .prettierrc.yaml && tsc -p ." - }, - "nyc": { - "extension": [ - ".ts", - ".tsx" - ], - "include": [ - "src/*.ts", - "src/**/*.ts" - ], - "exclude": [ - "**.*.d.ts", - "node_modules", - "typings" - ], - "require": [ - "ts-node/register" - ], - "reporter": [ - "json", - "html" - ], - "all": true - } - } - -yarn manifest: - No manifest - -Lockfile: - # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - # yarn lockfile v1 - - - "@types/chai@4.1.2": - version "4.1.2" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.1.2.tgz#f1af664769cfb50af805431c407425ed619daa21" - - "@types/ip@^0.0.30": - version "0.0.30" - resolved "https://registry.yarnpkg.com/@types/ip/-/ip-0.0.30.tgz#60c3309ce1cecdd7293245bbffc201ecb6f8c344" - - "@types/mocha@5.0.0": - version "5.0.0" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.0.0.tgz#a3014921991066193f6c8e47290d4d598dfd19e6" - - "@types/node@9.6.2": - version "9.6.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.2.tgz#e49ac1adb458835e95ca6487bc20f916b37aff23" - - ajv@^5.1.0: - version "5.5.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" - dependencies: - co "^4.6.0" - fast-deep-equal "^1.0.0" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.3.0" - - align-text@^0.1.1, align-text@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" - dependencies: - kind-of "^3.0.2" - longest "^1.0.1" - repeat-string "^1.5.2" - - amdefine@>=0.0.4: - version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" - - ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - - ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - - ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - - ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - dependencies: - color-convert "^1.9.0" - - append-transform@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" - dependencies: - default-require-extensions "^1.0.0" - - archy@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" - - argparse@^1.0.7: - version "1.0.9" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" - dependencies: - sprintf-js "~1.0.2" - - arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" - dependencies: - arr-flatten "^1.0.1" - - arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - - arr-flatten@^1.0.1, arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - - arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - - array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" - - array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - - arrify@^1.0.0, arrify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - - asn1@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" - - assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - - assertion-error@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c" - - assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - - async@^1.4.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - - asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - - atob@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.0.tgz#ab2b150e51d7b122b9efc8d7340c06b6c41076bc" - - aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - - aws4@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" - - babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - - babel-generator@^6.18.0: - version "6.26.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" - dependencies: - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.17.4" - source-map "^0.5.7" - trim-right "^1.0.1" - - babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - dependencies: - babel-runtime "^6.22.0" - - babel-runtime@^6.22.0, babel-runtime@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - - babel-template@^6.16.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - dependencies: - babel-runtime "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - lodash "^4.17.4" - - babel-traverse@^6.18.0, babel-traverse@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" - dependencies: - babel-code-frame "^6.26.0" - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - debug "^2.6.8" - globals "^9.18.0" - invariant "^2.2.2" - lodash "^4.17.4" - - babel-types@^6.18.0, babel-types@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" - dependencies: - babel-runtime "^6.26.0" - esutils "^2.0.2" - lodash "^4.17.4" - to-fast-properties "^1.0.3" - - babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" - - balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - - base@^0.11.1: - version "0.11.2" - resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" - dependencies: - cache-base "^1.0.1" - class-utils "^0.3.5" - component-emitter "^1.2.1" - define-property "^1.0.0" - isobject "^3.0.1" - mixin-deep "^1.2.0" - pascalcase "^0.1.1" - - bcrypt-pbkdf@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" - dependencies: - tweetnacl "^0.14.3" - - boom@4.x.x: - version "4.3.1" - resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31" - dependencies: - hoek "4.x.x" - - boom@5.x.x: - version "5.2.0" - resolved "https://registry.yarnpkg.com/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02" - dependencies: - hoek "4.x.x" - - brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - - braces@^1.8.2: - version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" - dependencies: - expand-range "^1.8.1" - preserve "^0.2.0" - repeat-element "^1.1.2" - - braces@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.1.tgz#7086c913b4e5a08dbe37ac0ee6a2500c4ba691bb" - dependencies: - arr-flatten "^1.1.0" - array-unique "^0.3.2" - define-property "^1.0.0" - extend-shallow "^2.0.1" - fill-range "^4.0.0" - isobject "^3.0.1" - kind-of "^6.0.2" - repeat-element "^1.1.2" - snapdragon "^0.8.1" - snapdragon-node "^2.0.1" - split-string "^3.0.2" - to-regex "^3.0.1" - - browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" - - builtin-modules@^1.0.0, builtin-modules@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" - - cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" - dependencies: - collection-visit "^1.0.0" - component-emitter "^1.2.1" - get-value "^2.0.6" - has-value "^1.0.0" - isobject "^3.0.1" - set-value "^2.0.0" - to-object-path "^0.3.0" - union-value "^1.0.0" - unset-value "^1.0.0" - - caching-transform@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/caching-transform/-/caching-transform-1.0.1.tgz#6dbdb2f20f8d8fbce79f3e94e9d1742dcdf5c0a1" - dependencies: - md5-hex "^1.2.0" - mkdirp "^0.5.1" - write-file-atomic "^1.1.4" - - camelcase@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" - - camelcase@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - - caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - - center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" - - chai@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.1.2.tgz#0f64584ba642f0f2ace2806279f4f06ca23ad73c" - dependencies: - assertion-error "^1.0.1" - check-error "^1.0.1" - deep-eql "^3.0.0" - get-func-name "^2.0.0" - pathval "^1.0.0" - type-detect "^4.0.0" - - chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - - chalk@^2.3.0: - version "2.3.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - - check-error@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" - - class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - - cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" - - cliui@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.0.0.tgz#743d4650e05f36d1ed2575b59638d87322bfbbcc" - dependencies: - string-width "^2.1.1" - strip-ansi "^4.0.0" - wrap-ansi "^2.0.0" - - co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - - code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - - collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - - color-convert@^1.9.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" - dependencies: - color-name "^1.1.1" - - color-name@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - - combined-stream@^1.0.5, combined-stream@~1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" - dependencies: - delayed-stream "~1.0.0" - - commander@2.11.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" - - commander@^2.12.1: - version "2.15.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" - - commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - - component-emitter@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" - - concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - - convert-source-map@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" - - copy-descriptor@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - - core-js@^2.4.0: - version "2.5.4" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.4.tgz#f2c8bf181f2a80b92f360121429ce63a2f0aeae0" - - core-util-is@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - - coveralls@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.0.tgz#22ef730330538080d29b8c151dc9146afde88a99" - dependencies: - js-yaml "^3.6.1" - lcov-parse "^0.0.10" - log-driver "^1.2.5" - minimist "^1.2.0" - request "^2.79.0" - - cross-spawn@^4: - version "4.0.2" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" - dependencies: - lru-cache "^4.0.1" - which "^1.2.9" - - cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - - cryptiles@3.x.x: - version "3.1.2" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.2.tgz#a89fbb220f5ce25ec56e8c4aa8a4fd7b5b0d29fe" - dependencies: - boom "5.x.x" - - dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - dependencies: - assert-plus "^1.0.0" - - debug-log@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f" - - debug@3.1.0, debug@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - dependencies: - ms "2.0.0" - - debug@^2.2.0, debug@^2.3.3, debug@^2.6.8: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - dependencies: - ms "2.0.0" - - decamelize@^1.0.0, decamelize@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - - decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - - deep-eql@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" - dependencies: - type-detect "^4.0.0" - - default-require-extensions@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" - dependencies: - strip-bom "^2.0.0" - - define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - dependencies: - is-descriptor "^0.1.0" - - define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" - dependencies: - is-descriptor "^1.0.0" - - define-property@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" - dependencies: - is-descriptor "^1.0.2" - isobject "^3.0.1" - - delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - - detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - dependencies: - repeating "^2.0.0" - - diff@3.5.0, diff@^3.1.0, diff@^3.2.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" - - ecc-jsbn@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" - dependencies: - jsbn "~0.1.0" - - error-ex@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" - dependencies: - is-arrayish "^0.2.1" - - escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - - esprima@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" - - esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - - execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - - expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - dependencies: - is-posix-bracket "^0.1.0" - - expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - dependencies: - debug "^2.3.3" - define-property "^0.2.5" - extend-shallow "^2.0.1" - posix-character-classes "^0.1.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - - expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - dependencies: - fill-range "^2.1.0" - - extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - dependencies: - is-extendable "^0.1.0" - - extend-shallow@^3.0.0, extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - - extend@~3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" - - extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" - dependencies: - is-extglob "^1.0.0" - - extglob@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" - dependencies: - array-unique "^0.3.2" - define-property "^1.0.0" - expand-brackets "^2.1.4" - extend-shallow "^2.0.1" - fragment-cache "^0.2.1" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - - extsprintf@1.3.0, extsprintf@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - - fast-deep-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" - - fast-json-stable-stringify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" - - filename-regex@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" - - fill-range@^2.1.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^1.1.3" - repeat-element "^1.1.2" - repeat-string "^1.5.2" - - fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" - - find-cache-dir@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9" - dependencies: - commondir "^1.0.1" - mkdirp "^0.5.1" - pkg-dir "^1.0.0" - - find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - - find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - dependencies: - locate-path "^2.0.0" - - for-in@^1.0.1, for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - - for-own@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" - dependencies: - for-in "^1.0.1" - - foreground-child@^1.5.3, foreground-child@^1.5.6: - version "1.5.6" - resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-1.5.6.tgz#4fd71ad2dfde96789b980a5c0a295937cb2f5ce9" - dependencies: - cross-spawn "^4" - signal-exit "^3.0.0" - - forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - - form-data@~2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.1.tgz#6fb94fbd71885306d73d15cc497fe4cc4ecd44bf" - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.5" - mime-types "^2.1.12" - - fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - dependencies: - map-cache "^0.2.2" - - fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - - get-caller-file@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" - - get-func-name@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" - - get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - - get-value@^2.0.3, get-value@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - - getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - dependencies: - assert-plus "^1.0.0" - - glob-base@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" - dependencies: - glob-parent "^2.0.0" - is-glob "^2.0.0" - - glob-parent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" - dependencies: - is-glob "^2.0.0" - - glob@7.1.2, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - - globals@^9.18.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - - graceful-fs@^4.1.11, graceful-fs@^4.1.2: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" - - growl@1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.3.tgz#1926ba90cf3edfe2adb4927f5880bc22c66c790f" - - handlebars@^4.0.3: - version "4.0.11" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" - dependencies: - async "^1.4.0" - optimist "^0.6.1" - source-map "^0.4.4" - optionalDependencies: - uglify-js "^2.6" - - har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - - har-validator@~5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" - dependencies: - ajv "^5.1.0" - har-schema "^2.0.0" - - has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - dependencies: - ansi-regex "^2.0.0" - - has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - - has-flag@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" - - has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - - has-value@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - dependencies: - get-value "^2.0.3" - has-values "^0.1.4" - isobject "^2.0.0" - - has-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" - dependencies: - get-value "^2.0.6" - has-values "^1.0.0" - isobject "^3.0.0" - - has-values@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" - - has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - - hawk@~6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038" - dependencies: - boom "4.x.x" - cryptiles "3.x.x" - hoek "4.x.x" - sntp "2.x.x" - - he@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" - - hoek@4.x.x: - version "4.2.0" - resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.0.tgz#72d9d0754f7fe25ca2d01ad8f8f9a9449a89526d" - - hosted-git-info@^2.1.4: - version "2.6.0" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.6.0.tgz#23235b29ab230c576aab0d4f13fc046b0b038222" - - http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - - imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - - inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - dependencies: - once "^1.3.0" - wrappy "1" - - inherits@2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - - invariant@^2.2.2: - version "2.2.4" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" - dependencies: - loose-envify "^1.0.0" - - invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - - ip@^1.1.0, ip@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" - - is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - dependencies: - kind-of "^3.0.2" - - is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" - dependencies: - kind-of "^6.0.0" - - is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - - is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - - is-builtin-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" - dependencies: - builtin-modules "^1.0.0" - - is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - dependencies: - kind-of "^3.0.2" - - is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" - dependencies: - kind-of "^6.0.0" - - is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" - - is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" - - is-dotfile@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" - - is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" - dependencies: - is-primitive "^2.0.0" - - is-extendable@^0.1.0, is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - - is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - dependencies: - is-plain-object "^2.0.4" - - is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - - is-finite@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" - dependencies: - number-is-nan "^1.0.0" - - is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - dependencies: - number-is-nan "^1.0.0" - - is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - - is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - dependencies: - is-extglob "^1.0.0" - - is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - dependencies: - kind-of "^3.0.2" - - is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - dependencies: - kind-of "^3.0.2" - - is-number@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" - - is-odd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-2.0.0.tgz#7646624671fd7ea558ccd9a2795182f2958f1b24" - dependencies: - is-number "^4.0.0" - - is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - dependencies: - isobject "^3.0.1" - - is-posix-bracket@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" - - is-primitive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" - - is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - - is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - - is-utf8@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - - is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - - isarray@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - - isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - - isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - dependencies: - isarray "1.0.0" - - isobject@^3.0.0, isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - - isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - - istanbul-lib-coverage@^1.1.2, istanbul-lib-coverage@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz#f7d8f2e42b97e37fe796114cb0f9d68b5e3a4341" - - istanbul-lib-hook@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.1.0.tgz#8538d970372cb3716d53e55523dd54b557a8d89b" - dependencies: - append-transform "^0.4.0" - - istanbul-lib-instrument@^1.10.0: - version "1.10.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz#724b4b6caceba8692d3f1f9d0727e279c401af7b" - dependencies: - babel-generator "^6.18.0" - babel-template "^6.16.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - babylon "^6.18.0" - istanbul-lib-coverage "^1.2.0" - semver "^5.3.0" - - istanbul-lib-report@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.3.tgz#2df12188c0fa77990c0d2176d2d0ba3394188259" - dependencies: - istanbul-lib-coverage "^1.1.2" - mkdirp "^0.5.1" - path-parse "^1.0.5" - supports-color "^3.1.2" - - istanbul-lib-source-maps@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.3.tgz#20fb54b14e14b3fb6edb6aca3571fd2143db44e6" - dependencies: - debug "^3.1.0" - istanbul-lib-coverage "^1.1.2" - mkdirp "^0.5.1" - rimraf "^2.6.1" - source-map "^0.5.3" - - istanbul-reports@^1.1.4: - version "1.3.0" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.3.0.tgz#2f322e81e1d9520767597dca3c20a0cce89a3554" - dependencies: - handlebars "^4.0.3" - - js-tokens@^3.0.0, js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - - js-yaml@^3.6.1: - version "3.10.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - - js-yaml@^3.7.0: - version "3.11.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef" - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - - jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - - jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - - json-schema-traverse@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" - - json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - - json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - - jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - - kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - dependencies: - is-buffer "^1.1.5" - - kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - dependencies: - is-buffer "^1.1.5" - - kind-of@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" - - kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" - - lazy-cache@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" - - lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - dependencies: - invert-kv "^1.0.0" - - lcov-parse@^0.0.10: - version "0.0.10" - resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" - - load-json-file@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" - - locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - - lodash@^4.17.4: - version "4.17.5" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" - - log-driver@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056" - - longest@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" - - loose-envify@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" - dependencies: - js-tokens "^3.0.0" - - lru-cache@^4.0.1: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.2.tgz#45234b2e6e2f2b33da125624c4664929a0224c3f" - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - - make-error@^1.1.1: - version "1.3.4" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.4.tgz#19978ed575f9e9545d2ff8c13e33b5d18a67d535" - - map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - - map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - dependencies: - object-visit "^1.0.0" - - md5-hex@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-1.3.0.tgz#d2c4afe983c4370662179b8cad145219135046c4" - dependencies: - md5-o-matic "^0.1.1" - - md5-o-matic@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/md5-o-matic/-/md5-o-matic-0.1.1.tgz#822bccd65e117c514fab176b25945d54100a03c3" - - mem@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" - dependencies: - mimic-fn "^1.0.0" - - merge-source-map@^1.0.2: - version "1.1.0" - resolved "https://registry.yarnpkg.com/merge-source-map/-/merge-source-map-1.1.0.tgz#2fdde7e6020939f70906a68f2d7ae685e4c8c646" - dependencies: - source-map "^0.6.1" - - micromatch@^2.3.11: - version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" - dependencies: - arr-diff "^2.0.0" - array-unique "^0.2.1" - braces "^1.8.2" - expand-brackets "^0.1.4" - extglob "^0.3.1" - filename-regex "^2.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.1" - kind-of "^3.0.2" - normalize-path "^2.0.1" - object.omit "^2.0.0" - parse-glob "^3.0.4" - regex-cache "^0.4.2" - - micromatch@^3.1.8: - version "3.1.10" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.3.1" - define-property "^2.0.2" - extend-shallow "^3.0.2" - extglob "^2.0.4" - fragment-cache "^0.2.1" - kind-of "^6.0.2" - nanomatch "^1.2.9" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.2" - - mime-db@~1.30.0: - version "1.30.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01" - - mime-types@^2.1.12, mime-types@~2.1.17: - version "2.1.17" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.17.tgz#09d7a393f03e995a79f8af857b70a9e0ab16557a" - dependencies: - mime-db "~1.30.0" - - mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - - minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - dependencies: - brace-expansion "^1.1.7" - - minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - - minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - - minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - - mixin-deep@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" - - mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - dependencies: - minimist "0.0.8" - - mocha@5.0.5: - version "5.0.5" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.0.5.tgz#e228e3386b9387a4710007a641f127b00be44b52" - dependencies: - browser-stdout "1.3.1" - commander "2.11.0" - debug "3.1.0" - diff "3.5.0" - escape-string-regexp "1.0.5" - glob "7.1.2" - growl "1.10.3" - he "1.1.1" - mkdirp "0.5.1" - supports-color "4.4.0" - - ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - - nanomatch@^1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.9.tgz#879f7150cb2dab7a471259066c104eee6e0fa7c2" - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - define-property "^2.0.2" - extend-shallow "^3.0.2" - fragment-cache "^0.2.1" - is-odd "^2.0.0" - is-windows "^1.0.2" - kind-of "^6.0.2" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - - normalize-package-data@^2.3.2: - version "2.4.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" - dependencies: - hosted-git-info "^2.1.4" - is-builtin-module "^1.0.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - - normalize-path@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - dependencies: - remove-trailing-separator "^1.0.1" - - npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - dependencies: - path-key "^2.0.0" - - number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - - nyc@11.6.0: - version "11.6.0" - resolved "https://registry.yarnpkg.com/nyc/-/nyc-11.6.0.tgz#d9c7b51ffceb6bba099a4683a6adc1b331b98853" - dependencies: - archy "^1.0.0" - arrify "^1.0.1" - caching-transform "^1.0.0" - convert-source-map "^1.5.1" - debug-log "^1.0.1" - default-require-extensions "^1.0.0" - find-cache-dir "^0.1.1" - find-up "^2.1.0" - foreground-child "^1.5.3" - glob "^7.0.6" - istanbul-lib-coverage "^1.1.2" - istanbul-lib-hook "^1.1.0" - istanbul-lib-instrument "^1.10.0" - istanbul-lib-report "^1.1.3" - istanbul-lib-source-maps "^1.2.3" - istanbul-reports "^1.1.4" - md5-hex "^1.2.0" - merge-source-map "^1.0.2" - micromatch "^2.3.11" - mkdirp "^0.5.0" - resolve-from "^2.0.0" - rimraf "^2.5.4" - signal-exit "^3.0.1" - spawn-wrap "^1.4.2" - test-exclude "^4.2.0" - yargs "11.1.0" - yargs-parser "^8.0.0" - - oauth-sign@~0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" - - object-assign@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - - object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - - object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - dependencies: - isobject "^3.0.0" - - object.omit@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" - dependencies: - for-own "^0.1.4" - is-extendable "^0.1.1" - - object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - dependencies: - isobject "^3.0.1" - - once@^1.3.0, once@^1.3.3: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - dependencies: - wrappy "1" - - optimist@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" - - os-homedir@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - - os-locale@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" - dependencies: - execa "^0.7.0" - lcid "^1.0.0" - mem "^1.1.0" - - p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - - p-limit@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c" - dependencies: - p-try "^1.0.0" - - p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - dependencies: - p-limit "^1.1.0" - - p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - - parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" - dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" - - parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - dependencies: - error-ex "^1.2.0" - - pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - - path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - dependencies: - pinkie-promise "^2.0.0" - - path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - - path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - - path-key@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - - path-parse@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" - - path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - - pathval@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" - - performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - - pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - - pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - dependencies: - pinkie "^2.0.0" - - pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - - pkg-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" - dependencies: - find-up "^1.0.0" - - posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - - preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" - - prettier@^1.9.2: - version "1.11.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.11.1.tgz#61e43fc4cd44e68f2b0dfc2c38cd4bb0fccdcc75" - - pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - - punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - - qs@~6.5.1: - version "6.5.1" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" - - randomatic@^1.1.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - - read-pkg-up@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" - - read-pkg@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - dependencies: - load-json-file "^1.0.0" - normalize-package-data "^2.3.2" - path-type "^1.0.0" - - regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - - regex-cache@^0.4.2: - version "0.4.4" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" - dependencies: - is-equal-shallow "^0.1.3" - - regex-not@^1.0.0, regex-not@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" - dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" - - remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - - repeat-element@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" - - repeat-string@^1.5.2, repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - - repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - dependencies: - is-finite "^1.0.0" - - request@^2.79.0: - version "2.83.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356" - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.6.0" - caseless "~0.12.0" - combined-stream "~1.0.5" - extend "~3.0.1" - forever-agent "~0.6.1" - form-data "~2.3.1" - har-validator "~5.0.3" - hawk "~6.0.2" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.17" - oauth-sign "~0.8.2" - performance-now "^2.1.0" - qs "~6.5.1" - safe-buffer "^5.1.1" - stringstream "~0.0.5" - tough-cookie "~2.3.3" - tunnel-agent "^0.6.0" - uuid "^3.1.0" - - require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - - require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - - resolve-from@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57" - - resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - - resolve@^1.3.2: - version "1.6.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.6.0.tgz#0fbd21278b27b4004481c395349e7aba60a9ff5c" - dependencies: - path-parse "^1.0.5" - - ret@~0.1.10: - version "0.1.15" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - - right-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - dependencies: - align-text "^0.1.1" - - rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" - dependencies: - glob "^7.0.5" - - safe-buffer@^5.0.1, safe-buffer@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" - - safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - dependencies: - ret "~0.1.10" - - "semver@2 || 3 || 4 || 5", semver@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" - - set-blocking@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - - set-value@^0.4.3: - version "0.4.3" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.1" - to-object-path "^0.3.0" - - set-value@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" - - shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - dependencies: - shebang-regex "^1.0.0" - - shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - - signal-exit@^3.0.0, signal-exit@^3.0.1, signal-exit@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - - slide@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" - - smart-buffer@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.0.1.tgz#07ea1ca8d4db24eb4cac86537d7d18995221ace3" - - snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" - dependencies: - define-property "^1.0.0" - isobject "^3.0.0" - snapdragon-util "^3.0.1" - - snapdragon-util@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" - dependencies: - kind-of "^3.2.0" - - snapdragon@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" - dependencies: - base "^0.11.1" - debug "^2.2.0" - define-property "^0.2.5" - extend-shallow "^2.0.1" - map-cache "^0.2.2" - source-map "^0.5.6" - source-map-resolve "^0.5.0" - use "^3.1.0" - - sntp@2.x.x: - version "2.1.0" - resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8" - dependencies: - hoek "4.x.x" - - socks5-server@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/socks5-server/-/socks5-server-0.1.1.tgz#6542d277bcb55b68c2910430d4112ccca58c0189" - dependencies: - debug "^2.2.0" - ip "^1.1.0" - once "^1.3.3" - - source-map-resolve@^0.5.0: - version "0.5.1" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.1.tgz#7ad0f593f2281598e854df80f19aae4b92d7a11a" - dependencies: - atob "^2.0.0" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - - source-map-support@^0.5.3: - version "0.5.4" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.4.tgz#54456efa89caa9270af7cd624cc2f123e51fbae8" - dependencies: - source-map "^0.6.0" - - source-map-url@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" - - source-map@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" - dependencies: - amdefine ">=0.0.4" - - source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - - source-map@^0.6.0, source-map@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - - spawn-wrap@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.4.2.tgz#cff58e73a8224617b6561abdc32586ea0c82248c" - dependencies: - foreground-child "^1.5.6" - mkdirp "^0.5.0" - os-homedir "^1.0.1" - rimraf "^2.6.2" - signal-exit "^3.0.2" - which "^1.3.0" - - spdx-correct@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82" - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - - spdx-exceptions@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz#2c7ae61056c714a5b9b9b2b2af7d311ef5c78fe9" - - spdx-expression-parse@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - - spdx-license-ids@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz#7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87" - - split-string@^3.0.1, split-string@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" - dependencies: - extend-shallow "^3.0.0" - - sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - - sshpk@^1.7.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - dashdash "^1.12.0" - getpass "^0.1.1" - optionalDependencies: - bcrypt-pbkdf "^1.0.0" - ecc-jsbn "~0.1.1" - jsbn "~0.1.0" - tweetnacl "~0.14.0" - - static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" - - string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - - string-width@^2.0.0, string-width@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - - stringstream@~0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" - - strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - dependencies: - ansi-regex "^2.0.0" - - strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - dependencies: - ansi-regex "^3.0.0" - - strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - dependencies: - is-utf8 "^0.2.0" - - strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - - supports-color@4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e" - dependencies: - has-flag "^2.0.0" - - supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - - supports-color@^3.1.2: - version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" - dependencies: - has-flag "^1.0.0" - - supports-color@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.3.0.tgz#5b24ac15db80fa927cf5227a4a33fd3c4c7676c0" - dependencies: - has-flag "^3.0.0" - - test-exclude@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.1.tgz#dfa222f03480bca69207ca728b37d74b45f724fa" - dependencies: - arrify "^1.0.1" - micromatch "^3.1.8" - object-assign "^4.1.0" - read-pkg-up "^1.0.1" - require-main-filename "^1.0.1" - - to-fast-properties@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" - - to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - dependencies: - kind-of "^3.0.2" - - to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - - to-regex@^3.0.1, to-regex@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - - tough-cookie@~2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.3.tgz#0b618a5565b6dea90bf3425d04d55edc475a7561" - dependencies: - punycode "^1.4.1" - - trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - - ts-node@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-5.0.1.tgz#78e5d1cb3f704de1b641e43b76be2d4094f06f81" - dependencies: - arrify "^1.0.0" - chalk "^2.3.0" - diff "^3.1.0" - make-error "^1.1.1" - minimist "^1.2.0" - mkdirp "^0.5.1" - source-map-support "^0.5.3" - yn "^2.0.0" - - tslib@^1.8.0, tslib@^1.8.1: - version "1.9.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8" - - tslint@^5.8.0: - version "5.9.1" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.9.1.tgz#1255f87a3ff57eb0b0e1f0e610a8b4748046c9ae" - dependencies: - babel-code-frame "^6.22.0" - builtin-modules "^1.1.1" - chalk "^2.3.0" - commander "^2.12.1" - diff "^3.2.0" - glob "^7.1.1" - js-yaml "^3.7.0" - minimatch "^3.0.4" - resolve "^1.3.2" - semver "^5.3.0" - tslib "^1.8.0" - tsutils "^2.12.1" - - tsutils@^2.12.1: - version "2.26.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.26.0.tgz#706240d63bcf1ae1797d1716738d6c6be0d0848b" - dependencies: - tslib "^1.8.1" - - tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - dependencies: - safe-buffer "^5.0.1" - - tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - - type-detect@^4.0.0: - version "4.0.5" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.5.tgz#d70e5bc81db6de2a381bcaca0c6e0cbdc7635de2" - - typescript@2.8.1: - version "2.8.1" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.8.1.tgz#6160e4f8f195d5ba81d4876f9c0cc1fbc0820624" - - uglify-js@^2.6: - version "2.8.29" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" - dependencies: - source-map "~0.5.1" - yargs "~3.10.0" - optionalDependencies: - uglify-to-browserify "~1.0.0" - - uglify-to-browserify@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" - - union-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^0.4.3" - - unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - - urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - - use@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.0.tgz#14716bf03fdfefd03040aef58d8b4b85f3a7c544" - dependencies: - kind-of "^6.0.2" - - uuid@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" - - validate-npm-package-license@^3.0.1: - version "3.0.3" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz#81643bcbef1bdfecd4623793dc4648948ba98338" - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - - verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - - which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" - - which@^1.2.9, which@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" - dependencies: - isexe "^2.0.0" - - window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - - wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - - wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - - wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - - wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - - write-file-atomic@^1.1.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-1.3.4.tgz#f807a4f0b1d9e913ae7a48112e6cc3af1991b45f" - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - slide "^1.1.5" - - y18n@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" - - yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - - yargs-parser@^8.0.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.1.0.tgz#f1376a33b6629a5d063782944da732631e966950" - dependencies: - camelcase "^4.1.0" - - yargs-parser@^9.0.2: - version "9.0.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" - dependencies: - camelcase "^4.1.0" - - yargs@11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77" - dependencies: - cliui "^4.0.0" - decamelize "^1.1.1" - find-up "^2.1.0" - get-caller-file "^1.0.1" - os-locale "^2.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^9.0.2" - - yargs@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.0" - - yn@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a" - -Trace: - Error: Command "buld" not found. Did you mean "build"? - at new MessageError (/Users/joshglazebrook/.config/yarn/global/node_modules/yarn/lib/cli.js:186:110) - at /Users/joshglazebrook/.config/yarn/global/node_modules/yarn/lib/cli.js:87307:17 - at Generator.next () - at step (/Users/joshglazebrook/.config/yarn/global/node_modules/yarn/lib/cli.js:98:30) - at /Users/joshglazebrook/.config/yarn/global/node_modules/yarn/lib/cli.js:116:14 - at new Promise () - at new F (/Users/joshglazebrook/.config/yarn/global/node_modules/yarn/lib/cli.js:23451:28) - at /Users/joshglazebrook/.config/yarn/global/node_modules/yarn/lib/cli.js:95:12 - at runCommand (/Users/joshglazebrook/.config/yarn/global/node_modules/yarn/lib/cli.js:87312:22) - at Object. (/Users/joshglazebrook/.config/yarn/global/node_modules/yarn/lib/cli.js:87412:14) diff --git a/deps/npm/node_modules/socks/yarn.lock b/deps/npm/node_modules/socks/yarn.lock index 46fafcaf923059..f8256b2779d931 100644 --- a/deps/npm/node_modules/socks/yarn.lock +++ b/deps/npm/node_modules/socks/yarn.lock @@ -1840,9 +1840,9 @@ slide@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" -smart-buffer@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.0.1.tgz#07ea1ca8d4db24eb4cac86537d7d18995221ace3" +smart-buffer@4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.0.2.tgz#5207858c3815cc69110703c6b94e46c15634395d" snapdragon-node@^2.0.1: version "2.1.1" diff --git a/deps/npm/node_modules/split-on-first/index.d.ts b/deps/npm/node_modules/split-on-first/index.d.ts new file mode 100644 index 00000000000000..6123bef9126ab4 --- /dev/null +++ b/deps/npm/node_modules/split-on-first/index.d.ts @@ -0,0 +1,29 @@ +/** +Split a string on the first occurrence of a given separator. + +@param string - The string to split. +@param separator - The separator to split on. + +@example +``` +import splitOnFirst = require('split-on-first'); + +splitOnFirst('a-b-c', '-'); +//=> ['a', 'b-c'] + +splitOnFirst('key:value:value2', ':'); +//=> ['key', 'value:value2'] + +splitOnFirst('a---b---c', '---'); +//=> ['a', 'b---c'] + +splitOnFirst('a-b-c', '+'); +//=> ['a-b-c'] +``` +*/ +declare function splitOnFirst( + string: string, + separator: string +): [string, string?]; + +export = splitOnFirst; diff --git a/deps/npm/node_modules/split-on-first/index.js b/deps/npm/node_modules/split-on-first/index.js new file mode 100644 index 00000000000000..d9140706dd05b2 --- /dev/null +++ b/deps/npm/node_modules/split-on-first/index.js @@ -0,0 +1,22 @@ +'use strict'; + +module.exports = (string, separator) => { + if (!(typeof string === 'string' && typeof separator === 'string')) { + throw new TypeError('Expected the arguments to be of type `string`'); + } + + if (separator === '') { + return [string]; + } + + const separatorIndex = string.indexOf(separator); + + if (separatorIndex === -1) { + return [string]; + } + + return [ + string.slice(0, separatorIndex), + string.slice(separatorIndex + separator.length) + ]; +}; diff --git a/deps/npm/node_modules/split-on-first/license b/deps/npm/node_modules/split-on-first/license new file mode 100644 index 00000000000000..e7af2f77107d73 --- /dev/null +++ b/deps/npm/node_modules/split-on-first/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.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/split-on-first/package.json b/deps/npm/node_modules/split-on-first/package.json new file mode 100644 index 00000000000000..d6f46a90163826 --- /dev/null +++ b/deps/npm/node_modules/split-on-first/package.json @@ -0,0 +1,68 @@ +{ + "_from": "split-on-first@^1.0.0", + "_id": "split-on-first@1.1.0", + "_inBundle": false, + "_integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==", + "_location": "/split-on-first", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "split-on-first@^1.0.0", + "name": "split-on-first", + "escapedName": "split-on-first", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/query-string" + ], + "_resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", + "_shasum": "f610afeee3b12bce1d0c30425e76398b78249a5f", + "_spec": "split-on-first@^1.0.0", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/query-string", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/split-on-first/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Split a string on the first occurance of a given separator", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "homepage": "https://github.com/sindresorhus/split-on-first#readme", + "keywords": [ + "split", + "string", + "first", + "occurrence", + "separator", + "delimiter", + "text" + ], + "license": "MIT", + "name": "split-on-first", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/split-on-first.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "1.1.0" +} diff --git a/deps/npm/node_modules/split-on-first/readme.md b/deps/npm/node_modules/split-on-first/readme.md new file mode 100644 index 00000000000000..2463cf1cce4674 --- /dev/null +++ b/deps/npm/node_modules/split-on-first/readme.md @@ -0,0 +1,58 @@ +# split-on-first [![Build Status](https://travis-ci.com/sindresorhus/split-on-first.svg?branch=master)](https://travis-ci.com/sindresorhus/split-on-first) + +> Split a string on the first occurrence of a given separator + +This is similar to [`String#split()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split), but that one splits on all the occurrences, not just the first one. + + +## Install + +``` +$ npm install split-on-first +``` + + +## Usage + +```js +const splitOnFirst = require('split-on-first'); + +splitOnFirst('a-b-c', '-'); +//=> ['a', 'b-c'] + +splitOnFirst('key:value:value2', ':'); +//=> ['key', 'value:value2'] + +splitOnFirst('a---b---c', '---'); +//=> ['a', 'b---c'] + +splitOnFirst('a-b-c', '+'); +//=> ['a-b-c'] +``` + + +## API + +### splitOnFirst(string, separator) + +#### string + +Type: `string` + +The string to split. + +#### separator + +Type: `string` + +The separator to split on. + + +## Related + +- [split-at](https://github.com/sindresorhus/split-at) - Split a string at one or more indices + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/deps/npm/node_modules/worker-farm/.travis.yml b/deps/npm/node_modules/worker-farm/.travis.yml index 1c9e2b559d5daf..7af56429c010b3 100644 --- a/deps/npm/node_modules/worker-farm/.travis.yml +++ b/deps/npm/node_modules/worker-farm/.travis.yml @@ -1,9 +1,9 @@ language: node_js node_js: - - 4 - 6 - 8 - - 9 + - 10 + - 12 branches: only: - master diff --git a/deps/npm/node_modules/worker-farm/README.md b/deps/npm/node_modules/worker-farm/README.md index 982b37cb5dfb93..c52689ed9fc580 100644 --- a/deps/npm/node_modules/worker-farm/README.md +++ b/deps/npm/node_modules/worker-farm/README.md @@ -1,4 +1,4 @@ -# Worker Farm [![Build Status](https://secure.travis-ci.org/rvagg/node-worker-farm.png)](http://travis-ci.org/rvagg/node-worker-farm) +# Worker Farm [![Build Status](https://secure.travis-ci.org/rvagg/node-worker-farm.svg)](http://travis-ci.org/rvagg/node-worker-farm) [![NPM](https://nodei.co/npm/worker-farm.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/worker-farm/) [![NPM](https://nodei.co/npm-dl/worker-farm.png?months=6&height=3)](https://nodei.co/npm/worker-farm/) @@ -111,6 +111,7 @@ If you don't provide an `options` object then the following defaults will be use , maxCallTime : Infinity , maxRetries : Infinity , autoStart : false + , onChild : function() {} } ``` @@ -130,6 +131,8 @@ If you don't provide an `options` object then the following defaults will be use * **autoStart** when set to `true` will start the workers as early as possible. Use this when your workers have to do expensive initialization. That way they'll be ready when the first request comes through. + * **onChild** when new child process starts this callback will be called with subprocess object as an argument. Use this when you need to add some custom communication with child processes. + ### workerFarm.end(farm) Child processes stay alive waiting for jobs indefinitely and your farm manager will stay alive managing its workers, so if you need it to stop then you have to do so explicitly. If you send your farm API to `workerFarm.end()` then it'll cleanly end your worker processes. Note though that it's a *soft* ending so it'll wait for child processes to finish what they are working on before asking them to die. diff --git a/deps/npm/node_modules/worker-farm/index.d.ts b/deps/npm/node_modules/worker-farm/index.d.ts index 682c21f410c513..310e91503fda49 100644 --- a/deps/npm/node_modules/worker-farm/index.d.ts +++ b/deps/npm/node_modules/worker-farm/index.d.ts @@ -1,17 +1,15 @@ -interface Workers { - (callback: WorkerCallback): void; - (arg1: any, callback: WorkerCallback): void; - (arg1: any, arg2: any, callback: WorkerCallback): void; - (arg1: any, arg2: any, arg3: any, callback: WorkerCallback): void; - (arg1: any, arg2: any, arg3: any, arg4: any, callback: WorkerCallback): void; -} +import { ForkOptions } from "child_process"; + +export = Farm; -type WorkerCallback = - | WorkerCallback0 - | WorkerCallback1 - | WorkerCallback2 - | WorkerCallback3 - | WorkerCallback4; +declare function Farm(name: string): Farm.Workers; +declare function Farm(name: string, exportedMethods: string[]): Farm.Workers; +declare function Farm(options: Farm.FarmOptions, name: string): Farm.Workers; +declare function Farm( + options: Farm.FarmOptions, + name: string, + exportedMethods: string[], +): Farm.Workers; type WorkerCallback0 = () => void; type WorkerCallback1 = (arg1: any) => void; @@ -19,26 +17,39 @@ type WorkerCallback2 = (arg1: any, arg2: any) => void; type WorkerCallback3 = (arg1: any, arg2: any, arg3: any) => void; type WorkerCallback4 = (arg1: any, arg2: any, arg3: any, arg4: any) => void; -interface FarmOptions { - maxCallsPerWorker?: number - maxConcurrentWorkers?: number - maxConcurrentCallsPerWorker?: number - maxConcurrentCalls?: number - maxCallTime?: number - maxRetries?: number - autoStart?: boolean -} +declare namespace Farm { + export function end(workers: Workers, callback?: Function): void; -interface WorkerFarm { - (name: string): Workers; - (name: string, exportedMethods: string[]): Workers; - (options: FarmOptions, name: string): Workers; - (options: FarmOptions, name: string, exportedMethods: string[]): Workers; + export interface Workers { + [x: string]: Workers, + (callback: WorkerCallback): void; + (arg1: any, callback: WorkerCallback): void; + (arg1: any, arg2: any, callback: WorkerCallback): void; + (arg1: any, arg2: any, arg3: any, callback: WorkerCallback): void; + ( + arg1: any, + arg2: any, + arg3: any, + arg4: any, + callback: WorkerCallback, + ): void; + } - end: (workers: Workers) => void; -} + export interface FarmOptions { + maxCallsPerWorker?: number; + maxConcurrentWorkers?: number; + maxConcurrentCallsPerWorker?: number; + maxConcurrentCalls?: number; + maxCallTime?: number; + maxRetries?: number; + autoStart?: boolean; + workerOptions?: ForkOptions; + } -declare module "worker-farm" { - const workerFarm: WorkerFarm; - export = workerFarm; + export type WorkerCallback = + | WorkerCallback0 + | WorkerCallback1 + | WorkerCallback2 + | WorkerCallback3 + | WorkerCallback4; } diff --git a/deps/npm/node_modules/worker-farm/lib/child/index.js b/deps/npm/node_modules/worker-farm/lib/child/index.js index f91e08433ab1fb..78f63371392afc 100644 --- a/deps/npm/node_modules/worker-farm/lib/child/index.js +++ b/deps/npm/node_modules/worker-farm/lib/child/index.js @@ -29,7 +29,7 @@ function handle (data) { _args[0][key] = e[key] }) } - process.send({ idx: idx, child: child, args: _args }) + process.send({ owner: 'farm', idx: idx, child: child, args: _args }) } , exec @@ -46,7 +46,11 @@ function handle (data) { process.on('message', function (data) { + if (data.owner !== 'farm') { + return; + } + if (!$module) return $module = require(data.module) - if (data == 'die') return process.exit(0) + if (data.event == 'die') return process.exit(0) handle(data) }) diff --git a/deps/npm/node_modules/worker-farm/lib/farm.js b/deps/npm/node_modules/worker-farm/lib/farm.js index ef0ab0e1052c70..60720dc561f6cc 100644 --- a/deps/npm/node_modules/worker-farm/lib/farm.js +++ b/deps/npm/node_modules/worker-farm/lib/farm.js @@ -10,6 +10,7 @@ const DEFAULT_OPTIONS = { , maxRetries : Infinity , forcedKillTime : 100 , autoStart : false + , onChild : function() {} } const fork = require('./fork') @@ -29,8 +30,8 @@ function Farm (options, path) { Farm.prototype.mkhandle = function (method) { return function () { let args = Array.prototype.slice.call(arguments) - if (this.activeCalls >= this.options.maxConcurrentCalls) { - let err = new MaxConcurrentCallsError('Too many concurrent calls (' + this.activeCalls + ')') + if (this.activeCalls + this.callQueue.length >= this.options.maxConcurrentCalls) { + let err = new MaxConcurrentCallsError('Too many concurrent calls (active: ' + this.activeCalls + ', queued: ' + this.callQueue.length + ')') if (typeof args[args.length - 1] == 'function') return process.nextTick(args[args.length - 1].bind(null, err)) throw err @@ -113,7 +114,14 @@ Farm.prototype.startChild = function () { , exitCode : null } - forked.child.on('message', this.receive.bind(this)) + this.options.onChild(forked.child); + + forked.child.on('message', function(data) { + if (data.owner !== 'farm') { + return; + } + this.receive(data); + }.bind(this)) forked.child.once('exit', function (code) { c.exitCode = code this.onExit(id) @@ -128,7 +136,7 @@ Farm.prototype.startChild = function () { Farm.prototype.stopChild = function (childId) { let child = this.children[childId] if (child) { - child.send('die') + child.send({owner: 'farm', event: 'die'}) setTimeout(function () { if (child.exitCode === null) child.child.kill('SIGKILL') @@ -234,7 +242,8 @@ Farm.prototype.send = function (childId, call) { this.activeCalls++ child.send({ - idx : idx + owner : 'farm' + , idx : idx , child : childId , method : call.method , args : call.args diff --git a/deps/npm/node_modules/worker-farm/lib/fork.js b/deps/npm/node_modules/worker-farm/lib/fork.js index 2843df48474c59..5a035d9749e885 100644 --- a/deps/npm/node_modules/worker-farm/lib/fork.js +++ b/deps/npm/node_modules/worker-farm/lib/fork.js @@ -20,7 +20,7 @@ function fork (forkModule, workerOptions) { // this *should* be picked up by onExit and the operation requeued }) - child.send({ module: forkModule }) + child.send({ owner: 'farm', module: forkModule }) // return a send() function for this child return { diff --git a/deps/npm/node_modules/worker-farm/lib/index.js b/deps/npm/node_modules/worker-farm/lib/index.js index fe574e59b52f75..8c142227355a7d 100644 --- a/deps/npm/node_modules/worker-farm/lib/index.js +++ b/deps/npm/node_modules/worker-farm/lib/index.js @@ -26,7 +26,7 @@ function end (api, callback) { for (let i = 0; i < farms.length; i++) if (farms[i] && farms[i].api === api) return farms[i].farm.end(callback) - process.nextTick(callback.bind(null, 'Worker farm not found!')) + process.nextTick(callback.bind(null, new Error('Worker farm not found!'))) } diff --git a/deps/npm/node_modules/worker-farm/package.json b/deps/npm/node_modules/worker-farm/package.json index ba43c44d4bea46..3d6181ae95783f 100644 --- a/deps/npm/node_modules/worker-farm/package.json +++ b/deps/npm/node_modules/worker-farm/package.json @@ -1,45 +1,43 @@ { - "_args": [ - [ - "worker-farm@1.6.0", - "/Users/rebecca/code/npm" - ] - ], - "_from": "worker-farm@1.6.0", - "_id": "worker-farm@1.6.0", + "_from": "worker-farm@1.7.0", + "_id": "worker-farm@1.7.0", "_inBundle": false, - "_integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", + "_integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", "_location": "/worker-farm", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "worker-farm@1.6.0", + "raw": "worker-farm@1.7.0", "name": "worker-farm", "escapedName": "worker-farm", - "rawSpec": "1.6.0", + "rawSpec": "1.7.0", "saveSpec": null, - "fetchSpec": "1.6.0" + "fetchSpec": "1.7.0" }, "_requiredBy": [ + "#USER", "/", "/libcipm" ], - "_resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", - "_spec": "1.6.0", - "_where": "/Users/rebecca/code/npm", + "_resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", + "_shasum": "26a94c5391bbca926152002f69b84a4bf772e5a8", + "_spec": "worker-farm@1.7.0", + "_where": "/Users/isaacs/dev/npm/cli", "authors": [ "Rod Vagg @rvagg (https://github.com/rvagg)" ], "bugs": { "url": "https://github.com/rvagg/node-worker-farm/issues" }, + "bundleDependencies": false, "dependencies": { "errno": "~0.1.7" }, + "deprecated": false, "description": "Distribute processing tasks to child processes with an über-simple API and baked-in durability & custom concurrency options.", "devDependencies": { - "tape": "~4.9.0" + "tape": "~4.10.1" }, "homepage": "https://github.com/rvagg/node-worker-farm", "keywords": [ @@ -59,5 +57,5 @@ "test": "node ./tests/" }, "types": "./index.d.ts", - "version": "1.6.0" + "version": "1.7.0" } diff --git a/deps/npm/node_modules/worker-farm/tests/index.js b/deps/npm/node_modules/worker-farm/tests/index.js index ec9deabedda6cb..e6be7bb7aabd69 100644 --- a/deps/npm/node_modules/worker-farm/tests/index.js +++ b/deps/npm/node_modules/worker-farm/tests/index.js @@ -51,6 +51,22 @@ tape('simple, exports.fn test', function (t) { }) +tape('on child', function (t) { + t.plan(2) + + let child = workerFarm({ onChild: function(subprocess) { childPid = subprocess.pid } }, childPath) + , childPid = null; + + child(0, function(err, pid) { + t.equal(childPid, pid) + }) + + workerFarm.end(child, function () { + t.ok(true, 'workerFarm ended') + }) +}) + + // use the returned pids to check that we're using a single child process // when maxConcurrentWorkers = 1 tape('single worker', function (t) { @@ -303,10 +319,12 @@ tape('multiple concurrent calls', function (t) { child(defer, function () { if (++cbc == count) { let time = Date.now() - start - // (defer * (count / callsPerWorker + 1)) - if precise it'd be count/callsPerWorker + let min = defer * 1.5 + // (defer * (count / callsPerWorker + 2)) - if precise it'd be count/callsPerWorker // but accounting for IPC and other overhead, we need to give it a bit of extra time, - // hence the +1 - t.ok(time > (defer * 1.5) && time < (defer * (count / callsPerWorker + 1)), 'processed tasks concurrently (' + time + 'ms)') + // hence the +2 + let max = defer * (count / callsPerWorker + 2) + t.ok(time > min && time < max, 'processed tasks concurrently (' + time + ' > ' + min + ' && ' + time + ' < ' + max + ')') workerFarm.end(child, function () { t.ok(true, 'workerFarm ended') }) @@ -474,6 +492,40 @@ tape('test maxConcurrentCalls', function (t) { }) +tape('test maxConcurrentCalls + queue', function (t) { + t.plan(13) + + let child = workerFarm({ maxConcurrentCalls: 4, maxConcurrentWorkers: 2, maxConcurrentCallsPerWorker: 1 }, childPath) + + child(20, function (err) { console.log('ended short1'); t.notOk(err, 'no error, short call 1') }) + child(20, function (err) { console.log('ended short2'); t.notOk(err, 'no error, short call 2') }) + child(300, function (err) { t.notOk(err, 'no error, long call 1') }) + child(300, function (err) { t.notOk(err, 'no error, long call 2') }) + child(20, function (err) { + t.ok(err, 'short call 3 should error') + t.equal(err.type, 'MaxConcurrentCallsError', 'correct error type') + }) + child(20, function (err) { + t.ok(err, 'short call 4 should error') + t.equal(err.type, 'MaxConcurrentCallsError', 'correct error type') + }) + + // cross fingers and hope the two short jobs have ended + setTimeout(function () { + child(20, function (err) { t.notOk(err, 'no error, delayed short call 1') }) + child(20, function (err) { t.notOk(err, 'no error, delayed short call 2') }) + child(20, function (err) { + t.ok(err, 'delayed short call 3 should error') + t.equal(err.type, 'MaxConcurrentCallsError', 'correct error type') + }) + + workerFarm.end(child, function () { + t.ok(true, 'workerFarm ended') + }) + }, 250) +}) + + // this test should not keep the process running! if the test process // doesn't die then the problem is here tape('test timeout kill', function (t) { @@ -529,12 +581,12 @@ tape('custom arguments can be passed to "fork"', function (t) { let cwd = fs.realpathSync(os.tmpdir()) , workerOptions = { cwd : cwd - , execArgv : ['--no-warnings'] + , execArgv : ['--expose-gc'] } , child = workerFarm({ maxConcurrentWorkers: 1, maxRetries: 5, workerOptions: workerOptions}, childPath, ['args']) child.args(function (err, result) { - t.equal(result.execArgv[0], '--no-warnings', 'flags passed (overridden default)') + t.equal(result.execArgv[0], '--expose-gc', 'flags passed (overridden default)') t.equal(result.cwd, cwd, 'correct cwd folder') }) diff --git a/deps/npm/node_modules/yallist/iterator.js b/deps/npm/node_modules/yallist/iterator.js index 4a15bf22c40032..d41c97a19f9849 100644 --- a/deps/npm/node_modules/yallist/iterator.js +++ b/deps/npm/node_modules/yallist/iterator.js @@ -1,7 +1,8 @@ -var Yallist = require('./yallist.js') - -Yallist.prototype[Symbol.iterator] = function* () { - for (let walker = this.head; walker; walker = walker.next) { - yield walker.value +'use strict' +module.exports = function (Yallist) { + Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value + } } } diff --git a/deps/npm/node_modules/yallist/package.json b/deps/npm/node_modules/yallist/package.json index f56d6b6a334971..a478663faf0701 100644 --- a/deps/npm/node_modules/yallist/package.json +++ b/deps/npm/node_modules/yallist/package.json @@ -1,27 +1,27 @@ { - "_from": "yallist@^2.1.2", - "_id": "yallist@2.1.2", + "_from": "yallist@^3.0.2", + "_id": "yallist@3.0.3", "_inBundle": false, - "_integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "_integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", "_location": "/yallist", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "yallist@^2.1.2", + "raw": "yallist@^3.0.2", "name": "yallist", "escapedName": "yallist", - "rawSpec": "^2.1.2", + "rawSpec": "^3.0.2", "saveSpec": null, - "fetchSpec": "^2.1.2" + "fetchSpec": "^3.0.2" }, "_requiredBy": [ "/lru-cache" ], - "_resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "_shasum": "1c11f9218f076089a47dd512f93c6699a6a81d52", - "_spec": "yallist@^2.1.2", - "_where": "/Users/rebecca/code/npm/node_modules/lru-cache", + "_resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "_shasum": "b4b049e314be545e3ce802236d6cd22cd91c3de9", + "_spec": "yallist@^3.0.2", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/lru-cache", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -35,7 +35,7 @@ "deprecated": false, "description": "Yet Another Linked List", "devDependencies": { - "tap": "^10.3.0" + "tap": "^12.1.0" }, "directories": { "test": "test" @@ -58,5 +58,5 @@ "preversion": "npm test", "test": "tap test/*.js --100" }, - "version": "2.1.2" + "version": "3.0.3" } diff --git a/deps/npm/node_modules/yallist/yallist.js b/deps/npm/node_modules/yallist/yallist.js index 518d23330b936c..b0ab36cf31b7a6 100644 --- a/deps/npm/node_modules/yallist/yallist.js +++ b/deps/npm/node_modules/yallist/yallist.js @@ -1,3 +1,4 @@ +'use strict' module.exports = Yallist Yallist.Node = Node @@ -368,3 +369,8 @@ function Node (value, prev, next, list) { this.next = null } } + +try { + // add if support for Symbol.iterator is present + require('./iterator.js')(Yallist) +} catch (er) {} diff --git a/deps/npm/package.json b/deps/npm/package.json index 80143f7c53cb65..00c0e1dc5c631b 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "6.10.0", + "version": "6.10.2", "name": "npm", "description": "a package manager for JavaScript", "keywords": [ @@ -42,9 +42,9 @@ "bin-links": "^1.1.2", "bluebird": "^3.5.5", "byte-size": "^5.0.1", - "cacache": "^11.3.3", - "call-limit": "~1.1.0", - "chownr": "^1.1.1", + "cacache": "^12.0.2", + "call-limit": "^1.1.1", + "chownr": "^1.1.2", "ci-info": "^2.0.0", "cli-columns": "^3.1.2", "cli-table3": "^0.5.1", @@ -60,21 +60,26 @@ "fs-vacuum": "~1.2.10", "fs-write-stream-atomic": "~1.0.10", "gentle-fs": "^2.0.1", - "glob": "^7.1.3", + "glob": "^7.1.4", "graceful-fs": "^4.2.0", "has-unicode": "~2.0.1", "hosted-git-info": "^2.7.1", "iferr": "^1.0.2", + "infer-owner": "^1.0.4", "inflight": "~1.0.6", - "inherits": "~2.0.3", + "inherits": "^2.0.4", "ini": "^1.3.5", "init-package-json": "^1.10.3", "is-cidr": "^3.0.0", "json-parse-better-errors": "^1.0.2", "lazy-property": "~1.0.0", - "libcipm": "^3.0.3", - "libnpm": "^2.0.1", - "libnpmhook": "^5.0.2", + "libcipm": "^4.0.0", + "libnpm": "^3.0.1", + "libnpmaccess": "^3.0.2", + "libnpmhook": "^5.0.3", + "libnpmorg": "^1.0.1", + "libnpmsearch": "^2.0.2", + "libnpmteam": "^1.0.2", "libnpx": "^10.2.0", "lock-verify": "^2.1.0", "lockfile": "^1.0.4", @@ -83,45 +88,46 @@ "lodash.union": "~4.6.0", "lodash.uniq": "~4.5.0", "lodash.without": "~4.4.0", - "lru-cache": "^4.1.5", + "lru-cache": "^5.1.1", "meant": "~1.0.1", "mississippi": "^3.0.0", "mkdirp": "~0.5.1", "move-concurrently": "^1.0.1", - "node-gyp": "^3.8.0", + "node-gyp": "^5.0.3", "nopt": "~4.0.1", "normalize-package-data": "^2.5.0", "npm-audit-report": "^1.3.2", "npm-cache-filename": "~1.0.2", "npm-install-checks": "~3.0.0", - "npm-lifecycle": "^2.1.0", + "npm-lifecycle": "^3.1.2", "npm-package-arg": "^6.1.0", "npm-packlist": "^1.4.4", "npm-pick-manifest": "^2.2.3", - "npm-registry-fetch": "^3.9.0", + "npm-profile": "^4.0.2", + "npm-registry-fetch": "^4.0.0", "npm-user-validate": "~1.0.0", "npmlog": "~4.1.2", "once": "~1.4.0", "opener": "^1.5.1", "osenv": "^0.1.5", - "pacote": "^9.5.1", + "pacote": "^9.5.4", "path-is-inside": "~1.0.2", "promise-inflight": "~1.0.1", "qrcode-terminal": "^0.12.0", - "query-string": "^6.4.0", + "query-string": "^6.8.1", "qw": "~1.0.1", "read": "~1.0.7", "read-cmd-shim": "~1.0.1", "read-installed": "~4.0.3", "read-package-json": "^2.0.13", "read-package-tree": "^5.3.1", - "readable-stream": "^3.3.0", + "readable-stream": "^3.4.0", "readdir-scoped-modules": "^1.1.0", "request": "^2.88.0", "retry": "^0.12.0", "rimraf": "^2.6.3", "safe-buffer": "^5.1.2", - "semver": "^5.6.0", + "semver": "^5.7.0", "sha": "^3.0.0", "slide": "~1.1.6", "sorted-object": "~2.0.1", @@ -140,7 +146,7 @@ "validate-npm-package-license": "^3.0.4", "validate-npm-package-name": "~3.0.0", "which": "^1.3.1", - "worker-farm": "^1.6.0", + "worker-farm": "^1.7.0", "write-file-atomic": "^2.4.3" }, "bundleDependencies": [ @@ -177,6 +183,7 @@ "hosted-git-info", "iferr", "imurmurhash", + "infer-owner", "inflight", "inherits", "ini", @@ -271,26 +278,29 @@ "deep-equal": "^1.0.1", "get-stream": "^4.1.0", "licensee": "^7.0.2", - "marked": "^0.6.0", - "marked-man": "^0.2.1", - "npm-registry-couchapp": "^2.7.2", + "marked": "^0.6.3", + "marked-man": "^0.6.0", + "npm-registry-couchapp": "^2.7.3", "npm-registry-mock": "^1.2.1", "require-inject": "^1.4.4", "sprintf-js": "^1.1.2", "standard": "^11.0.1", "tacks": "^1.3.0", "tap": "^12.7.0", - "tar-stream": "^2.0.1" + "tar-stream": "^2.1.0" }, "scripts": { "dumpconf": "env | grep npm | sort | uniq", "prepare": "node bin/npm-cli.js rebuild && node bin/npm-cli.js --no-audit --no-timing prune --prefix=. --no-global && rimraf test/*/*/node_modules && make -j4 doc", "preversion": "bash scripts/update-authors.sh && git add AUTHORS && git commit -m \"update AUTHORS\" || true", "licenses": "licensee --production --errors-only", - "tap": "tap -J --timeout 300", - "tap-cover": "tap -J --nyc-arg=--cache --coverage --timeout 600", + "tap": "tap -J --timeout 300 --no-esm", + "tap-cover": "tap -J --nyc-arg=--cache --coverage --timeout 600 --no-esm", "pretest": "standard", "test": "npm run test-tap --", + "test:nocleanup": "NO_TEST_CLEANUP=1 npm run test --", + "sudotest": "sudo npm run tap -- \"test/tap/*.js\"", + "sudotest:nocleanup": "sudo NO_TEST_CLEANUP=1 npm run tap -- \"test/tap/*.js\"", "posttest": "rimraf test/npm_cache*", "test-coverage": "npm run tap-cover -- \"test/tap/*.js\" \"test/network/*.js\" \"test/broken-under-*/*.js\"", "test-tap": "npm run tap -- \"test/tap/*.js\" \"test/network/*.js\" \"test/broken-under-*/*.js\"", diff --git a/deps/npm/scripts/clean-old.sh b/deps/npm/scripts/clean-old.sh index cda80f2f4845d1..32a203e4a5f7e6 100755 --- a/deps/npm/scripts/clean-old.sh +++ b/deps/npm/scripts/clean-old.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # look for old 0.x cruft, and get rid of it. # Should already be sitting in the npm folder. diff --git a/deps/npm/scripts/dep-update b/deps/npm/scripts/dep-update index 52abd518c317b2..006de17c7203a3 100755 --- a/deps/npm/scripts/dep-update +++ b/deps/npm/scripts/dep-update @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash node . install --save $1@$2 &&\ node scripts/gen-dev-ignores.js &&\ git add node_modules package.json package-lock.json &&\ diff --git a/deps/npm/scripts/dev-dep-update b/deps/npm/scripts/dev-dep-update index c8c9604759165a..cb0b783a837f4f 100755 --- a/deps/npm/scripts/dev-dep-update +++ b/deps/npm/scripts/dev-dep-update @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash node . install --save --save-dev $1@$2 &&\ node scripts/gen-dev-ignores.js &&\ git add package.json package-lock.json &&\ diff --git a/deps/npm/scripts/release.sh b/deps/npm/scripts/release.sh index 705f21502adfbd..e071c7ededaf75 100644 --- a/deps/npm/scripts/release.sh +++ b/deps/npm/scripts/release.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # script for creating a zip and tarball for inclusion in node diff --git a/deps/npm/scripts/relocate.sh b/deps/npm/scripts/relocate.sh index b7483f2963aea6..ff40f857a679e8 100755 --- a/deps/npm/scripts/relocate.sh +++ b/deps/npm/scripts/relocate.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Change the cli shebang to point at the specified node # Useful for when the program is moved around after install. diff --git a/deps/npm/test/common-tap.js b/deps/npm/test/common-tap.js index d54a8699954514..44b68d719de1a6 100644 --- a/deps/npm/test/common-tap.js +++ b/deps/npm/test/common-tap.js @@ -7,6 +7,12 @@ var readCmdShim = require('read-cmd-shim') var isWindows = require('../lib/utils/is-windows.js') var Bluebird = require('bluebird') +// remove any git envs so that we don't mess with the main repo +// when running git subprocesses in tests +Object.keys(process.env).filter(k => /^GIT/.test(k)).forEach( + k => delete process.env[k] +) + // cheesy hackaround for test deps (read: nock) that rely on setImmediate if (!global.setImmediate || !require('timers').setImmediate) { require('timers').setImmediate = global.setImmediate = function () { @@ -16,17 +22,57 @@ if (!global.setImmediate || !require('timers').setImmediate) { } var spawn = require('child_process').spawn +const spawnSync = require('child_process').spawnSync var path = require('path') +// space these out to help prevent collisions +const testId = 3 * (+process.env.TAP_CHILD_ID || 0) + // provide a working dir unique to each test const main = require.main.filename -exports.pkg = path.resolve(path.dirname(main), path.basename(main, '.js')) +const testName = path.basename(main, '.js') +exports.pkg = path.resolve(path.dirname(main), testName) +var commonCache = path.resolve(__dirname, 'npm_cache_' + testName) +exports.cache = commonCache + const mkdirp = require('mkdirp') const rimraf = require('rimraf') +rimraf.sync(exports.pkg) +rimraf.sync(commonCache) mkdirp.sync(exports.pkg) +mkdirp.sync(commonCache) +// if we're in sudo mode, make sure that the cache is not root-owned +const isRoot = process.getuid && process.getuid() === 0 +const isSudo = isRoot && process.env.SUDO_UID && process.env.SUDO_GID +if (isSudo) { + const sudoUid = +process.env.SUDO_UID + const sudoGid = +process.env.SUDO_GID + fs.chownSync(commonCache, sudoUid, sudoGid) +} + +const returnCwd = path.dirname(__dirname) +const find = require('which').sync('find') require('tap').teardown(() => { + // work around windows folder locking + process.chdir(returnCwd) try { - rimraf.sync(exports.pkg) + if (isSudo) { + // running tests as sudo. ensure we didn't leave any root-owned + // files in the cache by mistake. + const args = [ commonCache, '-uid', '0' ] + const found = spawnSync(find, args) + const output = found && found.stdout && found.stdout.toString() + if (output.length) { + const er = new Error('Root-owned files left in cache!') + er.testName = main + er.files = output.trim().split('\n') + throw er + } + } + if (!process.env.NO_TEST_CLEANUP) { + rimraf.sync(exports.pkg) + rimraf.sync(commonCache) + } } catch (e) { if (process.platform !== 'win32') { throw e @@ -34,9 +80,6 @@ require('tap').teardown(() => { } }) -// space these out to help prevent collisions -const testId = 3 * (+process.env.TAP_CHILD_ID || 0) - var port = exports.port = 15443 + testId exports.registry = 'http://localhost:' + port @@ -53,8 +96,8 @@ ourenv.npm_config_progress = 'false' ourenv.npm_config_metrics = 'false' ourenv.npm_config_audit = 'false' -var npm_config_cache = path.resolve(__dirname, 'npm_cache_' + testId) -ourenv.npm_config_cache = exports.npm_config_cache = npm_config_cache +ourenv.npm_config_unsafe_perm = 'true' +ourenv.npm_config_cache = commonCache ourenv.npm_config_userconfig = exports.npm_config_userconfig = configCommon.userconfig ourenv.npm_config_globalconfig = exports.npm_config_globalconfig = configCommon.globalconfig ourenv.npm_config_global_style = 'false' @@ -88,7 +131,10 @@ exports.npm = function (cmd, opts, cb) { opts.env = opts.env || process.env if (opts.env._storage) opts.env = Object.assign({}, opts.env._storage) if (!opts.env.npm_config_cache) { - opts.env.npm_config_cache = npm_config_cache + opts.env.npm_config_cache = commonCache + } + if (!opts.env.npm_config_unsafe_perm) { + opts.env.npm_config_unsafe_perm = 'true' } if (!opts.env.npm_config_send_metrics) { opts.env.npm_config_send_metrics = 'false' diff --git a/deps/npm/test/tap/404-parent.js b/deps/npm/test/tap/404-parent.js index 539ead7a45e0e8..306a4bc4bf2543 100644 --- a/deps/npm/test/tap/404-parent.js +++ b/deps/npm/test/tap/404-parent.js @@ -5,7 +5,6 @@ var osenv = require('osenv') var path = require('path') var fs = require('fs') var rimraf = require('rimraf') -var mkdirp = require('mkdirp') const pkg = common.pkg var mr = require('npm-registry-mock') @@ -26,8 +25,6 @@ test('cleanup', function (t) { }) function setup () { - mkdirp.sync(pkg) - mkdirp.sync(path.resolve(pkg, 'cache')) fs.writeFileSync(path.resolve(pkg, 'package.json'), JSON.stringify({ author: 'Evan Lucas', name: '404-parent-test', diff --git a/deps/npm/test/tap/404-private-registry-scoped.js b/deps/npm/test/tap/404-private-registry-scoped.js index 5565f7a404e9cc..0aa262f54628ca 100644 --- a/deps/npm/test/tap/404-private-registry-scoped.js +++ b/deps/npm/test/tap/404-private-registry-scoped.js @@ -1,23 +1,9 @@ var test = require('tap').test -var mkdirp = require('mkdirp') -var rimraf = require('rimraf') var common = require('../common-tap.js') var mr = common.fakeRegistry.compat var server -var testdir = common.pkg - -function setup () { - cleanup() - mkdirp.sync(testdir) -} - -function cleanup () { - rimraf.sync(testdir) -} - test('setup', function (t) { - setup() mr({port: common.port, throwOnUnmatched: true}, function (err, s) { t.ifError(err, 'registry mocked successfully') server = s @@ -30,7 +16,7 @@ test('scoped package names not mangled on error with non-root registry', functio common.npm( [ '--registry=' + common.registry, - '--cache=' + testdir, + '--cache=' + common.cache, 'cache', 'add', '@scope/foo@*', @@ -43,14 +29,8 @@ test('scoped package names not mangled on error with non-root registry', functio t.match(stderr, /E404/, 'should notify the sort of error as a 404') t.match(stderr, /@scope(?:%2f|\/)foo/, 'should have package name in error') server.done() + server.close() t.end() } ) }) - -test('cleanup', function (t) { - server.close() - cleanup() - t.pass('cleaned up') - t.end() -}) diff --git a/deps/npm/test/tap/404-private-registry.js b/deps/npm/test/tap/404-private-registry.js index 869125eba18f0b..0ca05105dc9f30 100644 --- a/deps/npm/test/tap/404-private-registry.js +++ b/deps/npm/test/tap/404-private-registry.js @@ -1,25 +1,12 @@ var test = require('tap').test var path = require('path') -var mkdirp = require('mkdirp') -var rimraf = require('rimraf') var common = require('../common-tap.js') var mr = common.fakeRegistry.compat var server var packageName = path.basename(__filename, '.js') -var testdir = common.pkg - -function setup () { - cleanup() - mkdirp.sync(testdir) -} - -function cleanup () { - rimraf.sync(testdir) -} test('setup', function (t) { - setup() mr({port: common.port, throwOnUnmatched: true}, function (err, s) { t.ifError(err, 'registry mocked successfully') server = s @@ -32,7 +19,7 @@ test('package names not mangled on error with non-root registry', function (t) { common.npm( [ '--registry=' + common.registry, - '--cache=' + testdir, + '--cache=' + common.cache, 'cache', 'add', packageName + '@*' @@ -43,14 +30,8 @@ test('package names not mangled on error with non-root registry', function (t) { t.equal(code, 1, 'exited with error') t.match(stderr, packageName, 'should have package name in error') server.done() + server.close() t.end() } ) }) - -test('cleanup', function (t) { - server.close() - cleanup() - t.pass('cleaned up') - t.end() -}) diff --git a/deps/npm/test/tap/404.js b/deps/npm/test/tap/404.js index 450b0c2816fba0..af146371c7933c 100644 --- a/deps/npm/test/tap/404.js +++ b/deps/npm/test/tap/404.js @@ -11,7 +11,7 @@ const invalidPackage = /Your package name is not valid, because[\s\S]+1\. name c const basedir = common.pkg const testdir = path.join(basedir, 'testdir') -const cachedir = path.join(basedir, 'cache') +const cachedir = common.cache const globaldir = path.join(basedir, 'global') const tmpdir = path.join(basedir, 'tmp') diff --git a/deps/npm/test/tap/access.js b/deps/npm/test/tap/access.js index db03cbfc9e80bb..2998bbf63b2d52 100644 --- a/deps/npm/test/tap/access.js +++ b/deps/npm/test/tap/access.js @@ -19,22 +19,18 @@ const scoped = { } test('setup', function (t) { - mkdirp(pkg, function (er) { - t.ifError(er, pkg + ' made successfully') - - mr({port: common.port}, function (err, s) { - t.ifError(err, 'registry mocked successfully') - server = s - - fs.writeFile( - path.join(pkg, 'package.json'), - JSON.stringify(scoped), - function (er) { - t.ifError(er, 'wrote package.json') - t.end() - } - ) - }) + mr({port: common.port}, function (err, s) { + t.ifError(err, 'registry mocked successfully') + server = s + + fs.writeFile( + path.join(pkg, 'package.json'), + JSON.stringify(scoped), + function (er) { + t.ifError(er, 'wrote package.json') + t.end() + } + ) }) }) diff --git a/deps/npm/test/tap/all-package-metadata-cache-stream-unit.js b/deps/npm/test/tap/all-package-metadata-cache-stream-unit.js index 9c1babd59c96c8..66b24c5e0c710c 100644 --- a/deps/npm/test/tap/all-package-metadata-cache-stream-unit.js +++ b/deps/npm/test/tap/all-package-metadata-cache-stream-unit.js @@ -5,7 +5,6 @@ const common = require('../common-tap.js') const getStream = require('get-stream') const mkdirp = require('mkdirp') const path = require('path') -const rimraf = require('rimraf') const Tacks = require('tacks') const {test} = require('tap') @@ -13,16 +12,23 @@ const {File} = Tacks const _createCacheEntryStream = require('../../lib/search/all-package-metadata.js')._createCacheEntryStream -const PKG_DIR = common.pkg -const CACHE_DIR = path.resolve(PKG_DIR, 'cache') - +// this test uses a fresh cache for each test block +// create them all in common.cache so that we can verify +// them for root-owned files in sudotest +let CACHE_DIR +let cacheCounter = 1 +const chownr = require('chownr') function setup () { + CACHE_DIR = common.cache + '/' + cacheCounter++ mkdirp.sync(CACHE_DIR) + fixOwner(CACHE_DIR) } -function cleanup () { - rimraf.sync(PKG_DIR) -} +const fixOwner = ( + process.getuid && process.getuid() === 0 && + process.env.SUDO_UID && process.env.SUDO_GID +) ? (path) => chownr.sync(path, +process.env.SUDO_UID, +process.env.SUDO_GID) + : () => {} test('createCacheEntryStream basic', t => { setup() @@ -39,6 +45,7 @@ test('createCacheEntryStream basic', t => { } })) fixture.create(cachePath) + fixOwner(cachePath) return _createCacheEntryStream(cachePath, {}).then(({ updateStream: stream, updatedLatest: latest @@ -53,7 +60,6 @@ test('createCacheEntryStream basic', t => { name: 'foo', version: '1.0.0' }]) - cleanup() }) }) }) @@ -63,12 +69,12 @@ test('createCacheEntryStream empty cache', t => { const cachePath = path.join(CACHE_DIR, '.cache.json') const fixture = new Tacks(File({})) fixture.create(cachePath) + fixOwner(cachePath) return _createCacheEntryStream(cachePath, {}).then( () => { throw new Error('should not succeed') }, err => { t.ok(err, 'returned an error because there was no _updated') t.match(err.message, /Empty or invalid stream/, 'useful error message') - cleanup() } ) }) @@ -80,6 +86,7 @@ test('createCacheEntryStream no entry cache', t => { '_updated': 1234 })) fixture.create(cachePath) + fixOwner(cachePath) return _createCacheEntryStream(cachePath, {}).then(({ updateStream: stream, updatedLatest: latest @@ -88,7 +95,6 @@ test('createCacheEntryStream no entry cache', t => { t.ok(stream, 'returned a stream') return getStream.array(stream).then(results => { t.deepEquals(results, [], 'no results') - cleanup() }) }) }) @@ -101,7 +107,6 @@ test('createCacheEntryStream missing cache', t => { err => { t.ok(err, 'returned an error because there was no cache') t.equals(err.code, 'ENOENT', 'useful error message') - cleanup() } ) }) diff --git a/deps/npm/test/tap/all-package-metadata-entry-stream-unit.js b/deps/npm/test/tap/all-package-metadata-entry-stream-unit.js index e693e6b33d76e4..164a34f4c50c8b 100644 --- a/deps/npm/test/tap/all-package-metadata-entry-stream-unit.js +++ b/deps/npm/test/tap/all-package-metadata-entry-stream-unit.js @@ -6,7 +6,6 @@ const mkdirp = require('mkdirp') const mr = require('npm-registry-mock') const npm = require('../../') const path = require('path') -const rimraf = require('rimraf') const Tacks = require('tacks') const test = require('tap').test @@ -14,21 +13,27 @@ const {File} = Tacks const _createEntryStream = require('../../lib/search/all-package-metadata.js')._createEntryStream -const PKG_DIR = common.pkg -const CACHE_DIR = path.resolve(PKG_DIR, 'cache') - let server +// this test uses a fresh cache for each test block +// create them all in common.cache so that we can verify +// them for root-owned files in sudotest +let CACHE_DIR +let cacheCounter = 1 function setup () { + CACHE_DIR = common.cache + '/' + cacheCounter++ mkdirp.sync(CACHE_DIR) + fixOwner(CACHE_DIR) } -function cleanup () { - rimraf.sync(PKG_DIR) -} +const chownr = require('chownr') +const fixOwner = ( + process.getuid && process.getuid() === 0 && + process.env.SUDO_UID && process.env.SUDO_GID +) ? (path) => chownr.sync(path, +process.env.SUDO_UID, +process.env.SUDO_GID) + : () => {} test('setup', t => { - cleanup() mr({port: common.port, throwOnUnmatched: true}, (err, s) => { t.ifError(err, 'registry mocked successfully') npm.load({ cache: CACHE_DIR, registry: common.registry }, err => { @@ -71,7 +76,6 @@ test('createEntryStream full request', t => { version: '1.0.0' }]) server.done() - cleanup() }) }) @@ -88,6 +92,7 @@ test('createEntryStream cache only', function (t) { other: { name: 'other', version: '1.0.0' } })) fixture.create(cachePath) + fixOwner(cachePath) return _createEntryStream(cachePath, 600, { registry: common.registry }).then(({ @@ -106,7 +111,6 @@ test('createEntryStream cache only', function (t) { 'packages deduped and sorted' ) server.done() - cleanup() }) }) @@ -130,6 +134,7 @@ test('createEntryStream merged stream', function (t) { other: { name: 'other', version: '1.0.0' } })) fixture.create(cachePath) + fixOwner(cachePath) return _createEntryStream(cachePath, 600, { registry: common.registry }).then(({ @@ -156,7 +161,6 @@ test('createEntryStream merged stream', function (t) { version: '1.0.0' }, 'update stream version wins on dedupe even when the newer one has a lower semver.') server.done() - cleanup() }) }) @@ -177,13 +181,10 @@ test('createEntryStream no sources', function (t) { t.match(err.message, /No search sources available/, 'useful error message') }).then(() => { server.done() - cleanup() }) }) test('cleanup', function (t) { - cleanup() server.close() - t.pass('all done') t.done() }) diff --git a/deps/npm/test/tap/all-package-metadata-update-stream-unit.js b/deps/npm/test/tap/all-package-metadata-update-stream-unit.js index 782bdf231c88db..126fe9d3985934 100644 --- a/deps/npm/test/tap/all-package-metadata-update-stream-unit.js +++ b/deps/npm/test/tap/all-package-metadata-update-stream-unit.js @@ -5,24 +5,30 @@ const getStream = require('get-stream') const npm = require('../../') const test = require('tap').test const mkdirp = require('mkdirp') -const rimraf = require('rimraf') -const path = require('path') const mr = require('npm-registry-mock') var _createEntryUpdateStream = require('../../lib/search/all-package-metadata.js')._createEntryUpdateStream -var PKG_DIR = common.pkg -var CACHE_DIR = path.resolve(PKG_DIR, 'cache') - var server +// this test uses a fresh cache for each test block +// create them all in common.cache so that we can verify +// them for root-owned files in sudotest +let CACHE_DIR +let cacheCounter = 1 function setup () { + CACHE_DIR = common.cache + '/' + cacheCounter++ mkdirp.sync(CACHE_DIR) + fixOwner(CACHE_DIR) } -function cleanup () { - rimraf.sync(PKG_DIR) -} +const chownr = require('chownr') + +const fixOwner = ( + process.getuid && process.getuid() === 0 && + process.env.SUDO_UID && process.env.SUDO_GID +) ? (path) => chownr.sync(path, +process.env.SUDO_UID, +process.env.SUDO_GID) + : () => {} test('setup', function (t) { mr({port: common.port, throwOnUnmatched: true}, function (err, s) { @@ -63,7 +69,6 @@ test('createEntryUpdateStream full request', function (t) { version: '1.0.0' }]) server.done() - cleanup() }) }) @@ -94,7 +99,6 @@ test('createEntryUpdateStream partial update', function (t) { version: '1.0.0' }]) server.done() - cleanup() }) }) @@ -127,7 +131,6 @@ test('createEntryUpdateStream authed request', function (t) { version: '1.0.0' }]) server.done() - cleanup() }) }) @@ -147,7 +150,6 @@ test('createEntryUpdateStream bad auth', function (t) { t.match(err, /unauthorized/, 'failure message from request used') }).then(() => { server.done() - cleanup() }) }) @@ -164,14 +166,11 @@ test('createEntryUpdateStream not stale', function (t) { t.notOk(stream, 'no stream returned') t.notOk(latest, 'no latest returned') server.done() - cleanup() t.end() }) }) test('cleanup', function (t) { - cleanup() server.close() - t.pass('all done') t.done() }) diff --git a/deps/npm/test/tap/all-package-metadata-write-stream-unit.js b/deps/npm/test/tap/all-package-metadata-write-stream-unit.js index b258b40dfe666f..8cdfe96da05e2b 100644 --- a/deps/npm/test/tap/all-package-metadata-write-stream-unit.js +++ b/deps/npm/test/tap/all-package-metadata-write-stream-unit.js @@ -5,23 +5,29 @@ const getStream = require('get-stream') const npm = require('../../') const test = require('tap').test const mkdirp = require('mkdirp') -const rimraf = require('rimraf') const path = require('path') const fs = require('fs') const ms = require('mississippi') const _createCacheWriteStream = require('../../lib/search/all-package-metadata.js')._createCacheWriteStream -const PKG_DIR = common.pkg -const CACHE_DIR = path.resolve(PKG_DIR, 'cache') - +// this test uses a fresh cache for each test block +// create them all in common.cache so that we can verify +// them for root-owned files in sudotest +let CACHE_DIR +let cacheCounter = 1 function setup () { + CACHE_DIR = common.cache + '/' + cacheCounter++ mkdirp.sync(CACHE_DIR) + fixOwner(CACHE_DIR) } -function cleanup () { - rimraf.sync(PKG_DIR) -} +const chownr = require('chownr') +const fixOwner = ( + process.getuid && process.getuid() === 0 && + process.env.SUDO_UID && process.env.SUDO_GID +) ? (path) => chownr.sync(path, +process.env.SUDO_UID, +process.env.SUDO_GID) + : () => {} function fromArray (array) { var idx = 0 @@ -74,7 +80,6 @@ test('createCacheEntryStream basic', function (t) { version: '1.0.0' } }, 'cache contents based on what was written') - cleanup() }) }) @@ -94,7 +99,6 @@ test('createCacheEntryStream no entries', function (t) { }).then(() => { const fileData = JSON.parse(fs.readFileSync(cachePath)) t.ok(fileData, 'cache file exists and has stuff in it') - cleanup() }) }) @@ -117,6 +121,5 @@ test('createCacheEntryStream missing cache dir', function (t) { t.deepEquals(fileData, { '_updated': latest }, 'cache still contains `_updated`') - cleanup() }) }) diff --git a/deps/npm/test/tap/all-package-metadata.js b/deps/npm/test/tap/all-package-metadata.js index ec605c3486bb9d..153878500acbae 100644 --- a/deps/npm/test/tap/all-package-metadata.js +++ b/deps/npm/test/tap/all-package-metadata.js @@ -15,7 +15,7 @@ const File = Tacks.File const allPackageMetadata = require('../../lib/search/all-package-metadata.js') -const PKG_DIR = path.resolve(common.pkg, 'update-index') +const PKG_DIR = path.resolve(common.cache, 'update-index') const CACHE_DIR = path.resolve(PKG_DIR, 'cache', '_cacache') let cacheBase let cachePath diff --git a/deps/npm/test/tap/anon-cli-metrics.js b/deps/npm/test/tap/anon-cli-metrics.js index d021cf62bc92f0..cb1f878a4cb0aa 100644 --- a/deps/npm/test/tap/anon-cli-metrics.js +++ b/deps/npm/test/tap/anon-cli-metrics.js @@ -11,7 +11,7 @@ var common = require('../common-tap.js') var basedir = common.pkg var testdir = path.join(basedir, 'testdir') -var cachedir = path.join(basedir, 'cache') +var cachedir = common.cache var globaldir = path.join(basedir, 'global') var tmpdir = path.join(basedir, 'tmp') var metricsFile = path.join(cachedir, 'anonymous-cli-metrics.json') diff --git a/deps/npm/test/tap/auto-prune.js b/deps/npm/test/tap/auto-prune.js index 8d129c4a83b21d..aab3692a3b242d 100644 --- a/deps/npm/test/tap/auto-prune.js +++ b/deps/npm/test/tap/auto-prune.js @@ -9,7 +9,7 @@ const common = require('../common-tap.js') const basedir = common.pkg const testdir = path.join(basedir, 'testdir') -const cachedir = path.join(basedir, 'cache') +const cachedir = common.cache const globaldir = path.join(basedir, 'global') const tmpdir = path.join(basedir, 'tmp') diff --git a/deps/npm/test/tap/bitbucket-https-url-with-creds-package.js b/deps/npm/test/tap/bitbucket-https-url-with-creds-package.js index 4177d5f89fcb76..4891b9886bd8b2 100644 --- a/deps/npm/test/tap/bitbucket-https-url-with-creds-package.js +++ b/deps/npm/test/tap/bitbucket-https-url-with-creds-package.js @@ -50,7 +50,7 @@ test('bitbucket-https-url-with-creds-package', function (t) { }) var opts = { - cache: path.resolve(pkg, 'cache'), + cache: common.cache, prefix: pkg, registry: common.registry, loglevel: 'silent' diff --git a/deps/npm/test/tap/bitbucket-https-url-with-creds.js b/deps/npm/test/tap/bitbucket-https-url-with-creds.js index 09f7e0e8e54889..7f7e7eee4810a1 100644 --- a/deps/npm/test/tap/bitbucket-https-url-with-creds.js +++ b/deps/npm/test/tap/bitbucket-https-url-with-creds.js @@ -47,7 +47,7 @@ test('bitbucket-https-url-with-creds', function (t) { }) var opts = { - cache: path.resolve(pkg, 'cache'), + cache: common.cache, prefix: pkg, registry: common.registry, loglevel: 'silent' diff --git a/deps/npm/test/tap/bitbucket-shortcut-package.js b/deps/npm/test/tap/bitbucket-shortcut-package.js index bf1a39068ec875..ef606f4aa3e0c0 100644 --- a/deps/npm/test/tap/bitbucket-shortcut-package.js +++ b/deps/npm/test/tap/bitbucket-shortcut-package.js @@ -51,7 +51,7 @@ test('bitbucket-shortcut', function (t) { }) var opts = { - cache: path.resolve(pkg, 'cache'), + cache: common.cache, prefix: pkg, registry: common.registry, loglevel: 'silent' diff --git a/deps/npm/test/tap/bitbucket-shortcut.js b/deps/npm/test/tap/bitbucket-shortcut.js index c81554e2d9d208..fe1c4179755c40 100644 --- a/deps/npm/test/tap/bitbucket-shortcut.js +++ b/deps/npm/test/tap/bitbucket-shortcut.js @@ -48,7 +48,7 @@ test('bitbucket-shortcut', function (t) { }) var opts = { - cache: path.resolve(pkg, 'cache'), + cache: common.cache, prefix: pkg, registry: common.registry, loglevel: 'silent' diff --git a/deps/npm/test/tap/cache-shasum-fork.js b/deps/npm/test/tap/cache-shasum-fork.js index 3bc2a5d2a59ae9..e035c78111af8d 100644 --- a/deps/npm/test/tap/cache-shasum-fork.js +++ b/deps/npm/test/tap/cache-shasum-fork.js @@ -15,7 +15,7 @@ var forkPath = path.resolve( __dirname, '..', 'fixtures', 'forked-underscore-1.5.1.tgz' ) var pkg = common.pkg -var cache = path.join(pkg, 'cache') +var cache = common.cache var server test('setup', function (t) { @@ -42,7 +42,7 @@ test('npm cache - install from fork', function (t) { }, function (err, code, stdout, stderr) { t.ifErr(err, 'install finished without error') - t.notOk(stderr, 'Should not get data on stderr: ' + stderr) + t.equal(stderr, '', 'Should not get data on stderr') t.equal(code, 0, 'install finished successfully') var deps = {} diff --git a/deps/npm/test/tap/check-permissions.js b/deps/npm/test/tap/check-permissions.js index 74e49fb65fb6c4..b8238891d90759 100644 --- a/deps/npm/test/tap/check-permissions.js +++ b/deps/npm/test/tap/check-permissions.js @@ -79,13 +79,14 @@ function writableTests (t, writable) { writable(writableDir, function (er) { t.error(er, 'writable dir is writable') }) - if (process.platform !== 'win32') { - // Windows folders cannot be set to be read-only. + if (process.platform === 'win32') { + t.pass('windows folders cannot be read-only') + } else if (process.getuid && process.getuid() === 0) { + t.pass('root is not blocked by read-only dirs') + } else { writable(nonWritableDir, function (er) { t.ok(er, 'non-writable dir resulted in an error') }) - } else { - t.pass('windows folders cannot be read-only') } } diff --git a/deps/npm/test/tap/ci-header.js b/deps/npm/test/tap/ci-header.js index 530da3bf3a72a7..fc791c6e6710d2 100644 --- a/deps/npm/test/tap/ci-header.js +++ b/deps/npm/test/tap/ci-header.js @@ -10,7 +10,7 @@ var common = require('../common-tap.js') var basedir = common.pkg var testdir = path.join(basedir, 'testdir') -var cachedir = path.join(basedir, 'cache') +var cachedir = common.cache var globaldir = path.join(basedir, 'global') var tmpdir = path.join(basedir, 'tmp') diff --git a/deps/npm/test/tap/ci-with-local-dependency.js b/deps/npm/test/tap/ci-with-local-dependency.js new file mode 100644 index 00000000000000..376dc978181537 --- /dev/null +++ b/deps/npm/test/tap/ci-with-local-dependency.js @@ -0,0 +1,82 @@ +const fs = require('graceful-fs') +const path = require('path') + +const mkdirp = require('mkdirp') +const t = require('tap') + +const common = require('../common-tap.js') + +const pkg = common.pkg + '/package' + +const EXEC_OPTS = { + cwd: pkg, + stdio: [0, 1, 2], + env: common.newEnv().extend({ + npm_config_registry: common.registry + }) +} + +const localDependencyJson = { + name: 'local-dependency', + version: '0.0.0', + dependencies: { + 'test-package': '0.0.0' + } +} + +const dependentJson = { + name: 'dependent', + version: '0.0.0', + dependencies: { + 'local-dependency': '../local-dependency' + } +} + +const target = path.resolve(pkg, '../local-dependency') +const mr = require('npm-registry-mock') +let server +t.teardown(() => { + if (server) { + server.close() + } +}) + +t.test('setup', function (t) { + mkdirp.sync(target) + fs.writeFileSync( + path.join(target, 'package.json'), + JSON.stringify(localDependencyJson, null, 2) + ) + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(dependentJson, null, 2) + ) + mr({ port: common.port }, (er, s) => { + if (er) { + throw er + } + server = s + t.end() + }) +}) + +t.test('\'npm install\' should install local pkg from sub path', function (t) { + common.npm(['install', '--loglevel=silent'], EXEC_OPTS, function (err, code) { + if (err) throw err + t.equal(code, 0, 'npm install exited with code') + t.ok(fs.statSync(path.resolve(pkg, 'node_modules/local-dependency/package.json')).isFile(), 'local dependency package.json exists') + t.ok(fs.statSync(path.resolve(pkg, 'node_modules/local-dependency/node_modules/test-package')).isDirectory(), 'transitive dependency installed') + t.end() + }) +}) + +t.test('\'npm ci\' should work', function (t) { + common.npm(['ci', '--loglevel=silent'], EXEC_OPTS, function (err, code) { + if (err) throw err + t.equal(code, 0, 'npm install exited with code') + t.ok(fs.statSync(path.resolve(pkg, 'node_modules/local-dependency/package.json')).isFile(), 'local dependency package.json exists') + t.ok(fs.statSync(path.resolve(pkg, 'node_modules/local-dependency/node_modules/test-package')).isDirectory(), 'transitive dependency installed') + t.end() + }) +}) diff --git a/deps/npm/test/tap/circular-dep.js b/deps/npm/test/tap/circular-dep.js index a08c41bf4a9af3..624ea3800a9062 100644 --- a/deps/npm/test/tap/circular-dep.js +++ b/deps/npm/test/tap/circular-dep.js @@ -16,7 +16,7 @@ var minimist = path.join(pkg, 'minimist') var EXEC_OPTS = { cwd: path.join(pkg, 'minimist/node_modules'), - npm_config_cache: path.join(pkg, 'cache') + npm_config_cache: common.cache } var json = { diff --git a/deps/npm/test/tap/correct-mkdir.js b/deps/npm/test/tap/correct-mkdir.js index c69f8b00b55d53..5c2e9771dfc083 100644 --- a/deps/npm/test/tap/correct-mkdir.js +++ b/deps/npm/test/tap/correct-mkdir.js @@ -8,11 +8,11 @@ var cache_dir = common.pkg test('correct-mkdir: no race conditions', function (t) { var mock_fs = {} var did_hook = false - mock_fs.stat = function (path, cb) { + mock_fs.lstat = function (path, cb) { if (path === cache_dir) { // Return a non-matching owner cb(null, { - uid: +process.uid + 1, + uid: +process.getuid() + 1, isDirectory: function () { return true } @@ -35,7 +35,8 @@ test('correct-mkdir: no race conditions', function (t) { } var mocks = { 'graceful-fs': mock_fs, - 'chownr': mock_chownr + 'chownr': mock_chownr, + 'infer-owner': requireInject('infer-owner', { fs: mock_fs }) } var correctMkdir = requireInject('../../lib/utils/correct-mkdir.js', mocks) @@ -60,7 +61,7 @@ test('correct-mkdir: no race conditions', function (t) { test('correct-mkdir: ignore ENOENTs from chownr', function (t) { var mock_fs = {} - mock_fs.stat = function (path, cb) { + mock_fs.lstat = function (path, cb) { if (path === cache_dir) { cb(null, { isDirectory: function () { @@ -99,7 +100,7 @@ test('correct-mkdir: SUDO_UID and SUDO_GID non-Windows', function (t) { process.getuid = function () { return 0 } process.getgid = function () { return 0 } var mock_fs = {} - mock_fs.stat = function (path, cb) { + mock_fs.lstat = function (path, cb) { if (path === cache_dir) { cb(null, { uid: 0, @@ -134,7 +135,7 @@ test('correct-mkdir: SUDO_UID and SUDO_GID Windows', function (t) { delete process.getuid delete process.getgid var mock_fs = {} - mock_fs.stat = function (path, cb) { + mock_fs.lstat = function (path, cb) { if (path === cache_dir) { cb(null, { uid: 0, diff --git a/deps/npm/test/tap/debug-logs.js b/deps/npm/test/tap/debug-logs.js index 0e951c4bb082be..4da52bfcee8ae3 100644 --- a/deps/npm/test/tap/debug-logs.js +++ b/deps/npm/test/tap/debug-logs.js @@ -10,14 +10,13 @@ var common = require('../common-tap.js') var basedir = common.pkg var testdir = path.join(basedir, 'testdir') -var cachedir = path.join(basedir, 'cache') +var cachedir = common.cache var globaldir = path.join(basedir, 'global') var tmpdir = path.join(basedir, 'tmp') var conf = { cwd: testdir, env: Object.assign({}, process.env, { - npm_config_cache: cachedir, npm_config_tmp: tmpdir, npm_config_prefix: globaldir, npm_config_registry: common.registry, @@ -26,7 +25,6 @@ var conf = { } var fixture = new Tacks(Dir({ - cache: Dir(), global: Dir(), tmp: Dir(), testdir: Dir({ @@ -41,17 +39,8 @@ var fixture = new Tacks(Dir({ }) })) -function setup () { - cleanup() - fixture.create(basedir) -} - -function cleanup () { - fixture.remove(basedir) -} - test('setup', function (t) { - setup() + fixture.create(basedir) t.done() }) @@ -59,8 +48,9 @@ test('example', function (t) { common.npm(['run', 'false'], conf, function (err, code, stdout, stderr) { if (err) throw err t.is(code, 1, 'command errored') - var matches = stderr.match(/A complete log of this run can be found in:.*\nnpm ERR! {5,5}(.*)/) - t.ok(matches, 'debug log mentioned in error message') + const re = /A complete log of this run can be found in:.*\nnpm ERR! {5,5}(.*)/ + const matches = stderr.match(re) + t.match(stderr, re, 'debug log mentioned in error message') if (matches) { var logfile = matches[1] t.matches(path.relative(cachedir, logfile), /^_logs/, 'debug log is inside the cache in _logs') @@ -105,8 +95,3 @@ test('example', function (t) { }) }) }) - -test('cleanup', function (t) { - cleanup() - t.done() -}) diff --git a/deps/npm/test/tap/dedupe-git-semver.js b/deps/npm/test/tap/dedupe-git-semver.js index 35bb2c87d80e78..b7e31b08614f01 100644 --- a/deps/npm/test/tap/dedupe-git-semver.js +++ b/deps/npm/test/tap/dedupe-git-semver.js @@ -39,7 +39,7 @@ const npm = requireInject.installGlobally('../../lib/npm.js', { const common = require('../common-tap.js') const basedir = common.pkg const testdir = path.join(basedir, 'testdir') -const cachedir = path.join(basedir, 'cache') +const cachedir = common.cache const tmpdir = path.join(basedir, 'tmp') const cwd = process.cwd() diff --git a/deps/npm/test/tap/doctor.js b/deps/npm/test/tap/doctor.js index 6ee05746960d6a..7b07e0f39b7d8f 100644 --- a/deps/npm/test/tap/doctor.js +++ b/deps/npm/test/tap/doctor.js @@ -14,7 +14,7 @@ const Dir = Tacks.Dir const File = Tacks.File const ROOT = common.pkg -const CACHE = path.join(ROOT, 'cache') +const CACHE = common.cache const TMP = path.join(ROOT, 'tmp') const PREFIX = path.join(ROOT, 'global-prefix') const PKG = path.join(ROOT, 'pkg') diff --git a/deps/npm/test/tap/false-name.js b/deps/npm/test/tap/false-name.js index 301be4fc8ef945..541bacc7eda538 100644 --- a/deps/npm/test/tap/false-name.js +++ b/deps/npm/test/tap/false-name.js @@ -11,15 +11,13 @@ var fs = require('graceful-fs') var path = require('path') var existsSync = fs.existsSync || path.existsSync -var mkdirp = require('mkdirp') var mr = require('npm-registry-mock') -var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') var pkg = common.pkg -var cache = path.join(pkg, 'cache') +var cache = common.cache var server var EXEC_OPTS = { cwd: pkg } @@ -69,17 +67,10 @@ test('not every pkg.name can be required', function (t) { test('cleanup', function (t) { server.close() - cleanup() t.end() }) -function cleanup () { - rimraf.sync(pkg) -} - function setup () { - cleanup() - mkdirp.sync(cache) fs.writeFileSync( path.join(pkg, 'package.json'), JSON.stringify(json, null, 2) diff --git a/deps/npm/test/tap/fetch-package-metadata.js b/deps/npm/test/tap/fetch-package-metadata.js index 9a45fb57a92deb..2e666772ed204b 100644 --- a/deps/npm/test/tap/fetch-package-metadata.js +++ b/deps/npm/test/tap/fetch-package-metadata.js @@ -1,11 +1,6 @@ 'use strict' -var path = require('path') -var mkdirp = require('mkdirp') - var mr = require('npm-registry-mock') var npa = require('npm-package-arg') -var osenv = require('osenv') -var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') @@ -13,22 +8,11 @@ var npm = require('../../lib/npm.js') var pkg = common.pkg -function setup (cb) { - cleanup() - mkdirp.sync(pkg) -} - -function cleanup () { - process.chdir(osenv.tmpdir()) - rimraf.sync(pkg) -} - test('setup', function (t) { - setup() process.chdir(pkg) var opts = { - cache: path.resolve(pkg, 'cache'), + cache: common.cache, registry: common.registry, // important to make sure devDependencies don't get stripped dev: true @@ -62,8 +46,3 @@ test('fetch-package-metadata provides resolved metadata', function (t) { t.end() } }) - -test('cleanup', function (t) { - cleanup() - t.end() -}) diff --git a/deps/npm/test/tap/gist-short-shortcut-package.js b/deps/npm/test/tap/gist-short-shortcut-package.js index d7c70b16b029fc..e5e67f21a05dc6 100644 --- a/deps/npm/test/tap/gist-short-shortcut-package.js +++ b/deps/npm/test/tap/gist-short-shortcut-package.js @@ -49,7 +49,7 @@ test('gist-short-shortcut-package', function (t) { }) var opts = { - cache: path.resolve(pkg, 'cache'), + cache: common.cache, prefix: pkg, registry: common.registry, loglevel: 'silent' diff --git a/deps/npm/test/tap/gist-short-shortcut.js b/deps/npm/test/tap/gist-short-shortcut.js index 04bf5bd42a9859..2fcf63d53ede1d 100644 --- a/deps/npm/test/tap/gist-short-shortcut.js +++ b/deps/npm/test/tap/gist-short-shortcut.js @@ -46,7 +46,7 @@ test('gist-shortcut', function (t) { }) var opts = { - cache: path.resolve(pkg, 'cache'), + cache: common.cache, prefix: pkg, registry: common.registry, loglevel: 'silent' diff --git a/deps/npm/test/tap/gist-shortcut-package.js b/deps/npm/test/tap/gist-shortcut-package.js index 9851e80b0e07ac..06b4383583aad0 100644 --- a/deps/npm/test/tap/gist-shortcut-package.js +++ b/deps/npm/test/tap/gist-shortcut-package.js @@ -49,7 +49,7 @@ test('gist-shortcut-package', function (t) { }) var opts = { - cache: path.resolve(pkg, 'cache'), + cache: common.cache, prefix: pkg, registry: common.registry, loglevel: 'silent' diff --git a/deps/npm/test/tap/gist-shortcut.js b/deps/npm/test/tap/gist-shortcut.js index 9958a996e076c9..e5f200f5fdeb1c 100644 --- a/deps/npm/test/tap/gist-shortcut.js +++ b/deps/npm/test/tap/gist-shortcut.js @@ -46,7 +46,7 @@ test('gist-shortcut', function (t) { }) var opts = { - cache: path.resolve(pkg, 'cache'), + cache: common.cache, prefix: pkg, registry: common.registry, loglevel: 'silent' diff --git a/deps/npm/test/tap/git-dependency-install-link.js b/deps/npm/test/tap/git-dependency-install-link.js index 462df8973fead1..44438e7f958253 100644 --- a/deps/npm/test/tap/git-dependency-install-link.js +++ b/deps/npm/test/tap/git-dependency-install-link.js @@ -14,7 +14,7 @@ var common = require('../common-tap.js') var pkg = common.pkg var repo = pkg + '-repo' var prefix = pkg + '-prefix' -var cache = resolve(pkg, 'cache') +var cache = common.cache var daemon var daemonPID diff --git a/deps/npm/test/tap/git-npmignore.js b/deps/npm/test/tap/git-npmignore.js index 42c1637b18013b..2ab7db7304f0f3 100644 --- a/deps/npm/test/tap/git-npmignore.js +++ b/deps/npm/test/tap/git-npmignore.js @@ -14,7 +14,6 @@ var Dir = Tacks.Dir var File = Tacks.File var fixture = new Tacks(Dir({ - cache: Dir({}), deps: Dir({ gitch: Dir({ '.npmignore': File( @@ -42,7 +41,7 @@ var fixture = new Tacks(Dir({ })) var testdir = common.pkg -var cachedir = resolve(testdir, 'cache') +var cachedir = common.cache var dep = resolve(testdir, 'deps', 'gitch') var packname = 'gitch-1.0.0.tgz' var packed = resolve(testdir, packname) diff --git a/deps/npm/test/tap/git-prepare.js b/deps/npm/test/tap/git-prepare.js index 9112828ce40cde..37534fbfc430fc 100644 --- a/deps/npm/test/tap/git-prepare.js +++ b/deps/npm/test/tap/git-prepare.js @@ -14,7 +14,7 @@ const common = require('../common-tap.js') const testdir = common.pkg const repo = path.join(testdir, 'repo') const prefix = path.join(testdir, 'prefix') -const cache = path.join(testdir, 'cache') +const cache = common.cache var Tacks = require('tacks') var Dir = Tacks.Dir @@ -30,7 +30,6 @@ process.env.npm_config_prefix = prefix const fixture = new Tacks(Dir({ repo: Dir({}), prefix: Dir({}), - cache: Dir({}), deps: Dir({ parent: Dir({ 'package.json': File({ diff --git a/deps/npm/test/tap/github-shortcut-package.js b/deps/npm/test/tap/github-shortcut-package.js index a084479e1791e1..db153ba352e55e 100644 --- a/deps/npm/test/tap/github-shortcut-package.js +++ b/deps/npm/test/tap/github-shortcut-package.js @@ -49,7 +49,7 @@ test('github-shortcut-package', function (t) { }) var opts = { - cache: path.resolve(pkg, 'cache'), + cache: common.cache, prefix: pkg, registry: common.registry, loglevel: 'silent' diff --git a/deps/npm/test/tap/github-shortcut.js b/deps/npm/test/tap/github-shortcut.js index 90f4655149bb9d..0c89d428fa1af6 100644 --- a/deps/npm/test/tap/github-shortcut.js +++ b/deps/npm/test/tap/github-shortcut.js @@ -48,7 +48,7 @@ test('github-shortcut', function (t) { }) const opts = { - cache: path.resolve(pkg, 'cache'), + cache: common.cache, prefix: pkg, registry: common.registry, loglevel: 'silent' diff --git a/deps/npm/test/tap/gitlab-shortcut-package.js b/deps/npm/test/tap/gitlab-shortcut-package.js index 54632f8370403b..4f5b43851d88bd 100644 --- a/deps/npm/test/tap/gitlab-shortcut-package.js +++ b/deps/npm/test/tap/gitlab-shortcut-package.js @@ -48,7 +48,7 @@ test('gitlab-shortcut-package', function (t) { }) var opts = { - cache: path.resolve(pkg, 'cache'), + cache: common.cache, prefix: pkg, registry: common.registry, loglevel: 'silent' diff --git a/deps/npm/test/tap/gitlab-shortcut.js b/deps/npm/test/tap/gitlab-shortcut.js index 724178867aedec..e6bd54765a089c 100644 --- a/deps/npm/test/tap/gitlab-shortcut.js +++ b/deps/npm/test/tap/gitlab-shortcut.js @@ -45,7 +45,7 @@ test('gitlab-shortcut', function (t) { }) var opts = { - cache: path.resolve(pkg, 'cache'), + cache: common.cache, prefix: pkg, registry: common.registry, loglevel: 'silent' diff --git a/deps/npm/test/tap/ignore-install-link.js b/deps/npm/test/tap/ignore-install-link.js index 129df3c2717ca1..7b3b1be3b9d5ee 100644 --- a/deps/npm/test/tap/ignore-install-link.js +++ b/deps/npm/test/tap/ignore-install-link.js @@ -13,7 +13,7 @@ var root = common.pkg var pkg = path.resolve(root, 'pkg') var dep = path.resolve(root, 'dep') var target = path.resolve(pkg, 'node_modules', 'dep') -var cache = path.resolve(root, 'cache') +var cache = common.cache var globalPath = path.resolve(root, 'global') var pkgj = { diff --git a/deps/npm/test/tap/install-actions.js b/deps/npm/test/tap/install-actions.js index b34be3ad0dd70a..071dc2cc371edc 100644 --- a/deps/npm/test/tap/install-actions.js +++ b/deps/npm/test/tap/install-actions.js @@ -10,7 +10,7 @@ var mockLog = { var actions test('setup', function (t) { - npm.load(function () { + npm.load({ 'unsafe-perm': true }, function () { log.disableProgress() actions = require('../../lib/install/actions.js').actions t.end() diff --git a/deps/npm/test/tap/install-dep-classification.js b/deps/npm/test/tap/install-dep-classification.js index 3c65459d345fbc..2775c367b0002d 100644 --- a/deps/npm/test/tap/install-dep-classification.js +++ b/deps/npm/test/tap/install-dep-classification.js @@ -9,7 +9,7 @@ const fs = require('fs') const basedir = common.pkg const testdir = path.join(basedir, 'testdir') -const cachedir = path.join(basedir, 'cache') +const cachedir = common.cache const globaldir = path.join(basedir, 'global') const tmpdir = path.join(basedir, 'tmp') const optionaldir = path.join(testdir, 'optional') diff --git a/deps/npm/test/tap/install-duplicate-deps-warning.js b/deps/npm/test/tap/install-duplicate-deps-warning.js index 2b10d8aa319646..05eccd8e43b03f 100644 --- a/deps/npm/test/tap/install-duplicate-deps-warning.js +++ b/deps/npm/test/tap/install-duplicate-deps-warning.js @@ -38,7 +38,7 @@ test('npm install with duplicate dependencies, different versions', function (t) t.plan(1) mr({ port: common.port }, function (er, s) { var opts = { - cache: path.resolve(pkg, 'cache'), + cache: common.cache, registry: common.registry } diff --git a/deps/npm/test/tap/install-package-json-order.js b/deps/npm/test/tap/install-package-json-order.js index ae000ff6738df3..2e780def2696f3 100644 --- a/deps/npm/test/tap/install-package-json-order.js +++ b/deps/npm/test/tap/install-package-json-order.js @@ -9,7 +9,7 @@ const common = require('../common-tap.js') var pkg = common.pkg var workdir = path.join(pkg, 'workdir') var tmp = path.join(pkg, 'tmp') -var cache = path.join(pkg, 'cache') +var cache = common.cache var fs = require('fs') var osenv = require('osenv') diff --git a/deps/npm/test/tap/install-package-lock-only.js b/deps/npm/test/tap/install-package-lock-only.js index 6e98f27b30021e..2c5191a02e7d73 100644 --- a/deps/npm/test/tap/install-package-lock-only.js +++ b/deps/npm/test/tap/install-package-lock-only.js @@ -10,7 +10,7 @@ var common = require('../common-tap.js') var basedir = common.pkg var testdir = path.join(basedir, 'testdir') -var cachedir = path.join(basedir, 'cache') +var cachedir = common.cache var globaldir = path.join(basedir, 'global') var tmpdir = path.join(basedir, 'tmp') diff --git a/deps/npm/test/tap/install-scoped-with-bundled-dependency.js b/deps/npm/test/tap/install-scoped-with-bundled-dependency.js index 76f440dc6c158d..db126eb6426c43 100644 --- a/deps/npm/test/tap/install-scoped-with-bundled-dependency.js +++ b/deps/npm/test/tap/install-scoped-with-bundled-dependency.js @@ -8,7 +8,7 @@ var common = require('../common-tap.js') var basedir = common.pkg var testdir = path.join(basedir, 'testdir') -var cachedir = path.join(basedir, 'cache') +var cachedir = common.cache var globaldir = path.join(basedir, 'global') var tmpdir = path.join(basedir, 'tmp') diff --git a/deps/npm/test/tap/install-shrinkwrapped-git.js b/deps/npm/test/tap/install-shrinkwrapped-git.js index 7e50aa713d570c..f74e185bfbad0e 100644 --- a/deps/npm/test/tap/install-shrinkwrapped-git.js +++ b/deps/npm/test/tap/install-shrinkwrapped-git.js @@ -116,7 +116,6 @@ function setup (cb) { function cleanup () { process.chdir(osenv.tmpdir()) rimraf.sync(mockPath) - rimraf.sync(common['npm_config_cache']) } function prepareChildAndGetRefs (cb) { diff --git a/deps/npm/test/tap/install-with-dev-dep-duplicate.js b/deps/npm/test/tap/install-with-dev-dep-duplicate.js index b3a58987631b4d..01ba38a1123a98 100644 --- a/deps/npm/test/tap/install-with-dev-dep-duplicate.js +++ b/deps/npm/test/tap/install-with-dev-dep-duplicate.js @@ -78,7 +78,7 @@ function setup (cb) { process.chdir(pkg) var opts = { - cache: path.resolve(pkg, 'cache'), + cache: common.cache, registry: common.registry } npm.load(opts, cb) diff --git a/deps/npm/test/tap/invalid-dep-version-filtering.js b/deps/npm/test/tap/invalid-dep-version-filtering.js index 502610f231ce4e..f2f175b24ef5ec 100644 --- a/deps/npm/test/tap/invalid-dep-version-filtering.js +++ b/deps/npm/test/tap/invalid-dep-version-filtering.js @@ -8,7 +8,7 @@ var File = Tacks.File var Dir = Tacks.Dir var testdir = common.pkg -var cachedir = path.join(testdir, 'cache') +var cachedir = common.cache var fixture = new Tacks(Dir({ cache: Dir(), diff --git a/deps/npm/test/tap/lockfile-http-deps.js b/deps/npm/test/tap/lockfile-http-deps.js index aaa47f5de6d3e3..b5eaa10760a434 100644 --- a/deps/npm/test/tap/lockfile-http-deps.js +++ b/deps/npm/test/tap/lockfile-http-deps.js @@ -10,7 +10,7 @@ var common = require('../common-tap.js') var basedir = common.pkg var testdir = path.join(basedir, 'testdir') -var cachedir = path.join(basedir, 'cache') +var cachedir = common.cache var globaldir = path.join(basedir, 'global') var tmpdir = path.join(basedir, 'tmp') diff --git a/deps/npm/test/tap/ls-peer.js b/deps/npm/test/tap/ls-peer.js index fd53d37be62ec8..05cc1382250c1c 100644 --- a/deps/npm/test/tap/ls-peer.js +++ b/deps/npm/test/tap/ls-peer.js @@ -8,7 +8,7 @@ const common = require('../common-tap.js') const basedir = common.pkg const testdir = path.join(basedir, 'testdir') -const cachedir = path.join(basedir, 'cache') +const cachedir = common.cache const globaldir = path.join(basedir, 'global') const tmpdir = path.join(basedir, 'tmp') diff --git a/deps/npm/test/tap/optional-metadep-rollback-collision.js b/deps/npm/test/tap/optional-metadep-rollback-collision.js index 51cc6367dded7c..d665a123bff903 100644 --- a/deps/npm/test/tap/optional-metadep-rollback-collision.js +++ b/deps/npm/test/tap/optional-metadep-rollback-collision.js @@ -13,7 +13,7 @@ var common = require('../common-tap.js') var pkg = common.pkg var deps = path.resolve(pkg, 'deps') var opdep = path.resolve(pkg, 'node_modules', 'opdep') -var cache = path.resolve(pkg, 'cache') +var cache = common.cache var createServer = require('http').createServer var mr = require('npm-registry-mock') var serverPort = 27991 diff --git a/deps/npm/test/tap/outdated-git.js b/deps/npm/test/tap/outdated-git.js index 3932330c99f34d..15db1a30c7c74d 100644 --- a/deps/npm/test/tap/outdated-git.js +++ b/deps/npm/test/tap/outdated-git.js @@ -10,7 +10,7 @@ var npm = require('../../') // config var pkg = common.pkg -var cache = path.resolve(pkg, 'cache') +var cache = common.cache var json = { name: 'outdated-git', author: 'Rocko Artischocko', diff --git a/deps/npm/test/tap/outdated-latest.js b/deps/npm/test/tap/outdated-latest.js index e0b432a2105cd7..073b71da91cc68 100644 --- a/deps/npm/test/tap/outdated-latest.js +++ b/deps/npm/test/tap/outdated-latest.js @@ -9,7 +9,7 @@ const common = require('../common-tap.js') const basedir = common.pkg const testdir = path.join(basedir, 'testdir') -const cachedir = path.join(basedir, 'cache') +const cachedir = common.cache const globaldir = path.join(basedir, 'global') const tmpdir = path.join(basedir, 'tmp') diff --git a/deps/npm/test/tap/outdated-long.js b/deps/npm/test/tap/outdated-long.js index 474df8031a50a8..0a338815983eb8 100644 --- a/deps/npm/test/tap/outdated-long.js +++ b/deps/npm/test/tap/outdated-long.js @@ -1,9 +1,7 @@ var fs = require('graceful-fs') var path = require('path') -var mkdirp = require('mkdirp') var mr = require('npm-registry-mock') -var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') @@ -11,7 +9,7 @@ var npm = require('../../') // config var pkg = common.pkg -var cache = path.resolve(pkg, 'cache') +var cache = common.cache var json = { name: 'outdated-long', @@ -23,8 +21,6 @@ var json = { } test('setup', function (t) { - cleanup() - mkdirp.sync(cache) fs.writeFileSync( path.join(pkg, 'package.json'), JSON.stringify(json, null, 2) @@ -65,7 +61,7 @@ test('it should not throw', function (t) { mr({ port: common.port }, function (er, s) { npm.load( { - cache: 'cache', + cache: cache, loglevel: 'silent', parseable: true, registry: common.registry @@ -94,12 +90,3 @@ test('it should not throw', function (t) { ) }) }) - -test('cleanup', function (t) { - cleanup() - t.end() -}) - -function cleanup () { - rimraf.sync(pkg) -} diff --git a/deps/npm/test/tap/outdated-remote.js b/deps/npm/test/tap/outdated-remote.js index b3990a382caa2e..e6cbd0e8acddef 100644 --- a/deps/npm/test/tap/outdated-remote.js +++ b/deps/npm/test/tap/outdated-remote.js @@ -8,7 +8,7 @@ const common = require('../common-tap.js') const basedir = common.pkg const testdir = path.join(basedir, 'testdir') -const cachedir = path.join(basedir, 'cache') +const cachedir = common.cache const globaldir = path.join(basedir, 'global') const tmpdir = path.join(basedir, 'tmp') @@ -54,14 +54,9 @@ const fixture = new Tacks(Dir({ })) function setup () { - cleanup() fixture.create(basedir) } -function cleanup () { - fixture.remove(basedir) -} - test('setup', t => { setup() return common.fakeRegistry.listen() @@ -90,6 +85,5 @@ test('discovers new versions in outdated', t => { test('cleanup', t => { common.fakeRegistry.close() - cleanup() t.done() }) diff --git a/deps/npm/test/tap/outdated-symlink.js b/deps/npm/test/tap/outdated-symlink.js index 86128338a7be7e..5ec089758a3caa 100644 --- a/deps/npm/test/tap/outdated-symlink.js +++ b/deps/npm/test/tap/outdated-symlink.js @@ -10,7 +10,7 @@ const common = require('../common-tap.js') const basedir = common.pkg const testdir = path.join(basedir, 'testdir') -const cachedir = path.join(basedir, 'cache') +const cachedir = common.cache const globaldir = path.join(basedir, 'global') const tmpdir = path.join(basedir, 'tmp') diff --git a/deps/npm/test/tap/outdated.js b/deps/npm/test/tap/outdated.js index 1acb0ed687b5ae..e64b7b0f813c89 100644 --- a/deps/npm/test/tap/outdated.js +++ b/deps/npm/test/tap/outdated.js @@ -1,9 +1,7 @@ var fs = require('graceful-fs') var path = require('path') -var mkdirp = require('mkdirp') var mr = require('npm-registry-mock') -var rimraf = require('rimraf') var test = require('tap').test var npm = require('../../') @@ -11,7 +9,7 @@ var common = require('../common-tap.js') // config var pkg = common.pkg -var cache = path.resolve(pkg, 'cache') +var cache = common.cache var originalLog var json = { @@ -26,9 +24,7 @@ var json = { } test('setup', function (t) { - cleanup() originalLog = console.log - mkdirp.sync(cache) fs.writeFileSync( path.join(pkg, 'package.json'), JSON.stringify(json, null, 2) @@ -91,7 +87,7 @@ test('it should not throw', function (t) { mr({ port: common.port }, function (er, s) { npm.load( { - cache: 'cache', + cache: cache, loglevel: 'silent', parseable: true, registry: common.registry @@ -122,11 +118,6 @@ test('it should not throw', function (t) { }) test('cleanup', function (t) { - cleanup() console.log = originalLog t.end() }) - -function cleanup () { - rimraf.sync(pkg) -} diff --git a/deps/npm/test/tap/owner.js b/deps/npm/test/tap/owner.js index b4da383ee10231..622b272852c7d0 100644 --- a/deps/npm/test/tap/owner.js +++ b/deps/npm/test/tap/owner.js @@ -1,12 +1,9 @@ var mr = require('npm-registry-mock') var test = require('tap').test -var path = require('path') -var mkdirp = require('mkdirp') -var rimraf = require('rimraf') var common = require('../common-tap.js') var basedir = common.pkg -var cachedir = path.join(basedir, 'cache') +var cachedir = common.cache var server @@ -74,8 +71,6 @@ function mocks (server) { } test('setup', function (t) { - cleanup() - mkdirp.sync(cachedir) mr({ port: common.port, plugin: mocks }, function (er, s) { server = s t.end() @@ -160,10 +155,5 @@ test('npm owner rm', function (t) { test('cleanup', function (t) { server.close() - cleanup() t.end() }) - -function cleanup () { - rimraf.sync(basedir) -} diff --git a/deps/npm/test/tap/pack-scoped.js b/deps/npm/test/tap/pack-scoped.js index 29d9aab478b8f7..06d02297fd5d02 100644 --- a/deps/npm/test/tap/pack-scoped.js +++ b/deps/npm/test/tap/pack-scoped.js @@ -9,7 +9,7 @@ var rimraf = require('rimraf') var pkg = common.pkg var manifest = join(pkg, 'package.json') var tmp = join(pkg, 'tmp') -var cache = join(pkg, 'cache') +var cache = common.cache var data = { name: '@scope/generic-package', diff --git a/deps/npm/test/tap/pack.js b/deps/npm/test/tap/pack.js index 7aa42d48370a99..23c8296d003cd2 100644 --- a/deps/npm/test/tap/pack.js +++ b/deps/npm/test/tap/pack.js @@ -14,7 +14,7 @@ const File = Tacks.File const testDir = common.pkg const tmp = path.join(testDir, 'tmp') -const cache = path.join(testDir, 'cache') +const cache = common.cache test('basic pack', (t) => { const fixture = new Tacks(new Dir({ diff --git a/deps/npm/test/tap/peer-deps.js b/deps/npm/test/tap/peer-deps.js index 20cbf5d1ded042..463a5ec47908d8 100644 --- a/deps/npm/test/tap/peer-deps.js +++ b/deps/npm/test/tap/peer-deps.js @@ -57,7 +57,7 @@ function setup (cb) { ) process.chdir(pkg) - var opts = { cache: path.resolve(pkg, 'cache'), registry: common.registry } + var opts = { cache: common.cache, registry: common.registry } npm.load(opts, cb) } diff --git a/deps/npm/test/tap/prepare.js b/deps/npm/test/tap/prepare.js index 54edf7cb19bc81..1169089b17e4d8 100644 --- a/deps/npm/test/tap/prepare.js +++ b/deps/npm/test/tap/prepare.js @@ -8,7 +8,7 @@ var rimraf = require('rimraf') var pkg = common.pkg var tmp = join(pkg, 'tmp') -var cache = join(pkg, 'cache') +var cache = common.cache test('setup', function (t) { var n = 0 diff --git a/deps/npm/test/tap/prepublish-only.js b/deps/npm/test/tap/prepublish-only.js index 9996479da442a0..57af26038a7bd6 100644 --- a/deps/npm/test/tap/prepublish-only.js +++ b/deps/npm/test/tap/prepublish-only.js @@ -11,7 +11,7 @@ var path = require('path') var common = require('../common-tap') var pkg = common.pkg -var cachedir = join(pkg, 'cache') +var cachedir = common.cache var tmpdir = join(pkg, 'tmp') var env = { diff --git a/deps/npm/test/tap/prepublish.js b/deps/npm/test/tap/prepublish.js index 5628f94db38842..e561d057f21243 100644 --- a/deps/npm/test/tap/prepublish.js +++ b/deps/npm/test/tap/prepublish.js @@ -8,7 +8,7 @@ var rimraf = require('rimraf') var pkg = common.pkg var tmp = join(pkg, 'tmp') -var cache = join(pkg, 'cache') +var cache = common.cache test('setup', function (t) { var n = 0 diff --git a/deps/npm/test/tap/progress-config.js b/deps/npm/test/tap/progress-config.js index 1f1e1a0c225ed5..92468004f2c538 100644 --- a/deps/npm/test/tap/progress-config.js +++ b/deps/npm/test/tap/progress-config.js @@ -3,7 +3,7 @@ var test = require('tap').test var log = require('npmlog') var fs = require('graceful-fs') const common = require('../common-tap.js') -var configName = common.pkg + '-npmrc' +var configName = common.pkg + '/npmrc' // We use requireInject to get a fresh copy of // the npm singleton each time we require it. @@ -85,8 +85,3 @@ test('unicode-false', function (t) { t.done() }) }) - -test('cleanup', function (t) { - fs.unlinkSync(configName) - t.done() -}) diff --git a/deps/npm/test/tap/prune-with-dev-dep-duplicate.js b/deps/npm/test/tap/prune-with-dev-dep-duplicate.js index 7efea5c01e6190..7e7632b489cf6d 100644 --- a/deps/npm/test/tap/prune-with-dev-dep-duplicate.js +++ b/deps/npm/test/tap/prune-with-dev-dep-duplicate.js @@ -1,17 +1,14 @@ 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') var server var pkg = common.pkg -var cache = path.resolve(pkg, 'cache') +var cache = common.cache var json = { name: 'prune-with-dev-dep-duplicate', @@ -32,8 +29,6 @@ var EXEC_OPTS = { } test('setup', function (t) { - cleanup() - mkdirp.sync(cache) fs.writeFileSync( path.join(pkg, 'package.json'), JSON.stringify(json, null, 2) @@ -103,12 +98,6 @@ test('npm prune only=prod', function (t) { test('cleanup', function (t) { server.close() - cleanup() t.pass('cleaned up') t.end() }) - -function cleanup () { - process.chdir(osenv.tmpdir()) - rimraf.sync(pkg) -} diff --git a/deps/npm/test/tap/prune-with-only-dev-deps.js b/deps/npm/test/tap/prune-with-only-dev-deps.js index c8e87a53569a9d..6ea1bcf64b4804 100644 --- a/deps/npm/test/tap/prune-with-only-dev-deps.js +++ b/deps/npm/test/tap/prune-with-only-dev-deps.js @@ -3,15 +3,13 @@ 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 server var pkg = common.pkg -var cache = path.resolve(pkg, 'cache') +var cache = common.cache var json = { name: 'prune-with-only-dev-deps', @@ -30,7 +28,6 @@ var EXEC_OPTS = { } test('setup', function (t) { - cleanup() mkdirp.sync(cache) fs.writeFileSync( path.join(pkg, 'package.json'), @@ -113,12 +110,5 @@ test('verify installs', function (t) { test('cleanup', function (t) { server.close() - cleanup() - t.pass('cleaned up') t.end() }) - -function cleanup () { - process.chdir(osenv.tmpdir()) - rimraf.sync(pkg) -} diff --git a/deps/npm/test/tap/prune.js b/deps/npm/test/tap/prune.js index 6e033ceae00f24..936ee3a91b6b81 100644 --- a/deps/npm/test/tap/prune.js +++ b/deps/npm/test/tap/prune.js @@ -1,17 +1,14 @@ 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') var server var pkg = common.pkg -var cache = path.resolve(pkg, 'cache') +var cache = common.cache var json = { name: 'prune', @@ -32,8 +29,6 @@ var EXEC_OPTS = { } test('setup', function (t) { - cleanup() - mkdirp.sync(cache) fs.writeFileSync( path.join(pkg, 'package.json'), JSON.stringify(json, null, 2) @@ -122,12 +117,5 @@ test('pruduction: verify installs', function (t) { test('cleanup', function (t) { server.close() - cleanup() - t.pass('cleaned up') t.end() }) - -function cleanup () { - process.chdir(osenv.tmpdir()) - rimraf.sync(pkg) -} diff --git a/deps/npm/test/tap/publish-access-scoped.js b/deps/npm/test/tap/publish-access-scoped.js index 31b1bed26c8300..7b9a3ecb59b9cb 100644 --- a/deps/npm/test/tap/publish-access-scoped.js +++ b/deps/npm/test/tap/publish-access-scoped.js @@ -2,8 +2,6 @@ var fs = require('fs') var path = require('path') var test = require('tap').test -var mkdirp = require('mkdirp') -var rimraf = require('rimraf') var mr = require('npm-registry-mock') var common = require('../common-tap') var server @@ -28,46 +26,40 @@ test('scoped packages pass public access if set', function (t) { return true }).put('/@bigco%2fpublish-access', true).reply(201, {ok: true}) - mkdirp(path.join(pkg, 'cache'), function () { - fs.writeFile( - path.join(pkg, 'package.json'), - JSON.stringify({ - name: '@bigco/publish-access', - version: '1.2.5', - public: true - }), - 'ascii', - function (er) { - t.ifError(er, 'package file written') - common.npm( - [ - 'publish', - '--access', 'public', - '--cache', path.join(pkg, 'cache'), - '--loglevel', 'silly', - '--registry', common.registry - ], - { - cwd: pkg - }, - function (er) { - t.ifError(er, 'published without error') + fs.writeFile( + path.join(pkg, 'package.json'), + JSON.stringify({ + name: '@bigco/publish-access', + version: '1.2.5', + public: true + }), + 'ascii', + function (er) { + t.ifError(er, 'package file written') + common.npm( + [ + 'publish', + '--access', 'public', + '--cache', common.cache, + '--loglevel', 'silly', + '--registry', common.registry + ], + { + cwd: pkg + }, + function (er) { + t.ifError(er, 'published without error') - server.done() - t.end() - } - ) - } - ) - }) + server.done() + t.end() + } + ) + } + ) }) test('cleanup', function (t) { process.chdir(__dirname) server.close() - rimraf(pkg, function (er) { - t.ifError(er) - - t.end() - }) + t.end() }) diff --git a/deps/npm/test/tap/publish-access-unscoped.js b/deps/npm/test/tap/publish-access-unscoped.js index a2489e2bcaf4b2..a7ea8e6694849d 100644 --- a/deps/npm/test/tap/publish-access-unscoped.js +++ b/deps/npm/test/tap/publish-access-unscoped.js @@ -2,8 +2,6 @@ var fs = require('fs') var path = require('path') var test = require('tap').test -var mkdirp = require('mkdirp') -var rimraf = require('rimraf') var mr = require('npm-registry-mock') var common = require('../common-tap') var server @@ -28,46 +26,40 @@ test('unscoped packages can be explicitly set as public', function (t) { return true }).put('/publish-access', true).reply(201, {ok: true}) - mkdirp(path.join(pkg, 'cache'), function () { - fs.writeFile( - path.join(pkg, 'package.json'), - JSON.stringify({ - name: 'publish-access', - version: '1.2.5', - public: true - }), - 'ascii', - function (er) { - t.ifError(er, 'package file written') - common.npm( - [ - 'publish', - '--access', 'public', - '--cache', path.join(pkg, 'cache'), - '--loglevel', 'silly', - '--registry', common.registry - ], - { - cwd: pkg - }, - function (er) { - t.ifError(er, 'published without error') + fs.writeFile( + path.join(pkg, 'package.json'), + JSON.stringify({ + name: 'publish-access', + version: '1.2.5', + public: true + }), + 'ascii', + function (er) { + t.ifError(er, 'package file written') + common.npm( + [ + 'publish', + '--access', 'public', + '--cache', common.cache, + '--loglevel', 'silly', + '--registry', common.registry + ], + { + cwd: pkg + }, + function (er) { + t.ifError(er, 'published without error') - server.done() - t.end() - } - ) - } - ) - }) + server.done() + t.end() + } + ) + } + ) }) test('cleanup', function (t) { process.chdir(__dirname) server.close() - rimraf(pkg, function (er) { - t.ifError(er) - - t.end() - }) + t.end() }) diff --git a/deps/npm/test/tap/publish-config.js b/deps/npm/test/tap/publish-config.js index 705ef7ae7a2ca1..7d617df2c40326 100644 --- a/deps/npm/test/tap/publish-config.js +++ b/deps/npm/test/tap/publish-config.js @@ -4,9 +4,7 @@ const common = require('../common-tap.js') const test = require('tap').test const fs = require('fs') const osenv = require('osenv') -const pkg = `${process.env.npm_config_tmp || '/tmp'}/npm-test-publish-config` - -require('mkdirp').sync(pkg) +const pkg = common.pkg fs.writeFileSync(pkg + '/package.json', JSON.stringify({ name: 'npm-test-publish-config', diff --git a/deps/npm/test/tap/publish-invalid-semver-tag.js b/deps/npm/test/tap/publish-invalid-semver-tag.js index 400030908b21cf..fed064bb4e0da3 100644 --- a/deps/npm/test/tap/publish-invalid-semver-tag.js +++ b/deps/npm/test/tap/publish-invalid-semver-tag.js @@ -10,7 +10,7 @@ var mr = require('npm-registry-mock') var osenv = require('osenv') var PKG_DIR = common.pkg -var CACHE_DIR = path.resolve(PKG_DIR, 'cache') +var CACHE_DIR = common.cache var DEFAULT_PKG = { 'name': 'examples', @@ -19,9 +19,17 @@ var DEFAULT_PKG = { var mockServer +const chownr = require('chownr') +const fixOwner = ( + process.getuid && process.getuid() === 0 && + process.env.SUDO_UID && process.env.SUDO_GID +) ? (path) => chownr.sync(path, +process.env.SUDO_UID, +process.env.SUDO_GID) + : () => {} + function resetPackage (options) { rimraf.sync(CACHE_DIR) mkdirp.sync(CACHE_DIR) + fixOwner(CACHE_DIR) fs.writeFileSync(path.resolve(PKG_DIR, 'package.json'), DEFAULT_PKG) } diff --git a/deps/npm/test/tap/publish-scoped.js b/deps/npm/test/tap/publish-scoped.js index efa86c85391d07..78ca4699d3a31b 100644 --- a/deps/npm/test/tap/publish-scoped.js +++ b/deps/npm/test/tap/publish-scoped.js @@ -2,8 +2,6 @@ var fs = require('fs') var path = require('path') var test = require('tap').test -var mkdirp = require('mkdirp') -var rimraf = require('rimraf') var common = require('../common-tap') var mr = require('npm-registry-mock') @@ -12,9 +10,6 @@ var pkg = common.pkg var server function setup () { - cleanup() - mkdirp.sync(path.join(pkg, 'cache')) - fs.writeFileSync( path.join(pkg, 'package.json'), JSON.stringify({ @@ -40,7 +35,7 @@ test('npm publish should honor scoping', function (t) { var configuration = [ 'progress=false', - 'cache=' + path.join(pkg, 'cache'), + 'cache=' + common.cache, 'registry=http://nonexistent.lvh.me', '//localhost:' + common.port + '/:username=username', '//localhost:' + common.port + '/:_password=' + Buffer.from('password').toString('base64'), @@ -81,11 +76,6 @@ test('npm publish should honor scoping', function (t) { test('cleanup', function (t) { server.close() + process.chdir(__dirname) t.end() - cleanup() }) - -function cleanup () { - process.chdir(__dirname) - rimraf.sync(pkg) -} diff --git a/deps/npm/test/tap/publish.js b/deps/npm/test/tap/publish.js index c5070444336903..0913576a31b446 100644 --- a/deps/npm/test/tap/publish.js +++ b/deps/npm/test/tap/publish.js @@ -4,18 +4,13 @@ const BB = require('bluebird') const common = require('../common-tap') const fs = require('fs') -const mkdirp = require('mkdirp') const mr = BB.promisify(require('npm-registry-mock')) const path = require('path') -const rimraf = require('rimraf') const test = require('tap').test const testDir = common.pkg function setup () { - cleanup() - mkdirp.sync(path.join(testDir, 'cache')) - fs.writeFileSync( path.join(testDir, 'package.json'), JSON.stringify({ @@ -52,7 +47,7 @@ test('basic npm publish', (t) => { return common.npm([ 'publish', '--no-color', - '--cache', path.join(testDir, 'cache'), + '--cache', common.cache, '--registry=' + common.registry.replace(common.port, server.port), `--//localhost:${server.port}/:username=username`, `--//localhost:${server.port}/:_password=` + Buffer.from('password').toString('base64'), @@ -92,7 +87,7 @@ test('npm publish --dry-run', (t) => { 'publish', '--dry-run', '--registry=https://example.registry/fake', - '--cache', path.join(testDir, 'cache'), + '--cache', common.cache, '--loglevel=notice', '--no-color' ], {'cwd': testDir}) @@ -115,7 +110,7 @@ test('npm publish --json', (t) => { 'publish', '--json', '--registry', common.registry.replace(common.port, server.port), - '--cache', path.join(testDir, 'cache') + '--cache', common.cache ], {'cwd': testDir}) .spread((code, stdout, stderr) => { t.comment(stdout) @@ -142,7 +137,7 @@ test('npm publish --dry-run --json', (t) => { '--dry-run', '--json', '--registry=https://example.registry/fake', - '--cache', path.join(testDir, 'cache'), + '--cache', common.cache, '--loglevel=notice', '--no-color' ], {'cwd': testDir}) @@ -162,13 +157,3 @@ test('npm publish --dry-run --json', (t) => { t.equal(stderr.trim(), '', 'nothing on stderr') }) }) - -test('cleanup', (t) => { - cleanup() - t.end() -}) - -function cleanup () { - process.chdir(__dirname) - rimraf.sync(testDir) -} diff --git a/deps/npm/test/tap/retry-on-stale-cache.js b/deps/npm/test/tap/retry-on-stale-cache.js index 129c52c160d0e2..7e3d291a5bdd78 100644 --- a/deps/npm/test/tap/retry-on-stale-cache.js +++ b/deps/npm/test/tap/retry-on-stale-cache.js @@ -8,7 +8,7 @@ var Dir = Tacks.Dir var File = Tacks.File var workdir = common.pkg -var cachedir = path.join(workdir, 'cache') +var cachedir = common.cache var modulesdir = path.join(workdir, 'modules') var oldModule = path.join(modulesdir, 'good-night-0.1.0.tgz') var newModule = path.join(modulesdir, 'good-night-1.0.0.tgz') @@ -20,7 +20,6 @@ var config = [ ] var fixture = new Tacks(Dir({ - 'cache': Dir(), 'modules': Dir({ 'good-night-0.1.0.tgz': File(Buffer.from( '1f8b0800000000000003ed934f4bc43010c57beea7187a59056dd36eff80' + diff --git a/deps/npm/test/tap/run-script.js b/deps/npm/test/tap/run-script.js index a937abadf2c1aa..75b714002e2c84 100644 --- a/deps/npm/test/tap/run-script.js +++ b/deps/npm/test/tap/run-script.js @@ -8,7 +8,7 @@ var rimraf = require('rimraf') var common = require('../common-tap') var pkg = common.pkg -var cache = path.resolve(pkg, 'cache') +var cache = common.cache var tmp = path.resolve(pkg, 'tmp') var opts = { cwd: pkg } diff --git a/deps/npm/test/tap/save-optional.js b/deps/npm/test/tap/save-optional.js index c293401f527cb6..9985451684d074 100644 --- a/deps/npm/test/tap/save-optional.js +++ b/deps/npm/test/tap/save-optional.js @@ -10,7 +10,7 @@ const common = require('../common-tap.js') const basedir = common.pkg const testdir = path.join(basedir, 'testdir') -const cachedir = path.join(basedir, 'cache') +const cachedir = common.cache const globaldir = path.join(basedir, 'global') const tmpdir = path.join(basedir, 'tmp') diff --git a/deps/npm/test/tap/scope-header.js b/deps/npm/test/tap/scope-header.js index f291b3a5009647..f4eb7ae12c1046 100644 --- a/deps/npm/test/tap/scope-header.js +++ b/deps/npm/test/tap/scope-header.js @@ -12,7 +12,7 @@ var testdir = path.join(basedir, 'testdir') var withScope = path.join(testdir, 'with-scope') var withoutScope = path.join(testdir, 'without-scope') var onlyProjectScope = path.join(testdir, 'only-project-scope') -var cachedir = path.join(basedir, 'cache') +var cachedir = common.cache var globaldir = path.join(basedir, 'global') var tmpdir = path.join(basedir, 'tmp') diff --git a/deps/npm/test/tap/scripts-whitespace-windows.js b/deps/npm/test/tap/scripts-whitespace-windows.js index 9378564bb52bca..06f06e36eb2a69 100644 --- a/deps/npm/test/tap/scripts-whitespace-windows.js +++ b/deps/npm/test/tap/scripts-whitespace-windows.js @@ -10,7 +10,7 @@ var common = require('../common-tap') var pkg = common.pkg var tmp = path.resolve(pkg, 'tmp') -var cache = path.resolve(pkg, 'cache') +var cache = common.cache var dep = path.resolve(pkg, 'dep') var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/search.all-package-search.js b/deps/npm/test/tap/search.all-package-search.js index 419e4fdeed691a..9b3b989f9c7261 100644 --- a/deps/npm/test/tap/search.all-package-search.js +++ b/deps/npm/test/tap/search.all-package-search.js @@ -3,10 +3,8 @@ const cacheFile = require('npm-cache-filename') const mkdirp = require('mkdirp') const mr = require('npm-registry-mock') -const osenv = require('osenv') const path = require('path') const qs = require('querystring') -const rimraf = require('rimraf') const Tacks = require('tacks') const test = require('tap').test @@ -14,14 +12,21 @@ const {File} = Tacks const common = require('../common-tap.js') -const PKG_DIR = common.pkg -const CACHE_DIR = path.resolve(PKG_DIR, 'cache') +const CACHE_DIR = common.cache const cacheBase = cacheFile(CACHE_DIR)(common.registry + '/-/all') const cachePath = path.join(cacheBase, '.cache.json') +const chownr = require('chownr') +const fixOwner = ( + process.getuid && process.getuid() === 0 && + process.env.SUDO_UID && process.env.SUDO_GID +) ? (path) => chownr.sync(path, +process.env.SUDO_UID, +process.env.SUDO_GID) + : () => {} let server test('setup', function (t) { + mkdirp.sync(cacheBase) + fixOwner(CACHE_DIR) mr({port: common.port, throwOnUnmatched: true}, function (err, s) { t.ifError(err, 'registry mocked successfully') server = s @@ -142,10 +147,10 @@ const searches = [ // These test classic hand-matched searches searches.forEach(function (search) { test(search.description, function (t) { - setup() const query = qs.stringify({ text: search.term, size: 20, + from: 0, quality: 0.65, popularity: 0.98, maintenance: 0.5 @@ -164,6 +169,7 @@ searches.forEach(function (search) { } const fixture = new Tacks(File(cacheContents)) fixture.create(cachePath) + fixOwner(cachePath) common.npm([ 'search', search.term, '--registry', common.registry, @@ -195,18 +201,7 @@ searches.forEach(function (search) { }) test('cleanup', function (t) { - cleanup() + server.done() server.close() t.end() }) - -function setup () { - cleanup() - mkdirp.sync(cacheBase) -} - -function cleanup () { - server.done() - process.chdir(osenv.tmpdir()) - rimraf.sync(PKG_DIR) -} diff --git a/deps/npm/test/tap/search.js b/deps/npm/test/tap/search.js index 70d17e5469d47b..049706cc0892d8 100644 --- a/deps/npm/test/tap/search.js +++ b/deps/npm/test/tap/search.js @@ -3,10 +3,8 @@ const cacheFile = require('npm-cache-filename') const mkdirp = require('mkdirp') const mr = require('npm-registry-mock') -const osenv = require('osenv') const path = require('path') const qs = require('querystring') -const rimraf = require('rimraf') const test = require('tap').test const Tacks = require('tacks') @@ -14,10 +12,27 @@ const File = Tacks.File const common = require('../common-tap.js') -const PKG_DIR = common.pkg -const CACHE_DIR = path.resolve(PKG_DIR, 'cache') -const cacheBase = cacheFile(CACHE_DIR)(common.registry + '/-/all') -const cachePath = path.join(cacheBase, '.cache.json') +// this test uses a fresh cache for each test block +// create them all in common.cache so that we can verify +// them for root-owned files in sudotest +let CACHE_DIR +let cacheBase +let cachePath +let cacheCounter = 1 +function setup () { + CACHE_DIR = common.cache + '/' + cacheCounter++ + cacheBase = cacheFile(CACHE_DIR)(common.registry + '/-/all') + cachePath = path.join(cacheBase, '.cache.json') + mkdirp.sync(cacheBase) + fixOwner(CACHE_DIR) +} + +const chownr = require('chownr') +const fixOwner = ( + process.getuid && process.getuid() === 0 && + process.env.SUDO_UID && process.env.SUDO_GID +) ? (path) => chownr.sync(path, +process.env.SUDO_UID, +process.env.SUDO_GID) + : () => {} let server @@ -35,6 +50,7 @@ test('notifies when there are no results', function (t) { const query = qs.stringify({ text: 'none', size: 20, + from: 0, quality: 0.65, popularity: 0.98, maintenance: 0.5 @@ -45,7 +61,8 @@ test('notifies when there are no results', function (t) { common.npm([ 'search', 'none', '--registry', common.registry, - '--loglevel', 'error' + '--loglevel', 'error', + '--cache', CACHE_DIR ], {}, function (err, code, stdout, stderr) { if (err) throw err t.equal(stderr, '', 'no error output') @@ -60,6 +77,7 @@ test('spits out a useful error when no cache nor network', function (t) { const query = qs.stringify({ text: 'foo', size: 20, + from: 0, quality: 0.65, popularity: 0.98, maintenance: 0.5 @@ -69,6 +87,7 @@ test('spits out a useful error when no cache nor network', function (t) { const cacheContents = {} const fixture = new Tacks(File(cacheContents)) fixture.create(cachePath) + fixOwner(cachePath) common.npm([ 'search', 'foo', '--registry', common.registry, @@ -91,6 +110,7 @@ test('can switch to JSON mode', function (t) { const query = qs.stringify({ text: 'oo', size: 20, + from: 0, quality: 0.65, popularity: 0.98, maintenance: 0.5 @@ -130,6 +150,7 @@ test('JSON mode does not notify on empty', function (t) { const query = qs.stringify({ text: 'oo', size: 20, + from: 0, quality: 0.65, popularity: 0.98, maintenance: 0.5 @@ -157,6 +178,7 @@ test('can switch to tab separated mode', function (t) { const query = qs.stringify({ text: 'oo', size: 20, + from: 0, quality: 0.65, popularity: 0.98, maintenance: 0.5 @@ -187,6 +209,7 @@ test('tab mode does not notify on empty', function (t) { const query = qs.stringify({ text: 'oo', size: 20, + from: 0, quality: 0.65, popularity: 0.98, maintenance: 0.5 @@ -210,8 +233,8 @@ test('tab mode does not notify on empty', function (t) { }) test('no arguments provided should error', function (t) { - cleanup() - common.npm(['search'], {}, function (err, code, stdout, stderr) { + setup() + common.npm(['search', '--cache', CACHE_DIR], {}, function (err, code, stdout, stderr) { if (err) throw err t.equal(code, 1, 'search finished unsuccessfully') @@ -225,18 +248,7 @@ test('no arguments provided should error', function (t) { }) test('cleanup', function (t) { - cleanup() + server.done() server.close() t.end() }) - -function setup () { - cleanup() - mkdirp.sync(cacheBase) -} - -function cleanup () { - server.done() - process.chdir(osenv.tmpdir()) - rimraf.sync(PKG_DIR) -} diff --git a/deps/npm/test/tap/shared-linked.js b/deps/npm/test/tap/shared-linked.js index bb2d9bd459aa3e..cbdbcf66c1612a 100644 --- a/deps/npm/test/tap/shared-linked.js +++ b/deps/npm/test/tap/shared-linked.js @@ -44,7 +44,6 @@ var optimist = Dir({ var fixture = new Tacks( Dir({ - cache: Dir({}), global: Dir({ lib: Dir({ node_modules: Dir({ @@ -126,7 +125,7 @@ test('shared-linked', function (t) { }) } var config = [ - '--cache', path.join(testdir, 'cache'), + '--cache', common.cache, '--registry', common.registry, '--unicode', 'false' ] diff --git a/deps/npm/test/tap/shrinkwrap-default-dev.js b/deps/npm/test/tap/shrinkwrap-default-dev.js index 9ff998fa4846f0..cd101092d4e92d 100644 --- a/deps/npm/test/tap/shrinkwrap-default-dev.js +++ b/deps/npm/test/tap/shrinkwrap-default-dev.js @@ -9,7 +9,7 @@ var common = require('../common-tap.js') var basedir = common.pkg var testdir = path.join(basedir, 'testdir') -var cachedir = path.join(basedir, 'cache') +var cachedir = common.cache var globaldir = path.join(basedir, 'global') var tmpdir = path.join(basedir, 'tmp') diff --git a/deps/npm/test/tap/shrinkwrap-dev-dependency.js b/deps/npm/test/tap/shrinkwrap-dev-dependency.js index 8006aa9ea8a81d..066372e617105d 100644 --- a/deps/npm/test/tap/shrinkwrap-dev-dependency.js +++ b/deps/npm/test/tap/shrinkwrap-dev-dependency.js @@ -12,7 +12,7 @@ var common = require('../common-tap.js') var pkg = common.pkg var opts = [ - '--cache', path.resolve(pkg, 'cache'), + '--cache', common.cache, '--registry', common.registry ] diff --git a/deps/npm/test/tap/shrinkwrap-lifecycle-cwd.js b/deps/npm/test/tap/shrinkwrap-lifecycle-cwd.js index 203c2165ebe600..f8927df5a29698 100644 --- a/deps/npm/test/tap/shrinkwrap-lifecycle-cwd.js +++ b/deps/npm/test/tap/shrinkwrap-lifecycle-cwd.js @@ -9,7 +9,7 @@ var common = require('../common-tap.js') var basedir = common.pkg var testdir = path.join(basedir, 'testdir') -var cachedir = path.join(basedir, 'cache') +var cachedir = common.cache var globaldir = path.join(basedir, 'global') var tmpdir = path.join(basedir, 'tmp') var escapeArg = require('../../lib/utils/escape-arg.js') diff --git a/deps/npm/test/tap/shrinkwrap-local-dependency.js b/deps/npm/test/tap/shrinkwrap-local-dependency.js index d737b10bb6b978..5e6d278d30c251 100644 --- a/deps/npm/test/tap/shrinkwrap-local-dependency.js +++ b/deps/npm/test/tap/shrinkwrap-local-dependency.js @@ -9,7 +9,7 @@ var File = Tacks.File var Dir = Tacks.Dir var testdir = common.pkg -var cachedir = path.resolve(testdir, 'cache') +var cachedir = common.cache var config = ['--cache=' + cachedir, '--loglevel=error'] var shrinkwrap = { diff --git a/deps/npm/test/tap/shrinkwrap-optional-dependency.js b/deps/npm/test/tap/shrinkwrap-optional-dependency.js index f2c853ac4b9a70..621e6c4c595e16 100644 --- a/deps/npm/test/tap/shrinkwrap-optional-dependency.js +++ b/deps/npm/test/tap/shrinkwrap-optional-dependency.js @@ -89,7 +89,7 @@ function setup (cb) { process.chdir(pkg) var opts = { - cache: path.resolve(pkg, 'cache'), + cache: common.cache, registry: common.registry } npm.load(opts, cb) diff --git a/deps/npm/test/tap/shrinkwrap-optional-platform.js b/deps/npm/test/tap/shrinkwrap-optional-platform.js index d6a3c41b516f15..f5b87d2f8d445c 100644 --- a/deps/npm/test/tap/shrinkwrap-optional-platform.js +++ b/deps/npm/test/tap/shrinkwrap-optional-platform.js @@ -8,7 +8,7 @@ var common = require('../common-tap.js') var basedir = common.pkg var testdir = path.join(basedir, 'testdir') -var cachedir = path.join(basedir, 'cache') +var cachedir = common.cache var globaldir = path.join(basedir, 'global') var tmpdir = path.join(basedir, 'tmp') diff --git a/deps/npm/test/tap/shrinkwrap-optional-property.js b/deps/npm/test/tap/shrinkwrap-optional-property.js index 84bc5cb258281f..f9b37f2f30e194 100644 --- a/deps/npm/test/tap/shrinkwrap-optional-property.js +++ b/deps/npm/test/tap/shrinkwrap-optional-property.js @@ -88,7 +88,7 @@ function setup (cb) { process.chdir(pkg) var opts = { - cache: path.resolve(pkg, 'cache'), + cache: common.cache, registry: common.registry } npm.load(opts, cb) diff --git a/deps/npm/test/tap/shrinkwrap-prod-dependency-also.js b/deps/npm/test/tap/shrinkwrap-prod-dependency-also.js index 94f3c4ac9012a3..96ebe2249e1c75 100644 --- a/deps/npm/test/tap/shrinkwrap-prod-dependency-also.js +++ b/deps/npm/test/tap/shrinkwrap-prod-dependency-also.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var pkg = common.pkg var opts = [ - '--cache=' + path.resolve(pkg, 'cache'), + '--cache=' + common.cache, '--registry=' + common.registry ] diff --git a/deps/npm/test/tap/shrinkwrap-prod-dependency.js b/deps/npm/test/tap/shrinkwrap-prod-dependency.js index eb04db9ca138c5..6c175af819bcd6 100644 --- a/deps/npm/test/tap/shrinkwrap-prod-dependency.js +++ b/deps/npm/test/tap/shrinkwrap-prod-dependency.js @@ -77,7 +77,7 @@ function setup (opts, cb) { process.chdir(pkg) var allOpts = { - cache: path.resolve(pkg, 'cache'), + cache: common.cache, registry: common.registry } diff --git a/deps/npm/test/tap/shrinkwrap-shared-dev-dependency.js b/deps/npm/test/tap/shrinkwrap-shared-dev-dependency.js index 6a4ceb1970ece3..5aa331f34cc463 100644 --- a/deps/npm/test/tap/shrinkwrap-shared-dev-dependency.js +++ b/deps/npm/test/tap/shrinkwrap-shared-dev-dependency.js @@ -12,7 +12,7 @@ var pkg = common.pkg var opts = { env: common.newEnv().extend({ - npm_config_cache: path.resolve(pkg, 'cache'), + npm_config_cache: common.cache, npm_config_registry: common.registry }), stdio: [0, 1, 2], diff --git a/deps/npm/test/tap/sorted-package-json.js b/deps/npm/test/tap/sorted-package-json.js index d67b729f683e93..f802bfd9e56058 100644 --- a/deps/npm/test/tap/sorted-package-json.js +++ b/deps/npm/test/tap/sorted-package-json.js @@ -1,21 +1,28 @@ var test = require('tap').test var path = require('path') -var rimraf = require('rimraf') -var mkdirp = require('mkdirp') var common = require('../common-tap.js') var pkg = common.pkg var tmp = path.join(pkg, 'tmp') -var cache = path.join(pkg, 'cache') +var cache = common.cache var fs = require('fs') var mr = require('npm-registry-mock') -var osenv = require('osenv') var packageJson = path.resolve(pkg, 'package.json') -test('setup', function (t) { - setup() - t.pass('setup success') - t.done() -}) +fs.writeFileSync(packageJson, JSON.stringify({ + 'name': 'sorted-package-json', + 'version': '0.0.0', + 'description': '', + 'main': 'index.js', + 'scripts': { + 'test': 'echo \'Error: no test specified\' && exit 1' + }, + 'author': 'Rocko Artischocko', + 'license': 'ISC', + 'dependencies': { + 'underscore': '^1.3.3', + 'request': '^0.9.0' + } +}, null, 2), 'utf8') test('sorting dependencies', function (t) { var before = JSON.parse(fs.readFileSync(packageJson).toString()) @@ -52,38 +59,3 @@ test('sorting dependencies', function (t) { }) }) }) - -test('cleanup', function (t) { - cleanup() - t.pass('cleaned up') - t.end() -}) - -function setup () { - cleanup() - mkdirp.sync(pkg) - - fs.writeFileSync(packageJson, JSON.stringify({ - 'name': 'sorted-package-json', - 'version': '0.0.0', - 'description': '', - 'main': 'index.js', - 'scripts': { - 'test': 'echo \'Error: no test specified\' && exit 1' - }, - 'author': 'Rocko Artischocko', - 'license': 'ISC', - 'dependencies': { - 'underscore': '^1.3.3', - 'request': '^0.9.0' - } - }, null, 2), 'utf8') -} - -function cleanup () { - process.chdir(osenv.tmpdir()) - rimraf.sync(cache) - rimraf.sync(pkg) - mkdirp.sync(cache) - mkdirp.sync(tmp) -} diff --git a/deps/npm/test/tap/spec-local-specifiers.js b/deps/npm/test/tap/spec-local-specifiers.js index 7b6cacf12cb695..6ea65278cda261 100644 --- a/deps/npm/test/tap/spec-local-specifiers.js +++ b/deps/npm/test/tap/spec-local-specifiers.js @@ -13,7 +13,7 @@ var isWindows = require('../../lib/utils/is-windows.js') var basedir = common.pkg var testdir = path.join(basedir, 'testdir') -var cachedir = path.join(basedir, 'cache') +var cachedir = common.cache var globaldir = path.join(basedir, 'global') var tmpdir = path.join(basedir, 'tmp') @@ -585,7 +585,9 @@ test('save behavior', function (t) { var deps = pjson.dependencies || {} t.is(deps['sb-transitive'], 'file:../sb-transitive', 'package.json') var sdep = shrinkwrap.dependencies['sb-transitive'] || {} - t.like(sdep, {bundled: null, dependencies: null, version: 'file:../sb-transitive'}, 'npm-shrinkwrap.json direct dep') + var tdep = sdep.dependencies.sbta + t.like(tdep, {bundled: null, version: 'file:../sb-transitive/sbta'}, 'npm-shrinkwrap.json transitive dep') + t.like(sdep, {bundled: null, version: 'file:../sb-transitive'}, 'npm-shrinkwrap.json direct dep') t.done() }) }) diff --git a/deps/npm/test/tap/splat-with-only-prerelease-to-latest.js b/deps/npm/test/tap/splat-with-only-prerelease-to-latest.js index 5720a2cdcedf44..ac2c58b5b9de9a 100644 --- a/deps/npm/test/tap/splat-with-only-prerelease-to-latest.js +++ b/deps/npm/test/tap/splat-with-only-prerelease-to-latest.js @@ -3,9 +3,6 @@ const common = require('../common-tap.js') const mr = require('npm-registry-mock') const npm = require('../../lib/npm') -const osenv = require('osenv') -const path = require('path') -const rimraf = require('rimraf') const test = require('tap').test const testdir = common.pkg @@ -62,7 +59,7 @@ test('setup', (t) => { npm.load({ loglevel: 'silent', registry: common.registry, - cache: path.join(testdir, 'cache') + cache: common.cache }, (err) => { if (err) { throw err } t.ok(true, 'npm loaded') @@ -96,11 +93,3 @@ test('splat', (t) => { server.close() }) }) - -test('cleanup', (t) => { - process.chdir(osenv.tmpdir()) - rimraf(testdir, () => { - t.ok(true, 'cleaned up test dir') - t.done() - }) -}) diff --git a/deps/npm/test/tap/tag-version-prefix.js b/deps/npm/test/tap/tag-version-prefix.js index b72255a2261527..70c968705ab07d 100644 --- a/deps/npm/test/tap/tag-version-prefix.js +++ b/deps/npm/test/tap/tag-version-prefix.js @@ -2,15 +2,11 @@ var common = require('../common-tap.js') var fs = require('fs') var path = require('path') -var mkdirp = require('mkdirp') -var osenv = require('osenv') -var rimraf = require('rimraf') var test = require('tap').test var npm = require('../../lib/npm.js') var pkg = common.pkg -var cache = path.resolve(pkg, 'cache') var npmrc = path.resolve(pkg, '.npmrc') var packagePath = path.resolve(pkg, 'package.json') @@ -70,23 +66,8 @@ test('npm version with message config', function (t) { }) }) -test('cleanup', function (t) { - cleanup() - t.end() -}) - -function cleanup () { - // windows fix for locked files - process.chdir(osenv.tmpdir()) - - rimraf.sync(pkg) -} - function setup () { - cleanup() - mkdirp.sync(cache) process.chdir(pkg) - fs.writeFileSync(packagePath, JSON.stringify(json), 'utf8') fs.writeFileSync(npmrc, configContents, 'ascii') } diff --git a/deps/npm/test/tap/tagged-version-matching.js b/deps/npm/test/tap/tagged-version-matching.js index 64522745c80e2b..a939c21c0d749b 100644 --- a/deps/npm/test/tap/tagged-version-matching.js +++ b/deps/npm/test/tap/tagged-version-matching.js @@ -9,7 +9,7 @@ var common = require('../common-tap.js') var basedir = common.pkg var testdir = path.join(basedir, 'testdir') -var cachedir = path.join(basedir, 'cache') +var cachedir = common.cache var globaldir = path.join(basedir, 'global') var tmpdir = path.join(basedir, 'tmp') diff --git a/deps/npm/test/tap/unpack-foreign-tarball.js b/deps/npm/test/tap/unpack-foreign-tarball.js index a1649c24bd23fe..7e965d9f08acce 100644 --- a/deps/npm/test/tap/unpack-foreign-tarball.js +++ b/deps/npm/test/tap/unpack-foreign-tarball.js @@ -13,7 +13,7 @@ var fixtures = path.resolve(__dirname, '..', 'fixtures') var pkg = common.pkg var nm = path.resolve(pkg, 'node_modules') var target = path.resolve(nm, 'npm-test-gitignore') -var cache = path.resolve(pkg, 'cache') +var cache = common.cache var tmp = path.resolve(pkg, 'tmp') var EXEC_OPTS = { diff --git a/deps/npm/test/tap/update-examples.js b/deps/npm/test/tap/update-examples.js index f0a7a6271dae99..8b6323ff1c71ac 100644 --- a/deps/npm/test/tap/update-examples.js +++ b/deps/npm/test/tap/update-examples.js @@ -2,7 +2,6 @@ var common = require('../common-tap.js') var test = require('tap').test var mkdirp = require('mkdirp') var rimraf = require('rimraf') -var path = require('path') var mr = require('npm-registry-mock') var osenv = require('osenv') @@ -10,7 +9,7 @@ var osenv = require('osenv') var requireInject = require('require-inject') var PKG_DIR = common.pkg -var CACHE_DIR = path.resolve(PKG_DIR, 'cache') +var CACHE_DIR = common.cache // ** constant templates for mocks ** var DEFAULT_PKG = { @@ -84,9 +83,17 @@ function extend (a, b) { return a } +const chownr = require('chownr') +const fixOwner = ( + process.getuid && process.getuid() === 0 && + process.env.SUDO_UID && process.env.SUDO_GID +) ? (path) => chownr.sync(path, +process.env.SUDO_UID, +process.env.SUDO_GID) + : () => {} + function resetPackage (options) { rimraf.sync(CACHE_DIR) mkdirp.sync(CACHE_DIR) + fixOwner(CACHE_DIR) installAskedFor = undefined diff --git a/deps/npm/test/tap/update-symlink.js b/deps/npm/test/tap/update-symlink.js index a21a68267b542b..eda07c56e1f698 100644 --- a/deps/npm/test/tap/update-symlink.js +++ b/deps/npm/test/tap/update-symlink.js @@ -10,7 +10,7 @@ const common = require('../common-tap.js') const basedir = common.pkg const testdir = path.join(basedir, 'testdir') -const cachedir = path.join(basedir, 'cache') +const cachedir = common.cache const globaldir = path.join(basedir, 'global') const tmpdir = path.join(basedir, 'tmp') diff --git a/deps/npm/test/tap/upgrade-lifecycles.js b/deps/npm/test/tap/upgrade-lifecycles.js index 3adea06d71375e..0821cacba60cd9 100644 --- a/deps/npm/test/tap/upgrade-lifecycles.js +++ b/deps/npm/test/tap/upgrade-lifecycles.js @@ -8,7 +8,7 @@ var common = require('../common-tap.js') var basedir = common.pkg var testdir = path.join(basedir, 'testdir') -var cachedir = path.join(basedir, 'cache') +var cachedir = common.cache var globaldir = path.join(basedir, 'global') var tmpdir = path.join(basedir, 'tmp') diff --git a/deps/npm/test/tap/version-allow-same-version.js b/deps/npm/test/tap/version-allow-same-version.js index fdd68032bc6b92..6b7978edebece7 100644 --- a/deps/npm/test/tap/version-allow-same-version.js +++ b/deps/npm/test/tap/version-allow-same-version.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') var pkg = common.pkg -var cache = path.resolve(pkg, 'cache') +var cache = common.cache var npmrc = path.resolve(pkg, './.npmrc') var configContents = 'sign-git-tag=false\n' diff --git a/deps/npm/test/tap/version-consistent-newlines.js b/deps/npm/test/tap/version-consistent-newlines.js index 56b16afcf4b48a..4387c489e2c770 100644 --- a/deps/npm/test/tap/version-consistent-newlines.js +++ b/deps/npm/test/tap/version-consistent-newlines.js @@ -11,7 +11,7 @@ const rimraf = require('rimraf') const requireInject = require('require-inject') const pkg = common.pkg -const cache = path.resolve(pkg, 'cache') +const cache = common.cache const gitDir = path.resolve(pkg, '.git') test('npm version does not alter the line endings in package.json (LF)', function (t) { diff --git a/deps/npm/test/tap/version-from-git.js b/deps/npm/test/tap/version-from-git.js index 759396a782191a..e63865a73378a4 100644 --- a/deps/npm/test/tap/version-from-git.js +++ b/deps/npm/test/tap/version-from-git.js @@ -3,7 +3,6 @@ var fs = require('fs') var path = require('path') var mkdirp = require('mkdirp') -var osenv = require('osenv') var rimraf = require('rimraf') var test = require('tap').test @@ -11,7 +10,7 @@ var npm = require('../../lib/npm.js') var pkg = common.pkg var packagePath = path.resolve(pkg, 'package.json') -var cache = path.resolve(pkg, 'cache') +var cache = common.cache var json = { name: 'cat', version: '0.1.2' } @@ -187,20 +186,10 @@ test('npm version from-git without any versions', function (t) { } }) -test('cleanup', function (t) { - cleanup() - t.end() -}) - -function cleanup () { - // windows fix for locked files - process.chdir(osenv.tmpdir()) - rimraf.sync(pkg) -} - function setup () { - cleanup() - mkdirp.sync(cache) + process.chdir(__dirname) + rimraf.sync(pkg) + mkdirp.sync(pkg) process.chdir(pkg) fs.writeFileSync(packagePath, JSON.stringify(json), 'utf8') } diff --git a/deps/npm/test/tap/version-git-not-clean.js b/deps/npm/test/tap/version-git-not-clean.js index b387c00e64de3a..486e2e0766181d 100644 --- a/deps/npm/test/tap/version-git-not-clean.js +++ b/deps/npm/test/tap/version-git-not-clean.js @@ -1,19 +1,15 @@ var common = require('../common-tap.js') var test = require('tap').test var npm = require('../../') -var osenv = require('osenv') -var path = require('path') var fs = require('fs') -var rimraf = require('rimraf') -var mkdirp = require('mkdirp') var which = require('which') var spawn = require('child_process').spawn var pkg = common.pkg -var cache = path.resolve(pkg, 'cache') +var cache = common.cache test('npm version with working directory not clean', function (t) { - setup() + process.chdir(pkg) npm.load({ cache: cache, registry: common.registry, prefix: pkg }, function () { which('git', function (err, git) { t.ifError(err, 'git found') @@ -81,17 +77,3 @@ test('npm version --force with working directory not clean', function ( t.end() }) }) - -test('cleanup', function (t) { - // windows fix for locked files - process.chdir(osenv.tmpdir()) - - rimraf.sync(pkg) - t.end() -}) - -function setup () { - mkdirp.sync(pkg) - mkdirp.sync(cache) - process.chdir(pkg) -} diff --git a/deps/npm/test/tap/version-lifecycle.js b/deps/npm/test/tap/version-lifecycle.js index 98c96b6826d4d8..590ae86aa4b021 100644 --- a/deps/npm/test/tap/version-lifecycle.js +++ b/deps/npm/test/tap/version-lifecycle.js @@ -2,14 +2,13 @@ var fs = require('graceful-fs') var path = require('path') var mkdirp = require('mkdirp') -var osenv = require('osenv') var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') var pkg = common.pkg -var cache = path.resolve(pkg, 'cache') +var cache = common.cache var npmrc = path.resolve(pkg, './.npmrc') var configContents = 'sign-git-commit=false\nsign-git-tag=false\n' @@ -145,16 +144,11 @@ test('npm version execution order', function (t) { }) }) -test('cleanup', function (t) { - process.chdir(osenv.tmpdir()) - rimraf.sync(pkg) - t.end() -}) - function setup () { + process.chdir(__dirname) + rimraf.sync(pkg) mkdirp.sync(pkg) mkdirp.sync(path.join(pkg, 'node_modules')) - mkdirp.sync(cache) fs.writeFileSync(npmrc, configContents, 'ascii') process.chdir(pkg) } diff --git a/deps/npm/test/tap/version-message-config.js b/deps/npm/test/tap/version-message-config.js index db45809879733c..94e9e951e776f0 100644 --- a/deps/npm/test/tap/version-message-config.js +++ b/deps/npm/test/tap/version-message-config.js @@ -2,15 +2,11 @@ var common = require('../common-tap.js') var fs = require('fs') var path = require('path') -var mkdirp = require('mkdirp') -var osenv = require('osenv') -var rimraf = require('rimraf') var test = require('tap').test var npm = require('../../lib/npm.js') var pkg = common.pkg -var cache = path.resolve(pkg, 'cache') var npmrc = path.resolve(pkg, '.npmrc') var packagePath = path.resolve(pkg, 'package.json') @@ -54,21 +50,7 @@ test('npm version with message config', function (t) { }) }) -test('cleanup', function (t) { - cleanup() - t.end() -}) - -function cleanup () { - // windows fix for locked files - process.chdir(osenv.tmpdir()) - - rimraf.sync(pkg) -} - function setup () { - cleanup() - mkdirp.sync(cache) process.chdir(pkg) fs.writeFileSync(packagePath, JSON.stringify(json), 'utf8') diff --git a/deps/npm/test/tap/version-no-git.js b/deps/npm/test/tap/version-no-git.js index dc1ee05662ff6f..cea8b55ddcd8cb 100644 --- a/deps/npm/test/tap/version-no-git.js +++ b/deps/npm/test/tap/version-no-git.js @@ -1,15 +1,13 @@ var common = require('../common-tap.js') var test = require('tap').test var npm = require('../../') -var osenv = require('osenv') var path = require('path') var fs = require('fs') var mkdirp = require('mkdirp') -var rimraf = require('rimraf') var requireInject = require('require-inject') var pkg = common.pkg -var cache = path.resolve(pkg, 'cache') +var cache = common.cache var gitDir = path.resolve(pkg, '.git') test('npm version in a git repo without the git binary', function (t) { @@ -33,16 +31,7 @@ test('npm version in a git repo without the git binary', function (t) { }) }) -test('cleanup', function (t) { - process.chdir(osenv.tmpdir()) - - rimraf.sync(pkg) - t.end() -}) - function setup () { - mkdirp.sync(pkg) - mkdirp.sync(cache) mkdirp.sync(gitDir) fs.writeFileSync(path.resolve(pkg, 'package.json'), JSON.stringify({ author: 'Terin Stock', diff --git a/deps/npm/test/tap/version-no-package.js b/deps/npm/test/tap/version-no-package.js index 1b16c9f758c8d8..aa553b080148a9 100644 --- a/deps/npm/test/tap/version-no-package.js +++ b/deps/npm/test/tap/version-no-package.js @@ -1,18 +1,10 @@ var common = require('../common-tap.js') var test = require('tap').test -var osenv = require('osenv') -var mkdirp = require('mkdirp') -var rimraf = require('rimraf') var pkg = common.pkg -test('setup', function (t) { - setup() - t.end() -}) - test('npm version in a prefix with no package.json', function (t) { - setup() + process.chdir(pkg) common.npm( ['version', '--json', '--prefix', pkg], { cwd: pkg }, @@ -29,15 +21,3 @@ test('npm version in a prefix with no package.json', function (t) { } ) }) - -test('cleanup', function (t) { - process.chdir(osenv.tmpdir()) - - rimraf.sync(pkg) - t.end() -}) - -function setup () { - mkdirp.sync(pkg) - process.chdir(pkg) -} diff --git a/deps/npm/test/tap/version-no-tags.js b/deps/npm/test/tap/version-no-tags.js index 9e7b08c61fa126..c2c11d875b55af 100644 --- a/deps/npm/test/tap/version-no-tags.js +++ b/deps/npm/test/tap/version-no-tags.js @@ -1,16 +1,13 @@ var common = require('../common-tap.js') var test = require('tap').test var npm = require('../../') -var osenv = require('osenv') var path = require('path') var fs = require('fs') -var rimraf = require('rimraf') -var mkdirp = require('mkdirp') var which = require('which') var spawn = require('child_process').spawn var pkg = common.pkg -var cache = path.resolve(pkg, 'cache') +var cache = common.cache test('npm version without git tag', function (t) { setup() @@ -50,17 +47,7 @@ test('npm version without git tag', function (t) { }) }) -test('cleanup', function (t) { - // windows fix for locked files - process.chdir(osenv.tmpdir()) - - rimraf.sync(pkg) - t.end() -}) - function setup () { - mkdirp.sync(pkg) - mkdirp.sync(cache) fs.writeFileSync(path.resolve(pkg, 'package.json'), JSON.stringify({ author: 'Evan Lucas', name: 'version-no-tags-test', diff --git a/deps/npm/test/tap/version-prerelease-id.js b/deps/npm/test/tap/version-prerelease-id.js index 5e342667cdba2f..0e248423cd052f 100644 --- a/deps/npm/test/tap/version-prerelease-id.js +++ b/deps/npm/test/tap/version-prerelease-id.js @@ -1,24 +1,15 @@ var fs = require('fs') var path = require('path') -var mkdirp = require('mkdirp') -var osenv = require('osenv') -var rimraf = require('rimraf') var test = require('tap').test var npm = require('../../') var common = require('../common-tap.js') var pkg = common.pkg -var cache = path.resolve(pkg, 'cache') var EXEC_OPTS = { cwd: pkg } -test('setup', function (t) { - setup() - t.end() -}) - test('npm version --preid=rc uses prerelease id', function (t) { setup() @@ -32,15 +23,7 @@ test('npm version --preid=rc uses prerelease id', function (t) { }) }) -test('cleanup', function (t) { - cleanup() - t.end() -}) - function setup () { - cleanup() - mkdirp.sync(pkg) - mkdirp.sync(cache) var contents = { author: 'Daniel Wilches', name: 'version-prerelease-id', @@ -52,10 +35,3 @@ function setup () { fs.writeFileSync(path.resolve(pkg, 'npm-shrinkwrap.json'), JSON.stringify(contents), 'utf8') process.chdir(pkg) } - -function cleanup () { - // windows fix for locked files - process.chdir(osenv.tmpdir()) - rimraf.sync(cache) - rimraf.sync(pkg) -} diff --git a/deps/npm/test/tap/version-sub-directory-shrinkwrap.js b/deps/npm/test/tap/version-sub-directory-shrinkwrap.js index c6e607d7c57675..5f2d688f42ba5a 100644 --- a/deps/npm/test/tap/version-sub-directory-shrinkwrap.js +++ b/deps/npm/test/tap/version-sub-directory-shrinkwrap.js @@ -3,8 +3,6 @@ var fs = require('fs') var path = require('path') var mkdirp = require('mkdirp') -var osenv = require('osenv') -var rimraf = require('rimraf') var test = require('tap').test var npm = require('../../lib/npm.js') @@ -13,7 +11,7 @@ var pkg = common.pkg var subDirectory = path.resolve(pkg, 'sub-directory') var packagePath = path.resolve(pkg, 'package.json') var shrinkwrapPath = path.resolve(pkg, 'npm-shrinkwrap.json') -var cache = path.resolve(pkg, 'cache') +var cache = common.cache var json = { name: 'cat', version: '0.1.2' } @@ -59,20 +57,7 @@ test('npm version from a subdirectory', function (t) { } }) -test('cleanup', function (t) { - cleanup() - t.end() -}) - -function cleanup () { - // windows fix for locked files - process.chdir(osenv.tmpdir()) - rimraf.sync(pkg) -} - function setup () { - cleanup() - mkdirp.sync(cache) mkdirp.sync(subDirectory) process.chdir(subDirectory) fs.writeFileSync(packagePath, JSON.stringify(json), 'utf8') diff --git a/deps/npm/test/tap/version-sub-directory.js b/deps/npm/test/tap/version-sub-directory.js index a7eb8f10420893..809f24e79ffa51 100644 --- a/deps/npm/test/tap/version-sub-directory.js +++ b/deps/npm/test/tap/version-sub-directory.js @@ -12,7 +12,7 @@ var npm = require('../../lib/npm.js') var pkg = common.pkg var subDirectory = path.resolve(pkg, 'sub-directory') var packagePath = path.resolve(pkg, 'package.json') -var cache = path.resolve(pkg, 'cache') +var cache = common.cache var json = { name: 'cat', version: '0.1.2' } diff --git a/deps/npm/test/tap/version-update-shrinkwrap.js b/deps/npm/test/tap/version-update-shrinkwrap.js index 47822f646ec7f9..e6ba5ee6182ba9 100644 --- a/deps/npm/test/tap/version-update-shrinkwrap.js +++ b/deps/npm/test/tap/version-update-shrinkwrap.js @@ -2,7 +2,6 @@ var fs = require('fs') var path = require('path') var mkdirp = require('mkdirp') -var osenv = require('osenv') var rimraf = require('rimraf') var test = require('tap').test @@ -10,11 +9,11 @@ var npm = require('../../') var common = require('../common-tap.js') var pkg = common.pkg -var cache = path.resolve(pkg, 'cache') +var cache = common.cache test('npm version updates shrinkwrap - no git', function (t) { setup() - npm.load({ cache: pkg + '/cache', registry: common.registry }, function () { + npm.load({ cache: cache, registry: common.registry }, function () { npm.commands.version(['patch'], function (err) { if (err) return t.fail('Error perform version patch') var shrinkwrap = require(path.resolve(pkg, 'npm-shrinkwrap.json')) @@ -111,15 +110,10 @@ test('npm version updates shrinkwrap and updates git', function (t) { } }) -test('cleanup', function (t) { - cleanup() - t.end() -}) - function setup () { - cleanup() + process.chdir(__dirname) + rimraf.sync(pkg) mkdirp.sync(pkg) - mkdirp.sync(cache) var contents = { author: 'Nathan Bowser && Faiq Raza', name: 'version-with-shrinkwrap-test', @@ -131,10 +125,3 @@ function setup () { fs.writeFileSync(path.resolve(pkg, 'npm-shrinkwrap.json'), JSON.stringify(contents), 'utf8') process.chdir(pkg) } - -function cleanup () { - // windows fix for locked files - process.chdir(osenv.tmpdir()) - rimraf.sync(cache) - rimraf.sync(pkg) -} diff --git a/deps/npm/test/tap/zz-cleanup.js b/deps/npm/test/tap/zz-cleanup.js deleted file mode 100644 index e1020aa3b11b51..00000000000000 --- a/deps/npm/test/tap/zz-cleanup.js +++ /dev/null @@ -1,8 +0,0 @@ -var common = require('../common-tap') -var test = require('tap').test -var rimraf = require('rimraf') - -test('cleanup', function (t) { - rimraf.sync(common.npm_config_cache) - t.end() -})