From dabc6ddddc4d183e5f36698654d32925aec08383 Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Fri, 9 Oct 2020 15:35:52 -0400 Subject: [PATCH] deps: upgrade npm to 7.0.0-rc.4 PR-URL: https://github.com/nodejs/node/pull/35576 Reviewed-By: Antoine du Hamel Reviewed-By: Rich Trott Reviewed-By: Jiawen Geng --- deps/npm/CHANGELOG.md | 22 ++ .../public/cli-commands/npm-access/index.html | 4 +- .../cli-commands/npm-adduser/index.html | 4 +- .../public/cli-commands/npm-audit/index.html | 4 +- .../public/cli-commands/npm-bin/index.html | 4 +- .../public/cli-commands/npm-bugs/index.html | 4 +- .../public/cli-commands/npm-bundle/index.html | 4 +- .../public/cli-commands/npm-cache/index.html | 4 +- .../public/cli-commands/npm-ci/index.html | 4 +- .../cli-commands/npm-completion/index.html | 4 +- .../public/cli-commands/npm-config/index.html | 4 +- .../public/cli-commands/npm-dedupe/index.html | 4 +- .../cli-commands/npm-deprecate/index.html | 4 +- .../cli-commands/npm-dist-tag/index.html | 4 +- .../public/cli-commands/npm-docs/index.html | 4 +- .../public/cli-commands/npm-doctor/index.html | 4 +- .../public/cli-commands/npm-edit/index.html | 4 +- .../public/cli-commands/npm-exec/index.html | 4 +- .../cli-commands/npm-explain/index.html | 4 +- .../cli-commands/npm-explore/index.html | 4 +- .../public/cli-commands/npm-fund/index.html | 4 +- .../cli-commands/npm-help-search/index.html | 4 +- .../public/cli-commands/npm-help/index.html | 4 +- .../public/cli-commands/npm-hook/index.html | 4 +- .../public/cli-commands/npm-init/index.html | 4 +- .../npm-install-ci-test/index.html | 4 +- .../cli-commands/npm-install-test/index.html | 4 +- .../cli-commands/npm-install/index.html | 4 +- .../public/cli-commands/npm-link/index.html | 4 +- .../public/cli-commands/npm-logout/index.html | 4 +- .../public/cli-commands/npm-ls/index.html | 6 +- .../public/cli-commands/npm-org/index.html | 4 +- .../cli-commands/npm-outdated/index.html | 4 +- .../public/cli-commands/npm-owner/index.html | 4 +- .../public/cli-commands/npm-pack/index.html | 4 +- .../public/cli-commands/npm-ping/index.html | 4 +- .../public/cli-commands/npm-prefix/index.html | 4 +- .../cli-commands/npm-profile/index.html | 4 +- .../public/cli-commands/npm-prune/index.html | 4 +- .../cli-commands/npm-publish/index.html | 4 +- .../cli-commands/npm-rebuild/index.html | 4 +- .../public/cli-commands/npm-repo/index.html | 4 +- .../cli-commands/npm-restart/index.html | 4 +- .../public/cli-commands/npm-root/index.html | 4 +- .../cli-commands/npm-run-script/index.html | 4 +- .../public/cli-commands/npm-search/index.html | 4 +- .../cli-commands/npm-shrinkwrap/index.html | 4 +- .../public/cli-commands/npm-star/index.html | 4 +- .../public/cli-commands/npm-stars/index.html | 4 +- .../public/cli-commands/npm-start/index.html | 4 +- .../public/cli-commands/npm-stop/index.html | 4 +- .../public/cli-commands/npm-team/index.html | 4 +- .../public/cli-commands/npm-test/index.html | 4 +- .../public/cli-commands/npm-token/index.html | 4 +- .../cli-commands/npm-uninstall/index.html | 4 +- .../cli-commands/npm-unpublish/index.html | 4 +- .../public/cli-commands/npm-update/index.html | 4 +- .../cli-commands/npm-version/index.html | 4 +- .../public/cli-commands/npm-view/index.html | 4 +- .../public/cli-commands/npm-whoami/index.html | 4 +- .../docs/public/cli-commands/npm/index.html | 6 +- .../docs/public/cli-commands/npx/index.html | 4 +- .../public/configuring-npm/folders/index.html | 4 +- .../public/configuring-npm/install/index.html | 4 +- .../public/configuring-npm/npmrc/index.html | 4 +- .../configuring-npm/package-json/index.html | 4 +- .../package-lock-json/index.html | 4 +- .../configuring-npm/package-locks/index.html | 4 +- .../shrinkwrap-json/index.html | 4 +- deps/npm/docs/public/index.html | 2 +- .../docs/public/using-npm/config/index.html | 4 +- .../public/using-npm/developers/index.html | 4 +- .../docs/public/using-npm/disputes/index.html | 4 +- .../npm/docs/public/using-npm/orgs/index.html | 4 +- .../docs/public/using-npm/registry/index.html | 4 +- .../docs/public/using-npm/removal/index.html | 4 +- .../docs/public/using-npm/scope/index.html | 4 +- .../docs/public/using-npm/scripts/index.html | 4 +- .../docs/public/using-npm/semver/index.html | 4 +- deps/npm/lib/completion.js | 8 +- deps/npm/lib/exec.js | 55 ++++- deps/npm/lib/npm.js | 3 - deps/npm/lib/utils/config.js | 163 +++++++------ deps/npm/lib/utils/file-exists.js | 8 + deps/npm/lib/utils/set-user-agent.js | 15 -- deps/npm/man/man1/npm-ls.1 | 2 +- deps/npm/man/man1/npm.1 | 2 +- .../arborist/lib/arborist/build-ideal-tree.js | 6 +- .../@npmcli/arborist/package.json | 2 +- .../@npmcli/config/lib/get-user-agent.js | 13 + .../node_modules/@npmcli/config/lib/index.js | 11 + .../node_modules/@npmcli/config/package.json | 2 +- .../node_modules/@types/color-name/LICENSE | 21 -- .../node_modules/@types/color-name/README.md | 16 -- .../node_modules/@types/color-name/index.d.ts | 161 ------------- .../@types/color-name/package.json | 23 -- deps/npm/node_modules/ansi-styles/index.d.ts | 152 +++++++++++- .../npm/node_modules/ansi-styles/package.json | 3 +- deps/npm/node_modules/ansi-styles/readme.md | 16 +- .../node_modules/make-fetch-happen/index.js | 3 + .../make-fetch-happen/package.json | 2 +- deps/npm/package.json | 6 +- .../test-lib-utils-config.js-TAP.test.js | 42 ++-- deps/npm/test/lib/exec.js | 223 +++++++++++++++++- deps/npm/test/lib/utils/config.js | 10 +- deps/npm/test/lib/utils/file-exists.js | 30 +++ deps/npm/test/lib/utils/set-user-agent.js | 54 ----- 107 files changed, 790 insertions(+), 598 deletions(-) create mode 100644 deps/npm/lib/utils/file-exists.js delete mode 100644 deps/npm/lib/utils/set-user-agent.js create mode 100644 deps/npm/node_modules/@npmcli/config/lib/get-user-agent.js delete mode 100644 deps/npm/node_modules/@types/color-name/LICENSE delete mode 100644 deps/npm/node_modules/@types/color-name/README.md delete mode 100644 deps/npm/node_modules/@types/color-name/index.d.ts delete mode 100644 deps/npm/node_modules/@types/color-name/package.json create mode 100644 deps/npm/test/lib/utils/file-exists.js delete mode 100644 deps/npm/test/lib/utils/set-user-agent.js diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index 385641563e9f7a..3280578d751912 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,3 +1,25 @@ +## v7.0.0-rc.4 (2020-10-09) + +* [`09b456f2d`](https://github.com/npm/cli/commit/09b456f2d776e2757956d2b9869febd1e01a1076) + `@npmcli/config@1.2.1` + * [#1919](https://github.com/npm/cli/pull/1919) + exposes `npm_config_user_agent` env variable + ([@nlf](https://github.com/nlf)) +* [`e859fba9e`](https://github.com/npm/cli/commit/e859fba9e7c267b0587b7d22da72e33f3e8f906b) + [#1936](https://github.com/npm/cli/pull/1936) + fix npx for non-interactive shells + ([@nlf](https://github.com/nlf)) +* [`9320b8e4f`](https://github.com/npm/cli/commit/9320b8e4f0e0338ea95e970ec9bbf0704def64b8) + [#1906](https://github.com/npm/cli/pull/1906) + restore old npx behavior of running existing bins first + ([@nlf](https://github.com/nlf)) +* [`7bd47ca2c`](https://github.com/npm/cli/commit/7bd47ca2c718df0a7d809f1992b7a87eece3f6dc) + `@npmcli/arborist@0.0.33` + * fixed handling of invalid package.json file +* [`02737453b`](https://github.com/npm/cli/commit/02737453bc2363daeef8c4e4b7d239e2299029b2) + `make-fetch-happen@8.0.10` + * do not calculate integrity values of http errors + ## v7.0.0-rc.3 (2020-10-06) * [`d816c2efa`](https://github.com/npm/cli/commit/d816c2efae41930cbdf4fff8657e0adc450d1dd4) diff --git a/deps/npm/docs/public/cli-commands/npm-access/index.html b/deps/npm/docs/public/cli-commands/npm-access/index.html index fc68a8fdd13411..dc55e42fed5629 100644 --- a/deps/npm/docs/public/cli-commands/npm-access/index.html +++ b/deps/npm/docs/public/cli-commands/npm-access/index.html @@ -76,7 +76,7 @@ } } }) -

npm access

+

npm access

Set access level on published packages

Synopsis

npm access public [<package>]
@@ -150,4 +150,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-adduser/index.html b/deps/npm/docs/public/cli-commands/npm-adduser/index.html index e9326cd06b3a04..f252affcdf60f7 100644 --- a/deps/npm/docs/public/cli-commands/npm-adduser/index.html +++ b/deps/npm/docs/public/cli-commands/npm-adduser/index.html @@ -76,7 +76,7 @@ } } }) -

+

section: cli-commands title: npm-adduser description: Set access level on published packages

@@ -145,4 +145,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-audit/index.html b/deps/npm/docs/public/cli-commands/npm-audit/index.html index 3b296a99d86883..51bf06f53ed74b 100644 --- a/deps/npm/docs/public/cli-commands/npm-audit/index.html +++ b/deps/npm/docs/public/cli-commands/npm-audit/index.html @@ -76,7 +76,7 @@ } } }) -

npm audit

+

npm audit

Run a security audit

Synopsis

npm audit [--json|--parseable|--audit-level=(low|moderate|high|critical)]
@@ -167,4 +167,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-bin/index.html b/deps/npm/docs/public/cli-commands/npm-bin/index.html index f249285676bf69..335d007d77aa9e 100644 --- a/deps/npm/docs/public/cli-commands/npm-bin/index.html +++ b/deps/npm/docs/public/cli-commands/npm-bin/index.html @@ -76,7 +76,7 @@ } } }) -

npm bin

+

npm bin

Display npm bin folder

Synopsis

npm bin [-g|--global]
@@ -96,4 +96,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-bugs/index.html b/deps/npm/docs/public/cli-commands/npm-bugs/index.html index eb90fe305e967d..3b7c8493f45d83 100644 --- a/deps/npm/docs/public/cli-commands/npm-bugs/index.html +++ b/deps/npm/docs/public/cli-commands/npm-bugs/index.html @@ -76,7 +76,7 @@ } } }) -

npm bugs

+

npm bugs

Bugs for a package in a web browser maybe

Synopsis

npm bugs [<pkgname> [<pkgname> ...]]
@@ -119,4 +119,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-bundle/index.html b/deps/npm/docs/public/cli-commands/npm-bundle/index.html index 899cba5fe45fe6..e096775f4cbfa8 100644 --- a/deps/npm/docs/public/cli-commands/npm-bundle/index.html +++ b/deps/npm/docs/public/cli-commands/npm-bundle/index.html @@ -76,7 +76,7 @@ } } }) -

npm bundle

+

npm bundle

REMOVED

Description

The npm bundle command has been removed in 1.0, for the simple reason @@ -93,4 +93,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-cache/index.html b/deps/npm/docs/public/cli-commands/npm-cache/index.html index 8ad8bbb7eaab63..7b2f5bfb477de6 100644 --- a/deps/npm/docs/public/cli-commands/npm-cache/index.html +++ b/deps/npm/docs/public/cli-commands/npm-cache/index.html @@ -76,7 +76,7 @@ } } }) -

npm cache

+

npm cache

Manipulates packages cache

Synopsis

