summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornpm-robot <ops+robot@npmjs.com>2022-05-05 15:25:34 +0530
committerRuy Adorno <ruyadorno@hotmail.com>2022-05-27 12:29:52 -0400
commit72630d176faeff1c2f81d1650071ffbdb13fce18 (patch)
tree8cbe4c33c0239522c7b8c558b5f138e4e89159a2
parent93d58c361e3c63faee68455e4f292f7a41e55a67 (diff)
downloadnode-new-72630d176faeff1c2f81d1650071ffbdb13fce18.tar.gz
deps: upgrade npm to 8.9.0
PR-URL: https://github.com/nodejs/node/pull/42968 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
-rw-r--r--deps/npm/docs/content/commands/npm-dedupe.md4
-rw-r--r--deps/npm/docs/content/commands/npm-find-dupes.md4
-rw-r--r--deps/npm/docs/content/commands/npm-install-test.md4
-rw-r--r--deps/npm/docs/content/commands/npm-install.md4
-rw-r--r--deps/npm/docs/content/commands/npm-link.md4
-rw-r--r--deps/npm/docs/content/commands/npm-owner.md46
-rw-r--r--deps/npm/docs/content/commands/npm-pkg.md8
-rw-r--r--deps/npm/docs/content/commands/npm-update.md4
-rw-r--r--deps/npm/docs/content/using-npm/config.md4
-rw-r--r--deps/npm/docs/output/commands/npm-dedupe.html3
-rw-r--r--deps/npm/docs/output/commands/npm-find-dupes.html3
-rw-r--r--deps/npm/docs/output/commands/npm-install-test.html3
-rw-r--r--deps/npm/docs/output/commands/npm-install.html3
-rw-r--r--deps/npm/docs/output/commands/npm-link.html3
-rw-r--r--deps/npm/docs/output/commands/npm-ls.html2
-rw-r--r--deps/npm/docs/output/commands/npm-owner.html41
-rw-r--r--deps/npm/docs/output/commands/npm-pkg.html5
-rw-r--r--deps/npm/docs/output/commands/npm-update.html3
-rw-r--r--deps/npm/docs/output/commands/npm.html2
-rw-r--r--deps/npm/docs/output/using-npm/config.html3
-rw-r--r--deps/npm/lib/commands/doctor.js34
-rw-r--r--deps/npm/lib/commands/exec.js3
-rw-r--r--deps/npm/lib/commands/owner.js51
-rw-r--r--deps/npm/lib/commands/publish.js7
-rw-r--r--deps/npm/lib/npm.js19
-rw-r--r--deps/npm/lib/utils/config/definitions.js4
-rw-r--r--deps/npm/man/man1/npm-access.12
-rw-r--r--deps/npm/man/man1/npm-adduser.12
-rw-r--r--deps/npm/man/man1/npm-audit.12
-rw-r--r--deps/npm/man/man1/npm-bin.12
-rw-r--r--deps/npm/man/man1/npm-bugs.12
-rw-r--r--deps/npm/man/man1/npm-cache.12
-rw-r--r--deps/npm/man/man1/npm-ci.12
-rw-r--r--deps/npm/man/man1/npm-completion.12
-rw-r--r--deps/npm/man/man1/npm-config.12
-rw-r--r--deps/npm/man/man1/npm-dedupe.16
-rw-r--r--deps/npm/man/man1/npm-deprecate.12
-rw-r--r--deps/npm/man/man1/npm-diff.12
-rw-r--r--deps/npm/man/man1/npm-dist-tag.12
-rw-r--r--deps/npm/man/man1/npm-docs.12
-rw-r--r--deps/npm/man/man1/npm-doctor.12
-rw-r--r--deps/npm/man/man1/npm-edit.12
-rw-r--r--deps/npm/man/man1/npm-exec.12
-rw-r--r--deps/npm/man/man1/npm-explain.12
-rw-r--r--deps/npm/man/man1/npm-explore.12
-rw-r--r--deps/npm/man/man1/npm-find-dupes.16
-rw-r--r--deps/npm/man/man1/npm-fund.12
-rw-r--r--deps/npm/man/man1/npm-help-search.12
-rw-r--r--deps/npm/man/man1/npm-help.12
-rw-r--r--deps/npm/man/man1/npm-hook.12
-rw-r--r--deps/npm/man/man1/npm-init.12
-rw-r--r--deps/npm/man/man1/npm-install-ci-test.12
-rw-r--r--deps/npm/man/man1/npm-install-test.16
-rw-r--r--deps/npm/man/man1/npm-install.16
-rw-r--r--deps/npm/man/man1/npm-link.16
-rw-r--r--deps/npm/man/man1/npm-logout.12
-rw-r--r--deps/npm/man/man1/npm-ls.14
-rw-r--r--deps/npm/man/man1/npm-org.12
-rw-r--r--deps/npm/man/man1/npm-outdated.12
-rw-r--r--deps/npm/man/man1/npm-owner.156
-rw-r--r--deps/npm/man/man1/npm-pack.12
-rw-r--r--deps/npm/man/man1/npm-ping.12
-rw-r--r--deps/npm/man/man1/npm-pkg.111
-rw-r--r--deps/npm/man/man1/npm-prefix.12
-rw-r--r--deps/npm/man/man1/npm-profile.12
-rw-r--r--deps/npm/man/man1/npm-prune.12
-rw-r--r--deps/npm/man/man1/npm-publish.12
-rw-r--r--deps/npm/man/man1/npm-rebuild.12
-rw-r--r--deps/npm/man/man1/npm-repo.12
-rw-r--r--deps/npm/man/man1/npm-restart.12
-rw-r--r--deps/npm/man/man1/npm-root.12
-rw-r--r--deps/npm/man/man1/npm-run-script.12
-rw-r--r--deps/npm/man/man1/npm-search.12
-rw-r--r--deps/npm/man/man1/npm-set-script.12
-rw-r--r--deps/npm/man/man1/npm-shrinkwrap.12
-rw-r--r--deps/npm/man/man1/npm-star.12
-rw-r--r--deps/npm/man/man1/npm-stars.12
-rw-r--r--deps/npm/man/man1/npm-start.12
-rw-r--r--deps/npm/man/man1/npm-stop.12
-rw-r--r--deps/npm/man/man1/npm-team.12
-rw-r--r--deps/npm/man/man1/npm-test.12
-rw-r--r--deps/npm/man/man1/npm-token.12
-rw-r--r--deps/npm/man/man1/npm-uninstall.12
-rw-r--r--deps/npm/man/man1/npm-unpublish.12
-rw-r--r--deps/npm/man/man1/npm-unstar.12
-rw-r--r--deps/npm/man/man1/npm-update.16
-rw-r--r--deps/npm/man/man1/npm-version.12
-rw-r--r--deps/npm/man/man1/npm-view.12
-rw-r--r--deps/npm/man/man1/npm-whoami.12
-rw-r--r--deps/npm/man/man1/npm.14
-rw-r--r--deps/npm/man/man1/npx.12
-rw-r--r--deps/npm/man/man5/folders.52
-rw-r--r--deps/npm/man/man5/install.52
-rw-r--r--deps/npm/man/man5/npm-shrinkwrap-json.52
-rw-r--r--deps/npm/man/man5/npmrc.52
-rw-r--r--deps/npm/man/man5/package-json.52
-rw-r--r--deps/npm/man/man5/package-lock-json.52
-rw-r--r--deps/npm/man/man7/config.76
-rw-r--r--deps/npm/man/man7/developers.72
-rw-r--r--deps/npm/man/man7/logging.72
-rw-r--r--deps/npm/man/man7/orgs.72
-rw-r--r--deps/npm/man/man7/registry.72
-rw-r--r--deps/npm/man/man7/removal.72
-rw-r--r--deps/npm/man/man7/scope.72
-rw-r--r--deps/npm/man/man7/scripts.72
-rw-r--r--deps/npm/man/man7/workspaces.72
-rw-r--r--deps/npm/node_modules/cacache/lib/content/read.js9
-rw-r--r--deps/npm/node_modules/cacache/lib/content/write.js65
-rw-r--r--deps/npm/node_modules/cacache/lib/entry-index.js8
-rw-r--r--deps/npm/node_modules/cacache/lib/get.js49
-rw-r--r--deps/npm/node_modules/cacache/lib/put.js26
-rw-r--r--deps/npm/node_modules/cacache/lib/util/disposer.js31
-rw-r--r--deps/npm/node_modules/cacache/package.json7
-rw-r--r--deps/npm/node_modules/pacote/lib/fetcher.js11
-rw-r--r--deps/npm/node_modules/pacote/lib/registry.js3
-rw-r--r--deps/npm/node_modules/pacote/lib/remote.js13
-rw-r--r--deps/npm/node_modules/pacote/package.json8
-rw-r--r--deps/npm/package.json8
-rw-r--r--deps/npm/tap-snapshots/test/lib/load-all-commands.js.test.cjs2
-rw-r--r--deps/npm/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs4
-rw-r--r--deps/npm/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs4
-rw-r--r--deps/npm/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs2
-rw-r--r--deps/npm/test/coverage-map.js1
-rw-r--r--deps/npm/test/fixtures/mock-npm.js4
-rw-r--r--deps/npm/test/lib/commands/exec.js58
-rw-r--r--deps/npm/test/lib/commands/owner.js189
-rw-r--r--deps/npm/test/lib/npm.js2
127 files changed, 666 insertions, 364 deletions
diff --git a/deps/npm/docs/content/commands/npm-dedupe.md b/deps/npm/docs/content/commands/npm-dedupe.md
index f816b99433..570e018342 100644
--- a/deps/npm/docs/content/commands/npm-dedupe.md
+++ b/deps/npm/docs/content/commands/npm-dedupe.md
@@ -147,10 +147,6 @@ this warning is treated as a failure.
If set to false, then ignore `package-lock.json` files when installing. This
will also prevent _writing_ `package-lock.json` if `save` is true.
-When package package-locks are disabled, automatic pruning of extraneous
-modules will also be disabled. To remove extraneous modules with
-package-locks disabled use `npm prune`.
-
This configuration does not affect `npm ci`.
<!-- automatically generated, do not edit manually -->
diff --git a/deps/npm/docs/content/commands/npm-find-dupes.md b/deps/npm/docs/content/commands/npm-find-dupes.md
index a92c57bd7e..4da6c296c6 100644
--- a/deps/npm/docs/content/commands/npm-find-dupes.md
+++ b/deps/npm/docs/content/commands/npm-find-dupes.md
@@ -87,10 +87,6 @@ this warning is treated as a failure.
If set to false, then ignore `package-lock.json` files when installing. This
will also prevent _writing_ `package-lock.json` if `save` is true.
-When package package-locks are disabled, automatic pruning of extraneous
-modules will also be disabled. To remove extraneous modules with
-package-locks disabled use `npm prune`.
-
This configuration does not affect `npm ci`.
<!-- automatically generated, do not edit manually -->
diff --git a/deps/npm/docs/content/commands/npm-install-test.md b/deps/npm/docs/content/commands/npm-install-test.md
index 931ff05071..3dd860ea5c 100644
--- a/deps/npm/docs/content/commands/npm-install-test.md
+++ b/deps/npm/docs/content/commands/npm-install-test.md
@@ -162,10 +162,6 @@ this warning is treated as a failure.
If set to false, then ignore `package-lock.json` files when installing. This
will also prevent _writing_ `package-lock.json` if `save` is true.
-When package package-locks are disabled, automatic pruning of extraneous
-modules will also be disabled. To remove extraneous modules with
-package-locks disabled use `npm prune`.
-
This configuration does not affect `npm ci`.
<!-- automatically generated, do not edit manually -->
diff --git a/deps/npm/docs/content/commands/npm-install.md b/deps/npm/docs/content/commands/npm-install.md
index c0a1272c55..d6668a2c2b 100644
--- a/deps/npm/docs/content/commands/npm-install.md
+++ b/deps/npm/docs/content/commands/npm-install.md
@@ -552,10 +552,6 @@ this warning is treated as a failure.
If set to false, then ignore `package-lock.json` files when installing. This
will also prevent _writing_ `package-lock.json` if `save` is true.
-When package package-locks are disabled, automatic pruning of extraneous
-modules will also be disabled. To remove extraneous modules with
-package-locks disabled use `npm prune`.
-
This configuration does not affect `npm ci`.
<!-- automatically generated, do not edit manually -->
diff --git a/deps/npm/docs/content/commands/npm-link.md b/deps/npm/docs/content/commands/npm-link.md
index fb2b23921b..975c807c38 100644
--- a/deps/npm/docs/content/commands/npm-link.md
+++ b/deps/npm/docs/content/commands/npm-link.md
@@ -224,10 +224,6 @@ this warning is treated as a failure.
If set to false, then ignore `package-lock.json` files when installing. This
will also prevent _writing_ `package-lock.json` if `save` is true.
-When package package-locks are disabled, automatic pruning of extraneous
-modules will also be disabled. To remove extraneous modules with
-package-locks disabled use `npm prune`.
-
This configuration does not affect `npm ci`.
<!-- automatically generated, do not edit manually -->
diff --git a/deps/npm/docs/content/commands/npm-owner.md b/deps/npm/docs/content/commands/npm-owner.md
index 0779984e19..72dfe6a22d 100644
--- a/deps/npm/docs/content/commands/npm-owner.md
+++ b/deps/npm/docs/content/commands/npm-owner.md
@@ -73,6 +73,52 @@ password, npm will prompt on the command line for one.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
+#### `workspace`
+
+* Default:
+* Type: String (can be set multiple times)
+
+Enable running a command in the context of the configured workspaces of the
+current project while filtering by running only the workspaces defined by
+this configuration option.
+
+Valid values for the `workspace` config are either:
+
+* Workspace names
+* Path to a workspace directory
+* Path to a parent workspace directory (will result in selecting all
+ workspaces within that folder)
+
+When set for the `npm init` command, this may be set to the folder of a
+workspace which does not yet exist, to create the folder and set it up as a
+brand new workspace within the project.
+
+This value is not exported to the environment for child processes.
+
+<!-- automatically generated, do not edit manually -->
+<!-- see lib/utils/config/definitions.js -->
+
+#### `workspaces`
+
+* Default: null
+* Type: null or Boolean
+
+Set to true to run the command in the context of **all** configured
+workspaces.
+
+Explicitly setting this to false will cause commands like `install` to
+ignore workspaces altogether. When not set explicitly:
+
+- Commands that operate on the `node_modules` tree (install, update, etc.)
+will link workspaces into the `node_modules` folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+_unless_ one or more workspaces are specified in the `workspace` config.
+
+This value is not exported to the environment for child processes.
+
+<!-- automatically generated, do not edit manually -->
+<!-- see lib/utils/config/definitions.js -->
+
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
### See Also
diff --git a/deps/npm/docs/content/commands/npm-pkg.md b/deps/npm/docs/content/commands/npm-pkg.md
index 576e1335ef..deff7e82c6 100644
--- a/deps/npm/docs/content/commands/npm-pkg.md
+++ b/deps/npm/docs/content/commands/npm-pkg.md
@@ -76,6 +76,14 @@ Returned values are always in **json** format.
npm pkg get contributors[0].email
```
+ For complex fields you can also name a property in square brackets
+ to specifically select a child field. This is especially helpful
+ with the exports object:
+
+ ```bash
+ npm pkg get "exports[.].require"
+ ```
+
* `npm pkg set <field>=<value>`
Sets a `value` in your `package.json` based on the `field` value. When
diff --git a/deps/npm/docs/content/commands/npm-update.md b/deps/npm/docs/content/commands/npm-update.md
index 3947732149..421d04ca3d 100644
--- a/deps/npm/docs/content/commands/npm-update.md
+++ b/deps/npm/docs/content/commands/npm-update.md
@@ -280,10 +280,6 @@ this warning is treated as a failure.
If set to false, then ignore `package-lock.json` files when installing. This
will also prevent _writing_ `package-lock.json` if `save` is true.
-When package package-locks are disabled, automatic pruning of extraneous
-modules will also be disabled. To remove extraneous modules with
-package-locks disabled use `npm prune`.
-
This configuration does not affect `npm ci`.
<!-- automatically generated, do not edit manually -->
diff --git a/deps/npm/docs/content/using-npm/config.md b/deps/npm/docs/content/using-npm/config.md
index ba79dd505a..4dc2829825 100644
--- a/deps/npm/docs/content/using-npm/config.md
+++ b/deps/npm/docs/content/using-npm/config.md
@@ -1219,10 +1219,6 @@ The package to install for [`npm exec`](/commands/npm-exec)
If set to false, then ignore `package-lock.json` files when installing. This
will also prevent _writing_ `package-lock.json` if `save` is true.
-When package package-locks are disabled, automatic pruning of extraneous
-modules will also be disabled. To remove extraneous modules with
-package-locks disabled use `npm prune`.
-
This configuration does not affect `npm ci`.
<!-- automatically generated, do not edit manually -->
diff --git a/deps/npm/docs/output/commands/npm-dedupe.html b/deps/npm/docs/output/commands/npm-dedupe.html
index 5bc84af0a2..89d62caf70 100644
--- a/deps/npm/docs/output/commands/npm-dedupe.html
+++ b/deps/npm/docs/output/commands/npm-dedupe.html
@@ -253,9 +253,6 @@ this warning is treated as a failure.</p>
</ul>
<p>If set to false, then ignore <code>package-lock.json</code> files when installing. This
will also prevent <em>writing</em> <code>package-lock.json</code> if <code>save</code> is true.</p>
-<p>When package package-locks are disabled, automatic pruning of extraneous
-modules will also be disabled. To remove extraneous modules with
-package-locks disabled use <code>npm prune</code>.</p>
<p>This configuration does not affect <code>npm ci</code>.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
diff --git a/deps/npm/docs/output/commands/npm-find-dupes.html b/deps/npm/docs/output/commands/npm-find-dupes.html
index 9e57bd78df..0e3ee08560 100644
--- a/deps/npm/docs/output/commands/npm-find-dupes.html
+++ b/deps/npm/docs/output/commands/npm-find-dupes.html
@@ -210,9 +210,6 @@ this warning is treated as a failure.</p>
</ul>
<p>If set to false, then ignore <code>package-lock.json</code> files when installing. This
will also prevent <em>writing</em> <code>package-lock.json</code> if <code>save</code> is true.</p>
-<p>When package package-locks are disabled, automatic pruning of extraneous
-modules will also be disabled. To remove extraneous modules with
-package-locks disabled use <code>npm prune</code>.</p>
<p>This configuration does not affect <code>npm ci</code>.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
diff --git a/deps/npm/docs/output/commands/npm-install-test.html b/deps/npm/docs/output/commands/npm-install-test.html
index 9e3655c49f..6306ceb593 100644
--- a/deps/npm/docs/output/commands/npm-install-test.html
+++ b/deps/npm/docs/output/commands/npm-install-test.html
@@ -273,9 +273,6 @@ this warning is treated as a failure.</p>
</ul>
<p>If set to false, then ignore <code>package-lock.json</code> files when installing. This
will also prevent <em>writing</em> <code>package-lock.json</code> if <code>save</code> is true.</p>
-<p>When package package-locks are disabled, automatic pruning of extraneous
-modules will also be disabled. To remove extraneous modules with
-package-locks disabled use <code>npm prune</code>.</p>
<p>This configuration does not affect <code>npm ci</code>.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
diff --git a/deps/npm/docs/output/commands/npm-install.html b/deps/npm/docs/output/commands/npm-install.html
index de949e9493..509702b5bd 100644
--- a/deps/npm/docs/output/commands/npm-install.html
+++ b/deps/npm/docs/output/commands/npm-install.html
@@ -599,9 +599,6 @@ this warning is treated as a failure.</p>
</ul>
<p>If set to false, then ignore <code>package-lock.json</code> files when installing. This
will also prevent <em>writing</em> <code>package-lock.json</code> if <code>save</code> is true.</p>
-<p>When package package-locks are disabled, automatic pruning of extraneous
-modules will also be disabled. To remove extraneous modules with
-package-locks disabled use <code>npm prune</code>.</p>
<p>This configuration does not affect <code>npm ci</code>.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
diff --git a/deps/npm/docs/output/commands/npm-link.html b/deps/npm/docs/output/commands/npm-link.html
index 33a2f33b69..f7d5f66a9e 100644
--- a/deps/npm/docs/output/commands/npm-link.html
+++ b/deps/npm/docs/output/commands/npm-link.html
@@ -312,9 +312,6 @@ this warning is treated as a failure.</p>
</ul>
<p>If set to false, then ignore <code>package-lock.json</code> files when installing. This
will also prevent <em>writing</em> <code>package-lock.json</code> if <code>save</code> is true.</p>
-<p>When package package-locks are disabled, automatic pruning of extraneous
-modules will also be disabled. To remove extraneous modules with
-package-locks disabled use <code>npm prune</code>.</p>
<p>This configuration does not affect <code>npm ci</code>.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
diff --git a/deps/npm/docs/output/commands/npm-ls.html b/deps/npm/docs/output/commands/npm-ls.html
index 707324960a..4b44cbfbc3 100644
--- a/deps/npm/docs/output/commands/npm-ls.html
+++ b/deps/npm/docs/output/commands/npm-ls.html
@@ -166,7 +166,7 @@ tree at all, use <a href="../commands/npm-explain.html"><code>npm explain</code>
the results to only the paths to the packages named. Note that nested
packages will <em>also</em> show the paths to the specified packages. For
example, running <code>npm ls promzard</code> in npm's source tree will show:</p>
-<pre lang="bash"><code>npm@8.8.0 /path/to/npm
+<pre lang="bash"><code>npm@8.9.0 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
</code></pre>
diff --git a/deps/npm/docs/output/commands/npm-owner.html b/deps/npm/docs/output/commands/npm-owner.html
index b76967a18d..744f782140 100644
--- a/deps/npm/docs/output/commands/npm-owner.html
+++ b/deps/npm/docs/output/commands/npm-owner.html
@@ -142,7 +142,7 @@ npm command-line interface
<section id="table_of_contents">
<h2 id="table-of-contents">Table of contents</h2>
-<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#description">Description</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#registry"><code>registry</code></a></li><li><a href="#otp"><code>otp</code></a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
+<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#description">Description</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#registry"><code>registry</code></a></li><li><a href="#otp"><code>otp</code></a></li><li><a href="#workspace"><code>workspace</code></a></li><li><a href="#workspaces"><code>workspaces</code></a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
@@ -198,6 +198,45 @@ when publishing or changing package permissions with <code>npm access</code>.</p
password, npm will prompt on the command line for one.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
+<h4 id="workspace"><code>workspace</code></h4>
+<ul>
+<li>Default:</li>
+<li>Type: String (can be set multiple times)</li>
+</ul>
+<p>Enable running a command in the context of the configured workspaces of the
+current project while filtering by running only the workspaces defined by
+this configuration option.</p>
+<p>Valid values for the <code>workspace</code> config are either:</p>
+<ul>
+<li>Workspace names</li>
+<li>Path to a workspace directory</li>
+<li>Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)</li>
+</ul>
+<p>When set for the <code>npm init</code> command, this may be set to the folder of a
+workspace which does not yet exist, to create the folder and set it up as a
+brand new workspace within the project.</p>
+<p>This value is not exported to the environment for child processes.</p>
+<!-- raw HTML omitted -->
+<!-- raw HTML omitted -->
+<h4 id="workspaces"><code>workspaces</code></h4>
+<ul>
+<li>Default: null</li>
+<li>Type: null or Boolean</li>
+</ul>
+<p>Set to true to run the command in the context of <strong>all</strong> configured
+workspaces.</p>
+<p>Explicitly setting this to false will cause commands like <code>install</code> to
+ignore workspaces altogether. When not set explicitly:</p>
+<ul>
+<li>Commands that operate on the <code>node_modules</code> tree (install, update, etc.)
+will link workspaces into the <code>node_modules</code> folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+<em>unless</em> one or more workspaces are specified in the <code>workspace</code> config.</li>
+</ul>
+<p>This value is not exported to the environment for child processes.</p>
+<!-- raw HTML omitted -->
+<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="see-also">See Also</h3>
<ul>
diff --git a/deps/npm/docs/output/commands/npm-pkg.html b/deps/npm/docs/output/commands/npm-pkg.html
index 221afc4e59..95635ee602 100644
--- a/deps/npm/docs/output/commands/npm-pkg.html
+++ b/deps/npm/docs/output/commands/npm-pkg.html
@@ -192,6 +192,11 @@ an item in an array field. To just get the email address of the first
contributor in the list, you can run:</p>
<pre lang="bash"><code>npm pkg get contributors[0].email
</code></pre>
+<p>For complex fields you can also name a property in square brackets
+to specifically select a child field. This is especially helpful
+with the exports object:</p>
+<pre lang="bash"><code>npm pkg get "exports[.].require"
+</code></pre>
</li>
<li>
<p><code>npm pkg set &lt;field&gt;=&lt;value&gt;</code></p>
diff --git a/deps/npm/docs/output/commands/npm-update.html b/deps/npm/docs/output/commands/npm-update.html
index 2ada2dcb7c..d88ea8578b 100644
--- a/deps/npm/docs/output/commands/npm-update.html
+++ b/deps/npm/docs/output/commands/npm-update.html
@@ -352,9 +352,6 @@ this warning is treated as a failure.</p>
</ul>
<p>If set to false, then ignore <code>package-lock.json</code> files when installing. This
will also prevent <em>writing</em> <code>package-lock.json</code> if <code>save</code> is true.</p>
-<p>When package package-locks are disabled, automatic pruning of extraneous
-modules will also be disabled. To remove extraneous modules with
-package-locks disabled use <code>npm prune</code>.</p>
<p>This configuration does not affect <code>npm ci</code>.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
diff --git a/deps/npm/docs/output/commands/npm.html b/deps/npm/docs/output/commands/npm.html
index a48efdbe4f..947e5a7ee1 100644
--- a/deps/npm/docs/output/commands/npm.html
+++ b/deps/npm/docs/output/commands/npm.html
@@ -149,7 +149,7 @@ npm command-line interface
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="version">Version</h3>
-<p>8.8.0</p>
+<p>8.9.0</p>
<h3 id="description">Description</h3>
<p>npm is the package manager for the Node JavaScript platform. It puts
modules in place so that node can find them, and manages dependency
diff --git a/deps/npm/docs/output/using-npm/config.html b/deps/npm/docs/output/using-npm/config.html
index 57e6e21073..e1edc36500 100644
--- a/deps/npm/docs/output/using-npm/config.html
+++ b/deps/npm/docs/output/using-npm/config.html
@@ -1123,9 +1123,6 @@ password, npm will prompt on the command line for one.</p>
</ul>
<p>If set to false, then ignore <code>package-lock.json</code> files when installing. This
will also prevent <em>writing</em> <code>package-lock.json</code> if <code>save</code> is true.</p>
-<p>When package package-locks are disabled, automatic pruning of extraneous
-modules will also be disabled. To remove extraneous modules with
-package-locks disabled use <code>npm prune</code>.</p>
<p>This configuration does not affect <code>npm ci</code>.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
diff --git a/deps/npm/lib/commands/doctor.js b/deps/npm/lib/commands/doctor.js
index ca0438f1a2..f5bee1eb83 100644
--- a/deps/npm/lib/commands/doctor.js
+++ b/deps/npm/lib/commands/doctor.js
@@ -1,5 +1,4 @@
const cacache = require('cacache')
-const chalk = require('chalk')
const fs = require('fs')
const fetch = require('make-fetch-happen')
const table = require('text-table')
@@ -102,28 +101,19 @@ class Doctor extends BaseCommand {
messages.push(line)
}
- const outHead = ['Check', 'Value', 'Recommendation/Notes'].map(
- !this.npm.color ? h => h : h => chalk.underline(h)
- )
+ const outHead = ['Check', 'Value', 'Recommendation/Notes'].map(h => this.npm.chalk.underline(h))
let allOk = true
- const outBody = messages.map(
- !this.npm.color
- ? item => {
- allOk = allOk && item[1]
- item[1] = item[1] ? 'ok' : 'not ok'
- item[2] = String(item[2])
- return item
- }
- : item => {
- allOk = allOk && item[1]
- if (!item[1]) {
- item[0] = chalk.red(item[0])
- item[2] = chalk.magenta(String(item[2]))
- }
- item[1] = item[1] ? chalk.green('ok') : chalk.red('not ok')
- return item
- }
- )
+ const outBody = messages.map(item => {
+ if (!item[1]) {
+ allOk = false
+ item[0] = this.npm.chalk.red(item[0])
+ item[1] = this.npm.chalk.red('not ok')
+ item[2] = this.npm.chalk.magenta(String(item[2]))
+ } else {
+ item[1] = this.npm.chalk.green('ok')
+ }
+ return item
+ })
const outTable = [outHead, ...outBody]
const tableOpts = {
stringLength: s => ansiTrim(s).length,
diff --git a/deps/npm/lib/commands/exec.js b/deps/npm/lib/commands/exec.js
index f764cea528..d9a686cc9a 100644
--- a/deps/npm/lib/commands/exec.js
+++ b/deps/npm/lib/commands/exec.js
@@ -73,6 +73,9 @@ class Exec extends BaseCommand {
return libexec({
...flatOptions,
+ // we explicitly set packageLockOnly to false because if it's true
+ // when we try to install a missing package, we won't actually install it
+ packageLockOnly: false,
args,
call,
localBin,
diff --git a/deps/npm/lib/commands/owner.js b/deps/npm/lib/commands/owner.js
index 285b06be8e..9338b22a5e 100644
--- a/deps/npm/lib/commands/owner.js
+++ b/deps/npm/lib/commands/owner.js
@@ -22,6 +22,8 @@ class Owner extends BaseCommand {
static params = [
'registry',
'otp',
+ 'workspace',
+ 'workspaces',
]
static usage = [
@@ -69,22 +71,43 @@ class Owner extends BaseCommand {
}
async exec ([action, ...args]) {
- switch (action) {
- case 'ls':
- case 'list':
- return this.ls(args[0])
- case 'add':
- return this.changeOwners(args[0], args[1], 'add')
- case 'rm':
- case 'remove':
- return this.changeOwners(args[0], args[1], 'rm')
- default:
+ if (action === 'ls' || action === 'list') {
+ await this.ls(args[0])
+ } else if (action === 'add') {
+ await this.changeOwners(args[0], args[1], 'add')
+ } else if (action === 'rm' || action === 'remove') {
+ await this.changeOwners(args[0], args[1], 'rm')
+ } else {
+ throw this.usageError()
+ }
+ }
+
+ async execWorkspaces ([action, ...args], filters) {
+ await this.setWorkspaces(filters)
+ // ls pkg or owner add/rm package
+ if ((action === 'ls' && args.length > 0) || args.length > 1) {
+ const implicitWorkspaces = this.npm.config.get('workspace', 'default')
+ if (implicitWorkspaces.length === 0) {
+ log.warn(`Ignoring specified workspace(s)`)
+ }
+ return this.exec([action, ...args])
+ }
+
+ for (const [name] of this.workspaces) {
+ if (action === 'ls' || action === 'list') {
+ await this.ls(name)
+ } else if (action === 'add') {
+ await this.changeOwners(args[0], name, 'add')
+ } else if (action === 'rm' || action === 'remove') {
+ await this.changeOwners(args[0], name, 'rm')
+ } else {
throw this.usageError()
+ }
}
}
async ls (pkg) {
- pkg = await this.getPkg(pkg)
+ pkg = await this.getPkg(this.npm.prefix, pkg)
const spec = npa(pkg)
try {
@@ -101,12 +124,12 @@ class Owner extends BaseCommand {
}
}
- async getPkg (pkg) {
+ async getPkg (prefix, pkg) {
if (!pkg) {
if (this.npm.config.get('global')) {
throw this.usageError()
}
- const { name } = await readJson(resolve(this.npm.prefix, 'package.json'))
+ const { name } = await readJson(resolve(prefix, 'package.json'))
if (!name) {
throw this.usageError()
}
@@ -121,7 +144,7 @@ class Owner extends BaseCommand {
throw this.usageError()
}
- pkg = await this.getPkg(pkg)
+ pkg = await this.getPkg(this.npm.prefix, pkg)
log.verbose(`owner ${addOrRm}`, '%s to %s', user, pkg)
const spec = npa(pkg)
diff --git a/deps/npm/lib/commands/publish.js b/deps/npm/lib/commands/publish.js
index ff30366938..cbf0ccf4d6 100644
--- a/deps/npm/lib/commands/publish.js
+++ b/deps/npm/lib/commands/publish.js
@@ -7,7 +7,6 @@ const runScript = require('@npmcli/run-script')
const pacote = require('pacote')
const npa = require('npm-package-arg')
const npmFetch = require('npm-registry-fetch')
-const chalk = require('chalk')
const replaceInfo = require('../utils/replace-info.js')
const otplease = require('../utils/otplease.js')
@@ -151,8 +150,6 @@ class Publish extends BaseCommand {
const results = {}
const json = this.npm.config.get('json')
const { silent } = this.npm
- const noop = a => a
- const color = this.npm.color ? chalk : { green: noop, bold: noop }
await this.setWorkspaces(filters)
for (const [name, workspace] of this.workspaces.entries()) {
@@ -164,9 +161,9 @@ class Publish extends BaseCommand {
log.warn(
'publish',
`Skipping workspace ${
- color.green(name)
+ this.npm.chalk.green(name)
}, marked as ${
- color.bold('private')
+ this.npm.chalk.bold('private')
}`
)
continue
diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js
index c819a0807b..732362565e 100644
--- a/deps/npm/lib/npm.js
+++ b/deps/npm/lib/npm.js
@@ -1,16 +1,15 @@
const EventEmitter = require('events')
const { resolve, dirname, join } = require('path')
const Config = require('@npmcli/config')
+const chalk = require('chalk')
+const which = require('which')
+const fs = require('@npmcli/fs')
// Patch the global fs module here at the app level
require('graceful-fs').gracefulify(require('fs'))
const { definitions, flatten, shorthands } = require('./utils/config/index.js')
const usage = require('./utils/npm-usage.js')
-
-const which = require('which')
-const fs = require('@npmcli/fs')
-
const LogFile = require('./utils/log-file.js')
const Timers = require('./utils/timers.js')
const Display = require('./utils/display.js')
@@ -37,6 +36,7 @@ class Npm extends EventEmitter {
#tmpFolder = null
#title = 'npm'
#argvClean = []
+ #chalk = null
#logFile = new LogFile()
#display = new Display()
@@ -322,6 +322,17 @@ class Npm extends EventEmitter {
return this.flatOptions.color
}
+ get chalk () {
+ if (!this.#chalk) {
+ let level = chalk.level
+ if (!this.color) {
+ level = 0
+ }
+ this.#chalk = new chalk.Instance({ level })
+ }
+ return this.#chalk
+ }
+
get logColor () {
return this.flatOptions.logColor
}
diff --git a/deps/npm/lib/utils/config/definitions.js b/deps/npm/lib/utils/config/definitions.js
index 4a1f971d85..6f1b1a7244 100644
--- a/deps/npm/lib/utils/config/definitions.js
+++ b/deps/npm/lib/utils/config/definitions.js
@@ -1448,10 +1448,6 @@ define('package-lock', {
This will also prevent _writing_ \`package-lock.json\` if \`save\` is
true.
- When package package-locks are disabled, automatic pruning of extraneous
- modules will also be disabled. To remove extraneous modules with
- package-locks disabled use \`npm prune\`.
-
This configuration does not affect \`npm ci\`.
`,
flatten: (key, obj, flatOptions) => {
diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1
index 79ca419e53..66e859f6a2 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 2022" "" ""
+.TH "NPM\-ACCESS" "1" "May 2022" "" ""
.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 6e755bf90e..08a78c48e8 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 2022" "" ""
+.TH "NPM\-ADDUSER" "1" "May 2022" "" ""
.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 5954f069d9..d84fdd59e5 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 2022" "" ""
+.TH "NPM\-AUDIT" "1" "May 2022" "" ""
.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 b6229ecc46..efe38ee8d9 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 2022" "" ""
+.TH "NPM\-BIN" "1" "May 2022" "" ""
.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 d211456d50..f56c459c6d 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 2022" "" ""
+.TH "NPM\-BUGS" "1" "May 2022" "" ""
.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 a57d0343e0..1b5e5a8437 100644
--- a/deps/npm/man/man1/npm-cache.1
+++ b/deps/npm/man/man1/npm-cache.1
@@ -1,4 +1,4 @@
-.TH "NPM\-CACHE" "1" "April 2022" "" ""
+.TH "NPM\-CACHE" "1" "May 2022" "" ""
.SH "NAME"
\fBnpm-cache\fR \- Manipulates packages cache
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-ci.1 b/deps/npm/man/man1/npm-ci.1
index 0cfdc6cf07..3aefdfc80b 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 2022" "" ""
+.TH "NPM\-CI" "1" "May 2022" "" ""
.SH "NAME"
\fBnpm-ci\fR \- Install a project with a clean slate
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1
index 6b829353d4..87eb098ce9 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 2022" "" ""
+.TH "NPM\-COMPLETION" "1" "May 2022" "" ""
.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 4517877124..19f9ab6a06 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 2022" "" ""
+.TH "NPM\-CONFIG" "1" "May 2022" "" ""
.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 71c319f04a..c337c71501 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 2022" "" ""
+.TH "NPM\-DEDUPE" "1" "May 2022" "" ""
.SH "NAME"
\fBnpm-dedupe\fR \- Reduce duplication in the package tree
.SS Synopsis
@@ -141,10 +141,6 @@ Type: Boolean
If set to false, then ignore \fBpackage\-lock\.json\fP files when installing\. This
will also prevent \fIwriting\fR \fBpackage\-lock\.json\fP if \fBsave\fP is true\.
.P
-When package package\-locks are disabled, automatic pruning of extraneous
-modules will also be disabled\. To remove extraneous modules with
-package\-locks disabled use \fBnpm prune\fP\|\.
-.P
This configuration does not affect \fBnpm ci\fP\|\.
.SS \fBomit\fP
.RS 0
diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1
index bf7fcfe728..594b1689b7 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 2022" "" ""
+.TH "NPM\-DEPRECATE" "1" "May 2022" "" ""
.SH "NAME"
\fBnpm-deprecate\fR \- Deprecate a version of a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-diff.1 b/deps/npm/man/man1/npm-diff.1
index 6da0dd52e1..90bdfa9476 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 2022" "" ""
+.TH "NPM\-DIFF" "1" "May 2022" "" ""
.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 7130524d26..33166e1c45 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 2022" "" ""
+.TH "NPM\-DIST\-TAG" "1" "May 2022" "" ""
.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 62a633dff1..e7dc87e834 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 2022" "" ""
+.TH "NPM\-DOCS" "1" "May 2022" "" ""
.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 6a3b9b20fb..4c7dd20a9d 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 2022" "" ""
+.TH "NPM\-DOCTOR" "1" "May 2022" "" ""
.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 433e8f7b4a..d5e4fd9398 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 2022" "" ""
+.TH "NPM\-EDIT" "1" "May 2022" "" ""
.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 01db093870..1203e1427e 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 2022" "" ""
+.TH "NPM\-EXEC" "1" "May 2022" "" ""
.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 a8d343c1d1..29866d5c36 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 2022" "" ""
+.TH "NPM\-EXPLAIN" "1" "May 2022" "" ""
.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 cdb01df980..266248676d 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 2022" "" ""
+.TH "NPM\-EXPLORE" "1" "May 2022" "" ""
.SH "NAME"
\fBnpm-explore\fR \- Browse an installed package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-find-dupes.1 b/deps/npm/man/man1/npm-find-dupes.1
index d89bd9f390..4f1652d54b 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 2022" "" ""
+.TH "NPM\-FIND\-DUPES" "1" "May 2022" "" ""
.SH "NAME"
\fBnpm-find-dupes\fR \- Find duplication in the package tree
.SS Synopsis
@@ -75,10 +75,6 @@ Type: Boolean
If set to false, then ignore \fBpackage\-lock\.json\fP files when installing\. This
will also prevent \fIwriting\fR \fBpackage\-lock\.json\fP if \fBsave\fP is true\.
.P
-When package package\-locks are disabled, automatic pruning of extraneous
-modules will also be disabled\. To remove extraneous modules with
-package\-locks disabled use \fBnpm prune\fP\|\.
-.P
This configuration does not affect \fBnpm ci\fP\|\.
.SS \fBomit\fP
.RS 0
diff --git a/deps/npm/man/man1/npm-fund.1 b/deps/npm/man/man1/npm-fund.1
index d501652230..44d848357d 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 2022" "" ""
+.TH "NPM\-FUND" "1" "May 2022" "" ""
.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 73ac93576c..f4e9ec4c91 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 2022" "" ""
+.TH "NPM\-HELP\-SEARCH" "1" "May 2022" "" ""
.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 8af1b37e83..83cb8f92d0 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 2022" "" ""
+.TH "NPM\-HELP" "1" "May 2022" "" ""
.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 32d92b03bc..27b8888c8c 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 2022" "" ""
+.TH "NPM\-HOOK" "1" "May 2022" "" ""
.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 30d3890d21..829b1b4752 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 2022" "" ""
+.TH "NPM\-INIT" "1" "May 2022" "" ""
.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 3c253a0364..aeddd06d14 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 2022" "" ""
+.TH "NPM\-INSTALL\-CI\-TEST" "1" "May 2022" "" ""
.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 b28c8300e1..17aadace62 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 2022" "" ""
+.TH "NPM\-INSTALL\-TEST" "1" "May 2022" "" ""
.SH "NAME"
\fBnpm-install-test\fR \- Install package(s) and run tests
.SS Synopsis
@@ -155,10 +155,6 @@ Type: Boolean
If set to false, then ignore \fBpackage\-lock\.json\fP files when installing\. This
will also prevent \fIwriting\fR \fBpackage\-lock\.json\fP if \fBsave\fP is true\.
.P
-When package package\-locks are disabled, automatic pruning of extraneous
-modules will also be disabled\. To remove extraneous modules with
-package\-locks disabled use \fBnpm prune\fP\|\.
-.P
This configuration does not affect \fBnpm ci\fP\|\.
.SS \fBforeground\-scripts\fP
.RS 0
diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1
index 1f3bf51ada..7630adb0e2 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 2022" "" ""
+.TH "NPM\-INSTALL" "1" "May 2022" "" ""
.SH "NAME"
\fBnpm-install\fR \- Install a package
.SS Synopsis
@@ -566,10 +566,6 @@ Type: Boolean
If set to false, then ignore \fBpackage\-lock\.json\fP files when installing\. This
will also prevent \fIwriting\fR \fBpackage\-lock\.json\fP if \fBsave\fP is true\.
.P
-When package package\-locks are disabled, automatic pruning of extraneous
-modules will also be disabled\. To remove extraneous modules with
-package\-locks disabled use \fBnpm prune\fP\|\.
-.P
This configuration does not affect \fBnpm ci\fP\|\.
.SS \fBforeground\-scripts\fP
.RS 0
diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1
index d726e669dd..f59c746519 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 2022" "" ""
+.TH "NPM\-LINK" "1" "May 2022" "" ""
.SH "NAME"
\fBnpm-link\fR \- Symlink a package folder
.SS Synopsis
@@ -223,10 +223,6 @@ Type: Boolean
If set to false, then ignore \fBpackage\-lock\.json\fP files when installing\. This
will also prevent \fIwriting\fR \fBpackage\-lock\.json\fP if \fBsave\fP is true\.
.P
-When package package\-locks are disabled, automatic pruning of extraneous
-modules will also be disabled\. To remove extraneous modules with
-package\-locks disabled use \fBnpm prune\fP\|\.
-.P
This configuration does not affect \fBnpm ci\fP\|\.
.SS \fBomit\fP
.RS 0
diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1
index 01dd67cdc1..8307918100 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 2022" "" ""
+.TH "NPM\-LOGOUT" "1" "May 2022" "" ""
.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 6485cb3650..df207311c0 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 2022" "" ""
+.TH "NPM\-LS" "1" "May 2022" "" ""
.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@8\.8\.0 /path/to/npm
+npm@8\.9\.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 841a3b5d7a..28d623b204 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 2022" "" ""
+.TH "NPM\-ORG" "1" "May 2022" "" ""
.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 46921b5a8e..9fe1ddf692 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 2022" "" ""
+.TH "NPM\-OUTDATED" "1" "May 2022" "" ""
.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 d67b4cf339..09f488ed8e 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 2022" "" ""
+.TH "NPM\-OWNER" "1" "May 2022" "" ""
.SH "NAME"
\fBnpm-owner\fR \- Manage package owners
.SS Synopsis
@@ -62,6 +62,60 @@ when publishing or changing package permissions with \fBnpm access\fP\|\.
.P
If not set, and a registry response fails with a challenge for a one\-time
password, npm will prompt on the command line for one\.
+.SS \fBworkspace\fP
+.RS 0
+.IP \(bu 2
+Default:
+.IP \(bu 2
+Type: String (can be set multiple times)
+
+.RE
+.P
+Enable running a command in the context of the configured workspaces of the
+current project while filtering by running only the workspaces defined by
+this configuration option\.
+.P
+Valid values for the \fBworkspace\fP config are either:
+.RS 0
+.IP \(bu 2
+Workspace names
+.IP \(bu 2
+Path to a workspace directory
+.IP \(bu 2
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
+
+.RE
+.P
+When set for the \fBnpm init\fP command, this may be set to the folder of a
+workspace which does not yet exist, to create the folder and set it up as a
+brand new workspace within the project\.
+.P
+This value is not exported to the environment for child processes\.
+.SS \fBworkspaces\fP
+.RS 0
+.IP \(bu 2
+Default: null
+.IP \(bu 2
+Type: null or Boolean
+
+.RE
+.P
+Set to true to run the command in the context of \fBall\fR configured
+workspaces\.
+.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
+This value is not exported to the environment for child processes\.
.SS See Also
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1
index 3eabcc7987..94a0df9efc 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 2022" "" ""
+.TH "NPM\-PACK" "1" "May 2022" "" ""
.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 c564f5fdea..bf065b16f1 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 2022" "" ""
+.TH "NPM\-PING" "1" "May 2022" "" ""
.SH "NAME"
\fBnpm-ping\fR \- Ping npm registry
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-pkg.1 b/deps/npm/man/man1/npm-pkg.1
index 577e030d42..1307a6664b 100644
--- a/deps/npm/man/man1/npm-pkg.1
+++ b/deps/npm/man/man1/npm-pkg.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PKG" "1" "April 2022" "" ""
+.TH "NPM\-PKG" "1" "May 2022" "" ""
.SH "NAME"
\fBnpm-pkg\fR \- Manages your package\.json
.SS Synopsis
@@ -69,6 +69,15 @@ Returned values are always in \fBjson\fR format\.
npm pkg get contributors[0]\.email
.fi
.RE
+ For complex fields you can also name a property in square brackets
+ to specifically select a child field\. This is especially helpful
+ with the exports object:
+.P
+.RS 2
+.nf
+ npm pkg get "exports[\.]\.require"
+.fi
+.RE
.IP \(bu 2
\fBnpm pkg set <field>=<value>\fP
Sets a \fBvalue\fP in your \fBpackage\.json\fP based on the \fBfield\fP value\. When
diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1
index 356ad4e863..2434c34678 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 2022" "" ""
+.TH "NPM\-PREFIX" "1" "May 2022" "" ""
.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 d546955b8b..a7a1733b63 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 2022" "" ""
+.TH "NPM\-PROFILE" "1" "May 2022" "" ""
.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 a3d43f6455..a0d2379320 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 2022" "" ""
+.TH "NPM\-PRUNE" "1" "May 2022" "" ""
.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 4fabf6e368..241f7cffd2 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 2022" "" ""
+.TH "NPM\-PUBLISH" "1" "May 2022" "" ""
.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 bd5a47263f..dab000878d 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 2022" "" ""
+.TH "NPM\-REBUILD" "1" "May 2022" "" ""
.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 0b298e8296..7fd6c738c9 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 2022" "" ""
+.TH "NPM\-REPO" "1" "May 2022" "" ""
.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 5ce2cc44c4..9866fa5792 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 2022" "" ""
+.TH "NPM\-RESTART" "1" "May 2022" "" ""
.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 dcc8c34de6..4e1a94be7b 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 2022" "" ""
+.TH "NPM\-ROOT" "1" "May 2022" "" ""
.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 edf0561cec..b9e2afb269 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 2022" "" ""
+.TH "NPM\-RUN\-SCRIPT" "1" "May 2022" "" ""
.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 ae56a5687e..51fa43b80e 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 2022" "" ""
+.TH "NPM\-SEARCH" "1" "May 2022" "" ""
.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 e82c766a83..96ee6e3e34 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 2022" "" ""
+.TH "NPM\-SET\-SCRIPT" "1" "May 2022" "" ""
.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 bd17cbf009..fa87fb7e72 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 2022" "" ""
+.TH "NPM\-SHRINKWRAP" "1" "May 2022" "" ""
.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 0bae2d1c1c..6075139da7 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 2022" "" ""
+.TH "NPM\-STAR" "1" "May 2022" "" ""
.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 65ed2aff68..aa290760aa 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 2022" "" ""
+.TH "NPM\-STARS" "1" "May 2022" "" ""
.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 4f2044a543..f45e4a2a24 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 2022" "" ""
+.TH "NPM\-START" "1" "May 2022" "" ""
.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 487837323a..a7bb25b3a4 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 2022" "" ""
+.TH "NPM\-STOP" "1" "May 2022" "" ""
.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 31a27eaaf7..05f508427a 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 2022" "" ""
+.TH "NPM\-TEAM" "1" "May 2022" "" ""
.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 b2e4dd13f0..590d9519df 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 2022" "" ""
+.TH "NPM\-TEST" "1" "May 2022" "" ""
.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 b95b41974f..f2e32ea27f 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 2022" "" ""
+.TH "NPM\-TOKEN" "1" "May 2022" "" ""
.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 387a037ca4..d918034ba1 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 2022" "" ""
+.TH "NPM\-UNINSTALL" "1" "May 2022" "" ""
.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 7303db9137..2019842279 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 2022" "" ""
+.TH "NPM\-UNPUBLISH" "1" "May 2022" "" ""
.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 ed84041591..1fa7b88c64 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 2022" "" ""
+.TH "NPM\-UNSTAR" "1" "May 2022" "" ""
.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 e681d6a554..fa2903a18c 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 2022" "" ""
+.TH "NPM\-UPDATE" "1" "May 2022" "" ""
.SH "NAME"
\fBnpm-update\fR \- Update packages
.SS Synopsis
@@ -279,10 +279,6 @@ Type: Boolean
If set to false, then ignore \fBpackage\-lock\.json\fP files when installing\. This
will also prevent \fIwriting\fR \fBpackage\-lock\.json\fP if \fBsave\fP is true\.
.P
-When package package\-locks are disabled, automatic pruning of extraneous
-modules will also be disabled\. To remove extraneous modules with
-package\-locks disabled use \fBnpm prune\fP\|\.
-.P
This configuration does not affect \fBnpm ci\fP\|\.
.SS \fBforeground\-scripts\fP
.RS 0
diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1
index 8d24aed527..444c070975 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 2022" "" ""
+.TH "NPM\-VERSION" "1" "May 2022" "" ""
.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 877d8a8aa3..b77c770566 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 2022" "" ""
+.TH "NPM\-VIEW" "1" "May 2022" "" ""
.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 607d1a55c5..d79c448a7a 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 2022" "" ""
+.TH "NPM\-WHOAMI" "1" "May 2022" "" ""
.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 3147db3ad7..cbfc8e8ec6 100644
--- a/deps/npm/man/man1/npm.1
+++ b/deps/npm/man/man1/npm.1
@@ -1,10 +1,10 @@
-.TH "NPM" "1" "April 2022" "" ""
+.TH "NPM" "1" "May 2022" "" ""
.SH "NAME"
\fBnpm\fR \- javascript package manager
.SS Synopsis
.SS Version
.P
-8\.8\.0
+8\.9\.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 c1230a9492..51634bc8e8 100644
--- a/deps/npm/man/man1/npx.1
+++ b/deps/npm/man/man1/npx.1
@@ -1,4 +1,4 @@
-.TH "NPX" "1" "April 2022" "" ""
+.TH "NPX" "1" "May 2022" "" ""
.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 10e161c679..74403f97bf 100644
--- a/deps/npm/man/man5/folders.5
+++ b/deps/npm/man/man5/folders.5
@@ -1,4 +1,4 @@
-.TH "FOLDERS" "5" "April 2022" "" ""
+.TH "FOLDERS" "5" "May 2022" "" ""
.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 ccccf3a696..40d8a825c9 100644
--- a/deps/npm/man/man5/install.5
+++ b/deps/npm/man/man5/install.5
@@ -1,4 +1,4 @@
-.TH "INSTALL" "5" "April 2022" "" ""
+.TH "INSTALL" "5" "May 2022" "" ""
.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 dcc5cca516..2928a9bae6 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 2022" "" ""
+.TH "NPM\-SHRINKWRAP\.JSON" "5" "May 2022" "" ""
.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 0e3e8edefa..429bcc3875 100644
--- a/deps/npm/man/man5/npmrc.5
+++ b/deps/npm/man/man5/npmrc.5
@@ -1,4 +1,4 @@
-.TH "NPMRC" "5" "April 2022" "" ""
+.TH "NPMRC" "5" "May 2022" "" ""
.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 b799144aaa..4715650974 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 2022" "" ""
+.TH "PACKAGE\.JSON" "5" "May 2022" "" ""
.SH "NAME"
\fBpackage.json\fR \- Specifics of npm's package\.json handling
.SS Description
diff --git a/deps/npm/man/man5/package-lock-json.5 b/deps/npm/man/man5/package-lock-json.5
index dd0d17b88c..569d9c5ae6 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 2022" "" ""
+.TH "PACKAGE\-LOCK\.JSON" "5" "May 2022" "" ""
.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 3bb501bcda..eee1ac6c5f 100644
--- a/deps/npm/man/man7/config.7
+++ b/deps/npm/man/man7/config.7
@@ -1,4 +1,4 @@
-.TH "CONFIG" "7" "April 2022" "" ""
+.TH "CONFIG" "7" "May 2022" "" ""
.SH "NAME"
\fBconfig\fR \- More than you probably want to know about npm configuration
.SS Description
@@ -1284,10 +1284,6 @@ Type: Boolean
If set to false, then ignore \fBpackage\-lock\.json\fP files when installing\. This
will also prevent \fIwriting\fR \fBpackage\-lock\.json\fP if \fBsave\fP is true\.
.P
-When package package\-locks are disabled, automatic pruning of extraneous
-modules will also be disabled\. To remove extraneous modules with
-package\-locks disabled use \fBnpm prune\fP\|\.
-.P
This configuration does not affect \fBnpm ci\fP\|\.
.SS \fBpackage\-lock\-only\fP
.RS 0
diff --git a/deps/npm/man/man7/developers.7 b/deps/npm/man/man7/developers.7
index 7b50a0dc6c..12e9b535fc 100644
--- a/deps/npm/man/man7/developers.7
+++ b/deps/npm/man/man7/developers.7
@@ -1,4 +1,4 @@
-.TH "DEVELOPERS" "7" "April 2022" "" ""
+.TH "DEVELOPERS" "7" "May 2022" "" ""
.SH "NAME"
\fBdevelopers\fR \- Developer Guide
.SS Description
diff --git a/deps/npm/man/man7/logging.7 b/deps/npm/man/man7/logging.7
index 41634c61a6..ea0a7a8f18 100644
--- a/deps/npm/man/man7/logging.7
+++ b/deps/npm/man/man7/logging.7
@@ -1,4 +1,4 @@
-.TH "LOGGING" "7" "April 2022" "" ""
+.TH "LOGGING" "7" "May 2022" "" ""
.SH "NAME"
\fBLogging\fR \- Why, What & How We Log
.SS Description
diff --git a/deps/npm/man/man7/orgs.7 b/deps/npm/man/man7/orgs.7
index 0df9267749..84c949949d 100644
--- a/deps/npm/man/man7/orgs.7
+++ b/deps/npm/man/man7/orgs.7
@@ -1,4 +1,4 @@
-.TH "ORGS" "7" "April 2022" "" ""
+.TH "ORGS" "7" "May 2022" "" ""
.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 dcdb33934b..eff3f31ab6 100644
--- a/deps/npm/man/man7/registry.7
+++ b/deps/npm/man/man7/registry.7
@@ -1,4 +1,4 @@
-.TH "REGISTRY" "7" "April 2022" "" ""
+.TH "REGISTRY" "7" "May 2022" "" ""
.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 5743d339ec..27bb1de4c9 100644
--- a/deps/npm/man/man7/removal.7
+++ b/deps/npm/man/man7/removal.7
@@ -1,4 +1,4 @@
-.TH "REMOVAL" "7" "April 2022" "" ""
+.TH "REMOVAL" "7" "May 2022" "" ""
.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 0fd24d0fcb..5d4f0e7270 100644
--- a/deps/npm/man/man7/scope.7
+++ b/deps/npm/man/man7/scope.7
@@ -1,4 +1,4 @@
-.TH "SCOPE" "7" "April 2022" "" ""
+.TH "SCOPE" "7" "May 2022" "" ""
.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 9cedf62bc8..2ced12c63d 100644
--- a/deps/npm/man/man7/scripts.7
+++ b/deps/npm/man/man7/scripts.7
@@ -1,4 +1,4 @@
-.TH "SCRIPTS" "7" "April 2022" "" ""
+.TH "SCRIPTS" "7" "May 2022" "" ""
.SH "NAME"
\fBscripts\fR \- How npm handles the "scripts" field
.SS Description
diff --git a/deps/npm/man/man7/workspaces.7 b/deps/npm/man/man7/workspaces.7
index b5d6b3bde3..494b406862 100644
--- a/deps/npm/man/man7/workspaces.7
+++ b/deps/npm/man/man7/workspaces.7
@@ -1,4 +1,4 @@
-.TH "WORKSPACES" "7" "April 2022" "" ""
+.TH "WORKSPACES" "7" "May 2022" "" ""
.SH "NAME"
\fBworkspaces\fR \- Working with workspaces
.SS Description
diff --git a/deps/npm/node_modules/cacache/lib/content/read.js b/deps/npm/node_modules/cacache/lib/content/read.js
index 8bffb2af83..0aeb454725 100644
--- a/deps/npm/node_modules/cacache/lib/content/read.js
+++ b/deps/npm/node_modules/cacache/lib/content/read.js
@@ -10,6 +10,7 @@ const Pipeline = require('minipass-pipeline')
const lstat = util.promisify(fs.lstat)
const readFile = util.promisify(fs.readFile)
+const copyFile = util.promisify(fs.copyFile)
module.exports = read
@@ -90,12 +91,8 @@ function readStream (cache, integrity, opts = {}) {
return stream
}
-let copyFile
-if (fs.copyFile) {
- module.exports.copy = copy
- module.exports.copy.sync = copySync
- copyFile = util.promisify(fs.copyFile)
-}
+module.exports.copy = copy
+module.exports.copy.sync = copySync
function copy (cache, integrity, dest) {
return withContentSri(cache, integrity, (cpath, sri) => {
diff --git a/deps/npm/node_modules/cacache/lib/content/write.js b/deps/npm/node_modules/cacache/lib/content/write.js
index a71e81ad5e..b0aa18c12b 100644
--- a/deps/npm/node_modules/cacache/lib/content/write.js
+++ b/deps/npm/node_modules/cacache/lib/content/write.js
@@ -13,34 +13,37 @@ const path = require('path')
const rimraf = util.promisify(require('rimraf'))
const ssri = require('ssri')
const uniqueFilename = require('unique-filename')
-const { disposer } = require('./../util/disposer')
const fsm = require('fs-minipass')
const writeFile = util.promisify(fs.writeFile)
module.exports = write
-function write (cache, data, opts = {}) {
+async function write (cache, data, opts = {}) {
const { algorithms, size, integrity } = opts
if (algorithms && algorithms.length > 1) {
throw new Error('opts.algorithms only supports a single algorithm for now')
}
if (typeof size === 'number' && data.length !== size) {
- return Promise.reject(sizeError(size, data.length))
+ throw sizeError(size, data.length)
}
const sri = ssri.fromData(data, algorithms ? { algorithms } : {})
if (integrity && !ssri.checkData(data, integrity, opts)) {
- return Promise.reject(checksumError(integrity, sri))
+ throw checksumError(integrity, sri)
}
- return disposer(makeTmp(cache, opts), makeTmpDisposer,
- (tmp) => {
- return writeFile(tmp.target, data, { flag: 'wx' })
- .then(() => moveToDestination(tmp, cache, sri, opts))
- })
- .then(() => ({ integrity: sri, size: data.length }))
+ const tmp = await makeTmp(cache, opts)
+ try {
+ await writeFile(tmp.target, data, { flag: 'wx' })
+ await moveToDestination(tmp, cache, sri, opts)
+ return { integrity: sri, size: data.length }
+ } finally {
+ if (!tmp.moved) {
+ await rimraf(tmp.target)
+ }
+ }
}
module.exports.stream = writeStream
@@ -94,18 +97,22 @@ function writeStream (cache, opts = {}) {
return new CacacheWriteStream(cache, opts)
}
-function handleContent (inputStream, cache, opts) {
- return disposer(makeTmp(cache, opts), makeTmpDisposer, (tmp) => {
- return pipeToTmp(inputStream, cache, tmp.target, opts)
- .then((res) => {
- return moveToDestination(
- tmp,
- cache,
- res.integrity,
- opts
- ).then(() => res)
- })
- })
+async function handleContent (inputStream, cache, opts) {
+ const tmp = await makeTmp(cache, opts)
+ try {
+ const res = await pipeToTmp(inputStream, cache, tmp.target, opts)
+ await moveToDestination(
+ tmp,
+ cache,
+ res.integrity,
+ opts
+ )
+ return res
+ } finally {
+ if (!tmp.moved) {
+ await rimraf(tmp.target)
+ }
+ }
}
function pipeToTmp (inputStream, cache, tmpTarget, opts) {
@@ -136,11 +143,7 @@ function pipeToTmp (inputStream, cache, tmpTarget, opts) {
outStream
)
- return pipeline.promise()
- .then(() => ({ integrity, size }))
- .catch(er => rimraf(tmpTarget).then(() => {
- throw er
- }))
+ return pipeline.promise().then(() => ({ integrity, size }))
}
function makeTmp (cache, opts) {
@@ -151,14 +154,6 @@ function makeTmp (cache, opts) {
}))
}
-function makeTmpDisposer (tmp) {
- if (tmp.moved) {
- return Promise.resolve()
- }
-
- return rimraf(tmp.target)
-}
-
function moveToDestination (tmp, cache, sri, opts) {
const destination = contentPath(cache, sri)
const destDir = path.dirname(destination)
diff --git a/deps/npm/node_modules/cacache/lib/entry-index.js b/deps/npm/node_modules/cacache/lib/entry-index.js
index 426778b850..9d4485624a 100644
--- a/deps/npm/node_modules/cacache/lib/entry-index.js
+++ b/deps/npm/node_modules/cacache/lib/entry-index.js
@@ -8,7 +8,6 @@ const path = require('path')
const ssri = require('ssri')
const uniqueFilename = require('unique-filename')
-const { disposer } = require('./util/disposer')
const contentPath = require('./content/path')
const fixOwner = require('./util/fix-owner')
const hashToSegments = require('./util/hash-to-segments')
@@ -102,7 +101,12 @@ async function compact (cache, key, matchFn, opts = {}) {
}
// write the file atomically
- await disposer(setup(), teardown, write)
+ const tmp = await setup()
+ try {
+ await write(tmp)
+ } finally {
+ await teardown(tmp)
+ }
// we reverse the list we generated such that the newest
// entries come first in order to make looping through them easier
diff --git a/deps/npm/node_modules/cacache/lib/get.js b/deps/npm/node_modules/cacache/lib/get.js
index d9d4bf4c64..58f357b1da 100644
--- a/deps/npm/node_modules/cacache/lib/get.js
+++ b/deps/npm/node_modules/cacache/lib/get.js
@@ -3,15 +3,11 @@
const Collect = require('minipass-collect')
const Minipass = require('minipass')
const Pipeline = require('minipass-pipeline')
-const fs = require('fs')
-const util = require('util')
const index = require('./entry-index')
const memo = require('./memoization')
const read = require('./content/read')
-const writeFile = util.promisify(fs.writeFile)
-
function getData (cache, key, opts = {}) {
const { integrity, memoize, size } = opts
const memoized = memo.get(cache, key, opts)
@@ -209,42 +205,25 @@ function info (cache, key, opts = {}) {
module.exports.info = info
function copy (cache, key, dest, opts = {}) {
- if (read.copy) {
- return index.find(cache, key, opts).then((entry) => {
- if (!entry) {
- throw new index.NotFoundError(cache, key)
- }
- return read.copy(cache, entry.integrity, dest, opts)
- .then(() => {
- return {
- metadata: entry.metadata,
- size: entry.size,
- integrity: entry.integrity,
- }
- })
- })
- }
-
- return getData(cache, key, opts).then((res) => {
- return writeFile(dest, res.data).then(() => {
- return {
- metadata: res.metadata,
- size: res.size,
- integrity: res.integrity,
- }
- })
+ return index.find(cache, key, opts).then((entry) => {
+ if (!entry) {
+ throw new index.NotFoundError(cache, key)
+ }
+ return read.copy(cache, entry.integrity, dest, opts)
+ .then(() => {
+ return {
+ metadata: entry.metadata,
+ size: entry.size,
+ integrity: entry.integrity,
+ }
+ })
})
}
+
module.exports.copy = copy
function copyByDigest (cache, key, dest, opts = {}) {
- if (read.copy) {
- return read.copy(cache, key, dest, opts).then(() => key)
- }
-
- return getDataByDigest(cache, key, opts).then((res) => {
- return writeFile(dest, res).then(() => key)
- })
+ return read.copy(cache, key, dest, opts).then(() => key)
}
module.exports.copy.byDigest = copyByDigest
diff --git a/deps/npm/node_modules/cacache/lib/put.js b/deps/npm/node_modules/cacache/lib/put.js
index d6904fa301..eed51874f9 100644
--- a/deps/npm/node_modules/cacache/lib/put.js
+++ b/deps/npm/node_modules/cacache/lib/put.js
@@ -37,6 +37,7 @@ function putStream (cache, key, opts = {}) {
opts = putOpts(opts)
let integrity
let size
+ let error
let memoData
const pipeline = new Pipeline()
@@ -58,6 +59,9 @@ function putStream (cache, key, opts = {}) {
.on('size', (s) => {
size = s
})
+ .on('error', (err) => {
+ error = err
+ })
pipeline.push(contentStream)
@@ -65,21 +69,17 @@ function putStream (cache, key, opts = {}) {
// and memoize if we're doing that
pipeline.push(new Flush({
flush () {
- return index
- .insert(cache, key, integrity, { ...opts, size })
- .then((entry) => {
- if (memoize && memoData) {
- memo.put(cache, entry, memoData, opts)
- }
-
- if (integrity) {
+ if (!error) {
+ return index
+ .insert(cache, key, integrity, { ...opts, size })
+ .then((entry) => {
+ if (memoize && memoData) {
+ memo.put(cache, entry, memoData, opts)
+ }
pipeline.emit('integrity', integrity)
- }
-
- if (size) {
pipeline.emit('size', size)
- }
- })
+ })
+ }
},
}))
diff --git a/deps/npm/node_modules/cacache/lib/util/disposer.js b/deps/npm/node_modules/cacache/lib/util/disposer.js
deleted file mode 100644
index 52d7d3edda..0000000000
--- a/deps/npm/node_modules/cacache/lib/util/disposer.js
+++ /dev/null
@@ -1,31 +0,0 @@
-'use strict'
-
-module.exports.disposer = disposer
-
-function disposer (creatorFn, disposerFn, fn) {
- const runDisposer = (resource, result, shouldThrow = false) => {
- return disposerFn(resource)
- .then(
- // disposer resolved, do something with original fn's promise
- () => {
- if (shouldThrow) {
- throw result
- }
-
- return result
- },
- // Disposer fn failed, crash process
- (err) => {
- throw err
- // Or process.exit?
- })
- }
-
- return creatorFn
- .then((resource) => {
- // fn(resource) can throw, so wrap in a promise here
- return Promise.resolve().then(() => fn(resource))
- .then((result) => runDisposer(resource, result))
- .catch((err) => runDisposer(resource, err, true))
- })
-}
diff --git a/deps/npm/node_modules/cacache/package.json b/deps/npm/node_modules/cacache/package.json
index 9eb646df76..cd7e4de5e0 100644
--- a/deps/npm/node_modules/cacache/package.json
+++ b/deps/npm/node_modules/cacache/package.json
@@ -1,6 +1,6 @@
{
"name": "cacache",
- "version": "16.0.6",
+ "version": "16.0.7",
"cache-version": {
"content": "2",
"index": "5"
@@ -12,7 +12,6 @@
"lib/"
],
"scripts": {
- "benchmarks": "node test/benchmarks",
"preversion": "npm test",
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags",
@@ -71,10 +70,6 @@
"devDependencies": {
"@npmcli/eslint-config": "^3.0.1",
"@npmcli/template-oss": "3.4.1",
- "benchmark": "^2.1.4",
- "chalk": "^4.1.2",
- "require-inject": "^1.4.4",
- "tacks": "^1.3.0",
"tap": "^16.0.0"
},
"tap": {
diff --git a/deps/npm/node_modules/pacote/lib/fetcher.js b/deps/npm/node_modules/pacote/lib/fetcher.js
index 65e97e2052..d88724c5d1 100644
--- a/deps/npm/node_modules/pacote/lib/fetcher.js
+++ b/deps/npm/node_modules/pacote/lib/fetcher.js
@@ -105,8 +105,15 @@ class FetcherBase {
this[_readPackageJson] = readPackageJsonFast
}
- // config values: npmjs (default), never
- this.replaceRegistryHost = opts.replaceRegistryHost === 'never' ? 'never' : 'npmjs'
+ // config values: npmjs (default), never, always
+ // we don't want to mutate the original value
+ if (opts.replaceRegistryHost !== 'never'
+ && opts.replaceRegistryHost !== 'always'
+ ) {
+ this.replaceRegistryHost = 'npmjs'
+ } else {
+ this.replaceRegistryHost = opts.replaceRegistryHost
+ }
this.defaultTag = opts.defaultTag || 'latest'
this.registry = removeTrailingSlashes(opts.registry || 'https://registry.npmjs.org')
diff --git a/deps/npm/node_modules/pacote/lib/registry.js b/deps/npm/node_modules/pacote/lib/registry.js
index b4f890d310..e8ca16f596 100644
--- a/deps/npm/node_modules/pacote/lib/registry.js
+++ b/deps/npm/node_modules/pacote/lib/registry.js
@@ -165,6 +165,9 @@ class RegistryFetcher extends Fetcher {
}
if (this.integrity) {
mani._integrity = String(this.integrity)
+ if (dist.signatures) {
+ mani._signatures = dist.signatures
+ }
}
this.package = rpj.normalize(mani)
return this.package
diff --git a/deps/npm/node_modules/pacote/lib/remote.js b/deps/npm/node_modules/pacote/lib/remote.js
index 3404ea9474..14e687805d 100644
--- a/deps/npm/node_modules/pacote/lib/remote.js
+++ b/deps/npm/node_modules/pacote/lib/remote.js
@@ -5,7 +5,7 @@ const pacoteVersion = require('../package.json').version
const fetch = require('npm-registry-fetch')
const Minipass = require('minipass')
// The default registry URL is a string of great magic.
-const magic = /^https?:\/\/registry\.npmjs\.org\//
+const magicHost = 'https://registry.npmjs.org'
const _cacheFetches = Symbol.for('pacote.Fetcher._cacheFetches')
const _headers = Symbol('_headers')
@@ -13,10 +13,13 @@ class RemoteFetcher extends Fetcher {
constructor (spec, opts) {
super(spec, opts)
this.resolved = this.spec.fetchSpec
- if (this.replaceRegistryHost === 'npmjs'
- && magic.test(this.resolved)
- && !magic.test(this.registry + '/')) {
- this.resolved = this.resolved.replace(magic, this.registry + '/')
+ const resolvedURL = new URL(this.resolved)
+ if (
+ (this.replaceRegistryHost === 'npmjs'
+ && resolvedURL.origin === magicHost)
+ || this.replaceRegistryHost === 'always'
+ ) {
+ this.resolved = new URL(resolvedURL.pathname, this.registry).href
}
// nam is a fermented pork sausage that is good to eat
diff --git a/deps/npm/node_modules/pacote/package.json b/deps/npm/node_modules/pacote/package.json
index af8166d4ea..2f4323c441 100644
--- a/deps/npm/node_modules/pacote/package.json
+++ b/deps/npm/node_modules/pacote/package.json
@@ -1,6 +1,6 @@
{
"name": "pacote",
- "version": "13.1.1",
+ "version": "13.3.0",
"description": "JavaScript package downloader",
"author": "GitHub Inc.",
"bin": {
@@ -26,11 +26,11 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^3.0.1",
- "@npmcli/template-oss": "3.2.2",
+ "@npmcli/template-oss": "3.4.3",
"hosted-git-info": "^5.0.0",
"mutate-fs": "^2.1.1",
"nock": "^13.2.4",
- "npm-registry-mock": "^1.3.1",
+ "npm-registry-mock": "^1.3.2",
"tap": "^16.0.1"
},
"files": [
@@ -74,7 +74,7 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
- "version": "3.2.2",
+ "version": "3.4.3",
"windowsCI": false
}
}
diff --git a/deps/npm/package.json b/deps/npm/package.json
index e1f6832193..d3e55ad623 100644
--- a/deps/npm/package.json
+++ b/deps/npm/package.json
@@ -1,5 +1,5 @@
{
- "version": "8.8.0",
+ "version": "8.9.0",
"name": "npm",
"description": "a package manager for JavaScript",
"workspaces": [
@@ -65,7 +65,7 @@
"@npmcli/run-script": "^3.0.1",
"abbrev": "~1.1.1",
"archy": "~1.0.0",
- "cacache": "^16.0.6",
+ "cacache": "^16.0.7",
"chalk": "^4.1.2",
"chownr": "^2.0.0",
"cli-columns": "^4.0.0",
@@ -107,7 +107,7 @@
"npm-user-validate": "^1.0.1",
"npmlog": "^6.0.2",
"opener": "^1.5.2",
- "pacote": "^13.1.1",
+ "pacote": "^13.3.0",
"parse-conflict-json": "^2.0.2",
"proc-log": "^2.0.1",
"qrcode-terminal": "^0.12.0",
@@ -213,7 +213,7 @@
"test": "tap",
"test-all": "npm run test --if-present --workspaces --include-workspace-root",
"snap": "tap",
- "postsnap": "make -s mandocs",
+ "postsnap": "make -s docs",
"test:nocleanup": "NO_TEST_CLEANUP=1 npm run test --",
"sudotest": "sudo npm run test --",
"sudotest:nocleanup": "sudo NO_TEST_CLEANUP=1 npm run test --",
diff --git a/deps/npm/tap-snapshots/test/lib/load-all-commands.js.test.cjs b/deps/npm/tap-snapshots/test/lib/load-all-commands.js.test.cjs
index 37349cbe01..eccb06580d 100644
--- a/deps/npm/tap-snapshots/test/lib/load-all-commands.js.test.cjs
+++ b/deps/npm/tap-snapshots/test/lib/load-all-commands.js.test.cjs
@@ -596,6 +596,8 @@ npm owner ls [<@scope>/]<pkg>
Options:
[--registry <registry>] [--otp <otp>]
+[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
+[-ws|--workspaces]
alias: author
diff --git a/deps/npm/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs b/deps/npm/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs
index ff00f9a0f9..42db6ce030 100644
--- a/deps/npm/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs
+++ b/deps/npm/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs
@@ -1302,10 +1302,6 @@ exports[`test/lib/utils/config/definitions.js TAP > config description for packa
If set to false, then ignore \`package-lock.json\` files when installing. This
will also prevent _writing_ \`package-lock.json\` if \`save\` is true.
-When package package-locks are disabled, automatic pruning of extraneous
-modules will also be disabled. To remove extraneous modules with
-package-locks disabled use \`npm prune\`.
-
This configuration does not affect \`npm ci\`.
`
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 6740b94c77..d0ce3a26f7 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
@@ -1093,10 +1093,6 @@ The package to install for [\`npm exec\`](/commands/npm-exec)
If set to false, then ignore \`package-lock.json\` files when installing. This
will also prevent _writing_ \`package-lock.json\` if \`save\` is true.
-When package package-locks are disabled, automatic pruning of extraneous
-modules will also be disabled. To remove extraneous modules with
-package-locks disabled use \`npm prune\`.
-
This configuration does not affect \`npm ci\`.
<!-- automatically generated, do not edit manually -->
diff --git a/deps/npm/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs b/deps/npm/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs
index 941def42ee..bbb3563405 100644
--- a/deps/npm/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs
+++ b/deps/npm/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs
@@ -664,6 +664,8 @@ All commands:
Options:
[--registry <registry>] [--otp <otp>]
+ [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
+ [-ws|--workspaces]
alias: author
diff --git a/deps/npm/test/coverage-map.js b/deps/npm/test/coverage-map.js
index 0ea9098186..9a289b6489 100644
--- a/deps/npm/test/coverage-map.js
+++ b/deps/npm/test/coverage-map.js
@@ -12,6 +12,7 @@ const coverageMap = (filename) => {
if (/^test\/lib\/commands/.test(filename) || filename === 'test/lib/npm.js') {
return [
filename.replace(/^test\//, ''),
+ 'lib/npm.js',
'lib/base-command.js',
'lib/exec/get-workspace-location-msg.js',
]
diff --git a/deps/npm/test/fixtures/mock-npm.js b/deps/npm/test/fixtures/mock-npm.js
index 4263dc8fbe..c9701ebc23 100644
--- a/deps/npm/test/fixtures/mock-npm.js
+++ b/deps/npm/test/fixtures/mock-npm.js
@@ -132,7 +132,9 @@ const LoadMockNpm = async (t, {
})
const npm = init ? new Npm() : null
- t.teardown(() => npm && npm.unload())
+ t.teardown(() => {
+ npm && npm.unload()
+ })
if (load) {
await npm.load()
diff --git a/deps/npm/test/lib/commands/exec.js b/deps/npm/test/lib/commands/exec.js
index d6e598d568..1117885b91 100644
--- a/deps/npm/test/lib/commands/exec.js
+++ b/deps/npm/test/lib/commands/exec.js
@@ -385,6 +385,64 @@ t.test('npm exec foo, not present locally or in central loc', async t => {
])
})
+t.test('npm exec foo, packageLockOnly set to true', async t => {
+ const path = t.testdir()
+ const installDir = resolve('npx-cache-dir/f7fbba6e0636f890')
+ npm.localPrefix = path
+ npm.config.set('package-lock-only', true)
+ t.teardown(() => {
+ npm.config.set('package-lock-only', false)
+ })
+
+ ARB_ACTUAL_TREE[path] = {
+ inventory: {
+ query () {
+ return new Set()
+ },
+ },
+ }
+ ARB_ACTUAL_TREE[installDir] = {
+ inventory: {
+ query () {
+ return new Set()
+ },
+ },
+ }
+ MANIFESTS.foo = {
+ name: 'foo',
+ version: '1.2.3',
+ bin: {
+ foo: 'foo',
+ },
+ _from: 'foo@',
+ }
+ await exec.exec(['foo', 'one arg', 'two arg'])
+ t.strictSame(MKDIRPS, [installDir], 'need to make install dir')
+ t.match(ARB_CTOR, [{
+ path,
+ packageLockOnly: false,
+ }])
+ t.match(ARB_REIFY, [{
+ add: ['foo@'],
+ legacyPeerDeps: false,
+ packageLockOnly: false,
+ }], 'need to install foo@')
+ t.equal(PROGRESS_ENABLED, true, 'progress re-enabled')
+ const PATH = `${resolve(installDir, 'node_modules', '.bin')}${delimiter}${process.env.PATH}`
+ t.match(RUN_SCRIPTS, [
+ {
+ pkg: { scripts: { npx: 'foo' } },
+ args: ['one arg', 'two arg'],
+ banner: false,
+ path: process.cwd(),
+ stdioString: true,
+ event: 'npx',
+ env: { PATH },
+ stdio: 'inherit',
+ },
+ ])
+})
+
t.test('npm exec foo, not present locally but in central loc', async t => {
const path = t.testdir()
const installDir = resolve('npx-cache-dir/f7fbba6e0636f890')
diff --git a/deps/npm/test/lib/commands/owner.js b/deps/npm/test/lib/commands/owner.js
index d80ce36fec..800d5b96a5 100644
--- a/deps/npm/test/lib/commands/owner.js
+++ b/deps/npm/test/lib/commands/owner.js
@@ -2,6 +2,7 @@ const t = require('tap')
const { load: loadMockNpm } = require('../../fixtures/mock-npm.js')
const MockRegistry = require('../../fixtures/mock-registry.js')
+const path = require('path')
const npa = require('npm-package-arg')
const packageName = '@npmcli/test-package'
const spec = npa(packageName)
@@ -12,6 +13,42 @@ const maintainers = [
{ email: 'test-user-b@npmjs.org', name: 'test-user-b' },
]
+const workspaceFixture = {
+ 'package.json': JSON.stringify({
+ name: packageName,
+ version: '1.2.3-test',
+ workspaces: ['workspace-a', 'workspace-b', 'workspace-c'],
+ }),
+ 'workspace-a': {
+ 'package.json': JSON.stringify({
+ name: 'workspace-a',
+ version: '1.2.3-a',
+ }),
+ },
+ 'workspace-b': {
+ 'package.json': JSON.stringify({
+ name: 'workspace-b',
+ version: '1.2.3-n',
+ }),
+ },
+ 'workspace-c': JSON.stringify({
+ 'package.json': {
+ name: 'workspace-n',
+ version: '1.2.3-n',
+ },
+ }),
+}
+
+function registryPackage (t, registry, name) {
+ const mockRegistry = new MockRegistry({ tap: t, registry })
+
+ const manifest = mockRegistry.manifest({
+ name,
+ packuments: [{ maintainers, version: '1.0.0' }],
+ })
+ mockRegistry.package({ manifest })
+}
+
t.test('owner no args', async t => {
const { npm } = await loadMockNpm(t)
await t.rejects(
@@ -429,6 +466,158 @@ t.test('owner rm <user> no cwd package', async t => {
)
})
+t.test('workspaces', async t => {
+ t.test('owner no args --workspace', async t => {
+ const { npm } = await loadMockNpm(t, {
+ prefixDir: workspaceFixture,
+ })
+ npm.config.set('workspace', ['workspace-a'])
+ await t.rejects(
+ npm.exec('owner', []),
+ { code: 'EUSAGE' },
+ 'rejects with usage'
+ )
+ })
+
+ t.test('owner ls implicit workspace', async t => {
+ const { npm, joinedOutput } = await loadMockNpm(t, {
+ prefixDir: workspaceFixture,
+ globals: ({ prefix }) => ({
+ 'process.cwd': () => path.join(prefix, 'workspace-a'),
+ }),
+ })
+ registryPackage(t, npm.config.get('registry'), 'workspace-a')
+ await npm.exec('owner', ['ls'])
+ t.match(joinedOutput(), maintainers.map(m => `${m.name} <${m.email}>`).join('\n'))
+ })
+
+ t.test('owner ls explicit workspace', async t => {
+ const { npm, joinedOutput } = await loadMockNpm(t, {
+ prefixDir: workspaceFixture,
+ globals: ({ prefix }) => ({
+ 'process.cwd': () => prefix,
+ }),
+ })
+ npm.config.set('workspace', ['workspace-a'])
+ registryPackage(t, npm.config.get('registry'), 'workspace-a')
+ await npm.exec('owner', ['ls'])
+ t.match(joinedOutput(), maintainers.map(m => `${m.name} <${m.email}>`).join('\n'))
+ })
+
+ t.test('owner ls <pkg> implicit workspace', async t => {
+ const { npm, joinedOutput } = await loadMockNpm(t, {
+ prefixDir: workspaceFixture,
+ globals: ({ prefix }) => ({
+ 'process.cwd': () => path.join(prefix, 'workspace-a'),
+ }),
+ })
+ registryPackage(t, npm.config.get('registry'), packageName)
+ await npm.exec('owner', ['ls', packageName])
+ t.match(joinedOutput(), maintainers.map(m => `${m.name} <${m.email}>`).join('\n'))
+ })
+
+ t.test('owner ls <pkg> explicit workspace', async t => {
+ const { npm, joinedOutput } = await loadMockNpm(t, {
+ prefixDir: workspaceFixture,
+ globals: ({ prefix }) => ({
+ 'process.cwd': () => prefix,
+ }),
+ })
+ npm.config.set('workspace', ['workspace-a'])
+ registryPackage(t, npm.config.get('registry'), packageName)
+ await npm.exec('owner', ['ls', packageName])
+ t.match(joinedOutput(), maintainers.map(m => `${m.name} <${m.email}>`).join('\n'))
+ })
+
+ t.test('owner add implicit workspace', async t => {
+ const { npm, joinedOutput } = await loadMockNpm(t, {
+ prefixDir: workspaceFixture,
+ globals: ({ prefix }) => ({
+ 'process.cwd': () => path.join(prefix, 'workspace-a'),
+ }),
+ })
+ const username = 'foo'
+ const registry = new MockRegistry({ tap: t, registry: npm.config.get('registry') })
+
+ const manifest = registry.manifest({
+ name: 'workspace-a',
+ packuments: [{ maintainers, version: '1.0.0' }],
+ })
+ registry.package({ manifest })
+ registry.couchuser({ username })
+ registry.nock.put(`/workspace-a/-rev/${manifest._rev}`, body => {
+ t.match(body, {
+ _id: manifest._id,
+ _rev: manifest._rev,
+ maintainers: [
+ ...manifest.maintainers,
+ { name: username, email: '' },
+ ],
+ })
+ return true
+ }).reply(200, {})
+ await npm.exec('owner', ['add', username])
+ t.equal(joinedOutput(), `+ ${username} (workspace-a)`)
+ })
+
+ t.test('owner add --workspace', async t => {
+ const { npm, joinedOutput } = await loadMockNpm(t, {
+ prefixDir: workspaceFixture,
+ })
+ npm.config.set('workspace', ['workspace-a'])
+ const username = 'foo'
+ const registry = new MockRegistry({ tap: t, registry: npm.config.get('registry') })
+
+ const manifest = registry.manifest({
+ name: 'workspace-a',
+ packuments: [{ maintainers, version: '1.0.0' }],
+ })
+ registry.package({ manifest })
+ registry.couchuser({ username })
+ registry.nock.put(`/workspace-a/-rev/${manifest._rev}`, body => {
+ t.match(body, {
+ _id: manifest._id,
+ _rev: manifest._rev,
+ maintainers: [
+ ...manifest.maintainers,
+ { name: username, email: '' },
+ ],
+ })
+ return true
+ }).reply(200, {})
+ await npm.exec('owner', ['add', username])
+ t.equal(joinedOutput(), `+ ${username} (workspace-a)`)
+ })
+
+ t.test('owner rm --workspace', async t => {
+ const { npm, joinedOutput } = await loadMockNpm(t, {
+ prefixDir: workspaceFixture,
+ globals: ({ prefix }) => ({
+ 'process.cwd': () => path.join(prefix, 'workspace-a'),
+ }),
+ })
+ const registry = new MockRegistry({ tap: t, registry: npm.config.get('registry') })
+
+ const username = maintainers[0].name
+ const manifest = registry.manifest({
+ name: 'workspace-a',
+ packuments: [{ maintainers, version: '1.0.0' }],
+ })
+ registry.package({ manifest })
+ registry.couchuser({ username })
+ registry.nock.put(`/workspace-a/-rev/${manifest._rev}`, body => {
+ t.match(body, {
+ _id: manifest._id,
+ _rev: manifest._rev,
+ maintainers: maintainers.slice(1),
+ })
+ return true
+ }).reply(200, {})
+ await npm.exec('owner', ['rm', username])
+ t.equal(joinedOutput(), `- ${username} (workspace-a)`)
+ })
+})
+
t.test('completion', async t => {
t.test('basic commands', async t => {
const { npm } = await loadMockNpm(t)
diff --git a/deps/npm/test/lib/npm.js b/deps/npm/test/lib/npm.js
index 1966ca9600..566cbca20f 100644
--- a/deps/npm/test/lib/npm.js
+++ b/deps/npm/test/lib/npm.js
@@ -620,7 +620,7 @@ t.test('implicit workspace rejection', async t => {
}),
})
await t.rejects(
- mock.npm.exec('owner', []),
+ mock.npm.exec('team', []),
/This command does not support workspaces/
)
})