summaryrefslogtreecommitdiff
path: root/deps/npm
diff options
context:
space:
mode:
authornpm CLI robot <npm-cli+bot@github.com>2022-06-24 18:21:50 -0700
committerGitHub <noreply@github.com>2022-06-25 02:21:50 +0100
commit687e50aded0d264873911847717e7567382b1401 (patch)
treeb7f38b32e988bf3f7a9567dc3cd1c62e0be1c43f /deps/npm
parent3507b3f9a9da6c451c18f303d3b96e4deedf2f5b (diff)
downloadnode-new-687e50aded0d264873911847717e7567382b1401.tar.gz
deps: upgrade npm to 8.13.1
PR-URL: https://github.com/nodejs/node/pull/43552 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Diffstat (limited to 'deps/npm')
-rw-r--r--deps/npm/docs/content/commands/npm-cache.md7
-rw-r--r--deps/npm/docs/content/commands/npm-ci.md2
-rw-r--r--deps/npm/docs/content/commands/npm-deprecate.md7
-rw-r--r--deps/npm/docs/content/commands/npm-dist-tag.md17
-rw-r--r--deps/npm/docs/content/commands/npm-explain.md10
-rw-r--r--deps/npm/docs/content/commands/npm-fund.md25
-rw-r--r--deps/npm/docs/content/commands/npm-init.md37
-rw-r--r--deps/npm/docs/content/commands/npm-install-ci-test.md2
-rw-r--r--deps/npm/docs/content/commands/npm-install-test.md11
-rw-r--r--deps/npm/docs/content/commands/npm-install.md11
-rw-r--r--deps/npm/docs/content/commands/npm-link.md14
-rw-r--r--deps/npm/docs/content/commands/npm-ls.md3
-rw-r--r--deps/npm/docs/content/commands/npm-outdated.md3
-rw-r--r--deps/npm/docs/content/commands/npm-owner.md7
-rw-r--r--deps/npm/docs/content/commands/npm-pack.md3
-rw-r--r--deps/npm/docs/content/commands/npm-publish.md51
-rw-r--r--deps/npm/docs/content/commands/npm-rebuild.md8
-rw-r--r--deps/npm/docs/content/commands/npm-restart.md2
-rw-r--r--deps/npm/docs/content/commands/npm-run-script.md2
-rw-r--r--deps/npm/docs/content/commands/npm-star.md3
-rw-r--r--deps/npm/docs/content/commands/npm-start.md2
-rw-r--r--deps/npm/docs/content/commands/npm-stop.md2
-rw-r--r--deps/npm/docs/content/commands/npm-test.md2
-rw-r--r--deps/npm/docs/content/commands/npm-unpublish.md3
-rw-r--r--deps/npm/docs/content/commands/npm-unstar.md2
-rw-r--r--deps/npm/docs/content/commands/npm-view.md3
-rw-r--r--deps/npm/docs/content/configuring-npm/package-json.md2
-rw-r--r--deps/npm/docs/content/using-npm/config.md2
-rw-r--r--deps/npm/docs/content/using-npm/package-spec.md106
-rw-r--r--deps/npm/docs/output/commands/npm-cache.html7
-rw-r--r--deps/npm/docs/output/commands/npm-ci.html2
-rw-r--r--deps/npm/docs/output/commands/npm-deprecate.html3
-rw-r--r--deps/npm/docs/output/commands/npm-dist-tag.html17
-rw-r--r--deps/npm/docs/output/commands/npm-explain.html9
-rw-r--r--deps/npm/docs/output/commands/npm-fund.html25
-rw-r--r--deps/npm/docs/output/commands/npm-init.html29
-rw-r--r--deps/npm/docs/output/commands/npm-install-ci-test.html2
-rw-r--r--deps/npm/docs/output/commands/npm-install-test.html11
-rw-r--r--deps/npm/docs/output/commands/npm-install.html11
-rw-r--r--deps/npm/docs/output/commands/npm-link.html14
-rw-r--r--deps/npm/docs/output/commands/npm-ls.html5
-rw-r--r--deps/npm/docs/output/commands/npm-outdated.html3
-rw-r--r--deps/npm/docs/output/commands/npm-owner.html7
-rw-r--r--deps/npm/docs/output/commands/npm-pack.html3
-rw-r--r--deps/npm/docs/output/commands/npm-publish.html62
-rw-r--r--deps/npm/docs/output/commands/npm-rebuild.html8
-rw-r--r--deps/npm/docs/output/commands/npm-restart.html2
-rw-r--r--deps/npm/docs/output/commands/npm-run-script.html2
-rw-r--r--deps/npm/docs/output/commands/npm-star.html3
-rw-r--r--deps/npm/docs/output/commands/npm-start.html2
-rw-r--r--deps/npm/docs/output/commands/npm-stop.html2
-rw-r--r--deps/npm/docs/output/commands/npm-test.html2
-rw-r--r--deps/npm/docs/output/commands/npm-unpublish.html3
-rw-r--r--deps/npm/docs/output/commands/npm-unstar.html2
-rw-r--r--deps/npm/docs/output/commands/npm-view.html3
-rw-r--r--deps/npm/docs/output/commands/npm.html2
-rw-r--r--deps/npm/docs/output/configuring-npm/package-json.html2
-rw-r--r--deps/npm/docs/output/using-npm/config.html2
-rw-r--r--deps/npm/docs/output/using-npm/package-spec.html254
-rw-r--r--deps/npm/lib/auth/legacy.js12
-rw-r--r--deps/npm/lib/commands/cache.js6
-rw-r--r--deps/npm/lib/commands/deprecate.js2
-rw-r--r--deps/npm/lib/commands/dist-tag.js8
-rw-r--r--deps/npm/lib/commands/explain.js2
-rw-r--r--deps/npm/lib/commands/fund.js2
-rw-r--r--deps/npm/lib/commands/init.js4
-rw-r--r--deps/npm/lib/commands/install.js13
-rw-r--r--deps/npm/lib/commands/link.js3
-rw-r--r--deps/npm/lib/commands/ls.js2
-rw-r--r--deps/npm/lib/commands/outdated.js2
-rw-r--r--deps/npm/lib/commands/owner.js6
-rw-r--r--deps/npm/lib/commands/pack.js2
-rw-r--r--deps/npm/lib/commands/publish.js2
-rw-r--r--deps/npm/lib/commands/rebuild.js2
-rw-r--r--deps/npm/lib/commands/star.js2
-rw-r--r--deps/npm/lib/commands/unpublish.js2
-rw-r--r--deps/npm/lib/commands/view.js11
-rw-r--r--deps/npm/lib/utils/config/definitions.js6
-rw-r--r--deps/npm/lib/utils/open-url-prompt.js69
-rw-r--r--deps/npm/man/man1/npm-cache.18
-rw-r--r--deps/npm/man/man1/npm-ci.12
-rw-r--r--deps/npm/man/man1/npm-deprecate.18
-rw-r--r--deps/npm/man/man1/npm-dist-tag.118
-rw-r--r--deps/npm/man/man1/npm-explain.111
-rw-r--r--deps/npm/man/man1/npm-fund.126
-rw-r--r--deps/npm/man/man1/npm-init.141
-rw-r--r--deps/npm/man/man1/npm-install-ci-test.12
-rw-r--r--deps/npm/man/man1/npm-install-test.111
-rw-r--r--deps/npm/man/man1/npm-install.111
-rw-r--r--deps/npm/man/man1/npm-link.115
-rw-r--r--deps/npm/man/man1/npm-ls.16
-rw-r--r--deps/npm/man/man1/npm-outdated.14
-rw-r--r--deps/npm/man/man1/npm-owner.18
-rw-r--r--deps/npm/man/man1/npm-pack.14
-rw-r--r--deps/npm/man/man1/npm-publish.149
-rw-r--r--deps/npm/man/man1/npm-rebuild.19
-rw-r--r--deps/npm/man/man1/npm-restart.12
-rw-r--r--deps/npm/man/man1/npm-run-script.12
-rw-r--r--deps/npm/man/man1/npm-star.14
-rw-r--r--deps/npm/man/man1/npm-start.12
-rw-r--r--deps/npm/man/man1/npm-stop.12
-rw-r--r--deps/npm/man/man1/npm-test.12
-rw-r--r--deps/npm/man/man1/npm-unpublish.14
-rw-r--r--deps/npm/man/man1/npm-unstar.12
-rw-r--r--deps/npm/man/man1/npm-view.14
-rw-r--r--deps/npm/man/man1/npm.12
-rw-r--r--deps/npm/man/man5/package-json.52
-rw-r--r--deps/npm/man/man7/config.72
-rw-r--r--deps/npm/man/man7/package-spec.7145
-rw-r--r--deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js2
-rw-r--r--deps/npm/node_modules/@npmcli/arborist/package.json6
-rw-r--r--deps/npm/node_modules/@npmcli/run-script/lib/escape.js71
-rw-r--r--deps/npm/node_modules/@npmcli/run-script/lib/make-spawn-args.js92
-rw-r--r--deps/npm/node_modules/@npmcli/run-script/lib/run-script-pkg.js13
-rw-r--r--deps/npm/node_modules/@npmcli/run-script/package.json6
-rw-r--r--deps/npm/node_modules/cacache/lib/content/read.js10
-rw-r--r--deps/npm/node_modules/cacache/package.json6
-rw-r--r--deps/npm/node_modules/libnpmdiff/package.json4
-rw-r--r--deps/npm/node_modules/libnpmexec/package.json6
-rw-r--r--deps/npm/node_modules/libnpmpack/package.json6
-rw-r--r--deps/npm/node_modules/libnpmversion/package.json4
-rw-r--r--deps/npm/node_modules/make-fetch-happen/lib/agent.js5
-rw-r--r--deps/npm/node_modules/make-fetch-happen/package.json4
-rw-r--r--deps/npm/node_modules/npm-profile/lib/index.js23
-rw-r--r--deps/npm/node_modules/npm-profile/package.json6
-rw-r--r--deps/npm/node_modules/pacote/package.json4
-rw-r--r--deps/npm/node_modules/socks-proxy-agent/package.json48
-rw-r--r--deps/npm/package.json12
-rw-r--r--deps/npm/tap-snapshots/test/lib/load-all-commands.js.test.cjs83
-rw-r--r--deps/npm/tap-snapshots/test/lib/npm.js.test.cjs83
-rw-r--r--deps/npm/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs2
-rw-r--r--deps/npm/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs2
-rw-r--r--deps/npm/tap-snapshots/test/lib/utils/open-url-prompt.js.test.cjs25
-rw-r--r--deps/npm/test/lib/auth/legacy.js2
-rw-r--r--deps/npm/test/lib/commands/edit.js31
-rw-r--r--deps/npm/test/lib/commands/restart.js12
-rw-r--r--deps/npm/test/lib/commands/start.js13
-rw-r--r--deps/npm/test/lib/commands/stop.js12
-rw-r--r--deps/npm/test/lib/commands/test.js12
-rw-r--r--deps/npm/test/lib/commands/view.js9
-rw-r--r--deps/npm/test/lib/utils/open-url-prompt.js150
141 files changed, 1566 insertions, 612 deletions
diff --git a/deps/npm/docs/content/commands/npm-cache.md b/deps/npm/docs/content/commands/npm-cache.md
index 091e26e8a7..b5eddd46c0 100644
--- a/deps/npm/docs/content/commands/npm-cache.md
+++ b/deps/npm/docs/content/commands/npm-cache.md
@@ -11,11 +11,7 @@ description: Manipulates packages cache
<!-- see lib/commands/cache.js -->
```bash
-npm cache add <tarball file>
-npm cache add <folder>
-npm cache add <tarball url>
-npm cache add <git url>
-npm cache add <name>@<version>
+npm cache add <package-spec>
npm cache clean [<key>]
npm cache ls [<name>@<version>]
npm cache verify
@@ -101,6 +97,7 @@ cache`](/commands/npm-cache)
### See Also
+* [package spec](/using-npm/package-spec)
* [npm folders](/configuring-npm/folders)
* [npm config](/commands/npm-config)
* [npmrc](/configuring-npm/npmrc)
diff --git a/deps/npm/docs/content/commands/npm-ci.md b/deps/npm/docs/content/commands/npm-ci.md
index 3374bf1e25..9b8238d05a 100644
--- a/deps/npm/docs/content/commands/npm-ci.md
+++ b/deps/npm/docs/content/commands/npm-ci.md
@@ -133,7 +133,7 @@ will *not* run any pre- or post-scripts.
* Type: null or String
The shell to use for scripts run with the `npm exec`, `npm run` and `npm
-init <pkg>` commands.
+init <package-spec>` commands.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/deps/npm/docs/content/commands/npm-deprecate.md b/deps/npm/docs/content/commands/npm-deprecate.md
index 4345120d37..20f65140fc 100644
--- a/deps/npm/docs/content/commands/npm-deprecate.md
+++ b/deps/npm/docs/content/commands/npm-deprecate.md
@@ -11,7 +11,7 @@ description: Deprecate a version of a package
<!-- see lib/commands/deprecate.js -->
```bash
-npm deprecate <pkg>[@<version>] <message>
+npm deprecate <package-spec> <message>
```
<!-- automatically generated, do not edit manually -->
@@ -45,8 +45,8 @@ In this case, a version `my-thing@1.0.0-beta.0` will also be deprecated.
You must be the package owner to deprecate something. See the `owner` and
`adduser` help topics.
-To un-deprecate a package, specify an empty string (`""`) for the `message`
-argument. Note that you must use double quotes with no space between them to
+To un-deprecate a package, specify an empty string (`""`) for the `message`
+argument. Note that you must use double quotes with no space between them to
format an empty string.
### Configuration
@@ -82,6 +82,7 @@ password, npm will prompt on the command line for one.
### See Also
+* [package spec](/using-npm/package-spec)
* [npm publish](/commands/npm-publish)
* [npm registry](/using-npm/registry)
* [npm owner](/commands/npm-owner)
diff --git a/deps/npm/docs/content/commands/npm-dist-tag.md b/deps/npm/docs/content/commands/npm-dist-tag.md
index b9caf1fbe7..123e67dbf3 100644
--- a/deps/npm/docs/content/commands/npm-dist-tag.md
+++ b/deps/npm/docs/content/commands/npm-dist-tag.md
@@ -11,9 +11,9 @@ description: Modify package distribution tags
<!-- see lib/commands/dist-tag.js -->
```bash
-npm dist-tag add <pkg>@<version> [<tag>]
-npm dist-tag rm <pkg> <tag>
-npm dist-tag ls [<pkg>]
+npm dist-tag add <package-spec (with version)> [<tag>]
+npm dist-tag rm <package-spec> <tag>
+npm dist-tag ls [<package-spec>]
alias: dist-tags
```
@@ -27,11 +27,11 @@ alias: dist-tags
Add, remove, and enumerate distribution tags on a package:
-* add: Tags the specified version of the package with the specified tag, or
- the `--tag` config if not specified. If you have two-factor
- authentication on auth-and-writes then you’ll need to include a one-time
- password on the command line with `--otp <one-time password>`, or at the
- OTP prompt.
+* add: Tags the specified version of the package with the specified tag,
+ or the `--tag` config if not specified. If you have two-factor
+ authentication on auth-and-writes then you’ll need to include a
+ one-time password on the command line with
+ `--otp <one-time password>`, or at the OTP prompt.
* rm: Clear a tag that is no longer in use from the package. If you have
two-factor authentication on auth-and-writes then you’ll need to include
@@ -168,6 +168,7 @@ This value is not exported to the environment for child processes.
### See Also
+* [package spec](/using-npm/package-spec)
* [npm publish](/commands/npm-publish)
* [npm install](/commands/npm-install)
* [npm dedupe](/commands/npm-dedupe)
diff --git a/deps/npm/docs/content/commands/npm-explain.md b/deps/npm/docs/content/commands/npm-explain.md
index 7652210565..5ba2fe8206 100644
--- a/deps/npm/docs/content/commands/npm-explain.md
+++ b/deps/npm/docs/content/commands/npm-explain.md
@@ -11,7 +11,7 @@ description: Explain installed packages
<!-- see lib/commands/explain.js -->
```bash
-npm explain <folder | specifier>
+npm explain <package-spec>
alias: why
```
@@ -26,9 +26,10 @@ alias: why
This command will print the chain of dependencies causing a given package
to be installed in the current project.
-Positional arguments can be either folders within `node_modules`, or
-`name@version-range` specifiers, which will select the dependency
-relationships to explain.
+If one or more package specs are provided, then only packages matching
+one of the specifiers will have their relationships explained.
+
+The package spec can also refer to a folder within `./node_modules`
For example, running `npm explain glob` within npm's source tree will show:
@@ -110,6 +111,7 @@ This value is not exported to the environment for child processes.
### See Also
+* [package spec](/using-npm/package-spec)
* [npm config](/commands/npm-config)
* [npmrc](/configuring-npm/npmrc)
* [npm folders](/configuring-npm/folders)
diff --git a/deps/npm/docs/content/commands/npm-fund.md b/deps/npm/docs/content/commands/npm-fund.md
index 5b96e91ab8..8db0ce910d 100644
--- a/deps/npm/docs/content/commands/npm-fund.md
+++ b/deps/npm/docs/content/commands/npm-fund.md
@@ -11,7 +11,7 @@ description: Retrieve funding information
<!-- see lib/commands/fund.js -->
```bash
-npm fund [[<@scope>/]<pkg>]
+npm fund [<package-spec>]
```
<!-- automatically generated, do not edit manually -->
@@ -23,22 +23,22 @@ npm fund [[<@scope>/]<pkg>]
This command retrieves information on how to fund the dependencies of a
given project. If no package name is provided, it will list all
-dependencies that are looking for funding in a tree structure, listing the
-type of funding and the url to visit. If a package name is provided then it
-tries to open its funding url using the `--browser` config param; if there
-are multiple funding sources for the package, the user will be instructed
-to pass the `--which` option to disambiguate.
+dependencies that are looking for funding in a tree structure, listing
+the type of funding and the url to visit. If a package name is provided
+then it tries to open its funding url using the `--browser` config
+param; if there are multiple funding sources for the package, the user
+will be instructed to pass the `--which` option to disambiguate.
The list will avoid duplicated entries and will stack all packages that
-share the same url as a single entry. Thus, the list does not have the same
-shape of the output from `npm ls`.
+share the same url as a single entry. Thus, the list does not have the
+same shape of the output from `npm ls`.
#### Example
### Workspaces support
-It's possible to filter the results to only include a single workspace and its
-dependencies using the `workspace` config option.
+It's possible to filter the results to only include a single workspace
+and its dependencies using the `workspace` config option.
#### Example:
@@ -58,8 +58,8 @@ test-workspaces-fund@1.0.0
`-- bar@2.0.0
```
-And here is an example of the expected result when filtering only by
-a specific workspace `a` in the same project:
+And here is an example of the expected result when filtering only by a
+specific workspace `a` in the same project:
```bash
$ npm fund -w a
@@ -156,6 +156,7 @@ If there are multiple funding sources, which 1-indexed source URL to open.
## See Also
+* [package spec](/using-npm/package-spec)
* [npm install](/commands/npm-install)
* [npm docs](/commands/npm-docs)
* [npm ls](/commands/npm-ls)
diff --git a/deps/npm/docs/content/commands/npm-init.md b/deps/npm/docs/content/commands/npm-init.md
index 35343cceb4..cd0be4643e 100644
--- a/deps/npm/docs/content/commands/npm-init.md
+++ b/deps/npm/docs/content/commands/npm-init.md
@@ -11,9 +11,8 @@ description: Create a package.json file
<!-- see lib/commands/init.js -->
```bash
-npm init [--force|-f|--yes|-y|--scope]
+npm init <package-spec> (same as `npx <package-spec>)
npm init <@scope> (same as `npx <@scope>/create`)
-npm init [<@scope>/]<name> (same as `npx [<@scope>/]create-<name>`)
aliases: create, innit
```
@@ -207,6 +206,39 @@ recommended that you do not use this option!
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
+#### `scope`
+
+* Default: the scope of the current project, if any, or ""
+* Type: String
+
+Associate an operation with a scope for a scoped registry.
+
+Useful when logging in to or out of a private registry:
+
+```
+# log in, linking the scope to the custom registry
+npm login --scope=@mycorp --registry=https://registry.mycorp.com
+
+# log out, removing the link and the auth token
+npm logout --scope=@mycorp
+```
+
+This will cause `@mycorp` to be mapped to the registry for future
+installation of packages specified according to the pattern
+`@mycorp/package`.
+
+This will also cause `npm init` to create a scoped package.
+
+```
+# accept all defaults, and create a package named "@foo/whatever",
+# instead of just named "whatever"
+npm init --scope=@foo --yes
+```
+
+
+<!-- automatically generated, do not edit manually -->
+<!-- see lib/utils/config/definitions.js -->
+
#### `workspace`
* Default:
@@ -284,6 +316,7 @@ This value is not exported to the environment for child processes.
### See Also
+* [package spec](/using-npm/package-spec)
* [init-package-json module](http://npm.im/init-package-json)
* [package.json](/configuring-npm/package-json)
* [npm version](/commands/npm-version)
diff --git a/deps/npm/docs/content/commands/npm-install-ci-test.md b/deps/npm/docs/content/commands/npm-install-ci-test.md
index 0d9470acf5..74ed4667e8 100644
--- a/deps/npm/docs/content/commands/npm-install-ci-test.md
+++ b/deps/npm/docs/content/commands/npm-install-ci-test.md
@@ -79,7 +79,7 @@ will *not* run any pre- or post-scripts.
* Type: null or String
The shell to use for scripts run with the `npm exec`, `npm run` and `npm
-init <pkg>` commands.
+init <package-spec>` commands.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/deps/npm/docs/content/commands/npm-install-test.md b/deps/npm/docs/content/commands/npm-install-test.md
index 3dd860ea5c..d27686e731 100644
--- a/deps/npm/docs/content/commands/npm-install-test.md
+++ b/deps/npm/docs/content/commands/npm-install-test.md
@@ -11,16 +11,7 @@ description: Install package(s) and run tests
<!-- see lib/commands/install-test.js -->
```bash
-npm install-test [<@scope>/]<pkg>
-npm install-test [<@scope>/]<pkg>@<tag>
-npm install-test [<@scope>/]<pkg>@<version>
-npm install-test [<@scope>/]<pkg>@<version range>
-npm install-test <alias>@npm:<name>
-npm install-test <folder>
-npm install-test <tarball file>
-npm install-test <tarball url>
-npm install-test <git:// url>
-npm install-test <github username>/<github project>
+npm install-test [<package-spec> ...]
alias: it
```
diff --git a/deps/npm/docs/content/commands/npm-install.md b/deps/npm/docs/content/commands/npm-install.md
index d6668a2c2b..7e5544f85e 100644
--- a/deps/npm/docs/content/commands/npm-install.md
+++ b/deps/npm/docs/content/commands/npm-install.md
@@ -11,16 +11,7 @@ description: Install a package
<!-- see lib/commands/install.js -->
```bash
-npm install [<@scope>/]<pkg>
-npm install [<@scope>/]<pkg>@<tag>
-npm install [<@scope>/]<pkg>@<version>
-npm install [<@scope>/]<pkg>@<version range>
-npm install <alias>@npm:<name>
-npm install <folder>
-npm install <tarball file>
-npm install <tarball url>
-npm install <git:// url>
-npm install <github username>/<github project>
+npm install [<package-spec> ...]
aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall
```
diff --git a/deps/npm/docs/content/commands/npm-link.md b/deps/npm/docs/content/commands/npm-link.md
index 975c807c38..8c1b422493 100644
--- a/deps/npm/docs/content/commands/npm-link.md
+++ b/deps/npm/docs/content/commands/npm-link.md
@@ -11,8 +11,7 @@ description: Symlink a package folder
<!-- see lib/commands/link.js -->
```bash
-npm link (in package dir)
-npm link [<@scope>/]<pkg>[@<version>]
+npm link [<package-spec>]
alias: ln
```
@@ -29,11 +28,11 @@ test iteratively without having to continually rebuild.
Package linking is a two-step process.
-First, `npm link` in a package folder will create a symlink in the global
-folder `{prefix}/lib/node_modules/<package>` that links to the package
-where the `npm link` command was executed. It will also link any bins in
-the package to `{prefix}/bin/{name}`. Note that `npm link` uses the global
-prefix (see `npm prefix -g` for its value).
+First, `npm link` in a package folder with no arguments will create a
+symlink in the global folder `{prefix}/lib/node_modules/<package>` that
+links to the package where the `npm link` command was executed. It will
+also link any bins in the package to `{prefix}/bin/{name}`. Note that
+`npm link` uses the global prefix (see `npm prefix -g` for its value).
Next, in some other location, `npm link package-name` will create a
symbolic link from globally-installed `package-name` to `node_modules/` of
@@ -399,6 +398,7 @@ symlink. This option has no effect on workspaces.
### See Also
+* [package spec](/using-npm/package-spec)
* [npm developers](/using-npm/developers)
* [package.json](/configuring-npm/package-json)
* [npm install](/commands/npm-install)
diff --git a/deps/npm/docs/content/commands/npm-ls.md b/deps/npm/docs/content/commands/npm-ls.md
index ded8c0c0d2..a97c5168e6 100644
--- a/deps/npm/docs/content/commands/npm-ls.md
+++ b/deps/npm/docs/content/commands/npm-ls.md
@@ -11,7 +11,7 @@ description: List installed packages
<!-- see lib/commands/ls.js -->
```bash
-npm ls [[<@scope>/]<pkg> ...]
+npm ls <package-spec>
alias: list
```
@@ -301,6 +301,7 @@ symlink. This option has no effect on workspaces.
### See Also
+* [package spec](/using-npm/package-spec)
* [npm explain](/commands/npm-explain)
* [npm config](/commands/npm-config)
* [npmrc](/configuring-npm/npmrc)
diff --git a/deps/npm/docs/content/commands/npm-outdated.md b/deps/npm/docs/content/commands/npm-outdated.md
index 6fa026550e..c4e07a0cd3 100644
--- a/deps/npm/docs/content/commands/npm-outdated.md
+++ b/deps/npm/docs/content/commands/npm-outdated.md
@@ -11,7 +11,7 @@ description: Check for outdated packages
<!-- see lib/commands/outdated.js -->
```bash
-npm outdated [[<@scope>/]<pkg> ...]
+npm outdated [<package-spec> ...]
```
<!-- automatically generated, do not edit manually -->
@@ -192,6 +192,7 @@ This value is not exported to the environment for child processes.
### See Also
+* [package spec](/using-npm/package-spec)
* [npm update](/commands/npm-update)
* [npm dist-tag](/commands/npm-dist-tag)
* [npm registry](/using-npm/registry)
diff --git a/deps/npm/docs/content/commands/npm-owner.md b/deps/npm/docs/content/commands/npm-owner.md
index 72dfe6a22d..ebc29ef693 100644
--- a/deps/npm/docs/content/commands/npm-owner.md
+++ b/deps/npm/docs/content/commands/npm-owner.md
@@ -11,9 +11,9 @@ description: Manage package owners
<!-- see lib/commands/owner.js -->
```bash
-npm owner add <user> [<@scope>/]<pkg>
-npm owner rm <user> [<@scope>/]<pkg>
-npm owner ls [<@scope>/]<pkg>
+npm owner add <user> <package-spec>
+npm owner rm <user> <package-spec>
+npm owner ls <package-spec>
alias: author
```
@@ -123,6 +123,7 @@ This value is not exported to the environment for child processes.
### See Also
+* [package spec](/using-npm/package-spec)
* [npm profile](/commands/npm-profile)
* [npm publish](/commands/npm-publish)
* [npm registry](/using-npm/registry)
diff --git a/deps/npm/docs/content/commands/npm-pack.md b/deps/npm/docs/content/commands/npm-pack.md
index fa6c005e9d..7921042eae 100644
--- a/deps/npm/docs/content/commands/npm-pack.md
+++ b/deps/npm/docs/content/commands/npm-pack.md
@@ -11,7 +11,7 @@ description: Create a tarball from a package
<!-- see lib/commands/pack.js -->
```bash
-npm pack [[<@scope>/]<pkg>...]
+npm pack <package-spec>
```
<!-- automatically generated, do not edit manually -->
@@ -144,6 +144,7 @@ If no arguments are supplied, then npm packs the current package folder.
### See Also
+* [package spec](/using-npm/package-spec)
* [npm-packlist package](http://npm.im/npm-packlist)
* [npm cache](/commands/npm-cache)
* [npm publish](/commands/npm-publish)
diff --git a/deps/npm/docs/content/commands/npm-publish.md b/deps/npm/docs/content/commands/npm-publish.md
index 2995f6bc81..536d04988e 100644
--- a/deps/npm/docs/content/commands/npm-publish.md
+++ b/deps/npm/docs/content/commands/npm-publish.md
@@ -11,7 +11,7 @@ description: Publish a package
<!-- see lib/commands/publish.js -->
```bash
-npm publish [<folder>]
+npm publish <package-spec>
```
<!-- automatically generated, do not edit manually -->
@@ -23,42 +23,26 @@ npm publish [<folder>]
Publishes a package to the registry so that it can be installed by name.
-By default npm will publish to the public registry. This can be overridden
-by specifying a different default registry or using a
-[`scope`](/using-npm/scope) in the name (see
+By default npm will publish to the public registry. This can be
+overridden by specifying a different default registry or using a
+[`scope`](/using-npm/scope) in the name, combined with a
+scope-configured registry (see
[`package.json`](/configuring-npm/package-json)).
-* `<folder>`: A folder containing a package.json file
-* `<tarball>`: A url or file path to a gzipped tar archive containing a
- single folder with a package.json file inside.
+A `package` is interpreted the same way as other commands (like
+`npm install` and can be:
-* `[--tag <tag>]`: Registers the published package with the given tag, such
- that `npm install <name>@<tag>` will install this version. By default,
- `npm publish` updates and `npm install` installs the `latest` tag. See
- [`npm-dist-tag`](npm-dist-tag) for details about tags.
-
-* `[--access <public|restricted>]`: Tells the registry whether this package
- should be published as public or restricted. Only applies to scoped
- packages, which default to `restricted`. If you don't have a paid
- account, you must publish with `--access public` to publish scoped
- packages.
-
-* `[--otp <otpcode>]`: If you have two-factor authentication enabled in
- `auth-and-writes` mode then you can provide a code from your
- authenticator with this. If you don't include this and you're running
- from a TTY then you'll be prompted.
-
-* `[--dry-run]`: As of `npm@6`, does everything publish would do except
- actually publishing to the registry. Reports the details of what would
- have been published.
-
-* `[--workspaces]`: Enables workspace context while publishing. All
- workspace packages will be published.
-
-* `[--workspace]`: Enables workspaces context and limits results to only
- those specified by this config item. Only the packages in the
- workspaces given will be published.
+* a) a folder containing a program described by a
+ [`package.json`](/configuring-npm/package-json) file
+* b) a gzipped tarball containing (a)
+* c) a url that resolves to (b)
+* d) a `<name>@<version>` that is published on the registry (see
+ [`registry`](/using-npm/registry)) with (c)
+* e) a `<name>@<tag>` (see [`npm dist-tag`](/commands/npm-dist-tag)) that
+ points to (d)
+* f) a `<name>` that has a "latest" tag satisfying (e)
+* g) a `<git remote url>` that resolves to (a)
The publish will fail if the package name and version combination already
exists in the specified registry.
@@ -247,6 +231,7 @@ This value is not exported to the environment for child processes.
### See Also
+* [package spec](/using-npm/package-spec)
* [npm-packlist package](http://npm.im/npm-packlist)
* [npm registry](/using-npm/registry)
* [npm scope](/using-npm/scope)
diff --git a/deps/npm/docs/content/commands/npm-rebuild.md b/deps/npm/docs/content/commands/npm-rebuild.md
index 52c368c8c5..6a39642121 100644
--- a/deps/npm/docs/content/commands/npm-rebuild.md
+++ b/deps/npm/docs/content/commands/npm-rebuild.md
@@ -11,7 +11,7 @@ description: Rebuild a package
<!-- see lib/commands/rebuild.js -->
```bash
-npm rebuild [[<@scope>/]<name>[@<version>] ...]
+npm rebuild [<package-spec>] ...]
alias: rb
```
@@ -29,9 +29,8 @@ C++ addons with the new binary. It is also useful when installing with
`--ignore-scripts` and `--no-bin-links`, to explicitly choose which
packages to build and/or link bins.
-If one or more package names (and optionally version ranges) are provided,
-then only packages with a name and version matching one of the specifiers
-will be rebuilt.
+If one or more package specs are provided, then only packages with a
+name and version matching one of the specifiers will be rebuilt.
### Configuration
@@ -178,4 +177,5 @@ symlink. This option has no effect on workspaces.
### See Also
+* [package spec](/using-npm/package-spec)
* [npm install](/commands/npm-install)
diff --git a/deps/npm/docs/content/commands/npm-restart.md b/deps/npm/docs/content/commands/npm-restart.md
index f01cd014e7..048bebb165 100644
--- a/deps/npm/docs/content/commands/npm-restart.md
+++ b/deps/npm/docs/content/commands/npm-restart.md
@@ -69,7 +69,7 @@ will *not* run any pre- or post-scripts.
* Type: null or String
The shell to use for scripts run with the `npm exec`, `npm run` and `npm
-init <pkg>` commands.
+init <package-spec>` commands.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/deps/npm/docs/content/commands/npm-run-script.md b/deps/npm/docs/content/commands/npm-run-script.md
index 73c4b1c7a7..d94040f1a2 100644
--- a/deps/npm/docs/content/commands/npm-run-script.md
+++ b/deps/npm/docs/content/commands/npm-run-script.md
@@ -246,7 +246,7 @@ will *not* run any pre- or post-scripts.
* Type: null or String
The shell to use for scripts run with the `npm exec`, `npm run` and `npm
-init <pkg>` commands.
+init <package-spec>` commands.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/deps/npm/docs/content/commands/npm-star.md b/deps/npm/docs/content/commands/npm-star.md
index 00ef17a816..3e81c6a55b 100644
--- a/deps/npm/docs/content/commands/npm-star.md
+++ b/deps/npm/docs/content/commands/npm-star.md
@@ -11,7 +11,7 @@ description: Mark your favorite packages
<!-- see lib/commands/star.js -->
```bash
-npm star [<pkg>...]
+npm star [<package-spec>...]
```
<!-- automatically generated, do not edit manually -->
@@ -87,6 +87,7 @@ password, npm will prompt on the command line for one.
### See Also
+* [package spec](/using-npm/package-spec)
* [npm unstar](/commands/npm-unstar)
* [npm stars](/commands/npm-stars)
* [npm view](/commands/npm-view)
diff --git a/deps/npm/docs/content/commands/npm-start.md b/deps/npm/docs/content/commands/npm-start.md
index 8dd874b3c7..148f92606d 100644
--- a/deps/npm/docs/content/commands/npm-start.md
+++ b/deps/npm/docs/content/commands/npm-start.md
@@ -80,7 +80,7 @@ will *not* run any pre- or post-scripts.
* Type: null or String
The shell to use for scripts run with the `npm exec`, `npm run` and `npm
-init <pkg>` commands.
+init <package-spec>` commands.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/deps/npm/docs/content/commands/npm-stop.md b/deps/npm/docs/content/commands/npm-stop.md
index 9a3a55cf3f..a3084e8432 100644
--- a/deps/npm/docs/content/commands/npm-stop.md
+++ b/deps/npm/docs/content/commands/npm-stop.md
@@ -73,7 +73,7 @@ will *not* run any pre- or post-scripts.
* Type: null or String
The shell to use for scripts run with the `npm exec`, `npm run` and `npm
-init <pkg>` commands.
+init <package-spec>` commands.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/deps/npm/docs/content/commands/npm-test.md b/deps/npm/docs/content/commands/npm-test.md
index 8a343ab299..72bb899d0b 100644
--- a/deps/npm/docs/content/commands/npm-test.md
+++ b/deps/npm/docs/content/commands/npm-test.md
@@ -70,7 +70,7 @@ will *not* run any pre- or post-scripts.
* Type: null or String
The shell to use for scripts run with the `npm exec`, `npm run` and `npm
-init <pkg>` commands.
+init <package-spec>` commands.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/deps/npm/docs/content/commands/npm-unpublish.md b/deps/npm/docs/content/commands/npm-unpublish.md
index a4c481ea5a..9ad99e72a5 100644
--- a/deps/npm/docs/content/commands/npm-unpublish.md
+++ b/deps/npm/docs/content/commands/npm-unpublish.md
@@ -11,7 +11,7 @@ description: Remove a package from the registry
<!-- see lib/commands/unpublish.js -->
```bash
-npm unpublish [<@scope>/]<pkg>[@<version>]
+npm unpublish [<package-spec>]
```
<!-- automatically generated, do not edit manually -->
@@ -146,6 +146,7 @@ This value is not exported to the environment for child processes.
### See Also
+* [package spec](/using-npm/package-spec)
* [npm deprecate](/commands/npm-deprecate)
* [npm publish](/commands/npm-publish)
* [npm registry](/using-npm/registry)
diff --git a/deps/npm/docs/content/commands/npm-unstar.md b/deps/npm/docs/content/commands/npm-unstar.md
index 76202190da..636e1b6ac0 100644
--- a/deps/npm/docs/content/commands/npm-unstar.md
+++ b/deps/npm/docs/content/commands/npm-unstar.md
@@ -11,7 +11,7 @@ description: Remove an item from your favorite packages
<!-- see lib/commands/unstar.js -->
```bash
-npm unstar [<pkg>...]
+npm unstar [<package-spec>...]
```
<!-- automatically generated, do not edit manually -->
diff --git a/deps/npm/docs/content/commands/npm-view.md b/deps/npm/docs/content/commands/npm-view.md
index 0ef17d8adf..d9d1daac0c 100644
--- a/deps/npm/docs/content/commands/npm-view.md
+++ b/deps/npm/docs/content/commands/npm-view.md
@@ -11,7 +11,7 @@ description: View registry info
<!-- see lib/commands/view.js -->
```bash
-npm view [<@scope>/]<pkg>[@<version>] [<field>[.subfield]...]
+npm view [<package-spec>] [<field>[.subfield]...]
aliases: info, show, v
```
@@ -203,6 +203,7 @@ the field name.
### See Also
+* [package spec](/using-npm/package-spec)
* [npm search](/commands/npm-search)
* [npm registry](/using-npm/registry)
* [npm config](/commands/npm-config)
diff --git a/deps/npm/docs/content/configuring-npm/package-json.md b/deps/npm/docs/content/configuring-npm/package-json.md
index 8b188cfb0b..64081350af 100644
--- a/deps/npm/docs/content/configuring-npm/package-json.md
+++ b/deps/npm/docs/content/configuring-npm/package-json.md
@@ -222,7 +222,7 @@ npm also sets a top-level "maintainers" field with your npm user info.
### funding
-You can specify an object containing an URL that provides up-to-date
+You can specify an object containing a URL that provides up-to-date
information about ways to help fund development of your package, or a
string URL, or an array of these:
diff --git a/deps/npm/docs/content/using-npm/config.md b/deps/npm/docs/content/using-npm/config.md
index 6ef854eb6e..3fb4314026 100644
--- a/deps/npm/docs/content/using-npm/config.md
+++ b/deps/npm/docs/content/using-npm/config.md
@@ -1518,7 +1518,7 @@ npm init --scope=@foo --yes
* Type: null or String
The shell to use for scripts run with the `npm exec`, `npm run` and `npm
-init <pkg>` commands.
+init <package-spec>` commands.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/deps/npm/docs/content/using-npm/package-spec.md b/deps/npm/docs/content/using-npm/package-spec.md
new file mode 100644
index 0000000000..0d3741018f
--- /dev/null
+++ b/deps/npm/docs/content/using-npm/package-spec.md
@@ -0,0 +1,106 @@
+---
+title: package-spec
+section: 7
+description: Package name specifier
+---
+
+
+### Description
+
+Commands like `npm install` and the dependency sections in the
+`package.json` use a package name specifier. This can be many different
+things that all refer to a "package". Examples include a package name,
+git url, tarball, or local directory. These will generally be referred
+to as `<package-spec>` in the help output for the npm commands that use
+this package name specifier.
+
+### Package name
+
+* `[<@scope>/]<pkg>`
+* `[<@scope>/]<pkg>@<tag>`
+* `[<@scope>/]<pkg>@<version>`
+* `[<@scope>/]<pkg>@<version range>`
+
+Refers to a package by name, with or without a scope, and optionally
+tag, version, or version range. This is typically used in combination
+with the [registry](/using-npm/config#registry) config to refer to a
+package in a registry.
+
+Examples:
+* `npm`
+* `@npmcli/arborist`
+* `@npmcli/arborist@latest`
+* `npm@6.13.1`
+* `npm@^4.0.0`
+
+### Aliases
+
+* `<alias>@npm:<name>`
+
+Primarily used by commands like `npm install` and in the dependency
+sections in the `package.json`, this refers to a package by an alias.
+The `<alias>` is the name of the package as it is reified in the
+`node_modules` folder, and the `<name>` refers to a package name as
+found in the configured registry.
+
+See `Package name` above for more info on referring to a package by
+name, and [registry](/using-npm/config#registry) for configuring which
+registry is used when referring to a package by name.
+
+Examples:
+* `semver:@npm:@npmcli/semver-with-patch`
+* `semver:@npm:semver@7.2.2`
+* `semver:@npm:semver@legacy`
+
+### Folders
+
+* `<folder>`
+
+This refers to a package on the local filesystem. Specifically this is
+a folder with a `package.json` file in it. This *should* always be
+prefixed with a `/` or `./` (or your OS equivalent) to reduce confusion.
+npm currently will parse a string with more than one `/` in it as a
+folder, but this is legacy behavior that may be removed in a future
+version.
+
+Examples:
+
+* `./my-package`
+* `/opt/npm/my-package`
+
+### Tarballs
+
+* `<tarball file>`
+* `<tarball url>`
+
+Examples:
+
+* `./my-package.tgz`
+* `https://registry.npmjs.org/semver/-/semver-1.0.0.tgz`
+
+Refers to a package in a tarball format, either on the local filesystem
+or remotely via url. This is the format that packages exist in when
+uploaded to a registry.
+
+### git urls
+
+* `<git:// url>`
+* `<github username>/<github project>`
+
+Refers to a package in a git repo. This can be a full git url, git
+shorthand, or a username/package on GitHub. You can specify a
+git tag, branch, or other git ref by appending `#ref`.
+
+Examples:
+
+* `https://github.com/npm/cli.git`
+* `git@github.com:npm/cli.git`
+* `git+ssh://git@github.com/npm/cli#v6.0.0`
+* `github:npm/cli#HEAD`
+* `npm/cli#c12ea07`
+
+### See also
+
+[npm-package-arg](https://npm.im/npm-package-arg)
+[scope](/using-npm/scope)
+[config](/using-npm/config)
diff --git a/deps/npm/docs/output/commands/npm-cache.html b/deps/npm/docs/output/commands/npm-cache.html
index c5d6869b34..ad29cc7381 100644
--- a/deps/npm/docs/output/commands/npm-cache.html
+++ b/deps/npm/docs/output/commands/npm-cache.html
@@ -149,11 +149,7 @@ npm command-line interface
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
-<pre lang="bash"><code>npm cache add &lt;tarball file&gt;
-npm cache add &lt;folder&gt;
-npm cache add &lt;tarball url&gt;
-npm cache add &lt;git url&gt;
-npm cache add &lt;name&gt;@&lt;version&gt;
+<pre lang="bash"><code>npm cache add &lt;package-spec&gt;
npm cache clean [&lt;key&gt;]
npm cache ls [&lt;name&gt;@&lt;version&gt;]
npm cache verify
@@ -224,6 +220,7 @@ data that was inserted.</p>
<!-- raw HTML omitted -->
<h3 id="see-also">See Also</h3>
<ul>
+<li><a href="../using-npm/package-spec.html">package spec</a></li>
<li><a href="../configuring-npm/folders.html">npm folders</a></li>
<li><a href="../commands/npm-config.html">npm config</a></li>
<li><a href="../configuring-npm/npmrc.html">npmrc</a></li>
diff --git a/deps/npm/docs/output/commands/npm-ci.html b/deps/npm/docs/output/commands/npm-ci.html
index 4f9a194ae5..abc8ce6deb 100644
--- a/deps/npm/docs/output/commands/npm-ci.html
+++ b/deps/npm/docs/output/commands/npm-ci.html
@@ -245,7 +245,7 @@ will <em>not</em> run any pre- or post-scripts.</p>
<li>Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows</li>
<li>Type: null or String</li>
</ul>
-<p>The shell to use for scripts run with the <code>npm exec</code>, <code>npm run</code> and <code>npm init &lt;pkg&gt;</code> commands.</p>
+<p>The shell to use for scripts run with the <code>npm exec</code>, <code>npm run</code> and <code>npm init &lt;package-spec&gt;</code> commands.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
diff --git a/deps/npm/docs/output/commands/npm-deprecate.html b/deps/npm/docs/output/commands/npm-deprecate.html
index 52a9ef82c3..5b1d3489ca 100644
--- a/deps/npm/docs/output/commands/npm-deprecate.html
+++ b/deps/npm/docs/output/commands/npm-deprecate.html
@@ -149,7 +149,7 @@ npm command-line interface
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
-<pre lang="bash"><code>npm deprecate &lt;pkg&gt;[@&lt;version&gt;] &lt;message&gt;
+<pre lang="bash"><code>npm deprecate &lt;package-spec&gt; &lt;message&gt;
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
@@ -198,6 +198,7 @@ password, npm will prompt on the command line for one.</p>
<!-- raw HTML omitted -->
<h3 id="see-also">See Also</h3>
<ul>
+<li><a href="../using-npm/package-spec.html">package spec</a></li>
<li><a href="../commands/npm-publish.html">npm publish</a></li>
<li><a href="../using-npm/registry.html">npm registry</a></li>
<li><a href="../commands/npm-owner.html">npm owner</a></li>
diff --git a/deps/npm/docs/output/commands/npm-dist-tag.html b/deps/npm/docs/output/commands/npm-dist-tag.html
index 8615aec686..a6cdc6230b 100644
--- a/deps/npm/docs/output/commands/npm-dist-tag.html
+++ b/deps/npm/docs/output/commands/npm-dist-tag.html
@@ -149,9 +149,9 @@ npm command-line interface
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
-<pre lang="bash"><code>npm dist-tag add &lt;pkg&gt;@&lt;version&gt; [&lt;tag&gt;]
-npm dist-tag rm &lt;pkg&gt; &lt;tag&gt;
-npm dist-tag ls [&lt;pkg&gt;]
+<pre lang="bash"><code>npm dist-tag add &lt;package-spec (with version)&gt; [&lt;tag&gt;]
+npm dist-tag rm &lt;package-spec&gt; &lt;tag&gt;
+npm dist-tag ls [&lt;package-spec&gt;]
alias: dist-tags
</code></pre>
@@ -162,11 +162,11 @@ alias: dist-tags
<p>Add, remove, and enumerate distribution tags on a package:</p>
<ul>
<li>
-<p>add: Tags the specified version of the package with the specified tag, or
-the <code>--tag</code> config if not specified. If you have two-factor
-authentication on auth-and-writes then you’ll need to include a one-time
-password on the command line with <code>--otp &lt;one-time password&gt;</code>, or at the
-OTP prompt.</p>
+<p>add: Tags the specified version of the package with the specified tag,
+or the <code>--tag</code> config if not specified. If you have two-factor
+authentication on auth-and-writes then you’ll need to include a
+one-time password on the command line with
+<code>--otp &lt;one-time password&gt;</code>, or at the OTP prompt.</p>
</li>
<li>
<p>rm: Clear a tag that is no longer in use from the package. If you have
@@ -273,6 +273,7 @@ the specified workspaces, and not on the root project.</p>
<!-- raw HTML omitted -->
<h3 id="see-also">See Also</h3>
<ul>
+<li><a href="../using-npm/package-spec.html">package spec</a></li>
<li><a href="../commands/npm-publish.html">npm publish</a></li>
<li><a href="../commands/npm-install.html">npm install</a></li>
<li><a href="../commands/npm-dedupe.html">npm dedupe</a></li>
diff --git a/deps/npm/docs/output/commands/npm-explain.html b/deps/npm/docs/output/commands/npm-explain.html
index caf5ab1506..612e18676b 100644
--- a/deps/npm/docs/output/commands/npm-explain.html
+++ b/deps/npm/docs/output/commands/npm-explain.html
@@ -149,7 +149,7 @@ npm command-line interface
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
-<pre lang="bash"><code>npm explain &lt;folder | specifier&gt;
+<pre lang="bash"><code>npm explain &lt;package-spec&gt;
alias: why
</code></pre>
@@ -159,9 +159,9 @@ alias: why
<h3 id="description">Description</h3>
<p>This command will print the chain of dependencies causing a given package
to be installed in the current project.</p>
-<p>Positional arguments can be either folders within <code>node_modules</code>, or
-<code>name@version-range</code> specifiers, which will select the dependency
-relationships to explain.</p>
+<p>If one or more package specs are provided, then only packages matching
+one of the specifiers will have their relationships explained.</p>
+<p>The package spec can also refer to a folder within <code>./node_modules</code></p>
<p>For example, running <code>npm explain glob</code> within npm's source tree will show:</p>
<pre lang="bash"><code>glob@7.1.6
node_modules/glob
@@ -229,6 +229,7 @@ brand new workspace within the project.</p>
<!-- raw HTML omitted -->
<h3 id="see-also">See Also</h3>
<ul>
+<li><a href="../using-npm/package-spec.html">package spec</a></li>
<li><a href="../commands/npm-config.html">npm config</a></li>
<li><a href="../configuring-npm/npmrc.html">npmrc</a></li>
<li><a href="../configuring-npm/folders.html">npm folders</a></li>
diff --git a/deps/npm/docs/output/commands/npm-fund.html b/deps/npm/docs/output/commands/npm-fund.html
index ba88e461c6..08389cb45b 100644
--- a/deps/npm/docs/output/commands/npm-fund.html
+++ b/deps/npm/docs/output/commands/npm-fund.html
@@ -149,7 +149,7 @@ npm command-line interface
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
-<pre lang="bash"><code>npm fund [[&lt;@scope&gt;/]&lt;pkg&gt;]
+<pre lang="bash"><code>npm fund [&lt;package-spec&gt;]
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
@@ -157,18 +157,18 @@ npm command-line interface
<h3 id="description">Description</h3>
<p>This command retrieves information on how to fund the dependencies of a
given project. If no package name is provided, it will list all
-dependencies that are looking for funding in a tree structure, listing the
-type of funding and the url to visit. If a package name is provided then it
-tries to open its funding url using the <code>--browser</code> config param; if there
-are multiple funding sources for the package, the user will be instructed
-to pass the <code>--which</code> option to disambiguate.</p>
+dependencies that are looking for funding in a tree structure, listing
+the type of funding and the url to visit. If a package name is provided
+then it tries to open its funding url using the <code>--browser</code> config
+param; if there are multiple funding sources for the package, the user
+will be instructed to pass the <code>--which</code> option to disambiguate.</p>
<p>The list will avoid duplicated entries and will stack all packages that
-share the same url as a single entry. Thus, the list does not have the same
-shape of the output from <code>npm ls</code>.</p>
+share the same url as a single entry. Thus, the list does not have the
+same shape of the output from <code>npm ls</code>.</p>
<h4 id="example">Example</h4>
<h3 id="workspaces-support">Workspaces support</h3>
-<p>It's possible to filter the results to only include a single workspace and its
-dependencies using the <code>workspace</code> config option.</p>
+<p>It's possible to filter the results to only include a single workspace
+and its dependencies using the <code>workspace</code> config option.</p>
<h4 id="example2">Example:</h4>
<p>Here's an example running <code>npm fund</code> in a project with a configured
workspace <code>a</code>:</p>
@@ -183,8 +183,8 @@ test-workspaces-fund@1.0.0
`-- https://example.com/org
`-- bar@2.0.0
</code></pre>
-<p>And here is an example of the expected result when filtering only by
-a specific workspace <code>a</code> in the same project:</p>
+<p>And here is an example of the expected result when filtering only by a
+specific workspace <code>a</code> in the same project:</p>
<pre lang="bash"><code>$ npm fund -w a
test-workspaces-fund@1.0.0
`-- https://example.com/a
@@ -262,6 +262,7 @@ brand new workspace within the project.</p>
<!-- raw HTML omitted -->
<h2 id="see-also">See Also</h2>
<ul>
+<li><a href="../using-npm/package-spec.html">package spec</a></li>
<li><a href="../commands/npm-install.html">npm install</a></li>
<li><a href="../commands/npm-docs.html">npm docs</a></li>
<li><a href="../commands/npm-ls.html">npm ls</a></li>
diff --git a/deps/npm/docs/output/commands/npm-init.html b/deps/npm/docs/output/commands/npm-init.html
index b25bfec2d4..c7c00b3531 100644
--- a/deps/npm/docs/output/commands/npm-init.html
+++ b/deps/npm/docs/output/commands/npm-init.html
@@ -142,16 +142,15 @@ npm command-line interface
<section id="table_of_contents">
<h2 id="table-of-contents">Table of contents</h2>
-<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#description">Description</a></li><ul><li><a href="#forwarding-additional-options">Forwarding additional options</a></li></ul><li><a href="#examples">Examples</a></li><li><a href="#workspaces-support">Workspaces support</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#yes"><code>yes</code></a></li><li><a href="#force"><code>force</code></a></li><li><a href="#workspace"><code>workspace</code></a></li><li><a href="#workspaces"><code>workspaces</code></a></li><li><a href="#workspaces-update"><code>workspaces-update</code></a></li><li><a href="#include-workspace-root"><code>include-workspace-root</code></a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
+<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#description">Description</a></li><ul><li><a href="#forwarding-additional-options">Forwarding additional options</a></li></ul><li><a href="#examples">Examples</a></li><li><a href="#workspaces-support">Workspaces support</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#yes"><code>yes</code></a></li><li><a href="#force"><code>force</code></a></li><li><a href="#scope"><code>scope</code></a></li><li><a href="#workspace"><code>workspace</code></a></li><li><a href="#workspaces"><code>workspaces</code></a></li><li><a href="#workspaces-update"><code>workspaces-update</code></a></li><li><a href="#include-workspace-root"><code>include-workspace-root</code></a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
-<pre lang="bash"><code>npm init [--force|-f|--yes|-y|--scope]
+<pre lang="bash"><code>npm init &lt;package-spec&gt; (same as `npx &lt;package-spec&gt;)
npm init &lt;@scope&gt; (same as `npx &lt;@scope&gt;/create`)
-npm init [&lt;@scope&gt;/]&lt;name&gt; (same as `npx [&lt;@scope&gt;/]create-&lt;name&gt;`)
aliases: create, innit
</code></pre>
@@ -300,6 +299,29 @@ range (including SemVer-major changes).</li>
recommended that you do not use this option!</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
+<h4 id="scope"><code>scope</code></h4>
+<ul>
+<li>Default: the scope of the current project, if any, or ""</li>
+<li>Type: String</li>
+</ul>
+<p>Associate an operation with a scope for a scoped registry.</p>
+<p>Useful when logging in to or out of a private registry:</p>
+<pre><code># log in, linking the scope to the custom registry
+npm login --scope=@mycorp --registry=https://registry.mycorp.com
+
+# log out, removing the link and the auth token
+npm logout --scope=@mycorp
+</code></pre>
+<p>This will cause <code>@mycorp</code> to be mapped to the registry for future
+installation of packages specified according to the pattern
+<code>@mycorp/package</code>.</p>
+<p>This will also cause <code>npm init</code> to create a scoped package.</p>
+<pre><code># accept all defaults, and create a package named "@foo/whatever",
+# instead of just named "whatever"
+npm init --scope=@foo --yes
+</code></pre>
+<!-- raw HTML omitted -->
+<!-- raw HTML omitted -->
<h4 id="workspace"><code>workspace</code></h4>
<ul>
<li>Default:</li>
@@ -363,6 +385,7 @@ the specified workspaces, and not on the root project.</p>
<!-- raw HTML omitted -->
<h3 id="see-also">See Also</h3>
<ul>
+<li><a href="../using-npm/package-spec.html">package spec</a></li>
<li><a href="http://npm.im/init-package-json">init-package-json module</a></li>
<li><a href="../configuring-npm/package-json.html">package.json</a></li>
<li><a href="../commands/npm-version.html">npm version</a></li>
diff --git a/deps/npm/docs/output/commands/npm-install-ci-test.html b/deps/npm/docs/output/commands/npm-install-ci-test.html
index b414f09027..8d3d954142 100644
--- a/deps/npm/docs/output/commands/npm-install-ci-test.html
+++ b/deps/npm/docs/output/commands/npm-install-ci-test.html
@@ -202,7 +202,7 @@ will <em>not</em> run any pre- or post-scripts.</p>
<li>Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows</li>
<li>Type: null or String</li>
</ul>
-<p>The shell to use for scripts run with the <code>npm exec</code>, <code>npm run</code> and <code>npm init &lt;pkg&gt;</code> commands.</p>
+<p>The shell to use for scripts run with the <code>npm exec</code>, <code>npm run</code> and <code>npm init &lt;package-spec&gt;</code> commands.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
diff --git a/deps/npm/docs/output/commands/npm-install-test.html b/deps/npm/docs/output/commands/npm-install-test.html
index 6306ceb593..bf2ad29400 100644
--- a/deps/npm/docs/output/commands/npm-install-test.html
+++ b/deps/npm/docs/output/commands/npm-install-test.html
@@ -149,16 +149,7 @@ npm command-line interface
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
-<pre lang="bash"><code>npm install-test [&lt;@scope&gt;/]&lt;pkg&gt;
-npm install-test [&lt;@scope&gt;/]&lt;pkg&gt;@&lt;tag&gt;
-npm install-test [&lt;@scope&gt;/]&lt;pkg&gt;@&lt;version&gt;
-npm install-test [&lt;@scope&gt;/]&lt;pkg&gt;@&lt;version range&gt;
-npm install-test &lt;alias&gt;@npm:&lt;name&gt;
-npm install-test &lt;folder&gt;
-npm install-test &lt;tarball file&gt;
-npm install-test &lt;tarball url&gt;
-npm install-test &lt;git:// url&gt;
-npm install-test &lt;github username&gt;/&lt;github project&gt;
+<pre lang="bash"><code>npm install-test [&lt;package-spec&gt; ...]
alias: it
</code></pre>
diff --git a/deps/npm/docs/output/commands/npm-install.html b/deps/npm/docs/output/commands/npm-install.html
index 509702b5bd..48f62f9e48 100644
--- a/deps/npm/docs/output/commands/npm-install.html
+++ b/deps/npm/docs/output/commands/npm-install.html
@@ -149,16 +149,7 @@ npm command-line interface
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
-<pre lang="bash"><code>npm install [&lt;@scope&gt;/]&lt;pkg&gt;
-npm install [&lt;@scope&gt;/]&lt;pkg&gt;@&lt;tag&gt;
-npm install [&lt;@scope&gt;/]&lt;pkg&gt;@&lt;version&gt;
-npm install [&lt;@scope&gt;/]&lt;pkg&gt;@&lt;version range&gt;
-npm install &lt;alias&gt;@npm:&lt;name&gt;
-npm install &lt;folder&gt;
-npm install &lt;tarball file&gt;
-npm install &lt;tarball url&gt;
-npm install &lt;git:// url&gt;
-npm install &lt;github username&gt;/&lt;github project&gt;
+<pre lang="bash"><code>npm install [&lt;package-spec&gt; ...]
aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall
</code></pre>
diff --git a/deps/npm/docs/output/commands/npm-link.html b/deps/npm/docs/output/commands/npm-link.html
index f7d5f66a9e..cd31a3ee0d 100644
--- a/deps/npm/docs/output/commands/npm-link.html
+++ b/deps/npm/docs/output/commands/npm-link.html
@@ -149,8 +149,7 @@ npm command-line interface
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
-<pre lang="bash"><code>npm link (in package dir)
-npm link [&lt;@scope&gt;/]&lt;pkg&gt;[@&lt;version&gt;]
+<pre lang="bash"><code>npm link [&lt;package-spec&gt;]
alias: ln
</code></pre>
@@ -161,11 +160,11 @@ alias: ln
<p>This is handy for installing your own stuff, so that you can work on it and
test iteratively without having to continually rebuild.</p>
<p>Package linking is a two-step process.</p>
-<p>First, <code>npm link</code> in a package folder will create a symlink in the global
-folder <code>{prefix}/lib/node_modules/&lt;package&gt;</code> that links to the package
-where the <code>npm link</code> command was executed. It will also link any bins in
-the package to <code>{prefix}/bin/{name}</code>. Note that <code>npm link</code> uses the global
-prefix (see <code>npm prefix -g</code> for its value).</p>
+<p>First, <code>npm link</code> in a package folder with no arguments will create a
+symlink in the global folder <code>{prefix}/lib/node_modules/&lt;package&gt;</code> that
+links to the package where the <code>npm link</code> command was executed. It will
+also link any bins in the package to <code>{prefix}/bin/{name}</code>. Note that
+<code>npm link</code> uses the global prefix (see <code>npm prefix -g</code> for its value).</p>
<p>Next, in some other location, <code>npm link package-name</code> will create a
symbolic link from globally-installed <code>package-name</code> to <code>node_modules/</code> of
the current folder.</p>
@@ -452,6 +451,7 @@ symlink. This option has no effect on workspaces.</p>
<!-- raw HTML omitted -->
<h3 id="see-also">See Also</h3>
<ul>
+<li><a href="../using-npm/package-spec.html">package spec</a></li>
<li><a href="../using-npm/developers.html">npm developers</a></li>
<li><a href="../configuring-npm/package-json.html">package.json</a></li>
<li><a href="../commands/npm-install.html">npm install</a></li>
diff --git a/deps/npm/docs/output/commands/npm-ls.html b/deps/npm/docs/output/commands/npm-ls.html
index 7b1c29f9a8..4363442ef3 100644
--- a/deps/npm/docs/output/commands/npm-ls.html
+++ b/deps/npm/docs/output/commands/npm-ls.html
@@ -149,7 +149,7 @@ npm command-line interface
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
-<pre lang="bash"><code>npm ls [[&lt;@scope&gt;/]&lt;pkg&gt; ...]
+<pre lang="bash"><code>npm ls &lt;package-spec&gt;
alias: list
</code></pre>
@@ -166,7 +166,7 @@ tree at all, use <a href="../commands/npm-explain.html"><code>npm explain</code>
the results to only the paths to the packages named. Note that nested
packages will <em>also</em> show the paths to the specified packages. For
example, running <code>npm ls promzard</code> in npm's source tree will show:</p>
-<pre lang="bash"><code>npm@8.12.1 /path/to/npm
+<pre lang="bash"><code>npm@8.13.1 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
</code></pre>
@@ -379,6 +379,7 @@ symlink. This option has no effect on workspaces.</p>
<!-- raw HTML omitted -->
<h3 id="see-also">See Also</h3>
<ul>
+<li><a href="../using-npm/package-spec.html">package spec</a></li>
<li><a href="../commands/npm-explain.html">npm explain</a></li>
<li><a href="../commands/npm-config.html">npm config</a></li>
<li><a href="../configuring-npm/npmrc.html">npmrc</a></li>
diff --git a/deps/npm/docs/output/commands/npm-outdated.html b/deps/npm/docs/output/commands/npm-outdated.html
index 0bdb9f9a66..57740228c4 100644
--- a/deps/npm/docs/output/commands/npm-outdated.html
+++ b/deps/npm/docs/output/commands/npm-outdated.html
@@ -149,7 +149,7 @@ npm command-line interface
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
-<pre lang="bash"><code>npm outdated [[&lt;@scope&gt;/]&lt;pkg&gt; ...]
+<pre lang="bash"><code>npm outdated [&lt;package-spec&gt; ...]
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
@@ -304,6 +304,7 @@ brand new workspace within the project.</p>
<!-- raw HTML omitted -->
<h3 id="see-also">See Also</h3>
<ul>
+<li><a href="../using-npm/package-spec.html">package spec</a></li>
<li><a href="../commands/npm-update.html">npm update</a></li>
<li><a href="../commands/npm-dist-tag.html">npm dist-tag</a></li>
<li><a href="../using-npm/registry.html">npm registry</a></li>
diff --git a/deps/npm/docs/output/commands/npm-owner.html b/deps/npm/docs/output/commands/npm-owner.html
index 744f782140..bf47a0ce04 100644
--- a/deps/npm/docs/output/commands/npm-owner.html
+++ b/deps/npm/docs/output/commands/npm-owner.html
@@ -149,9 +149,9 @@ npm command-line interface
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
-<pre lang="bash"><code>npm owner add &lt;user&gt; [&lt;@scope&gt;/]&lt;pkg&gt;
-npm owner rm &lt;user&gt; [&lt;@scope&gt;/]&lt;pkg&gt;
-npm owner ls [&lt;@scope&gt;/]&lt;pkg&gt;
+<pre lang="bash"><code>npm owner add &lt;user&gt; &lt;package-spec&gt;
+npm owner rm &lt;user&gt; &lt;package-spec&gt;
+npm owner ls &lt;package-spec&gt;
alias: author
</code></pre>
@@ -240,6 +240,7 @@ other things (test, exec, publish, etc.) will operate on the root project,
<!-- raw HTML omitted -->
<h3 id="see-also">See Also</h3>
<ul>
+<li><a href="../using-npm/package-spec.html">package spec</a></li>
<li><a href="../commands/npm-profile.html">npm profile</a></li>
<li><a href="../commands/npm-publish.html">npm publish</a></li>
<li><a href="../using-npm/registry.html">npm registry</a></li>
diff --git a/deps/npm/docs/output/commands/npm-pack.html b/deps/npm/docs/output/commands/npm-pack.html
index 86e45cb303..387becd8c1 100644
--- a/deps/npm/docs/output/commands/npm-pack.html
+++ b/deps/npm/docs/output/commands/npm-pack.html
@@ -149,7 +149,7 @@ npm command-line interface
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
-<pre lang="bash"><code>npm pack [[&lt;@scope&gt;/]&lt;pkg&gt;...]
+<pre lang="bash"><code>npm pack &lt;package-spec&gt;
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
@@ -255,6 +255,7 @@ overwritten the second time.</p>
<p>If no arguments are supplied, then npm packs the current package folder.</p>
<h3 id="see-also">See Also</h3>
<ul>
+<li><a href="../using-npm/package-spec.html">package spec</a></li>
<li><a href="http://npm.im/npm-packlist">npm-packlist package</a></li>
<li><a href="../commands/npm-cache.html">npm cache</a></li>
<li><a href="../commands/npm-publish.html">npm publish</a></li>
diff --git a/deps/npm/docs/output/commands/npm-publish.html b/deps/npm/docs/output/commands/npm-publish.html
index 23e5f11ea0..019295ab1f 100644
--- a/deps/npm/docs/output/commands/npm-publish.html
+++ b/deps/npm/docs/output/commands/npm-publish.html
@@ -149,58 +149,31 @@ npm command-line interface
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
-<pre lang="bash"><code>npm publish [&lt;folder&gt;]
+<pre lang="bash"><code>npm publish &lt;package-spec&gt;
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="description">Description</h3>
<p>Publishes a package to the registry so that it can be installed by name.</p>
-<p>By default npm will publish to the public registry. This can be overridden
-by specifying a different default registry or using a
-<a href="../using-npm/scope.html"><code>scope</code></a> in the name (see
+<p>By default npm will publish to the public registry. This can be
+overridden by specifying a different default registry or using a
+<a href="../using-npm/scope.html"><code>scope</code></a> in the name, combined with a
+scope-configured registry (see
<a href="../configuring-npm/package-json.html"><code>package.json</code></a>).</p>
+<p>A <code>package</code> is interpreted the same way as other commands (like
+<code>npm install</code> and can be:</p>
<ul>
-<li>
-<p><code>&lt;folder&gt;</code>: A folder containing a package.json file</p>
-</li>
-<li>
-<p><code>&lt;tarball&gt;</code>: A url or file path to a gzipped tar archive containing a
-single folder with a package.json file inside.</p>
-</li>
-<li>
-<p><code>[--tag &lt;tag&gt;]</code>: Registers the published package with the given tag, such
-that <code>npm install &lt;name&gt;@&lt;tag&gt;</code> will install this version. By default,
-<code>npm publish</code> updates and <code>npm install</code> installs the <code>latest</code> tag. See
-<a href="npm-dist-tag"><code>npm-dist-tag</code></a> for details about tags.</p>
-</li>
-<li>
-<p><code>[--access &lt;public|restricted&gt;]</code>: Tells the registry whether this package
-should be published as public or restricted. Only applies to scoped
-packages, which default to <code>restricted</code>. If you don't have a paid
-account, you must publish with <code>--access public</code> to publish scoped
-packages.</p>
-</li>
-<li>
-<p><code>[--otp &lt;otpcode&gt;]</code>: If you have two-factor authentication enabled in
-<code>auth-and-writes</code> mode then you can provide a code from your
-authenticator with this. If you don't include this and you're running
-from a TTY then you'll be prompted.</p>
-</li>
-<li>
-<p><code>[--dry-run]</code>: As of <code>npm@6</code>, does everything publish would do except
-actually publishing to the registry. Reports the details of what would
-have been published.</p>
-</li>
-<li>
-<p><code>[--workspaces]</code>: Enables workspace context while publishing. All
-workspace packages will be published.</p>
-</li>
-<li>
-<p><code>[--workspace]</code>: Enables workspaces context and limits results to only
-those specified by this config item. Only the packages in the
-workspaces given will be published.</p>
-</li>
+<li>a) a folder containing a program described by a
+<a href="../configuring-npm/package-json.html"><code>package.json</code></a> file</li>
+<li>b) a gzipped tarball containing (a)</li>
+<li>c) a url that resolves to (b)</li>
+<li>d) a <code>&lt;name&gt;@&lt;version&gt;</code> that is published on the registry (see
+<a href="../using-npm/registry.html"><code>registry</code></a>) with (c)</li>
+<li>e) a <code>&lt;name&gt;@&lt;tag&gt;</code> (see <a href="../commands/npm-dist-tag.html"><code>npm dist-tag</code></a>) that
+points to (d)</li>
+<li>f) a <code>&lt;name&gt;</code> that has a "latest" tag satisfying (e)</li>
+<li>g) a <code>&lt;git remote url&gt;</code> that resolves to (a)</li>
</ul>
<p>The publish will fail if the package name and version combination already
exists in the specified registry.</p>
@@ -361,6 +334,7 @@ the specified workspaces, and not on the root project.</p>
<!-- raw HTML omitted -->
<h3 id="see-also">See Also</h3>
<ul>
+<li><a href="../using-npm/package-spec.html">package spec</a></li>
<li><a href="http://npm.im/npm-packlist">npm-packlist package</a></li>
<li><a href="../using-npm/registry.html">npm registry</a></li>
<li><a href="../using-npm/scope.html">npm scope</a></li>
diff --git a/deps/npm/docs/output/commands/npm-rebuild.html b/deps/npm/docs/output/commands/npm-rebuild.html
index f4524f1a4f..2fdd821d59 100644
--- a/deps/npm/docs/output/commands/npm-rebuild.html
+++ b/deps/npm/docs/output/commands/npm-rebuild.html
@@ -149,7 +149,7 @@ npm command-line interface
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
-<pre lang="bash"><code>npm rebuild [[&lt;@scope&gt;/]&lt;name&gt;[@&lt;version&gt;] ...]
+<pre lang="bash"><code>npm rebuild [&lt;package-spec&gt;] ...]
alias: rb
</code></pre>
@@ -162,9 +162,8 @@ useful when you install a new version of node, and must recompile all your
C++ addons with the new binary. It is also useful when installing with
<code>--ignore-scripts</code> and <code>--no-bin-links</code>, to explicitly choose which
packages to build and/or link bins.</p>
-<p>If one or more package names (and optionally version ranges) are provided,
-then only packages with a name and version matching one of the specifiers
-will be rebuilt.</p>
+<p>If one or more package specs are provided, then only packages with a
+name and version matching one of the specifiers will be rebuilt.</p>
<h3 id="configuration">Configuration</h3>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
@@ -285,6 +284,7 @@ symlink. This option has no effect on workspaces.</p>
<!-- raw HTML omitted -->
<h3 id="see-also">See Also</h3>
<ul>
+<li><a href="../using-npm/package-spec.html">package spec</a></li>
<li><a href="../commands/npm-install.html">npm install</a></li>
</ul>
</div>
diff --git a/deps/npm/docs/output/commands/npm-restart.html b/deps/npm/docs/output/commands/npm-restart.html
index f65a170d53..0e39072664 100644
--- a/deps/npm/docs/output/commands/npm-restart.html
+++ b/deps/npm/docs/output/commands/npm-restart.html
@@ -196,7 +196,7 @@ will <em>not</em> run any pre- or post-scripts.</p>
<li>Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows</li>
<li>Type: null or String</li>
</ul>
-<p>The shell to use for scripts run with the <code>npm exec</code>, <code>npm run</code> and <code>npm init &lt;pkg&gt;</code> commands.</p>
+<p>The shell to use for scripts run with the <code>npm exec</code>, <code>npm run</code> and <code>npm init &lt;package-spec&gt;</code> commands.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
diff --git a/deps/npm/docs/output/commands/npm-run-script.html b/deps/npm/docs/output/commands/npm-run-script.html
index 6211c2b55e..d74acb0564 100644
--- a/deps/npm/docs/output/commands/npm-run-script.html
+++ b/deps/npm/docs/output/commands/npm-run-script.html
@@ -324,7 +324,7 @@ will <em>not</em> run any pre- or post-scripts.</p>
<li>Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows</li>
<li>Type: null or String</li>
</ul>
-<p>The shell to use for scripts run with the <code>npm exec</code>, <code>npm run</code> and <code>npm init &lt;pkg&gt;</code> commands.</p>
+<p>The shell to use for scripts run with the <code>npm exec</code>, <code>npm run</code> and <code>npm init &lt;package-spec&gt;</code> commands.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
diff --git a/deps/npm/docs/output/commands/npm-star.html b/deps/npm/docs/output/commands/npm-star.html
index bc1f7ae769..d442e39110 100644
--- a/deps/npm/docs/output/commands/npm-star.html
+++ b/deps/npm/docs/output/commands/npm-star.html
@@ -149,7 +149,7 @@ npm command-line interface
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
-<pre lang="bash"><code>npm star [&lt;pkg&gt;...]
+<pre lang="bash"><code>npm star [&lt;package-spec&gt;...]
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
@@ -202,6 +202,7 @@ password, npm will prompt on the command line for one.</p>
<!-- raw HTML omitted -->
<h3 id="see-also">See Also</h3>
<ul>
+<li><a href="../using-npm/package-spec.html">package spec</a></li>
<li><a href="../commands/npm-unstar.html">npm unstar</a></li>
<li><a href="../commands/npm-stars.html">npm stars</a></li>
<li><a href="../commands/npm-view.html">npm view</a></li>
diff --git a/deps/npm/docs/output/commands/npm-start.html b/deps/npm/docs/output/commands/npm-start.html
index 8cedd9855d..4f300f37ad 100644
--- a/deps/npm/docs/output/commands/npm-start.html
+++ b/deps/npm/docs/output/commands/npm-start.html
@@ -200,7 +200,7 @@ will <em>not</em> run any pre- or post-scripts.</p>
<li>Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows</li>
<li>Type: null or String</li>
</ul>
-<p>The shell to use for scripts run with the <code>npm exec</code>, <code>npm run</code> and <code>npm init &lt;pkg&gt;</code> commands.</p>
+<p>The shell to use for scripts run with the <code>npm exec</code>, <code>npm run</code> and <code>npm init &lt;package-spec&gt;</code> commands.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
diff --git a/deps/npm/docs/output/commands/npm-stop.html b/deps/npm/docs/output/commands/npm-stop.html
index 87b7d30fd8..8c91c7321a 100644
--- a/deps/npm/docs/output/commands/npm-stop.html
+++ b/deps/npm/docs/output/commands/npm-stop.html
@@ -195,7 +195,7 @@ will <em>not</em> run any pre- or post-scripts.</p>
<li>Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows</li>
<li>Type: null or String</li>
</ul>
-<p>The shell to use for scripts run with the <code>npm exec</code>, <code>npm run</code> and <code>npm init &lt;pkg&gt;</code> commands.</p>
+<p>The shell to use for scripts run with the <code>npm exec</code>, <code>npm run</code> and <code>npm init &lt;package-spec&gt;</code> commands.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
diff --git a/deps/npm/docs/output/commands/npm-test.html b/deps/npm/docs/output/commands/npm-test.html
index 5c403b94eb..c4d71b30f5 100644
--- a/deps/npm/docs/output/commands/npm-test.html
+++ b/deps/npm/docs/output/commands/npm-test.html
@@ -193,7 +193,7 @@ will <em>not</em> run any pre- or post-scripts.</p>
<li>Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows</li>
<li>Type: null or String</li>
</ul>
-<p>The shell to use for scripts run with the <code>npm exec</code>, <code>npm run</code> and <code>npm init &lt;pkg&gt;</code> commands.</p>
+<p>The shell to use for scripts run with the <code>npm exec</code>, <code>npm run</code> and <code>npm init &lt;package-spec&gt;</code> commands.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
diff --git a/deps/npm/docs/output/commands/npm-unpublish.html b/deps/npm/docs/output/commands/npm-unpublish.html
index 21fafc89eb..ab5858f266 100644
--- a/deps/npm/docs/output/commands/npm-unpublish.html
+++ b/deps/npm/docs/output/commands/npm-unpublish.html
@@ -149,7 +149,7 @@ npm command-line interface
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
-<pre lang="bash"><code>npm unpublish [&lt;@scope&gt;/]&lt;pkg&gt;[@&lt;version&gt;]
+<pre lang="bash"><code>npm unpublish [&lt;package-spec&gt;]
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
@@ -257,6 +257,7 @@ other things (test, exec, publish, etc.) will operate on the root project,
<!-- raw HTML omitted -->
<h3 id="see-also">See Also</h3>
<ul>
+<li><a href="../using-npm/package-spec.html">package spec</a></li>
<li><a href="../commands/npm-deprecate.html">npm deprecate</a></li>
<li><a href="../commands/npm-publish.html">npm publish</a></li>
<li><a href="../using-npm/registry.html">npm registry</a></li>
diff --git a/deps/npm/docs/output/commands/npm-unstar.html b/deps/npm/docs/output/commands/npm-unstar.html
index a332f857e6..c8b057f8e2 100644
--- a/deps/npm/docs/output/commands/npm-unstar.html
+++ b/deps/npm/docs/output/commands/npm-unstar.html
@@ -149,7 +149,7 @@ npm command-line interface
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
-<pre lang="bash"><code>npm unstar [&lt;pkg&gt;...]
+<pre lang="bash"><code>npm unstar [&lt;package-spec&gt;...]
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
diff --git a/deps/npm/docs/output/commands/npm-view.html b/deps/npm/docs/output/commands/npm-view.html
index 0eb17026a7..2b74e28f3b 100644
--- a/deps/npm/docs/output/commands/npm-view.html
+++ b/deps/npm/docs/output/commands/npm-view.html
@@ -149,7 +149,7 @@ npm command-line interface
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
-<pre lang="bash"><code>npm view [&lt;@scope&gt;/]&lt;pkg&gt;[@&lt;version&gt;] [&lt;field&gt;[.subfield]...]
+<pre lang="bash"><code>npm view [&lt;package-spec&gt;] [&lt;field&gt;[.subfield]...]
aliases: info, show, v
</code></pre>
@@ -285,6 +285,7 @@ will be prefixed with the version it applies to.</p>
the field name.</p>
<h3 id="see-also">See Also</h3>
<ul>
+<li><a href="../using-npm/package-spec.html">package spec</a></li>
<li><a href="../commands/npm-search.html">npm search</a></li>
<li><a href="../using-npm/registry.html">npm registry</a></li>
<li><a href="../commands/npm-config.html">npm config</a></li>
diff --git a/deps/npm/docs/output/commands/npm.html b/deps/npm/docs/output/commands/npm.html
index 040166af65..c7b7dd5dc7 100644
--- a/deps/npm/docs/output/commands/npm.html
+++ b/deps/npm/docs/output/commands/npm.html
@@ -149,7 +149,7 @@ npm command-line interface
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="version">Version</h3>
-<p>8.12.1</p>
+<p>8.13.1</p>
<h3 id="description">Description</h3>
<p>npm is the package manager for the Node JavaScript platform. It puts
modules in place so that node can find them, and manages dependency
diff --git a/deps/npm/docs/output/configuring-npm/package-json.html b/deps/npm/docs/output/configuring-npm/package-json.html
index d5860ee6e2..a3bcd299c5 100644
--- a/deps/npm/docs/output/configuring-npm/package-json.html
+++ b/deps/npm/docs/output/configuring-npm/package-json.html
@@ -304,7 +304,7 @@ you:</p>
<p>Both email and url are optional either way.</p>
<p>npm also sets a top-level "maintainers" field with your npm user info.</p>
<h3 id="funding">funding</h3>
-<p>You can specify an object containing an URL that provides up-to-date
+<p>You can specify an object containing a URL that provides up-to-date
information about ways to help fund development of your package, or a
string URL, or an array of these:</p>
<pre lang="json"><code>{
diff --git a/deps/npm/docs/output/using-npm/config.html b/deps/npm/docs/output/using-npm/config.html
index 4ec52124ff..42789d96b7 100644
--- a/deps/npm/docs/output/using-npm/config.html
+++ b/deps/npm/docs/output/using-npm/config.html
@@ -1360,7 +1360,7 @@ npm init --scope=@foo --yes
<li>Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows</li>
<li>Type: null or String</li>
</ul>
-<p>The shell to use for scripts run with the <code>npm exec</code>, <code>npm run</code> and <code>npm init &lt;pkg&gt;</code> commands.</p>
+<p>The shell to use for scripts run with the <code>npm exec</code>, <code>npm run</code> and <code>npm init &lt;package-spec&gt;</code> commands.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h4 id="searchexclude"><code>searchexclude</code></h4>
diff --git a/deps/npm/docs/output/using-npm/package-spec.html b/deps/npm/docs/output/using-npm/package-spec.html
new file mode 100644
index 0000000000..2b0855737b
--- /dev/null
+++ b/deps/npm/docs/output/using-npm/package-spec.html
@@ -0,0 +1,254 @@
+<!DOCTYPE html><html><head>
+<meta charset="utf-8">
+<title>package-spec</title>
+<style>
+body {
+ background-color: #ffffff;
+ color: #24292e;
+
+ margin: 0;
+
+ line-height: 1.5;
+
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
+}
+#rainbar {
+ height: 10px;
+ background-image: linear-gradient(139deg, #fb8817, #ff4b01, #c12127, #e02aff);
+}
+
+a {
+ text-decoration: none;
+ color: #0366d6;
+}
+a:hover {
+ text-decoration: underline;
+}
+
+pre {
+ margin: 1em 0px;
+ padding: 1em;
+ border: solid 1px #e1e4e8;
+ border-radius: 6px;
+
+ display: block;
+ overflow: auto;
+
+ white-space: pre;
+
+ background-color: #f6f8fa;
+ color: #393a34;
+}
+code {
+ font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;
+ font-size: 85%;
+ padding: 0.2em 0.4em;
+ background-color: #f6f8fa;
+ color: #393a34;
+}
+pre > code {
+ padding: 0;
+ background-color: inherit;
+ color: inherit;
+}
+h1, h2, h3 {
+ font-weight: 600;
+}
+
+#logobar {
+ background-color: #333333;
+ margin: 0 auto;
+ padding: 1em 4em;
+}
+#logobar .logo {
+ float: left;
+}
+#logobar .title {
+ font-weight: 600;
+ color: #dddddd;
+ float: left;
+ margin: 5px 0 0 1em;
+}
+#logobar:after {
+ content: "";
+ display: block;
+ clear: both;
+}
+
+#content {
+ margin: 0 auto;
+ padding: 0 4em;
+}
+
+#table_of_contents > h2 {
+ font-size: 1.17em;
+}
+#table_of_contents ul:first-child {
+ border: solid 1px #e1e4e8;
+ border-radius: 6px;
+ padding: 1em;
+ background-color: #f6f8fa;
+ color: #393a34;
+}
+#table_of_contents ul {
+ list-style-type: none;
+ padding-left: 1.5em;
+}
+#table_of_contents li {
+ font-size: 0.9em;
+}
+#table_of_contents li a {
+ color: #000000;
+}
+
+header.title {
+ border-bottom: solid 1px #e1e4e8;
+}
+header.title > h1 {
+ margin-bottom: 0.25em;
+}
+header.title > .description {
+ display: block;
+ margin-bottom: 0.5em;
+ line-height: 1;
+}
+
+footer#edit {
+ border-top: solid 1px #e1e4e8;
+ margin: 3em 0 4em 0;
+ padding-top: 2em;
+}
+</style>
+</head>
+<body>
+<div id="banner">
+<div id="rainbar"></div>
+<div id="logobar">
+<svg class="logo" role="img" height="32" width="32" viewBox="0 0 700 700">
+<polygon fill="#cb0000" points="0,700 700,700 700,0 0,0"></polygon>
+<polygon fill="#ffffff" points="150,550 350,550 350,250 450,250 450,550 550,550 550,150 150,150"></polygon>
+</svg>
+<div class="title">
+npm command-line interface
+</div>
+</div>
+</div>
+
+<section id="content">
+<header class="title">
+<h1 id="package-spec">package-spec</h1>
+<span class="description">Package name specifier</span>
+</header>
+
+<section id="table_of_contents">
+<h2 id="table-of-contents">Table of contents</h2>
+<div id="_table_of_contents"><ul><li><a href="#description">Description</a></li><li><a href="#package-name">Package name</a></li><li><a href="#aliases">Aliases</a></li><li><a href="#folders">Folders</a></li><li><a href="#tarballs">Tarballs</a></li><li><a href="#git-urls">git urls</a></li><li><a href="#see-also">See also</a></li></ul></div>
+</section>
+
+<div id="_content"><h3 id="description">Description</h3>
+<p>Commands like <code>npm install</code> and the dependency sections in the
+<code>package.json</code> use a package name specifier. This can be many different
+things that all refer to a "package". Examples include a package name,
+git url, tarball, or local directory. These will generally be referred
+to as <code>&lt;package-spec&gt;</code> in the help output for the npm commands that use
+this package name specifier.</p>
+<h3 id="package-name">Package name</h3>
+<ul>
+<li><code>[&lt;@scope&gt;/]&lt;pkg&gt;</code></li>
+<li><code>[&lt;@scope&gt;/]&lt;pkg&gt;@&lt;tag&gt;</code></li>
+<li><code>[&lt;@scope&gt;/]&lt;pkg&gt;@&lt;version&gt;</code></li>
+<li><code>[&lt;@scope&gt;/]&lt;pkg&gt;@&lt;version range&gt;</code></li>
+</ul>
+<p>Refers to a package by name, with or without a scope, and optionally
+tag, version, or version range. This is typically used in combination
+with the <a href="../using-npm/config#registry.html">registry</a> config to refer to a
+package in a registry.</p>
+<p>Examples:</p>
+<ul>
+<li><code>npm</code></li>
+<li><code>@npmcli/arborist</code></li>
+<li><code>@npmcli/arborist@latest</code></li>
+<li><code>npm@6.13.1</code></li>
+<li><code>npm@^4.0.0</code></li>
+</ul>
+<h3 id="aliases">Aliases</h3>
+<ul>
+<li><code>&lt;alias&gt;@npm:&lt;name&gt;</code></li>
+</ul>
+<p>Primarily used by commands like <code>npm install</code> and in the dependency
+sections in the <code>package.json</code>, this refers to a package by an alias.
+The <code>&lt;alias&gt;</code> is the name of the package as it is reified in the
+<code>node_modules</code> folder, and the <code>&lt;name&gt;</code> refers to a package name as
+found in the configured registry.</p>
+<p>See <code>Package name</code> above for more info on referring to a package by
+name, and <a href="../using-npm/config#registry.html">registry</a> for configuring which
+registry is used when referring to a package by name.</p>
+<p>Examples:</p>
+<ul>
+<li><code>semver:@npm:@npmcli/semver-with-patch</code></li>
+<li><code>semver:@npm:semver@7.2.2</code></li>
+<li><code>semver:@npm:semver@legacy</code></li>
+</ul>
+<h3 id="folders">Folders</h3>
+<ul>
+<li><code>&lt;folder&gt;</code></li>
+</ul>
+<p>This refers to a package on the local filesystem. Specifically this is
+a folder with a <code>package.json</code> file in it. This <em>should</em> always be
+prefixed with a <code>/</code> or <code>./</code> (or your OS equivalent) to reduce confusion.
+npm currently will parse a string with more than one <code>/</code> in it as a
+folder, but this is legacy behavior that may be removed in a future
+version.</p>
+<p>Examples:</p>
+<ul>
+<li><code>./my-package</code></li>
+<li><code>/opt/npm/my-package</code></li>
+</ul>
+<h3 id="tarballs">Tarballs</h3>
+<ul>
+<li><code>&lt;tarball file&gt;</code></li>
+<li><code>&lt;tarball url&gt;</code></li>
+</ul>
+<p>Examples:</p>
+<ul>
+<li><code>./my-package.tgz</code></li>
+<li><code>https://registry.npmjs.org/semver/-/semver-1.0.0.tgz</code></li>
+</ul>
+<p>Refers to a package in a tarball format, either on the local filesystem
+or remotely via url. This is the format that packages exist in when
+uploaded to a registry.</p>
+<h3 id="git-urls">git urls</h3>
+<ul>
+<li><code>&lt;git:// url&gt;</code></li>
+<li><code>&lt;github username&gt;/&lt;github project&gt;</code></li>
+</ul>
+<p>Refers to a package in a git repo. This can be a full git url, git
+shorthand, or a username/package on GitHub. You can specify a
+git tag, branch, or other git ref by appending <code>#ref</code>.</p>
+<p>Examples:</p>
+<ul>
+<li><code>https://github.com/npm/cli.git</code></li>
+<li><code>git@github.com:npm/cli.git</code></li>
+<li><code>git+ssh://git@github.com/npm/cli#v6.0.0</code></li>
+<li><code>github:npm/cli#HEAD</code></li>
+<li><code>npm/cli#c12ea07</code></li>
+</ul>
+<h3 id="see-also">See also</h3>
+<p><a href="https://npm.im/npm-package-arg">npm-package-arg</a>
+<a href="../using-npm/scope.html">scope</a>
+<a href="../using-npm/config.html">config</a></p>
+</div>
+
+<footer id="edit">
+<a href="https://github.com/npm/cli/edit/latest/docs/content/using-npm/package-spec.md">
+<svg role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentcolor" style="vertical-align: text-bottom; margin-right: 0.3em;">
+<path fill-rule="evenodd" d="M11.013 1.427a1.75 1.75 0 012.474 0l1.086 1.086a1.75 1.75 0 010 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 01-.927-.928l.929-3.25a1.75 1.75 0 01.445-.758l8.61-8.61zm1.414 1.06a.25.25 0 00-.354 0L10.811 3.75l1.439 1.44 1.263-1.263a.25.25 0 000-.354l-1.086-1.086zM11.189 6.25L9.75 4.81l-6.286 6.287a.25.25 0 00-.064.108l-.558 1.953 1.953-.558a.249.249 0 00.108-.064l6.286-6.286z"></path>
+</svg>
+Edit this page on GitHub
+</a>
+</footer>
+</section>
+
+
+
+</body></html> \ No newline at end of file
diff --git a/deps/npm/lib/auth/legacy.js b/deps/npm/lib/auth/legacy.js
index d1401ce14b..9aed12f392 100644
--- a/deps/npm/lib/auth/legacy.js
+++ b/deps/npm/lib/auth/legacy.js
@@ -1,6 +1,6 @@
const profile = require('npm-profile')
const log = require('../utils/log-shim')
-const openUrl = require('../utils/open-url.js')
+const openUrlPrompt = require('../utils/open-url-prompt.js')
const read = require('../utils/read-user-info.js')
const loginPrompter = async (creds) => {
@@ -47,7 +47,15 @@ const login = async (npm, opts) => {
return newUser
}
- const openerPromise = (url) => openUrl(npm, url, 'to complete your login please visit')
+ const openerPromise = (url, emitter) =>
+ openUrlPrompt(
+ npm,
+ url,
+ 'Authenticate your account at',
+ 'Press ENTER to open in the browser...',
+ emitter
+ )
+
try {
res = await profile.login(openerPromise, loginPrompter, opts)
} catch (err) {
diff --git a/deps/npm/lib/commands/cache.js b/deps/npm/lib/commands/cache.js
index 862f346adb..bc52889c00 100644
--- a/deps/npm/lib/commands/cache.js
+++ b/deps/npm/lib/commands/cache.js
@@ -68,11 +68,7 @@ class Cache extends BaseCommand {
static name = 'cache'
static params = ['cache']
static usage = [
- 'add <tarball file>',
- 'add <folder>',
- 'add <tarball url>',
- 'add <git url>',
- 'add <name>@<version>',
+ 'add <package-spec>',
'clean [<key>]',
'ls [<name>@<version>]',
'verify',
diff --git a/deps/npm/lib/commands/deprecate.js b/deps/npm/lib/commands/deprecate.js
index 0ae88f1921..862c214dbe 100644
--- a/deps/npm/lib/commands/deprecate.js
+++ b/deps/npm/lib/commands/deprecate.js
@@ -9,7 +9,7 @@ const BaseCommand = require('../base-command.js')
class Deprecate extends BaseCommand {
static description = 'Deprecate a version of a package'
static name = 'deprecate'
- static usage = ['<pkg>[@<version>] <message>']
+ static usage = ['<package-spec> <message>']
static params = [
'registry',
'otp',
diff --git a/deps/npm/lib/commands/dist-tag.js b/deps/npm/lib/commands/dist-tag.js
index a207e422cb..e74a3f1d43 100644
--- a/deps/npm/lib/commands/dist-tag.js
+++ b/deps/npm/lib/commands/dist-tag.js
@@ -12,9 +12,9 @@ class DistTag extends BaseCommand {
static params = ['workspace', 'workspaces', 'include-workspace-root']
static name = 'dist-tag'
static usage = [
- 'add <pkg>@<version> [<tag>]',
- 'rm <pkg> <tag>',
- 'ls [<pkg>]',
+ 'add <package-spec (with version)> [<tag>]',
+ 'rm <package-spec> <tag>',
+ 'ls [<package-spec>]',
]
static ignoreImplicitWorkspace = false
@@ -90,7 +90,7 @@ class DistTag extends BaseCommand {
log.verbose('dist-tag add', defaultTag, 'to', spec.name + '@' + version)
if (!spec.name || !version || !defaultTag) {
- throw this.usageError()
+ throw this.usageError('must provide a spec with a name and version, and a tag to add')
}
const t = defaultTag.trim()
diff --git a/deps/npm/lib/commands/explain.js b/deps/npm/lib/commands/explain.js
index ca6ee7540b..c0ef04548a 100644
--- a/deps/npm/lib/commands/explain.js
+++ b/deps/npm/lib/commands/explain.js
@@ -10,7 +10,7 @@ const ArboristWorkspaceCmd = require('../arborist-cmd.js')
class Explain extends ArboristWorkspaceCmd {
static description = 'Explain installed packages'
static name = 'explain'
- static usage = ['<folder | specifier>']
+ static usage = ['<package-spec>']
static params = [
'json',
'workspace',
diff --git a/deps/npm/lib/commands/fund.js b/deps/npm/lib/commands/fund.js
index 09ca81653b..9690cbc32e 100644
--- a/deps/npm/lib/commands/fund.js
+++ b/deps/npm/lib/commands/fund.js
@@ -20,7 +20,7 @@ class Fund extends ArboristWorkspaceCmd {
static description = 'Retrieve funding information'
static name = 'fund'
static params = ['json', 'browser', 'unicode', 'workspace', 'which']
- static usage = ['[[<@scope>/]<pkg>]']
+ static usage = ['[<package-spec>]']
// TODO
/* istanbul ignore next */
diff --git a/deps/npm/lib/commands/init.js b/deps/npm/lib/commands/init.js
index 4c299e6513..b8b6bd5d53 100644
--- a/deps/npm/lib/commands/init.js
+++ b/deps/npm/lib/commands/init.js
@@ -18,6 +18,7 @@ class Init extends BaseCommand {
static params = [
'yes',
'force',
+ 'scope',
'workspace',
'workspaces',
'workspaces-update',
@@ -26,9 +27,8 @@ class Init extends BaseCommand {
static name = 'init'
static usage = [
- '[--force|-f|--yes|-y|--scope]',
+ '<package-spec> (same as `npx <package-spec>)',
'<@scope> (same as `npx <@scope>/create`)',
- '[<@scope>/]<name> (same as `npx [<@scope>/]create-<name>`)',
]
static ignoreImplicitWorkspace = false
diff --git a/deps/npm/lib/commands/install.js b/deps/npm/lib/commands/install.js
index 4cda364483..ecc0727a2e 100644
--- a/deps/npm/lib/commands/install.js
+++ b/deps/npm/lib/commands/install.js
@@ -34,18 +34,7 @@ class Install extends ArboristWorkspaceCmd {
...super.params,
]
- static usage = [
- '[<@scope>/]<pkg>',
- '[<@scope>/]<pkg>@<tag>',
- '[<@scope>/]<pkg>@<version>',
- '[<@scope>/]<pkg>@<version range>',
- '<alias>@npm:<name>',
- '<folder>',
- '<tarball file>',
- '<tarball url>',
- '<git:// url>',
- '<github username>/<github project>',
- ]
+ static usage = ['[<package-spec> ...]']
async completion (opts) {
const { partialWord } = opts
diff --git a/deps/npm/lib/commands/link.js b/deps/npm/lib/commands/link.js
index 80a60d36e3..b0b889ea78 100644
--- a/deps/npm/lib/commands/link.js
+++ b/deps/npm/lib/commands/link.js
@@ -15,8 +15,7 @@ class Link extends ArboristWorkspaceCmd {
static description = 'Symlink a package folder'
static name = 'link'
static usage = [
- '(in package dir)',
- '[<@scope>/]<pkg>[@<version>]',
+ '[<package-spec>]',
]
static params = [
diff --git a/deps/npm/lib/commands/ls.js b/deps/npm/lib/commands/ls.js
index cfd9cb5a50..d3932072b7 100644
--- a/deps/npm/lib/commands/ls.js
+++ b/deps/npm/lib/commands/ls.js
@@ -27,7 +27,7 @@ const localeCompare = require('@isaacs/string-locale-compare')('en')
class LS extends ArboristWorkspaceCmd {
static description = 'List installed packages'
static name = 'ls'
- static usage = ['[[<@scope>/]<pkg> ...]']
+ static usage = ['<package-spec>']
static params = [
'all',
'json',
diff --git a/deps/npm/lib/commands/outdated.js b/deps/npm/lib/commands/outdated.js
index 081e75a2c6..042b776f71 100644
--- a/deps/npm/lib/commands/outdated.js
+++ b/deps/npm/lib/commands/outdated.js
@@ -15,7 +15,7 @@ const ArboristWorkspaceCmd = require('../arborist-cmd.js')
class Outdated extends ArboristWorkspaceCmd {
static description = 'Check for outdated packages'
static name = 'outdated'
- static usage = ['[[<@scope>/]<pkg> ...]']
+ static usage = ['[<package-spec> ...]']
static params = [
'all',
'json',
diff --git a/deps/npm/lib/commands/owner.js b/deps/npm/lib/commands/owner.js
index 4797e9c7ec..732bb40a30 100644
--- a/deps/npm/lib/commands/owner.js
+++ b/deps/npm/lib/commands/owner.js
@@ -27,9 +27,9 @@ class Owner extends BaseCommand {
]
static usage = [
- 'add <user> [<@scope>/]<pkg>',
- 'rm <user> [<@scope>/]<pkg>',
- 'ls [<@scope>/]<pkg>',
+ 'add <user> <package-spec>',
+ 'rm <user> <package-spec>',
+ 'ls <package-spec>',
]
static ignoreImplicitWorkspace = false
diff --git a/deps/npm/lib/commands/pack.js b/deps/npm/lib/commands/pack.js
index 8190ceecaf..c6a7480464 100644
--- a/deps/npm/lib/commands/pack.js
+++ b/deps/npm/lib/commands/pack.js
@@ -17,7 +17,7 @@ class Pack extends BaseCommand {
'include-workspace-root',
]
- static usage = ['[[<@scope>/]<pkg>...]']
+ static usage = ['<package-spec>']
static ignoreImplicitWorkspace = false
async exec (args) {
diff --git a/deps/npm/lib/commands/publish.js b/deps/npm/lib/commands/publish.js
index da6437fa9c..579f5d6e74 100644
--- a/deps/npm/lib/commands/publish.js
+++ b/deps/npm/lib/commands/publish.js
@@ -37,7 +37,7 @@ class Publish extends BaseCommand {
'include-workspace-root',
]
- static usage = ['[<folder>]']
+ static usage = ['<package-spec>']
static ignoreImplicitWorkspace = false
async exec (args) {
diff --git a/deps/npm/lib/commands/rebuild.js b/deps/npm/lib/commands/rebuild.js
index 3e6046d8df..d06313ce48 100644
--- a/deps/npm/lib/commands/rebuild.js
+++ b/deps/npm/lib/commands/rebuild.js
@@ -16,7 +16,7 @@ class Rebuild extends ArboristWorkspaceCmd {
...super.params,
]
- static usage = ['[[<@scope>/]<name>[@<version>] ...]']
+ static usage = ['[<package-spec>] ...]']
// TODO
/* istanbul ignore next */
diff --git a/deps/npm/lib/commands/star.js b/deps/npm/lib/commands/star.js
index 7b76be3c16..20039bf893 100644
--- a/deps/npm/lib/commands/star.js
+++ b/deps/npm/lib/commands/star.js
@@ -7,7 +7,7 @@ const BaseCommand = require('../base-command.js')
class Star extends BaseCommand {
static description = 'Mark your favorite packages'
static name = 'star'
- static usage = ['[<pkg>...]']
+ static usage = ['[<package-spec>...]']
static params = [
'registry',
'unicode',
diff --git a/deps/npm/lib/commands/unpublish.js b/deps/npm/lib/commands/unpublish.js
index f27be2e41c..ab929d98ca 100644
--- a/deps/npm/lib/commands/unpublish.js
+++ b/deps/npm/lib/commands/unpublish.js
@@ -20,7 +20,7 @@ class Unpublish extends BaseCommand {
static description = 'Remove a package from the registry'
static name = 'unpublish'
static params = ['dry-run', 'force', 'workspace', 'workspaces']
- static usage = ['[<@scope>/]<pkg>[@<version>]']
+ static usage = ['[<package-spec>]']
static ignoreImplicitWorkspace = false
async getKeysOfVersions (name, opts) {
diff --git a/deps/npm/lib/commands/view.js b/deps/npm/lib/commands/view.js
index efb298a03b..3b8524ad3f 100644
--- a/deps/npm/lib/commands/view.js
+++ b/deps/npm/lib/commands/view.js
@@ -33,7 +33,7 @@ class View extends BaseCommand {
static ignoreImplicitWorkspace = false
- static usage = ['[<@scope>/]<pkg>[@<version>] [<field>[.subfield]...]']
+ static usage = ['[<package-spec>] [<field>[.subfield]...]']
async completion (opts) {
if (opts.conf.argv.remain.length <= 2) {
@@ -236,6 +236,15 @@ class View extends BaseCommand {
}
})
+ // No data has been pushed because no data is matching the specified version
+ if (data.length === 0 && version !== 'latest') {
+ const er = new Error(`No match found for version ${version}`)
+ er.statusCode = 404
+ er.code = 'E404'
+ er.pkgid = `${pckmnt._id}@${version}`
+ throw er
+ }
+
if (
!this.npm.config.get('json') &&
args.length === 1 &&
diff --git a/deps/npm/lib/utils/config/definitions.js b/deps/npm/lib/utils/config/definitions.js
index 4c77e375c5..6b35e7d4d0 100644
--- a/deps/npm/lib/utils/config/definitions.js
+++ b/deps/npm/lib/utils/config/definitions.js
@@ -535,7 +535,7 @@ define('dev', {
define('diff', {
default: [],
- hint: '<pkg-name|spec|version>',
+ hint: '<package-spec>',
type: [String, Array],
description: `
Define arguments to compare in \`npm diff\`.
@@ -1458,7 +1458,7 @@ define('otp', {
define('package', {
default: [],
- hint: '<pkg>[@<version>]',
+ hint: '<package-spec>',
type: [String, Array],
description: `
The package to install for [\`npm exec\`](/commands/npm-exec)
@@ -1867,7 +1867,7 @@ define('script-shell', {
type: [null, String],
description: `
The shell to use for scripts run with the \`npm exec\`,
- \`npm run\` and \`npm init <pkg>\` commands.
+ \`npm run\` and \`npm init <package-spec>\` commands.
`,
flatten (key, obj, flatOptions) {
flatOptions.scriptShell = obj[key] || undefined
diff --git a/deps/npm/lib/utils/open-url-prompt.js b/deps/npm/lib/utils/open-url-prompt.js
new file mode 100644
index 0000000000..3eb3ac288c
--- /dev/null
+++ b/deps/npm/lib/utils/open-url-prompt.js
@@ -0,0 +1,69 @@
+const readline = require('readline')
+const opener = require('opener')
+
+function print (npm, title, url) {
+ const json = npm.config.get('json')
+
+ const message = json ? JSON.stringify({ title, url }) : `${title}:\n${url}`
+
+ npm.output(message)
+}
+
+// Prompt to open URL in browser if possible
+const promptOpen = async (npm, url, title, prompt, emitter) => {
+ const browser = npm.config.get('browser')
+ const isInteractive = process.stdin.isTTY === true && process.stdout.isTTY === true
+
+ try {
+ if (!/^https?:$/.test(new URL(url).protocol)) {
+ throw new Error()
+ }
+ } catch (_) {
+ throw new Error('Invalid URL: ' + url)
+ }
+
+ print(npm, title, url)
+
+ if (browser === false || !isInteractive) {
+ return
+ }
+
+ const rl = readline.createInterface({
+ input: process.stdin,
+ output: process.stdout,
+ })
+
+ const tryOpen = await new Promise(resolve => {
+ rl.question(prompt, () => {
+ resolve(true)
+ })
+
+ if (emitter && emitter.addListener) {
+ emitter.addListener('abort', () => {
+ rl.close()
+
+ // clear the prompt line
+ npm.output('')
+
+ resolve(false)
+ })
+ }
+ })
+
+ if (!tryOpen) {
+ return
+ }
+
+ const command = browser === true ? null : browser
+ await new Promise((resolve, reject) => {
+ opener(url, { command }, err => {
+ if (err) {
+ return reject(err)
+ }
+
+ return resolve()
+ })
+ })
+}
+
+module.exports = promptOpen
diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1
index 42e1998371..30b4947bd0 100644
--- a/deps/npm/man/man1/npm-cache.1
+++ b/deps/npm/man/man1/npm-cache.1
@@ -5,11 +5,7 @@
.P
.RS 2
.nf
-npm cache add <tarball file>
-npm cache add <folder>
-npm cache add <tarball url>
-npm cache add <git url>
-npm cache add <name>@<version>
+npm cache add <package\-spec>
npm cache clean [<key>]
npm cache ls [<name>@<version>]
npm cache verify
@@ -85,6 +81,8 @@ cache\fP
.SS See Also
.RS 0
.IP \(bu 2
+npm help package spec
+.IP \(bu 2
npm help folders
.IP \(bu 2
npm help config
diff --git a/deps/npm/man/man1/npm-ci.1 b/deps/npm/man/man1/npm-ci.1
index 533ec91005..5c92d5d9ba 100644
--- a/deps/npm/man/man1/npm-ci.1
+++ b/deps/npm/man/man1/npm-ci.1
@@ -133,7 +133,7 @@ Type: null or String
.RE
.P
The shell to use for scripts run with the \fBnpm exec\fP, \fBnpm run\fP and \fBnpm
-init <pkg>\fP commands\.
+init <package\-spec>\fP commands\.
.SS See Also
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1
index e9ab9bae71..7f9fe808f5 100644
--- a/deps/npm/man/man1/npm-deprecate.1
+++ b/deps/npm/man/man1/npm-deprecate.1
@@ -5,7 +5,7 @@
.P
.RS 2
.nf
-npm deprecate <pkg>[@<version>] <message>
+npm deprecate <package\-spec> <message>
.fi
.RE
.P
@@ -38,8 +38,8 @@ In this case, a version \fBmy\-thing@1\.0\.0\-beta\.0\fP will also be deprecated
You must be the package owner to deprecate something\. See the \fBowner\fP and
\fBadduser\fP help topics\.
.P
-To un\-deprecate a package, specify an empty string (\fB""\fP) for the \fBmessage\fP
-argument\. Note that you must use double quotes with no space between them to
+To un\-deprecate a package, specify an empty string (\fB""\fP) for the \fBmessage\fP
+argument\. Note that you must use double quotes with no space between them to
format an empty string\.
.SS Configuration
.SS \fBregistry\fP
@@ -69,6 +69,8 @@ password, npm will prompt on the command line for one\.
.SS See Also
.RS 0
.IP \(bu 2
+npm help package spec
+.IP \(bu 2
npm help publish
.IP \(bu 2
npm help registry
diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1
index 7e1c145395..7334c059d4 100644
--- a/deps/npm/man/man1/npm-dist-tag.1
+++ b/deps/npm/man/man1/npm-dist-tag.1
@@ -5,9 +5,9 @@
.P
.RS 2
.nf
-npm dist\-tag add <pkg>@<version> [<tag>]
-npm dist\-tag rm <pkg> <tag>
-npm dist\-tag ls [<pkg>]
+npm dist\-tag add <package\-spec (with version)> [<tag>]
+npm dist\-tag rm <package\-spec> <tag>
+npm dist\-tag ls [<package\-spec>]
alias: dist\-tags
.fi
@@ -17,11 +17,11 @@ alias: dist\-tags
Add, remove, and enumerate distribution tags on a package:
.RS 0
.IP \(bu 2
-add: Tags the specified version of the package with the specified tag, or
-the \fB\-\-tag\fP config if not specified\. If you have two\-factor
-authentication on auth\-and\-writes then you’ll need to include a one\-time
-password on the command line with \fB\-\-otp <one\-time password>\fP, or at the
-OTP prompt\.
+add: Tags the specified version of the package with the specified tag,
+or the \fB\-\-tag\fP config if not specified\. If you have two\-factor
+authentication on auth\-and\-writes then you’ll need to include a
+one\-time password on the command line with
+\fB\-\-otp <one\-time password>\fP, or at the OTP prompt\.
.IP \(bu 2
rm: Clear a tag that is no longer in use from the package\. If you have
two\-factor authentication on auth\-and\-writes then you’ll need to include
@@ -164,6 +164,8 @@ This value is not exported to the environment for child processes\.
.SS See Also
.RS 0
.IP \(bu 2
+npm help package spec
+.IP \(bu 2
npm help publish
.IP \(bu 2
npm help install
diff --git a/deps/npm/man/man1/npm-explain.1 b/deps/npm/man/man1/npm-explain.1
index 9a3eec6756..fc7c2f2343 100644
--- a/deps/npm/man/man1/npm-explain.1
+++ b/deps/npm/man/man1/npm-explain.1
@@ -5,7 +5,7 @@
.P
.RS 2
.nf
-npm explain <folder | specifier>
+npm explain <package\-spec>
alias: why
.fi
@@ -15,9 +15,10 @@ alias: why
This command will print the chain of dependencies causing a given package
to be installed in the current project\.
.P
-Positional arguments can be either folders within \fBnode_modules\fP, or
-\fBname@version\-range\fP specifiers, which will select the dependency
-relationships to explain\.
+If one or more package specs are provided, then only packages matching
+one of the specifiers will have their relationships explained\.
+.P
+The package spec can also refer to a folder within \fB\|\./node_modules\fP
.P
For example, running \fBnpm explain glob\fP within npm's source tree will show:
.P
@@ -106,6 +107,8 @@ This value is not exported to the environment for child processes\.
.SS See Also
.RS 0
.IP \(bu 2
+npm help package spec
+.IP \(bu 2
npm help config
.IP \(bu 2
npm help npmrc
diff --git a/deps/npm/man/man1/npm-fund.1 b/deps/npm/man/man1/npm-fund.1
index ef77df60ce..3f48fda912 100644
--- a/deps/npm/man/man1/npm-fund.1
+++ b/deps/npm/man/man1/npm-fund.1
@@ -5,27 +5,27 @@
.P
.RS 2
.nf
-npm fund [[<@scope>/]<pkg>]
+npm fund [<package\-spec>]
.fi
.RE
.SS Description
.P
This command retrieves information on how to fund the dependencies of a
given project\. If no package name is provided, it will list all
-dependencies that are looking for funding in a tree structure, listing the
-type of funding and the url to visit\. If a package name is provided then it
-tries to open its funding url using the \fB\-\-browser\fP config param; if there
-are multiple funding sources for the package, the user will be instructed
-to pass the \fB\-\-which\fP option to disambiguate\.
+dependencies that are looking for funding in a tree structure, listing
+the type of funding and the url to visit\. If a package name is provided
+then it tries to open its funding url using the \fB\-\-browser\fP config
+param; if there are multiple funding sources for the package, the user
+will be instructed to pass the \fB\-\-which\fP option to disambiguate\.
.P
The list will avoid duplicated entries and will stack all packages that
-share the same url as a single entry\. Thus, the list does not have the same
-shape of the output from \fBnpm ls\fP\|\.
+share the same url as a single entry\. Thus, the list does not have the
+same shape of the output from \fBnpm ls\fP\|\.
.SS Example
.SS Workspaces support
.P
-It's possible to filter the results to only include a single workspace and its
-dependencies using the \fBworkspace\fP config option\.
+It's possible to filter the results to only include a single workspace
+and its dependencies using the \fBworkspace\fP config option\.
.SS Example:
.P
Here's an example running \fBnpm fund\fP in a project with a configured
@@ -46,8 +46,8 @@ test\-workspaces\-fund@1\.0\.0
.fi
.RE
.P
-And here is an example of the expected result when filtering only by
-a specific workspace \fBa\fP in the same project:
+And here is an example of the expected result when filtering only by a
+specific workspace \fBa\fP in the same project:
.P
.RS 2
.nf
@@ -148,6 +148,8 @@ If there are multiple funding sources, which 1\-indexed source URL to open\.
.SH See Also
.RS 0
.IP \(bu 2
+npm help package spec
+.IP \(bu 2
npm help install
.IP \(bu 2
npm help docs
diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1
index 51e9f42f82..c49b0c7ac4 100644
--- a/deps/npm/man/man1/npm-init.1
+++ b/deps/npm/man/man1/npm-init.1
@@ -5,9 +5,8 @@
.P
.RS 2
.nf
-npm init [\-\-force|\-f|\-\-yes|\-y|\-\-scope]
+npm init <package\-spec> (same as `npx <package\-spec>)
npm init <@scope> (same as `npx <@scope>/create`)
-npm init [<@scope>/]<name> (same as `npx [<@scope>/]create\-<name>`)
aliases: create, innit
.fi
@@ -232,6 +231,42 @@ Allow unpublishing of entire packages (not just a single version)\.
.P
If you don't have a clear idea of what you want to do, it is strongly
recommended that you do not use this option!
+.SS \fBscope\fP
+.RS 0
+.IP \(bu 2
+Default: the scope of the current project, if any, or ""
+.IP \(bu 2
+Type: String
+
+.RE
+.P
+Associate an operation with a scope for a scoped registry\.
+.P
+Useful when logging in to or out of a private registry:
+.P
+.RS 2
+.nf
+# log in, linking the scope to the custom registry
+npm login \-\-scope=@mycorp \-\-registry=https://registry\.mycorp\.com
+
+# log out, removing the link and the auth token
+npm logout \-\-scope=@mycorp
+.fi
+.RE
+.P
+This will cause \fB@mycorp\fP to be mapped to the registry for future
+installation of packages specified according to the pattern
+\fB@mycorp/package\fP\|\.
+.P
+This will also cause \fBnpm init\fP to create a scoped package\.
+.P
+.RS 2
+.nf
+# accept all defaults, and create a package named "@foo/whatever",
+# instead of just named "whatever"
+npm init \-\-scope=@foo \-\-yes
+.fi
+.RE
.SS \fBworkspace\fP
.RS 0
.IP \(bu 2
@@ -316,6 +351,8 @@ This value is not exported to the environment for child processes\.
.SS See Also
.RS 0
.IP \(bu 2
+npm help package spec
+.IP \(bu 2
init\-package\-json module \fIhttp://npm\.im/init\-package\-json\fR
.IP \(bu 2
npm help package\.json
diff --git a/deps/npm/man/man1/npm-install-ci-test.1 b/deps/npm/man/man1/npm-install-ci-test.1
index e50f7e90ae..8f153e1366 100644
--- a/deps/npm/man/man1/npm-install-ci-test.1
+++ b/deps/npm/man/man1/npm-install-ci-test.1
@@ -67,7 +67,7 @@ Type: null or String
.RE
.P
The shell to use for scripts run with the \fBnpm exec\fP, \fBnpm run\fP and \fBnpm
-init <pkg>\fP commands\.
+init <package\-spec>\fP commands\.
.SS See Also
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1
index 1e6ece0f47..02f9603e25 100644
--- a/deps/npm/man/man1/npm-install-test.1
+++ b/deps/npm/man/man1/npm-install-test.1
@@ -5,16 +5,7 @@
.P
.RS 2
.nf
-npm install\-test [<@scope>/]<pkg>
-npm install\-test [<@scope>/]<pkg>@<tag>
-npm install\-test [<@scope>/]<pkg>@<version>
-npm install\-test [<@scope>/]<pkg>@<version range>
-npm install\-test <alias>@npm:<name>
-npm install\-test <folder>
-npm install\-test <tarball file>
-npm install\-test <tarball url>
-npm install\-test <git:// url>
-npm install\-test <github username>/<github project>
+npm install\-test [<package\-spec> \.\.\.]
alias: it
.fi
diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1
index 9d72011781..f99ad88425 100644
--- a/deps/npm/man/man1/npm-install.1
+++ b/deps/npm/man/man1/npm-install.1
@@ -5,16 +5,7 @@
.P
.RS 2
.nf
-npm install [<@scope>/]<pkg>
-npm install [<@scope>/]<pkg>@<tag>
-npm install [<@scope>/]<pkg>@<version>
-npm install [<@scope>/]<pkg>@<version range>
-npm install <alias>@npm:<name>
-npm install <folder>
-npm install <tarball file>
-npm install <tarball url>
-npm install <git:// url>
-npm install <github username>/<github project>
+npm install [<package\-spec> \.\.\.]
aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall
.fi
diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1
index d748d16845..e138490e1b 100644
--- a/deps/npm/man/man1/npm-link.1
+++ b/deps/npm/man/man1/npm-link.1
@@ -5,8 +5,7 @@
.P
.RS 2
.nf
-npm link (in package dir)
-npm link [<@scope>/]<pkg>[@<version>]
+npm link [<package\-spec>]
alias: ln
.fi
@@ -18,11 +17,11 @@ test iteratively without having to continually rebuild\.
.P
Package linking is a two\-step process\.
.P
-First, \fBnpm link\fP in a package folder will create a symlink in the global
-folder \fB{prefix}/lib/node_modules/<package>\fP that links to the package
-where the \fBnpm link\fP command was executed\. It will also link any bins in
-the package to \fB{prefix}/bin/{name}\fP\|\. Note that \fBnpm link\fP uses the global
-prefix (see \fBnpm prefix \-g\fP for its value)\.
+First, \fBnpm link\fP in a package folder with no arguments will create a
+symlink in the global folder \fB{prefix}/lib/node_modules/<package>\fP that
+links to the package where the \fBnpm link\fP command was executed\. It will
+also link any bins in the package to \fB{prefix}/bin/{name}\fP\|\. Note that
+\fBnpm link\fP uses the global prefix (see \fBnpm prefix \-g\fP for its value)\.
.P
Next, in some other location, \fBnpm link package\-name\fP will create a
symbolic link from globally\-installed \fBpackage\-name\fP to \fBnode_modules/\fP of
@@ -401,6 +400,8 @@ symlink\. This option has no effect on workspaces\.
.SS See Also
.RS 0
.IP \(bu 2
+npm help package spec
+.IP \(bu 2
npm help developers
.IP \(bu 2
npm help package\.json
diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1
index 2308cc1601..a24c524909 100644
--- a/deps/npm/man/man1/npm-ls.1
+++ b/deps/npm/man/man1/npm-ls.1
@@ -5,7 +5,7 @@
.P
.RS 2
.nf
-npm ls [[<@scope>/]<pkg> \.\.\.]
+npm ls <package\-spec>
alias: list
.fi
@@ -26,7 +26,7 @@ example, running \fBnpm ls promzard\fP in npm's source tree will show:
.P
.RS 2
.nf
-npm@8\.12\.1 /path/to/npm
+npm@8\.13\.1 /path/to/npm
└─┬ init\-package\-json@0\.0\.4
└── promzard@0\.1\.5
.fi
@@ -301,6 +301,8 @@ symlink\. This option has no effect on workspaces\.
.SS See Also
.RS 0
.IP \(bu 2
+npm help package spec
+.IP \(bu 2
npm help explain
.IP \(bu 2
npm help config
diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1
index 3d5025e0e0..80ec0928a2 100644
--- a/deps/npm/man/man1/npm-outdated.1
+++ b/deps/npm/man/man1/npm-outdated.1
@@ -5,7 +5,7 @@
.P
.RS 2
.nf
-npm outdated [[<@scope>/]<pkg> \.\.\.]
+npm outdated [<package\-spec> \.\.\.]
.fi
.RE
.SS Description
@@ -208,6 +208,8 @@ This value is not exported to the environment for child processes\.
.SS See Also
.RS 0
.IP \(bu 2
+npm help package spec
+.IP \(bu 2
npm help update
.IP \(bu 2
npm help dist\-tag
diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1
index 312bf22942..85ab4077b2 100644
--- a/deps/npm/man/man1/npm-owner.1
+++ b/deps/npm/man/man1/npm-owner.1
@@ -5,9 +5,9 @@
.P
.RS 2
.nf
-npm owner add <user> [<@scope>/]<pkg>
-npm owner rm <user> [<@scope>/]<pkg>
-npm owner ls [<@scope>/]<pkg>
+npm owner add <user> <package\-spec>
+npm owner rm <user> <package\-spec>
+npm owner ls <package\-spec>
alias: author
.fi
@@ -119,6 +119,8 @@ This value is not exported to the environment for child processes\.
.SS See Also
.RS 0
.IP \(bu 2
+npm help package spec
+.IP \(bu 2
npm help profile
.IP \(bu 2
npm help publish
diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1
index 028fab69b1..a46bf5c752 100644
--- a/deps/npm/man/man1/npm-pack.1
+++ b/deps/npm/man/man1/npm-pack.1
@@ -5,7 +5,7 @@
.P
.RS 2
.nf
-npm pack [[<@scope>/]<pkg>\.\.\.]
+npm pack <package\-spec>
.fi
.RE
.SS Configuration
@@ -138,6 +138,8 @@ If no arguments are supplied, then npm packs the current package folder\.
.SS See Also
.RS 0
.IP \(bu 2
+npm help package spec
+.IP \(bu 2
npm\-packlist package \fIhttp://npm\.im/npm\-packlist\fR
.IP \(bu 2
npm help cache
diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1
index dc914cf75c..d64a144447 100644
--- a/deps/npm/man/man1/npm-publish.1
+++ b/deps/npm/man/man1/npm-publish.1
@@ -5,50 +5,39 @@
.P
.RS 2
.nf
-npm publish [<folder>]
+npm publish <package\-spec>
.fi
.RE
.SS Description
.P
Publishes a package to the registry so that it can be installed by name\.
.P
-By default npm will publish to the public registry\. This can be overridden
-by specifying a different default registry or using a
-npm help \fBscope\fP in the name (see
+By default npm will publish to the public registry\. This can be
+overridden by specifying a different default registry or using a
+npm help \fBscope\fP in the name, combined with a
+scope\-configured registry (see
npm help \fBpackage\.json\fP)\.
+.P
+A \fBpackage\fP is interpreted the same way as other commands (like
+\fBnpm install\fP and can be:
.RS 0
.IP \(bu 2
-\fB<folder>\fP: A folder containing a package\.json file
-.IP \(bu 2
-\fB<tarball>\fP: A url or file path to a gzipped tar archive containing a
-single folder with a package\.json file inside\.
+a) a folder containing a program described by a
+npm help \fBpackage\.json\fP file
.IP \(bu 2
-\fB[\-\-tag <tag>]\fP: Registers the published package with the given tag, such
-that \fBnpm install <name>@<tag>\fP will install this version\. By default,
-\fBnpm publish\fP updates and \fBnpm install\fP installs the \fBlatest\fP tag\. See
-\fBnpm\-dist\-tag\fP \fInpm\-dist\-tag\fR for details about tags\.
+b) a gzipped tarball containing (a)
.IP \(bu 2
-\fB[\-\-access <public|restricted>]\fP: Tells the registry whether this package
-should be published as public or restricted\. Only applies to scoped
-packages, which default to \fBrestricted\fP\|\. If you don't have a paid
-account, you must publish with \fB\-\-access public\fP to publish scoped
-packages\.
+c) a url that resolves to (b)
.IP \(bu 2
-\fB[\-\-otp <otpcode>]\fP: If you have two\-factor authentication enabled in
-\fBauth\-and\-writes\fP mode then you can provide a code from your
-authenticator with this\. If you don't include this and you're running
-from a TTY then you'll be prompted\.
+d) a \fB<name>@<version>\fP that is published on the registry (see
+npm help \fBregistry\fP) with (c)
.IP \(bu 2
-\fB[\-\-dry\-run]\fP: As of \fBnpm@6\fP, does everything publish would do except
-actually publishing to the registry\. Reports the details of what would
-have been published\.
+e) a \fB<name>@<tag>\fP (see npm help \fBdist\-tag\fP) that
+points to (d)
.IP \(bu 2
-\fB[\-\-workspaces]\fP: Enables workspace context while publishing\. All
-workspace packages will be published\.
+f) a \fB<name>\fP that has a "latest" tag satisfying (e)
.IP \(bu 2
-\fB[\-\-workspace]\fP: Enables workspaces context and limits results to only
-those specified by this config item\. Only the packages in the
-workspaces given will be published\.
+g) a \fB<git remote url>\fP that resolves to (a)
.RE
.P
@@ -241,6 +230,8 @@ This value is not exported to the environment for child processes\.
.SS See Also
.RS 0
.IP \(bu 2
+npm help package spec
+.IP \(bu 2
npm\-packlist package \fIhttp://npm\.im/npm\-packlist\fR
.IP \(bu 2
npm help registry
diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1
index 8d6d90b10f..f4e4c56118 100644
--- a/deps/npm/man/man1/npm-rebuild.1
+++ b/deps/npm/man/man1/npm-rebuild.1
@@ -5,7 +5,7 @@
.P
.RS 2
.nf
-npm rebuild [[<@scope>/]<name>[@<version>] \.\.\.]
+npm rebuild [<package\-spec>] \.\.\.]
alias: rb
.fi
@@ -18,9 +18,8 @@ C++ addons with the new binary\. It is also useful when installing with
\fB\-\-ignore\-scripts\fP and \fB\-\-no\-bin\-links\fP, to explicitly choose which
packages to build and/or link bins\.
.P
-If one or more package names (and optionally version ranges) are provided,
-then only packages with a name and version matching one of the specifiers
-will be rebuilt\.
+If one or more package specs are provided, then only packages with a
+name and version matching one of the specifiers will be rebuilt\.
.SS Configuration
.SS \fBglobal\fP
.RS 0
@@ -174,6 +173,8 @@ symlink\. This option has no effect on workspaces\.
.SS See Also
.RS 0
.IP \(bu 2
+npm help package spec
+.IP \(bu 2
npm help install
.RE
diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1
index 2f99ee51ed..460a94350f 100644
--- a/deps/npm/man/man1/npm-restart.1
+++ b/deps/npm/man/man1/npm-restart.1
@@ -72,7 +72,7 @@ Type: null or String
.RE
.P
The shell to use for scripts run with the \fBnpm exec\fP, \fBnpm run\fP and \fBnpm
-init <pkg>\fP commands\.
+init <package\-spec>\fP commands\.
.SS See Also
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1
index fc26c71e03..c9dc22f4eb 100644
--- a/deps/npm/man/man1/npm-run-script.1
+++ b/deps/npm/man/man1/npm-run-script.1
@@ -256,7 +256,7 @@ Type: null or String
.RE
.P
The shell to use for scripts run with the \fBnpm exec\fP, \fBnpm run\fP and \fBnpm
-init <pkg>\fP commands\.
+init <package\-spec>\fP commands\.
.SS See Also
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1
index 2ccd4046e4..2e91f78bdc 100644
--- a/deps/npm/man/man1/npm-star.1
+++ b/deps/npm/man/man1/npm-star.1
@@ -5,7 +5,7 @@
.P
.RS 2
.nf
-npm star [<pkg>\.\.\.]
+npm star [<package\-spec>\.\.\.]
.fi
.RE
.P
@@ -67,6 +67,8 @@ password, npm will prompt on the command line for one\.
.SS See Also
.RS 0
.IP \(bu 2
+npm help package spec
+.IP \(bu 2
npm help unstar
.IP \(bu 2
npm help stars
diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1
index 589ecea4a2..af45de89f3 100644
--- a/deps/npm/man/man1/npm-start.1
+++ b/deps/npm/man/man1/npm-start.1
@@ -71,7 +71,7 @@ Type: null or String
.RE
.P
The shell to use for scripts run with the \fBnpm exec\fP, \fBnpm run\fP and \fBnpm
-init <pkg>\fP commands\.
+init <package\-spec>\fP commands\.
.SS See Also
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1
index 19695cc0e0..f1159699a3 100644
--- a/deps/npm/man/man1/npm-stop.1
+++ b/deps/npm/man/man1/npm-stop.1
@@ -64,7 +64,7 @@ Type: null or String
.RE
.P
The shell to use for scripts run with the \fBnpm exec\fP, \fBnpm run\fP and \fBnpm
-init <pkg>\fP commands\.
+init <package\-spec>\fP commands\.
.SS See Also
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1
index fbbe80d263..8dd0f2f682 100644
--- a/deps/npm/man/man1/npm-test.1
+++ b/deps/npm/man/man1/npm-test.1
@@ -61,7 +61,7 @@ Type: null or String
.RE
.P
The shell to use for scripts run with the \fBnpm exec\fP, \fBnpm run\fP and \fBnpm
-init <pkg>\fP commands\.
+init <package\-spec>\fP commands\.
.SS See Also
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1
index ff538299e7..57ba85fb43 100644
--- a/deps/npm/man/man1/npm-unpublish.1
+++ b/deps/npm/man/man1/npm-unpublish.1
@@ -5,7 +5,7 @@
.P
.RS 2
.nf
-npm unpublish [<@scope>/]<pkg>[@<version>]
+npm unpublish [<package\-spec>]
.fi
.RE
.P
@@ -149,6 +149,8 @@ This value is not exported to the environment for child processes\.
.SS See Also
.RS 0
.IP \(bu 2
+npm help package spec
+.IP \(bu 2
npm help deprecate
.IP \(bu 2
npm help publish
diff --git a/deps/npm/man/man1/npm-unstar.1 b/deps/npm/man/man1/npm-unstar.1
index d71bfff266..b3ece049f9 100644
--- a/deps/npm/man/man1/npm-unstar.1
+++ b/deps/npm/man/man1/npm-unstar.1
@@ -5,7 +5,7 @@
.P
.RS 2
.nf
-npm unstar [<pkg>\.\.\.]
+npm unstar [<package\-spec>\.\.\.]
.fi
.RE
.P
diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1
index efba9ebd6b..7f83d89bf6 100644
--- a/deps/npm/man/man1/npm-view.1
+++ b/deps/npm/man/man1/npm-view.1
@@ -5,7 +5,7 @@
.P
.RS 2
.nf
-npm view [<@scope>/]<pkg>[@<version>] [<field>[\.subfield]\.\.\.]
+npm view [<package\-spec>] [<field>[\.subfield]\.\.\.]
aliases: info, show, v
.fi
@@ -216,6 +216,8 @@ the field name\.
.SS See Also
.RS 0
.IP \(bu 2
+npm help package spec
+.IP \(bu 2
npm help search
.IP \(bu 2
npm help registry
diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1
index 45db3c9e53..a26c713a11 100644
--- a/deps/npm/man/man1/npm.1
+++ b/deps/npm/man/man1/npm.1
@@ -4,7 +4,7 @@
.SS Synopsis
.SS Version
.P
-8\.12\.1
+8\.13\.1
.SS Description
.P
npm is the package manager for the Node JavaScript platform\. It puts
diff --git a/deps/npm/man/man5/package-json.5 b/deps/npm/man/man5/package-json.5
index 17c4c1e322..f6477ebc01 100644
--- a/deps/npm/man/man5/package-json.5
+++ b/deps/npm/man/man5/package-json.5
@@ -246,7 +246,7 @@ Both email and url are optional either way\.
npm also sets a top\-level "maintainers" field with your npm user info\.
.SS funding
.P
-You can specify an object containing an URL that provides up\-to\-date
+You can specify an object containing a URL that provides up\-to\-date
information about ways to help fund development of your package, or a
string URL, or an array of these:
.P
diff --git a/deps/npm/man/man7/config.7 b/deps/npm/man/man7/config.7
index 70f6742b10..a64db0ae28 100644
--- a/deps/npm/man/man7/config.7
+++ b/deps/npm/man/man7/config.7
@@ -1592,7 +1592,7 @@ Type: null or String
.RE
.P
The shell to use for scripts run with the \fBnpm exec\fP, \fBnpm run\fP and \fBnpm
-init <pkg>\fP commands\.
+init <package\-spec>\fP commands\.
.SS \fBsearchexclude\fP
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man7/package-spec.7 b/deps/npm/man/man7/package-spec.7
new file mode 100644
index 0000000000..f86a00686b
--- /dev/null
+++ b/deps/npm/man/man7/package-spec.7
@@ -0,0 +1,145 @@
+.TH "PACKAGE\-SPEC" "7" "June 2022" "" ""
+.SH "NAME"
+\fBpackage-spec\fR \- Package name specifier
+.SS Description
+.P
+Commands like \fBnpm install\fP and the dependency sections in the
+\fBpackage\.json\fP use a package name specifier\. This can be many different
+things that all refer to a "package"\. Examples include a package name,
+git url, tarball, or local directory\. These will generally be referred
+to as \fB<package\-spec>\fP in the help output for the npm commands that use
+this package name specifier\.
+.SS Package name
+.RS 0
+.IP \(bu 2
+\fB[<@scope>/]<pkg>\fP
+.IP \(bu 2
+\fB[<@scope>/]<pkg>@<tag>\fP
+.IP \(bu 2
+\fB[<@scope>/]<pkg>@<version>\fP
+.IP \(bu 2
+\fB[<@scope>/]<pkg>@<version range>\fP
+
+.RE
+.P
+Refers to a package by name, with or without a scope, and optionally
+tag, version, or version range\. This is typically used in combination
+with the npm help registry config to refer to a
+package in a registry\.
+.P
+Examples:
+.RS 0
+.IP \(bu 2
+\fBnpm\fP
+.IP \(bu 2
+\fB@npmcli/arborist\fP
+.IP \(bu 2
+\fB@npmcli/arborist@latest\fP
+.IP \(bu 2
+\fBnpm@6\.13\.1\fP
+.IP \(bu 2
+\fBnpm@^4\.0\.0\fP
+
+.RE
+.SS Aliases
+.RS 0
+.IP \(bu 2
+\fB<alias>@npm:<name>\fP
+
+.RE
+.P
+Primarily used by commands like \fBnpm install\fP and in the dependency
+sections in the \fBpackage\.json\fP, this refers to a package by an alias\.
+The \fB<alias>\fP is the name of the package as it is reified in the
+\fBnode_modules\fP folder, and the \fB<name>\fP refers to a package name as
+found in the configured registry\.
+.P
+See \fBPackage name\fP above for more info on referring to a package by
+name, and npm help registry for configuring which
+registry is used when referring to a package by name\.
+.P
+Examples:
+.RS 0
+.IP \(bu 2
+\fBsemver:@npm:@npmcli/semver\-with\-patch\fP
+.IP \(bu 2
+\fBsemver:@npm:semver@7\.2\.2\fP
+.IP \(bu 2
+\fBsemver:@npm:semver@legacy\fP
+
+.RE
+.SS Folders
+.RS 0
+.IP \(bu 2
+\fB<folder>\fP
+
+.RE
+.P
+This refers to a package on the local filesystem\. Specifically this is
+a folder with a \fBpackage\.json\fP file in it\. This \fIshould\fR always be
+prefixed with a \fB/\fP or \fB\|\./\fP (or your OS equivalent) to reduce confusion\.
+npm currently will parse a string with more than one \fB/\fP in it as a
+folder, but this is legacy behavior that may be removed in a future
+version\.
+.P
+Examples:
+.RS 0
+.IP \(bu 2
+\fB\|\./my\-package\fP
+.IP \(bu 2
+\fB/opt/npm/my\-package\fP
+
+.RE
+.SS Tarballs
+.RS 0
+.IP \(bu 2
+\fB<tarball file>\fP
+.IP \(bu 2
+\fB<tarball url>\fP
+
+.RE
+.P
+Examples:
+.RS 0
+.IP \(bu 2
+\fB\|\./my\-package\.tgz\fP
+.IP \(bu 2
+\fBhttps://registry\.npmjs\.org/semver/\-/semver\-1\.0\.0\.tgz\fP
+
+.RE
+.P
+Refers to a package in a tarball format, either on the local filesystem
+or remotely via url\. This is the format that packages exist in when
+uploaded to a registry\.
+.SS git urls
+.RS 0
+.IP \(bu 2
+\fB<git:// url>\fP
+.IP \(bu 2
+\fB<github username>/<github project>\fP
+
+.RE
+.P
+Refers to a package in a git repo\. This can be a full git url, git
+shorthand, or a username/package on GitHub\. You can specify a
+git tag, branch, or other git ref by appending \fB#ref\fP\|\.
+.P
+Examples:
+.RS 0
+.IP \(bu 2
+\fBhttps://github\.com/npm/cli\.git\fP
+.IP \(bu 2
+\fBgit@github\.com:npm/cli\.git\fP
+.IP \(bu 2
+\fBgit+ssh://git@github\.com/npm/cli#v6\.0\.0\fP
+.IP \(bu 2
+\fBgithub:npm/cli#HEAD\fP
+.IP \(bu 2
+\fBnpm/cli#c12ea07\fP
+
+.RE
+.SS See also
+.P
+npm\-package\-arg \fIhttps://npm\.im/npm\-package\-arg\fR
+npm help scope
+npm help config
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 e6c9fe68fa..da2652c449 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
@@ -673,7 +673,7 @@ Try using the package name instead, e.g:
const breakingMessage = isSemVerMajor
? 'a SemVer major change'
: 'outside your stated dependency range'
- log.warn('audit', `Updating ${name} to ${version},` +
+ log.warn('audit', `Updating ${name} to ${version}, ` +
`which is ${breakingMessage}.`)
await this[_add](node, { add: [`${name}@${version}`] })
diff --git a/deps/npm/node_modules/@npmcli/arborist/package.json b/deps/npm/node_modules/@npmcli/arborist/package.json
index baae74e25a..bfb9b4273e 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": "5.2.1",
+ "version": "5.2.3",
"description": "Manage node_modules trees",
"dependencies": {
"@isaacs/string-locale-compare": "^1.1.0",
@@ -11,7 +11,7 @@
"@npmcli/name-from-folder": "^1.0.1",
"@npmcli/node-gyp": "^2.0.0",
"@npmcli/package-json": "^2.0.0",
- "@npmcli/run-script": "^3.0.0",
+ "@npmcli/run-script": "^4.1.3",
"bin-links": "^3.0.0",
"cacache": "^16.0.6",
"common-ancestor-path": "^1.0.1",
@@ -25,7 +25,7 @@
"npm-pick-manifest": "^7.0.0",
"npm-registry-fetch": "^13.0.0",
"npmlog": "^6.0.2",
- "pacote": "^13.0.5",
+ "pacote": "^13.6.1",
"parse-conflict-json": "^2.0.1",
"proc-log": "^2.0.0",
"promise-all-reject-late": "^1.0.0",
diff --git a/deps/npm/node_modules/@npmcli/run-script/lib/escape.js b/deps/npm/node_modules/@npmcli/run-script/lib/escape.js
new file mode 100644
index 0000000000..5254be24bf
--- /dev/null
+++ b/deps/npm/node_modules/@npmcli/run-script/lib/escape.js
@@ -0,0 +1,71 @@
+'use strict'
+
+// eslint-disable-next-line max-len
+// this code adapted from: https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/
+const cmd = (input, doubleEscape) => {
+ if (!input.length) {
+ return '""'
+ }
+
+ let result
+ if (!/[ \t\n\v"]/.test(input)) {
+ result = input
+ } else {
+ result = '"'
+ for (let i = 0; i <= input.length; ++i) {
+ let slashCount = 0
+ while (input[i] === '\\') {
+ ++i
+ ++slashCount
+ }
+
+ if (i === input.length) {
+ result += '\\'.repeat(slashCount * 2)
+ break
+ }
+
+ if (input[i] === '"') {
+ result += '\\'.repeat(slashCount * 2 + 1)
+ result += input[i]
+ } else {
+ result += '\\'.repeat(slashCount)
+ result += input[i]
+ }
+ }
+ result += '"'
+ }
+
+ // and finally, prefix shell meta chars with a ^
+ result = result.replace(/[ !^&()<>|"]/g, '^$&')
+ if (doubleEscape) {
+ result = result.replace(/[ !^&()<>|"]/g, '^$&')
+ }
+
+ // except for % which is escaped with another %, and only once
+ result = result.replace(/%/g, '%%')
+
+ return result
+}
+
+const sh = (input) => {
+ if (!input.length) {
+ return `''`
+ }
+
+ if (!/[\t\n\r "#$&'()*;<>?\\`|~]/.test(input)) {
+ return input
+ }
+
+ // replace single quotes with '\'' and wrap the whole result in a fresh set of quotes
+ const result = `'${input.replace(/'/g, `'\\''`)}'`
+ // if the input string already had single quotes around it, clean those up
+ .replace(/^(?:'')+(?!$)/, '')
+ .replace(/\\'''/g, `\\'`)
+
+ return result
+}
+
+module.exports = {
+ cmd,
+ sh,
+}
diff --git a/deps/npm/node_modules/@npmcli/run-script/lib/make-spawn-args.js b/deps/npm/node_modules/@npmcli/run-script/lib/make-spawn-args.js
index 9cfc84b0e0..660588e3ee 100644
--- a/deps/npm/node_modules/@npmcli/run-script/lib/make-spawn-args.js
+++ b/deps/npm/node_modules/@npmcli/run-script/lib/make-spawn-args.js
@@ -1,8 +1,12 @@
/* eslint camelcase: "off" */
const isWindows = require('./is-windows.js')
const setPATH = require('./set-path.js')
-const { resolve } = require('path')
+const { chmodSync: chmod, unlinkSync: unlink, writeFileSync: writeFile } = require('fs')
+const { tmpdir } = require('os')
+const { isAbsolute, resolve } = require('path')
+const which = require('which')
const npm_config_node_gyp = require.resolve('node-gyp/bin/node-gyp.js')
+const escape = require('./escape.js')
const makeSpawnArgs = options => {
const {
@@ -12,29 +16,93 @@ const makeSpawnArgs = options => {
env = {},
stdio,
cmd,
+ args = [],
stdioString = false,
} = options
+ const spawnEnv = setPATH(path, {
+ // we need to at least save the PATH environment var
+ ...process.env,
+ ...env,
+ npm_package_json: resolve(path, 'package.json'),
+ npm_lifecycle_event: event,
+ npm_lifecycle_script: cmd,
+ npm_config_node_gyp,
+ })
+
+ let scriptFile
+ let script = ''
+
const isCmd = /(?:^|\\)cmd(?:\.exe)?$/i.test(scriptShell)
- const args = isCmd ? ['/d', '/s', '/c', cmd] : ['-c', cmd]
+ if (isCmd) {
+ let initialCmd = ''
+ let insideQuotes = false
+ for (let i = 0; i < cmd.length; ++i) {
+ const char = cmd.charAt(i)
+ if (char === ' ' && !insideQuotes) {
+ break
+ }
+
+ initialCmd += char
+ if (char === '"' || char === "'") {
+ insideQuotes = !insideQuotes
+ }
+ }
+
+ let pathToInitial
+ try {
+ pathToInitial = which.sync(initialCmd, {
+ path: spawnEnv.path,
+ pathext: spawnEnv.pathext,
+ }).toLowerCase()
+ } catch (err) {
+ pathToInitial = initialCmd.toLowerCase()
+ }
+
+ const doubleEscape = pathToInitial.endsWith('.cmd') || pathToInitial.endsWith('.bat')
+
+ scriptFile = resolve(tmpdir(), `${event}-${Date.now()}.cmd`)
+ script += '@echo off\n'
+ script += cmd
+ if (args.length) {
+ script += ` ${args.map((arg) => escape.cmd(arg, doubleEscape)).join(' ')}`
+ }
+ } else {
+ const shebang = isAbsolute(scriptShell)
+ ? `#!${scriptShell}`
+ : `#!/usr/bin/env ${scriptShell}`
+ scriptFile = resolve(tmpdir(), `${event}-${Date.now()}.sh`)
+ script += `${shebang}\n`
+ script += cmd
+ if (args.length) {
+ script += ` ${args.map((arg) => escape.sh(arg)).join(' ')}`
+ }
+ }
+
+ writeFile(scriptFile, script)
+ if (!isCmd) {
+ chmod(scriptFile, '0775')
+ }
+ const spawnArgs = isCmd
+ ? ['/d', '/s', '/c', escape.cmd(scriptFile)]
+ : ['-c', escape.sh(scriptFile)]
const spawnOpts = {
- env: setPATH(path, {
- // we need to at least save the PATH environment var
- ...process.env,
- ...env,
- npm_package_json: resolve(path, 'package.json'),
- npm_lifecycle_event: event,
- npm_lifecycle_script: cmd,
- npm_config_node_gyp,
- }),
+ env: spawnEnv,
stdioString,
stdio,
cwd: path,
...(isCmd ? { windowsVerbatimArguments: true } : {}),
}
- return [scriptShell, args, spawnOpts]
+ const cleanup = () => {
+ // delete the script, this is just a best effort
+ try {
+ unlink(scriptFile)
+ } catch (err) {}
+ }
+
+ return [scriptShell, spawnArgs, spawnOpts, cleanup]
}
module.exports = makeSpawnArgs
diff --git a/deps/npm/node_modules/@npmcli/run-script/lib/run-script-pkg.js b/deps/npm/node_modules/@npmcli/run-script/lib/run-script-pkg.js
index a6fa4d2b38..84c5e2bfe0 100644
--- a/deps/npm/node_modules/@npmcli/run-script/lib/run-script-pkg.js
+++ b/deps/npm/node_modules/@npmcli/run-script/lib/run-script-pkg.js
@@ -31,7 +31,7 @@ const runScriptPkg = async options => {
if (options.cmd) {
cmd = options.cmd
} else if (pkg.scripts && pkg.scripts[event]) {
- cmd = pkg.scripts[event] + args.map(a => ` ${JSON.stringify(a)}`).join('')
+ cmd = pkg.scripts[event]
} else if (
// If there is no preinstall or install script, default to rebuilding node-gyp packages.
event === 'install' &&
@@ -42,7 +42,7 @@ const runScriptPkg = async options => {
) {
cmd = defaultGypInstallScript
} else if (event === 'start' && await isServerPackage(path)) {
- cmd = 'node server.js' + args.map(a => ` ${JSON.stringify(a)}`).join('')
+ cmd = 'node server.js'
}
if (!cmd) {
@@ -54,15 +54,18 @@ const runScriptPkg = async options => {
console.log(bruce(pkg._id, event, cmd))
}
- const p = promiseSpawn(...makeSpawnArgs({
+ const [spawnShell, spawnArgs, spawnOpts, cleanup] = makeSpawnArgs({
event,
path,
scriptShell,
env: packageEnvs(env, pkg),
stdio,
cmd,
+ args,
stdioString,
- }), {
+ })
+
+ const p = promiseSpawn(spawnShell, spawnArgs, spawnOpts, {
event,
script: cmd,
pkgid: pkg._id,
@@ -88,7 +91,7 @@ const runScriptPkg = async options => {
} else {
throw er
}
- })
+ }).finally(cleanup)
}
module.exports = runScriptPkg
diff --git a/deps/npm/node_modules/@npmcli/run-script/package.json b/deps/npm/node_modules/@npmcli/run-script/package.json
index 733b27e44a..ef8b43f772 100644
--- a/deps/npm/node_modules/@npmcli/run-script/package.json
+++ b/deps/npm/node_modules/@npmcli/run-script/package.json
@@ -1,6 +1,6 @@
{
"name": "@npmcli/run-script",
- "version": "3.0.2",
+ "version": "4.1.3",
"description": "Run a lifecycle script for a package (descendant of npm-lifecycle)",
"author": "GitHub Inc.",
"license": "ISC",
@@ -23,7 +23,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^3.0.1",
- "@npmcli/template-oss": "3.2.2",
+ "@npmcli/template-oss": "3.5.0",
"minipass": "^3.1.6",
"require-inject": "^1.4.4",
"tap": "^16.0.1"
@@ -48,6 +48,6 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
- "version": "3.2.2"
+ "version": "3.5.0"
}
}
diff --git a/deps/npm/node_modules/cacache/lib/content/read.js b/deps/npm/node_modules/cacache/lib/content/read.js
index f5128fe185..8367ccb205 100644
--- a/deps/npm/node_modules/cacache/lib/content/read.js
+++ b/deps/npm/node_modules/cacache/lib/content/read.js
@@ -13,7 +13,7 @@ async function read (cache, integrity, opts = {}) {
const { size } = opts
const { stat, cpath, sri } = await withContentSri(cache, integrity, async (cpath, sri) => {
// get size
- const stat = await fs.lstat(cpath)
+ const stat = await fs.stat(cpath)
return { stat, cpath, sri }
})
if (typeof size === 'number' && stat.size !== size) {
@@ -73,8 +73,8 @@ function readStream (cache, integrity, opts = {}) {
// Set all this up to run on the stream and then just return the stream
Promise.resolve().then(async () => {
const { stat, cpath, sri } = await withContentSri(cache, integrity, async (cpath, sri) => {
- // just lstat to ensure it exists
- const stat = await fs.lstat(cpath)
+ // just stat to ensure it exists
+ const stat = await fs.stat(cpath)
return { stat, cpath, sri }
})
if (typeof size === 'number' && size !== stat.size) {
@@ -111,7 +111,7 @@ async function hasContent (cache, integrity) {
try {
return await withContentSri(cache, integrity, async (cpath, sri) => {
- const stat = await fs.lstat(cpath)
+ const stat = await fs.stat(cpath)
return { size: stat.size, sri, stat }
})
} catch (err) {
@@ -139,7 +139,7 @@ function hasContentSync (cache, integrity) {
return withContentSriSync(cache, integrity, (cpath, sri) => {
try {
- const stat = fs.lstatSync(cpath)
+ const stat = fs.statSync(cpath)
return { size: stat.size, sri, stat }
} catch (err) {
if (err.code === 'ENOENT') {
diff --git a/deps/npm/node_modules/cacache/package.json b/deps/npm/node_modules/cacache/package.json
index 8e54901b45..bb5674dafc 100644
--- a/deps/npm/node_modules/cacache/package.json
+++ b/deps/npm/node_modules/cacache/package.json
@@ -1,6 +1,6 @@
{
"name": "cacache",
- "version": "16.1.0",
+ "version": "16.1.1",
"cache-version": {
"content": "2",
"index": "5"
@@ -69,7 +69,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^3.0.1",
- "@npmcli/template-oss": "3.4.3",
+ "@npmcli/template-oss": "3.5.0",
"tap": "^16.0.0"
},
"engines": {
@@ -78,7 +78,7 @@
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"windowsCI": false,
- "version": "3.4.3"
+ "version": "3.5.0"
},
"author": "GitHub Inc."
}
diff --git a/deps/npm/node_modules/libnpmdiff/package.json b/deps/npm/node_modules/libnpmdiff/package.json
index 3630980ccb..814629dd2e 100644
--- a/deps/npm/node_modules/libnpmdiff/package.json
+++ b/deps/npm/node_modules/libnpmdiff/package.json
@@ -1,6 +1,6 @@
{
"name": "libnpmdiff",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The registry diff",
"repository": {
"type": "git",
@@ -56,7 +56,7 @@
"diff": "^5.0.0",
"minimatch": "^5.0.1",
"npm-package-arg": "^9.0.1",
- "pacote": "^13.0.5",
+ "pacote": "^13.6.1",
"tar": "^6.1.0"
},
"templateOSS": {
diff --git a/deps/npm/node_modules/libnpmexec/package.json b/deps/npm/node_modules/libnpmexec/package.json
index dfe40b0d9f..d163103ea2 100644
--- a/deps/npm/node_modules/libnpmexec/package.json
+++ b/deps/npm/node_modules/libnpmexec/package.json
@@ -1,6 +1,6 @@
{
"name": "libnpmexec",
- "version": "4.0.6",
+ "version": "4.0.8",
"files": [
"bin/",
"lib/"
@@ -57,12 +57,12 @@
"dependencies": {
"@npmcli/arborist": "^5.0.0",
"@npmcli/ci-detect": "^2.0.0",
- "@npmcli/run-script": "^3.0.0",
+ "@npmcli/run-script": "^4.1.3",
"chalk": "^4.1.0",
"mkdirp-infer-owner": "^2.0.0",
"npm-package-arg": "^9.0.1",
"npmlog": "^6.0.2",
- "pacote": "^13.0.5",
+ "pacote": "^13.6.1",
"proc-log": "^2.0.0",
"read": "^1.0.7",
"read-package-json-fast": "^2.0.2",
diff --git a/deps/npm/node_modules/libnpmpack/package.json b/deps/npm/node_modules/libnpmpack/package.json
index 02f06a8bbf..86bec9ff1d 100644
--- a/deps/npm/node_modules/libnpmpack/package.json
+++ b/deps/npm/node_modules/libnpmpack/package.json
@@ -1,6 +1,6 @@
{
"name": "libnpmpack",
- "version": "4.1.0",
+ "version": "4.1.2",
"description": "Programmatic API for the bits behind npm pack",
"author": "GitHub Inc.",
"main": "lib/index.js",
@@ -38,9 +38,9 @@
"bugs": "https://github.com/npm/libnpmpack/issues",
"homepage": "https://npmjs.com/package/libnpmpack",
"dependencies": {
- "@npmcli/run-script": "^3.0.0",
+ "@npmcli/run-script": "^4.1.3",
"npm-package-arg": "^9.0.1",
- "pacote": "^13.5.0"
+ "pacote": "^13.6.1"
},
"engines": {
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
diff --git a/deps/npm/node_modules/libnpmversion/package.json b/deps/npm/node_modules/libnpmversion/package.json
index 86f9737812..c5c1a0398b 100644
--- a/deps/npm/node_modules/libnpmversion/package.json
+++ b/deps/npm/node_modules/libnpmversion/package.json
@@ -1,6 +1,6 @@
{
"name": "libnpmversion",
- "version": "3.0.4",
+ "version": "3.0.6",
"main": "lib/index.js",
"files": [
"bin/",
@@ -37,7 +37,7 @@
},
"dependencies": {
"@npmcli/git": "^3.0.0",
- "@npmcli/run-script": "^3.0.0",
+ "@npmcli/run-script": "^4.1.3",
"json-parse-even-better-errors": "^2.3.1",
"proc-log": "^2.0.0",
"semver": "^7.3.7"
diff --git a/deps/npm/node_modules/make-fetch-happen/lib/agent.js b/deps/npm/node_modules/make-fetch-happen/lib/agent.js
index f64644ff61..dd68492ed7 100644
--- a/deps/npm/node_modules/make-fetch-happen/lib/agent.js
+++ b/deps/npm/node_modules/make-fetch-happen/lib/agent.js
@@ -171,7 +171,7 @@ const getPath = u => u.pathname + u.search + u.hash
const HttpProxyAgent = require('http-proxy-agent')
const HttpsProxyAgent = require('https-proxy-agent')
-const SocksProxyAgent = require('socks-proxy-agent')
+const { SocksProxyAgent } = require('socks-proxy-agent')
module.exports.getProxy = getProxy
function getProxy (proxyUrl, opts, isHttps) {
// our current proxy agents do not support an overridden dns lookup method, so will not
@@ -198,6 +198,9 @@ function getProxy (proxyUrl, opts, isHttps) {
return new HttpsProxyAgent(popts)
}
} else if (proxyUrl.protocol.startsWith('socks')) {
+ // socks-proxy-agent uses hostname not host
+ popts.hostname = popts.host
+ delete popts.host
return new SocksProxyAgent(popts)
} else {
throw Object.assign(
diff --git a/deps/npm/node_modules/make-fetch-happen/package.json b/deps/npm/node_modules/make-fetch-happen/package.json
index e3d42bb211..e04c7645c4 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": "10.1.6",
+ "version": "10.1.8",
"description": "Opinionated, caching, retrying fetch client",
"main": "lib/index.js",
"files": [
@@ -50,7 +50,7 @@
"minipass-pipeline": "^1.2.4",
"negotiator": "^0.6.3",
"promise-retry": "^2.0.1",
- "socks-proxy-agent": "^6.1.1",
+ "socks-proxy-agent": "^7.0.0",
"ssri": "^9.0.0"
},
"devDependencies": {
diff --git a/deps/npm/node_modules/npm-profile/lib/index.js b/deps/npm/node_modules/npm-profile/lib/index.js
index 74a8084292..eb97c621dd 100644
--- a/deps/npm/node_modules/npm-profile/lib/index.js
+++ b/deps/npm/node_modules/npm-profile/lib/index.js
@@ -2,6 +2,7 @@
const fetch = require('npm-registry-fetch')
const { HttpErrorBase } = require('npm-registry-fetch/lib/errors')
+const EventEmitter = require('events')
const os = require('os')
const { URL } = require('url')
const log = require('proc-log')
@@ -59,6 +60,9 @@ const webAuth = (opener, opts, body) => {
...opts,
method: 'POST',
body,
+ headers: {
+ 'npm-use-webauthn': opts.authType === 'webauthn',
+ },
}).then(res => {
return Promise.all([res, res.json()])
}).then(([res, content]) => {
@@ -70,8 +74,23 @@ const webAuth = (opener, opts, body) => {
return content
}).then(({ doneUrl, loginUrl }) => {
log.verbose('web auth', 'opening url pair')
- return opener(loginUrl).then(
- () => webAuthCheckLogin(doneUrl, { ...opts, cache: false })
+
+ const doneEmitter = new EventEmitter()
+
+ const openPromise = opener(loginUrl, doneEmitter)
+ const webAuthCheckPromise = webAuthCheckLogin(doneUrl, { ...opts, cache: false })
+ .then(authResult => {
+ log.verbose('web auth', 'done-check finished')
+
+ // cancel open prompt if it's present
+ doneEmitter.emit('abort')
+
+ return authResult
+ })
+
+ return Promise.all([openPromise, webAuthCheckPromise]).then(
+ // pick the auth result and pass it along
+ ([, authResult]) => authResult
)
}).catch(er => {
if ((er.statusCode >= 400 && er.statusCode <= 499) || er.statusCode === 500) {
diff --git a/deps/npm/node_modules/npm-profile/package.json b/deps/npm/node_modules/npm-profile/package.json
index 5e8f2d2391..4f9da95d73 100644
--- a/deps/npm/node_modules/npm-profile/package.json
+++ b/deps/npm/node_modules/npm-profile/package.json
@@ -1,6 +1,6 @@
{
"name": "npm-profile",
- "version": "6.0.3",
+ "version": "6.1.0",
"description": "Library for updating an npmjs.com profile",
"keywords": [],
"author": "GitHub Inc.",
@@ -20,7 +20,7 @@
],
"devDependencies": {
"@npmcli/eslint-config": "^3.0.1",
- "@npmcli/template-oss": "3.4.1",
+ "@npmcli/template-oss": "3.4.2",
"nock": "^13.2.4",
"tap": "^16.0.1"
},
@@ -44,6 +44,6 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
- "version": "3.4.1"
+ "version": "3.4.2"
}
}
diff --git a/deps/npm/node_modules/pacote/package.json b/deps/npm/node_modules/pacote/package.json
index af100fa8d6..696c925d35 100644
--- a/deps/npm/node_modules/pacote/package.json
+++ b/deps/npm/node_modules/pacote/package.json
@@ -1,6 +1,6 @@
{
"name": "pacote",
- "version": "13.6.0",
+ "version": "13.6.1",
"description": "JavaScript package downloader",
"author": "GitHub Inc.",
"bin": {
@@ -45,7 +45,7 @@
"@npmcli/git": "^3.0.0",
"@npmcli/installed-package-contents": "^1.0.7",
"@npmcli/promise-spawn": "^3.0.0",
- "@npmcli/run-script": "^3.0.1",
+ "@npmcli/run-script": "^4.1.0",
"cacache": "^16.0.0",
"chownr": "^2.0.0",
"fs-minipass": "^2.1.0",
diff --git a/deps/npm/node_modules/socks-proxy-agent/package.json b/deps/npm/node_modules/socks-proxy-agent/package.json
index 268b8a5b18..aa2999969c 100644
--- a/deps/npm/node_modules/socks-proxy-agent/package.json
+++ b/deps/npm/node_modules/socks-proxy-agent/package.json
@@ -2,7 +2,7 @@
"name": "socks-proxy-agent",
"description": "A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS",
"homepage": "https://github.com/TooTallNate/node-socks-proxy-agent#readme",
- "version": "6.2.0",
+ "version": "7.0.0",
"main": "dist/index.js",
"author": {
"email": "nathan@tootallnate.net",
@@ -39,6 +39,10 @@
"email": "matheus.frndes@gmail.com"
},
{
+ "name": "Ricky Miller",
+ "email": "richardkazuomiller@gmail.com"
+ },
+ {
"name": "Shantanu Sharma",
"email": "shantanu34@outlook.com"
},
@@ -111,12 +115,12 @@
"@commitlint/config-conventional": "latest",
"@types/debug": "latest",
"@types/node": "latest",
- "cacheable-lookup": "^6.0.4",
+ "cacheable-lookup": "latest",
"conventional-github-releaser": "latest",
- "dns2": "^2.0.1",
+ "dns2": "latest",
"finepack": "latest",
"git-authors-cli": "latest",
- "mocha": "latest",
+ "mocha": "9",
"nano-staged": "latest",
"npm-check-updates": "latest",
"prettier-standard": "latest",
@@ -136,6 +140,22 @@
"files": [
"dist"
],
+ "scripts": {
+ "build": "tsc",
+ "clean": "rimraf node_modules",
+ "contributors": "(git-authors-cli && finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
+ "lint": "ts-standard",
+ "postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)",
+ "prebuild": "rimraf dist",
+ "prepublishOnly": "npm run build",
+ "prerelease": "npm run update:check && npm run contributors",
+ "release": "standard-version -a",
+ "release:github": "conventional-github-releaser -p angular",
+ "release:tags": "git push --follow-tags origin HEAD:master",
+ "test": "mocha --reporter spec",
+ "update": "ncu -u",
+ "update:check": "ncu -- --error-level 2"
+ },
"license": "MIT",
"commitlint": {
"extends": [
@@ -157,21 +177,5 @@
"commit-msg": "npx commitlint --edit",
"pre-commit": "npx nano-staged"
},
- "typings": "dist/index.d.ts",
- "scripts": {
- "build": "tsc",
- "clean": "rimraf node_modules",
- "contributors": "(git-authors-cli && finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
- "lint": "ts-standard",
- "postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)",
- "prebuild": "rimraf dist",
- "prerelease": "npm run update:check && npm run contributors",
- "release": "standard-version -a",
- "release:github": "conventional-github-releaser -p angular",
- "release:tags": "git push --follow-tags origin HEAD:master",
- "test": "mocha --reporter spec",
- "update": "ncu -u",
- "update:check": "ncu -- --error-level 2"
- },
- "readme": "socks-proxy-agent\n================\n### A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS\n[![Build Status](https://github.com/TooTallNate/node-socks-proxy-agent/workflows/Node%20CI/badge.svg)](https://github.com/TooTallNate/node-socks-proxy-agent/actions?workflow=Node+CI)\n\nThis module provides an `http.Agent` implementation that connects to a\nspecified SOCKS proxy server, and can be used with the built-in `http`\nand `https` modules.\n\nIt can also be used in conjunction with the `ws` module to establish a WebSocket\nconnection over a SOCKS proxy. See the \"Examples\" section below.\n\nInstallation\n------------\n\nInstall with `npm`:\n\n``` bash\nnpm install socks-proxy-agent\n```\n\n\nExamples\n--------\n\n#### TypeScript example\n\n```ts\nimport https from 'https';\nimport { SocksProxyAgent } from 'socks-proxy-agent';\n\nconst info = {\n\thostname: 'br41.nordvpn.com',\n\tuserId: 'your-name@gmail.com',\n\tpassword: 'abcdef12345124'\n};\nconst agent = new SocksProxyAgent(info);\n\nhttps.get('https://ipinfo.io', { agent }, (res) => {\n\tconsole.log(res.headers);\n\tres.pipe(process.stdout);\n});\n```\n\n#### `http` module example\n\n```js\nvar url = require('url');\nvar http = require('http');\nvar { SocksProxyAgent } = require('socks-proxy-agent');\n\n// SOCKS proxy to connect to\nvar proxy = process.env.socks_proxy || 'socks://127.0.0.1:1080';\nconsole.log('using proxy server %j', proxy);\n\n// HTTP endpoint for the proxy to connect to\nvar endpoint = process.argv[2] || 'http://nodejs.org/api/';\nconsole.log('attempting to GET %j', endpoint);\nvar opts = url.parse(endpoint);\n\n// create an instance of the `SocksProxyAgent` class with the proxy server information\nvar agent = new SocksProxyAgent(proxy);\nopts.agent = agent;\n\nhttp.get(opts, function (res) {\n\tconsole.log('\"response\" event!', res.headers);\n\tres.pipe(process.stdout);\n});\n```\n\n#### `https` module example\n\n```js\nvar url = require('url');\nvar https = require('https');\nvar { SocksProxyAgent } = require('socks-proxy-agent');\n\n// SOCKS proxy to connect to\nvar proxy = process.env.socks_proxy || 'socks://127.0.0.1:1080';\nconsole.log('using proxy server %j', proxy);\n\n// HTTP endpoint for the proxy to connect to\nvar endpoint = process.argv[2] || 'https://encrypted.google.com/';\nconsole.log('attempting to GET %j', endpoint);\nvar opts = url.parse(endpoint);\n\n// create an instance of the `SocksProxyAgent` class with the proxy server information\nvar agent = new SocksProxyAgent(proxy);\nopts.agent = agent;\n\nhttps.get(opts, function (res) {\n\tconsole.log('\"response\" event!', res.headers);\n\tres.pipe(process.stdout);\n});\n```\n\n#### `ws` WebSocket connection example\n\n``` js\nvar WebSocket = require('ws');\nvar { SocksProxyAgent } = require('socks-proxy-agent');\n\n// SOCKS proxy to connect to\nvar proxy = process.env.socks_proxy || 'socks://127.0.0.1:1080';\nconsole.log('using proxy server %j', proxy);\n\n// WebSocket endpoint for the proxy to connect to\nvar endpoint = process.argv[2] || 'ws://echo.websocket.org';\nconsole.log('attempting to connect to WebSocket %j', endpoint);\n\n// create an instance of the `SocksProxyAgent` class with the proxy server information\nvar agent = new SocksProxyAgent(proxy);\n\n// initiate the WebSocket connection\nvar socket = new WebSocket(endpoint, { agent: agent });\n\nsocket.on('open', function () {\n\tconsole.log('\"open\" event!');\n\tsocket.send('hello world');\n});\n\nsocket.on('message', function (data, flags) {\n\tconsole.log('\"message\" event! %j %j', data, flags);\n\tsocket.close();\n});\n```\n\nLicense\n-------\n\n(The MIT License)\n\nCopyright (c) 2013 Nathan Rajlich &lt;nathan@tootallnate.net&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
-} \ No newline at end of file
+ "typings": "dist/index.d.ts"
+}
diff --git a/deps/npm/package.json b/deps/npm/package.json
index fbfabe9365..a9d84ab62c 100644
--- a/deps/npm/package.json
+++ b/deps/npm/package.json
@@ -1,5 +1,5 @@
{
- "version": "8.12.1",
+ "version": "8.13.1",
"name": "npm",
"description": "a package manager for JavaScript",
"workspaces": [
@@ -62,10 +62,10 @@
"@npmcli/fs": "^2.1.0",
"@npmcli/map-workspaces": "^2.0.3",
"@npmcli/package-json": "^2.0.0",
- "@npmcli/run-script": "^3.0.1",
+ "@npmcli/run-script": "^4.1.3",
"abbrev": "~1.1.1",
"archy": "~1.0.0",
- "cacache": "^16.1.0",
+ "cacache": "^16.1.1",
"chalk": "^4.1.2",
"chownr": "^2.0.0",
"cli-columns": "^4.0.0",
@@ -90,7 +90,7 @@
"libnpmsearch": "^5.0.2",
"libnpmteam": "^4.0.2",
"libnpmversion": "^3.0.1",
- "make-fetch-happen": "^10.1.6",
+ "make-fetch-happen": "^10.1.8",
"minipass": "^3.1.6",
"minipass-pipeline": "^1.2.4",
"mkdirp": "^1.0.4",
@@ -102,12 +102,12 @@
"npm-install-checks": "^5.0.0",
"npm-package-arg": "^9.0.2",
"npm-pick-manifest": "^7.0.1",
- "npm-profile": "^6.0.3",
+ "npm-profile": "^6.1.0",
"npm-registry-fetch": "^13.1.1",
"npm-user-validate": "^1.0.1",
"npmlog": "^6.0.2",
"opener": "^1.5.2",
- "pacote": "^13.6.0",
+ "pacote": "^13.6.1",
"parse-conflict-json": "^2.0.2",
"proc-log": "^2.0.1",
"qrcode-terminal": "^0.12.0",
diff --git a/deps/npm/tap-snapshots/test/lib/load-all-commands.js.test.cjs b/deps/npm/tap-snapshots/test/lib/load-all-commands.js.test.cjs
index 802fa8de93..13a3b06fe3 100644
--- a/deps/npm/tap-snapshots/test/lib/load-all-commands.js.test.cjs
+++ b/deps/npm/tap-snapshots/test/lib/load-all-commands.js.test.cjs
@@ -98,11 +98,7 @@ exports[`test/lib/load-all-commands.js TAP load each command cache > must match
Manipulates packages cache
Usage:
-npm cache add <tarball file>
-npm cache add <folder>
-npm cache add <tarball url>
-npm cache add <git url>
-npm cache add <name>@<version>
+npm cache add <package-spec>
npm cache clean [<key>]
npm cache ls [<name>@<version>]
npm cache verify
@@ -178,7 +174,7 @@ exports[`test/lib/load-all-commands.js TAP load each command deprecate > must ma
Deprecate a version of a package
Usage:
-npm deprecate <pkg>[@<version>] <message>
+npm deprecate <package-spec> <message>
Options:
[--registry <registry>] [--otp <otp>]
@@ -193,10 +189,10 @@ Usage:
npm diff [...<paths>]
Options:
-[--diff <pkg-name|spec|version> [--diff <pkg-name|spec|version> ...]]
-[--diff-name-only] [--diff-unified <number>] [--diff-ignore-all-space]
-[--diff-no-prefix] [--diff-src-prefix <path>] [--diff-dst-prefix <path>]
-[--diff-text] [-g|--global] [--tag <tag>]
+[--diff <package-spec> [--diff <package-spec> ...]] [--diff-name-only]
+[--diff-unified <number>] [--diff-ignore-all-space] [--diff-no-prefix]
+[--diff-src-prefix <path>] [--diff-dst-prefix <path>] [--diff-text] [-g|--global]
+[--tag <tag>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root]
@@ -207,9 +203,9 @@ exports[`test/lib/load-all-commands.js TAP load each command dist-tag > must mat
Modify package distribution tags
Usage:
-npm dist-tag add <pkg>@<version> [<tag>]
-npm dist-tag rm <pkg> <tag>
-npm dist-tag ls [<pkg>]
+npm dist-tag add <package-spec (with version)> [<tag>]
+npm dist-tag rm <package-spec> <tag>
+npm dist-tag ls [<package-spec>]
Options:
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
@@ -270,8 +266,7 @@ npm exec -c '<cmd> [args...]'
npm exec --package=foo -c '<cmd> [args...]'
Options:
-[--package <pkg>[@<version>] [--package <pkg>[@<version>] ...]]
-[-c|--call <call>]
+[--package <package-spec> [--package <package-spec> ...]] [-c|--call <call>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root]
@@ -284,7 +279,7 @@ exports[`test/lib/load-all-commands.js TAP load each command explain > must matc
Explain installed packages
Usage:
-npm explain <folder | specifier>
+npm explain <package-spec>
Options:
[--json] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
@@ -326,7 +321,7 @@ exports[`test/lib/load-all-commands.js TAP load each command fund > must match s
Retrieve funding information
Usage:
-npm fund [[<@scope>/]<pkg>]
+npm fund [<package-spec>]
Options:
[--json] [--no-browser|--browser <browser>] [--unicode]
@@ -390,12 +385,11 @@ exports[`test/lib/load-all-commands.js TAP load each command init > must match s
Create a package.json file
Usage:
-npm init [--force|-f|--yes|-y|--scope]
+npm init <package-spec> (same as \`npx <package-spec>)
npm init <@scope> (same as \`npx <@scope>/create\`)
-npm init [<@scope>/]<name> (same as \`npx [<@scope>/]create-<name>\`)
Options:
-[-y|--yes] [-f|--force]
+[-y|--yes] [-f|--force] [--scope <@scope>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--no-workspaces-update] [--include-workspace-root]
@@ -408,16 +402,7 @@ exports[`test/lib/load-all-commands.js TAP load each command install > must matc
Install a package
Usage:
-npm install [<@scope>/]<pkg>
-npm install [<@scope>/]<pkg>@<tag>
-npm install [<@scope>/]<pkg>@<version>
-npm install [<@scope>/]<pkg>@<version range>
-npm install <alias>@npm:<name>
-npm install <folder>
-npm install <tarball file>
-npm install <tarball url>
-npm install <git:// url>
-npm install <github username>/<github project>
+npm install [<package-spec> ...]
Options:
[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]
@@ -452,16 +437,7 @@ exports[`test/lib/load-all-commands.js TAP load each command install-test > must
Install package(s) and run tests
Usage:
-npm install-test [<@scope>/]<pkg>
-npm install-test [<@scope>/]<pkg>@<tag>
-npm install-test [<@scope>/]<pkg>@<version>
-npm install-test [<@scope>/]<pkg>@<version range>
-npm install-test <alias>@npm:<name>
-npm install-test <folder>
-npm install-test <tarball file>
-npm install-test <tarball url>
-npm install-test <git:// url>
-npm install-test <github username>/<github project>
+npm install-test [<package-spec> ...]
Options:
[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]
@@ -481,8 +457,7 @@ exports[`test/lib/load-all-commands.js TAP load each command link > must match s
Symlink a package folder
Usage:
-npm link (in package dir)
-npm link [<@scope>/]<pkg>[@<version>]
+npm link [<package-spec>]
Options:
[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]
@@ -547,7 +522,7 @@ exports[`test/lib/load-all-commands.js TAP load each command ls > must match sna
List installed packages
Usage:
-npm ls [[<@scope>/]<pkg> ...]
+npm ls <package-spec>
Options:
[-a|--all] [--json] [-l|--long] [-p|--parseable] [-g|--global] [--depth <depth>]
@@ -581,7 +556,7 @@ exports[`test/lib/load-all-commands.js TAP load each command outdated > must mat
Check for outdated packages
Usage:
-npm outdated [[<@scope>/]<pkg> ...]
+npm outdated [<package-spec> ...]
Options:
[-a|--all] [--json] [-l|--long] [-p|--parseable] [-g|--global]
@@ -594,9 +569,9 @@ exports[`test/lib/load-all-commands.js TAP load each command owner > must match
Manage package owners
Usage:
-npm owner add <user> [<@scope>/]<pkg>
-npm owner rm <user> [<@scope>/]<pkg>
-npm owner ls [<@scope>/]<pkg>
+npm owner add <user> <package-spec>
+npm owner rm <user> <package-spec>
+npm owner ls <package-spec>
Options:
[--registry <registry>] [--otp <otp>]
@@ -612,7 +587,7 @@ exports[`test/lib/load-all-commands.js TAP load each command pack > must match s
Create a tarball from a package
Usage:
-npm pack [[<@scope>/]<pkg>...]
+npm pack <package-spec>
Options:
[--dry-run] [--json] [--pack-destination <pack-destination>]
@@ -698,7 +673,7 @@ exports[`test/lib/load-all-commands.js TAP load each command publish > must matc
Publish a package
Usage:
-npm publish [<folder>]
+npm publish <package-spec>
Options:
[--tag <tag>] [--access <restricted|public>] [--dry-run] [--otp <otp>]
@@ -712,7 +687,7 @@ exports[`test/lib/load-all-commands.js TAP load each command rebuild > must matc
Rebuild a package
Usage:
-npm rebuild [[<@scope>/]<name>[@<version>] ...]
+npm rebuild [<package-spec>] ...]
Options:
[-g|--global] [--no-bin-links] [--foreground-scripts] [--ignore-scripts]
@@ -829,7 +804,7 @@ exports[`test/lib/load-all-commands.js TAP load each command star > must match s
Mark your favorite packages
Usage:
-npm star [<pkg>...]
+npm star [<package-spec>...]
Options:
[--registry <registry>] [--unicode] [--otp <otp>]
@@ -938,7 +913,7 @@ exports[`test/lib/load-all-commands.js TAP load each command unpublish > must ma
Remove a package from the registry
Usage:
-npm unpublish [<@scope>/]<pkg>[@<version>]
+npm unpublish [<package-spec>]
Options:
[--dry-run] [-f|--force]
@@ -952,7 +927,7 @@ exports[`test/lib/load-all-commands.js TAP load each command unstar > must match
Remove an item from your favorite packages
Usage:
-npm unstar [<pkg>...]
+npm unstar [<package-spec>...]
Options:
[--registry <registry>] [--unicode] [--otp <otp>]
@@ -1001,7 +976,7 @@ exports[`test/lib/load-all-commands.js TAP load each command view > must match s
View registry info
Usage:
-npm view [<@scope>/]<pkg>[@<version>] [<field>[.subfield]...]
+npm view [<package-spec>] [<field>[.subfield]...]
Options:
[--json] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
diff --git a/deps/npm/tap-snapshots/test/lib/npm.js.test.cjs b/deps/npm/tap-snapshots/test/lib/npm.js.test.cjs
index d08935a14d..c59252f9e8 100644
--- a/deps/npm/tap-snapshots/test/lib/npm.js.test.cjs
+++ b/deps/npm/tap-snapshots/test/lib/npm.js.test.cjs
@@ -238,11 +238,7 @@ All commands:
cache Manipulates packages cache
Usage:
- npm cache add <tarball file>
- npm cache add <folder>
- npm cache add <tarball url>
- npm cache add <git url>
- npm cache add <name>@<version>
+ npm cache add <package-spec>
npm cache clean [<key>]
npm cache ls [<name>@<version>]
npm cache verify
@@ -308,7 +304,7 @@ All commands:
deprecate Deprecate a version of a package
Usage:
- npm deprecate <pkg>[@<version>] <message>
+ npm deprecate <package-spec> <message>
Options:
[--registry <registry>] [--otp <otp>]
@@ -321,10 +317,10 @@ All commands:
npm diff [...<paths>]
Options:
- [--diff <pkg-name|spec|version> [--diff <pkg-name|spec|version> ...]]
- [--diff-name-only] [--diff-unified <number>] [--diff-ignore-all-space]
- [--diff-no-prefix] [--diff-src-prefix <path>] [--diff-dst-prefix <path>]
- [--diff-text] [-g|--global] [--tag <tag>]
+ [--diff <package-spec> [--diff <package-spec> ...]] [--diff-name-only]
+ [--diff-unified <number>] [--diff-ignore-all-space] [--diff-no-prefix]
+ [--diff-src-prefix <path>] [--diff-dst-prefix <path>] [--diff-text] [-g|--global]
+ [--tag <tag>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root]
@@ -333,9 +329,9 @@ All commands:
dist-tag Modify package distribution tags
Usage:
- npm dist-tag add <pkg>@<version> [<tag>]
- npm dist-tag rm <pkg> <tag>
- npm dist-tag ls [<pkg>]
+ npm dist-tag add <package-spec (with version)> [<tag>]
+ npm dist-tag rm <package-spec> <tag>
+ npm dist-tag ls [<package-spec>]
Options:
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
@@ -388,8 +384,7 @@ All commands:
npm exec --package=foo -c '<cmd> [args...]'
Options:
- [--package <pkg>[@<version>] [--package <pkg>[@<version>] ...]]
- [-c|--call <call>]
+ [--package <package-spec> [--package <package-spec> ...]] [-c|--call <call>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root]
@@ -400,7 +395,7 @@ All commands:
explain Explain installed packages
Usage:
- npm explain <folder | specifier>
+ npm explain <package-spec>
Options:
[--json] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
@@ -436,7 +431,7 @@ All commands:
fund Retrieve funding information
Usage:
- npm fund [[<@scope>/]<pkg>]
+ npm fund [<package-spec>]
Options:
[--json] [--no-browser|--browser <browser>] [--unicode]
@@ -480,12 +475,11 @@ All commands:
init Create a package.json file
Usage:
- npm init [--force|-f|--yes|-y|--scope]
+ npm init <package-spec> (same as \`npx <package-spec>)
npm init <@scope> (same as \`npx <@scope>/create\`)
- npm init [<@scope>/]<name> (same as \`npx [<@scope>/]create-<name>\`)
Options:
- [-y|--yes] [-f|--force]
+ [-y|--yes] [-f|--force] [--scope <@scope>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--no-workspaces-update] [--include-workspace-root]
@@ -496,16 +490,7 @@ All commands:
install Install a package
Usage:
- npm install [<@scope>/]<pkg>
- npm install [<@scope>/]<pkg>@<tag>
- npm install [<@scope>/]<pkg>@<version>
- npm install [<@scope>/]<pkg>@<version range>
- npm install <alias>@npm:<name>
- npm install <folder>
- npm install <tarball file>
- npm install <tarball url>
- npm install <git:// url>
- npm install <github username>/<github project>
+ npm install [<package-spec> ...]
Options:
[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]
@@ -536,16 +521,7 @@ All commands:
install-test Install package(s) and run tests
Usage:
- npm install-test [<@scope>/]<pkg>
- npm install-test [<@scope>/]<pkg>@<tag>
- npm install-test [<@scope>/]<pkg>@<version>
- npm install-test [<@scope>/]<pkg>@<version range>
- npm install-test <alias>@npm:<name>
- npm install-test <folder>
- npm install-test <tarball file>
- npm install-test <tarball url>
- npm install-test <git:// url>
- npm install-test <github username>/<github project>
+ npm install-test [<package-spec> ...]
Options:
[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]
@@ -563,8 +539,7 @@ All commands:
link Symlink a package folder
Usage:
- npm link (in package dir)
- npm link [<@scope>/]<pkg>[@<version>]
+ npm link [<package-spec>]
Options:
[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]
@@ -621,7 +596,7 @@ All commands:
ls List installed packages
Usage:
- npm ls [[<@scope>/]<pkg> ...]
+ npm ls <package-spec>
Options:
[-a|--all] [--json] [-l|--long] [-p|--parseable] [-g|--global] [--depth <depth>]
@@ -651,7 +626,7 @@ All commands:
outdated Check for outdated packages
Usage:
- npm outdated [[<@scope>/]<pkg> ...]
+ npm outdated [<package-spec> ...]
Options:
[-a|--all] [--json] [-l|--long] [-p|--parseable] [-g|--global]
@@ -662,9 +637,9 @@ All commands:
owner Manage package owners
Usage:
- npm owner add <user> [<@scope>/]<pkg>
- npm owner rm <user> [<@scope>/]<pkg>
- npm owner ls [<@scope>/]<pkg>
+ npm owner add <user> <package-spec>
+ npm owner rm <user> <package-spec>
+ npm owner ls <package-spec>
Options:
[--registry <registry>] [--otp <otp>]
@@ -678,7 +653,7 @@ All commands:
pack Create a tarball from a package
Usage:
- npm pack [[<@scope>/]<pkg>...]
+ npm pack <package-spec>
Options:
[--dry-run] [--json] [--pack-destination <pack-destination>]
@@ -752,7 +727,7 @@ All commands:
publish Publish a package
Usage:
- npm publish [<folder>]
+ npm publish <package-spec>
Options:
[--tag <tag>] [--access <restricted|public>] [--dry-run] [--otp <otp>]
@@ -764,7 +739,7 @@ All commands:
rebuild Rebuild a package
Usage:
- npm rebuild [[<@scope>/]<name>[@<version>] ...]
+ npm rebuild [<package-spec>] ...]
Options:
[-g|--global] [--no-bin-links] [--foreground-scripts] [--ignore-scripts]
@@ -863,7 +838,7 @@ All commands:
star Mark your favorite packages
Usage:
- npm star [<pkg>...]
+ npm star [<package-spec>...]
Options:
[--registry <registry>] [--unicode] [--otp <otp>]
@@ -956,7 +931,7 @@ All commands:
unpublish Remove a package from the registry
Usage:
- npm unpublish [<@scope>/]<pkg>[@<version>]
+ npm unpublish [<package-spec>]
Options:
[--dry-run] [-f|--force]
@@ -968,7 +943,7 @@ All commands:
unstar Remove an item from your favorite packages
Usage:
- npm unstar [<pkg>...]
+ npm unstar [<package-spec>...]
Options:
[--registry <registry>] [--unicode] [--otp <otp>]
@@ -1011,7 +986,7 @@ All commands:
view View registry info
Usage:
- npm view [<@scope>/]<pkg>[@<version>] [<field>[.subfield]...]
+ npm view [<package-spec>] [<field>[.subfield]...]
Options:
[--json] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
diff --git a/deps/npm/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs b/deps/npm/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs
index 33d6e4fb7a..19909d8c5b 100644
--- a/deps/npm/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs
+++ b/deps/npm/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs
@@ -1591,7 +1591,7 @@ exports[`test/lib/utils/config/definitions.js TAP > config description for scrip
* Type: null or String
The shell to use for scripts run with the \`npm exec\`, \`npm run\` and \`npm
-init <pkg>\` commands.
+init <package-spec>\` commands.
`
exports[`test/lib/utils/config/definitions.js TAP > config description for searchexclude 1`] = `
diff --git a/deps/npm/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs b/deps/npm/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs
index 77f2c87684..9d95aa9528 100644
--- a/deps/npm/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs
+++ b/deps/npm/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs
@@ -1391,7 +1391,7 @@ npm init --scope=@foo --yes
* Type: null or String
The shell to use for scripts run with the \`npm exec\`, \`npm run\` and \`npm
-init <pkg>\` commands.
+init <package-spec>\` commands.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/deps/npm/tap-snapshots/test/lib/utils/open-url-prompt.js.test.cjs b/deps/npm/tap-snapshots/test/lib/utils/open-url-prompt.js.test.cjs
new file mode 100644
index 0000000000..8af3c475c7
--- /dev/null
+++ b/deps/npm/tap-snapshots/test/lib/utils/open-url-prompt.js.test.cjs
@@ -0,0 +1,25 @@
+/* IMPORTANT
+ * This snapshot file is auto-generated, but designed for humans.
+ * It should be checked into source control and tracked carefully.
+ * Re-generate by setting TAP_SNAPSHOT=1 and running tests.
+ * Make sure to inspect the output below. Do not ignore changes!
+ */
+'use strict'
+exports[`test/lib/utils/open-url-prompt.js TAP opens a url > must match snapshot 1`] = `
+Array [
+ Array [
+ String(
+ npm home:
+ https://www.npmjs.com
+ ),
+ ],
+]
+`
+
+exports[`test/lib/utils/open-url-prompt.js TAP prints json output > must match snapshot 1`] = `
+Array [
+ Array [
+ "{\\"title\\":\\"npm home\\",\\"url\\":\\"https://www.npmjs.com\\"}",
+ ],
+]
+`
diff --git a/deps/npm/test/lib/auth/legacy.js b/deps/npm/test/lib/auth/legacy.js
index 0c23f8ba6b..39d977d436 100644
--- a/deps/npm/test/lib/auth/legacy.js
+++ b/deps/npm/test/lib/auth/legacy.js
@@ -12,7 +12,7 @@ const legacy = t.mock('../../../lib/auth/legacy.js', {
},
},
'npm-profile': profile,
- '../../../lib/utils/open-url.js': (npm, url, msg) => {
+ '../../../lib/utils/open-url-prompt.js': (_npm, url) => {
if (!url) {
throw Object.assign(new Error('failed open url'), { code: 'ERROR' })
}
diff --git a/deps/npm/test/lib/commands/edit.js b/deps/npm/test/lib/commands/edit.js
index 1943e8c5fb..b2a10be135 100644
--- a/deps/npm/test/lib/commands/edit.js
+++ b/deps/npm/test/lib/commands/edit.js
@@ -1,4 +1,5 @@
const t = require('tap')
+const fs = require('fs')
const path = require('path')
const tspawk = require('../../fixtures/tspawk')
const { load: loadMockNpm } = require('../../fixtures/mock-npm')
@@ -41,11 +42,19 @@ t.test('npm edit', async t => {
const [scriptShell] = makeSpawnArgs({
event: 'install',
path: npm.prefix,
+ cmd: 'testinstall',
})
spawk.spawn('testeditor', [semverPath])
spawk.spawn(
scriptShell,
- args => args.includes('testinstall'),
+ args => {
+ const lastArg = args[args.length - 1]
+ const rightExtension = lastArg.endsWith('.cmd') || lastArg.endsWith('.sh')
+ const rightFilename = path.basename(lastArg).startsWith('install')
+ const rightContents = fs.readFileSync(lastArg, { encoding: 'utf8' })
+ .trim().endsWith('testinstall')
+ return rightExtension && rightFilename && rightContents
+ },
{ cwd: semverPath }
)
await npm.exec('edit', ['semver'])
@@ -58,11 +67,19 @@ t.test('rebuild failure', async t => {
const [scriptShell] = makeSpawnArgs({
event: 'install',
path: npm.prefix,
+ cmd: 'testinstall',
})
spawk.spawn('testeditor', [semverPath])
spawk.spawn(
scriptShell,
- args => args.includes('testinstall'),
+ args => {
+ const lastArg = args[args.length - 1]
+ const rightExtension = lastArg.endsWith('.cmd') || lastArg.endsWith('.sh')
+ const rightFilename = path.basename(lastArg).startsWith('install')
+ const rightContents = fs.readFileSync(lastArg, { encoding: 'utf8' })
+ .trim().endsWith('testinstall')
+ return rightExtension && rightFilename && rightContents
+ },
{ cwd: semverPath }
).exit(1).stdout('test error')
await t.rejects(
@@ -94,11 +111,19 @@ t.test('npm edit editor has flags', async t => {
const [scriptShell] = makeSpawnArgs({
event: 'install',
path: npm.prefix,
+ cmd: 'testinstall',
})
spawk.spawn('testeditor', ['--flag', semverPath])
spawk.spawn(
scriptShell,
- args => args.includes('testinstall'),
+ args => {
+ const lastArg = args[args.length - 1]
+ const rightExtension = lastArg.endsWith('.cmd') || lastArg.endsWith('.sh')
+ const rightFilename = path.basename(lastArg).startsWith('install')
+ const rightContents = fs.readFileSync(lastArg, { encoding: 'utf8' })
+ .trim().endsWith('testinstall')
+ return rightExtension && rightFilename && rightContents
+ },
{ cwd: semverPath }
)
await npm.exec('edit', ['semver'])
diff --git a/deps/npm/test/lib/commands/restart.js b/deps/npm/test/lib/commands/restart.js
index 84bd93d8c9..bfbe715e8c 100644
--- a/deps/npm/test/lib/commands/restart.js
+++ b/deps/npm/test/lib/commands/restart.js
@@ -1,3 +1,5 @@
+const fs = require('fs')
+const path = require('path')
const t = require('tap')
const tspawk = require('../../fixtures/tspawk')
const { load: loadMockNpm } = require('../../fixtures/mock-npm')
@@ -24,10 +26,14 @@ t.test('should run restart script from package.json', async t => {
loglevel: 'silent',
},
})
- const [scriptShell] = makeSpawnArgs({ path: npm.prefix })
+ const [scriptShell] = makeSpawnArgs({ path: npm.prefix, cmd: 'node ./test-restart.js' })
const script = spawk.spawn(scriptShell, (args) => {
- t.ok(args.includes('node ./test-restart.js "foo"'), 'ran restart script with extra args')
- return true
+ const lastArg = args[args.length - 1]
+ const rightExtension = lastArg.endsWith('.cmd') || lastArg.endsWith('.sh')
+ const rightFilename = path.basename(lastArg).startsWith('restart')
+ const rightContents = fs.readFileSync(lastArg, { encoding: 'utf8' })
+ .trim().endsWith('foo')
+ return rightExtension && rightFilename && rightContents
})
await npm.exec('restart', ['foo'])
t.ok(script.called, 'script ran')
diff --git a/deps/npm/test/lib/commands/start.js b/deps/npm/test/lib/commands/start.js
index 8fc73493d2..79c2133bc6 100644
--- a/deps/npm/test/lib/commands/start.js
+++ b/deps/npm/test/lib/commands/start.js
@@ -1,3 +1,5 @@
+const fs = require('fs')
+const path = require('path')
const t = require('tap')
const tspawk = require('../../fixtures/tspawk')
const { load: loadMockNpm } = require('../../fixtures/mock-npm')
@@ -10,7 +12,6 @@ const spawk = tspawk(t)
const makeSpawnArgs = require('@npmcli/run-script/lib/make-spawn-args.js')
t.test('should run start script from package.json', async t => {
- t.plan(2)
const { npm } = await loadMockNpm(t, {
prefixDir: {
'package.json': JSON.stringify({
@@ -25,10 +26,14 @@ t.test('should run start script from package.json', async t => {
loglevel: 'silent',
},
})
- const [scriptShell] = makeSpawnArgs({ path: npm.prefix })
+ const [scriptShell] = makeSpawnArgs({ path: npm.prefix, cmd: 'node ./test-start.js' })
const script = spawk.spawn(scriptShell, (args) => {
- t.ok(args.includes('node ./test-start.js "foo"'), 'ran start script with extra args')
- return true
+ const lastArg = args[args.length - 1]
+ const rightExtension = lastArg.endsWith('.cmd') || lastArg.endsWith('.sh')
+ const rightFilename = path.basename(lastArg).startsWith('start')
+ const rightContents = fs.readFileSync(lastArg, { encoding: 'utf8' })
+ .trim().endsWith('foo')
+ return rightExtension && rightFilename && rightContents
})
await npm.exec('start', ['foo'])
t.ok(script.called, 'script ran')
diff --git a/deps/npm/test/lib/commands/stop.js b/deps/npm/test/lib/commands/stop.js
index f2aef21899..1a4abd0b3a 100644
--- a/deps/npm/test/lib/commands/stop.js
+++ b/deps/npm/test/lib/commands/stop.js
@@ -1,3 +1,5 @@
+const fs = require('fs')
+const path = require('path')
const t = require('tap')
const tspawk = require('../../fixtures/tspawk')
const { load: loadMockNpm } = require('../../fixtures/mock-npm')
@@ -24,10 +26,14 @@ t.test('should run stop script from package.json', async t => {
loglevel: 'silent',
},
})
- const [scriptShell] = makeSpawnArgs({ path: npm.prefix })
+ const [scriptShell] = makeSpawnArgs({ path: npm.prefix, cmd: 'node ./test-stop.js' })
const script = spawk.spawn(scriptShell, (args) => {
- t.ok(args.includes('node ./test-stop.js "foo"'), 'ran stop script with extra args')
- return true
+ const lastArg = args[args.length - 1]
+ const rightExtension = lastArg.endsWith('.cmd') || lastArg.endsWith('.sh')
+ const rightFilename = path.basename(lastArg).startsWith('stop')
+ const rightContents = fs.readFileSync(lastArg, { encoding: 'utf8' })
+ .trim().endsWith('foo')
+ return rightExtension && rightFilename && rightContents
})
await npm.exec('stop', ['foo'])
t.ok(script.called, 'script ran')
diff --git a/deps/npm/test/lib/commands/test.js b/deps/npm/test/lib/commands/test.js
index e9ea0a3c83..c6d3f530bb 100644
--- a/deps/npm/test/lib/commands/test.js
+++ b/deps/npm/test/lib/commands/test.js
@@ -1,3 +1,5 @@
+const fs = require('fs')
+const path = require('path')
const t = require('tap')
const tspawk = require('../../fixtures/tspawk')
const { load: loadMockNpm } = require('../../fixtures/mock-npm')
@@ -24,10 +26,14 @@ t.test('should run test script from package.json', async t => {
loglevel: 'silent',
},
})
- const [scriptShell] = makeSpawnArgs({ path: npm.prefix })
+ const [scriptShell] = makeSpawnArgs({ path: npm.prefix, cmd: 'node ./test-test.js' })
const script = spawk.spawn(scriptShell, (args) => {
- t.ok(args.includes('node ./test-test.js "foo"'), 'ran test script with extra args')
- return true
+ const lastArg = args[args.length - 1]
+ const rightExtension = lastArg.endsWith('.cmd') || lastArg.endsWith('.sh')
+ const rightFilename = path.basename(lastArg).startsWith('test')
+ const rightContents = fs.readFileSync(lastArg, { encoding: 'utf8' })
+ .trim().endsWith('foo')
+ return rightExtension && rightFilename && rightContents
})
await npm.exec('test', ['foo'])
t.ok(script.called, 'script ran')
diff --git a/deps/npm/test/lib/commands/view.js b/deps/npm/test/lib/commands/view.js
index da823db5d7..d347bc9230 100644
--- a/deps/npm/test/lib/commands/view.js
+++ b/deps/npm/test/lib/commands/view.js
@@ -33,6 +33,7 @@ const packument = (nv, opts) => {
},
},
blue: {
+ _id: 'blue',
name: 'blue',
'dist-tags': {
latest: '1.0.0',
@@ -464,6 +465,14 @@ t.test('throws when unpublished', async t => {
)
})
+t.test('throws when version not matched', async t => {
+ const { npm } = await loadMockNpm(t)
+ await t.rejects(
+ npm.exec('view', ['blue@2.0.0']),
+ { code: 'E404', pkgid: 'blue@2.0.0', message: 'No match found for version 2.0.0' }
+ )
+})
+
t.test('workspaces', async t => {
const prefixDir = {
'package.json': JSON.stringify({
diff --git a/deps/npm/test/lib/utils/open-url-prompt.js b/deps/npm/test/lib/utils/open-url-prompt.js
new file mode 100644
index 0000000000..6908e36b7c
--- /dev/null
+++ b/deps/npm/test/lib/utils/open-url-prompt.js
@@ -0,0 +1,150 @@
+const t = require('tap')
+const mockGlobals = require('../../fixtures/mock-globals.js')
+const EventEmitter = require('events')
+
+const OUTPUT = []
+const output = (...args) => OUTPUT.push(args)
+const npm = {
+ _config: {
+ json: false,
+ browser: true,
+ },
+ config: {
+ get: k => npm._config[k],
+ set: (k, v) => {
+ npm._config[k] = v
+ },
+ },
+ output,
+}
+
+let openerUrl = null
+let openerOpts = null
+let openerResult = null
+const opener = (url, opts, cb) => {
+ openerUrl = url
+ openerOpts = opts
+ return cb(openerResult)
+}
+
+let questionShouldResolve = true
+const readline = {
+ createInterface: () => ({
+ question: (_q, cb) => {
+ if (questionShouldResolve === true) {
+ cb()
+ }
+ },
+ close: () => {},
+ }),
+}
+
+const openUrlPrompt = t.mock('../../../lib/utils/open-url-prompt.js', {
+ opener,
+ readline,
+})
+
+mockGlobals(t, {
+ 'process.stdin.isTTY': true,
+ 'process.stdout.isTTY': true,
+})
+
+t.test('does not open a url in non-interactive environments', async t => {
+ t.teardown(() => {
+ openerUrl = null
+ openerOpts = null
+ OUTPUT.length = 0
+ })
+
+ mockGlobals(t, {
+ 'process.stdin.isTTY': false,
+ 'process.stdout.isTTY': false,
+ })
+
+ await openUrlPrompt(npm, 'https://www.npmjs.com', 'npm home', 'prompt')
+ t.equal(openerUrl, null, 'did not open')
+ t.same(openerOpts, null, 'did not open')
+})
+
+t.test('opens a url', async t => {
+ t.teardown(() => {
+ openerUrl = null
+ openerOpts = null
+ OUTPUT.length = 0
+ npm._config.browser = true
+ })
+
+ npm._config.browser = 'browser'
+ await openUrlPrompt(npm, 'https://www.npmjs.com', 'npm home', 'prompt')
+ t.equal(openerUrl, 'https://www.npmjs.com', 'opened the given url')
+ t.same(openerOpts, { command: 'browser' }, 'passed command as null (the default)')
+ t.matchSnapshot(OUTPUT)
+})
+
+t.test('prints json output', async t => {
+ t.teardown(() => {
+ openerUrl = null
+ openerOpts = null
+ OUTPUT.length = 0
+ npm._config.json = false
+ })
+
+ npm._config.json = true
+ await openUrlPrompt(npm, 'https://www.npmjs.com', 'npm home', 'prompt')
+ t.matchSnapshot(OUTPUT)
+})
+
+t.test('returns error for non-https url', async t => {
+ t.teardown(() => {
+ openerUrl = null
+ openerOpts = null
+ OUTPUT.length = 0
+ })
+ await t.rejects(
+ openUrlPrompt(npm, 'ftp://www.npmjs.com', 'npm home', 'prompt'),
+ /Invalid URL/,
+ 'got the correct error'
+ )
+ t.equal(openerUrl, null, 'did not open')
+ t.same(openerOpts, null, 'did not open')
+ t.same(OUTPUT, [], 'printed no output')
+})
+
+t.test('does not open url if canceled', async t => {
+ t.teardown(() => {
+ openerUrl = null
+ openerOpts = null
+ OUTPUT.length = 0
+ questionShouldResolve = true
+ })
+
+ questionShouldResolve = false
+ const emitter = new EventEmitter()
+
+ const open = openUrlPrompt(npm, 'https://www.npmjs.com', 'npm home', 'prompt', emitter)
+
+ emitter.emit('abort')
+
+ await open
+
+ t.equal(openerUrl, null, 'did not open')
+ t.same(openerOpts, null, 'did not open')
+})
+
+t.test('returns error when opener errors', async t => {
+ t.teardown(() => {
+ openerUrl = null
+ openerOpts = null
+ openerResult = null
+ OUTPUT.length = 0
+ })
+
+ openerResult = new Error('Opener failed')
+
+ await t.rejects(
+ openUrlPrompt(npm, 'https://www.npmjs.com', 'npm home', 'prompt'),
+ /Opener failed/,
+ 'got the correct error'
+ )
+ t.equal(openerUrl, 'https://www.npmjs.com', 'did not open')
+})