npm cache add <tarball file>
@@ -147,4 +147,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-ci/index.html b/deps/npm/docs/public/cli-commands/npm-ci/index.html index d7f0143d361c73..b4267dcf18a9c0 100644 --- a/deps/npm/docs/public/cli-commands/npm-ci/index.html +++ b/deps/npm/docs/public/cli-commands/npm-ci/index.html @@ -76,7 +76,7 @@ } } }) -

npm ci

+

npm ci

Install a project with a clean slate

Synopsis

npm ci
@@ -124,4 +124,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-completion/index.html b/deps/npm/docs/public/cli-commands/npm-completion/index.html index 38509399d730ba..f7effb9bc62874 100644 --- a/deps/npm/docs/public/cli-commands/npm-completion/index.html +++ b/deps/npm/docs/public/cli-commands/npm-completion/index.html @@ -76,7 +76,7 @@ } } }) -

npm completion

+

npm completion

Tab Completion for npm

Synopsis

source <(npm completion)
@@ -106,4 +106,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-config/index.html b/deps/npm/docs/public/cli-commands/npm-config/index.html index 44cdce664c2670..dcabf623d55a98 100644 --- a/deps/npm/docs/public/cli-commands/npm-config/index.html +++ b/deps/npm/docs/public/cli-commands/npm-config/index.html @@ -76,7 +76,7 @@ } } }) -

npm config

+

npm config

Manage the npm configuration files

Synopsis

npm config set <key> <value> [-g|--global]
@@ -130,4 +130,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-dedupe/index.html b/deps/npm/docs/public/cli-commands/npm-dedupe/index.html index b328aa18cc1cba..f45995396eb53c 100644 --- a/deps/npm/docs/public/cli-commands/npm-dedupe/index.html +++ b/deps/npm/docs/public/cli-commands/npm-dedupe/index.html @@ -76,7 +76,7 @@ } } }) -

npm dedupe

+

npm dedupe

Reduce duplication

Synopsis

npm dedupe
@@ -124,4 +124,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-deprecate/index.html b/deps/npm/docs/public/cli-commands/npm-deprecate/index.html index 22b755c00494b3..e318eee7950ae9 100644 --- a/deps/npm/docs/public/cli-commands/npm-deprecate/index.html +++ b/deps/npm/docs/public/cli-commands/npm-deprecate/index.html @@ -76,7 +76,7 @@ } } }) -

npm deprecate

+

npm deprecate

Deprecate a version of a package

Synopsis

npm deprecate <pkg>[@<version>] <message>
@@ -102,4 +102,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-dist-tag/index.html b/deps/npm/docs/public/cli-commands/npm-dist-tag/index.html index 13ac9d2cfd08cd..649153bc99a0df 100644 --- a/deps/npm/docs/public/cli-commands/npm-dist-tag/index.html +++ b/deps/npm/docs/public/cli-commands/npm-dist-tag/index.html @@ -76,7 +76,7 @@ } } }) -

+

section: cli-commands title: npm-dist-tag description: Modify package distribution tags

@@ -151,4 +151,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-docs/index.html b/deps/npm/docs/public/cli-commands/npm-docs/index.html index a93b68af29051e..3e3905817d5698 100644 --- a/deps/npm/docs/public/cli-commands/npm-docs/index.html +++ b/deps/npm/docs/public/cli-commands/npm-docs/index.html @@ -76,7 +76,7 @@ } } }) -

npm docs

+

npm docs

Docs for a package in a web browser maybe

Synopsis

npm docs [<pkgname> [<pkgname> ...]]
@@ -119,4 +119,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-doctor/index.html b/deps/npm/docs/public/cli-commands/npm-doctor/index.html index d5b1cc22f6c434..9bdde83f73ba87 100644 --- a/deps/npm/docs/public/cli-commands/npm-doctor/index.html +++ b/deps/npm/docs/public/cli-commands/npm-doctor/index.html @@ -76,7 +76,7 @@ } } }) -

npm doctor

+

npm doctor

Check your environments

Synopsis

npm doctor
@@ -165,4 +165,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-edit/index.html b/deps/npm/docs/public/cli-commands/npm-edit/index.html index f3997342b5f31e..38e8d02e6cca29 100644 --- a/deps/npm/docs/public/cli-commands/npm-edit/index.html +++ b/deps/npm/docs/public/cli-commands/npm-edit/index.html @@ -76,7 +76,7 @@ } } }) -

npm edit

+

npm edit

Edit an installed package

Synopsis

npm edit <pkg>[/<subpkg>...]
@@ -112,4 +112,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-exec/index.html b/deps/npm/docs/public/cli-commands/npm-exec/index.html index 4965461066b458..a8fc6dd0e863e0 100644 --- a/deps/npm/docs/public/cli-commands/npm-exec/index.html +++ b/deps/npm/docs/public/cli-commands/npm-exec/index.html @@ -76,7 +76,7 @@ } } }) -

npm exec

+

npm exec

Run a command from a local or remote npm package

Synopsis

npm exec -- <pkg>[@<version>] [args...]
@@ -206,4 +206,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-explain/index.html b/deps/npm/docs/public/cli-commands/npm-explain/index.html index a3a0df79bd177b..b550d426ccdd8e 100644 --- a/deps/npm/docs/public/cli-commands/npm-explain/index.html +++ b/deps/npm/docs/public/cli-commands/npm-explain/index.html @@ -76,7 +76,7 @@ } } }) -

npm explain

+

npm explain

Explain installed packages

Synopsis

npm explain <folder | specifier>
@@ -135,4 +135,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-explore/index.html b/deps/npm/docs/public/cli-commands/npm-explore/index.html index b7204d716f726e..5f8b066638ba6c 100644 --- a/deps/npm/docs/public/cli-commands/npm-explore/index.html +++ b/deps/npm/docs/public/cli-commands/npm-explore/index.html @@ -76,7 +76,7 @@ } } }) -

+

section: cli-commands title: npm-explore description: Browse an installed package

@@ -116,4 +116,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-fund/index.html b/deps/npm/docs/public/cli-commands/npm-fund/index.html index df8866081572a9..6ae430f1a03efb 100644 --- a/deps/npm/docs/public/cli-commands/npm-fund/index.html +++ b/deps/npm/docs/public/cli-commands/npm-fund/index.html @@ -76,7 +76,7 @@ } } }) -

npm fund

+

npm fund

Retrieve funding information

Synopsis

    npm fund [<pkg>]
@@ -130,4 +130,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-help-search/index.html b/deps/npm/docs/public/cli-commands/npm-help-search/index.html index 4e9a3786554945..9a2dc3c42f73c3 100644 --- a/deps/npm/docs/public/cli-commands/npm-help-search/index.html +++ b/deps/npm/docs/public/cli-commands/npm-help-search/index.html @@ -76,7 +76,7 @@ } } }) -

npm help-search

+

npm help-search

Search npm help documentation

Synopsis

npm help-search <text>
@@ -107,4 +107,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-help/index.html b/deps/npm/docs/public/cli-commands/npm-help/index.html index c2505a8dbaff38..f5602ac782696e 100644 --- a/deps/npm/docs/public/cli-commands/npm-help/index.html +++ b/deps/npm/docs/public/cli-commands/npm-help/index.html @@ -76,7 +76,7 @@ } } }) -

npm help

+

npm help

Get help on npm

Synopsis

npm help <term> [<terms..>]
@@ -109,4 +109,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-hook/index.html b/deps/npm/docs/public/cli-commands/npm-hook/index.html index ea6143a11a2b3f..99e8663248335e 100644 --- a/deps/npm/docs/public/cli-commands/npm-hook/index.html +++ b/deps/npm/docs/public/cli-commands/npm-hook/index.html @@ -76,7 +76,7 @@ } } }) -

npm hook

+

npm hook

Manage registry hooks

Synopsis

npm hook ls [pkg]
@@ -121,4 +121,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-init/index.html b/deps/npm/docs/public/cli-commands/npm-init/index.html index 0129a1a59c7b0e..21ea6ede13d0f6 100644 --- a/deps/npm/docs/public/cli-commands/npm-init/index.html +++ b/deps/npm/docs/public/cli-commands/npm-init/index.html @@ -76,7 +76,7 @@ } } }) -

npm init

+

npm init

create a package.json file

Synopsis

npm init [--force|-f|--yes|-y|--scope]
@@ -128,4 +128,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-install-ci-test/index.html b/deps/npm/docs/public/cli-commands/npm-install-ci-test/index.html index 0da8bbee0b31ef..0c1892e1d8c5be 100644 --- a/deps/npm/docs/public/cli-commands/npm-install-ci-test/index.html +++ b/deps/npm/docs/public/cli-commands/npm-install-ci-test/index.html @@ -76,7 +76,7 @@ } } }) -

npm install-ci-test

+

npm install-ci-test

Install a project with a clean slate and run tests

Synopsis

npm install-ci-test
@@ -95,4 +95,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-install-test/index.html b/deps/npm/docs/public/cli-commands/npm-install-test/index.html index 7fb28e3b1fa3ef..78a6a93e158359 100644 --- a/deps/npm/docs/public/cli-commands/npm-install-test/index.html +++ b/deps/npm/docs/public/cli-commands/npm-install-test/index.html @@ -76,7 +76,7 @@ } } }) -

npm install-test

+

npm install-test

Install package(s) and run tests

Synopsis

npm install-test (with no args, in package dir)
@@ -104,4 +104,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-install/index.html b/deps/npm/docs/public/cli-commands/npm-install/index.html index d5ae908c829cb7..226e794469c4f2 100644 --- a/deps/npm/docs/public/cli-commands/npm-install/index.html +++ b/deps/npm/docs/public/cli-commands/npm-install/index.html @@ -76,7 +76,7 @@ } } }) -

npm install

+

npm install

Install a package

Synopsis

npm install (with no args, in package dir)
@@ -470,4 +470,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-link/index.html b/deps/npm/docs/public/cli-commands/npm-link/index.html index ec9a2bb7eac61a..d850c87766ce23 100644 --- a/deps/npm/docs/public/cli-commands/npm-link/index.html +++ b/deps/npm/docs/public/cli-commands/npm-link/index.html @@ -76,7 +76,7 @@ } } }) -

npm link

+

npm link

Synopsis

npm link (in package dir)
@@ -136,4 +136,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-logout/index.html b/deps/npm/docs/public/cli-commands/npm-logout/index.html index d00e63b611f0c3..ba8508271b0f58 100644 --- a/deps/npm/docs/public/cli-commands/npm-logout/index.html +++ b/deps/npm/docs/public/cli-commands/npm-logout/index.html @@ -76,7 +76,7 @@ } } }) -

npm logout

+

npm logout

Log out of the registry

Synopsis

npm logout [--registry=<url>] [--scope=<@scope>]
@@ -111,4 +111,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-ls/index.html b/deps/npm/docs/public/cli-commands/npm-ls/index.html index f9a1328723fa3e..50055899b87846 100644 --- a/deps/npm/docs/public/cli-commands/npm-ls/index.html +++ b/deps/npm/docs/public/cli-commands/npm-ls/index.html @@ -76,7 +76,7 @@ } } }) -

npm ls

+
\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-org/index.html b/deps/npm/docs/public/cli-commands/npm-org/index.html index ed7d73b9d9933c..2ccb825a2421b6 100644 --- a/deps/npm/docs/public/cli-commands/npm-org/index.html +++ b/deps/npm/docs/public/cli-commands/npm-org/index.html @@ -76,7 +76,7 @@ } } }) -

npm org

+

npm org

Manage orgs

Synopsis

npm org set <orgname> <username> [developer | admin | owner]
@@ -109,4 +109,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-outdated/index.html b/deps/npm/docs/public/cli-commands/npm-outdated/index.html index 2fe406300f7d8a..4d2134b1204c11 100644 --- a/deps/npm/docs/public/cli-commands/npm-outdated/index.html +++ b/deps/npm/docs/public/cli-commands/npm-outdated/index.html @@ -76,7 +76,7 @@ } } }) -

npm outdated

+

npm outdated

Check for outdated packages

Synopsis

npm outdated [[<@scope>/]<pkg> ...]
@@ -179,4 +179,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-owner/index.html b/deps/npm/docs/public/cli-commands/npm-owner/index.html index c67e9f1b1e9dfb..f3d6f4b9319081 100644 --- a/deps/npm/docs/public/cli-commands/npm-owner/index.html +++ b/deps/npm/docs/public/cli-commands/npm-owner/index.html @@ -76,7 +76,7 @@ } } }) -

npm owner

+

npm owner

Manage package owners

Synopsis

