From 7a2ebd256fae84bf297b5f3aaa7b62b460be23b7 Mon Sep 17 00:00:00 2001
From: "ops+robot@npmjs.com" If set to false, then ignore When package package-locks are disabled, automatic pruning of extraneous
-modules will also be disabled. To remove extraneous modules with
-package-locks disabled use This configuration does not affect If set to false, then ignore When package package-locks are disabled, automatic pruning of extraneous
-modules will also be disabled. To remove extraneous modules with
-package-locks disabled use This configuration does not affect If set to false, then ignore When package package-locks are disabled, automatic pruning of extraneous
-modules will also be disabled. To remove extraneous modules with
-package-locks disabled use This configuration does not affect If set to false, then ignore When package package-locks are disabled, automatic pruning of extraneous
-modules will also be disabled. To remove extraneous modules with
-package-locks disabled use This configuration does not affect If set to false, then ignore When package package-locks are disabled, automatic pruning of extraneous
-modules will also be disabled. To remove extraneous modules with
-package-locks disabled use This configuration does not affect package-lockpackage-lock.json files when installing. This
will also prevent writing package-lock.json if save is true.npm prune.npm ci.package-lockpackage-lock.json files when installing. This
will also prevent writing package-lock.json if save is true.npm prune.npm ci.package-lockpackage-lock.json files when installing. This
will also prevent writing package-lock.json if save is true.npm prune.npm ci.package-lockpackage-lock.json files when installing. This
will also prevent writing package-lock.json if save is true.npm prune.npm ci.package-lockpackage-lock.json files when installing. This
will also prevent writing package-lock.json if save is true.npm prune.npm ci.Description
the results to only the paths to the packages named. Note that nested
packages will also show the paths to the specified packages. For
example, running npm ls promzard in npm's source tree will show:
npm@8.8.0 /path/to/npm
+npm@8.9.0 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
diff --git a/deps/npm/docs/output/commands/npm-owner.html b/deps/npm/docs/output/commands/npm-owner.html
index b76967a18dad..744f7821408f 100644
--- a/deps/npm/docs/output/commands/npm-owner.html
+++ b/deps/npm/docs/output/commands/npm-owner.html
@@ -142,7 +142,7 @@ npm-owner
Table of contents
-
+
Synopsis
@@ -198,6 +198,45 @@ otp
password, npm will prompt on the command line for one.
+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.
+
+
+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.
+
+
See Also
diff --git a/deps/npm/docs/output/commands/npm-pkg.html b/deps/npm/docs/output/commands/npm-pkg.html
index 221afc4e594b..95635ee60283 100644
--- a/deps/npm/docs/output/commands/npm-pkg.html
+++ b/deps/npm/docs/output/commands/npm-pkg.html
@@ -192,6 +192,11 @@ Description
contributor in the list, you can run:
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:
+npm pkg get "exports[.].require"
+
npm pkg set <field>=<value>
diff --git a/deps/npm/docs/output/commands/npm-update.html b/deps/npm/docs/output/commands/npm-update.html
index 2ada2dcb7cc9..d88ea8578bac 100644
--- a/deps/npm/docs/output/commands/npm-update.html
+++ b/deps/npm/docs/output/commands/npm-update.html
@@ -352,9 +352,6 @@ package-lock
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/docs/output/commands/npm.html b/deps/npm/docs/output/commands/npm.html
index a48efdbe4f62..947e5a7ee179 100644
--- a/deps/npm/docs/output/commands/npm.html
+++ b/deps/npm/docs/output/commands/npm.html
@@ -149,7 +149,7 @@ Table of contents
Version
-8.8.0
+8.9.0
Description
npm is the package manager for the Node JavaScript platform. It puts
modules in place so that node can find them, and manages dependency
diff --git a/deps/npm/docs/output/using-npm/config.html b/deps/npm/docs/output/using-npm/config.html
index 57e6e21073dd..e1edc3650070 100644
--- a/deps/npm/docs/output/using-npm/config.html
+++ b/deps/npm/docs/output/using-npm/config.html
@@ -1123,9 +1123,6 @@
package-lock
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/lib/commands/doctor.js b/deps/npm/lib/commands/doctor.js
index ca0438f1a248..f5bee1eb83f6 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 f764cea528ad..d9a686cc9a3b 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 285b06be8e5f..9338b22a5e85 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 ff3036693878..cbf0ccf4d658 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 c819a0807b50..732362565e29 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 4a1f971d8543..6f1b1a7244a5 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 79ca419e53b8..66e859f6a2a6 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 6e755bf90e96..08a78c48e855 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 5954f069d9a9..d84fdd59e583 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 b6229ecc4643..efe38ee8d911 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 d211456d50e9..f56c459c6d73 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 a57d0343e0de..1b5e5a843725 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 0cfdc6cf0745..3aefdfc80b84 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 6b829353d448..87eb098ce920 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 4517877124b6..19f9ab6a06de 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 71c319f04a27..c337c715017a 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 bf7fcfe728cd..594b1689b73f 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 6da0dd52e189..90bdfa947604 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 7130524d2642..33166e1c45a2 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 62a633dff1c3..e7dc87e834e4 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 6a3b9b20fb3b..4c7dd20a9df8 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 433e8f7b4ae5..d5e4fd9398fa 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 01db093870fb..1203e1427e0b 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 a8d343c1d19f..29866d5c36b2 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 cdb01df980fe..266248676dfa 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 d89bd9f39082..4f1652d54bb5 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 d501652230fa..44d848357d52 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 73ac93576c84..f4e9ec4c91e4 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 8af1b37e83c1..83cb8f92d04d 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 32d92b03bc0f..27b8888c8cda 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 30d3890d21f1..829b1b4752bd 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 3c253a0364c1..aeddd06d146d 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 b28c8300e196..17aadace62fc 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 1f3bf51ada1f..7630adb0e280 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 d726e669dd24..f59c74651940 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 01dd67cdc1b4..830791810078 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 6485cb3650de..df207311c045 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 841a3b5d7a42..28d623b204b7 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 46921b5a8ef0..9fe1ddf692e5 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 d67b4cf339fd..09f488ed8ea5 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 3eabcc79878c..94a0df9efc3b 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 c564f5fdeacd..bf065b16f157 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 577e030d42c4..1307a6664b1e 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
@@ -68,6 +68,15 @@ Returned values are always in \fBjson\fR format\.
.nf
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 =\fP
diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1
index 356ad4e8636b..2434c34678e7 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 d546955b8b6a..a7a1733b63d1 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 a3d43f6455fc..a0d23793206b 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 4fabf6e36875..241f7cffd204 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 bd5a47263f0e..dab000878d1c 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 0b298e82969e..7fd6c738c9f7 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 5ce2cc44c48a..9866fa5792cd 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 dcc8c34de675..4e1a94be7b4b 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 edf0561cec05..b9e2afb26968 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 ae56a5687ea8..51fa43b80e73 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 e82c766a83fb..96ee6e3e3466 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 bd17cbf0090b..fa87fb7e72b2 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 0bae2d1c1ce2..6075139da7cb 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 65ed2aff6818..aa290760aad3 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 4f2044a54357..f45e4a2a24c3 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 487837323a6f..a7bb25b3a44d 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 31a27eaaf7b2..05f508427a4a 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 b2e4dd13f099..590d9519df51 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 b95b41974f55..f2e32ea27fdb 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 387a037ca431..d918034ba194 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 7303db913742..201984227999 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 ed84041591e1..1fa7b88c64a5 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 e681d6a55431..fa2903a18c26 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 8d24aed5274d..444c0709759d 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 877d8a8aa3d8..b77c77056671 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 607d1a55c5e1..d79c448a7a11 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 3147db3ad76e..cbfc8e8ec6a5 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 c1230a949228..51634bc8e8f9 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 10e161c67967..74403f97bfcc 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 ccccf3a696fd..40d8a825c9ef 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 dcc5cca516ae..2928a9bae6cf 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 0e3e8edefa21..429bcc3875dd 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 b799144aaa36..471565097476 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 dd0d17b88cb4..569d9c5ae679 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 3bb501bcdae6..eee1ac6c5f2f 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 7b50a0dc6c5a..12e9b535fce5 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 41634c61a61b..ea0a7a8f1873 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 0df926774952..84c949949dc6 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 dcdb33934bea..eff3f31ab641 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 5743d339ecd1..27bb1de4c99a 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 0fd24d0fcb6a..5d4f0e7270a0 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 9cedf62bc8cb..2ced12c63d90 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 b5d6b3bde3dd..494b40686214 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 8bffb2af83ca..0aeb454725bd 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 a71e81ad5e15..b0aa18c12ba7 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 426778b85096..9d4485624acb 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 d9d4bf4c6416..58f357b1da3d 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 d6904fa30127..eed51874f9f6 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 52d7d3edda7d..000000000000
--- 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 9eb646df76b4..cd7e4de5e0cb 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 65e97e205204..d88724c5d197 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 b4f890d310df..e8ca16f596d6 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 3404ea947494..14e687805d47 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 af8166d4ea19..2f4323c4414e 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 e1f683219311..d3e55ad623a4 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 37349cbe01e7..eccb06580d9f 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>/]
Options:
[--registry ] [--otp ]
+[-w|--workspace [-w|--workspace ...]]
+[-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 ff00f9a0f9b3..42db6ce030b5 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 6740b94c772c..d0ce3a26f764 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\`.
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 941def42ee18..bbb3563405da 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 ] [--otp ]
+ [-w|--workspace [-w|--workspace ...]]
+ [-ws|--workspaces]
alias: author
diff --git a/deps/npm/test/coverage-map.js b/deps/npm/test/coverage-map.js
index 0ea909818602..9a289b6489e3 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 4263dc8fbedc..c9701ebc2379 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 d6e598d568d5..1117885b9173 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 d80ce36fece9..800d5b96a587 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 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 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 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 1966ca960008..566cbca20f6b 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/
)
})