From e9571cb9324c72e8127199723e7a4ef25c71f894 Mon Sep 17 00:00:00 2001
From: Darcy Clarke
Date: Fri, 7 May 2021 13:18:14 -0400
Subject: [PATCH] deps: upgrade npm to 7.12.0
---
deps/npm/AUTHORS | 2 +
deps/npm/CHANGELOG.md | 44 ++++-
deps/npm/docs/content/commands/npm-cache.md | 10 +-
deps/npm/docs/content/commands/npm-ci.md | 2 +-
deps/npm/docs/content/commands/npm-dedupe.md | 8 +-
.../docs/content/commands/npm-deprecate.md | 4 +-
deps/npm/docs/content/commands/npm-explore.md | 1 -
.../docs/content/commands/npm-find-dupes.md | 8 +-
deps/npm/docs/content/commands/npm-install.md | 1 -
.../docs/content/commands/npm-unpublish.md | 4 +-
deps/npm/docs/content/commands/npm-view.md | 2 +-
deps/npm/docs/content/commands/npm.md | 2 +-
.../docs/content/configuring-npm/folders.md | 2 +-
.../content/configuring-npm/package-json.md | 2 +-
deps/npm/docs/content/using-npm/config.md | 5 +-
deps/npm/docs/content/using-npm/scripts.md | 7 +-
deps/npm/docs/output/commands/npm-cache.html | 10 +-
deps/npm/docs/output/commands/npm-ci.html | 2 +-
deps/npm/docs/output/commands/npm-dedupe.html | 8 +-
.../docs/output/commands/npm-deprecate.html | 4 +-
.../npm/docs/output/commands/npm-explore.html | 1 -
.../docs/output/commands/npm-find-dupes.html | 8 +-
.../npm/docs/output/commands/npm-install.html | 1 -
deps/npm/docs/output/commands/npm-ls.html | 2 +-
.../docs/output/commands/npm-unpublish.html | 4 +-
deps/npm/docs/output/commands/npm-view.html | 2 +-
deps/npm/docs/output/commands/npm.html | 4 +-
.../docs/output/configuring-npm/folders.html | 2 +-
.../output/configuring-npm/package-json.html | 2 +-
deps/npm/docs/output/using-npm/config.html | 5 +-
deps/npm/docs/output/using-npm/scripts.html | 9 +-
deps/npm/lib/cache.js | 40 ++---
deps/npm/lib/utils/config/definitions.js | 7 +
deps/npm/man/man1/npm-access.1 | 2 +-
deps/npm/man/man1/npm-adduser.1 | 2 +-
deps/npm/man/man1/npm-audit.1 | 2 +-
deps/npm/man/man1/npm-bin.1 | 2 +-
deps/npm/man/man1/npm-bugs.1 | 2 +-
deps/npm/man/man1/npm-cache.1 | 12 +-
deps/npm/man/man1/npm-ci.1 | 4 +-
deps/npm/man/man1/npm-completion.1 | 2 +-
deps/npm/man/man1/npm-config.1 | 2 +-
deps/npm/man/man1/npm-dedupe.1 | 10 +-
deps/npm/man/man1/npm-deprecate.1 | 6 +-
deps/npm/man/man1/npm-diff.1 | 2 +-
deps/npm/man/man1/npm-dist-tag.1 | 2 +-
deps/npm/man/man1/npm-docs.1 | 2 +-
deps/npm/man/man1/npm-doctor.1 | 2 +-
deps/npm/man/man1/npm-edit.1 | 2 +-
deps/npm/man/man1/npm-exec.1 | 2 +-
deps/npm/man/man1/npm-explain.1 | 2 +-
deps/npm/man/man1/npm-explore.1 | 4 +-
deps/npm/man/man1/npm-find-dupes.1 | 10 +-
deps/npm/man/man1/npm-fund.1 | 2 +-
deps/npm/man/man1/npm-help-search.1 | 2 +-
deps/npm/man/man1/npm-help.1 | 2 +-
deps/npm/man/man1/npm-hook.1 | 2 +-
deps/npm/man/man1/npm-init.1 | 2 +-
deps/npm/man/man1/npm-install-ci-test.1 | 2 +-
deps/npm/man/man1/npm-install-test.1 | 2 +-
deps/npm/man/man1/npm-install.1 | 4 +-
deps/npm/man/man1/npm-link.1 | 2 +-
deps/npm/man/man1/npm-logout.1 | 2 +-
deps/npm/man/man1/npm-ls.1 | 4 +-
deps/npm/man/man1/npm-org.1 | 2 +-
deps/npm/man/man1/npm-outdated.1 | 2 +-
deps/npm/man/man1/npm-owner.1 | 2 +-
deps/npm/man/man1/npm-pack.1 | 2 +-
deps/npm/man/man1/npm-ping.1 | 2 +-
deps/npm/man/man1/npm-prefix.1 | 2 +-
deps/npm/man/man1/npm-profile.1 | 2 +-
deps/npm/man/man1/npm-prune.1 | 2 +-
deps/npm/man/man1/npm-publish.1 | 2 +-
deps/npm/man/man1/npm-rebuild.1 | 2 +-
deps/npm/man/man1/npm-repo.1 | 2 +-
deps/npm/man/man1/npm-restart.1 | 2 +-
deps/npm/man/man1/npm-root.1 | 2 +-
deps/npm/man/man1/npm-run-script.1 | 2 +-
deps/npm/man/man1/npm-search.1 | 2 +-
deps/npm/man/man1/npm-set-script.1 | 2 +-
deps/npm/man/man1/npm-shrinkwrap.1 | 2 +-
deps/npm/man/man1/npm-star.1 | 2 +-
deps/npm/man/man1/npm-stars.1 | 2 +-
deps/npm/man/man1/npm-start.1 | 2 +-
deps/npm/man/man1/npm-stop.1 | 2 +-
deps/npm/man/man1/npm-team.1 | 2 +-
deps/npm/man/man1/npm-test.1 | 2 +-
deps/npm/man/man1/npm-token.1 | 2 +-
deps/npm/man/man1/npm-uninstall.1 | 2 +-
deps/npm/man/man1/npm-unpublish.1 | 2 +-
deps/npm/man/man1/npm-unstar.1 | 2 +-
deps/npm/man/man1/npm-update.1 | 2 +-
deps/npm/man/man1/npm-version.1 | 2 +-
deps/npm/man/man1/npm-view.1 | 2 +-
deps/npm/man/man1/npm-whoami.1 | 2 +-
deps/npm/man/man1/npm.1 | 4 +-
deps/npm/man/man1/npx.1 | 2 +-
deps/npm/man/man5/folders.5 | 2 +-
deps/npm/man/man5/install.5 | 2 +-
deps/npm/man/man5/npm-shrinkwrap-json.5 | 2 +-
deps/npm/man/man5/npmrc.5 | 2 +-
deps/npm/man/man5/package-json.5 | 4 +-
deps/npm/man/man5/package-lock-json.5 | 2 +-
deps/npm/man/man7/config.7 | 8 +-
deps/npm/man/man7/developers.7 | 2 +-
deps/npm/man/man7/orgs.7 | 2 +-
deps/npm/man/man7/registry.7 | 2 +-
deps/npm/man/man7/removal.7 | 2 +-
deps/npm/man/man7/scope.7 | 2 +-
deps/npm/man/man7/scripts.7 | 9 +-
deps/npm/man/man7/workspaces.7 | 2 +-
.../@npmcli/arborist/lib/add-rm-pkg-deps.js | 166 +++++++++---------
.../arborist/lib/arborist/build-ideal-tree.js | 1 +
.../@npmcli/arborist/lib/arborist/index.js | 3 +
.../@npmcli/arborist/lib/arborist/reify.js | 63 +++++--
.../@npmcli/arborist/lib/audit-report.js | 19 +-
.../@npmcli/arborist/lib/dep-spec.js | 43 -----
.../@npmcli/arborist/lib/inventory.js | 2 +-
.../node_modules/@npmcli/arborist/lib/node.js | 45 ++---
.../@npmcli/arborist/lib/printable.js | 4 +-
.../@npmcli/arborist/lib/shrinkwrap.js | 10 +-
.../arborist/lib/update-root-package-json.js | 16 +-
.../node_modules/@npmcli/arborist/lib/vuln.js | 3 +
.../@npmcli/arborist/package.json | 2 +-
.../npm/node_modules/@npmcli/git/lib/clone.js | 2 +-
.../npm/node_modules/@npmcli/git/lib/spawn.js | 11 +-
.../npm/node_modules/@npmcli/git/package.json | 4 +-
deps/npm/node_modules/libnpmexec/CHANGELOG.md | 9 +
deps/npm/node_modules/libnpmexec/README.md | 2 +-
.../libnpmexec/lib/file-exists.js | 29 +++
deps/npm/node_modules/libnpmexec/lib/index.js | 16 +-
deps/npm/node_modules/libnpmexec/package.json | 7 +-
deps/npm/node_modules/npm-packlist/index.js | 3 +-
.../node_modules/npm-packlist/package.json | 6 +-
deps/npm/package.json | 10 +-
.../lib/utils/config/describe-all.js.test.cjs | 5 +-
deps/npm/test/lib/cache.js | 11 +-
deps/npm/test/lib/exec.js | 20 ++-
deps/npm/test/lib/utils/config/definitions.js | 19 +-
139 files changed, 539 insertions(+), 418 deletions(-)
delete mode 100644 deps/npm/node_modules/@npmcli/arborist/lib/dep-spec.js
create mode 100644 deps/npm/node_modules/libnpmexec/lib/file-exists.js
diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS
index 2b3e48e7651636..3c3d13b2369bac 100644
--- a/deps/npm/AUTHORS
+++ b/deps/npm/AUTHORS
@@ -772,3 +772,5 @@ Seth Thomas
Andreas
Felipe Santos
Luigi Pinca
+Marco Sirabella
+wangsai
diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md
index ce79e9368a6e58..02d66dfc323f46 100644
--- a/deps/npm/CHANGELOG.md
+++ b/deps/npm/CHANGELOG.md
@@ -1,3 +1,44 @@
+## v7.12.0 (2021-05-06)
+
+### FEATURES
+
+* [`701627c51`](https://github.com/npm/cli/commit/701627c5169934e59da2959d76a49c77278cc9dc)
+ [#3098](https://github.com/npm/cli/issues/3098)
+ feat(cache): Allow `add` to accept multiple specs
+ ([@mjsir911](https://github.com/mjsir911))
+* [`59171f030`](https://github.com/npm/cli/commit/59171f0304f048a009f1697eec6f74f778bc52ff)
+ [#3187](https://github.com/npm/cli/issues/3187)
+ feat(config): add workspaces boolean to user-agent
+ ([@nlf](https://github.com/nlf))
+
+### BUG FIXES
+
+* [`2c9b8713c`](https://github.com/npm/cli/commit/2c9b8713c4c88fbd0c3c48eb0de84dbd7269398f)
+ [#3182](https://github.com/npm/cli/issues/3182)
+ fix(docs): fix broken links
+ ([@wangsai](https://github.com/wangsai))
+* [`88cbc8c44`](https://github.com/npm/cli/commit/88cbc8c447cbaef20b5a8f19246211ce4918f4d8)
+ [#3198](https://github.com/npm/cli/issues/3198)
+ fix(tests): reflect new libnpmexec logic
+
+### DEPENDENCIES
+
+* [`d01ce5e13`](https://github.com/npm/cli/commit/d01ce5e132cb4661698012fd5017753c2bdb660b)
+ `libnpmexec@1.1.0`:
+ * feat: add walk up dir lookup to satisfy local bins
+* [`81c1dfaaa`](https://github.com/npm/cli/commit/81c1dfaaaf918229316a975aa8075769ffafdb6d)
+ `@npmcli/arborist@2.4.2`:
+ * fix(add): save packages in the right place
+ * fix(reify): do not clean up nodes with no parent
+ * fix(audit): support alias specs & root package names
+* [`87c2303ea`](https://github.com/npm/cli/commit/87c2303eaa6edfa5309da0a30f5ad291b6d57640)
+ `@npmcli/git@2.0.9`:
+ * fix(clone): Do not allow git replacement objects by default
+* [`99ff40dff`](https://github.com/npm/cli/commit/99ff40dff5e5e55a5d5f045ba90e76c08174ca38)
+ `npm-packlist@2.2.0`:
+ * feat(npmignore): Do not force include history, changelogs, notice
+ * fix(package.json): add missing bin/index.js to files
+
## v7.11.2 (2021-04-29)
### BUG FIXES
@@ -76,8 +117,8 @@
[#3126](https://github.com/npm/cli/issues/3126)
fix(logout): use isBasicAuth attribute
([@wraithgar](https://github.com/wraithgar))
-### DOCUMENTATION
+### DOCUMENTATION
* [`c93f1c39e`](https://github.com/npm/cli/commit/c93f1c39e326feff0857712a10ef6183fbafe1ab)
[#3101](https://github.com/npm/cli/issues/3101)
@@ -89,7 +130,6 @@
fix(usage): fix refs to ws shorthand
([@ruyadorno](https://github.com/ruyadorno))
-
### DEPENDENCIES
* [`83166ebcc`](https://github.com/npm/cli/commit/83166ebcc4ba5e3bf215f08151437d96637f4f33)
diff --git a/deps/npm/docs/content/commands/npm-cache.md b/deps/npm/docs/content/commands/npm-cache.md
index bcc2989b7d3c3b..0bbb2756a40fee 100644
--- a/deps/npm/docs/content/commands/npm-cache.md
+++ b/deps/npm/docs/content/commands/npm-cache.md
@@ -7,10 +7,10 @@ description: Manipulates packages cache
### Synopsis
```bash
-npm cache add
-npm cache add
-npm cache add
-npm cache add @
+npm cache add ...
+npm cache add ...
+npm cache add ...
+npm cache add @...
npm cache clean
aliases: npm cache clear, npm cache rm
@@ -25,7 +25,7 @@ Note: This command is unaware of workspaces.
Used to add, list, or clean the npm cache folder.
* add:
- Add the specified package to the local cache. This command is primarily
+ Add the specified packages to the local cache. This command is primarily
intended to be used internally by npm, but it can provide a way to
add data to the local installation cache explicitly.
diff --git a/deps/npm/docs/content/commands/npm-ci.md b/deps/npm/docs/content/commands/npm-ci.md
index 925ba8de2e5b7e..937553631ace5f 100644
--- a/deps/npm/docs/content/commands/npm-ci.md
+++ b/deps/npm/docs/content/commands/npm-ci.md
@@ -12,7 +12,7 @@ npm ci
### Description
-This command is similar to [`npm install`](/cli-commands/install), except
+This command is similar to [`npm install`](/commands/npm-install), except
it's meant to be used in automated environments such as test platforms,
continuous integration, and deployment -- or any situation where you want
to make sure you're doing a clean install of your dependencies.
diff --git a/deps/npm/docs/content/commands/npm-dedupe.md b/deps/npm/docs/content/commands/npm-dedupe.md
index c6d26126d30775..f9bfd9e01532ef 100644
--- a/deps/npm/docs/content/commands/npm-dedupe.md
+++ b/deps/npm/docs/content/commands/npm-dedupe.md
@@ -74,7 +74,7 @@ Using `npm find-dupes` will run the command in `--dry-run` mode.
### See Also
-* [npm find-dupes](/cli-commands/find-dupes)
-* [npm ls](/cli-commands/ls)
-* [npm update](/cli-commands/update)
-* [npm install](/cli-commands/install)
+* [npm find-dupes](/commands/npm-find-dupes)
+* [npm ls](/commands/npm-ls)
+* [npm update](/commands/npm-update)
+* [npm install](/commands/npm-install)
diff --git a/deps/npm/docs/content/commands/npm-deprecate.md b/deps/npm/docs/content/commands/npm-deprecate.md
index 06037976610558..73d88b3717bd1d 100644
--- a/deps/npm/docs/content/commands/npm-deprecate.md
+++ b/deps/npm/docs/content/commands/npm-deprecate.md
@@ -44,5 +44,5 @@ format an empty string.
* [npm publish](/commands/npm-publish)
* [npm registry](/using-npm/registry)
-* [npm owner](/cli-commands/owner)
-* [npm owner](/cli-commands/adduser)
+* [npm owner](/commands/npm-owner)
+* [npm owner](/commands/npm-adduser)
diff --git a/deps/npm/docs/content/commands/npm-explore.md b/deps/npm/docs/content/commands/npm-explore.md
index 7e2004b84c0414..8bad293052eadd 100644
--- a/deps/npm/docs/content/commands/npm-explore.md
+++ b/deps/npm/docs/content/commands/npm-explore.md
@@ -44,5 +44,4 @@ The shell to run for the `npm explore` command.
* [npm folders](/configuring-npm/folders)
* [npm edit](/commands/npm-edit)
* [npm rebuild](/commands/npm-rebuild)
-* [npm build](/commands/npm-build)
* [npm install](/commands/npm-install)
diff --git a/deps/npm/docs/content/commands/npm-find-dupes.md b/deps/npm/docs/content/commands/npm-find-dupes.md
index 6f55d47bfd7f32..6557a071c82c03 100644
--- a/deps/npm/docs/content/commands/npm-find-dupes.md
+++ b/deps/npm/docs/content/commands/npm-find-dupes.md
@@ -17,8 +17,8 @@ duplications, without actually changing the package tree.
### See Also
-* [npm dedupe](/cli-commands/dedupe)
-* [npm ls](/cli-commands/ls)
-* [npm update](/cli-commands/update)
-* [npm install](/cli-commands/install)
+* [npm dedupe](/commands/npm-dedupe)
+* [npm ls](/commands/npm-ls)
+* [npm update](/commands/npm-update)
+* [npm install](/commands/npm-install)
diff --git a/deps/npm/docs/content/commands/npm-install.md b/deps/npm/docs/content/commands/npm-install.md
index 5ab9275ee4eaf5..f81a8a24639898 100644
--- a/deps/npm/docs/content/commands/npm-install.md
+++ b/deps/npm/docs/content/commands/npm-install.md
@@ -538,7 +538,6 @@ the specific folder structures that npm creates.
* [npm link](/commands/npm-link)
* [npm rebuild](/commands/npm-rebuild)
* [npm scripts](/using-npm/scripts)
-* [npm build](/commands/npm-build)
* [npm config](/commands/npm-config)
* [npmrc](/configuring-npm/npmrc)
* [npm registry](/using-npm/registry)
diff --git a/deps/npm/docs/content/commands/npm-unpublish.md b/deps/npm/docs/content/commands/npm-unpublish.md
index e9d6e9045c6f9e..2ce52d3f8cd446 100644
--- a/deps/npm/docs/content/commands/npm-unpublish.md
+++ b/deps/npm/docs/content/commands/npm-unpublish.md
@@ -34,7 +34,7 @@ This removes a package version from the registry, deleting its entry and
removing the tarball.
The npm registry will return an error if you are not [logged
-in](/commands/npm-login).
+in](/commands/npm-adduser).
If you do not specify a version or if you remove all of a package's
versions then the registry will remove the root package entry entirely.
@@ -52,4 +52,4 @@ passed.
* [npm registry](/using-npm/registry)
* [npm adduser](/commands/npm-adduser)
* [npm owner](/commands/npm-owner)
-* [npm login](/commands/npm-login)
+* [npm login](/commands/npm-adduser)
diff --git a/deps/npm/docs/content/commands/npm-view.md b/deps/npm/docs/content/commands/npm-view.md
index 8f7e886ed192a4..982ba29955179e 100644
--- a/deps/npm/docs/content/commands/npm-view.md
+++ b/deps/npm/docs/content/commands/npm-view.md
@@ -73,7 +73,7 @@ npm view express contributors.name contributors.email
"Person" fields are shown as a string if they would be shown as an
object. So, for example, this will show the list of `npm` contributors in
-the shortened string format. (See [`package.json`](/configuring-npm/package.json) for more on this.)
+the shortened string format. (See [`package.json`](/configuring-npm/package-json) for more on this.)
```bash
npm view npm contributors
diff --git a/deps/npm/docs/content/commands/npm.md b/deps/npm/docs/content/commands/npm.md
index d01146d37041ca..2d86aa62c00807 100644
--- a/deps/npm/docs/content/commands/npm.md
+++ b/deps/npm/docs/content/commands/npm.md
@@ -107,7 +107,7 @@ following help topics:
Create an account or log in. When you do this, npm will store
credentials in the user config file config file.
* publish:
- Use the [`npm publish`](/commands/npm-publish`) command to upload your
+ Use the [`npm publish`](/commands/npm-publish) command to upload your
code to the registry.
#### Configuration
diff --git a/deps/npm/docs/content/configuring-npm/folders.md b/deps/npm/docs/content/configuring-npm/folders.md
index 3ec716f2c67fd5..75e31cd733161f 100644
--- a/deps/npm/docs/content/configuring-npm/folders.md
+++ b/deps/npm/docs/content/configuring-npm/folders.md
@@ -205,7 +205,7 @@ not be included in the package tarball.
This allows a package maintainer to install all of their dependencies
(and dev dependencies) locally, but only re-publish those items that
-cannot be found elsewhere. See [`package.json`](/configuring-npm/package.json) for more information.
+cannot be found elsewhere. See [`package.json`](/configuring-npm/package-json) for more information.
### See also
diff --git a/deps/npm/docs/content/configuring-npm/package-json.md b/deps/npm/docs/content/configuring-npm/package-json.md
index f5519f62bb32ef..3ed03990214470 100644
--- a/deps/npm/docs/content/configuring-npm/package-json.md
+++ b/deps/npm/docs/content/configuring-npm/package-json.md
@@ -566,7 +566,7 @@ tarball or git URL.
**Please do not put test harnesses or transpilers or other "development"
time tools in your `dependencies` object.** See `devDependencies`, below.
-See [semver](/using-npm/semver#versions) for more details about specifying version ranges.
+See [semver](https://github.com/npm/node-semver#versions) for more details about specifying version ranges.
* `version` Must match `version` exactly
* `>version` Must be greater than `version`
diff --git a/deps/npm/docs/content/using-npm/config.md b/deps/npm/docs/content/using-npm/config.md
index 76ac4192f1351e..d8fb70fb74bed8 100644
--- a/deps/npm/docs/content/using-npm/config.md
+++ b/deps/npm/docs/content/using-npm/config.md
@@ -1253,7 +1253,8 @@ Show short usage output about the command specified.
#### `user-agent`
-* Default: "npm/{npm-version} node/{node-version} {platform} {arch} {ci}"
+* Default: "npm/{npm-version} node/{node-version} {platform} {arch}
+ workspaces/{workspaces} {ci}"
* Type: String
Sets the User-Agent request header. The following fields are replaced with
@@ -1263,6 +1264,8 @@ their actual counterparts:
* `{node-version}` - The Node.js version in use
* `{platform}` - The value of `process.platform`
* `{arch}` - The value of `process.arch`
+* `{workspaces}` - Set to `true` if the `workspaces` or `workspace` options
+ are set.
* `{ci}` - The value of the `ci-name` config, if set, prefixed with `ci/`, or
an empty string if `ci-name` is empty.
diff --git a/deps/npm/docs/content/using-npm/scripts.md b/deps/npm/docs/content/using-npm/scripts.md
index 9312a21546d6fa..82cde7d79094d4 100644
--- a/deps/npm/docs/content/using-npm/scripts.md
+++ b/deps/npm/docs/content/using-npm/scripts.md
@@ -118,11 +118,6 @@ The advantage of doing these things at `prepublish` time is that they can be don
* `prepare`
-#### [`npm env`](/commands/npm-env)
-
-* `env` (You can override the default behavior of `npm env` by defining
- a custom `env` entry in your `scripts` object)
-
#### [`npm install`](/commands/npm-install)
These also run when you run `npm install -g `
@@ -179,7 +174,7 @@ If there is a `restart` script defined, these events are run, otherwise
* `restart`
* `postrestart`
-#### [`npm run `](/commands/npm-run)
+#### [`npm run `](/commands/npm-run-script)
* `pre`
* ``
diff --git a/deps/npm/docs/output/commands/npm-cache.html b/deps/npm/docs/output/commands/npm-cache.html
index 22ca6f1999ba06..cb886d3c7be36d 100644
--- a/deps/npm/docs/output/commands/npm-cache.html
+++ b/deps/npm/docs/output/commands/npm-cache.html
@@ -145,10 +145,10 @@ Table of contents
Synopsis
-
npm cache add <tarball file>
-npm cache add <folder>
-npm cache add <tarball url>
-npm cache add <name>@<version>
+npm cache add <tarball file>...
+npm cache add <folder>...
+npm cache add <tarball url>...
+npm cache add <name>@<version>...
npm cache clean
aliases: npm cache clear, npm cache rm
@@ -161,7 +161,7 @@ Description
npm ci
Description
-This command is similar to npm install
, except
+
This command is similar to npm install
, except
it’s meant to be used in automated environments such as test platforms,
continuous integration, and deployment – or any situation where you want
to make sure you’re doing a clean install of your dependencies.
diff --git a/deps/npm/docs/output/commands/npm-dedupe.html b/deps/npm/docs/output/commands/npm-dedupe.html
index ccd9a03f4d828e..795659a6103b14 100644
--- a/deps/npm/docs/output/commands/npm-dedupe.html
+++ b/deps/npm/docs/output/commands/npm-dedupe.html
@@ -193,10 +193,10 @@ Description
Using npm find-dupes
will run the command in --dry-run
mode.
See Also
diff --git a/deps/npm/docs/output/commands/npm-deprecate.html b/deps/npm/docs/output/commands/npm-deprecate.html
index 88299a80bcfdaf..7f4409cd3ace3b 100644
--- a/deps/npm/docs/output/commands/npm-deprecate.html
+++ b/deps/npm/docs/output/commands/npm-deprecate.html
@@ -169,8 +169,8 @@ See Also
diff --git a/deps/npm/docs/output/commands/npm-explore.html b/deps/npm/docs/output/commands/npm-explore.html
index cd52ff96a68486..8d1e2843d73eff 100644
--- a/deps/npm/docs/output/commands/npm-explore.html
+++ b/deps/npm/docs/output/commands/npm-explore.html
@@ -171,7 +171,6 @@ See Also
npm folders
npm edit
npm rebuild
-npm build
npm install
diff --git a/deps/npm/docs/output/commands/npm-find-dupes.html b/deps/npm/docs/output/commands/npm-find-dupes.html
index 32d8993b99cc4d..7f7f3c101b258a 100644
--- a/deps/npm/docs/output/commands/npm-find-dupes.html
+++ b/deps/npm/docs/output/commands/npm-find-dupes.html
@@ -152,10 +152,10 @@ Description
duplications, without actually changing the package tree.
See Also
diff --git a/deps/npm/docs/output/commands/npm-install.html b/deps/npm/docs/output/commands/npm-install.html
index 2794b9a983d04c..8fff20fe836fad 100644
--- a/deps/npm/docs/output/commands/npm-install.html
+++ b/deps/npm/docs/output/commands/npm-install.html
@@ -614,7 +614,6 @@ See Also
npm link
npm rebuild
npm scripts
-npm build
npm config
npmrc
npm registry
diff --git a/deps/npm/docs/output/commands/npm-ls.html b/deps/npm/docs/output/commands/npm-ls.html
index ede5cb042907a6..d11c865c9d96ad 100644
--- a/deps/npm/docs/output/commands/npm-ls.html
+++ b/deps/npm/docs/output/commands/npm-ls.html
@@ -159,7 +159,7 @@ Description
the results to only the paths to the packages named. Note that nested
packages will also show the paths to the specified packages. For
example, running npm ls promzard
in npm’s source tree will show:
-npm@7.11.2 /path/to/npm
+npm@7.12.0 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
diff --git a/deps/npm/docs/output/commands/npm-unpublish.html b/deps/npm/docs/output/commands/npm-unpublish.html
index 75751d3408cfa1..737d5336c83b6e 100644
--- a/deps/npm/docs/output/commands/npm-unpublish.html
+++ b/deps/npm/docs/output/commands/npm-unpublish.html
@@ -159,7 +159,7 @@ Warning
Description
This removes a package version from the registry, deleting its entry and
removing the tarball.
-The npm registry will return an error if you are not logged
+The npm registry will return an error if you are not logged
in.
If you do not specify a version or if you remove all of a package’s
versions then the registry will remove the root package entry entirely.
@@ -175,7 +175,7 @@ See Also
npm registry
npm adduser
npm owner
-npm login
+npm login
diff --git a/deps/npm/docs/output/commands/npm-view.html b/deps/npm/docs/output/commands/npm-view.html
index 7489b17b1cd009..77786b74fd8c92 100644
--- a/deps/npm/docs/output/commands/npm-view.html
+++ b/deps/npm/docs/output/commands/npm-view.html
@@ -186,7 +186,7 @@ Description
“Person” fields are shown as a string if they would be shown as an
object. So, for example, this will show the list of npm
contributors in
-the shortened string format. (See package.json
for more on this.)
+the shortened string format. (See package.json
for more on this.)
npm view npm contributors
If a version range is provided, then data will be printed for every
diff --git a/deps/npm/docs/output/commands/npm.html b/deps/npm/docs/output/commands/npm.html
index 311c581f681df4..405d56f623b574 100644
--- a/deps/npm/docs/output/commands/npm.html
+++ b/deps/npm/docs/output/commands/npm.html
@@ -148,7 +148,7 @@
Table of contents
npm <command> [args]
Version
-7.11.2
+7.12.0
Description
npm is the package manager for the Node JavaScript platform. It puts
modules in place so that node can find them, and manages dependency
@@ -222,7 +222,7 @@
Developer Usage
Create an account or log in. When you do this, npm will store
credentials in the user config file config file.
publish:
-Use the npm publish
command to upload your
+Use the npm publish
command to upload your
code to the registry.
Configuration
diff --git a/deps/npm/docs/output/configuring-npm/folders.html b/deps/npm/docs/output/configuring-npm/folders.html
index 20027ea3a9f41b..6cdae3cd1eca01 100644
--- a/deps/npm/docs/output/configuring-npm/folders.html
+++ b/deps/npm/docs/output/configuring-npm/folders.html
@@ -292,7 +292,7 @@ Publishing
not be included in the package tarball.
This allows a package maintainer to install all of their dependencies
(and dev dependencies) locally, but only re-publish those items that
-cannot be found elsewhere. See package.json
for more information.
+cannot be found elsewhere. See package.json
for more information.
See also
- package.json
diff --git a/deps/npm/docs/output/configuring-npm/package-json.html b/deps/npm/docs/output/configuring-npm/package-json.html
index 84956dede7d296..f9c3ee6e4f5b83 100644
--- a/deps/npm/docs/output/configuring-npm/package-json.html
+++ b/deps/npm/docs/output/configuring-npm/package-json.html
@@ -567,7 +567,7 @@ dependencies
tarball or git URL.
Please do not put test harnesses or transpilers or other “development”
time tools in your dependencies
object. See devDependencies
, below.
-See semver for more details about specifying version ranges.
+See semver for more details about specifying version ranges.
version
Must match version
exactly
>version
Must be greater than version
diff --git a/deps/npm/docs/output/using-npm/config.html b/deps/npm/docs/output/using-npm/config.html
index 4435ce53bbaaca..881080eb121c06 100644
--- a/deps/npm/docs/output/using-npm/config.html
+++ b/deps/npm/docs/output/using-npm/config.html
@@ -1193,7 +1193,8 @@ usage
Show short usage output about the command specified.
user-agent
-- Default: “npm/{npm-version} node/{node-version} {platform} {arch} {ci}”
+- Default: “npm/{npm-version} node/{node-version} {platform} {arch}
+workspaces/{workspaces} {ci}”
- Type: String
Sets the User-Agent request header. The following fields are replaced with
@@ -1203,6 +1204,8 @@
user-agent
{node-version}
- The Node.js version in use
{platform}
- The value of process.platform
{arch}
- The value of process.arch
+{workspaces}
- Set to true
if the workspaces
or workspace
options
+are set.
{ci}
- The value of the ci-name
config, if set, prefixed with ci/
, or
an empty string if ci-name
is empty.
diff --git a/deps/npm/docs/output/using-npm/scripts.html b/deps/npm/docs/output/using-npm/scripts.html
index e231cfec2ab81e..dde9b1b75d7194 100644
--- a/deps/npm/docs/output/using-npm/scripts.html
+++ b/deps/npm/docs/output/using-npm/scripts.html
@@ -141,7 +141,7 @@ scripts
Description
@@ -260,11 +260,6 @@
npm diff
<
-
-
-env
(You can override the default behavior of npm env
by defining
-a custom env
entry in your scripts
object)
-
These also run when you run npm install -g <pkg-name>
-
+
pre<user-defined>
<user-defined>
diff --git a/deps/npm/lib/cache.js b/deps/npm/lib/cache.js
index 43902f43bbee19..5d544b2dbd185a 100644
--- a/deps/npm/lib/cache.js
+++ b/deps/npm/lib/cache.js
@@ -86,32 +86,30 @@ with --force.`)
return rimraf(cachePath)
}
- // npm cache add
- // npm cache add
- // npm cache add
- // npm cache add
+ // npm cache add ...
+ // npm cache add ...
+ // npm cache add ...
+ // npm cache add ...
async add (args) {
const usage = 'Usage:\n' +
- ' npm cache add \n' +
- ' npm cache add @\n' +
- ' npm cache add \n' +
- ' npm cache add \n'
+ ' npm cache add ...\n' +
+ ' npm cache add @...\n' +
+ ' npm cache add ...\n' +
+ ' npm cache add ...\n'
log.silly('cache add', 'args', args)
- const spec = args[0] && args[0] +
- (args[1] === undefined || args[1] === null ? '' : `@${args[1]}`)
-
- if (!spec)
+ if (args.length === 0)
throw Object.assign(new Error(usage), { code: 'EUSAGE' })
- log.silly('cache add', 'spec', spec)
-
- // we ask pacote for the thing, and then just throw the data
- // away so that it tee-pipes it into the cache like it does
- // for a normal request.
- await pacote.tarball.stream(spec, stream => {
- stream.resume()
- return stream.promise()
- }, this.npm.flatOptions)
+ return Promise.all(args.map(spec => {
+ log.silly('cache add', 'spec', spec)
+ // we ask pacote for the thing, and then just throw the data
+ // away so that it tee-pipes it into the cache like it does
+ // for a normal request.
+ return pacote.tarball.stream(spec, stream => {
+ stream.resume()
+ return stream.promise()
+ }, this.npm.flatOptions)
+ }))
}
async verify () {
diff --git a/deps/npm/lib/utils/config/definitions.js b/deps/npm/lib/utils/config/definitions.js
index 3a50175d5db649..aa90de8e760b7d 100644
--- a/deps/npm/lib/utils/config/definitions.js
+++ b/deps/npm/lib/utils/config/definitions.js
@@ -1943,6 +1943,7 @@ define('user-agent', {
'node/{node-version} ' +
'{platform} ' +
'{arch} ' +
+ 'workspaces/{workspaces} ' +
'{ci}',
type: String,
description: `
@@ -1953,17 +1954,23 @@ define('user-agent', {
* \`{node-version}\` - The Node.js version in use
* \`{platform}\` - The value of \`process.platform\`
* \`{arch}\` - The value of \`process.arch\`
+ * \`{workspaces}\` - Set to \`true\` if the \`workspaces\` or \`workspace\`
+ options are set.
* \`{ci}\` - The value of the \`ci-name\` config, if set, prefixed with
\`ci/\`, or an empty string if \`ci-name\` is empty.
`,
flatten (key, obj, flatOptions) {
const value = obj[key]
const ciName = obj['ci-name']
+ let inWorkspaces = false
+ if (obj.workspaces || obj.workspace && obj.workspace.length)
+ inWorkspaces = true
flatOptions.userAgent =
value.replace(/\{node-version\}/gi, obj['node-version'])
.replace(/\{npm-version\}/gi, obj['npm-version'])
.replace(/\{platform\}/gi, process.platform)
.replace(/\{arch\}/gi, process.arch)
+ .replace(/\{workspaces\}/gi, inWorkspaces)
.replace(/\{ci\}/gi, ciName ? `ci/${ciName}` : '')
.trim()
// user-agent is a unique kind of config item that gets set from a template
diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1
index f1deed4c428a55..8165ccd46d5c45 100644
--- a/deps/npm/man/man1/npm-access.1
+++ b/deps/npm/man/man1/npm-access.1
@@ -1,4 +1,4 @@
-.TH "NPM\-ACCESS" "1" "April 2021" "" ""
+.TH "NPM\-ACCESS" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-access\fR \- Set access level on published packages
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1
index aa7d0e5e527a51..26f42858694ada 100644
--- a/deps/npm/man/man1/npm-adduser.1
+++ b/deps/npm/man/man1/npm-adduser.1
@@ -1,4 +1,4 @@
-.TH "NPM\-ADDUSER" "1" "April 2021" "" ""
+.TH "NPM\-ADDUSER" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-adduser\fR \- Add a registry user account
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-audit.1 b/deps/npm/man/man1/npm-audit.1
index ebbb019ec8a351..cd63c284730908 100644
--- a/deps/npm/man/man1/npm-audit.1
+++ b/deps/npm/man/man1/npm-audit.1
@@ -1,4 +1,4 @@
-.TH "NPM\-AUDIT" "1" "April 2021" "" ""
+.TH "NPM\-AUDIT" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-audit\fR \- Run a security audit
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-bin.1 b/deps/npm/man/man1/npm-bin.1
index d7ddf05cb757af..61e2ab1ea91cde 100644
--- a/deps/npm/man/man1/npm-bin.1
+++ b/deps/npm/man/man1/npm-bin.1
@@ -1,4 +1,4 @@
-.TH "NPM\-BIN" "1" "April 2021" "" ""
+.TH "NPM\-BIN" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-bin\fR \- Display npm bin folder
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1
index 9d453b825b9f92..c4297521de2b5f 100644
--- a/deps/npm/man/man1/npm-bugs.1
+++ b/deps/npm/man/man1/npm-bugs.1
@@ -1,4 +1,4 @@
-.TH "NPM\-BUGS" "1" "April 2021" "" ""
+.TH "NPM\-BUGS" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-bugs\fR \- Report bugs for a package in a web browser
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1
index 08913baa6325d6..25b9d0d79118df 100644
--- a/deps/npm/man/man1/npm-cache.1
+++ b/deps/npm/man/man1/npm-cache.1
@@ -1,14 +1,14 @@
-.TH "NPM\-CACHE" "1" "April 2021" "" ""
+.TH "NPM\-CACHE" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-cache\fR \- Manipulates packages cache
.SS Synopsis
.P
.RS 2
.nf
-npm cache add
-npm cache add
-npm cache add
-npm cache add @
+npm cache add \.\.\.
+npm cache add \.\.\.
+npm cache add \.\.\.
+npm cache add @\.\.\.
npm cache clean
aliases: npm cache clear, npm cache rm
@@ -24,7 +24,7 @@ Used to add, list, or clean the npm cache folder\.
.RS 0
.IP \(bu 2
add:
-Add the specified package to the local cache\. This command is primarily
+Add the specified packages to the local cache\. This command is primarily
intended to be used internally by npm, but it can provide a way to
add data to the local installation cache explicitly\.
.IP \(bu 2
diff --git a/deps/npm/man/man1/npm-ci.1 b/deps/npm/man/man1/npm-ci.1
index 67f7245d01b9e7..481d3d23c95b0f 100644
--- a/deps/npm/man/man1/npm-ci.1
+++ b/deps/npm/man/man1/npm-ci.1
@@ -1,4 +1,4 @@
-.TH "NPM\-CI" "1" "April 2021" "" ""
+.TH "NPM\-CI" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-ci\fR \- Install a project with a clean slate
.SS Synopsis
@@ -10,7 +10,7 @@ npm ci
.RE
.SS Description
.P
-This command is similar to \fBnpm install\fP \fI/cli\-commands/install\fR, except
+This command is similar to npm help \fBinstall\fP, except
it's meant to be used in automated environments such as test platforms,
continuous integration, and deployment \-\- or any situation where you want
to make sure you're doing a clean install of your dependencies\.
diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1
index cb3e2d994356c8..dffedb6b639e6a 100644
--- a/deps/npm/man/man1/npm-completion.1
+++ b/deps/npm/man/man1/npm-completion.1
@@ -1,4 +1,4 @@
-.TH "NPM\-COMPLETION" "1" "April 2021" "" ""
+.TH "NPM\-COMPLETION" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-completion\fR \- Tab Completion for npm
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1
index c19d0411cb78b4..2ab14312a86a7d 100644
--- a/deps/npm/man/man1/npm-config.1
+++ b/deps/npm/man/man1/npm-config.1
@@ -1,4 +1,4 @@
-.TH "NPM\-CONFIG" "1" "April 2021" "" ""
+.TH "NPM\-CONFIG" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-config\fR \- Manage the npm configuration files
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1
index fd6cce4bc1b287..bd65bd3853c26e 100644
--- a/deps/npm/man/man1/npm-dedupe.1
+++ b/deps/npm/man/man1/npm-dedupe.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DEDUPE" "1" "April 2021" "" ""
+.TH "NPM\-DEDUPE" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-dedupe\fR \- Reduce duplication in the package tree
.SS Synopsis
@@ -78,12 +78,12 @@ Using \fBnpm find\-dupes\fP will run the command in \fB\-\-dry\-run\fP mode\.
.SS See Also
.RS 0
.IP \(bu 2
-npm find\-dupes \fI/cli\-commands/find\-dupes\fR
+npm help find\-dupes
.IP \(bu 2
-npm ls \fI/cli\-commands/ls\fR
+npm help ls
.IP \(bu 2
-npm update \fI/cli\-commands/update\fR
+npm help update
.IP \(bu 2
-npm install \fI/cli\-commands/install\fR
+npm help install
.RE
diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1
index 33922d2e834c6f..c57decbba87bb4 100644
--- a/deps/npm/man/man1/npm-deprecate.1
+++ b/deps/npm/man/man1/npm-deprecate.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DEPRECATE" "1" "April 2021" "" ""
+.TH "NPM\-DEPRECATE" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-deprecate\fR \- Deprecate a version of a package
.SS Synopsis
@@ -48,8 +48,8 @@ npm help publish
.IP \(bu 2
npm help registry
.IP \(bu 2
-npm owner \fI/cli\-commands/owner\fR
+npm help owner
.IP \(bu 2
-npm owner \fI/cli\-commands/adduser\fR
+npm help owner
.RE
diff --git a/deps/npm/man/man1/npm-diff.1 b/deps/npm/man/man1/npm-diff.1
index 97092215bd89a3..079c73e46a44a3 100644
--- a/deps/npm/man/man1/npm-diff.1
+++ b/deps/npm/man/man1/npm-diff.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DIFF" "1" "April 2021" "" ""
+.TH "NPM\-DIFF" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-diff\fR \- The registry diff command
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1
index 6be3351be3cf5b..95ed3584723186 100644
--- a/deps/npm/man/man1/npm-dist-tag.1
+++ b/deps/npm/man/man1/npm-dist-tag.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DIST\-TAG" "1" "April 2021" "" ""
+.TH "NPM\-DIST\-TAG" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-dist-tag\fR \- Modify package distribution tags
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1
index 5da2b661a5498b..1aec0eb795f411 100644
--- a/deps/npm/man/man1/npm-docs.1
+++ b/deps/npm/man/man1/npm-docs.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DOCS" "1" "April 2021" "" ""
+.TH "NPM\-DOCS" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-docs\fR \- Open documentation for a package in a web browser
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-doctor.1 b/deps/npm/man/man1/npm-doctor.1
index c3b11a90259509..df05a562f95e80 100644
--- a/deps/npm/man/man1/npm-doctor.1
+++ b/deps/npm/man/man1/npm-doctor.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DOCTOR" "1" "April 2021" "" ""
+.TH "NPM\-DOCTOR" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-doctor\fR \- Check your npm environment
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1
index 445439d1554b14..425c769cfed138 100644
--- a/deps/npm/man/man1/npm-edit.1
+++ b/deps/npm/man/man1/npm-edit.1
@@ -1,4 +1,4 @@
-.TH "NPM\-EDIT" "1" "April 2021" "" ""
+.TH "NPM\-EDIT" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-edit\fR \- Edit an installed package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-exec.1 b/deps/npm/man/man1/npm-exec.1
index 1ac663ff18ef50..5bb3736ae6297f 100644
--- a/deps/npm/man/man1/npm-exec.1
+++ b/deps/npm/man/man1/npm-exec.1
@@ -1,4 +1,4 @@
-.TH "NPM\-EXEC" "1" "April 2021" "" ""
+.TH "NPM\-EXEC" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-exec\fR \- Run a command from a local or remote npm package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-explain.1 b/deps/npm/man/man1/npm-explain.1
index efc5314788205b..87c84f1aaf2668 100644
--- a/deps/npm/man/man1/npm-explain.1
+++ b/deps/npm/man/man1/npm-explain.1
@@ -1,4 +1,4 @@
-.TH "NPM\-EXPLAIN" "1" "April 2021" "" ""
+.TH "NPM\-EXPLAIN" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-explain\fR \- Explain installed packages
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1
index 7863f3a07115f6..205f0518e909fa 100644
--- a/deps/npm/man/man1/npm-explore.1
+++ b/deps/npm/man/man1/npm-explore.1
@@ -1,4 +1,4 @@
-.TH "NPM\-EXPLORE" "1" "April 2021" "" ""
+.TH "NPM\-EXPLORE" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-explore\fR \- Browse an installed package
.SS Synopsis
@@ -49,8 +49,6 @@ npm help edit
.IP \(bu 2
npm help rebuild
.IP \(bu 2
-npm help build
-.IP \(bu 2
npm help install
.RE
diff --git a/deps/npm/man/man1/npm-find-dupes.1 b/deps/npm/man/man1/npm-find-dupes.1
index 03ff67e95b5760..e88c89408b351e 100644
--- a/deps/npm/man/man1/npm-find-dupes.1
+++ b/deps/npm/man/man1/npm-find-dupes.1
@@ -1,4 +1,4 @@
-.TH "NPM\-FIND\-DUPES" "1" "April 2021" "" ""
+.TH "NPM\-FIND\-DUPES" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-find-dupes\fR \- Find duplication in the package tree
.SS Synopsis
@@ -15,12 +15,12 @@ duplications, without actually changing the package tree\.
.SS See Also
.RS 0
.IP \(bu 2
-npm dedupe \fI/cli\-commands/dedupe\fR
+npm help dedupe
.IP \(bu 2
-npm ls \fI/cli\-commands/ls\fR
+npm help ls
.IP \(bu 2
-npm update \fI/cli\-commands/update\fR
+npm help update
.IP \(bu 2
-npm install \fI/cli\-commands/install\fR
+npm help install
.RE
diff --git a/deps/npm/man/man1/npm-fund.1 b/deps/npm/man/man1/npm-fund.1
index dc67600e6ac2f9..81a277bb0087c2 100644
--- a/deps/npm/man/man1/npm-fund.1
+++ b/deps/npm/man/man1/npm-fund.1
@@ -1,4 +1,4 @@
-.TH "NPM\-FUND" "1" "April 2021" "" ""
+.TH "NPM\-FUND" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-fund\fR \- Retrieve funding information
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1
index a7bc089b1962fc..2f85992550d9f2 100644
--- a/deps/npm/man/man1/npm-help-search.1
+++ b/deps/npm/man/man1/npm-help-search.1
@@ -1,4 +1,4 @@
-.TH "NPM\-HELP\-SEARCH" "1" "April 2021" "" ""
+.TH "NPM\-HELP\-SEARCH" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-help-search\fR \- Search npm help documentation
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1
index 8e32829300023f..f97f9117b685ee 100644
--- a/deps/npm/man/man1/npm-help.1
+++ b/deps/npm/man/man1/npm-help.1
@@ -1,4 +1,4 @@
-.TH "NPM\-HELP" "1" "April 2021" "" ""
+.TH "NPM\-HELP" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-help\fR \- Get help on npm
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-hook.1 b/deps/npm/man/man1/npm-hook.1
index 06cb0959fcc99e..bb6b553a60c6ff 100644
--- a/deps/npm/man/man1/npm-hook.1
+++ b/deps/npm/man/man1/npm-hook.1
@@ -1,4 +1,4 @@
-.TH "NPM\-HOOK" "1" "April 2021" "" ""
+.TH "NPM\-HOOK" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-hook\fR \- Manage registry hooks
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1
index b4b09e598d247b..9ba1cf0a6457dc 100644
--- a/deps/npm/man/man1/npm-init.1
+++ b/deps/npm/man/man1/npm-init.1
@@ -1,4 +1,4 @@
-.TH "NPM\-INIT" "1" "April 2021" "" ""
+.TH "NPM\-INIT" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-init\fR \- Create a package\.json file
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-install-ci-test.1 b/deps/npm/man/man1/npm-install-ci-test.1
index 22eb734e21e975..448a8514812d45 100644
--- a/deps/npm/man/man1/npm-install-ci-test.1
+++ b/deps/npm/man/man1/npm-install-ci-test.1
@@ -1,4 +1,4 @@
-.TH "NPM\-INSTALL\-CI\-TEST" "1" "April 2021" "" ""
+.TH "NPM\-INSTALL\-CI\-TEST" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-install-ci-test\fR \- Install a project with a clean slate and run tests
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1
index 521d0bc5ebf490..03efe308f2edcd 100644
--- a/deps/npm/man/man1/npm-install-test.1
+++ b/deps/npm/man/man1/npm-install-test.1
@@ -1,4 +1,4 @@
-.TH "NPM\-INSTALL\-TEST" "1" "April 2021" "" ""
+.TH "NPM\-INSTALL\-TEST" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-install-test\fR \- Install package(s) and run tests
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1
index 5ac2700d829880..c4567fb2920420 100644
--- a/deps/npm/man/man1/npm-install.1
+++ b/deps/npm/man/man1/npm-install.1
@@ -1,4 +1,4 @@
-.TH "NPM\-INSTALL" "1" "April 2021" "" ""
+.TH "NPM\-INSTALL" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-install\fR \- Install a package
.SS Synopsis
@@ -576,8 +576,6 @@ npm help rebuild
.IP \(bu 2
npm help scripts
.IP \(bu 2
-npm help build
-.IP \(bu 2
npm help config
.IP \(bu 2
npm help npmrc
diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1
index 94afe9c3fdf81f..404b04a5ce490e 100644
--- a/deps/npm/man/man1/npm-link.1
+++ b/deps/npm/man/man1/npm-link.1
@@ -1,4 +1,4 @@
-.TH "NPM\-LINK" "1" "April 2021" "" ""
+.TH "NPM\-LINK" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-link\fR \- Symlink a package folder
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1
index 0f94b466398256..84a6851b284cba 100644
--- a/deps/npm/man/man1/npm-logout.1
+++ b/deps/npm/man/man1/npm-logout.1
@@ -1,4 +1,4 @@
-.TH "NPM\-LOGOUT" "1" "April 2021" "" ""
+.TH "NPM\-LOGOUT" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-logout\fR \- Log out of the registry
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1
index 2d4720ad8a4a97..e2d6c980c279e3 100644
--- a/deps/npm/man/man1/npm-ls.1
+++ b/deps/npm/man/man1/npm-ls.1
@@ -1,4 +1,4 @@
-.TH "NPM\-LS" "1" "April 2021" "" ""
+.TH "NPM\-LS" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-ls\fR \- List installed packages
.SS Synopsis
@@ -26,7 +26,7 @@ example, running \fBnpm ls promzard\fP in npm's source tree will show:
.P
.RS 2
.nf
-npm@7\.11\.2 /path/to/npm
+npm@7\.12\.0 /path/to/npm
└─┬ init\-package\-json@0\.0\.4
└── promzard@0\.1\.5
.fi
diff --git a/deps/npm/man/man1/npm-org.1 b/deps/npm/man/man1/npm-org.1
index 7d85be8760a8ad..18cb791b071309 100644
--- a/deps/npm/man/man1/npm-org.1
+++ b/deps/npm/man/man1/npm-org.1
@@ -1,4 +1,4 @@
-.TH "NPM\-ORG" "1" "April 2021" "" ""
+.TH "NPM\-ORG" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-org\fR \- Manage orgs
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1
index d90143428f2e57..a7309f2dfb994a 100644
--- a/deps/npm/man/man1/npm-outdated.1
+++ b/deps/npm/man/man1/npm-outdated.1
@@ -1,4 +1,4 @@
-.TH "NPM\-OUTDATED" "1" "April 2021" "" ""
+.TH "NPM\-OUTDATED" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-outdated\fR \- Check for outdated packages
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1
index 3731b383d7618a..7140aef06b6144 100644
--- a/deps/npm/man/man1/npm-owner.1
+++ b/deps/npm/man/man1/npm-owner.1
@@ -1,4 +1,4 @@
-.TH "NPM\-OWNER" "1" "April 2021" "" ""
+.TH "NPM\-OWNER" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-owner\fR \- Manage package owners
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1
index adedbef0c1f56c..ab34dc891d1c13 100644
--- a/deps/npm/man/man1/npm-pack.1
+++ b/deps/npm/man/man1/npm-pack.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PACK" "1" "April 2021" "" ""
+.TH "NPM\-PACK" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-pack\fR \- Create a tarball from a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-ping.1 b/deps/npm/man/man1/npm-ping.1
index 9eb5ec12842bc7..385e4b8a810ba3 100644
--- a/deps/npm/man/man1/npm-ping.1
+++ b/deps/npm/man/man1/npm-ping.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PING" "1" "April 2021" "" ""
+.TH "NPM\-PING" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-ping\fR \- Ping npm registry
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1
index c4b8a36e954c31..82de74199e923f 100644
--- a/deps/npm/man/man1/npm-prefix.1
+++ b/deps/npm/man/man1/npm-prefix.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PREFIX" "1" "April 2021" "" ""
+.TH "NPM\-PREFIX" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-prefix\fR \- Display prefix
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-profile.1 b/deps/npm/man/man1/npm-profile.1
index 7b2ff13efae4fe..d2d412fe8bfa9f 100644
--- a/deps/npm/man/man1/npm-profile.1
+++ b/deps/npm/man/man1/npm-profile.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PROFILE" "1" "April 2021" "" ""
+.TH "NPM\-PROFILE" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-profile\fR \- Change settings on your registry profile
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1
index df8b82eb7b5169..18d5e14dd1a08f 100644
--- a/deps/npm/man/man1/npm-prune.1
+++ b/deps/npm/man/man1/npm-prune.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PRUNE" "1" "April 2021" "" ""
+.TH "NPM\-PRUNE" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-prune\fR \- Remove extraneous packages
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1
index ac7a0323a72570..c405f64f27e361 100644
--- a/deps/npm/man/man1/npm-publish.1
+++ b/deps/npm/man/man1/npm-publish.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PUBLISH" "1" "April 2021" "" ""
+.TH "NPM\-PUBLISH" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-publish\fR \- Publish a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1
index 995c8ab5ea19b1..3a78852b5430ef 100644
--- a/deps/npm/man/man1/npm-rebuild.1
+++ b/deps/npm/man/man1/npm-rebuild.1
@@ -1,4 +1,4 @@
-.TH "NPM\-REBUILD" "1" "April 2021" "" ""
+.TH "NPM\-REBUILD" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-rebuild\fR \- Rebuild a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1
index 30b05534836db0..bdb5452181e77c 100644
--- a/deps/npm/man/man1/npm-repo.1
+++ b/deps/npm/man/man1/npm-repo.1
@@ -1,4 +1,4 @@
-.TH "NPM\-REPO" "1" "April 2021" "" ""
+.TH "NPM\-REPO" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-repo\fR \- Open package repository page in the browser
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1
index bd212fb466a056..4ecb71f177e31d 100644
--- a/deps/npm/man/man1/npm-restart.1
+++ b/deps/npm/man/man1/npm-restart.1
@@ -1,4 +1,4 @@
-.TH "NPM\-RESTART" "1" "April 2021" "" ""
+.TH "NPM\-RESTART" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-restart\fR \- Restart a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1
index ddff01d429e204..e552a650986d8f 100644
--- a/deps/npm/man/man1/npm-root.1
+++ b/deps/npm/man/man1/npm-root.1
@@ -1,4 +1,4 @@
-.TH "NPM\-ROOT" "1" "April 2021" "" ""
+.TH "NPM\-ROOT" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-root\fR \- Display npm root
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1
index 53b88e6fab99fd..22222c6541e968 100644
--- a/deps/npm/man/man1/npm-run-script.1
+++ b/deps/npm/man/man1/npm-run-script.1
@@ -1,4 +1,4 @@
-.TH "NPM\-RUN\-SCRIPT" "1" "April 2021" "" ""
+.TH "NPM\-RUN\-SCRIPT" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-run-script\fR \- Run arbitrary package scripts
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1
index 068499dc99c291..5e889b15f62413 100644
--- a/deps/npm/man/man1/npm-search.1
+++ b/deps/npm/man/man1/npm-search.1
@@ -1,4 +1,4 @@
-.TH "NPM\-SEARCH" "1" "April 2021" "" ""
+.TH "NPM\-SEARCH" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-search\fR \- Search for packages
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-set-script.1 b/deps/npm/man/man1/npm-set-script.1
index f348099fb48aca..e9a380ee460e19 100644
--- a/deps/npm/man/man1/npm-set-script.1
+++ b/deps/npm/man/man1/npm-set-script.1
@@ -1,4 +1,4 @@
-.TH "NPM\-SET\-SCRIPT" "1" "April 2021" "" ""
+.TH "NPM\-SET\-SCRIPT" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-set-script\fR \- Set tasks in the scripts section of package\.json
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1
index d349510e5a940c..a57ffb18187c21 100644
--- a/deps/npm/man/man1/npm-shrinkwrap.1
+++ b/deps/npm/man/man1/npm-shrinkwrap.1
@@ -1,4 +1,4 @@
-.TH "NPM\-SHRINKWRAP" "1" "April 2021" "" ""
+.TH "NPM\-SHRINKWRAP" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-shrinkwrap\fR \- Lock down dependency versions for publication
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1
index e95168e243f948..49f91c6466e852 100644
--- a/deps/npm/man/man1/npm-star.1
+++ b/deps/npm/man/man1/npm-star.1
@@ -1,4 +1,4 @@
-.TH "NPM\-STAR" "1" "April 2021" "" ""
+.TH "NPM\-STAR" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-star\fR \- Mark your favorite packages
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1
index fa16060953c24c..397cfea91fe5ec 100644
--- a/deps/npm/man/man1/npm-stars.1
+++ b/deps/npm/man/man1/npm-stars.1
@@ -1,4 +1,4 @@
-.TH "NPM\-STARS" "1" "April 2021" "" ""
+.TH "NPM\-STARS" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-stars\fR \- View packages marked as favorites
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1
index 42d8b6cc96fe12..84bdff0140dd79 100644
--- a/deps/npm/man/man1/npm-start.1
+++ b/deps/npm/man/man1/npm-start.1
@@ -1,4 +1,4 @@
-.TH "NPM\-START" "1" "April 2021" "" ""
+.TH "NPM\-START" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-start\fR \- Start a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1
index 55be734ed48d3b..143aa56462d164 100644
--- a/deps/npm/man/man1/npm-stop.1
+++ b/deps/npm/man/man1/npm-stop.1
@@ -1,4 +1,4 @@
-.TH "NPM\-STOP" "1" "April 2021" "" ""
+.TH "NPM\-STOP" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-stop\fR \- Stop a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-team.1 b/deps/npm/man/man1/npm-team.1
index 94aa9d89ccafd7..5816ea1d21bd7b 100644
--- a/deps/npm/man/man1/npm-team.1
+++ b/deps/npm/man/man1/npm-team.1
@@ -1,4 +1,4 @@
-.TH "NPM\-TEAM" "1" "April 2021" "" ""
+.TH "NPM\-TEAM" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-team\fR \- Manage organization teams and team memberships
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1
index cedbe681982fcc..4dd4bc2335f758 100644
--- a/deps/npm/man/man1/npm-test.1
+++ b/deps/npm/man/man1/npm-test.1
@@ -1,4 +1,4 @@
-.TH "NPM\-TEST" "1" "April 2021" "" ""
+.TH "NPM\-TEST" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-test\fR \- Test a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-token.1 b/deps/npm/man/man1/npm-token.1
index 5adf0cda6d8261..2b45db5fc4e03b 100644
--- a/deps/npm/man/man1/npm-token.1
+++ b/deps/npm/man/man1/npm-token.1
@@ -1,4 +1,4 @@
-.TH "NPM\-TOKEN" "1" "April 2021" "" ""
+.TH "NPM\-TOKEN" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-token\fR \- Manage your authentication tokens
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1
index 0de9f431be36cd..0ee2fded986c47 100644
--- a/deps/npm/man/man1/npm-uninstall.1
+++ b/deps/npm/man/man1/npm-uninstall.1
@@ -1,4 +1,4 @@
-.TH "NPM\-UNINSTALL" "1" "April 2021" "" ""
+.TH "NPM\-UNINSTALL" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-uninstall\fR \- Remove a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1
index 9645ab106d0c11..e0e2a6c81b2f96 100644
--- a/deps/npm/man/man1/npm-unpublish.1
+++ b/deps/npm/man/man1/npm-unpublish.1
@@ -1,4 +1,4 @@
-.TH "NPM\-UNPUBLISH" "1" "April 2021" "" ""
+.TH "NPM\-UNPUBLISH" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-unpublish\fR \- Remove a package from the registry
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-unstar.1 b/deps/npm/man/man1/npm-unstar.1
index 86c152eb6d27fb..ec4cf6d2d1ff6f 100644
--- a/deps/npm/man/man1/npm-unstar.1
+++ b/deps/npm/man/man1/npm-unstar.1
@@ -1,4 +1,4 @@
-.TH "NPM\-UNSTAR" "1" "April 2021" "" ""
+.TH "NPM\-UNSTAR" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-unstar\fR \- Remove an item from your favorite packages
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1
index adaebe92db336f..2ac1f9e8478e76 100644
--- a/deps/npm/man/man1/npm-update.1
+++ b/deps/npm/man/man1/npm-update.1
@@ -1,4 +1,4 @@
-.TH "NPM\-UPDATE" "1" "April 2021" "" ""
+.TH "NPM\-UPDATE" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-update\fR \- Update packages
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1
index d926c9e5282eee..02de076a10c4c1 100644
--- a/deps/npm/man/man1/npm-version.1
+++ b/deps/npm/man/man1/npm-version.1
@@ -1,4 +1,4 @@
-.TH "NPM\-VERSION" "1" "April 2021" "" ""
+.TH "NPM\-VERSION" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-version\fR \- Bump a package version
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1
index 498821fbb6ba9a..b3dac21b7572b1 100644
--- a/deps/npm/man/man1/npm-view.1
+++ b/deps/npm/man/man1/npm-view.1
@@ -1,4 +1,4 @@
-.TH "NPM\-VIEW" "1" "April 2021" "" ""
+.TH "NPM\-VIEW" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-view\fR \- View registry info
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1
index c38b46dff07ab3..ed54f2f00bc682 100644
--- a/deps/npm/man/man1/npm-whoami.1
+++ b/deps/npm/man/man1/npm-whoami.1
@@ -1,4 +1,4 @@
-.TH "NPM\-WHOAMI" "1" "April 2021" "" ""
+.TH "NPM\-WHOAMI" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-whoami\fR \- Display npm username
.SS Synopsis
diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1
index 8dbeca5362bba8..19f5b3c30b51f9 100644
--- a/deps/npm/man/man1/npm.1
+++ b/deps/npm/man/man1/npm.1
@@ -1,4 +1,4 @@
-.TH "NPM" "1" "April 2021" "" ""
+.TH "NPM" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm\fR \- javascript package manager
.SS Synopsis
@@ -10,7 +10,7 @@ npm [args]
.RE
.SS Version
.P
-7\.11\.2
+7\.12\.0
.SS Description
.P
npm is the package manager for the Node JavaScript platform\. It puts
diff --git a/deps/npm/man/man1/npx.1 b/deps/npm/man/man1/npx.1
index 87c018f4121915..76305688fb0e73 100644
--- a/deps/npm/man/man1/npx.1
+++ b/deps/npm/man/man1/npx.1
@@ -1,4 +1,4 @@
-.TH "NPX" "1" "April 2021" "" ""
+.TH "NPX" "1" "May 2021" "" ""
.SH "NAME"
\fBnpx\fR \- Run a command from a local or remote npm package
.SS Synopsis
diff --git a/deps/npm/man/man5/folders.5 b/deps/npm/man/man5/folders.5
index cacb710a03b030..ccf0c4f6e8f17a 100644
--- a/deps/npm/man/man5/folders.5
+++ b/deps/npm/man/man5/folders.5
@@ -1,4 +1,4 @@
-.TH "FOLDERS" "5" "April 2021" "" ""
+.TH "FOLDERS" "5" "May 2021" "" ""
.SH "NAME"
\fBfolders\fR \- Folder Structures Used by npm
.SS Description
diff --git a/deps/npm/man/man5/install.5 b/deps/npm/man/man5/install.5
index 445353eb8565e0..5fc6f442a92268 100644
--- a/deps/npm/man/man5/install.5
+++ b/deps/npm/man/man5/install.5
@@ -1,4 +1,4 @@
-.TH "INSTALL" "5" "April 2021" "" ""
+.TH "INSTALL" "5" "May 2021" "" ""
.SH "NAME"
\fBinstall\fR \- Download and install node and npm
.SS Description
diff --git a/deps/npm/man/man5/npm-shrinkwrap-json.5 b/deps/npm/man/man5/npm-shrinkwrap-json.5
index 27076ba3361fe9..2fdbdd139a9f82 100644
--- a/deps/npm/man/man5/npm-shrinkwrap-json.5
+++ b/deps/npm/man/man5/npm-shrinkwrap-json.5
@@ -1,4 +1,4 @@
-.TH "NPM\-SHRINKWRAP\.JSON" "5" "April 2021" "" ""
+.TH "NPM\-SHRINKWRAP\.JSON" "5" "May 2021" "" ""
.SH "NAME"
\fBnpm-shrinkwrap.json\fR \- A publishable lockfile
.SS Description
diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5
index f880a269513a6b..1ecd71ff214540 100644
--- a/deps/npm/man/man5/npmrc.5
+++ b/deps/npm/man/man5/npmrc.5
@@ -1,4 +1,4 @@
-.TH "NPMRC" "5" "April 2021" "" ""
+.TH "NPMRC" "5" "May 2021" "" ""
.SH "NAME"
\fBnpmrc\fR \- The npm config files
.SS Description
diff --git a/deps/npm/man/man5/package-json.5 b/deps/npm/man/man5/package-json.5
index a882e445ca0031..8b5b12e03829a6 100644
--- a/deps/npm/man/man5/package-json.5
+++ b/deps/npm/man/man5/package-json.5
@@ -1,4 +1,4 @@
-.TH "PACKAGE\.JSON" "5" "April 2021" "" ""
+.TH "PACKAGE\.JSON" "5" "May 2021" "" ""
.SH "NAME"
\fBpackage.json\fR \- Specifics of npm's package\.json handling
.SS Description
@@ -624,7 +624,7 @@ tarball or git URL\.
\fBPlease do not put test harnesses or transpilers or other "development"
time tools in your \fBdependencies\fP object\.\fR See \fBdevDependencies\fP, below\.
.P
-See npm help semver for more details about specifying version ranges\.
+See semver \fIhttps://github\.com/npm/node\-semver#versions\fR for more details about specifying version ranges\.
.RS 0
.IP \(bu 2
\fBversion\fP Must match \fBversion\fP exactly
diff --git a/deps/npm/man/man5/package-lock-json.5 b/deps/npm/man/man5/package-lock-json.5
index 765dd8499948a1..20bedd30009757 100644
--- a/deps/npm/man/man5/package-lock-json.5
+++ b/deps/npm/man/man5/package-lock-json.5
@@ -1,4 +1,4 @@
-.TH "PACKAGE\-LOCK\.JSON" "5" "April 2021" "" ""
+.TH "PACKAGE\-LOCK\.JSON" "5" "May 2021" "" ""
.SH "NAME"
\fBpackage-lock.json\fR \- A manifestation of the manifest
.SS Description
diff --git a/deps/npm/man/man7/config.7 b/deps/npm/man/man7/config.7
index 522e974fc07089..b8884ded13e4d2 100644
--- a/deps/npm/man/man7/config.7
+++ b/deps/npm/man/man7/config.7
@@ -1,4 +1,4 @@
-.TH "CONFIG" "7" "April 2021" "" ""
+.TH "CONFIG" "7" "May 2021" "" ""
.SH "NAME"
\fBconfig\fR \- More than you probably want to know about npm configuration
.SS Description
@@ -1666,7 +1666,8 @@ Show short usage output about the command specified\.
.SS \fBuser\-agent\fP
.RS 0
.IP \(bu 2
-Default: "npm/{npm\-version} node/{node\-version} {platform} {arch} {ci}"
+Default: "npm/{npm\-version} node/{node\-version} {platform} {arch}
+workspaces/{workspaces} {ci}"
.IP \(bu 2
Type: String
@@ -1684,6 +1685,9 @@ their actual counterparts:
.IP \(bu 2
\fB{arch}\fP \- The value of \fBprocess\.arch\fP
.IP \(bu 2
+\fB{workspaces}\fP \- Set to \fBtrue\fP if the \fBworkspaces\fP or \fBworkspace\fP options
+are set\.
+.IP \(bu 2
\fB{ci}\fP \- The value of the \fBci\-name\fP config, if set, prefixed with \fBci/\fP, or
an empty string if \fBci\-name\fP is empty\.
diff --git a/deps/npm/man/man7/developers.7 b/deps/npm/man/man7/developers.7
index 00dc1b14e2415b..0935fea65f509f 100644
--- a/deps/npm/man/man7/developers.7
+++ b/deps/npm/man/man7/developers.7
@@ -1,4 +1,4 @@
-.TH "DEVELOPERS" "7" "April 2021" "" ""
+.TH "DEVELOPERS" "7" "May 2021" "" ""
.SH "NAME"
\fBdevelopers\fR \- Developer Guide
.SS Description
diff --git a/deps/npm/man/man7/orgs.7 b/deps/npm/man/man7/orgs.7
index 7f29cf2c239730..13c9b9dbadf1c3 100644
--- a/deps/npm/man/man7/orgs.7
+++ b/deps/npm/man/man7/orgs.7
@@ -1,4 +1,4 @@
-.TH "ORGS" "7" "April 2021" "" ""
+.TH "ORGS" "7" "May 2021" "" ""
.SH "NAME"
\fBorgs\fR \- Working with Teams & Orgs
.SS Description
diff --git a/deps/npm/man/man7/registry.7 b/deps/npm/man/man7/registry.7
index 2ff87e4a4c45e8..941a1450073139 100644
--- a/deps/npm/man/man7/registry.7
+++ b/deps/npm/man/man7/registry.7
@@ -1,4 +1,4 @@
-.TH "REGISTRY" "7" "April 2021" "" ""
+.TH "REGISTRY" "7" "May 2021" "" ""
.SH "NAME"
\fBregistry\fR \- The JavaScript Package Registry
.SS Description
diff --git a/deps/npm/man/man7/removal.7 b/deps/npm/man/man7/removal.7
index e3508f6696d720..ead032bfdf457d 100644
--- a/deps/npm/man/man7/removal.7
+++ b/deps/npm/man/man7/removal.7
@@ -1,4 +1,4 @@
-.TH "REMOVAL" "7" "April 2021" "" ""
+.TH "REMOVAL" "7" "May 2021" "" ""
.SH "NAME"
\fBremoval\fR \- Cleaning the Slate
.SS Synopsis
diff --git a/deps/npm/man/man7/scope.7 b/deps/npm/man/man7/scope.7
index 2a0fa9e1c8ea7f..716946d732afb7 100644
--- a/deps/npm/man/man7/scope.7
+++ b/deps/npm/man/man7/scope.7
@@ -1,4 +1,4 @@
-.TH "SCOPE" "7" "April 2021" "" ""
+.TH "SCOPE" "7" "May 2021" "" ""
.SH "NAME"
\fBscope\fR \- Scoped packages
.SS Description
diff --git a/deps/npm/man/man7/scripts.7 b/deps/npm/man/man7/scripts.7
index 2dc2486de7d51b..63ebce805b4d8f 100644
--- a/deps/npm/man/man7/scripts.7
+++ b/deps/npm/man/man7/scripts.7
@@ -1,4 +1,4 @@
-.TH "SCRIPTS" "7" "April 2021" "" ""
+.TH "SCRIPTS" "7" "May 2021" "" ""
.SH "NAME"
\fBscripts\fR \- How npm handles the "scripts" field
.SS Description
@@ -160,13 +160,6 @@ These all run after the actual installation of modules into
.IP \(bu 2
\fBprepare\fP
-.RE
-.SS npm help \fBenv\fP
-.RS 0
-.IP \(bu 2
-\fBenv\fP (You can override the default behavior of \fBnpm env\fP by defining
- a custom \fBenv\fP entry in your \fBscripts\fP object)
-
.RE
.SS npm help \fBinstall\fP
.P
diff --git a/deps/npm/man/man7/workspaces.7 b/deps/npm/man/man7/workspaces.7
index 5b28ac54c5d1cb..dbb63528d6da75 100644
--- a/deps/npm/man/man7/workspaces.7
+++ b/deps/npm/man/man7/workspaces.7
@@ -1,4 +1,4 @@
-.TH "WORKSPACES" "7" "April 2021" "" ""
+.TH "WORKSPACES" "7" "May 2021" "" ""
.SH "NAME"
\fBworkspaces\fR \- Working with workspaces
.SS Description
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/add-rm-pkg-deps.js b/deps/npm/node_modules/@npmcli/arborist/lib/add-rm-pkg-deps.js
index 9a96fd1b3797cd..25113cbedff39d 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/add-rm-pkg-deps.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/add-rm-pkg-deps.js
@@ -1,60 +1,60 @@
// add and remove dependency specs to/from pkg manifest
-const removeFromOthers = (name, type, pkg) => {
- const others = new Set([
- 'dependencies',
- 'optionalDependencies',
- 'devDependencies',
- 'peerDependenciesMeta',
- 'peerDependencies',
- ])
-
- switch (type) {
- case 'prod':
- others.delete('dependencies')
- break
- case 'dev':
- others.delete('devDependencies')
- others.delete('peerDependencies')
- others.delete('peerDependenciesMeta')
- break
- case 'optional':
- others.delete('optionalDependencies')
- break
- case 'peer':
- case 'peerOptional':
- others.delete('devDependencies')
- others.delete('peerDependencies')
- others.delete('peerDependenciesMeta')
- break
- }
-
- for (const other of others)
- deleteSubKey(pkg, other, name)
-}
-
-const add = ({pkg, add, saveBundle, saveType}) => {
+const add = ({pkg, add, saveBundle, saveType, log}) => {
for (const spec of add)
- addSingle({pkg, spec, saveBundle, saveType})
+ addSingle({pkg, spec, saveBundle, saveType, log})
return pkg
}
-const addSingle = ({pkg, spec, saveBundle, saveType}) => {
- if (!saveType)
- saveType = getSaveType(pkg, spec)
+// Canonical source of both the map between saveType and where it correlates to
+// in the package, and the names of all our dependencies attributes
+const saveTypeMap = new Map([
+ ['dev', 'devDependencies'],
+ ['optional', 'optionalDependencies'],
+ ['prod', 'dependencies'],
+ ['peerOptional', 'peerDependencies'],
+ ['peer', 'peerDependencies'],
+])
+const addSingle = ({pkg, spec, saveBundle, saveType, log}) => {
const { name, rawSpec } = spec
- removeFromOthers(name, saveType, pkg)
- const type = saveType === 'prod' ? 'dependencies'
- : saveType === 'optional' ? 'optionalDependencies'
- : saveType === 'peer' || saveType === 'peerOptional' ? 'peerDependencies'
- : saveType === 'dev' ? 'devDependencies'
- : /* istanbul ignore next */ null
- pkg[type] = pkg[type] || {}
- if (rawSpec !== '' || pkg[type][name] === undefined)
- pkg[type][name] = rawSpec || '*'
+ // if the user does not give us a type, we infer which type(s)
+ // to keep based on the same order of priority we do when
+ // building the tree as defined in the _loadDeps method of
+ // the node class.
+ if (!saveType)
+ saveType = inferSaveType(pkg, spec.name)
+
+ if (saveType === 'prod') {
+ // a production dependency can only exist as production (rpj ensures it
+ // doesn't coexist w/ optional)
+ deleteSubKey(pkg, 'devDependencies', name, 'dependencies', log)
+ deleteSubKey(pkg, 'peerDependencies', name, 'dependencies', log)
+ } else if (saveType === 'dev') {
+ // a dev dependency may co-exist as peer, or optional, but not production
+ deleteSubKey(pkg, 'dependencies', name, 'devDependencies', log)
+ } else if (saveType === 'optional') {
+ // an optional dependency may co-exist as dev (rpj ensures it doesn't
+ // coexist w/ prod)
+ deleteSubKey(pkg, 'peerDependencies', name, 'optionalDependencies', log)
+ } else { // peer or peerOptional is all that's left
+ // a peer dependency may coexist as dev
+ deleteSubKey(pkg, 'dependencies', name, 'peerDependencies', log)
+ deleteSubKey(pkg, 'optionalDependencies', name, 'peerDependencies', log)
+ }
+
+ const depType = saveTypeMap.get(saveType)
+
+ pkg[depType] = pkg[depType] || {}
+ if (rawSpec !== '' || pkg[depType][name] === undefined)
+ pkg[depType][name] = rawSpec || '*'
+ if (saveType === 'optional') {
+ // Affordance for previous npm versions that require this behaviour
+ pkg.dependencies = pkg.dependencies || {}
+ pkg.dependencies[name] = pkg.optionalDependencies[name]
+ }
if (saveType === 'peer' || saveType === 'peerOptional') {
const pdm = pkg.peerDependenciesMeta || {}
@@ -79,47 +79,49 @@ const addSingle = ({pkg, spec, saveBundle, saveType}) => {
}
}
-const getSaveType = (pkg, spec) => {
- const {name} = spec
- const {
- // these names are so lonnnnngggg
- devDependencies: devDeps,
- optionalDependencies: optDeps,
- peerDependencies: peerDeps,
- peerDependenciesMeta: peerDepsMeta,
- } = pkg
-
- if (peerDeps && peerDeps[name] !== undefined) {
- if (peerDepsMeta && peerDepsMeta[name] && peerDepsMeta[name].optional)
- return 'peerOptional'
- else
- return 'peer'
- } else if (devDeps && devDeps[name] !== undefined)
- return 'dev'
- else if (optDeps && optDeps[name] !== undefined)
- return 'optional'
- else
- return 'prod'
+// Finds where the package is already in the spec and infers saveType from that
+const inferSaveType = (pkg, name) => {
+ for (const saveType of saveTypeMap.keys()) {
+ if (hasSubKey(pkg, saveTypeMap.get(saveType), name)) {
+ if (
+ saveType === 'peerOptional' &&
+ (!hasSubKey(pkg, 'peerDependenciesMeta', name) ||
+ !pkg.peerDependenciesMeta[name].optional)
+ )
+ return 'peer'
+ return saveType
+ }
+ }
+ return 'prod'
}
-const deleteSubKey = (obj, k, sk) => {
- if (obj[k]) {
- delete obj[k][sk]
- if (!Object.keys(obj[k]).length)
- delete obj[k]
+const hasSubKey = (pkg, depType, name) => {
+ return pkg[depType] && Object.prototype.hasOwnProperty.call(pkg[depType], name)
+}
+
+// Removes a subkey and warns about it if it's being replaced
+const deleteSubKey = (pkg, depType, name, replacedBy, log) => {
+ if (hasSubKey(pkg, depType, name)) {
+ if (replacedBy && log)
+ log.warn('idealTree', `Removing ${depType}.${name} in favor of ${replacedBy}.${name}`)
+ delete pkg[depType][name]
+
+ // clean up peerDependenciesMeta if we are removing something from peerDependencies
+ if (depType === 'peerDependencies' && pkg.peerDependenciesMeta) {
+ delete pkg.peerDependenciesMeta[name]
+ if (!Object.keys(pkg.peerDependenciesMeta).length)
+ delete pkg.peerDependenciesMeta
+ }
+
+ if (!Object.keys(pkg[depType]).length)
+ delete pkg[depType]
}
}
const rm = (pkg, rm) => {
- for (const type of [
- 'dependencies',
- 'optionalDependencies',
- 'peerDependencies',
- 'peerDependenciesMeta',
- 'devDependencies',
- ]) {
+ for (const depType of new Set(saveTypeMap.values())) {
for (const name of rm)
- deleteSubKey(pkg, type, name)
+ deleteSubKey(pkg, depType, name)
}
if (pkg.bundleDependencies) {
pkg.bundleDependencies = pkg.bundleDependencies
@@ -130,4 +132,4 @@ const rm = (pkg, rm) => {
return pkg
}
-module.exports = { add, rm }
+module.exports = { add, rm, saveTypeMap, hasSubKey }
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 7ee8dae35be1b5..6176707c3c6511 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
@@ -504,6 +504,7 @@ module.exports = cls => class IdealTreeBuilder extends cls {
saveBundle,
saveType,
path: this.path,
+ log: this.log,
})
})
}
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/index.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/index.js
index 93b9aa38298208..3578d50389ea64 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/index.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/index.js
@@ -29,6 +29,7 @@
const {resolve} = require('path')
const {homedir} = require('os')
const procLog = require('../proc-log.js')
+const { saveTypeMap } = require('../add-rm-pkg-deps.js')
const mixins = [
require('../tracker.js'),
@@ -57,6 +58,8 @@ class Arborist extends Base {
packumentCache: options.packumentCache || new Map(),
log: options.log || procLog,
}
+ if (options.saveType && !saveTypeMap.get(options.saveType))
+ throw new Error(`Invalid saveType ${options.saveType}`)
this.cache = resolve(this.options.cache)
this.path = resolve(this.options.path)
process.emit('timeEnd', 'arborist:ctor')
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js
index 64f08756263c72..f7731e1c90da08 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js
@@ -3,9 +3,8 @@
const onExit = require('../signal-handling.js')
const pacote = require('pacote')
const rpj = require('read-package-json-fast')
-const { updateDepSpec } = require('../dep-spec.js')
const AuditReport = require('../audit-report.js')
-const {subset} = require('semver')
+const {subset, intersects} = require('semver')
const npa = require('npm-package-arg')
const {dirname, resolve, relative} = require('path')
@@ -28,6 +27,7 @@ const promiseAllRejectLate = require('promise-all-reject-late')
const optionalSet = require('../optional-set.js')
const updateRootPackageJson = require('../update-root-package-json.js')
const calcDepFlags = require('../calc-dep-flags.js')
+const { saveTypeMap, hasSubKey } = require('../add-rm-pkg-deps.js')
const _retiredPaths = Symbol('retiredPaths')
const _retiredUnchanged = Symbol('retiredUnchanged')
@@ -406,11 +406,14 @@ module.exports = cls => class Reifier extends cls {
return
process.emit('time', 'reify:trashOmits')
+ // node.parent is checked to make sure this is a node that's in the tree, and
+ // not the parent-less top level nodes
const filter = node =>
- node.peer && this[_omitPeer] ||
- node.dev && this[_omitDev] ||
- node.optional && this[_omitOptional] ||
- node.devOptional && this[_omitOptional] && this[_omitDev]
+ node.isDescendantOf(this.idealTree) &&
+ (node.peer && this[_omitPeer] ||
+ node.dev && this[_omitDev] ||
+ node.optional && this[_omitOptional] ||
+ node.devOptional && this[_omitOptional] && this[_omitDev])
for (const node of this.idealTree.inventory.filter(filter))
this[_addNodeToTrashList](node)
@@ -539,8 +542,8 @@ module.exports = cls => class Reifier extends cls {
// Do the best with what we have, or else remove it from the tree
// entirely, since we can't possibly reify it.
const res = node.resolved ? `${node.name}@${this[_registryResolved](node.resolved)}`
- : node.package.name && node.version
- ? `${node.package.name}@${node.version}`
+ : node.packageName && node.version
+ ? `${node.packageName}@${node.version}`
: null
// no idea what this thing is. remove it from the tree.
@@ -959,6 +962,7 @@ module.exports = cls => class Reifier extends cls {
const spec = subSpec ? subSpec.rawSpec : rawSpec
const child = root.children.get(name)
+ let newSpec
if (req.registry) {
const version = child.version
const prefixRange = version ? this[_savePrefix] + version : '*'
@@ -970,16 +974,17 @@ module.exports = cls => class Reifier extends cls {
const isRange = (subSpec || req).type === 'range'
const range = !isRange || subset(prefixRange, spec, { loose: true })
? prefixRange : spec
- const pname = child.package.name
+ const pname = child.packageName
const alias = name !== pname
- updateDepSpec(pkg, name, (alias ? `npm:${pname}@` : '') + range)
+ newSpec = alias ? `npm:${pname}@${range}` : range
} else if (req.hosted) {
// save the git+https url if it has auth, otherwise shortcut
const h = req.hosted
const opt = { noCommittish: false }
- const save = h.https && h.auth ? `git+${h.https(opt)}`
- : h.shortcut(opt)
- updateDepSpec(pkg, name, save)
+ if (h.https && h.auth)
+ newSpec = `git+${h.https(opt)}`
+ else
+ newSpec = h.shortcut(opt)
} else if (req.type === 'directory' || req.type === 'file') {
// save the relative path in package.json
// Normally saveSpec is updated with the proper relative
@@ -988,9 +993,37 @@ module.exports = cls => class Reifier extends cls {
// thing, so just get the ultimate fetchSpec and relativize it.
const p = req.fetchSpec.replace(/^file:/, '')
const rel = relpath(root.realpath, p)
- updateDepSpec(pkg, name, `file:${rel}`)
+ newSpec = `file:${rel}`
} else
- updateDepSpec(pkg, name, req.saveSpec)
+ newSpec = req.saveSpec
+
+ if (options.saveType) {
+ const depType = saveTypeMap.get(options.saveType)
+ pkg[depType][name] = newSpec
+ // rpj will have moved it here if it was in both
+ // if it is empty it will be deleted later
+ if (options.saveType === 'prod' && pkg.optionalDependencies)
+ delete pkg.optionalDependencies[name]
+ } else {
+ if (hasSubKey(pkg, 'dependencies', name))
+ pkg.dependencies[name] = newSpec
+
+ if (hasSubKey(pkg, 'devDependencies', name)) {
+ pkg.devDependencies[name] = newSpec
+ // don't update peer or optional if we don't have to
+ if (hasSubKey(pkg, 'peerDependencies', name) && !intersects(newSpec, pkg.peerDependencies[name]))
+ pkg.peerDependencies[name] = newSpec
+
+ if (hasSubKey(pkg, 'optionalDependencies', name) && !intersects(newSpec, pkg.optionalDependencies[name]))
+ pkg.optionalDependencies[name] = newSpec
+ } else {
+ if (hasSubKey(pkg, 'peerDependencies', name))
+ pkg.peerDependencies[name] = newSpec
+
+ if (hasSubKey(pkg, 'optionalDependencies', name))
+ pkg.optionalDependencies[name] = newSpec
+ }
+ }
}
// refresh the edges so they have the correct specs
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/audit-report.js b/deps/npm/node_modules/@npmcli/arborist/lib/audit-report.js
index 77cd6511aea3b5..9a0178c59c9e63 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/audit-report.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/audit-report.js
@@ -101,13 +101,14 @@ class AuditReport extends Map {
async run () {
this.report = await this[_getReport]()
+ this.log.silly('audit report', this.report)
if (this.report)
await this[_init]()
return this
}
isVulnerable (node) {
- const vuln = this.get(node.package.name)
+ const vuln = this.get(node.packageName)
return !!(vuln && vuln.isVulnerable(node))
}
@@ -144,7 +145,7 @@ class AuditReport extends Map {
super.set(name, vuln)
const p = []
- for (const node of this.tree.inventory.query('name', name)) {
+ for (const node of this.tree.inventory.query('packageName', name)) {
if (shouldOmit(node, this[_omit]))
continue
@@ -167,7 +168,7 @@ class AuditReport extends Map {
this[_checkTopNode](dep, vuln, spec)
else {
// calculate a metavuln, if necessary
- p.push(this.calculator.calculate(dep.name, advisory).then(meta => {
+ p.push(this.calculator.calculate(dep.packageName, advisory).then(meta => {
if (meta.testVersion(dep.version, spec))
advisories.add(meta)
}))
@@ -228,6 +229,9 @@ class AuditReport extends Map {
if (!specObj.registry)
return false
+ if (specObj.subSpec)
+ spec = specObj.subSpec.rawSpec
+
// We don't provide fixes for top nodes other than root, but we
// still check to see if the node is fixable with a different version,
// and if that is a semver major bump.
@@ -289,6 +293,7 @@ class AuditReport extends Map {
try {
// first try the super fast bulk advisory listing
const body = prepareBulkData(this.tree, this[_omit])
+ this.log.silly('audit', 'bulk request', body)
// no sense asking if we don't have anything to audit,
// we know it'll be empty
@@ -304,7 +309,8 @@ class AuditReport extends Map {
})
return await res.json()
- } catch (_) {
+ } catch (er) {
+ this.log.silly('audit', 'bulk request failed', String(er.body))
// that failed, try the quick audit endpoint
const body = prepareData(this.tree, this.options)
const res = await fetch('/-/npm/v1/security/audits/quick', {
@@ -330,6 +336,7 @@ class AuditReport extends Map {
// return true if we should ignore this one
const shouldOmit = (node, omit) =>
!node.version ? true
+ : node.isRoot ? true
: omit.size === 0 ? false
: node.dev && omit.has('dev') ||
node.optional && omit.has('optional') ||
@@ -338,9 +345,9 @@ const shouldOmit = (node, omit) =>
const prepareBulkData = (tree, omit) => {
const payload = {}
- for (const name of tree.inventory.query('name')) {
+ for (const name of tree.inventory.query('packageName')) {
const set = new Set()
- for (const node of tree.inventory.query('name', name)) {
+ for (const node of tree.inventory.query('packageName', name)) {
if (shouldOmit(node, omit))
continue
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/dep-spec.js b/deps/npm/node_modules/@npmcli/arborist/lib/dep-spec.js
deleted file mode 100644
index 92911543e16841..00000000000000
--- a/deps/npm/node_modules/@npmcli/arborist/lib/dep-spec.js
+++ /dev/null
@@ -1,43 +0,0 @@
-const types = [
- 'peerDependencies',
- 'devDependencies',
- 'optionalDependencies',
- 'dependencies',
-]
-
-const findType = (pkg, name) => {
- for (const t of types) {
- if (pkg[t] && typeof pkg[t] === 'object' && pkg[t][name] !== undefined)
- return t
- }
- return 'dependencies'
-}
-
-// given a dep name and spec, update it wherever it exists in
-// the manifest, or add the spec to 'dependencies' if not found.
-const updateDepSpec = (pkg, name, newSpec) => {
- const type = findType(pkg, name)
- pkg[type] = pkg[type] || {}
- pkg[type][name] = newSpec
- return pkg
-}
-
-// sort alphabetically all types of deps for a given package
-const orderDeps = (pkg) => {
- for (const type of types) {
- if (pkg && pkg[type]) {
- pkg[type] = Object.keys(pkg[type])
- .sort((a, b) => a.localeCompare(b))
- .reduce((res, key) => {
- res[key] = pkg[type][key]
- return res
- }, {})
- }
- }
- return pkg
-}
-
-module.exports = {
- orderDeps,
- updateDepSpec,
-}
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/inventory.js b/deps/npm/node_modules/@npmcli/arborist/lib/inventory.js
index cef0c4e2658998..75782918852232 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/inventory.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/inventory.js
@@ -4,7 +4,7 @@
// keys is the set of fields to be able to query.
const _primaryKey = Symbol('_primaryKey')
const _index = Symbol('_index')
-const defaultKeys = ['name', 'license', 'funding', 'realpath']
+const defaultKeys = ['name', 'license', 'funding', 'realpath', 'packageName']
const { hasOwnProperty } = Object.prototype
const debug = require('./debug.js')
class Inventory extends Map {
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/node.js b/deps/npm/node_modules/@npmcli/arborist/lib/node.js
index a54f76afcdf3b3..370bfc9567d287 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/node.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/node.js
@@ -291,6 +291,10 @@ class Node {
return this[_package].version || ''
}
+ get packageName () {
+ return this[_package].name || null
+ }
+
get pkgid () {
const { name = '', version = '' } = this.package
// root package will prefer package name over folder name,
@@ -350,10 +354,10 @@ class Node {
}
const why = {
- name: this.isProjectRoot ? this.package.name : this.name,
+ name: this.isProjectRoot ? this.packageName : this.name,
version: this.package.version,
}
- if (this.errors.length || !this.package.name || !this.package.version) {
+ if (this.errors.length || !this.packageName || !this.package.version) {
why.errors = this.errors.length ? this.errors : [
new Error('invalid package: lacks name and/or version'),
]
@@ -460,7 +464,7 @@ class Node {
if (this.isProjectRoot)
return false
const { root } = this
- const { type, to } = root.edgesOut.get(this.package.name) || {}
+ const { type, to } = root.edgesOut.get(this.packageName) || {}
return type === 'workspace' && to && (to.target === this || to === this)
}
@@ -730,20 +734,14 @@ class Node {
[_loadDeps] () {
// Caveat! Order is relevant!
- // packages in optionalDependencies and prod/peer/dev are
- // optional. Packages in both deps and devDeps are required.
+ // Packages in optionalDependencies are optional.
+ // Packages in both deps and devDeps are required.
// Note the subtle breaking change from v6: it is no longer possible
// to have a different spec for a devDep than production dep.
- this[_loadDepType](this.package.optionalDependencies, 'optional')
// Linked targets that are disconnected from the tree are tops,
// but don't have a 'path' field, only a 'realpath', because we
// don't know their canonical location. We don't need their devDeps.
- const { isTop, path, sourceReference } = this
- const { isTop: srcTop, path: srcPath } = sourceReference || {}
- if (isTop && path && (!sourceReference || srcTop && srcPath))
- this[_loadDepType](this.package.devDependencies, 'dev')
-
const pd = this.package.peerDependencies
if (pd && typeof pd === 'object' && !this.legacyPeerDeps) {
const pm = this.package.peerDependenciesMeta || {}
@@ -760,19 +758,22 @@ class Node {
}
this[_loadDepType](this.package.dependencies, 'prod')
+ this[_loadDepType](this.package.optionalDependencies, 'optional')
+
+ const { isTop, path, sourceReference } = this
+ const { isTop: srcTop, path: srcPath } = sourceReference || {}
+ if (isTop && path && (!sourceReference || srcTop && srcPath))
+ this[_loadDepType](this.package.devDependencies, 'dev')
}
- [_loadDepType] (obj, type) {
- const from = this
+ [_loadDepType] (deps, type) {
const ad = this.package.acceptDependencies || {}
- for (const [name, spec] of Object.entries(obj || {})) {
- const accept = ad[name]
- // if it's already set, then we keep the existing edge
- // Prod deps should not be marked as dev, however.
- // NB: the Edge ctor adds itself to from.edgesOut
+ // Because of the order in which _loadDeps runs, we always want to
+ // prioritize a new edge over an existing one
+ for (const [name, spec] of Object.entries(deps || {})) {
const current = this.edgesOut.get(name)
- if (!current || current.dev && type === 'prod')
- new Edge({ from, name, spec, accept, type })
+ if (!current || current.type !== 'workspace')
+ new Edge({ from: this, name, spec, accept: ad[name], type })
}
}
@@ -965,8 +966,8 @@ class Node {
// if no resolved, check both package name and version
// otherwise, conclude that they are different things
- return this.package.name && node.package.name &&
- this.package.name === node.package.name &&
+ return this.packageName && node.packageName &&
+ this.packageName === node.packageName &&
this.version && node.version &&
this.version === node.version
}
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/printable.js b/deps/npm/node_modules/@npmcli/arborist/lib/printable.js
index 79f46a9e93c4a6..e611f55a4bd639 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/printable.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/printable.js
@@ -7,8 +7,8 @@ const relpath = require('./relpath.js')
class ArboristNode {
constructor (tree, path) {
this.name = tree.name
- if (tree.package.name && tree.package.name !== this.name)
- this.packageName = tree.package.name
+ if (tree.packageName && tree.packageName !== this.name)
+ this.packageName = tree.packageName
if (tree.version)
this.version = tree.version
this.location = tree.location
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/shrinkwrap.js b/deps/npm/node_modules/@npmcli/arborist/lib/shrinkwrap.js
index 342e78e9e3a7b1..d9065ffa0258f0 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/shrinkwrap.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/shrinkwrap.js
@@ -254,7 +254,7 @@ class Shrinkwrap {
meta[key.replace(/^_/, '')] = val
})
// we only include name if different from the node path name
- const pname = node.package.name
+ const pname = node.packageName
if (pname && pname !== node.name)
meta.name = pname
@@ -825,7 +825,7 @@ class Shrinkwrap {
[_buildLegacyLockfile] (node, lock, path = []) {
if (node === this.tree) {
// the root node
- lock.name = node.package.name || node.name
+ lock.name = node.packageName || node.name
if (node.version)
lock.version = node.version
}
@@ -870,9 +870,9 @@ class Shrinkwrap {
lock.from = spec.raw
} else if (!node.isRoot &&
node.package &&
- node.package.name &&
- node.package.name !== node.name)
- lock.version = `npm:${node.package.name}@${node.version}`
+ node.packageName &&
+ node.packageName !== node.name)
+ lock.version = `npm:${node.packageName}@${node.version}`
else if (node.package && node.version)
lock.version = node.version
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/update-root-package-json.js b/deps/npm/node_modules/@npmcli/arborist/lib/update-root-package-json.js
index aba5614924ec77..4a88707b9c4793 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/update-root-package-json.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/update-root-package-json.js
@@ -6,8 +6,6 @@ const {resolve} = require('path')
const parseJSON = require('json-parse-even-better-errors')
-const { orderDeps } = require('./dep-spec.js')
-
const depTypes = new Set([
'dependencies',
'optionalDependencies',
@@ -15,6 +13,20 @@ const depTypes = new Set([
'peerDependencies',
])
+// sort alphabetically all types of deps for a given package
+const orderDeps = (pkg) => {
+ for (const type of depTypes) {
+ if (pkg && pkg[type]) {
+ pkg[type] = Object.keys(pkg[type])
+ .sort((a, b) => a.localeCompare(b))
+ .reduce((res, key) => {
+ res[key] = pkg[type][key]
+ return res
+ }, {})
+ }
+ }
+ return pkg
+}
const parseJsonSafe = json => {
try {
return parseJSON(json)
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/vuln.js b/deps/npm/node_modules/@npmcli/arborist/lib/vuln.js
index 8f887a3fc96cb0..2561bc80646cf4 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/vuln.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/vuln.js
@@ -83,6 +83,9 @@ class Vuln {
if (!specObj.registry)
return true
+ if (specObj.subSpec)
+ spec = specObj.subSpec.rawSpec
+
for (const v of this.versions) {
if (satisfies(v, spec) && !satisfies(v, this.range, semverOpt))
return false
diff --git a/deps/npm/node_modules/@npmcli/arborist/package.json b/deps/npm/node_modules/@npmcli/arborist/package.json
index e7ac932e08d8f3..ebc84f6fc32a98 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": "2.4.1",
+ "version": "2.4.2",
"description": "Manage node_modules trees",
"dependencies": {
"@npmcli/installed-package-contents": "^1.0.7",
diff --git a/deps/npm/node_modules/@npmcli/git/lib/clone.js b/deps/npm/node_modules/@npmcli/git/lib/clone.js
index 1fea5acc846211..6754fd7606009d 100644
--- a/deps/npm/node_modules/@npmcli/git/lib/clone.js
+++ b/deps/npm/node_modules/@npmcli/git/lib/clone.js
@@ -30,7 +30,7 @@ const pickManifest = require('npm-pick-manifest')
const fs = require('fs')
const mkdirp = require('mkdirp')
-module.exports = (repo, ref = 'HEAD', target = null, /* istanbul ignore next */ opts = {}) =>
+module.exports = (repo, ref = 'HEAD', target = null, opts = {}) =>
revs(repo, opts).then(revs => clone(
repo,
revs,
diff --git a/deps/npm/node_modules/@npmcli/git/lib/spawn.js b/deps/npm/node_modules/@npmcli/git/lib/spawn.js
index cee3a7baf40788..337164a9a012dc 100644
--- a/deps/npm/node_modules/@npmcli/git/lib/spawn.js
+++ b/deps/npm/node_modules/@npmcli/git/lib/spawn.js
@@ -10,6 +10,11 @@ module.exports = (gitArgs, opts = {}) => {
if (gitPath instanceof Error) { return Promise.reject(gitPath) }
+ // undocumented option, mostly only here for tests
+ const args = opts.allowReplace || gitArgs[0] === '--no-replace-objects'
+ ? gitArgs
+ : ['--no-replace-objects', ...gitArgs]
+
const log = opts.log || procLog
let retry = opts.retry
if (retry === null || retry === undefined) {
@@ -22,11 +27,11 @@ module.exports = (gitArgs, opts = {}) => {
}
return promiseRetry((retry, number) => {
if (number !== 1) {
- log.silly('pacote', `Retrying git command: ${
- gitArgs.join(' ')} attempt # ${number}`)
+ log.silly('git', `Retrying git command: ${
+ args.join(' ')} attempt # ${number}`)
}
- return spawn(gitPath, gitArgs, makeOpts(opts))
+ return spawn(gitPath, args, makeOpts(opts))
.catch(er => {
if (!shouldRetry(er.stderr, number)) {
throw er
diff --git a/deps/npm/node_modules/@npmcli/git/package.json b/deps/npm/node_modules/@npmcli/git/package.json
index 9b368c31e262db..0fe94686ece20c 100644
--- a/deps/npm/node_modules/@npmcli/git/package.json
+++ b/deps/npm/node_modules/@npmcli/git/package.json
@@ -1,6 +1,6 @@
{
"name": "@npmcli/git",
- "version": "2.0.8",
+ "version": "2.0.9",
"main": "lib/index.js",
"files": [
"lib/*.js"
@@ -29,7 +29,7 @@
"devDependencies": {
"slash": "^3.0.0",
"standard": "^16.0.3",
- "tap": "^14.11.0"
+ "tap": "^15.0.6"
},
"dependencies": {
"@npmcli/promise-spawn": "^1.3.2",
diff --git a/deps/npm/node_modules/libnpmexec/CHANGELOG.md b/deps/npm/node_modules/libnpmexec/CHANGELOG.md
index 9de3013f0ad9d8..81a0e1a0327c38 100644
--- a/deps/npm/node_modules/libnpmexec/CHANGELOG.md
+++ b/deps/npm/node_modules/libnpmexec/CHANGELOG.md
@@ -1,5 +1,14 @@
# Changelog
+## v1.1.0
+
+- Add add walk up dir lookup logic to satisfy local bins,
+similar to `@npmcli/run-script`
+
+## v1.0.1
+
+- Fix `scriptShell` option name.
+
## v1.0.0
- Initial implementation, moves the code that used to live in the **npm cli**,
diff --git a/deps/npm/node_modules/libnpmexec/README.md b/deps/npm/node_modules/libnpmexec/README.md
index a436c9a5a2bc1a..fb7a7717600197 100644
--- a/deps/npm/node_modules/libnpmexec/README.md
+++ b/deps/npm/node_modules/libnpmexec/README.md
@@ -31,7 +31,7 @@ await libexec({
- `call`: An alternative command to run when using `packages` option **String**, defaults to empty string.
- `cache`: The path location to where the npm cache folder is placed **String**
- `color`: Output should use color? **Boolean**, defaults to `false`
- - `localBin`: Location to the `node_modules/.bin` folder of the local project **String**, defaults to empty string.
+ - `localBin`: Location to the `node_modules/.bin` folder of the local project to start scanning for bin files **String**, defaults to `./node_modules/.bin`. **libexec** will walk up the directory structure looking for `node_modules/.bin` folders in parent folders that might satisfy the current `arg` and will use that bin if found.
- `locationMsg`: Overrides "at location" message when entering interactive mode **String**
- `log`: Sets an optional logger **Object**, defaults to `proc-log` module usage.
- `globalBin`: Location to the global space bin folder, same as: `$(npm bin -g)` **String**, defaults to empty string.
diff --git a/deps/npm/node_modules/libnpmexec/lib/file-exists.js b/deps/npm/node_modules/libnpmexec/lib/file-exists.js
new file mode 100644
index 00000000000000..a115be14b00427
--- /dev/null
+++ b/deps/npm/node_modules/libnpmexec/lib/file-exists.js
@@ -0,0 +1,29 @@
+const { resolve } = require('path')
+const { promisify } = require('util')
+const stat = promisify(require('fs').stat)
+const walkUp = require('walk-up-path')
+
+const fileExists = (file) => stat(file)
+ .then((stat) => stat.isFile())
+ .catch(() => false)
+
+const localFileExists = async (dir, binName, root = '/') => {
+ root = resolve(root).toLowerCase()
+
+ for (const path of walkUp(resolve(dir))) {
+ const binDir = resolve(path, 'node_modules', '.bin')
+
+ if (await fileExists(resolve(binDir, binName)))
+ return binDir
+
+ if (path.toLowerCase() === root)
+ return false
+ }
+
+ return false
+}
+
+module.exports = {
+ fileExists,
+ localFileExists,
+}
diff --git a/deps/npm/node_modules/libnpmexec/lib/index.js b/deps/npm/node_modules/libnpmexec/lib/index.js
index 906a0b5407c13a..0bab753f9fda19 100644
--- a/deps/npm/node_modules/libnpmexec/lib/index.js
+++ b/deps/npm/node_modules/libnpmexec/lib/index.js
@@ -1,7 +1,6 @@
-const { delimiter, resolve } = require('path')
+const { delimiter, dirname, resolve } = require('path')
const { promisify } = require('util')
const read = promisify(require('read'))
-const stat = promisify(require('fs').stat)
const Arborist = require('@npmcli/arborist')
const ciDetect = require('@npmcli/ci-detect')
@@ -12,15 +11,12 @@ const pacote = require('pacote')
const readPackageJson = require('read-package-json-fast')
const cacheInstallDir = require('./cache-install-dir.js')
+const { fileExists, localFileExists } = require('./file-exists.js')
const getBinFromManifest = require('./get-bin-from-manifest.js')
const manifestMissing = require('./manifest-missing.js')
const noTTY = require('./no-tty.js')
const runScript = require('./run-script.js')
-const fileExists = (file) => stat(file)
- .then((stat) => stat.isFile())
- .catch(() => false)
-
/* istanbul ignore next */
const PATH = (
process.env.PATH || process.env.Path || process.env.path
@@ -31,7 +27,7 @@ const exec = async (opts) => {
args = [],
call = '',
color = false,
- localBin = '',
+ localBin = resolve('./node_modules/.bin'),
locationMsg = undefined,
globalBin = '',
output,
@@ -72,8 +68,10 @@ const exec = async (opts) => {
// the behavior of treating the single argument as a package name
if (needPackageCommandSwap) {
let binExists = false
- if (await fileExists(`${localBin}/${args[0]}`)) {
- pathArr.unshift(localBin)
+ const dir = dirname(dirname(localBin))
+ const localBinPath = await localFileExists(dir, args[0])
+ if (localBinPath) {
+ pathArr.unshift(localBinPath)
binExists = true
} else if (await fileExists(`${globalBin}/${args[0]}`)) {
pathArr.unshift(globalBin)
diff --git a/deps/npm/node_modules/libnpmexec/package.json b/deps/npm/node_modules/libnpmexec/package.json
index 1b7d24103be7af..bc5c0483a7de73 100644
--- a/deps/npm/node_modules/libnpmexec/package.json
+++ b/deps/npm/node_modules/libnpmexec/package.json
@@ -1,6 +1,6 @@
{
"name": "libnpmexec",
- "version": "1.0.1",
+ "version": "1.1.0",
"files": [
"lib"
],
@@ -46,7 +46,7 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-standard": "^5.0.0",
- "tap": "^15.0.2"
+ "tap": "^15.0.6"
},
"dependencies": {
"@npmcli/arborist": "^2.3.0",
@@ -58,6 +58,7 @@
"pacote": "^11.3.1",
"proc-log": "^1.0.0",
"read": "^1.0.7",
- "read-package-json-fast": "^2.0.2"
+ "read-package-json-fast": "^2.0.2",
+ "walk-up-path": "^1.0.0"
}
}
diff --git a/deps/npm/node_modules/npm-packlist/index.js b/deps/npm/node_modules/npm-packlist/index.js
index 8f62983e6f6c0f..12b51316c5e27c 100644
--- a/deps/npm/node_modules/npm-packlist/index.js
+++ b/deps/npm/node_modules/npm-packlist/index.js
@@ -26,8 +26,7 @@ const normalizePackageBin = require('npm-normalize-package-bin')
// localized documentation and other use cases. Adding a `/` to
// these rules, while tempting and arguably more "correct", is a
// significant change that will break existing use cases.
-const packageMustHaveFileNames =
- 'readme|copying|license|licence|notice|changes|changelog|history'
+const packageMustHaveFileNames = 'readme|copying|license|licence'
const packageMustHaves = `@(${packageMustHaveFileNames}){,.*[^~$]}`
const packageMustHavesRE = new RegExp(`^(${packageMustHaveFileNames})(\\..*[^~\$])?$`, 'i')
diff --git a/deps/npm/node_modules/npm-packlist/package.json b/deps/npm/node_modules/npm-packlist/package.json
index 1276b484136992..e909559bdb2040 100644
--- a/deps/npm/node_modules/npm-packlist/package.json
+++ b/deps/npm/node_modules/npm-packlist/package.json
@@ -1,6 +1,6 @@
{
"name": "npm-packlist",
- "version": "2.1.5",
+ "version": "2.2.0",
"description": "Get a list of the files to add from a folder into an npm package",
"directories": {
"test": "test"
@@ -15,12 +15,12 @@
"author": "Isaac Z. Schlueter (http://blog.izs.me/)",
"license": "ISC",
"files": [
+ "bin/index.js",
"index.js"
],
"devDependencies": {
"mutate-fs": "^2.1.1",
- "require-inject": "^1.4.4",
- "tap": "^14.10.8"
+ "tap": "^15.0.6"
},
"scripts": {
"test": "tap",
diff --git a/deps/npm/package.json b/deps/npm/package.json
index 19326a9aa59df1..7360d8f9640d80 100644
--- a/deps/npm/package.json
+++ b/deps/npm/package.json
@@ -1,5 +1,5 @@
{
- "version": "7.11.2",
+ "version": "7.12.0",
"name": "npm",
"description": "a package manager for JavaScript",
"keywords": [
@@ -42,7 +42,7 @@
"./package.json": "./package.json"
},
"dependencies": {
- "@npmcli/arborist": "^2.4.1",
+ "@npmcli/arborist": "^2.4.2",
"@npmcli/ci-detect": "^1.2.0",
"@npmcli/config": "^2.2.0",
"@npmcli/run-script": "^1.8.5",
@@ -67,7 +67,7 @@
"leven": "^3.1.0",
"libnpmaccess": "^4.0.2",
"libnpmdiff": "^2.0.4",
- "libnpmexec": "^1.0.1",
+ "libnpmexec": "^1.1.0",
"libnpmfund": "^1.0.2",
"libnpmhook": "^6.0.2",
"libnpmorg": "^2.0.2",
@@ -182,10 +182,10 @@
"devDependencies": {
"@mdx-js/mdx": "^1.6.22",
"cmark-gfm": "^0.8.5",
- "eslint": "^7.23.0",
+ "eslint": "^7.25.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
- "eslint-plugin-promise": "^4.3.1",
+ "eslint-plugin-promise": "^5.1.0",
"eslint-plugin-standard": "^5.0.0",
"jsdom": "^16.5.2",
"licensee": "^8.1.0",
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 d6761ea30c74b5..53aef86f79d1bd 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
@@ -1132,7 +1132,8 @@ Show short usage output about the command specified.
#### \`user-agent\`
-* Default: "npm/{npm-version} node/{node-version} {platform} {arch} {ci}"
+* Default: "npm/{npm-version} node/{node-version} {platform} {arch}
+ workspaces/{workspaces} {ci}"
* Type: String
Sets the User-Agent request header. The following fields are replaced with
@@ -1142,6 +1143,8 @@ their actual counterparts:
* \`{node-version}\` - The Node.js version in use
* \`{platform}\` - The value of \`process.platform\`
* \`{arch}\` - The value of \`process.arch\`
+* \`{workspaces}\` - Set to \`true\` if the \`workspaces\` or \`workspace\` options
+ are set.
* \`{ci}\` - The value of the \`ci-name\` config, if set, prefixed with \`ci/\`, or
an empty string if \`ci-name\` is empty.
diff --git a/deps/npm/test/lib/cache.js b/deps/npm/test/lib/cache.js
index bbebae8894babe..bad0ede89e1013 100644
--- a/deps/npm/test/lib/cache.js
+++ b/deps/npm/test/lib/cache.js
@@ -134,20 +134,21 @@ t.test('cache add pkg only', t => {
})
})
-t.test('cache add pkg w/ spec modifier', t => {
+t.test('cache add multiple pkgs', t => {
t.teardown(() => {
logOutput = []
tarballStreamSpec = ''
tarballStreamOpts = {}
})
- cache.exec(['add', 'mypkg', 'latest'], err => {
+ cache.exec(['add', 'mypkg', 'anotherpkg'], err => {
t.error(err)
t.strictSame(logOutput, [
- ['silly', 'cache add', 'args', ['mypkg', 'latest']],
- ['silly', 'cache add', 'spec', 'mypkg@latest'],
+ ['silly', 'cache add', 'args', ['mypkg', 'anotherpkg']],
+ ['silly', 'cache add', 'spec', 'mypkg'],
+ ['silly', 'cache add', 'spec', 'anotherpkg'],
], 'logs correctly')
- t.equal(tarballStreamSpec, 'mypkg@latest', 'passes the correct spec to pacote')
+ t.equal(tarballStreamSpec, 'anotherpkg', 'passes the correct spec to pacote')
t.same(tarballStreamOpts, npm.flatOptions, 'passes the correct options to pacote')
t.end()
})
diff --git a/deps/npm/test/lib/exec.js b/deps/npm/test/lib/exec.js
index 5ecc73274876a6..3d2da32a766754 100644
--- a/deps/npm/test/lib/exec.js
+++ b/deps/npm/test/lib/exec.js
@@ -121,11 +121,15 @@ t.afterEach(() => {
t.test('npx foo, bin already exists locally', t => {
const path = t.testdir({
- foo: 'just some file',
+ node_modules: {
+ '.bin': {
+ foo: 'just some file',
+ },
+ },
})
PROGRESS_IGNORED = true
- npm.localBin = path
+ npm.localBin = resolve(path, 'node_modules', '.bin')
exec.exec(['foo', 'one arg', 'two arg'], er => {
t.error(er, 'npm exec')
@@ -137,7 +141,7 @@ t.test('npx foo, bin already exists locally', t => {
stdioString: true,
event: 'npx',
env: {
- PATH: [path, ...PATH].join(delimiter),
+ PATH: [npm.localBin, ...PATH].join(delimiter),
},
stdio: 'inherit',
}])
@@ -147,11 +151,15 @@ t.test('npx foo, bin already exists locally', t => {
t.test('npx foo, bin already exists globally', t => {
const path = t.testdir({
- foo: 'just some file',
+ node_modules: {
+ '.bin': {
+ foo: 'just some file',
+ },
+ },
})
PROGRESS_IGNORED = true
- npm.globalBin = path
+ npm.globalBin = resolve(path, 'node_modules', '.bin')
exec.exec(['foo', 'one arg', 'two arg'], er => {
t.error(er, 'npm exec')
@@ -163,7 +171,7 @@ t.test('npx foo, bin already exists globally', t => {
stdioString: true,
event: 'npx',
env: {
- PATH: [path, ...PATH].join(delimiter),
+ PATH: [npm.globalBin, ...PATH].join(delimiter),
},
stdio: 'inherit',
}])
diff --git a/deps/npm/test/lib/utils/config/definitions.js b/deps/npm/test/lib/utils/config/definitions.js
index f735223655f505..49e4152883795d 100644
--- a/deps/npm/test/lib/utils/config/definitions.js
+++ b/deps/npm/test/lib/utils/config/definitions.js
@@ -729,7 +729,7 @@ t.test('user-agent', t => {
}
const flat = {}
const expectNoCI = `npm/1.2.3 node/9.8.7 ` +
- `${process.platform} ${process.arch}`
+ `${process.platform} ${process.arch} workspaces/false`
definitions['user-agent'].flatten('user-agent', obj, flat)
t.equal(flat.userAgent, expectNoCI)
t.equal(process.env.npm_config_user_agent, flat.userAgent, 'npm_user_config environment is set')
@@ -742,6 +742,23 @@ t.test('user-agent', t => {
t.equal(flat.userAgent, expectCI)
t.equal(process.env.npm_config_user_agent, flat.userAgent, 'npm_user_config environment is set')
t.equal(obj['user-agent'], flat.userAgent, 'config user-agent template is translated')
+
+ delete obj['ci-name']
+ obj.workspaces = true
+ obj['user-agent'] = definitions['user-agent'].default
+ const expectWorkspaces = expectNoCI.replace('workspaces/false', 'workspaces/true')
+ definitions['user-agent'].flatten('user-agent', obj, flat)
+ t.equal(flat.userAgent, expectWorkspaces)
+ t.equal(process.env.npm_config_user_agent, flat.userAgent, 'npm_user_config environment is set')
+ t.equal(obj['user-agent'], flat.userAgent, 'config user-agent template is translated')
+
+ delete obj.workspaces
+ obj.workspace = ['foo']
+ obj['user-agent'] = definitions['user-agent'].default
+ definitions['user-agent'].flatten('user-agent', obj, flat)
+ t.equal(flat.userAgent, expectWorkspaces)
+ t.equal(process.env.npm_config_user_agent, flat.userAgent, 'npm_user_config environment is set')
+ t.equal(obj['user-agent'], flat.userAgent, 'config user-agent template is translated')
t.end()
})