npm owner add <user> [<@scope>/]<pkg>
@@ -116,4 +116,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-pack/index.html b/deps/npm/docs/public/cli-commands/npm-pack/index.html index e544c555843833..d49cfc73ef102f 100644 --- a/deps/npm/docs/public/cli-commands/npm-pack/index.html +++ b/deps/npm/docs/public/cli-commands/npm-pack/index.html @@ -76,7 +76,7 @@ } } }) -

npm pack

+

npm pack

Create a tarball from a package

Synopsis

npm pack [[<@scope>/]<pkg>...] [--dry-run]
@@ -104,4 +104,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-ping/index.html b/deps/npm/docs/public/cli-commands/npm-ping/index.html index 681ded9d469f24..c0b848871a8b85 100644 --- a/deps/npm/docs/public/cli-commands/npm-ping/index.html +++ b/deps/npm/docs/public/cli-commands/npm-ping/index.html @@ -76,7 +76,7 @@ } } }) -

npm ping

+

npm ping

Ping npm registry

Synopsis

npm ping [--registry <registry>]
@@ -97,4 +97,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-prefix/index.html b/deps/npm/docs/public/cli-commands/npm-prefix/index.html index 467e4fdee7741c..6764a6b62238ad 100644 --- a/deps/npm/docs/public/cli-commands/npm-prefix/index.html +++ b/deps/npm/docs/public/cli-commands/npm-prefix/index.html @@ -76,7 +76,7 @@ } } }) -

npm prefix

+

npm prefix

Display prefix

Synopsis

npm prefix [-g]
@@ -100,4 +100,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-profile/index.html b/deps/npm/docs/public/cli-commands/npm-profile/index.html index 93d3ae4c188f6e..466473ca2af0c5 100644 --- a/deps/npm/docs/public/cli-commands/npm-profile/index.html +++ b/deps/npm/docs/public/cli-commands/npm-profile/index.html @@ -76,7 +76,7 @@ } } }) -

npm profile

+

npm profile

Change settings on your registry profile

Synopsis

npm profile get [--json|--parseable] [<property>]
@@ -150,4 +150,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-prune/index.html b/deps/npm/docs/public/cli-commands/npm-prune/index.html index 7d25f1ffe1ab2e..52a0629df1140a 100644 --- a/deps/npm/docs/public/cli-commands/npm-prune/index.html +++ b/deps/npm/docs/public/cli-commands/npm-prune/index.html @@ -76,7 +76,7 @@ } } }) -

npm prune

+

npm prune

Remove extraneous packages

Synopsis

npm prune [[<@scope>/]<pkg>...] [--production] [--dry-run] [--json]
@@ -110,4 +110,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-publish/index.html b/deps/npm/docs/public/cli-commands/npm-publish/index.html index 6664c16b935347..5717934c24bba3 100644 --- a/deps/npm/docs/public/cli-commands/npm-publish/index.html +++ b/deps/npm/docs/public/cli-commands/npm-publish/index.html @@ -76,7 +76,7 @@ } } }) -

npm publish

+

npm publish

Publish a package

Synopsis

npm publish [<tarball>|<folder>] [--tag <tag>] [--access <public|restricted>] [--otp otpcode] [--dry-run]
@@ -142,4 +142,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-rebuild/index.html b/deps/npm/docs/public/cli-commands/npm-rebuild/index.html index 55cccd20377d4d..fae521d64741d2 100644 --- a/deps/npm/docs/public/cli-commands/npm-rebuild/index.html +++ b/deps/npm/docs/public/cli-commands/npm-rebuild/index.html @@ -76,7 +76,7 @@ } } }) -

npm rebuild

+

npm rebuild

Rebuild a package

Synopsis

npm rebuild [[<@scope>/<name>]...]
@@ -95,4 +95,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-repo/index.html b/deps/npm/docs/public/cli-commands/npm-repo/index.html index b6130f67b07ec8..750941fa716ec3 100644 --- a/deps/npm/docs/public/cli-commands/npm-repo/index.html +++ b/deps/npm/docs/public/cli-commands/npm-repo/index.html @@ -76,7 +76,7 @@ } } }) -

npm repo

+

npm repo

Open package repository page in the browser

Synopsis

npm repo [<pkgname> [<pkgname> ...]]
@@ -106,4 +106,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-restart/index.html b/deps/npm/docs/public/cli-commands/npm-restart/index.html index 331c49129cc873..a66e3943e70e9e 100644 --- a/deps/npm/docs/public/cli-commands/npm-restart/index.html +++ b/deps/npm/docs/public/cli-commands/npm-restart/index.html @@ -76,7 +76,7 @@ } } }) -

npm restart

+

npm restart

Restart a package

Synopsis

npm restart [-- <args>]
@@ -115,4 +115,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-root/index.html b/deps/npm/docs/public/cli-commands/npm-root/index.html index 85b3ed6fa71979..15870a41f86e5d 100644 --- a/deps/npm/docs/public/cli-commands/npm-root/index.html +++ b/deps/npm/docs/public/cli-commands/npm-root/index.html @@ -76,7 +76,7 @@ } } }) -

npm root

+

npm root

Display npm root

Synopsis

npm root [-g]
@@ -96,4 +96,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-run-script/index.html b/deps/npm/docs/public/cli-commands/npm-run-script/index.html index 408493ed8b5ba7..95d470ffc4ec1f 100644 --- a/deps/npm/docs/public/cli-commands/npm-run-script/index.html +++ b/deps/npm/docs/public/cli-commands/npm-run-script/index.html @@ -76,7 +76,7 @@ } } }) -

npm run-script

+

npm run-script

Run arbitrary package scripts

Synopsis

npm run-script <command> [--silent] [-- <args>...]
@@ -145,4 +145,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-search/index.html b/deps/npm/docs/public/cli-commands/npm-search/index.html index 9d230fc37cc410..daa59da2feffda 100644 --- a/deps/npm/docs/public/cli-commands/npm-search/index.html +++ b/deps/npm/docs/public/cli-commands/npm-search/index.html @@ -76,7 +76,7 @@ } } }) -

npm search

+

npm search

Search for packages

Synopsis

npm search [-l|--long] [--json] [--parseable] [--no-description] [search terms ...]
@@ -170,4 +170,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-shrinkwrap/index.html b/deps/npm/docs/public/cli-commands/npm-shrinkwrap/index.html index b8c663503ae823..651fa00fcccafc 100644 --- a/deps/npm/docs/public/cli-commands/npm-shrinkwrap/index.html +++ b/deps/npm/docs/public/cli-commands/npm-shrinkwrap/index.html @@ -76,7 +76,7 @@ } } }) -

npm shrinkwrap

+

npm shrinkwrap

Lock down dependency versions for publication

Synopsis

npm shrinkwrap
@@ -103,4 +103,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-star/index.html b/deps/npm/docs/public/cli-commands/npm-star/index.html index daf59cd3eb2f84..4e812c54fd97ca 100644 --- a/deps/npm/docs/public/cli-commands/npm-star/index.html +++ b/deps/npm/docs/public/cli-commands/npm-star/index.html @@ -76,7 +76,7 @@ } } }) -

npm star

+

npm star

Mark your favorite packages

Synopsis

npm star [<pkg>...]
@@ -98,4 +98,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-stars/index.html b/deps/npm/docs/public/cli-commands/npm-stars/index.html index 60849a81b1d1ac..04053e311a4945 100644 --- a/deps/npm/docs/public/cli-commands/npm-stars/index.html +++ b/deps/npm/docs/public/cli-commands/npm-stars/index.html @@ -76,7 +76,7 @@ } } }) -

npm stars

+

npm stars

View packages marked as favorites

Synopsis

npm stars [<user>]
@@ -98,4 +98,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-start/index.html b/deps/npm/docs/public/cli-commands/npm-start/index.html index 0978d84f5b55f9..96ee00ee3d8276 100644 --- a/deps/npm/docs/public/cli-commands/npm-start/index.html +++ b/deps/npm/docs/public/cli-commands/npm-start/index.html @@ -76,7 +76,7 @@ } } }) -

npm start

+

npm start

Start a package

Synopsis

npm start [-- <args>]
@@ -100,4 +100,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-stop/index.html b/deps/npm/docs/public/cli-commands/npm-stop/index.html index e13dcb2269254a..b272aea10cbaaa 100644 --- a/deps/npm/docs/public/cli-commands/npm-stop/index.html +++ b/deps/npm/docs/public/cli-commands/npm-stop/index.html @@ -76,7 +76,7 @@ } } }) -

npm stop

+

npm stop

Stop a package

Synopsis

npm stop [-- <args>]
@@ -96,4 +96,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-team/index.html b/deps/npm/docs/public/cli-commands/npm-team/index.html index 07d4f028d2dfd3..72bc6a42ea0bd9 100644 --- a/deps/npm/docs/public/cli-commands/npm-team/index.html +++ b/deps/npm/docs/public/cli-commands/npm-team/index.html @@ -76,7 +76,7 @@ } } }) -

npm team

+

npm team

Manage organization teams and team memberships

Synopsis

npm team create <scope:team>
@@ -127,4 +127,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-test/index.html b/deps/npm/docs/public/cli-commands/npm-test/index.html index d5a4db4d9aca73..02b29dedab445d 100644 --- a/deps/npm/docs/public/cli-commands/npm-test/index.html +++ b/deps/npm/docs/public/cli-commands/npm-test/index.html @@ -76,7 +76,7 @@ } } }) -

npm test

+

npm test

Test a package

Synopsis

npm test [-- <args>]
@@ -98,4 +98,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-token/index.html b/deps/npm/docs/public/cli-commands/npm-token/index.html index cb279933df0ff3..ef225d61632bfd 100644 --- a/deps/npm/docs/public/cli-commands/npm-token/index.html +++ b/deps/npm/docs/public/cli-commands/npm-token/index.html @@ -76,7 +76,7 @@ } } }) -

npm token

+

npm token

Manage your authentication tokens

Synopsis

  npm token list [--json|--parseable]
@@ -135,4 +135,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-uninstall/index.html b/deps/npm/docs/public/cli-commands/npm-uninstall/index.html index 025c128e4f8cb8..1a7c37da1ca308 100644 --- a/deps/npm/docs/public/cli-commands/npm-uninstall/index.html +++ b/deps/npm/docs/public/cli-commands/npm-uninstall/index.html @@ -76,7 +76,7 @@ } } }) -

npm uninstall

+

npm uninstall

Remove a package

Synopsis

npm uninstall [<@scope>/]<pkg>[@<version>]... [-S|--save|-D|--save-dev|-O|--save-optional|--no-save]
@@ -120,4 +120,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-unpublish/index.html b/deps/npm/docs/public/cli-commands/npm-unpublish/index.html index a17bccf2b85eef..0cd093012b8296 100644 --- a/deps/npm/docs/public/cli-commands/npm-unpublish/index.html +++ b/deps/npm/docs/public/cli-commands/npm-unpublish/index.html @@ -76,7 +76,7 @@ } } }) -

npm unpublish

+

npm unpublish

Remove a package from the registry

Synopsis

Unpublishing a single version of a package

@@ -108,4 +108,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-update/index.html b/deps/npm/docs/public/cli-commands/npm-update/index.html index d4666b9a2d9546..fbe288f5c2aee7 100644 --- a/deps/npm/docs/public/cli-commands/npm-update/index.html +++ b/deps/npm/docs/public/cli-commands/npm-update/index.html @@ -76,7 +76,7 @@ } } }) -

npm update

+

npm update

Update a package

Synopsis

npm update [-g] [<pkg>...]
@@ -169,4 +169,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-version/index.html b/deps/npm/docs/public/cli-commands/npm-version/index.html index 8c9f794d4c152f..bd11770b1620f0 100644 --- a/deps/npm/docs/public/cli-commands/npm-version/index.html +++ b/deps/npm/docs/public/cli-commands/npm-version/index.html @@ -76,7 +76,7 @@ } } }) -

npm version

+

npm version

Bump a package version

Synopsis

npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease [--preid=<prerelease-id>] | from-git]
@@ -182,4 +182,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-view/index.html b/deps/npm/docs/public/cli-commands/npm-view/index.html index a7f27c570c2389..8900442dddfa44 100644 --- a/deps/npm/docs/public/cli-commands/npm-view/index.html +++ b/deps/npm/docs/public/cli-commands/npm-view/index.html @@ -76,7 +76,7 @@ } } }) -

npm view

+

npm view

View registry info

Synopsis

npm view [<@scope>/]<name>[@<version>] [<field>[.<subfield>]...]
@@ -147,4 +147,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-whoami/index.html b/deps/npm/docs/public/cli-commands/npm-whoami/index.html index 96893a2a8ab9d1..dd050f23dfe21a 100644 --- a/deps/npm/docs/public/cli-commands/npm-whoami/index.html +++ b/deps/npm/docs/public/cli-commands/npm-whoami/index.html @@ -76,7 +76,7 @@ } } }) -

npm whoami

+

npm whoami

Display npm username

Synopsis

npm whoami [--registry <registry>]
@@ -94,4 +94,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm/index.html b/deps/npm/docs/public/cli-commands/npm/index.html index 4453cf1cc226c5..1d3dc15885f48a 100644 --- a/deps/npm/docs/public/cli-commands/npm/index.html +++ b/deps/npm/docs/public/cli-commands/npm/index.html @@ -76,12 +76,12 @@ } } }) -

npm

+

npm

javascript package manager

Synopsis

npm <command> [args]

Version

-

7.0.0-rc.3

+

7.0.0-rc.4

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 @@ -213,4 +213,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npx/index.html b/deps/npm/docs/public/cli-commands/npx/index.html index f610d85df50a98..0107f5c1a2d593 100644 --- a/deps/npm/docs/public/cli-commands/npx/index.html +++ b/deps/npm/docs/public/cli-commands/npx/index.html @@ -76,7 +76,7 @@ } } }) -

npx

+

npx

Run a command from a local or remote npm package

Synopsis

npm exec -- <pkg>[@<version>] [args...]
@@ -206,4 +206,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/folders/index.html b/deps/npm/docs/public/configuring-npm/folders/index.html index 17d12c1176612e..af5d4e1381be91 100644 --- a/deps/npm/docs/public/configuring-npm/folders/index.html +++ b/deps/npm/docs/public/configuring-npm/folders/index.html @@ -76,7 +76,7 @@ } } }) -

folders

+

folders

Folder Structures Used by npm

Description

npm puts various things on your computer. That's its job.

@@ -242,4 +242,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/install/index.html b/deps/npm/docs/public/configuring-npm/install/index.html index c5afab29fae3b8..7dc24cc83fcbf0 100644 --- a/deps/npm/docs/public/configuring-npm/install/index.html +++ b/deps/npm/docs/public/configuring-npm/install/index.html @@ -76,7 +76,7 @@ } } }) -

install

+

install

Download and Install npm

Description

To publish and install packages to and from the public npm registry, you must install Node.js and the npm command line interface using either a Node version manager or a Node installer. We strongly recommend using a Node version manager to install Node.js and npm. We do not recommend using a Node installer, since the Node installation process installs npm in a directory with local permissions and can cause permissions errors when you run npm packages globally.

@@ -125,4 +125,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/npmrc/index.html b/deps/npm/docs/public/configuring-npm/npmrc/index.html index ac019336f8b1de..028ae09e471c62 100644 --- a/deps/npm/docs/public/configuring-npm/npmrc/index.html +++ b/deps/npm/docs/public/configuring-npm/npmrc/index.html @@ -76,7 +76,7 @@ } } }) -

npmrc

+

npmrc

The npm config files

Description

npm gets its config settings from the command line, environment @@ -147,4 +147,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/package-json/index.html b/deps/npm/docs/public/configuring-npm/package-json/index.html index f00ef555315e97..b90ccc1627c1a0 100644 --- a/deps/npm/docs/public/configuring-npm/package-json/index.html +++ b/deps/npm/docs/public/configuring-npm/package-json/index.html @@ -76,7 +76,7 @@ } } }) -

package.json

+

package.json

Specifics of npm's package.json handling

Description

This document is all you need to know about what's required in your package.json @@ -715,4 +715,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/package-lock-json/index.html b/deps/npm/docs/public/configuring-npm/package-lock-json/index.html index a2d811c4b86eaf..a5768638f137d5 100644 --- a/deps/npm/docs/public/configuring-npm/package-lock-json/index.html +++ b/deps/npm/docs/public/configuring-npm/package-lock-json/index.html @@ -76,7 +76,7 @@ } } }) -

package-lock.json

+

package-lock.json

A manifestation of the manifest

Description

package-lock.json is automatically generated for any operations where npm @@ -188,4 +188,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/package-locks/index.html b/deps/npm/docs/public/configuring-npm/package-locks/index.html index 002fd3850c8755..5a95fd23e5724e 100644 --- a/deps/npm/docs/public/configuring-npm/package-locks/index.html +++ b/deps/npm/docs/public/configuring-npm/package-locks/index.html @@ -76,7 +76,7 @@ } } }) -

package-locks

+

package-locks

An explanation of npm lockfiles

Description

Conceptually, the "input" to npm install is a package.json, while its @@ -216,4 +216,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/shrinkwrap-json/index.html b/deps/npm/docs/public/configuring-npm/shrinkwrap-json/index.html index 41cdad4b01ab8f..0ec658b89cba58 100644 --- a/deps/npm/docs/public/configuring-npm/shrinkwrap-json/index.html +++ b/deps/npm/docs/public/configuring-npm/shrinkwrap-json/index.html @@ -76,7 +76,7 @@ } } }) -

npm shrinkwrap.json

+

npm shrinkwrap.json

A publishable lockfile

Description

npm-shrinkwrap.json is a file created by npm shrinkwrap. It is identical to @@ -104,4 +104,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/index.html b/deps/npm/docs/public/index.html index 53b1897f6b573a..d0977400f81a0a 100644 --- a/deps/npm/docs/public/index.html +++ b/deps/npm/docs/public/index.html @@ -130,4 +130,4 @@ } } }) -
npm cli _
The intelligent package manager for the Node Javascript Platform. Install stuff and get coding!
npm cli _
The intelligent package manager for the Node Javascript Platform. Install stuff and get coding!
npm cli _
The intelligent package manager for the Node Javascript Platform. Install stuff and get coding!

The current stable version of npm is available on GitHub.

To upgrade, run: npm install npm@latest -g

\ No newline at end of file +
npm cli _
The intelligent package manager for the Node Javascript Platform. Install stuff and get coding!
npm cli _
The intelligent package manager for the Node Javascript Platform. Install stuff and get coding!
npm cli _
The intelligent package manager for the Node Javascript Platform. Install stuff and get coding!

The current stable version of npm is available on GitHub.

To upgrade, run: npm install npm@latest -g

\ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/config/index.html b/deps/npm/docs/public/using-npm/config/index.html index 32bc99414b467e..53e0de69ee02ae 100644 --- a/deps/npm/docs/public/using-npm/config/index.html +++ b/deps/npm/docs/public/using-npm/config/index.html @@ -76,7 +76,7 @@ } } }) -

config

+

config

More than you probably want to know about npm configuration

Description

npm gets its configuration values from the following sources, sorted by priority:

@@ -1198,4 +1198,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/developers/index.html b/deps/npm/docs/public/using-npm/developers/index.html index 1fe7ca647aa62b..fc89a39df0d4e8 100644 --- a/deps/npm/docs/public/using-npm/developers/index.html +++ b/deps/npm/docs/public/using-npm/developers/index.html @@ -76,7 +76,7 @@ } } }) -

developers

+

developers

Developer Guide

Description

So, you've decided to use npm to develop (and maybe publish/deploy) @@ -261,4 +261,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/disputes/index.html b/deps/npm/docs/public/using-npm/disputes/index.html index c906b9bf51cea6..3c43f4de296908 100644 --- a/deps/npm/docs/public/using-npm/disputes/index.html +++ b/deps/npm/docs/public/using-npm/disputes/index.html @@ -76,7 +76,7 @@ } } }) -

disputes

+

disputes

Handling Module Name Disputes

This document describes the steps that you should take to resolve module name disputes with other npm publishers. It also describes special steps you should @@ -194,4 +194,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/orgs/index.html b/deps/npm/docs/public/using-npm/orgs/index.html index 0e5ae8a39b261a..f7558a67f6d480 100644 --- a/deps/npm/docs/public/using-npm/orgs/index.html +++ b/deps/npm/docs/public/using-npm/orgs/index.html @@ -76,7 +76,7 @@ } } }) -

orgs

+

orgs

Working with Teams & Orgs

Description

There are three levels of org users:

@@ -146,4 +146,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/registry/index.html b/deps/npm/docs/public/using-npm/registry/index.html index 3bbf20373afabc..e00d236bf7b30b 100644 --- a/deps/npm/docs/public/using-npm/registry/index.html +++ b/deps/npm/docs/public/using-npm/registry/index.html @@ -76,7 +76,7 @@ } } }) -

registry

+

registry

The JavaScript Package Registry

Description

To resolve packages by name and version, npm talks to a registry website @@ -158,4 +158,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/removal/index.html b/deps/npm/docs/public/using-npm/removal/index.html index e1e6ae7a8dd1c4..03ff7ad3ee4f9b 100644 --- a/deps/npm/docs/public/using-npm/removal/index.html +++ b/deps/npm/docs/public/using-npm/removal/index.html @@ -76,7 +76,7 @@ } } }) -

removal

+

removal

Cleaning the Slate

Synopsis

So sad to see you go.

@@ -118,4 +118,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/scope/index.html b/deps/npm/docs/public/using-npm/scope/index.html index f2a5b722ba6189..3a6ea82edce615 100644 --- a/deps/npm/docs/public/using-npm/scope/index.html +++ b/deps/npm/docs/public/using-npm/scope/index.html @@ -76,7 +76,7 @@ } } }) -

scope

+

scope

Scoped packages

Description

All npm packages have a name. Some package names also have a scope. A scope @@ -161,4 +161,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/scripts/index.html b/deps/npm/docs/public/using-npm/scripts/index.html index 9dd33d399a157d..190bef26dd9c61 100644 --- a/deps/npm/docs/public/using-npm/scripts/index.html +++ b/deps/npm/docs/public/using-npm/scripts/index.html @@ -76,7 +76,7 @@ } } }) -

scripts

+

scripts

How npm handles the "scripts" field

Description

The "scripts" property of of your package.json file supports a number of built-in scripts and their preset life cycle events as well as arbitrary scripts. These all can be executed by running npm run-script <stage> or npm run <stage> for short. Pre and post commands with matching names will be run for those as well (e.g. premyscript, myscript, postmyscript). Scripts from dependencies can be run with npm explore <pkg> -- npm run <stage>.

@@ -325,4 +325,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/semver/index.html b/deps/npm/docs/public/using-npm/semver/index.html index a48fc1eca25f78..05db202794b54e 100644 --- a/deps/npm/docs/public/using-npm/semver/index.html +++ b/deps/npm/docs/public/using-npm/semver/index.html @@ -76,7 +76,7 @@ } } }) -

semver(7) -- The semantic versioner for npm

+

semver(7) -- The semantic versioner for npm

Install

npm install --save semver

Usage

@@ -437,4 +437,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/lib/completion.js b/deps/npm/lib/completion.js index 3fcf00ec66260a..11c791d8f71d7e 100644 --- a/deps/npm/lib/completion.js +++ b/deps/npm/lib/completion.js @@ -43,6 +43,7 @@ const shorthandNames = Object.keys(shorthands) const allConfs = configNames.concat(shorthandNames) const isWindowsShell = require('./utils/is-windows-shell.js') const output = require('./utils/output.js') +const fileExists = require('./utils/file-exists.js') const usageUtil = require('./utils/usage.js') const usage = usageUtil('completion', 'source <(npm completion)') @@ -56,13 +57,10 @@ const completion = async (opts, cb) => { return cb() } - const fs = require('fs') - const stat = promisify(fs.stat) - const exists = f => stat(f).then(() => true).catch(() => false) const { resolve } = require('path') const [bashExists, zshExists] = await Promise.all([ - exists(resolve(process.env.HOME, '.bashrc')), - exists(resolve(process.env.HOME, '.zshrc')) + fileExists(resolve(process.env.HOME, '.bashrc')), + fileExists(resolve(process.env.HOME, '.zshrc')) ]) const out = [] if (zshExists) { diff --git a/deps/npm/lib/exec.js b/deps/npm/lib/exec.js index 793abb75a0d01b..01336696b5ab0a 100644 --- a/deps/npm/lib/exec.js +++ b/deps/npm/lib/exec.js @@ -59,6 +59,8 @@ const crypto = require('crypto') const pacote = require('pacote') const npa = require('npm-package-arg') const escapeArg = require('./utils/escape-arg.js') +const fileExists = require('./utils/file-exists.js') +const PATH = require('./utils/path.js') const cmd = (args, cb) => exec(args).then(() => cb()).catch(cb) @@ -69,8 +71,38 @@ const exec = async args => { throw usage } + const pathArr = [...PATH] + const needPackageCommandSwap = args.length && !packages.length + // if there's an argument and no package has been explicitly asked for + // check the local and global bin paths for a binary named the same as + // the argument and run it if it exists, otherwise fall through to + // the behavior of treating the single argument as a package name if (needPackageCommandSwap) { + let binExists = false + if (await fileExists(`${npm.localBin}/${args[0]}`)) { + pathArr.unshift(npm.localBin) + binExists = true + } else if (await fileExists(`${npm.globalBin}/${args[0]}`)) { + pathArr.unshift(npm.globalBin) + binExists = true + } + + if (binExists) { + return await runScript({ + cmd: [args[0], ...args.slice(1).map(escapeArg)].join(' ').trim(), + banner: false, + // we always run in cwd, not --prefix + path: process.cwd(), + stdioString: true, + event: 'npx', + env: { + PATH: pathArr.join(delimiter) + }, + stdio: 'inherit' + }) + } + packages.push(args[0]) } @@ -111,7 +143,6 @@ const exec = async args => { // do we have all the packages in manifest list? const needInstall = manis.some(mani => manifestMissing(tree, mani)) - const pathArr = [process.env.PATH] if (needInstall) { const installDir = cacheInstallDir(packages) await mkdirp(installDir) @@ -126,19 +157,25 @@ const exec = async args => { // no need to install if already present if (add.length) { + const isTTY = process.stdin.isTTY && process.stdout.isTTY if (!npm.flatOptions.yes) { // set -n to always say no if (npm.flatOptions.yes === false) { throw 'canceled' } - const addList = add.map(a => ` ${a.replace(/@$/, '')}`) - .join('\n') + '\n' - const prompt = `Need to install the following packages:\n${ - addList - }Ok to proceed? ` - const confirm = await read({ prompt, default: 'y' }) - if (confirm.trim().toLowerCase().charAt(0) !== 'y') { - throw 'canceled' + + if (!isTTY) { + npm.log.warn('exec', `The following package${add.length === 1 ? ' was' : 's were'} not found and will be installed: ${add.map((pkg) => pkg.replace(/@$/, '')).join(', ')}`) + } else { + const addList = add.map(a => ` ${a.replace(/@$/, '')}`) + .join('\n') + '\n' + const prompt = `Need to install the following packages:\n${ + addList + }Ok to proceed? ` + const confirm = await read({ prompt, default: 'y' }) + if (confirm.trim().toLowerCase().charAt(0) !== 'y') { + throw 'canceled' + } } } await arb.reify({ ...npm.flatOptions, add }) diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js index 79d2767229806a..d460ea674705e6 100644 --- a/deps/npm/lib/npm.js +++ b/deps/npm/lib/npm.js @@ -164,8 +164,6 @@ const npm = module.exports = new class extends EventEmitter { await this.config.load() this.argv = this.config.parsedArgv.remain - setUserAgent(this.config) - this.color = setupLog(this.config, this) process.env.COLOR = this.color ? '1' : '0' @@ -279,7 +277,6 @@ const startMetrics = require('./utils/metrics.js').start const which = promisify(require('which')) -const setUserAgent = require('./utils/set-user-agent.js') const deref = require('./utils/deref-command.js') const setupLog = require('./utils/setup-log.js') const cleanUpLogFiles = require('./utils/cleanup-log-files.js') diff --git a/deps/npm/lib/utils/config.js b/deps/npm/lib/utils/config.js index 5fe14a722bb934..e505810da56f73 100644 --- a/deps/npm/lib/utils/config.js +++ b/deps/npm/lib/utils/config.js @@ -9,7 +9,10 @@ const { } } = require('@npmcli/config') +const { version: npmVersion } = require('../../package.json') + const ciDetect = require('@npmcli/ci-detect') +const ciName = ciDetect() const isWindows = require('./is-windows.js') @@ -45,74 +48,64 @@ const defaults = { access: null, all: false, 'allow-same-version': false, - 'always-auth': false, also: null, + 'always-auth': false, audit: true, 'audit-level': null, 'auth-type': 'legacy', - before: null, 'bin-links': true, browser: null, - ca: null, - cafile: null, - cache, - - 'cache-lock-stale': 60000, 'cache-lock-retries': 10, + 'cache-lock-stale': 60000, 'cache-lock-wait': 10000, - 'cache-max': Infinity, 'cache-min': 10, - + cafile: null, + call: '', cert: null, - + 'ci-name': ciName || null, cidr: null, - color: process.env.NO_COLOR == null, - call: '', + 'commit-hooks': true, depth: null, description: true, dev: false, 'dry-run': false, editor, 'engine-strict': false, - force: false, - 'format-package-lock': true, - - fund: true, - 'fetch-retries': 2, 'fetch-retry-factor': 10, - 'fetch-retry-mintimeout': 10000, 'fetch-retry-maxtimeout': 60000, + 'fetch-retry-mintimeout': 10000, 'fetch-timeout': 5 * 60 * 1000, - + force: false, + 'format-package-lock': true, + fund: true, git: 'git', 'git-tag-version': true, - 'commit-hooks': true, - global: false, 'global-style': false, + // `globalconfig` has its default defined outside of this module heading: 'npm', + 'https-proxy': null, 'if-present': false, - include: [], - 'include-staged': false, 'ignore-prepublish': false, 'ignore-scripts': false, - 'init-module': '~/.npm-init.js', - 'init-author-name': '', + include: [], + 'include-staged': false, 'init-author-email': '', + 'init-author-name': '', 'init-author-url': '', - 'init-version': '1.0.0', 'init-license': 'ISC', + 'init-module': '~/.npm-init.js', + 'init-version': '1.0.0', json: false, key: null, 'legacy-bundling': false, 'legacy-peer-deps': false, - 'strict-peer-deps': false, link: false, 'local-address': undefined, loglevel: 'notice', @@ -123,6 +116,8 @@ const defaults = { 'metrics-registry': null, 'node-options': null, 'node-version': process.version, + noproxy: null, + 'npm-version': npmVersion, offline: false, omit: [], only: null, @@ -134,17 +129,11 @@ const defaults = { parseable: false, 'prefer-offline': false, 'prefer-online': false, + // `prefix` has its default defined outside of this module preid: '', production: process.env.NODE_ENV === 'production', - progress: !ciDetect(), + progress: !ciName, proxy: null, - 'https-proxy': null, - noproxy: null, - 'user-agent': 'npm/{npm-version} ' + - 'node/{node-version} ' + - '{platform} ' + - '{arch} ' + - '{ci}', 'read-only': false, 'rebuild-bundle': true, registry: 'https://registry.npmjs.org/', @@ -159,9 +148,9 @@ const defaults = { scope: '', 'script-shell': null, 'scripts-prepend-node-path': 'warn-only', - searchopts: '', searchexclude: null, searchlimit: 20, + searchopts: '', searchstaleness: 15 * 60, 'send-metrics': false, shell, @@ -170,16 +159,22 @@ const defaults = { 'sign-git-tag': false, 'sso-poll-frequency': 500, 'sso-type': 'oauth', + 'strict-peer-deps': false, 'strict-ssl': true, tag: 'latest', 'tag-version-prefix': 'v', timing: false, tmp: tmpdir(), + umask: process.umask ? process.umask() : 0o22, unicode, 'update-notifier': true, usage: false, + 'user-agent': 'npm/{npm-version} ' + + 'node/{node-version} ' + + '{platform} ' + + '{arch} ' + + '{ci}', userconfig: '~/.npmrc', - umask: process.umask ? process.umask() : 0o22, version: false, versions: false, viewer: isWindows ? 'browser' : 'man' @@ -189,8 +184,8 @@ const types = { access: [null, 'restricted', 'public'], all: Boolean, 'allow-same-version': Boolean, - 'always-auth': Boolean, also: [null, 'dev', 'development'], + 'always-auth': Boolean, audit: Boolean, 'audit-level': ['low', 'moderate', 'high', 'critical', 'none', null], 'auth-type': ['legacy', 'sso', 'saml', 'oauth'], @@ -198,57 +193,55 @@ const types = { 'bin-links': Boolean, browser: [null, Boolean, String], ca: [null, String, Array], - cafile: path, cache: path, - 'cache-lock-stale': Number, 'cache-lock-retries': Number, + 'cache-lock-stale': Number, 'cache-lock-wait': Number, 'cache-max': Number, 'cache-min': Number, + cafile: path, + call: String, cert: [null, String], + 'ci-name': [null, String], cidr: [null, String, Array], color: ['always', Boolean], - call: String, + 'commit-hooks': Boolean, depth: [null, Number], description: Boolean, dev: Boolean, 'dry-run': Boolean, editor: String, 'engine-strict': Boolean, - force: Boolean, - fund: Boolean, - 'format-package-lock': Boolean, 'fetch-retries': Number, 'fetch-retry-factor': Number, - 'fetch-retry-mintimeout': Number, 'fetch-retry-maxtimeout': Number, + 'fetch-retry-mintimeout': Number, 'fetch-timeout': Number, + force: Boolean, + 'format-package-lock': Boolean, + fund: Boolean, git: String, 'git-tag-version': Boolean, - 'commit-hooks': Boolean, global: Boolean, - globalconfig: path, 'global-style': Boolean, - group: [Number, String], - 'https-proxy': [null, url], - 'user-agent': String, + globalconfig: path, heading: String, + 'https-proxy': [null, url], 'if-present': Boolean, - include: [Array, 'prod', 'dev', 'optional', 'peer'], - 'include-staged': Boolean, 'ignore-prepublish': Boolean, 'ignore-scripts': Boolean, - 'init-module': path, - 'init-author-name': String, + include: [Array, 'prod', 'dev', 'optional', 'peer'], + 'include-staged': Boolean, 'init-author-email': String, + 'init-author-name': String, 'init-author-url': ['', url], 'init-license': String, + 'init-module': path, 'init-version': semver, json: Boolean, key: [null, String], 'legacy-bundling': Boolean, 'legacy-peer-deps': Boolean, - 'strict-peer-deps': Boolean, link: Boolean, 'local-address': getLocalAddresses(), loglevel: [ @@ -270,6 +263,7 @@ const types = { 'node-options': [null, String], 'node-version': [null, semver], noproxy: [null, String, Array], + 'npm-version': semver, offline: Boolean, omit: [Array, 'dev', 'optional', 'peer'], only: [null, 'dev', 'development', 'prod', 'production'], @@ -300,9 +294,9 @@ const types = { scope: String, 'script-shell': [null, String], 'scripts-prepend-node-path': [Boolean, 'auto', 'warn-only'], - searchopts: String, searchexclude: [null, String], searchlimit: Number, + searchopts: String, searchstaleness: Number, 'send-metrics': Boolean, shell: String, @@ -311,61 +305,62 @@ const types = { 'sign-git-tag': Boolean, 'sso-poll-frequency': Number, 'sso-type': [null, 'oauth', 'saml'], + 'strict-peer-deps': Boolean, 'strict-ssl': Boolean, tag: String, + 'tag-version-prefix': String, timing: Boolean, tmp: path, + umask: Umask, unicode: Boolean, 'update-notifier': Boolean, usage: Boolean, + 'user-agent': String, userconfig: path, - umask: Umask, version: Boolean, - 'tag-version-prefix': String, versions: Boolean, viewer: String } const shorthands = { + '?': ['--usage'], a: ['--all'], - 'enjoy-by': ['--before'], + B: ['--save-bundle'], + C: ['--prefix'], c: ['--call'], - s: ['--loglevel', 'silent'], + D: ['--save-dev'], d: ['--loglevel', 'info'], dd: ['--loglevel', 'verbose'], ddd: ['--loglevel', 'silly'], - noreg: ['--no-registry'], - N: ['--no-registry'], - reg: ['--registry'], - 'no-reg': ['--no-registry'], - silent: ['--loglevel', 'silent'], - verbose: ['--loglevel', 'verbose'], - quiet: ['--loglevel', 'warn'], - q: ['--loglevel', 'warn'], - h: ['--usage'], + desc: ['--description'], + E: ['--save-exact'], + 'enjoy-by': ['--before'], + f: ['--force'], + g: ['--global'], H: ['--usage'], - '?': ['--usage'], + h: ['--usage'], help: ['--usage'], - v: ['--version'], - f: ['--force'], - desc: ['--description'], - 'no-desc': ['--no-description'], - local: ['--no-global'], l: ['--long'], + local: ['--no-global'], m: ['--message'], + n: ['--no-yes'], + 'no-desc': ['--no-description'], + 'no-reg': ['--no-registry'], + noreg: ['--no-registry'], + O: ['--save-optional'], + P: ['--save-prod'], p: ['--parseable'], porcelain: ['--parseable'], + q: ['--loglevel', 'warn'], + quiet: ['--loglevel', 'warn'], readonly: ['--read-only'], - g: ['--global'], + reg: ['--registry'], S: ['--save'], - D: ['--save-dev'], - E: ['--save-exact'], - O: ['--save-optional'], - P: ['--save-prod'], - y: ['--yes'], - n: ['--no-yes'], - B: ['--save-bundle'], - C: ['--prefix'] + s: ['--loglevel', 'silent'], + silent: ['--loglevel', 'silent'], + v: ['--version'], + verbose: ['--loglevel', 'verbose'], + y: ['--yes'] } module.exports = { defaults, types, shorthands } diff --git a/deps/npm/lib/utils/file-exists.js b/deps/npm/lib/utils/file-exists.js new file mode 100644 index 00000000000000..3149c0ae52fd8d --- /dev/null +++ b/deps/npm/lib/utils/file-exists.js @@ -0,0 +1,8 @@ +const fs = require('fs') +const util = require('util') + +const stat = util.promisify(fs.stat) + +const fileExists = (file) => stat(file).then((stat) => stat.isFile()).catch(() => false) + +module.exports = fileExists diff --git a/deps/npm/lib/utils/set-user-agent.js b/deps/npm/lib/utils/set-user-agent.js deleted file mode 100644 index 8c90911162ceef..00000000000000 --- a/deps/npm/lib/utils/set-user-agent.js +++ /dev/null @@ -1,15 +0,0 @@ -// Expand placeholder values in user-agent -const ciDetect = require('@npmcli/ci-detect') -const { version } = require('../../package.json') -module.exports = config => { - const ciName = ciDetect() - const ci = ciName ? `ci/${ciName}` : '' - const ua = (config.get('user-agent') || '') - .replace(/\{node-version\}/gi, config.get('node-version')) - .replace(/\{npm-version\}/gi, version) - .replace(/\{platform\}/gi, process.platform) - .replace(/\{arch\}/gi, process.arch) - .replace(/\{ci\}/gi, ci) - - config.set('user-agent', ua.trim()) -} diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index 2de01f1cb5c537..576959980089fc 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@7\.0\.0\-rc\.3 /path/to/npm + npm@7\.0\.0\-rc\.4 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 .fi diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index efd4e47de85142..530e53179f205e 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -10,7 +10,7 @@ npm [args] .RE .SS Version .P -7\.0\.0\-rc\.3 +7\.0\.0\-rc\.4 .SS Description .P npm is the package manager for the Node JavaScript platform\. It puts diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js index 2b9b4595b512bb..51708ce7371046 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js @@ -265,7 +265,11 @@ module.exports = cls => class IdealTreeBuilder extends cls { this[_global] ? this[_globalRootNode]() : rpj(this.path + '/package.json').then( pkg => this[_rootNodeFromPackage](pkg), - er => this[_rootNodeFromPackage]({}) + er => { + if (er.code === 'EJSONPARSE') + throw er + return this[_rootNodeFromPackage]({}) + } )) .then(root => this[_loadWorkspaces](root)) // ok to not have a virtual tree. probably initial install. diff --git a/deps/npm/node_modules/@npmcli/arborist/package.json b/deps/npm/node_modules/@npmcli/arborist/package.json index d8c63159af36c9..ea0aea167f0f3f 100644 --- a/deps/npm/node_modules/@npmcli/arborist/package.json +++ b/deps/npm/node_modules/@npmcli/arborist/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/arborist", - "version": "0.0.32", + "version": "0.0.33", "description": "Manage node_modules trees", "dependencies": { "@npmcli/installed-package-contents": "^1.0.5", diff --git a/deps/npm/node_modules/@npmcli/config/lib/get-user-agent.js b/deps/npm/node_modules/@npmcli/config/lib/get-user-agent.js new file mode 100644 index 00000000000000..c3d3c7a1bf3de2 --- /dev/null +++ b/deps/npm/node_modules/@npmcli/config/lib/get-user-agent.js @@ -0,0 +1,13 @@ +// Accepts a config object, returns a user-agent string +const getUserAgent = (config) => { + const ciName = config.get('ci-name') + return (config.get('user-agent') || '') + .replace(/\{node-version\}/gi, config.get('node-version')) + .replace(/\{npm-version\}/gi, config.get('npm-version')) + .replace(/\{platform\}/gi, process.platform) + .replace(/\{arch\}/gi, process.arch) + .replace(/\{ci\}/gi, ciName ? `ci/${ciName}` : '') + .trim() +} + +module.exports = getUserAgent diff --git a/deps/npm/node_modules/@npmcli/config/lib/index.js b/deps/npm/node_modules/@npmcli/config/lib/index.js index af19e720f866bb..a80b976a000814 100644 --- a/deps/npm/node_modules/@npmcli/config/lib/index.js +++ b/deps/npm/node_modules/@npmcli/config/lib/index.js @@ -47,6 +47,7 @@ const envReplace = require('./env-replace.js') const parseField = require('./parse-field.js') const typeDescription = require('./type-description.js') const setEnvs = require('./set-envs.js') +const getUserAgent = require('./get-user-agent.js') // types that can be saved back to const confFileTypes = new Set([ @@ -244,6 +245,10 @@ class Config { // set proper globalPrefix now that everything is loaded this.globalPrefix = this.get('prefix') + process.emit('time', 'config:load:setUserAgent') + this.setUserAgent() + process.emit('timeEnd', 'config:load:setUserAgent') + process.emit('time', 'config:load:setEnvs') this.setEnvs() process.emit('timeEnd', 'config:load:setEnvs') @@ -694,6 +699,12 @@ class Config { }) } + // the user-agent configuration is a template that gets populated + // with some variables, that takes place here + setUserAgent () { + this.set('user-agent', getUserAgent(this)) + } + // set up the environment object we have with npm_config_* environs // for all configs that are different from their default values, and // set EDITOR and HOME. diff --git a/deps/npm/node_modules/@npmcli/config/package.json b/deps/npm/node_modules/@npmcli/config/package.json index b16d2f286efaab..ef22e7bb0e7138 100644 --- a/deps/npm/node_modules/@npmcli/config/package.json +++ b/deps/npm/node_modules/@npmcli/config/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/config", - "version": "1.1.8", + "version": "1.2.1", "files": [ "lib" ], diff --git a/deps/npm/node_modules/@types/color-name/LICENSE b/deps/npm/node_modules/@types/color-name/LICENSE deleted file mode 100644 index 21071075c24599..00000000000000 --- a/deps/npm/node_modules/@types/color-name/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/deps/npm/node_modules/@types/color-name/README.md b/deps/npm/node_modules/@types/color-name/README.md deleted file mode 100644 index d08d108b2b5b67..00000000000000 --- a/deps/npm/node_modules/@types/color-name/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/color-name` - -# Summary -This package contains type definitions for color-name ( https://github.com/colorjs/color-name ). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/color-name - -Additional Details - * Last updated: Wed, 13 Feb 2019 16:16:48 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by Junyoung Clare Jang . diff --git a/deps/npm/node_modules/@types/color-name/index.d.ts b/deps/npm/node_modules/@types/color-name/index.d.ts deleted file mode 100644 index b5bff4717a3beb..00000000000000 --- a/deps/npm/node_modules/@types/color-name/index.d.ts +++ /dev/null @@ -1,161 +0,0 @@ -// Type definitions for color-name 1.1 -// Project: https://github.com/colorjs/color-name -// Definitions by: Junyoung Clare Jang -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/** - * Tuple of Red, Green, and Blue - * @example - * // Red = 55, Green = 70, Blue = 0 - * const rgb: RGB = [55, 70, 0]; - */ -export type RGB = [number, number, number]; - -export const aliceblue: RGB; -export const antiquewhite: RGB; -export const aqua: RGB; -export const aquamarine: RGB; -export const azure: RGB; -export const beige: RGB; -export const bisque: RGB; -export const black: RGB; -export const blanchedalmond: RGB; -export const blue: RGB; -export const blueviolet: RGB; -export const brown: RGB; -export const burlywood: RGB; -export const cadetblue: RGB; -export const chartreuse: RGB; -export const chocolate: RGB; -export const coral: RGB; -export const cornflowerblue: RGB; -export const cornsilk: RGB; -export const crimson: RGB; -export const cyan: RGB; -export const darkblue: RGB; -export const darkcyan: RGB; -export const darkgoldenrod: RGB; -export const darkgray: RGB; -export const darkgreen: RGB; -export const darkgrey: RGB; -export const darkkhaki: RGB; -export const darkmagenta: RGB; -export const darkolivegreen: RGB; -export const darkorange: RGB; -export const darkorchid: RGB; -export const darkred: RGB; -export const darksalmon: RGB; -export const darkseagreen: RGB; -export const darkslateblue: RGB; -export const darkslategray: RGB; -export const darkslategrey: RGB; -export const darkturquoise: RGB; -export const darkviolet: RGB; -export const deeppink: RGB; -export const deepskyblue: RGB; -export const dimgray: RGB; -export const dimgrey: RGB; -export const dodgerblue: RGB; -export const firebrick: RGB; -export const floralwhite: RGB; -export const forestgreen: RGB; -export const fuchsia: RGB; -export const gainsboro: RGB; -export const ghostwhite: RGB; -export const gold: RGB; -export const goldenrod: RGB; -export const gray: RGB; -export const green: RGB; -export const greenyellow: RGB; -export const grey: RGB; -export const honeydew: RGB; -export const hotpink: RGB; -export const indianred: RGB; -export const indigo: RGB; -export const ivory: RGB; -export const khaki: RGB; -export const lavender: RGB; -export const lavenderblush: RGB; -export const lawngreen: RGB; -export const lemonchiffon: RGB; -export const lightblue: RGB; -export const lightcoral: RGB; -export const lightcyan: RGB; -export const lightgoldenrodyellow: RGB; -export const lightgray: RGB; -export const lightgreen: RGB; -export const lightgrey: RGB; -export const lightpink: RGB; -export const lightsalmon: RGB; -export const lightseagreen: RGB; -export const lightskyblue: RGB; -export const lightslategray: RGB; -export const lightslategrey: RGB; -export const lightsteelblue: RGB; -export const lightyellow: RGB; -export const lime: RGB; -export const limegreen: RGB; -export const linen: RGB; -export const magenta: RGB; -export const maroon: RGB; -export const mediumaquamarine: RGB; -export const mediumblue: RGB; -export const mediumorchid: RGB; -export const mediumpurple: RGB; -export const mediumseagreen: RGB; -export const mediumslateblue: RGB; -export const mediumspringgreen: RGB; -export const mediumturquoise: RGB; -export const mediumvioletred: RGB; -export const midnightblue: RGB; -export const mintcream: RGB; -export const mistyrose: RGB; -export const moccasin: RGB; -export const navajowhite: RGB; -export const navy: RGB; -export const oldlace: RGB; -export const olive: RGB; -export const olivedrab: RGB; -export const orange: RGB; -export const orangered: RGB; -export const orchid: RGB; -export const palegoldenrod: RGB; -export const palegreen: RGB; -export const paleturquoise: RGB; -export const palevioletred: RGB; -export const papayawhip: RGB; -export const peachpuff: RGB; -export const peru: RGB; -export const pink: RGB; -export const plum: RGB; -export const powderblue: RGB; -export const purple: RGB; -export const rebeccapurple: RGB; -export const red: RGB; -export const rosybrown: RGB; -export const royalblue: RGB; -export const saddlebrown: RGB; -export const salmon: RGB; -export const sandybrown: RGB; -export const seagreen: RGB; -export const seashell: RGB; -export const sienna: RGB; -export const silver: RGB; -export const skyblue: RGB; -export const slateblue: RGB; -export const slategray: RGB; -export const slategrey: RGB; -export const snow: RGB; -export const springgreen: RGB; -export const steelblue: RGB; -export const tan: RGB; -export const teal: RGB; -export const thistle: RGB; -export const tomato: RGB; -export const turquoise: RGB; -export const violet: RGB; -export const wheat: RGB; -export const white: RGB; -export const whitesmoke: RGB; -export const yellow: RGB; -export const yellowgreen: RGB; diff --git a/deps/npm/node_modules/@types/color-name/package.json b/deps/npm/node_modules/@types/color-name/package.json deleted file mode 100644 index d5e367e1403798..00000000000000 --- a/deps/npm/node_modules/@types/color-name/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@types/color-name", - "version": "1.1.1", - "description": "TypeScript definitions for color-name", - "license": "MIT", - "contributors": [ - { - "name": "Junyoung Clare Jang", - "url": "https://github.com/Ailrun", - "githubUsername": "Ailrun" - } - ], - "main": "", - "types": "index", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git" - }, - "scripts": {}, - "dependencies": {}, - "typesPublisherContentHash": "e22c6881e2dcf766e32142cbb82d9acf9c08258bdf0da8e76c8a448d1be44ac7", - "typeScriptVersion": "2.0" -} \ No newline at end of file diff --git a/deps/npm/node_modules/ansi-styles/index.d.ts b/deps/npm/node_modules/ansi-styles/index.d.ts index 7e9b2b71b9cdf5..44a907e580f105 100644 --- a/deps/npm/node_modules/ansi-styles/index.d.ts +++ b/deps/npm/node_modules/ansi-styles/index.d.ts @@ -1,4 +1,152 @@ -import * as cssColors from 'color-name'; +declare type CSSColor = + | 'aliceblue' + | 'antiquewhite' + | 'aqua' + | 'aquamarine' + | 'azure' + | 'beige' + | 'bisque' + | 'black' + | 'blanchedalmond' + | 'blue' + | 'blueviolet' + | 'brown' + | 'burlywood' + | 'cadetblue' + | 'chartreuse' + | 'chocolate' + | 'coral' + | 'cornflowerblue' + | 'cornsilk' + | 'crimson' + | 'cyan' + | 'darkblue' + | 'darkcyan' + | 'darkgoldenrod' + | 'darkgray' + | 'darkgreen' + | 'darkgrey' + | 'darkkhaki' + | 'darkmagenta' + | 'darkolivegreen' + | 'darkorange' + | 'darkorchid' + | 'darkred' + | 'darksalmon' + | 'darkseagreen' + | 'darkslateblue' + | 'darkslategray' + | 'darkslategrey' + | 'darkturquoise' + | 'darkviolet' + | 'deeppink' + | 'deepskyblue' + | 'dimgray' + | 'dimgrey' + | 'dodgerblue' + | 'firebrick' + | 'floralwhite' + | 'forestgreen' + | 'fuchsia' + | 'gainsboro' + | 'ghostwhite' + | 'gold' + | 'goldenrod' + | 'gray' + | 'green' + | 'greenyellow' + | 'grey' + | 'honeydew' + | 'hotpink' + | 'indianred' + | 'indigo' + | 'ivory' + | 'khaki' + | 'lavender' + | 'lavenderblush' + | 'lawngreen' + | 'lemonchiffon' + | 'lightblue' + | 'lightcoral' + | 'lightcyan' + | 'lightgoldenrodyellow' + | 'lightgray' + | 'lightgreen' + | 'lightgrey' + | 'lightpink' + | 'lightsalmon' + | 'lightseagreen' + | 'lightskyblue' + | 'lightslategray' + | 'lightslategrey' + | 'lightsteelblue' + | 'lightyellow' + | 'lime' + | 'limegreen' + | 'linen' + | 'magenta' + | 'maroon' + | 'mediumaquamarine' + | 'mediumblue' + | 'mediumorchid' + | 'mediumpurple' + | 'mediumseagreen' + | 'mediumslateblue' + | 'mediumspringgreen' + | 'mediumturquoise' + | 'mediumvioletred' + | 'midnightblue' + | 'mintcream' + | 'mistyrose' + | 'moccasin' + | 'navajowhite' + | 'navy' + | 'oldlace' + | 'olive' + | 'olivedrab' + | 'orange' + | 'orangered' + | 'orchid' + | 'palegoldenrod' + | 'palegreen' + | 'paleturquoise' + | 'palevioletred' + | 'papayawhip' + | 'peachpuff' + | 'peru' + | 'pink' + | 'plum' + | 'powderblue' + | 'purple' + | 'rebeccapurple' + | 'red' + | 'rosybrown' + | 'royalblue' + | 'saddlebrown' + | 'salmon' + | 'sandybrown' + | 'seagreen' + | 'seashell' + | 'sienna' + | 'silver' + | 'skyblue' + | 'slateblue' + | 'slategray' + | 'slategrey' + | 'snow' + | 'springgreen' + | 'steelblue' + | 'tan' + | 'teal' + | 'thistle' + | 'tomato' + | 'turquoise' + | 'violet' + | 'wheat' + | 'white' + | 'whitesmoke' + | 'yellow' + | 'yellowgreen'; declare namespace ansiStyles { interface ColorConvert { @@ -21,7 +169,7 @@ declare namespace ansiStyles { /** @param keyword - A CSS color name. */ - keyword(keyword: keyof typeof cssColors): string; + keyword(keyword: CSSColor): string; /** The HSL color space. diff --git a/deps/npm/node_modules/ansi-styles/package.json b/deps/npm/node_modules/ansi-styles/package.json index 347b035e1da704..75393284d7e474 100644 --- a/deps/npm/node_modules/ansi-styles/package.json +++ b/deps/npm/node_modules/ansi-styles/package.json @@ -1,6 +1,6 @@ { "name": "ansi-styles", - "version": "4.2.1", + "version": "4.3.0", "description": "ANSI escape codes for styling strings in the terminal", "license": "MIT", "repository": "chalk/ansi-styles", @@ -44,7 +44,6 @@ "text" ], "dependencies": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" }, "devDependencies": { diff --git a/deps/npm/node_modules/ansi-styles/readme.md b/deps/npm/node_modules/ansi-styles/readme.md index 2a1ef654667d3f..24883de808be6a 100644 --- a/deps/npm/node_modules/ansi-styles/readme.md +++ b/deps/npm/node_modules/ansi-styles/readme.md @@ -145,14 +145,8 @@ style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color backgroun - [Sindre Sorhus](https://github.com/sindresorhus) - [Josh Junon](https://github.com/qix-) ---- - -
- - 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. -
-
+## For enterprise + +Available as part of the Tidelift Subscription. + +The maintainers of `ansi-styles` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-ansi-styles?utm_source=npm-ansi-styles&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/deps/npm/node_modules/make-fetch-happen/index.js b/deps/npm/node_modules/make-fetch-happen/index.js index fb2e115ff4d2a9..5a0b15d466287c 100644 --- a/deps/npm/node_modules/make-fetch-happen/index.js +++ b/deps/npm/node_modules/make-fetch-happen/index.js @@ -256,6 +256,9 @@ function conditionalFetch (req, cachedRes, opts) { } function remoteFetchHandleIntegrity (res, integrity) { + if (res.status !== 200) { + return res // Error responses aren't subject to integrity checks. + } const oldBod = res.body const newBod = ssri.integrityStream({ integrity diff --git a/deps/npm/node_modules/make-fetch-happen/package.json b/deps/npm/node_modules/make-fetch-happen/package.json index 794283aab21cdc..594483fb183253 100644 --- a/deps/npm/node_modules/make-fetch-happen/package.json +++ b/deps/npm/node_modules/make-fetch-happen/package.json @@ -1,6 +1,6 @@ { "name": "make-fetch-happen", - "version": "8.0.9", + "version": "8.0.10", "description": "Opinionated, caching, retrying fetch client", "main": "index.js", "files": [ diff --git a/deps/npm/package.json b/deps/npm/package.json index e58880013d02c8..1c93e64ca5c104 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "7.0.0-rc.3", + "version": "7.0.0-rc.4", "name": "npm", "description": "a package manager for JavaScript", "keywords": [ @@ -42,9 +42,9 @@ "./package.json": "./package.json" }, "dependencies": { - "@npmcli/arborist": "^0.0.32", + "@npmcli/arborist": "^0.0.33", "@npmcli/ci-detect": "^1.2.0", - "@npmcli/config": "^1.1.8", + "@npmcli/config": "^1.2.1", "@npmcli/run-script": "^1.7.0", "abbrev": "~1.1.1", "ansicolors": "~0.3.2", diff --git a/deps/npm/tap-snapshots/test-lib-utils-config.js-TAP.test.js b/deps/npm/tap-snapshots/test-lib-utils-config.js-TAP.test.js index a6f66273669efa..c1a1ddd48c3483 100644 --- a/deps/npm/tap-snapshots/test-lib-utils-config.js-TAP.test.js +++ b/deps/npm/tap-snapshots/test-lib-utils-config.js-TAP.test.js @@ -29,6 +29,7 @@ Object { "cafile": null, "call": "", "cert": null, + "ci-name": null, "cidr": null, "color": true, "commit-hooks": true, @@ -78,6 +79,7 @@ Object { "node-options": null, "node-version": "v14.8.0", "noproxy": null, + "npm-version": "7.0.0", "offline": false, "omit": Array [], "only": null, @@ -201,9 +203,6 @@ Object { "n": Array [ "--no-yes", ], - "N": Array [ - "--no-registry", - ], "no-desc": Array [ "--no-description", ], @@ -317,6 +316,10 @@ Object { null, "{String TYPE}", ], + "ci-name": Array [ + null, + "{String TYPE}", + ], "cidr": Array [ null, "{String TYPE}", @@ -349,10 +352,6 @@ Object { "global": "{Boolean TYPE}", "global-style": "{Boolean TYPE}", "globalconfig": "{PATH MODULE}", - "group": Array [ - "{Number TYPE}", - "{String TYPE}", - ], "heading": "{String TYPE}", "https-proxy": Array [ null, @@ -421,6 +420,7 @@ Object { "{String TYPE}", "{Array TYPE}", ], + "npm-version": "{SEMVER MODULE}", "offline": "{Boolean TYPE}", "omit": Array [ "{Array TYPE}", @@ -543,6 +543,7 @@ Object { "cafile": null, "call": "", "cert": null, + "ci-name": null, "cidr": null, "color": true, "commit-hooks": true, @@ -592,6 +593,7 @@ Object { "node-options": null, "node-version": "v14.8.0", "noproxy": null, + "npm-version": "7.0.0", "offline": false, "omit": Array [], "only": null, @@ -715,9 +717,6 @@ Object { "n": Array [ "--no-yes", ], - "N": Array [ - "--no-registry", - ], "no-desc": Array [ "--no-description", ], @@ -831,6 +830,10 @@ Object { null, "{String TYPE}", ], + "ci-name": Array [ + null, + "{String TYPE}", + ], "cidr": Array [ null, "{String TYPE}", @@ -863,10 +866,6 @@ Object { "global": "{Boolean TYPE}", "global-style": "{Boolean TYPE}", "globalconfig": "{PATH MODULE}", - "group": Array [ - "{Number TYPE}", - "{String TYPE}", - ], "heading": "{String TYPE}", "https-proxy": Array [ null, @@ -935,6 +934,7 @@ Object { "{String TYPE}", "{Array TYPE}", ], + "npm-version": "{SEMVER MODULE}", "offline": "{Boolean TYPE}", "omit": Array [ "{Array TYPE}", @@ -1057,6 +1057,7 @@ Object { "cafile": null, "call": "", "cert": null, + "ci-name": null, "cidr": null, "color": true, "commit-hooks": true, @@ -1106,6 +1107,7 @@ Object { "node-options": null, "node-version": "v14.8.0", "noproxy": null, + "npm-version": "7.0.0", "offline": false, "omit": Array [], "only": null, @@ -1229,9 +1231,6 @@ Object { "n": Array [ "--no-yes", ], - "N": Array [ - "--no-registry", - ], "no-desc": Array [ "--no-description", ], @@ -1345,6 +1344,10 @@ Object { null, "{String TYPE}", ], + "ci-name": Array [ + null, + "{String TYPE}", + ], "cidr": Array [ null, "{String TYPE}", @@ -1377,10 +1380,6 @@ Object { "global": "{Boolean TYPE}", "global-style": "{Boolean TYPE}", "globalconfig": "{PATH MODULE}", - "group": Array [ - "{Number TYPE}", - "{String TYPE}", - ], "heading": "{String TYPE}", "https-proxy": Array [ null, @@ -1451,6 +1450,7 @@ Object { "{String TYPE}", "{Array TYPE}", ], + "npm-version": "{SEMVER MODULE}", "offline": "{Boolean TYPE}", "omit": Array [ "{Array TYPE}", diff --git a/deps/npm/test/lib/exec.js b/deps/npm/test/lib/exec.js index c93517315ce891..ca8c2c1e7666fc 100644 --- a/deps/npm/test/lib/exec.js +++ b/deps/npm/test/lib/exec.js @@ -19,6 +19,8 @@ class Arborist { } let PROGRESS_ENABLED = true +const LOG_WARN = [] +let PROGRESS_IGNORED = false const npm = { flatOptions: { yes: true, @@ -27,6 +29,8 @@ const npm = { legacyPeerDeps: false }, localPrefix: 'local-prefix', + localBin: 'local-bin', + globalBin: 'global-bin', config: { get: k => { if (k !== 'cache') { @@ -41,6 +45,9 @@ const npm = { }, enableProgress: () => { PROGRESS_ENABLED = true + }, + warn: (...args) => { + LOG_WARN.push(args) } } } @@ -48,7 +55,7 @@ const npm = { const RUN_SCRIPTS = [] const runScript = async opt => { RUN_SCRIPTS.push(opt) - if (PROGRESS_ENABLED) { + if (!PROGRESS_IGNORED && PROGRESS_ENABLED) { throw new Error('progress not disabled during run script!') } } @@ -71,6 +78,8 @@ const read = (options, cb) => { process.nextTick(() => cb(READ_ERROR, READ_RESULT)) } +const PATH = require('../../lib/utils/path.js') + const exec = requireInject('../../lib/exec.js', { '@npmcli/arborist': Arborist, '@npmcli/run-script': runScript, @@ -88,12 +97,64 @@ t.afterEach(cb => { READ.length = 0 READ_RESULT = '' READ_ERROR = null + LOG_WARN.length = 0 + PROGRESS_IGNORED = false npm.flatOptions.legacyPeerDeps = false npm.flatOptions.package = [] npm.flatOptions.call = '' + npm.localBin = 'local-bin' + npm.globalBin = 'global-bin' cb() }) +t.test('npx foo, bin already exists locally', async t => { + const path = t.testdir({ + foo: 'just some file' + }) + + PROGRESS_IGNORED = true + npm.localBin = path + + await exec(['foo'], er => { + t.ifError(er, 'npm exec') + }) + t.strictSame(RUN_SCRIPTS, [{ + cmd: 'foo', + banner: false, + path: process.cwd(), + stdioString: true, + event: 'npx', + env: { + PATH: [path, ...PATH].join(delimiter) + }, + stdio: 'inherit' + }]) +}) + +t.test('npx foo, bin already exists globally', async t => { + const path = t.testdir({ + foo: 'just some file' + }) + + PROGRESS_IGNORED = true + npm.globalBin = path + + await exec(['foo'], er => { + t.ifError(er, 'npm exec') + }) + t.strictSame(RUN_SCRIPTS, [{ + cmd: 'foo', + banner: false, + path: process.cwd(), + stdioString: true, + event: 'npx', + env: { + PATH: [path, ...PATH].join(delimiter) + }, + stdio: 'inherit' + }]) +}) + t.test('npm exec foo, already present locally', async t => { const path = t.testdir() npm.localPrefix = path @@ -464,7 +525,16 @@ t.test('positional args and --call together is an error', t => { return exec(['foo'], er => t.equal(er, exec.usage)) }) -t.test('prompt when installs are needed if not already present', async t => { +t.test('prompt when installs are needed if not already present and shell is a TTY', async t => { + const stdoutTTY = process.stdout.isTTY + const stdinTTY = process.stdin.isTTY + t.teardown(() => { + process.stdout.isTTY = stdoutTTY + process.stdin.isTTY = stdinTTY + }) + process.stdout.isTTY = true + process.stdin.isTTY = true + const packages = ['foo', 'bar'] READ_RESULT = 'yolo' @@ -522,7 +592,138 @@ t.test('prompt when installs are needed if not already present', async t => { }]) }) +t.test('skip prompt when installs are needed if not already present and shell is not a tty (multiple packages)', async t => { + const stdoutTTY = process.stdout.isTTY + const stdinTTY = process.stdin.isTTY + t.teardown(() => { + process.stdout.isTTY = stdoutTTY + process.stdin.isTTY = stdinTTY + }) + process.stdout.isTTY = false + process.stdin.isTTY = false + + const packages = ['foo', 'bar'] + READ_RESULT = 'yolo' + + npm.flatOptions.package = packages + npm.flatOptions.yes = undefined + + const add = packages.map(p => `${p}@`).sort((a, b) => a.localeCompare(b)) + const path = t.testdir() + const installDir = resolve('cache-dir/_npx/07de77790e5f40f2') + npm.localPrefix = path + ARB_ACTUAL_TREE[path] = { + children: new Map() + } + ARB_ACTUAL_TREE[installDir] = { + children: new Map() + } + MANIFESTS.foo = { + name: 'foo', + version: '1.2.3', + bin: { + foo: 'foo' + }, + _from: 'foo@' + } + MANIFESTS.bar = { + name: 'bar', + version: '1.2.3', + bin: { + bar: 'bar' + }, + _from: 'bar@' + } + await exec(['foobar'], er => { + if (er) { + throw er + } + }) + t.strictSame(MKDIRPS, [installDir], 'need to make install dir') + t.match(ARB_CTOR, [ { package: packages, path } ]) + t.match(ARB_REIFY, [{add, legacyPeerDeps: false}], 'need to install both packages') + t.equal(PROGRESS_ENABLED, true, 'progress re-enabled') + const PATH = `${resolve(installDir, 'node_modules', '.bin')}${delimiter}${process.env.PATH}` + t.match(RUN_SCRIPTS, [{ + pkg: { scripts: { npx: 'foobar' } }, + banner: false, + path: process.cwd(), + stdioString: true, + event: 'npx', + env: { PATH }, + stdio: 'inherit' + }]) + t.strictSame(READ, [], 'should not have prompted') + t.strictSame(LOG_WARN, [['exec', 'The following packages were not found and will be installed: bar, foo']], 'should have printed a warning') +}) + +t.test('skip prompt when installs are needed if not already present and shell is not a tty (single package)', async t => { + const stdoutTTY = process.stdout.isTTY + const stdinTTY = process.stdin.isTTY + t.teardown(() => { + process.stdout.isTTY = stdoutTTY + process.stdin.isTTY = stdinTTY + }) + process.stdout.isTTY = false + process.stdin.isTTY = false + + const packages = ['foo'] + READ_RESULT = 'yolo' + + npm.flatOptions.package = packages + npm.flatOptions.yes = undefined + + const add = packages.map(p => `${p}@`).sort((a, b) => a.localeCompare(b)) + const path = t.testdir() + const installDir = resolve('cache-dir/_npx/f7fbba6e0636f890') + npm.localPrefix = path + ARB_ACTUAL_TREE[path] = { + children: new Map() + } + ARB_ACTUAL_TREE[installDir] = { + children: new Map() + } + MANIFESTS.foo = { + name: 'foo', + version: '1.2.3', + bin: { + foo: 'foo' + }, + _from: 'foo@' + } + await exec(['foobar'], er => { + if (er) { + throw er + } + }) + t.strictSame(MKDIRPS, [installDir], 'need to make install dir') + t.match(ARB_CTOR, [ { package: packages, path } ]) + t.match(ARB_REIFY, [{add, legacyPeerDeps: false}], 'need to install the package') + t.equal(PROGRESS_ENABLED, true, 'progress re-enabled') + const PATH = `${resolve(installDir, 'node_modules', '.bin')}${delimiter}${process.env.PATH}` + t.match(RUN_SCRIPTS, [{ + pkg: { scripts: { npx: 'foobar' } }, + banner: false, + path: process.cwd(), + stdioString: true, + event: 'npx', + env: { PATH }, + stdio: 'inherit' + }]) + t.strictSame(READ, [], 'should not have prompted') + t.strictSame(LOG_WARN, [['exec', 'The following package was not found and will be installed: foo']], 'should have printed a warning') +}) + t.test('abort if prompt rejected', async t => { + const stdoutTTY = process.stdout.isTTY + const stdinTTY = process.stdin.isTTY + t.teardown(() => { + process.stdout.isTTY = stdoutTTY + process.stdin.isTTY = stdinTTY + }) + process.stdout.isTTY = true + process.stdin.isTTY = true + const packages = ['foo', 'bar'] READ_RESULT = 'no, why would I want such a thing??' @@ -570,6 +771,15 @@ t.test('abort if prompt rejected', async t => { }) t.test('abort if prompt false', async t => { + const stdoutTTY = process.stdout.isTTY + const stdinTTY = process.stdin.isTTY + t.teardown(() => { + process.stdout.isTTY = stdoutTTY + process.stdin.isTTY = stdinTTY + }) + process.stdout.isTTY = true + process.stdin.isTTY = true + const packages = ['foo', 'bar'] READ_ERROR = 'canceled' @@ -617,6 +827,15 @@ t.test('abort if prompt false', async t => { }) t.test('abort if -n provided', async t => { + const stdoutTTY = process.stdout.isTTY + const stdinTTY = process.stdin.isTTY + t.teardown(() => { + process.stdout.isTTY = stdoutTTY + process.stdin.isTTY = stdinTTY + }) + process.stdout.isTTY = true + process.stdin.isTTY = true + const packages = ['foo', 'bar'] npm.flatOptions.package = packages diff --git a/deps/npm/test/lib/utils/config.js b/deps/npm/test/lib/utils/config.js index 90789a8db0bc22..293e68c00449d9 100644 --- a/deps/npm/test/lib/utils/config.js +++ b/deps/npm/test/lib/utils/config.js @@ -70,12 +70,14 @@ const networkInterfaces = () => ({ }) const tmpdir = () => '/tmp' const os = { networkInterfaces, tmpdir } +const pkg = { version: '7.0.0' } t.test('working network interfaces, not windows', t => { const config = requireInject('../../../lib/utils/config.js', { os, '@npmcli/ci-detect': () => false, - '../../../lib/utils/is-windows.js': false + '../../../lib/utils/is-windows.js': false, + '../../../package.json': pkg }) t.matchSnapshot(config) t.end() @@ -85,7 +87,8 @@ t.test('no working network interfaces, on windows', t => { const config = requireInject('../../../lib/utils/config.js', { os: { tmpdir, networkInterfaces: networkInterfacesThrow }, '@npmcli/ci-detect': () => false, - '../../../lib/utils/is-windows.js': true + '../../../lib/utils/is-windows.js': true, + '../../../package.json': pkg }) t.matchSnapshot(config) t.end() @@ -109,7 +112,8 @@ t.test('no process.umask() method', t => { const config = requireInject('../../../lib/utils/config.js', { os: { tmpdir, networkInterfaces: networkInterfacesThrow }, '@npmcli/ci-detect': () => false, - '../../../lib/utils/is-windows.js': true + '../../../lib/utils/is-windows.js': true, + '../../../package.json': pkg }) t.equal(config.defaults.umask, 0o22) t.matchSnapshot(config) diff --git a/deps/npm/test/lib/utils/file-exists.js b/deps/npm/test/lib/utils/file-exists.js new file mode 100644 index 00000000000000..f247f564e0766a --- /dev/null +++ b/deps/npm/test/lib/utils/file-exists.js @@ -0,0 +1,30 @@ +const { test } = require('tap') +const fileExists = require('../../../lib/utils/file-exists.js') + +test('returns true when arg is a file', async (t) => { + const path = t.testdir({ + foo: 'just some file' + }) + + const result = await fileExists(`${path}/foo`) + t.equal(result, true, 'file exists') + t.end() +}) + +test('returns false when arg is not a file', async (t) => { + const path = t.testdir({ + foo: {} + }) + + const result = await fileExists(`${path}/foo`) + t.equal(result, false, 'file does not exist') + t.end() +}) + +test('returns false when arg does not exist', async (t) => { + const path = t.testdir() + + const result = await fileExists(`${path}/foo`) + t.equal(result, false, 'file does not exist') + t.end() +}) diff --git a/deps/npm/test/lib/utils/set-user-agent.js b/deps/npm/test/lib/utils/set-user-agent.js deleted file mode 100644 index 854c698179ce66..00000000000000 --- a/deps/npm/test/lib/utils/set-user-agent.js +++ /dev/null @@ -1,54 +0,0 @@ -const t = require('tap') -const requireInject = require('require-inject') - -let ci = null -const ciDetect = () => ci - -const setUserAgent = requireInject('../../../lib/utils/set-user-agent.js', { - '@npmcli/ci-detect': ciDetect -}) - -const defaultUA = 'npm/{npm-version} node/{node-version} {platform} {arch} {ci}' - -const config = { - settings: { - 'node-version': '123.420.69', - 'user-agent': defaultUA - }, - set: (k, v) => { - if (k !== 'user-agent') { - throw new Error('setting the wrong thing') - } - config.settings['user-agent'] = v - }, - get: (k) => { - if (k !== 'user-agent' && k !== 'node-version') { - throw new Error('setting the wrong thing') - } - return config.settings[k] - } -} - -t.test('not in CI, set user agent', t => { - setUserAgent(config) - t.equal(config.get('user-agent'), `npm/${require('../../../package.json').version} node/123.420.69 ${process.platform} ${process.arch}`) - config.set('user-agent', defaultUA) - t.end() -}) - -t.test('in CI, set user agent', t => { - ci = 'something' - setUserAgent(config) - t.equal(config.get('user-agent'), `npm/${require('../../../package.json').version} node/123.420.69 ${process.platform} ${process.arch} ci/something`) - config.set('user-agent', defaultUA) - t.end() -}) - -t.test('no UA set, leave it blank', t => { - ci = 'something' - config.set('user-agent', null) - setUserAgent(config) - t.equal(config.get('user-agent'), '') - config.set('user-agent', defaultUA) - t.end() -})