diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS
index 0d3cedb68c86..ff19da4cf80a 100644
--- a/deps/npm/AUTHORS
+++ b/deps/npm/AUTHORS
@@ -741,3 +741,8 @@ Daniel Fischer Description
the results to only the paths to the packages named. Note that nested
packages will also show the paths to the specified packages. For
example, running npm ls promzard in npm’s source tree will show:
npm@7.3.0 /path/to/npm
+npm@7.4.0 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
@@ -185,7 +185,7 @@ Note: Design Changes Pending
“underneath” their dependents in the dependency graph, but are always
physically at or above their location on disk.
Also, in the years since npm got an ls command (in version 0.0.2!),
-dependency graphs have gotten much larger as a general rule. Therefor, in
+dependency graphs have gotten much larger as a general rule. Therefore, in
order to avoid dumping an excessive amount of content to the terminal, npm ls now only shows the top level dependencies, unless --all is
provided.
A thorough re-examination of the use cases, intention, behavior, and output
diff --git a/deps/npm/docs/output/commands/npm.html b/deps/npm/docs/output/commands/npm.html
index 6e9e2a618f15..de9bf85161d1 100644
--- a/deps/npm/docs/output/commands/npm.html
+++ b/deps/npm/docs/output/commands/npm.html
@@ -148,7 +148,7 @@
Table of contents
npm <command> [args]
Version
-7.3.0
+7.4.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 ad9c8c44a1fc..97a554adbd00 100644
--- a/deps/npm/docs/output/using-npm/config.html
+++ b/deps/npm/docs/output/using-npm/config.html
@@ -141,7 +141,7 @@
config
Table of contents
-- Description
- Shorthands and Other CLI Niceties
- Config Settings
- access
- all
- allow-same-version
- always-auth
- also
- audit
- audit-level
- auth-type
- before
- bin-links
- browser
- ca
- cafile
- cache
- cache-lock-stale
- cache-lock-retries
- cache-lock-wait
- cache-max
- cache-min
- call
- cert
- cidr
- commit-hooks
- color
- depth
- description
- dev
- dry-run
- editor
- engine-strict
- force
- format-package-lock
- fund
- fetch-retries
- fetch-retry-factor
- fetch-retry-mintimeout
- fetch-retry-maxtimeout
- fetch-timeout
- git
- git-tag-version
- global
- globalconfig
- global-style
- heading
- https-proxy
- if-present
- ignore-prepublish
- ignore-scripts
- include
- init-module
- init-author-name
- init-author-email
- init-author-url
- init-license
- init-version
- json
- key
- legacy-bundling
- legacy-peer-deps
- link
- local-address
- loglevel
- logs-max
- long
- maxsockets
- message
- node-options
- node-version
- noproxy
- offline
- only
- optional
- otp
- package-lock
- package-lock-only
- parseable
- prefer-offline
- prefer-online
- prefix
- preid
- production
- progress
- proxy
- read-only
- rebuild-bundle
- registry
- rollback
- save
- save-bundle
- save-prod
- save-dev
- save-exact
- save-optional
- save-prefix
- scope
- script-shell
- scripts-prepend-node-path
- searchexclude
- searchopts
- searchlimit
- searchstaleness
- shell
- shrinkwrap
- sign-git-commit
- sign-git-tag
- sso-poll-frequency
- sso-type
- strict-peer-deps
- strict-ssl
- tag
- tag-version-prefix
- timing
- tmp
- unicode
- update-notifier
- usage
- userconfig
- umask
- user-agent
- version
- versions
- viewer
- See also
+- Description
- Shorthands and Other CLI Niceties
- Config Settings
- access
- all
- allow-same-version
- always-auth
- also
- audit
- audit-level
- auth-type
- before
- bin-links
- browser
- ca
- cafile
- cache
- cache-lock-stale
- cache-lock-retries
- cache-lock-wait
- cache-max
- cache-min
- call
- cert
- cidr
- commit-hooks
- color
- depth
- description
- dev
- dry-run
- editor
- engine-strict
- force
- foreground-scripts
- format-package-lock
- fund
- fetch-retries
- fetch-retry-factor
- fetch-retry-mintimeout
- fetch-retry-maxtimeout
- fetch-timeout
- git
- git-tag-version
- global
- globalconfig
- global-style
- heading
- https-proxy
- if-present
- ignore-prepublish
- ignore-scripts
- include
- init-module
- init-author-name
- init-author-email
- init-author-url
- init-license
- init-version
- json
- key
- legacy-bundling
- legacy-peer-deps
- link
- local-address
- loglevel
- logs-max
- long
- maxsockets
- message
- node-options
- node-version
- noproxy
- offline
- only
- optional
- otp
- package-lock
- package-lock-only
- parseable
- prefer-offline
- prefer-online
- prefix
- preid
- production
- progress
- proxy
- read-only
- rebuild-bundle
- registry
- rollback
- save
- save-bundle
- save-prod
- save-dev
- save-exact
- save-optional
- save-prefix
- scope
- script-shell
- scripts-prepend-node-path
- searchexclude
- searchopts
- searchlimit
- searchstaleness
- shell
- shrinkwrap
- sign-git-commit
- sign-git-tag
- sso-poll-frequency
- sso-type
- strict-peer-deps
- strict-ssl
- tag
- tag-version-prefix
- timing
- tmp
- unicode
- update-notifier
- usage
- userconfig
- umask
- user-agent
- version
- versions
- viewer
- See also
Description
@@ -488,6 +488,16 @@ force
If you don’t have a clear idea of what you want to do, it is strongly
recommended that you do not use this option!
+foreground-scripts
+
+- Default: false
+- Type: Boolean
+
+Run all build scripts (ie, preinstall, install, and postinstall)
+scripts for installed packages in the foreground process, sharing standard
+input, output, and error with the main npm process.
+Note that this will generally make installs run slower, and be much
+noisier, but can be useful for debugging.
format-package-lock
- Default: true
diff --git a/deps/npm/lib/ci.js b/deps/npm/lib/ci.js
index 2917899c8255..89c6b8f42074 100644
--- a/deps/npm/lib/ci.js
+++ b/deps/npm/lib/ci.js
@@ -21,7 +21,7 @@ const ci = async () => {
}
const where = npm.prefix
- const { scriptShell } = npm.flatOptions
+ const { scriptShell, ignoreScripts } = npm.flatOptions
const arb = new Arborist({ ...npm.flatOptions, path: where })
await Promise.all([
@@ -39,24 +39,26 @@ const ci = async () => {
await arb.reify({ ...npm.flatOptions, save: false })
// run the same set of scripts that `npm install` runs.
- const scripts = [
- 'preinstall',
- 'install',
- 'postinstall',
- 'prepublish', // XXX should we remove this finally??
- 'preprepare',
- 'prepare',
- 'postprepare',
- ]
- for (const event of scripts) {
- await runScript({
- path: where,
- args: [],
- scriptShell,
- stdio: 'inherit',
- stdioString: true,
- event,
- })
+ if (!ignoreScripts) {
+ const scripts = [
+ 'preinstall',
+ 'install',
+ 'postinstall',
+ 'prepublish', // XXX should we remove this finally??
+ 'preprepare',
+ 'prepare',
+ 'postprepare',
+ ]
+ for (const event of scripts) {
+ await runScript({
+ path: where,
+ args: [],
+ scriptShell,
+ stdio: 'inherit',
+ stdioString: true,
+ event,
+ })
+ }
}
await reifyFinish(arb)
}
diff --git a/deps/npm/lib/exec.js b/deps/npm/lib/exec.js
index d4bcac0252b2..d36dd87cfb97 100644
--- a/deps/npm/lib/exec.js
+++ b/deps/npm/lib/exec.js
@@ -67,7 +67,7 @@ const cmd = (args, cb) => exec(args).then(() => cb()).catch(cb)
const run = async ({ args, call, pathArr, shell }) => {
// turn list of args into command string
- const script = call || args.join(' ').trim() || shell
+ const script = call || args.shift() || shell
// do the fakey runScript dance
// still should work if no package.json in cwd
@@ -98,6 +98,7 @@ const run = async ({ args, call, pathArr, shell }) => {
path: process.cwd(),
stdioString: true,
event: 'npx',
+ args,
env: {
PATH: pathArr.join(delimiter),
},
@@ -144,7 +145,7 @@ const exec = async args => {
if (binExists) {
return await run({
args,
- call: [args[0], ...args.slice(1)].join(' ').trim(),
+ call,
pathArr,
shell,
})
diff --git a/deps/npm/lib/publish.js b/deps/npm/lib/publish.js
index 0a4123303e6b..8ef7eff4c8a6 100644
--- a/deps/npm/lib/publish.js
+++ b/deps/npm/lib/publish.js
@@ -43,11 +43,13 @@ const publish = async args => {
})
}
- const creds = npm.config.getCredentialsByURI(registry)
- if (!creds.token && !creds.username) {
- throw Object.assign(new Error('This command requires you to be logged in.'), {
- code: 'ENEEDAUTH',
- })
+ if (!opts.dryRun) {
+ const creds = npm.config.getCredentialsByURI(registry)
+ if (!creds.token && !creds.username) {
+ throw Object.assign(new Error('This command requires you to be logged in.'), {
+ code: 'ENEEDAUTH',
+ })
+ }
}
if (semver.validRange(defaultTag))
diff --git a/deps/npm/lib/update.js b/deps/npm/lib/update.js
index bbc6732dba6d..6eaa085b8766 100644
--- a/deps/npm/lib/update.js
+++ b/deps/npm/lib/update.js
@@ -24,7 +24,7 @@ const update = async args => {
if (npm.flatOptions.depth) {
log.warn('update', 'The --depth option no longer has any effect. See RFC0019.\n' +
- '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/npm/rfcs/blob/latest/accepted/0019-remove-update-depth-option.md')
+ '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/npm/rfcs/blob/latest/implemented/0019-remove-update-depth-option.md')
}
const arb = new Arborist({
diff --git a/deps/npm/lib/utils/config.js b/deps/npm/lib/utils/config.js
index 2b6b96e5c819..511215769893 100644
--- a/deps/npm/lib/utils/config.js
+++ b/deps/npm/lib/utils/config.js
@@ -83,6 +83,7 @@ const defaults = {
'fetch-retry-mintimeout': 10000,
'fetch-timeout': 5 * 60 * 1000,
force: false,
+ 'foreground-script': false,
'format-package-lock': true,
fund: true,
git: 'git',
@@ -170,7 +171,7 @@ const defaults = {
'tag-version-prefix': 'v',
timing: false,
tmp: tmpdir(),
- umask: process.umask ? process.umask() : 0o22,
+ umask: 0,
unicode,
'update-notifier': true,
usage: false,
@@ -224,6 +225,7 @@ const types = {
'fetch-retry-mintimeout': Number,
'fetch-timeout': Number,
force: Boolean,
+ 'foreground-script': Boolean,
'format-package-lock': Boolean,
fund: Boolean,
git: String,
diff --git a/deps/npm/lib/utils/flat-options.js b/deps/npm/lib/utils/flat-options.js
index 828481930369..a161ff2e6a70 100644
--- a/deps/npm/lib/utils/flat-options.js
+++ b/deps/npm/lib/utils/flat-options.js
@@ -133,6 +133,7 @@ const flatten = obj => ({
packageLockOnly: obj['package-lock-only'],
globalStyle: obj['global-style'],
legacyBundling: obj['legacy-bundling'],
+ foregroundScripts: !!obj['foreground-scripts'],
scriptShell: obj['script-shell'] || undefined,
shell: obj.shell,
omit: buildOmitList(obj),
diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1
index 9d7e11f24ea0..173e6b1cfd10 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" "December 2020" "" ""
+.TH "NPM\-ACCESS" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-access\fR \- Set access level on published packages
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1
index 2ca265c53889..dd8fb918e1b3 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" "December 2020" "" ""
+.TH "NPM\-ADDUSER" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-adduser\fR \- Add a registry user account
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-audit.1 b/deps/npm/man/man1/npm-audit.1
index a7ec23cf49fb..03f3c3f2bccb 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" "December 2020" "" ""
+.TH "NPM\-AUDIT" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-audit\fR \- Run a security audit
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-bin.1 b/deps/npm/man/man1/npm-bin.1
index 36c609858c38..771197e4b14f 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" "December 2020" "" ""
+.TH "NPM\-BIN" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-bin\fR \- Display npm bin folder
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1
index 4abbb0274082..3318f3a4bf75 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" "December 2020" "" ""
+.TH "NPM\-BUGS" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-bugs\fR \- Report bugs for a package in a web browser
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1
index 09f9b1c225b8..eb65d7c37290 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" "December 2020" "" ""
+.TH "NPM\-CACHE" "1" "January 2021" "" ""
.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 fee1a3a78871..e7092af6f347 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" "December 2020" "" ""
+.TH "NPM\-CI" "1" "January 2021" "" ""
.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 26ca627f899c..6842e6aa0818 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" "December 2020" "" ""
+.TH "NPM\-COMPLETION" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-completion\fR \- Tab Completion for npm
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1
index eb2d8bfead01..cf6114cd93e4 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" "December 2020" "" ""
+.TH "NPM\-CONFIG" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-config\fR \- Manage the npm configuration files
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1
index 5e4ef93d9030..fe5ed775b45c 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" "December 2020" "" ""
+.TH "NPM\-DEDUPE" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-dedupe\fR \- Reduce duplication
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1
index 303e7edfec16..81e16e669350 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" "December 2020" "" ""
+.TH "NPM\-DEPRECATE" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-deprecate\fR \- Deprecate a version of a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1
index bc70f7dc80bf..4729a069d0a0 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" "December 2020" "" ""
+.TH "NPM\-DIST\-TAG" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-dist-tag\fR \- Modify package distribution tags
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1
index a53481b7ba71..5bedabb0aecc 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" "December 2020" "" ""
+.TH "NPM\-DOCS" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-docs\fR \- Open documentation for a package in a web browser
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-doctor.1 b/deps/npm/man/man1/npm-doctor.1
index 96772d5c7e27..dda1886ebeb7 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" "December 2020" "" ""
+.TH "NPM\-DOCTOR" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-doctor\fR \- Check your npm environment
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1
index 14e28635a91b..844e2ee7d030 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" "December 2020" "" ""
+.TH "NPM\-EDIT" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-edit\fR \- Edit an installed package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-exec.1 b/deps/npm/man/man1/npm-exec.1
index 5628bda39d41..a4c45df72e8b 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" "December 2020" "" ""
+.TH "NPM\-EXEC" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-exec\fR \- Run a command from a local or remote npm package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-explain.1 b/deps/npm/man/man1/npm-explain.1
index 17d8b35a2da7..05def6f99534 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" "December 2020" "" ""
+.TH "NPM\-EXPLAIN" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-explain\fR \- Explain installed packages
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1
index 1d58315a0870..75e19e0ccfb7 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" "December 2020" "" ""
+.TH "NPM\-EXPLORE" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-explore\fR \- Browse an installed package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-fund.1 b/deps/npm/man/man1/npm-fund.1
index 25871805d9ae..5ecc397d5d31 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" "December 2020" "" ""
+.TH "NPM\-FUND" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-fund\fR \- Retrieve funding information
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1
index 737aab6e1311..0fb25c5afeb0 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" "December 2020" "" ""
+.TH "NPM\-HELP\-SEARCH" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-help-search\fR \- Search npm help documentation
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1
index ef5f950c95f9..01151c5d9ca7 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" "December 2020" "" ""
+.TH "NPM\-HELP" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-help\fR \- Get help on npm
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-hook.1 b/deps/npm/man/man1/npm-hook.1
index c3ed5ac6c043..d77156588903 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" "December 2020" "" ""
+.TH "NPM\-HOOK" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-hook\fR \- Manage registry hooks
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1
index bf0b98145a21..05dbd6d80a61 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" "December 2020" "" ""
+.TH "NPM\-INIT" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-init\fR \- create a package\.json file
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-install-ci-test.1 b/deps/npm/man/man1/npm-install-ci-test.1
index 48e2956f3ff9..bc0ec6ef2fd0 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" "December 2020" "" ""
+.TH "NPM\-INSTALL\-CI\-TEST" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-install-ci-test\fR \- Install a project with a clean slate and run tests
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1
index e9bd0501e751..73fccaf4154e 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" "December 2020" "" ""
+.TH "NPM\-INSTALL\-TEST" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-install-test\fR \- Install package(s) and run tests
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1
index 95ab212127eb..b0f567e254a1 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" "December 2020" "" ""
+.TH "NPM\-INSTALL" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-install\fR \- Install a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1
index 4d055aab4f1a..881ee1f87fb0 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" "December 2020" "" ""
+.TH "NPM\-LINK" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-link\fR \- Symlink a package folder
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1
index 5fd41d2ced47..c0bbf0e803b1 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" "December 2020" "" ""
+.TH "NPM\-LOGOUT" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-logout\fR \- Log out of the registry
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1
index f0ac3f7b6cbd..94df47109a03 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" "December 2020" "" ""
+.TH "NPM\-LS" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-ls\fR \- List installed packages
.SS Synopsis
@@ -26,7 +26,7 @@ example, running \fBnpm ls promzard\fP in npm's source tree will show:
.P
.RS 2
.nf
-npm@7\.3\.0 /path/to/npm
+npm@7\.4\.0 /path/to/npm
└─┬ init\-package\-json@0\.0\.4
└── promzard@0\.1\.5
.fi
@@ -61,7 +61,7 @@ this gets even more curious, as \fBpeerDependencies\fP are logically
physically at or above their location on disk\.
.P
Also, in the years since npm got an \fBls\fP command (in version 0\.0\.2!),
-dependency graphs have gotten much larger as a general rule\. Therefor, in
+dependency graphs have gotten much larger as a general rule\. Therefore, in
order to avoid dumping an excessive amount of content to the terminal, \fBnpm
ls\fP now only shows the \fItop\fR level dependencies, unless \fB\-\-all\fP is
provided\.
diff --git a/deps/npm/man/man1/npm-org.1 b/deps/npm/man/man1/npm-org.1
index c0e0a34972f5..a25119964ae9 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" "December 2020" "" ""
+.TH "NPM\-ORG" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-org\fR \- Manage orgs
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1
index 72f60b816786..a9e59718c243 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" "December 2020" "" ""
+.TH "NPM\-OUTDATED" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-outdated\fR \- Check for outdated packages
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1
index 55b7580b94ed..f7709d7c27ba 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" "December 2020" "" ""
+.TH "NPM\-OWNER" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-owner\fR \- Manage package owners
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1
index d6fbeef43eb6..08445b378405 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" "December 2020" "" ""
+.TH "NPM\-PACK" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-pack\fR \- Create a tarball from a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-ping.1 b/deps/npm/man/man1/npm-ping.1
index 95caf91ba5c4..e0277ea3f1bf 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" "December 2020" "" ""
+.TH "NPM\-PING" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-ping\fR \- Ping npm registry
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1
index 6d569b40f306..cc1e99d664e1 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" "December 2020" "" ""
+.TH "NPM\-PREFIX" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-prefix\fR \- Display prefix
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-profile.1 b/deps/npm/man/man1/npm-profile.1
index 906ce6f9a08f..0b6116664d98 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" "December 2020" "" ""
+.TH "NPM\-PROFILE" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-profile\fR \- Change settings on your registry profile
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1
index 0e56bdfa73d4..20b229b52ac7 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" "December 2020" "" ""
+.TH "NPM\-PRUNE" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-prune\fR \- Remove extraneous packages
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1
index 2ade35c42e41..c6fafeca6206 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" "December 2020" "" ""
+.TH "NPM\-PUBLISH" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-publish\fR \- Publish a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1
index d7fff484e3a5..75a132f16a16 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" "December 2020" "" ""
+.TH "NPM\-REBUILD" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-rebuild\fR \- Rebuild a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1
index fce87ad18e58..5f95ca52ee32 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" "December 2020" "" ""
+.TH "NPM\-REPO" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-repo\fR \- Open package repository page in the browser
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1
index 60e00a33d51b..2663343dc1eb 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" "December 2020" "" ""
+.TH "NPM\-RESTART" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-restart\fR \- Restart a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1
index e1ba4ef6caaf..dc36c04e495c 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" "December 2020" "" ""
+.TH "NPM\-ROOT" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-root\fR \- Display npm root
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1
index 308e4498a8d1..12d53610de0f 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" "December 2020" "" ""
+.TH "NPM\-RUN\-SCRIPT" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-run-script\fR \- Run arbitrary package scripts
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1
index d597664d37db..061bdc5458e2 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" "December 2020" "" ""
+.TH "NPM\-SEARCH" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-search\fR \- Search for packages
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-set-script.1 b/deps/npm/man/man1/npm-set-script.1
index 97979b100a93..cbadcbe53100 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" "December 2020" "" ""
+.TH "NPM\-SET\-SCRIPT" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-set-script\fR \- Set tasks in the scripts section of package\.json
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1
index 71f8c4bd9188..73ef9c3ce307 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" "December 2020" "" ""
+.TH "NPM\-SHRINKWRAP" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-shrinkwrap\fR \- Lock down dependency versions for publication
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1
index 412283276b8c..914b98c81a9d 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" "December 2020" "" ""
+.TH "NPM\-STAR" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-star\fR \- Mark your favorite packages
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1
index bb6202399174..48f404639c7b 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" "December 2020" "" ""
+.TH "NPM\-STARS" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-stars\fR \- View packages marked as favorites
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1
index fecca5eb0841..44bf825b2d6d 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" "December 2020" "" ""
+.TH "NPM\-START" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-start\fR \- Start a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1
index 2653090795ad..9ca8142296a4 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" "December 2020" "" ""
+.TH "NPM\-STOP" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-stop\fR \- Stop a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-team.1 b/deps/npm/man/man1/npm-team.1
index 0df7c4116489..bb3bc1d5d006 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" "December 2020" "" ""
+.TH "NPM\-TEAM" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-team\fR \- Manage organization teams and team memberships
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1
index fa5bf03c36bf..5844149a7306 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" "December 2020" "" ""
+.TH "NPM\-TEST" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-test\fR \- Test a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-token.1 b/deps/npm/man/man1/npm-token.1
index b67902828222..86ba18191068 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" "December 2020" "" ""
+.TH "NPM\-TOKEN" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-token\fR \- Manage your authentication tokens
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1
index d098c88415d5..f341264506be 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" "December 2020" "" ""
+.TH "NPM\-UNINSTALL" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-uninstall\fR \- Remove a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1
index 0c7d946a4da3..7c965107871b 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" "December 2020" "" ""
+.TH "NPM\-UNPUBLISH" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-unpublish\fR \- Remove a package from the registry
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-unstar.1 b/deps/npm/man/man1/npm-unstar.1
index d3115ff7ab57..70df2998f882 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" "December 2020" "" ""
+.TH "NPM\-UNSTAR" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-unstar\fR \- Remove an item from your favorite packages
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1
index 2df28cd28e24..7eee932e92c5 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" "December 2020" "" ""
+.TH "NPM\-UPDATE" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-update\fR \- Update a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1
index f6df51bfba95..aa3a5f1c1ba3 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" "December 2020" "" ""
+.TH "NPM\-VERSION" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-version\fR \- Bump a package version
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1
index 7334357ccfd6..ea6c1ec5db4f 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" "December 2020" "" ""
+.TH "NPM\-VIEW" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-view\fR \- View registry info
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1
index 73de7540360b..dc944670c188 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" "December 2020" "" ""
+.TH "NPM\-WHOAMI" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm-whoami\fR \- Display npm username
.SS Synopsis
diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1
index 68e6ace0478c..73b67d8a52cd 100644
--- a/deps/npm/man/man1/npm.1
+++ b/deps/npm/man/man1/npm.1
@@ -1,4 +1,4 @@
-.TH "NPM" "1" "December 2020" "" ""
+.TH "NPM" "1" "January 2021" "" ""
.SH "NAME"
\fBnpm\fR \- javascript package manager
.SS Synopsis
@@ -10,7 +10,7 @@ npm [args]
.RE
.SS Version
.P
-7\.3\.0
+7\.4\.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 c11f9600e16d..a6535f3e5468 100644
--- a/deps/npm/man/man1/npx.1
+++ b/deps/npm/man/man1/npx.1
@@ -1,4 +1,4 @@
-.TH "NPX" "1" "December 2020" "" ""
+.TH "NPX" "1" "January 2021" "" ""
.SH "NAME"
\fBnpx\fR \- Run a command from a local or remote npm package
.SS Synopsis
diff --git a/deps/npm/man/man5/folders.5 b/deps/npm/man/man5/folders.5
index 6d838019c6ce..8ba0a19d9d33 100644
--- a/deps/npm/man/man5/folders.5
+++ b/deps/npm/man/man5/folders.5
@@ -1,4 +1,4 @@
-.TH "FOLDERS" "5" "December 2020" "" ""
+.TH "FOLDERS" "5" "January 2021" "" ""
.SH "NAME"
\fBfolders\fR \- Folder Structures Used by npm
.SS Description
diff --git a/deps/npm/man/man5/install.5 b/deps/npm/man/man5/install.5
index e827d11bdb9a..4aa76d059bf8 100644
--- a/deps/npm/man/man5/install.5
+++ b/deps/npm/man/man5/install.5
@@ -1,4 +1,4 @@
-.TH "INSTALL" "5" "December 2020" "" ""
+.TH "INSTALL" "5" "January 2021" "" ""
.SH "NAME"
\fBinstall\fR \- Download and install node and npm
.SS Description
diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5
index ea60e39a2494..877c2175a486 100644
--- a/deps/npm/man/man5/npmrc.5
+++ b/deps/npm/man/man5/npmrc.5
@@ -1,4 +1,4 @@
-.TH "NPMRC" "5" "December 2020" "" ""
+.TH "NPMRC" "5" "January 2021" "" ""
.SH "NAME"
\fBnpmrc\fR \- The npm config files
.SS Description
diff --git a/deps/npm/man/man5/package-json.5 b/deps/npm/man/man5/package-json.5
index 5b8b5037634b..17946fd18fb5 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" "December 2020" "" ""
+.TH "PACKAGE\.JSON" "5" "January 2021" "" ""
.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 77d8ab1c3eef..4c69eefe99ef 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" "December 2020" "" ""
+.TH "PACKAGE\-LOCK\.JSON" "5" "January 2021" "" ""
.SH "NAME"
\fBpackage-lock.json\fR \- A manifestation of the manifest
.SS Description
diff --git a/deps/npm/man/man5/package-locks.5 b/deps/npm/man/man5/package-locks.5
index 0fc35cfb5a02..c71959c743fa 100644
--- a/deps/npm/man/man5/package-locks.5
+++ b/deps/npm/man/man5/package-locks.5
@@ -1,4 +1,4 @@
-.TH "PACKAGE\-LOCKS" "5" "December 2020" "" ""
+.TH "PACKAGE\-LOCKS" "5" "January 2021" "" ""
.SH "NAME"
\fBpackage-locks\fR \- An explanation of npm lockfiles
.SS Description
diff --git a/deps/npm/man/man5/shrinkwrap-json.5 b/deps/npm/man/man5/shrinkwrap-json.5
index 7457df20e4bf..606b2179a10a 100644
--- a/deps/npm/man/man5/shrinkwrap-json.5
+++ b/deps/npm/man/man5/shrinkwrap-json.5
@@ -1,4 +1,4 @@
-.TH "SHRINKWRAP\.JSON" "5" "December 2020" "" ""
+.TH "SHRINKWRAP\.JSON" "5" "January 2021" "" ""
.SH "NAME"
\fBshrinkwrap.json\fR \- A publishable lockfile
.SS Description
diff --git a/deps/npm/man/man7/config.7 b/deps/npm/man/man7/config.7
index a23a78b24722..c6235e825d08 100644
--- a/deps/npm/man/man7/config.7
+++ b/deps/npm/man/man7/config.7
@@ -1,4 +1,4 @@
-.TH "CONFIG" "7" "December 2020" "" ""
+.TH "CONFIG" "7" "January 2021" "" ""
.SH "NAME"
\fBconfig\fR \- More than you probably want to know about npm configuration
.SS Description
@@ -557,6 +557,21 @@ Allow unpublishing all versions of a published package\.
.P
If you don't have a clear idea of what you want to do, it is strongly
recommended that you do not use this option!
+.SS foreground\-scripts
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Run all build scripts (ie, \fBpreinstall\fP, \fBinstall\fP, and \fBpostinstall\fP)
+scripts for installed packages in the foreground process, sharing standard
+input, output, and error with the main npm process\.
+.P
+Note that this will generally make installs run slower, and be much
+noisier, but can be useful for debugging\.
.SS format\-package\-lock
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man7/developers.7 b/deps/npm/man/man7/developers.7
index e24b78cff7ba..fbe0a455020d 100644
--- a/deps/npm/man/man7/developers.7
+++ b/deps/npm/man/man7/developers.7
@@ -1,4 +1,4 @@
-.TH "DEVELOPERS" "7" "December 2020" "" ""
+.TH "DEVELOPERS" "7" "January 2021" "" ""
.SH "NAME"
\fBdevelopers\fR \- Developer Guide
.SS Description
diff --git a/deps/npm/man/man7/disputes.7 b/deps/npm/man/man7/disputes.7
index 8e9550599105..8ef02443c9c9 100644
--- a/deps/npm/man/man7/disputes.7
+++ b/deps/npm/man/man7/disputes.7
@@ -1,4 +1,4 @@
-.TH "DISPUTES" "7" "December 2020" "" ""
+.TH "DISPUTES" "7" "January 2021" "" ""
.SH "NAME"
\fBdisputes\fR \- Handling Module Name Disputes
.P
diff --git a/deps/npm/man/man7/orgs.7 b/deps/npm/man/man7/orgs.7
index d496e4d4a944..b2be9c387f6d 100644
--- a/deps/npm/man/man7/orgs.7
+++ b/deps/npm/man/man7/orgs.7
@@ -1,4 +1,4 @@
-.TH "ORGS" "7" "December 2020" "" ""
+.TH "ORGS" "7" "January 2021" "" ""
.SH "NAME"
\fBorgs\fR \- Working with Teams & Orgs
.SS Description
diff --git a/deps/npm/man/man7/registry.7 b/deps/npm/man/man7/registry.7
index cf6b02faeb96..c72c1168ff4f 100644
--- a/deps/npm/man/man7/registry.7
+++ b/deps/npm/man/man7/registry.7
@@ -1,4 +1,4 @@
-.TH "REGISTRY" "7" "December 2020" "" ""
+.TH "REGISTRY" "7" "January 2021" "" ""
.SH "NAME"
\fBregistry\fR \- The JavaScript Package Registry
.SS Description
diff --git a/deps/npm/man/man7/removal.7 b/deps/npm/man/man7/removal.7
index 24f08abfff76..3f6d0187c874 100644
--- a/deps/npm/man/man7/removal.7
+++ b/deps/npm/man/man7/removal.7
@@ -1,4 +1,4 @@
-.TH "REMOVAL" "7" "December 2020" "" ""
+.TH "REMOVAL" "7" "January 2021" "" ""
.SH "NAME"
\fBremoval\fR \- Cleaning the Slate
.SS Synopsis
diff --git a/deps/npm/man/man7/scope.7 b/deps/npm/man/man7/scope.7
index 534b064c89b1..fcbff4d89247 100644
--- a/deps/npm/man/man7/scope.7
+++ b/deps/npm/man/man7/scope.7
@@ -1,4 +1,4 @@
-.TH "SCOPE" "7" "December 2020" "" ""
+.TH "SCOPE" "7" "January 2021" "" ""
.SH "NAME"
\fBscope\fR \- Scoped packages
.SS Description
diff --git a/deps/npm/man/man7/scripts.7 b/deps/npm/man/man7/scripts.7
index b062f4ea1cda..b00c208140b0 100644
--- a/deps/npm/man/man7/scripts.7
+++ b/deps/npm/man/man7/scripts.7
@@ -1,4 +1,4 @@
-.TH "SCRIPTS" "7" "December 2020" "" ""
+.TH "SCRIPTS" "7" "January 2021" "" ""
.SH "NAME"
\fBscripts\fR \- How npm handles the "scripts" field
.SS Description
diff --git a/deps/npm/man/man7/semver.7 b/deps/npm/man/man7/semver.7
index 0a08bf9abb3e..1a271545d1e1 100644
--- a/deps/npm/man/man7/semver.7
+++ b/deps/npm/man/man7/semver.7
@@ -1,4 +1,4 @@
-.TH "SEMVER" "7" "December 2020" "" ""
+.TH "SEMVER" "7" "January 2021" "" ""
.SH "NAME"
\fBsemver\fR \- The semantic versioner for npm
.SH Install
diff --git a/deps/npm/man/man7/workspaces.7 b/deps/npm/man/man7/workspaces.7
index ade7d238bd61..c2b3e30e539c 100644
--- a/deps/npm/man/man7/workspaces.7
+++ b/deps/npm/man/man7/workspaces.7
@@ -1,4 +1,4 @@
-.TH "WORKSPACES" "7" "December 2020" "" ""
+.TH "WORKSPACES" "7" "January 2021" "" ""
.SH "NAME"
\fBworkspaces\fR \- Working with workspaces
.SS Description
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js
index f4f3ca12b701..9c52d009d6fd 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js
@@ -49,6 +49,7 @@ module.exports = cls => class Builder extends cls {
rebuildBundle = true,
} = options
+ this.scriptsRun = new Set()
this[_binLinks] = binLinks
this[_ignoreScripts] = !!ignoreScripts
this[_scriptShell] = scriptShell
@@ -241,6 +242,8 @@ module.exports = cls => class Builder extends cls {
return
process.emit('time', `build:run:${event}`)
+ const stdio = this.options.foregroundScripts ? 'inherit' : 'pipe'
+ const limit = this.options.foregroundScripts ? 1 : undefined
await promiseCallLimit(queue.map(node => async () => {
const {
path,
@@ -261,27 +264,41 @@ module.exports = cls => class Builder extends cls {
const timer = `build:run:${event}:${location}`
process.emit('time', timer)
this.log.info('run', pkg._id, event, location, pkg.scripts[event])
- const p = runScript({
+ const env = {
+ npm_package_resolved: resolved,
+ npm_package_integrity: integrity,
+ npm_package_json: resolve(path, 'package.json'),
+ npm_package_optional: boolEnv(optional),
+ npm_package_dev: boolEnv(dev),
+ npm_package_peer: boolEnv(peer),
+ npm_package_dev_optional:
+ boolEnv(devOptional && !dev && !optional),
+ }
+ const runOpts = {
event,
path,
pkg,
stdioString: true,
- env: {
- npm_package_resolved: resolved,
- npm_package_integrity: integrity,
- npm_package_json: resolve(path, 'package.json'),
- npm_package_optional: boolEnv(optional),
- npm_package_dev: boolEnv(dev),
- npm_package_peer: boolEnv(peer),
- npm_package_dev_optional:
- boolEnv(devOptional && !dev && !optional),
- },
+ stdio,
+ env,
scriptShell: this[_scriptShell],
- }).catch(er => {
+ }
+ const p = runScript(runOpts).catch(er => {
const { code, signal } = er
this.log.info('run', pkg._id, event, {code, signal})
throw er
- }).then(({code, signal}) => {
+ }).then(({args, code, signal, stdout, stderr}) => {
+ this.scriptsRun.add({
+ pkg,
+ path,
+ event,
+ cmd: args && args[args.length - 1],
+ env,
+ code,
+ signal,
+ stdout,
+ stderr,
+ })
this.log.info('run', pkg._id, event, {code, signal})
})
@@ -290,7 +307,7 @@ module.exports = cls => class Builder extends cls {
: p)
process.emit('timeEnd', timer)
- }))
+ }), limit)
process.emit('timeEnd', `build:run:${event}`)
}
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js
index 1f979ba1402c..661d879eb19e 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js
@@ -66,6 +66,7 @@ const _copyIdealToActual = Symbol('copyIdealToActual')
const _addOmitsToTrashList = Symbol('addOmitsToTrashList')
const _packageLockOnly = Symbol('packageLockOnly')
const _dryRun = Symbol('dryRun')
+const _validatePath = Symbol('validatePath')
const _reifyPackages = Symbol('reifyPackages')
const _omitDev = Symbol('omitDev')
@@ -120,7 +121,8 @@ module.exports = cls => class Reifier extends cls {
// start tracker block
this.addTracker('reify')
process.emit('time', 'reify')
- await this[_loadTrees](options)
+ await this[_validatePath]()
+ .then(() => this[_loadTrees](options))
.then(() => this[_diffTrees]())
.then(() => this[_reifyPackages]())
.then(() => this[_saveIdealTree](options))
@@ -132,6 +134,14 @@ module.exports = cls => class Reifier extends cls {
return treeCheck(this.actualTree)
}
+ async [_validatePath] () {
+ // don't create missing dirs on dry runs
+ if (this[_packageLockOnly] || this[_dryRun] || this[_global])
+ return
+
+ await mkdirp(resolve(this.path))
+ }
+
async [_reifyPackages] () {
// we don't submit the audit report or write to disk on dry runs
if (this[_dryRun])
diff --git a/deps/npm/node_modules/@npmcli/arborist/package.json b/deps/npm/node_modules/@npmcli/arborist/package.json
index b8b27c29fdf3..6300a5e867d4 100644
--- a/deps/npm/node_modules/@npmcli/arborist/package.json
+++ b/deps/npm/node_modules/@npmcli/arborist/package.json
@@ -1,6 +1,6 @@
{
"name": "@npmcli/arborist",
- "version": "2.0.2",
+ "version": "2.0.3",
"description": "Manage node_modules trees",
"dependencies": {
"@npmcli/installed-package-contents": "^1.0.5",
@@ -19,13 +19,14 @@
"npm-install-checks": "^4.0.0",
"npm-package-arg": "^8.1.0",
"npm-pick-manifest": "^6.1.0",
- "pacote": "^11.1.13",
+ "pacote": "^11.1.14",
"parse-conflict-json": "^1.1.1",
"promise-all-reject-late": "^1.0.0",
"promise-call-limit": "^1.0.1",
"read-package-json-fast": "^1.2.1",
"readdir-scoped-modules": "^1.1.0",
"semver": "^7.3.4",
+ "tar": "^6.1.0",
"treeverse": "^1.0.4",
"walk-up-path": "^1.0.0"
},
diff --git a/deps/npm/node_modules/pacote/lib/fetcher.js b/deps/npm/node_modules/pacote/lib/fetcher.js
index 5142bb280a70..33fbf79c61b6 100644
--- a/deps/npm/node_modules/pacote/lib/fetcher.js
+++ b/deps/npm/node_modules/pacote/lib/fetcher.js
@@ -75,7 +75,12 @@ class FetcherBase {
this.type = this.constructor.name
this.fmode = opts.fmode || 0o666
this.dmode = opts.dmode || 0o777
- this.umask = opts.umask || 0o022
+ // we don't need a default umask, because we don't chmod files coming
+ // out of package tarballs. they're forced to have a mode that is
+ // valid, regardless of what's in the tarball entry, and then we let
+ // the process's umask setting do its job. but if configured, we do
+ // respect it.
+ this.umask = opts.umask || 0
this.log = opts.log || procLog
this.preferOnline = !!opts.preferOnline
@@ -290,7 +295,7 @@ class FetcherBase {
return cacache.rm.content(this.cache, this.integrity, this.opts)
}
- [_chown] (path, uid, gid) {
+ async [_chown] (path, uid, gid) {
return selfOwner && (selfOwner.gid !== gid || selfOwner.uid !== uid)
? chownr(path, uid, gid)
: /* istanbul ignore next - we don't test in root-owned folders */ null
@@ -388,13 +393,15 @@ class FetcherBase {
// make sure package bins are executable
const exe = isPackageBin(this.package, path) ? 0o111 : 0
- return ((mode | m) & ~this.umask) | exe
+ // always ensure that files are read/writable by the owner
+ return ((mode | m) & ~this.umask) | exe | 0o600
}
[_tarxOptions] ({ cwd, uid, gid }) {
const sawIgnores = new Set()
return {
cwd,
+ noChmod: true,
filter: (name, entry) => {
if (/Link$/.test(entry.type))
return false
diff --git a/deps/npm/node_modules/pacote/package.json b/deps/npm/node_modules/pacote/package.json
index bef19b66228a..085e8f66af17 100644
--- a/deps/npm/node_modules/pacote/package.json
+++ b/deps/npm/node_modules/pacote/package.json
@@ -1,6 +1,6 @@
{
"name": "pacote",
- "version": "11.1.13",
+ "version": "11.1.14",
"description": "JavaScript package downloader",
"author": "Isaac Z. Schlueter (https://izs.me)",
"bin": {
@@ -54,7 +54,7 @@
"read-package-json-fast": "^1.1.3",
"rimraf": "^3.0.2",
"ssri": "^8.0.0",
- "tar": "^6.0.1"
+ "tar": "^6.1.0"
},
"engines": {
"node": ">=10"
diff --git a/deps/npm/node_modules/tar/README.md b/deps/npm/node_modules/tar/README.md
index 1d6969405272..42afb1aa7d1a 100644
--- a/deps/npm/node_modules/tar/README.md
+++ b/deps/npm/node_modules/tar/README.md
@@ -1,7 +1,5 @@
# node-tar
-[](https://travis-ci.org/npm/node-tar)
-
[Fast](./benchmarks) and full-featured Tar for Node.js
The API is designed to mimic the behavior of `tar(1)` on unix systems.
@@ -304,7 +302,6 @@ The following options are supported:
- `mtime` Set to a `Date` object to force a specific `mtime` for
everything added to the archive. Overridden by `noMtime`.
-
The following options are mostly internal, but can be modified in some
advanced use cases, such as re-using caches between runs.
@@ -398,6 +395,13 @@ The following options are supported:
the `filter` option described above.)
- `onentry` A function that gets called with `(entry)` for each entry
that passes the filter.
+- `onwarn` A function that will get called with `(code, message, data)` for
+ any warnings encountered. (See "Warnings and Errors")
+- `noChmod` Set to true to omit calling `fs.chmod()` to ensure that the
+ extracted file matches the entry mode. This also suppresses the call to
+ `process.umask()` to determine the default umask value, since tar will
+ extract with whatever mode is provided, and let the process `umask` apply
+ normally.
The following options are mostly internal, but can be modified in some
advanced use cases, such as re-using caches between runs.
@@ -453,6 +457,8 @@ The following options are supported:
the call to `onentry`. Set `noResume: true` to suppress this
behavior. Note that by opting into this, the stream will never
complete until the entry data is consumed.
+- `onwarn` A function that will get called with `(code, message, data)` for
+ any warnings encountered. (See "Warnings and Errors")
### tar.u(options, fileList, callback) [alias: tar.update]
@@ -710,6 +716,11 @@ Most unpack errors will cause a `warn` event to be emitted. If the
that passes the filter.
- `onwarn` A function that will get called with `(code, message, data)` for
any warnings encountered. (See "Warnings and Errors")
+- `noChmod` Set to true to omit calling `fs.chmod()` to ensure that the
+ extracted file matches the entry mode. This also suppresses the call to
+ `process.umask()` to determine the default umask value, since tar will
+ extract with whatever mode is provided, and let the process `umask` apply
+ normally.
### class tar.Unpack.Sync
diff --git a/deps/npm/node_modules/tar/lib/create.js b/deps/npm/node_modules/tar/lib/create.js
index a37aa52e6d4c..d033640ac3b6 100644
--- a/deps/npm/node_modules/tar/lib/create.js
+++ b/deps/npm/node_modules/tar/lib/create.js
@@ -4,12 +4,11 @@
const hlo = require('./high-level-opt.js')
const Pack = require('./pack.js')
-const fs = require('fs')
const fsm = require('fs-minipass')
const t = require('./list.js')
const path = require('path')
-const c = module.exports = (opt_, files, cb) => {
+module.exports = (opt_, files, cb) => {
if (typeof files === 'function')
cb = files
@@ -38,7 +37,7 @@ const c = module.exports = (opt_, files, cb) => {
const createFileSync = (opt, files) => {
const p = new Pack.Sync(opt)
const stream = new fsm.WriteStreamSync(opt.file, {
- mode: opt.mode || 0o666
+ mode: opt.mode || 0o666,
})
p.pipe(stream)
addFilesSync(p, files)
@@ -47,7 +46,7 @@ const createFileSync = (opt, files) => {
const createFile = (opt, files, cb) => {
const p = new Pack(opt)
const stream = new fsm.WriteStream(opt.file, {
- mode: opt.mode || 0o666
+ mode: opt.mode || 0o666,
})
p.pipe(stream)
@@ -64,14 +63,14 @@ const createFile = (opt, files, cb) => {
const addFilesSync = (p, files) => {
files.forEach(file => {
- if (file.charAt(0) === '@')
+ if (file.charAt(0) === '@') {
t({
file: path.resolve(p.cwd, file.substr(1)),
sync: true,
noResume: true,
- onentry: entry => p.add(entry)
+ onentry: entry => p.add(entry),
})
- else
+ } else
p.add(file)
})
p.end()
@@ -80,13 +79,13 @@ const addFilesSync = (p, files) => {
const addFilesAsync = (p, files) => {
while (files.length) {
const file = files.shift()
- if (file.charAt(0) === '@')
+ if (file.charAt(0) === '@') {
return t({
file: path.resolve(p.cwd, file.substr(1)),
noResume: true,
- onentry: entry => p.add(entry)
+ onentry: entry => p.add(entry),
}).then(_ => addFilesAsync(p, files))
- else
+ } else
p.add(file)
}
p.end()
diff --git a/deps/npm/node_modules/tar/lib/extract.js b/deps/npm/node_modules/tar/lib/extract.js
index cbb458a0a41e..f269145edef7 100644
--- a/deps/npm/node_modules/tar/lib/extract.js
+++ b/deps/npm/node_modules/tar/lib/extract.js
@@ -7,7 +7,7 @@ const fs = require('fs')
const fsm = require('fs-minipass')
const path = require('path')
-const x = module.exports = (opt_, files, cb) => {
+module.exports = (opt_, files, cb) => {
if (typeof opt_ === 'function')
cb = opt_, files = null, opt_ = {}
else if (Array.isArray(opt_))
@@ -63,22 +63,20 @@ const extractFileSync = opt => {
const u = new Unpack.Sync(opt)
const file = opt.file
- let threw = true
- let fd
const stat = fs.statSync(file)
// This trades a zero-byte read() syscall for a stat
// However, it will usually result in less memory allocation
- const readSize = opt.maxReadSize || 16*1024*1024
+ const readSize = opt.maxReadSize || 16 * 1024 * 1024
const stream = new fsm.ReadStreamSync(file, {
readSize: readSize,
- size: stat.size
+ size: stat.size,
})
stream.pipe(u)
}
const extractFile = (opt, cb) => {
const u = new Unpack(opt)
- const readSize = opt.maxReadSize || 16*1024*1024
+ const readSize = opt.maxReadSize || 16 * 1024 * 1024
const file = opt.file
const p = new Promise((resolve, reject) => {
@@ -93,7 +91,7 @@ const extractFile = (opt, cb) => {
else {
const stream = new fsm.ReadStream(file, {
readSize: readSize,
- size: stat.size
+ size: stat.size,
})
stream.on('error', reject)
stream.pipe(u)
@@ -103,10 +101,6 @@ const extractFile = (opt, cb) => {
return cb ? p.then(cb, cb) : p
}
-const extractSync = opt => {
- return new Unpack.Sync(opt)
-}
+const extractSync = opt => new Unpack.Sync(opt)
-const extract = opt => {
- return new Unpack(opt)
-}
+const extract = opt => new Unpack(opt)
diff --git a/deps/npm/node_modules/tar/lib/header.js b/deps/npm/node_modules/tar/lib/header.js
index 5d88f6cf8268..129504048dfa 100644
--- a/deps/npm/node_modules/tar/lib/header.js
+++ b/deps/npm/node_modules/tar/lib/header.js
@@ -95,19 +95,19 @@ class Header {
}
let sum = 8 * 0x20
- for (let i = off; i < off + 148; i++) {
+ for (let i = off; i < off + 148; i++)
sum += buf[i]
- }
- for (let i = off + 156; i < off + 512; i++) {
+
+ for (let i = off + 156; i < off + 512; i++)
sum += buf[i]
- }
+
this.cksumValid = sum === this.cksum
if (this.cksum === null && sum === 8 * 0x20)
this.nullBlock = true
}
[SLURP] (ex, global) {
- for (let k in ex) {
+ for (const k in ex) {
// we slurp in everything except for the path attribute in
// a global extended header, because that's weird.
if (ex[k] !== null && ex[k] !== undefined &&
@@ -157,12 +157,12 @@ class Header {
}
let sum = 8 * 0x20
- for (let i = off; i < off + 148; i++) {
+ for (let i = off; i < off + 148; i++)
sum += buf[i]
- }
- for (let i = off + 156; i < off + 512; i++) {
+
+ for (let i = off + 156; i < off + 512; i++)
sum += buf[i]
- }
+
this.cksum = sum
encNumber(buf, off + 148, 8, this.cksum)
this.cksumValid = true
@@ -171,7 +171,7 @@ class Header {
}
set (data) {
- for (let i in data) {
+ for (const i in data) {
if (data[i] !== null && data[i] !== undefined)
this[i] = data[i]
}
@@ -242,7 +242,7 @@ const numToDate = num => num === null ? null : new Date(num * 1000)
const decNumber = (buf, off, size) =>
buf[off] & 0x80 ? large.parse(buf.slice(off, off + size))
- : decSmallNumber(buf, off, size)
+ : decSmallNumber(buf, off, size)
const nanNull = value => isNaN(value) ? null : value
@@ -254,7 +254,7 @@ const decSmallNumber = (buf, off, size) =>
// the maximum encodable as a null-terminated octal, by field size
const MAXNUM = {
12: 0o77777777777,
- 8 : 0o7777777
+ 8: 0o7777777,
}
const encNumber = (buf, off, size, number) =>
@@ -283,6 +283,6 @@ const NULLS = new Array(156).join('\0')
const encString = (buf, off, size, string) =>
string === null ? false :
(buf.write(string + NULLS, off, size, 'utf8'),
- string.length !== Buffer.byteLength(string) || string.length > size)
+ string.length !== Buffer.byteLength(string) || string.length > size)
module.exports = Header
diff --git a/deps/npm/node_modules/tar/lib/high-level-opt.js b/deps/npm/node_modules/tar/lib/high-level-opt.js
index 7333db915c0b..40e44180e166 100644
--- a/deps/npm/node_modules/tar/lib/high-level-opt.js
+++ b/deps/npm/node_modules/tar/lib/high-level-opt.js
@@ -21,9 +21,9 @@ const argmap = new Map([
['no-mtime', 'noMtime'],
['p', 'preserveOwner'],
['L', 'follow'],
- ['h', 'follow']
+ ['h', 'follow'],
])
-const parse = module.exports = opt => opt ? Object.keys(opt).map(k => [
- argmap.has(k) ? argmap.get(k) : k, opt[k]
+module.exports = opt => opt ? Object.keys(opt).map(k => [
+ argmap.has(k) ? argmap.get(k) : k, opt[k],
]).reduce((set, kv) => (set[kv[0]] = kv[1], set), Object.create(null)) : {}
diff --git a/deps/npm/node_modules/tar/lib/large-numbers.js b/deps/npm/node_modules/tar/lib/large-numbers.js
index ad30bc350b32..dd6f690b9a8d 100644
--- a/deps/npm/node_modules/tar/lib/large-numbers.js
+++ b/deps/npm/node_modules/tar/lib/large-numbers.js
@@ -2,7 +2,7 @@
// Tar can encode large and negative numbers using a leading byte of
// 0xff for negative, and 0x80 for positive.
-const encode = exports.encode = (num, buf) => {
+const encode = (num, buf) => {
if (!Number.isSafeInteger(num))
// The number is so large that javascript cannot represent it with integer
// precision.
@@ -18,7 +18,7 @@ const encodePositive = (num, buf) => {
buf[0] = 0x80
for (var i = buf.length; i > 1; i--) {
- buf[i-1] = num & 0xff
+ buf[i - 1] = num & 0xff
num = Math.floor(num / 0x100)
}
}
@@ -31,25 +31,22 @@ const encodeNegative = (num, buf) => {
var byte = num & 0xff
num = Math.floor(num / 0x100)
if (flipped)
- buf[i-1] = onesComp(byte)
+ buf[i - 1] = onesComp(byte)
else if (byte === 0)
- buf[i-1] = 0
+ buf[i - 1] = 0
else {
flipped = true
- buf[i-1] = twosComp(byte)
+ buf[i - 1] = twosComp(byte)
}
}
}
-const parse = exports.parse = (buf) => {
- var post = buf[buf.length - 1]
- var pre = buf[0]
- var value;
- if (pre === 0x80)
- value = pos(buf.slice(1, buf.length))
- else if (pre === 0xff)
- value = twos(buf)
- else
+const parse = (buf) => {
+ const pre = buf[0]
+ const value = pre === 0x80 ? pos(buf.slice(1, buf.length))
+ : pre === 0xff ? twos(buf)
+ : null
+ if (value === null)
throw Error('invalid base256 encoding')
if (!Number.isSafeInteger(value))
@@ -95,3 +92,8 @@ const pos = (buf) => {
const onesComp = byte => (0xff ^ byte) & 0xff
const twosComp = byte => ((0xff ^ byte) + 1) & 0xff
+
+module.exports = {
+ encode,
+ parse,
+}
diff --git a/deps/npm/node_modules/tar/lib/list.js b/deps/npm/node_modules/tar/lib/list.js
index 9da3f812c38c..702cfea808d4 100644
--- a/deps/npm/node_modules/tar/lib/list.js
+++ b/deps/npm/node_modules/tar/lib/list.js
@@ -10,7 +10,7 @@ const fs = require('fs')
const fsm = require('fs-minipass')
const path = require('path')
-const t = module.exports = (opt_, files, cb) => {
+module.exports = (opt_, files, cb) => {
if (typeof opt_ === 'function')
cb = opt_, files = null, opt_ = {}
else if (Array.isArray(opt_))
@@ -79,15 +79,15 @@ const listFileSync = opt => {
let fd
try {
const stat = fs.statSync(file)
- const readSize = opt.maxReadSize || 16*1024*1024
- if (stat.size < readSize) {
+ const readSize = opt.maxReadSize || 16 * 1024 * 1024
+ if (stat.size < readSize)
p.end(fs.readFileSync(file))
- } else {
+ else {
let pos = 0
const buf = Buffer.allocUnsafe(readSize)
fd = fs.openSync(file, 'r')
while (pos < stat.size) {
- let bytesRead = fs.readSync(fd, buf, 0, readSize, pos)
+ const bytesRead = fs.readSync(fd, buf, 0, readSize, pos)
pos += bytesRead
p.write(buf.slice(0, bytesRead))
}
@@ -95,14 +95,17 @@ const listFileSync = opt => {
}
threw = false
} finally {
- if (threw && fd)
- try { fs.closeSync(fd) } catch (er) {}
+ if (threw && fd) {
+ try {
+ fs.closeSync(fd)
+ } catch (er) {}
+ }
}
}
const listFile = (opt, cb) => {
const parse = new Parser(opt)
- const readSize = opt.maxReadSize || 16*1024*1024
+ const readSize = opt.maxReadSize || 16 * 1024 * 1024
const file = opt.file
const p = new Promise((resolve, reject) => {
@@ -115,7 +118,7 @@ const listFile = (opt, cb) => {
else {
const stream = new fsm.ReadStream(file, {
readSize: readSize,
- size: stat.size
+ size: stat.size,
})
stream.on('error', reject)
stream.pipe(parse)
diff --git a/deps/npm/node_modules/tar/lib/mkdir.js b/deps/npm/node_modules/tar/lib/mkdir.js
index 381d0e1b3df7..aed398fcdcd4 100644
--- a/deps/npm/node_modules/tar/lib/mkdir.js
+++ b/deps/npm/node_modules/tar/lib/mkdir.js
@@ -33,7 +33,7 @@ class CwdError extends Error {
}
}
-const mkdir = module.exports = (dir, opt, cb) => {
+module.exports = (dir, opt, cb) => {
// if there's any overlap between mask and mode,
// then we'll need an explicit chmod
const umask = opt.umask
@@ -44,7 +44,7 @@ const mkdir = module.exports = (dir, opt, cb) => {
const gid = opt.gid
const doChown = typeof uid === 'number' &&
typeof gid === 'number' &&
- ( uid !== opt.processUid || gid !== opt.processGid )
+ (uid !== opt.processUid || gid !== opt.processGid)
const preserve = opt.preserve
const unlink = opt.unlink
@@ -68,12 +68,13 @@ const mkdir = module.exports = (dir, opt, cb) => {
if (cache && cache.get(dir) === true)
return done()
- if (dir === cwd)
+ if (dir === cwd) {
return fs.stat(dir, (er, st) => {
if (er || !st.isDirectory())
er = new CwdError(dir, er && er.code || 'ENOTDIR')
done(er)
})
+ }
if (preserve)
return mkdirp(dir, {mode}).then(made => done(null, made), done)
@@ -104,13 +105,13 @@ const onmkdir = (part, parts, mode, cache, unlink, cwd, created, cb) => er => {
cb(statEr)
else if (st.isDirectory())
mkdir_(part, parts, mode, cache, unlink, cwd, created, cb)
- else if (unlink)
+ else if (unlink) {
fs.unlink(part, er => {
if (er)
return cb(er)
fs.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink, cwd, created, cb))
})
- else if (st.isSymbolicLink())
+ } else if (st.isSymbolicLink())
return cb(new SymlinkError(part, part + '/' + parts.join('/')))
else
cb(er)
@@ -121,7 +122,7 @@ const onmkdir = (part, parts, mode, cache, unlink, cwd, created, cb) => er => {
}
}
-const mkdirSync = module.exports.sync = (dir, opt) => {
+module.exports.sync = (dir, opt) => {
// if there's any overlap between mask and mode,
// then we'll need an explicit chmod
const umask = opt.umask
@@ -132,7 +133,7 @@ const mkdirSync = module.exports.sync = (dir, opt) => {
const gid = opt.gid
const doChown = typeof uid === 'number' &&
typeof gid === 'number' &&
- ( uid !== opt.processUid || gid !== opt.processGid )
+ (uid !== opt.processUid || gid !== opt.processGid)
const preserve = opt.preserve
const unlink = opt.unlink
@@ -172,9 +173,8 @@ const mkdirSync = module.exports.sync = (dir, opt) => {
const parts = sub.split(/\/|\\/)
let created = null
for (let p = parts.shift(), part = cwd;
- p && (part += '/' + p);
- p = parts.shift()) {
-
+ p && (part += '/' + p);
+ p = parts.shift()) {
if (cache.get(part))
continue
diff --git a/deps/npm/node_modules/tar/lib/mode-fix.js b/deps/npm/node_modules/tar/lib/mode-fix.js
index c3758741c45a..6a045ffcaec5 100644
--- a/deps/npm/node_modules/tar/lib/mode-fix.js
+++ b/deps/npm/node_modules/tar/lib/mode-fix.js
@@ -7,9 +7,8 @@ module.exports = (mode, isDir, portable) => {
// (as some linux distros do), then we'll write the
// archive with 0o644 instead. Also, don't ever create
// a file that is not readable/writable by the owner.
- if (portable) {
- mode = (mode | 0o600) &~0o22
- }
+ if (portable)
+ mode = (mode | 0o600) & ~0o22
// if dirs are readable, then they should be listable
if (isDir) {
diff --git a/deps/npm/node_modules/tar/lib/pack.js b/deps/npm/node_modules/tar/lib/pack.js
index 0fca4ae2573a..492fe18ec47e 100644
--- a/deps/npm/node_modules/tar/lib/pack.js
+++ b/deps/npm/node_modules/tar/lib/pack.js
@@ -97,7 +97,7 @@ const Pack = warner(class Pack extends MiniPass {
this.filter = typeof opt.filter === 'function' ? opt.filter : _ => true
- this[QUEUE] = new Yallist
+ this[QUEUE] = new Yallist()
this[JOBS] = 0
this.jobs = +opt.jobs || 4
this[PROCESSING] = false
@@ -209,8 +209,8 @@ const Pack = warner(class Pack extends MiniPass {
this[PROCESSING] = true
for (let w = this[QUEUE].head;
- w !== null && this[JOBS] < this.jobs;
- w = w.next) {
+ w !== null && this[JOBS] < this.jobs;
+ w = w.next) {
this[PROCESSJOB](w.value)
if (w.value.ignore) {
const p = w.next
@@ -297,7 +297,7 @@ const Pack = warner(class Pack extends MiniPass {
linkCache: this.linkCache,
statCache: this.statCache,
noMtime: this.noMtime,
- mtime: this.mtime
+ mtime: this.mtime,
}
}
@@ -321,7 +321,7 @@ const Pack = warner(class Pack extends MiniPass {
[PIPE] (job) {
job.piped = true
- if (job.readdir)
+ if (job.readdir) {
job.readdir.forEach(entry => {
const p = this.prefix ?
job.path.slice(this.prefix.length + 1) || './'
@@ -330,20 +330,22 @@ const Pack = warner(class Pack extends MiniPass {
const base = p === './' ? '' : p.replace(/\/*$/, '/')
this[ADDFSENTRY](base + entry)
})
+ }
const source = job.entry
const zip = this.zip
- if (zip)
+ if (zip) {
source.on('data', chunk => {
if (!zip.write(chunk))
source.pause()
})
- else
+ } else {
source.on('data', chunk => {
if (!super.write(chunk))
source.pause()
})
+ }
}
pause () {
@@ -377,7 +379,7 @@ class PackSync extends Pack {
const source = job.entry
const zip = this.zip
- if (job.readdir)
+ if (job.readdir) {
job.readdir.forEach(entry => {
const p = this.prefix ?
job.path.slice(this.prefix.length + 1) || './'
@@ -386,15 +388,17 @@ class PackSync extends Pack {
const base = p === './' ? '' : p.replace(/\/*$/, '/')
this[ADDFSENTRY](base + entry)
})
+ }
- if (zip)
+ if (zip) {
source.on('data', chunk => {
zip.write(chunk)
})
- else
+ } else {
source.on('data', chunk => {
super[WRITE](chunk)
})
+ }
}
}
diff --git a/deps/npm/node_modules/tar/lib/parse.js b/deps/npm/node_modules/tar/lib/parse.js
index d9a49ad1ff96..b1b4e7e47577 100644
--- a/deps/npm/node_modules/tar/lib/parse.js
+++ b/deps/npm/node_modules/tar/lib/parse.js
@@ -21,7 +21,6 @@
// ignored entries get .resume() called on them straight away
const warner = require('./warn-mixin.js')
-const path = require('path')
const Header = require('./header.js')
const EE = require('events')
const Yallist = require('yallist')
@@ -85,13 +84,14 @@ module.exports = warner(class Parser extends EE {
if (opt.ondone)
this.on(DONE, opt.ondone)
- else
+ else {
this.on(DONE, _ => {
this.emit('prefinish')
this.emit('finish')
this.emit('end')
this.emit('close')
})
+ }
this.strict = !!opt.strict
this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize
@@ -166,9 +166,8 @@ module.exports = warner(class Parser extends EE {
this[SAW_VALID_ENTRY] = true
}
entry.on('end', onend)
- } else {
+ } else
this[SAW_VALID_ENTRY] = true
- }
}
if (entry.meta) {
@@ -249,7 +248,7 @@ module.exports = warner(class Parser extends EE {
this.emit('drain')
} else
re.once('drain', _ => this.emit('drain'))
- }
+ }
}
[CONSUMEBODY] (chunk, position) {
@@ -352,7 +351,7 @@ module.exports = warner(class Parser extends EE {
this[CONSUMECHUNK]()
})
this[WRITING] = true
- const ret = this[UNZIP][ended ? 'end' : 'write' ](chunk)
+ const ret = this[UNZIP][ended ? 'end' : 'write'](chunk)
this[WRITING] = false
return ret
}
@@ -415,9 +414,8 @@ module.exports = warner(class Parser extends EE {
const c = this[BUFFER]
this[BUFFER] = null
this[CONSUMECHUNKSUB](c)
- } else {
+ } else
this[CONSUMECHUNKSUB](chunk)
- }
while (this[BUFFER] &&
this[BUFFER].length >= 512 &&
@@ -438,7 +436,7 @@ module.exports = warner(class Parser extends EE {
// we know that we are in CONSUMING mode, so anything written goes into
// the buffer. Advance the position and put any remainder in the buffer.
let position = 0
- let length = chunk.length
+ const length = chunk.length
while (position + 512 <= length && !this[ABORTED] && !this[SAW_EOF]) {
switch (this[STATE]) {
case 'begin':
diff --git a/deps/npm/node_modules/tar/lib/path-reservations.js b/deps/npm/node_modules/tar/lib/path-reservations.js
index 3cf0c2c121b6..c0a16b0a1f90 100644
--- a/deps/npm/node_modules/tar/lib/path-reservations.js
+++ b/deps/npm/node_modules/tar/lib/path-reservations.js
@@ -20,8 +20,8 @@ module.exports = () => {
// return a set of parent dirs for a given path
const { join } = require('path')
const getDirs = path =>
- join(path).split(/[\\\/]/).slice(0, -1).reduce((set, path) =>
- set.length ? set.concat(join(set[set.length-1], path)) : [path], [])
+ join(path).split(/[\\/]/).slice(0, -1).reduce((set, path) =>
+ set.length ? set.concat(join(set[set.length - 1], path)) : [path], [])
// functions currently running
const running = new Set()
@@ -80,9 +80,9 @@ module.exports = () => {
dirs.forEach(dir => {
const q = queues.get(dir)
assert(q[0] instanceof Set)
- if (q[0].size === 1 && q.length === 1) {
+ if (q[0].size === 1 && q.length === 1)
queues.delete(dir)
- } else if (q[0].size === 1) {
+ else if (q[0].size === 1) {
q.shift()
// must be a function or else the Set would've been reused
@@ -112,8 +112,8 @@ module.exports = () => {
const q = queues.get(dir)
if (!q)
queues.set(dir, [new Set([fn])])
- else if (q[q.length-1] instanceof Set)
- q[q.length-1].add(fn)
+ else if (q[q.length - 1] instanceof Set)
+ q[q.length - 1].add(fn)
else
q.push(new Set([fn]))
})
diff --git a/deps/npm/node_modules/tar/lib/pax.js b/deps/npm/node_modules/tar/lib/pax.js
index 214a459f3bdd..7768c7b454f7 100644
--- a/deps/npm/node_modules/tar/lib/pax.js
+++ b/deps/npm/node_modules/tar/lib/pax.js
@@ -34,9 +34,8 @@ class Pax {
const buf = Buffer.allocUnsafe(bufLen)
// 0-fill the header section, it might not hit every field
- for (let i = 0; i < 512; i++) {
+ for (let i = 0; i < 512; i++)
buf[i] = 0
- }
new Header({
// XXX split the path
@@ -55,15 +54,14 @@ class Pax {
devmaj: 0,
devmin: 0,
atime: this.atime || null,
- ctime: this.ctime || null
+ ctime: this.ctime || null,
}).encode(buf)
buf.write(body, 512, bodyLen, 'utf8')
// null pad after the body
- for (let i = bodyLen + 512; i < buf.length; i++) {
+ for (let i = bodyLen + 512; i < buf.length; i++)
buf[i] = 0
- }
return buf
}
@@ -95,7 +93,7 @@ class Pax {
: this[field]
const s = ' ' +
(field === 'dev' || field === 'ino' || field === 'nlink'
- ? 'SCHILY.' : '') +
+ ? 'SCHILY.' : '') +
field + '=' + v + '\n'
const byteLen = Buffer.byteLength(s)
// the digits includes the length of the digits in ascii base-10
@@ -136,7 +134,7 @@ const parseKVLine = (set, line) => {
const v = kv.join('=')
set[k] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(k)
- ? new Date(v * 1000)
+ ? new Date(v * 1000)
: /^[0-9]+$/.test(v) ? +v
: v
return set
diff --git a/deps/npm/node_modules/tar/lib/read-entry.js b/deps/npm/node_modules/tar/lib/read-entry.js
index 8acee94baced..6661cba5ff9e 100644
--- a/deps/npm/node_modules/tar/lib/read-entry.js
+++ b/deps/npm/node_modules/tar/lib/read-entry.js
@@ -1,5 +1,4 @@
'use strict'
-const types = require('./types.js')
const MiniPass = require('minipass')
const SLURP = Symbol('slurp')
@@ -63,8 +62,10 @@ module.exports = class ReadEntry extends MiniPass {
this.uname = header.uname
this.gname = header.gname
- if (ex) this[SLURP](ex)
- if (gex) this[SLURP](gex, true)
+ if (ex)
+ this[SLURP](ex)
+ if (gex)
+ this[SLURP](gex, true)
}
write (data) {
@@ -87,7 +88,7 @@ module.exports = class ReadEntry extends MiniPass {
}
[SLURP] (ex, global) {
- for (let k in ex) {
+ for (const k in ex) {
// we slurp in everything except for the path attribute in
// a global extended header, because that's weird.
if (ex[k] !== null && ex[k] !== undefined &&
diff --git a/deps/npm/node_modules/tar/lib/replace.js b/deps/npm/node_modules/tar/lib/replace.js
index 44126d1f85c4..e5e2a425536d 100644
--- a/deps/npm/node_modules/tar/lib/replace.js
+++ b/deps/npm/node_modules/tar/lib/replace.js
@@ -3,7 +3,6 @@
// tar -r
const hlo = require('./high-level-opt.js')
const Pack = require('./pack.js')
-const Parse = require('./parse.js')
const fs = require('fs')
const fsm = require('fs-minipass')
const t = require('./list.js')
@@ -17,7 +16,7 @@ const path = require('path')
const Header = require('./header.js')
-const r = module.exports = (opt_, files, cb) => {
+module.exports = (opt_, files, cb) => {
const opt = hlo(opt_)
if (!opt.file)
@@ -68,10 +67,10 @@ const replaceSync = (opt, files) => {
break POSITION
}
- let h = new Header(headBuf)
+ const h = new Header(headBuf)
if (!h.cksumValid)
break
- let entryBlockSize = 512 * Math.ceil(h.size / 512)
+ const entryBlockSize = 512 * Math.ceil(h.size / 512)
if (position + entryBlockSize + 512 > st.size)
break
// the 512 for the header we just parsed will be added as well
@@ -84,15 +83,18 @@ const replaceSync = (opt, files) => {
streamSync(opt, p, position, fd, files)
} finally {
- if (threw)
- try { fs.closeSync(fd) } catch (er) {}
+ if (threw) {
+ try {
+ fs.closeSync(fd)
+ } catch (er) {}
+ }
}
}
const streamSync = (opt, p, position, fd, files) => {
const stream = new fsm.WriteStreamSync(opt.file, {
fd: fd,
- start: position
+ start: position,
})
p.pipe(stream)
addFilesSync(p, files)
@@ -120,11 +122,12 @@ const replace = (opt, files, cb) => {
if (er)
return cb(er)
bufPos += bytes
- if (bufPos < 512 && bytes)
+ if (bufPos < 512 && bytes) {
return fs.read(
fd, headBuf, bufPos, headBuf.length - bufPos,
position + bufPos, onread
)
+ }
if (position === 0 && headBuf[0] === 0x1f && headBuf[1] === 0x8b)
return cb(new Error('cannot append to compressed archives'))
@@ -173,7 +176,7 @@ const replace = (opt, files, cb) => {
return reject(er)
const stream = new fsm.WriteStream(opt.file, {
fd: fd,
- start: position
+ start: position,
})
p.pipe(stream)
stream.on('error', reject)
@@ -190,14 +193,14 @@ const replace = (opt, files, cb) => {
const addFilesSync = (p, files) => {
files.forEach(file => {
- if (file.charAt(0) === '@')
+ if (file.charAt(0) === '@') {
t({
file: path.resolve(p.cwd, file.substr(1)),
sync: true,
noResume: true,
- onentry: entry => p.add(entry)
+ onentry: entry => p.add(entry),
})
- else
+ } else
p.add(file)
})
p.end()
@@ -206,13 +209,13 @@ const addFilesSync = (p, files) => {
const addFilesAsync = (p, files) => {
while (files.length) {
const file = files.shift()
- if (file.charAt(0) === '@')
+ if (file.charAt(0) === '@') {
return t({
file: path.resolve(p.cwd, file.substr(1)),
noResume: true,
- onentry: entry => p.add(entry)
+ onentry: entry => p.add(entry),
}).then(_ => addFilesAsync(p, files))
- else
+ } else
p.add(file)
}
p.end()
diff --git a/deps/npm/node_modules/tar/lib/types.js b/deps/npm/node_modules/tar/lib/types.js
index df425652b51d..7bfc254658f4 100644
--- a/deps/npm/node_modules/tar/lib/types.js
+++ b/deps/npm/node_modules/tar/lib/types.js
@@ -37,7 +37,7 @@ exports.name = new Map([
// skip
['V', 'TapeVolumeHeader'],
// like x
- ['X', 'OldExtendedHeader']
+ ['X', 'OldExtendedHeader'],
])
// map the other direction
diff --git a/deps/npm/node_modules/tar/lib/unpack.js b/deps/npm/node_modules/tar/lib/unpack.js
index af0e0ffa059f..7d4b79d9eb3f 100644
--- a/deps/npm/node_modules/tar/lib/unpack.js
+++ b/deps/npm/node_modules/tar/lib/unpack.js
@@ -7,13 +7,11 @@
// clobbering an fs object to create one of a different type.)
const assert = require('assert')
-const EE = require('events').EventEmitter
const Parser = require('./parse.js')
const fs = require('fs')
const fsm = require('fs-minipass')
const path = require('path')
const mkdir = require('./mkdir.js')
-const mkdirSync = mkdir.sync
const wc = require('./winchars.js')
const pathReservations = require('./path-reservations.js')
@@ -28,7 +26,6 @@ const LINK = Symbol('link')
const SYMLINK = Symbol('symlink')
const HARDLINK = Symbol('hardlink')
const UNSUPPORTED = Symbol('unsupported')
-const UNKNOWN = Symbol('unknown')
const CHECKPATH = Symbol('checkPath')
const MKDIR = Symbol('mkdir')
const ONERROR = Symbol('onError')
@@ -121,9 +118,10 @@ class Unpack extends Parser {
// need both or neither
if (typeof opt.uid !== 'number' || typeof opt.gid !== 'number')
throw new TypeError('cannot set owner without number uid and gid')
- if (opt.preserveOwner)
+ if (opt.preserveOwner) {
throw new TypeError(
'cannot preserve owner in archive and also set owner explicitly')
+ }
this.uid = opt.uid
this.gid = opt.gid
this.setOwner = true
@@ -171,11 +169,14 @@ class Unpack extends Parser {
this.cwd = path.resolve(opt.cwd || process.cwd())
this.strip = +opt.strip || 0
- this.processUmask = process.umask()
+ // if we're not chmodding, then we don't need the process umask
+ this.processUmask = opt.noChmod ? 0 : process.umask()
this.umask = typeof opt.umask === 'number' ? opt.umask : this.processUmask
+
// default mode for dirs created as parents
this.dmode = opt.dmode || (0o0777 & (~this.umask))
this.fmode = opt.fmode || (0o0666 & (~this.umask))
+
this.on('entry', entry => this[ONENTRY](entry))
}
@@ -271,6 +272,7 @@ class Unpack extends Parser {
case 'CharacterDevice':
case 'BlockDevice':
case 'FIFO':
+ default:
return this[UNSUPPORTED](entry)
}
}
@@ -299,7 +301,8 @@ class Unpack extends Parser {
unlink: this.unlink,
cache: this.dirCache,
cwd: this.cwd,
- mode: mode
+ mode: mode,
+ noChmod: this.noChmod,
}, cb)
}
@@ -308,11 +311,11 @@ class Unpack extends Parser {
// in set owner mode, chown if setting doesn't match process
return this.forceChown ||
this.preserveOwner &&
- ( typeof entry.uid === 'number' && entry.uid !== this.processUid ||
- typeof entry.gid === 'number' && entry.gid !== this.processGid )
+ (typeof entry.uid === 'number' && entry.uid !== this.processUid ||
+ typeof entry.gid === 'number' && entry.gid !== this.processGid)
||
- ( typeof this.uid === 'number' && this.uid !== this.processUid ||
- typeof this.gid === 'number' && this.gid !== this.processGid )
+ (typeof this.uid === 'number' && this.uid !== this.processUid ||
+ typeof this.gid === 'number' && this.gid !== this.processGid)
}
[UID] (entry) {
@@ -328,7 +331,7 @@ class Unpack extends Parser {
const stream = new fsm.WriteStream(entry.absolute, {
flags: getFlag(entry.size),
mode: mode,
- autoClose: false
+ autoClose: false,
})
stream.on('error', er => this[ONERROR](er, entry))
@@ -460,6 +463,7 @@ class Unpack extends Parser {
paths.push(entry.linkpath)
this.reservations.reserve(paths, done => this[CHECKFS2](entry, done))
}
+
[CHECKFS2] (entry, done) {
this[MKDIR](path.dirname(entry.absolute), this.dmode, er => {
if (er) {
@@ -470,16 +474,17 @@ class Unpack extends Parser {
if (st && (this.keep || this.newer && st.mtime > entry.mtime)) {
this[SKIP](entry)
done()
- } else if (er || this[ISREUSABLE](entry, st)) {
+ } else if (er || this[ISREUSABLE](entry, st))
this[MAKEFS](null, entry, done)
- }
+
else if (st.isDirectory()) {
if (entry.type === 'Directory') {
- if (!entry.mode || (st.mode & 0o7777) === entry.mode)
+ if (!this.noChmod && (!entry.mode || (st.mode & 0o7777) === entry.mode))
this[MAKEFS](null, entry, done)
- else
+ else {
fs.chmod(entry.absolute, entry.mode,
er => this[MAKEFS](er, entry, done))
+ }
} else
fs.rmdir(entry.absolute, er => this[MAKEFS](er, entry, done))
} else
@@ -523,10 +528,6 @@ class Unpack extends Parser {
}
class UnpackSync extends Unpack {
- constructor (opt) {
- super(opt)
- }
-
[CHECKFS] (entry) {
const er = this[MKDIR](path.dirname(entry.absolute), this.dmode, neverCalled)
if (er)
@@ -541,7 +542,7 @@ class UnpackSync extends Unpack {
try {
if (st.isDirectory()) {
if (entry.type === 'Directory') {
- if (entry.mode && (st.mode & 0o7777) !== entry.mode)
+ if (!this.noChmod && entry.mode && (st.mode & 0o7777) !== entry.mode)
fs.chmodSync(entry.absolute, entry.mode)
} else
fs.rmdirSync(entry.absolute)
@@ -571,7 +572,6 @@ class UnpackSync extends Unpack {
this[ONERROR](er || closeError, entry)
}
- let stream
let fd
try {
fd = fs.openSync(entry.absolute, getFlag(entry.size), mode)
@@ -659,7 +659,7 @@ class UnpackSync extends Unpack {
unlink: this.unlink,
cache: this.dirCache,
cwd: this.cwd,
- mode: mode
+ mode: mode,
})
} catch (er) {
return er
diff --git a/deps/npm/node_modules/tar/lib/update.js b/deps/npm/node_modules/tar/lib/update.js
index 16c3e93ed5af..a5784b73f3c7 100644
--- a/deps/npm/node_modules/tar/lib/update.js
+++ b/deps/npm/node_modules/tar/lib/update.js
@@ -6,7 +6,7 @@ const hlo = require('./high-level-opt.js')
const r = require('./replace.js')
// just call tar.r with the filter and mtimeCache
-const u = module.exports = (opt_, files, cb) => {
+module.exports = (opt_, files, cb) => {
const opt = hlo(opt_)
if (!opt.file)
diff --git a/deps/npm/node_modules/tar/lib/warn-mixin.js b/deps/npm/node_modules/tar/lib/warn-mixin.js
index 11eb52cc6474..aeebb531b570 100644
--- a/deps/npm/node_modules/tar/lib/warn-mixin.js
+++ b/deps/npm/node_modules/tar/lib/warn-mixin.js
@@ -13,9 +13,9 @@ module.exports = Base => class extends Base {
message = message.message
}
this.emit('warn', data.tarCode, message, data)
- } else if (message instanceof Error) {
+ } else if (message instanceof Error)
this.emit('error', Object.assign(message, data))
- } else
+ else
this.emit('error', Object.assign(new Error(`${code}: ${message}`), data))
}
}
diff --git a/deps/npm/node_modules/tar/lib/winchars.js b/deps/npm/node_modules/tar/lib/winchars.js
index cf6ea06061c8..ebcab4aed3e5 100644
--- a/deps/npm/node_modules/tar/lib/winchars.js
+++ b/deps/npm/node_modules/tar/lib/winchars.js
@@ -8,7 +8,7 @@ const raw = [
'<',
'>',
'?',
- ':'
+ ':',
]
const win = raw.map(char =>
@@ -19,5 +19,5 @@ const toRaw = new Map(win.map((char, i) => [char, raw[i]]))
module.exports = {
encode: s => raw.reduce((s, c) => s.split(c).join(toWin.get(c)), s),
- decode: s => win.reduce((s, c) => s.split(c).join(toRaw.get(c)), s)
+ decode: s => win.reduce((s, c) => s.split(c).join(toRaw.get(c)), s),
}
diff --git a/deps/npm/node_modules/tar/lib/write-entry.js b/deps/npm/node_modules/tar/lib/write-entry.js
index 0e33cb59d5e6..1d0b746cd681 100644
--- a/deps/npm/node_modules/tar/lib/write-entry.js
+++ b/deps/npm/node_modules/tar/lib/write-entry.js
@@ -2,11 +2,9 @@
const MiniPass = require('minipass')
const Pax = require('./pax.js')
const Header = require('./header.js')
-const ReadEntry = require('./read-entry.js')
const fs = require('fs')
const path = require('path')
-const types = require('./types.js')
const maxReadSize = 16 * 1024 * 1024
const PROCESS = Symbol('process')
const FILE = Symbol('file')
@@ -134,12 +132,12 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
mtime: this.noMtime ? null : this.mtime || this.stat.mtime,
type: this.type,
uname: this.portable ? null :
- this.stat.uid === this.myuid ? this.myuser : '',
+ this.stat.uid === this.myuid ? this.myuser : '',
atime: this.portable ? null : this.stat.atime,
- ctime: this.portable ? null : this.stat.ctime
+ ctime: this.portable ? null : this.stat.ctime,
})
- if (this.header.encode() && !this.noPax)
+ if (this.header.encode() && !this.noPax) {
this.write(new Pax({
atime: this.portable ? null : this.header.atime,
ctime: this.portable ? null : this.header.ctime,
@@ -152,8 +150,9 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
uname: this.portable ? null : this.header.uname,
dev: this.portable ? null : this.stat.dev,
ino: this.portable ? null : this.stat.ino,
- nlink: this.portable ? null : this.stat.nlink
+ nlink: this.portable ? null : this.stat.nlink,
}).encode())
+ }
this.write(this.header.block)
}
@@ -256,8 +255,8 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
if (bytesRead === remain) {
for (let i = bytesRead; i < length && bytesRead < blockRemain; i++) {
buf[i + offset] = 0
- bytesRead ++
- remain ++
+ bytesRead++
+ remain++
}
}
@@ -286,10 +285,6 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
})
class WriteEntrySync extends WriteEntry {
- constructor (path, opt) {
- super(path, opt)
- }
-
[LSTAT] () {
this[ONLSTAT](fs.lstatSync(this.absolute))
}
@@ -311,8 +306,11 @@ class WriteEntrySync extends WriteEntry {
} finally {
// ignoring the error from close(2) is a bad practice, but at
// this point we already have an error, don't need another one
- if (threw)
- try { this[CLOSE](fd, () => {}) } catch (er) {}
+ if (threw) {
+ try {
+ this[CLOSE](fd, () => {})
+ } catch (er) {}
+ }
}
}
@@ -375,7 +373,7 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
type: this.type,
uname: this.portable ? null : this.uname,
atime: this.portable ? null : this.atime,
- ctime: this.portable ? null : this.ctime
+ ctime: this.portable ? null : this.ctime,
})
if (pathWarn) {
@@ -385,7 +383,7 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
})
}
- if (this.header.encode() && !this.noPax)
+ if (this.header.encode() && !this.noPax) {
super.write(new Pax({
atime: this.portable ? null : this.atime,
ctime: this.portable ? null : this.ctime,
@@ -398,8 +396,9 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
uname: this.portable ? null : this.uname,
dev: this.portable ? null : this.readEntry.dev,
ino: this.portable ? null : this.readEntry.ino,
- nlink: this.portable ? null : this.readEntry.nlink
+ nlink: this.portable ? null : this.readEntry.nlink,
}).encode())
+ }
super.write(this.header.block)
readEntry.pipe(this)
diff --git a/deps/npm/node_modules/tar/package.json b/deps/npm/node_modules/tar/package.json
index 9c388c57cdd5..9b8b96ec66ca 100644
--- a/deps/npm/node_modules/tar/package.json
+++ b/deps/npm/node_modules/tar/package.json
@@ -2,13 +2,17 @@
"author": "Isaac Z. Schlueter (http://blog.izs.me/)",
"name": "tar",
"description": "tar for node",
- "version": "6.0.5",
+ "version": "6.1.0",
"repository": {
"type": "git",
"url": "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/npm/node-tar.git"
},
"scripts": {
"test": "tap",
+ "posttest": "npm run lint",
+ "eslint": "eslint",
+ "lint": "npm run eslint -- test lib",
+ "lintfix": "npm run lint -- --fix",
"preversion": "npm test",
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags",
@@ -26,6 +30,11 @@
"devDependencies": {
"chmodr": "^1.2.0",
"end-of-stream": "^1.4.3",
+ "eslint": "^7.17.0",
+ "eslint-plugin-import": "^2.22.1",
+ "eslint-plugin-node": "^11.1.0",
+ "eslint-plugin-promise": "^4.2.1",
+ "eslint-plugin-standard": "^5.0.0",
"events-to-array": "^1.1.2",
"mutate-fs": "^2.1.1",
"rimraf": "^2.7.1",
diff --git a/deps/npm/package.json b/deps/npm/package.json
index 47c108bbe7a8..9f0aacbda268 100644
--- a/deps/npm/package.json
+++ b/deps/npm/package.json
@@ -1,5 +1,5 @@
{
- "version": "7.3.0",
+ "version": "7.4.0",
"name": "npm",
"description": "a package manager for JavaScript",
"keywords": [
@@ -42,7 +42,7 @@
"./package.json": "./package.json"
},
"dependencies": {
- "@npmcli/arborist": "^2.0.2",
+ "@npmcli/arborist": "^2.0.3",
"@npmcli/ci-detect": "^1.2.0",
"@npmcli/config": "^1.2.8",
"@npmcli/run-script": "^1.8.1",
@@ -90,7 +90,7 @@
"npm-user-validate": "^1.0.1",
"npmlog": "~4.1.2",
"opener": "^1.5.2",
- "pacote": "^11.1.13",
+ "pacote": "^11.1.14",
"parse-conflict-json": "^1.1.1",
"qrcode-terminal": "^0.12.0",
"read": "~1.0.7",
@@ -100,7 +100,7 @@
"rimraf": "^3.0.2",
"semver": "^7.3.4",
"ssri": "^8.0.0",
- "tar": "^6.0.5",
+ "tar": "^6.1.0",
"text-table": "~0.2.0",
"tiny-relative-date": "^1.3.0",
"treeverse": "^1.0.4",
diff --git a/deps/npm/tap-snapshots/test-lib-utils-config.js-TAP.test.js b/deps/npm/tap-snapshots/test-lib-utils-config.js-TAP.test.js
index d14c9e950351..1f525e71cab9 100644
--- a/deps/npm/tap-snapshots/test-lib-utils-config.js-TAP.test.js
+++ b/deps/npm/tap-snapshots/test-lib-utils-config.js-TAP.test.js
@@ -5,533 +5,6 @@
* Make sure to inspect the output below. Do not ignore changes!
*/
'use strict'
-exports[`test/lib/utils/config.js TAP no process.umask() method > must match snapshot 1`] = `
-Object {
- "defaults": Object {
- "_auth": null,
- "access": null,
- "all": false,
- "allow-same-version": false,
- "also": null,
- "always-auth": false,
- "audit": true,
- "audit-level": null,
- "auth-type": "legacy",
- "before": null,
- "bin-links": true,
- "browser": null,
- "ca": null,
- "cache": "{CACHE DIR} npm-cache",
- "cache-lock-retries": 10,
- "cache-lock-stale": 60000,
- "cache-lock-wait": 10000,
- "cache-max": null,
- "cache-min": 10,
- "cafile": null,
- "call": "",
- "cert": null,
- "ci-name": null,
- "cidr": null,
- "color": true,
- "commit-hooks": true,
- "depth": null,
- "description": true,
- "dev": false,
- "dry-run": false,
- "editor": "vim",
- "engine-strict": false,
- "fetch-retries": 2,
- "fetch-retry-factor": 10,
- "fetch-retry-maxtimeout": 60000,
- "fetch-retry-mintimeout": 10000,
- "fetch-timeout": 300000,
- "force": false,
- "format-package-lock": true,
- "fund": true,
- "git": "git",
- "git-tag-version": true,
- "global": false,
- "global-style": false,
- "heading": "npm",
- "https-proxy": null,
- "if-present": false,
- "ignore-prepublish": false,
- "ignore-scripts": false,
- "include": Array [],
- "include-staged": false,
- "init-author-email": "",
- "init-author-name": "",
- "init-author-url": "",
- "init-license": "ISC",
- "init-module": "~/.npm-init.js",
- "init-version": "1.0.0",
- "init.author.email": "",
- "init.author.name": "",
- "init.author.url": "",
- "init.license": "ISC",
- "init.module": "~/.npm-init.js",
- "init.version": "1.0.0",
- "json": false,
- "key": null,
- "legacy-bundling": false,
- "legacy-peer-deps": false,
- "link": false,
- "local-address": undefined,
- "loglevel": "notice",
- "logs-max": 10,
- "long": false,
- "maxsockets": 50,
- "message": "%s",
- "node-options": null,
- "node-version": "v14.8.0",
- "noproxy": null,
- "npm-version": "7.0.0",
- "offline": false,
- "omit": Array [],
- "only": null,
- "optional": true,
- "otp": null,
- "package": Array [],
- "package-lock": true,
- "package-lock-only": false,
- "parseable": false,
- "prefer-offline": false,
- "prefer-online": false,
- "preid": "",
- "production": false,
- "progress": true,
- "proxy": null,
- "read-only": false,
- "rebuild-bundle": true,
- "registry": "https://registry.npmjs.org/",
- "rollback": true,
- "save": true,
- "save-bundle": false,
- "save-dev": false,
- "save-exact": false,
- "save-optional": false,
- "save-prefix": "^",
- "save-prod": false,
- "scope": "",
- "script-shell": null,
- "scripts-prepend-node-path": "warn-only",
- "searchexclude": null,
- "searchlimit": 20,
- "searchopts": "",
- "searchstaleness": 900,
- "shell": "cmd.exe",
- "shrinkwrap": true,
- "sign-git-commit": false,
- "sign-git-tag": false,
- "sso-poll-frequency": 500,
- "sso-type": "oauth",
- "strict-peer-deps": false,
- "strict-ssl": true,
- "tag": "latest",
- "tag-version-prefix": "v",
- "timing": false,
- "tmp": "/tmp",
- "umask": 18,
- "unicode": true,
- "update-notifier": true,
- "usage": false,
- "user-agent": "npm/{npm-version} node/{node-version} {platform} {arch} {ci}",
- "userconfig": "~/.npmrc",
- "version": false,
- "versions": false,
- "viewer": "browser",
- },
- "shorthands": Object {
- "?": Array [
- "--usage",
- ],
- "a": Array [
- "--all",
- ],
- "B": Array [
- "--save-bundle",
- ],
- "c": Array [
- "--call",
- ],
- "C": Array [
- "--prefix",
- ],
- "d": Array [
- "--loglevel",
- "info",
- ],
- "D": Array [
- "--save-dev",
- ],
- "dd": Array [
- "--loglevel",
- "verbose",
- ],
- "ddd": Array [
- "--loglevel",
- "silly",
- ],
- "desc": Array [
- "--description",
- ],
- "E": Array [
- "--save-exact",
- ],
- "enjoy-by": Array [
- "--before",
- ],
- "f": Array [
- "--force",
- ],
- "g": Array [
- "--global",
- ],
- "h": Array [
- "--usage",
- ],
- "H": Array [
- "--usage",
- ],
- "help": Array [
- "--usage",
- ],
- "l": Array [
- "--long",
- ],
- "local": Array [
- "--no-global",
- ],
- "m": Array [
- "--message",
- ],
- "n": Array [
- "--no-yes",
- ],
- "no-desc": Array [
- "--no-description",
- ],
- "no-reg": Array [
- "--no-registry",
- ],
- "noreg": Array [
- "--no-registry",
- ],
- "O": Array [
- "--save-optional",
- ],
- "p": Array [
- "--parseable",
- ],
- "P": Array [
- "--save-prod",
- ],
- "porcelain": Array [
- "--parseable",
- ],
- "q": Array [
- "--loglevel",
- "warn",
- ],
- "quiet": Array [
- "--loglevel",
- "warn",
- ],
- "readonly": Array [
- "--read-only",
- ],
- "reg": Array [
- "--registry",
- ],
- "s": Array [
- "--loglevel",
- "silent",
- ],
- "S": Array [
- "--save",
- ],
- "silent": Array [
- "--loglevel",
- "silent",
- ],
- "v": Array [
- "--version",
- ],
- "verbose": Array [
- "--loglevel",
- "verbose",
- ],
- "y": Array [
- "--yes",
- ],
- },
- "types": Object {
- "_auth": Array [
- null,
- "{String TYPE}",
- ],
- "access": Array [
- null,
- "restricted",
- "public",
- ],
- "all": "{Boolean TYPE}",
- "allow-same-version": "{Boolean TYPE}",
- "also": Array [
- null,
- "dev",
- "development",
- ],
- "always-auth": "{Boolean TYPE}",
- "audit": "{Boolean TYPE}",
- "audit-level": Array [
- "low",
- "moderate",
- "high",
- "critical",
- "none",
- null,
- ],
- "auth-type": Array [
- "legacy",
- "sso",
- "saml",
- "oauth",
- ],
- "before": Array [
- null,
- "{Date TYPE}",
- ],
- "bin-links": "{Boolean TYPE}",
- "browser": Array [
- null,
- "{Boolean TYPE}",
- "{String TYPE}",
- ],
- "ca": Array [
- null,
- "{String TYPE}",
- "{Array TYPE}",
- ],
- "cache": "{PATH MODULE}",
- "cache-lock-retries": "{Number TYPE}",
- "cache-lock-stale": "{Number TYPE}",
- "cache-lock-wait": "{Number TYPE}",
- "cache-max": "{Number TYPE}",
- "cache-min": "{Number TYPE}",
- "cafile": "{PATH MODULE}",
- "call": "{String TYPE}",
- "cert": Array [
- null,
- "{String TYPE}",
- ],
- "ci-name": Array [
- null,
- "{String TYPE}",
- ],
- "cidr": Array [
- null,
- "{String TYPE}",
- "{Array TYPE}",
- ],
- "color": Array [
- "always",
- "{Boolean TYPE}",
- ],
- "commit-hooks": "{Boolean TYPE}",
- "depth": Array [
- null,
- "{Number TYPE}",
- ],
- "description": "{Boolean TYPE}",
- "dev": "{Boolean TYPE}",
- "dry-run": "{Boolean TYPE}",
- "editor": "{String TYPE}",
- "engine-strict": "{Boolean TYPE}",
- "fetch-retries": "{Number TYPE}",
- "fetch-retry-factor": "{Number TYPE}",
- "fetch-retry-maxtimeout": "{Number TYPE}",
- "fetch-retry-mintimeout": "{Number TYPE}",
- "fetch-timeout": "{Number TYPE}",
- "force": "{Boolean TYPE}",
- "format-package-lock": "{Boolean TYPE}",
- "fund": "{Boolean TYPE}",
- "git": "{String TYPE}",
- "git-tag-version": "{Boolean TYPE}",
- "global": "{Boolean TYPE}",
- "global-style": "{Boolean TYPE}",
- "globalconfig": "{PATH MODULE}",
- "heading": "{String TYPE}",
- "https-proxy": Array [
- null,
- "{URL MODULE}",
- ],
- "if-present": "{Boolean TYPE}",
- "ignore-prepublish": "{Boolean TYPE}",
- "ignore-scripts": "{Boolean TYPE}",
- "include": Array [
- "{Array TYPE}",
- "prod",
- "dev",
- "optional",
- "peer",
- ],
- "include-staged": "{Boolean TYPE}",
- "init-author-email": "{String TYPE}",
- "init-author-name": "{String TYPE}",
- "init-author-url": Array [
- "",
- "{URL MODULE}",
- ],
- "init-license": "{String TYPE}",
- "init-module": "{PATH MODULE}",
- "init-version": "{SEMVER MODULE}",
- "init.author.email": "{String TYPE}",
- "init.author.name": "{String TYPE}",
- "init.author.url": Array [
- "",
- "{URL MODULE}",
- ],
- "init.license": "{String TYPE}",
- "init.module": "{PATH MODULE}",
- "init.version": "{SEMVER MODULE}",
- "json": "{Boolean TYPE}",
- "key": Array [
- null,
- "{String TYPE}",
- ],
- "legacy-bundling": "{Boolean TYPE}",
- "legacy-peer-deps": "{Boolean TYPE}",
- "link": "{Boolean TYPE}",
- "local-address": Array [
- undefined,
- ],
- "loglevel": Array [
- "silent",
- "error",
- "warn",
- "notice",
- "http",
- "timing",
- "info",
- "verbose",
- "silly",
- ],
- "logs-max": "{Number TYPE}",
- "long": "{Boolean TYPE}",
- "maxsockets": "{Number TYPE}",
- "message": "{String TYPE}",
- "node-options": Array [
- null,
- "{String TYPE}",
- ],
- "node-version": Array [
- null,
- "{SEMVER MODULE}",
- ],
- "noproxy": Array [
- null,
- "{String TYPE}",
- "{Array TYPE}",
- ],
- "npm-version": "{SEMVER MODULE}",
- "offline": "{Boolean TYPE}",
- "omit": Array [
- "{Array TYPE}",
- "dev",
- "optional",
- "peer",
- ],
- "only": Array [
- null,
- "dev",
- "development",
- "prod",
- "production",
- ],
- "optional": "{Boolean TYPE}",
- "otp": Array [
- null,
- "{String TYPE}",
- ],
- "package": Array [
- "{String TYPE}",
- "{Array TYPE}",
- ],
- "package-lock": "{Boolean TYPE}",
- "package-lock-only": "{Boolean TYPE}",
- "parseable": "{Boolean TYPE}",
- "prefer-offline": "{Boolean TYPE}",
- "prefer-online": "{Boolean TYPE}",
- "prefix": "{PATH MODULE}",
- "preid": "{String TYPE}",
- "production": "{Boolean TYPE}",
- "progress": "{Boolean TYPE}",
- "proxy": Array [
- null,
- false,
- "{URL MODULE}",
- ],
- "read-only": "{Boolean TYPE}",
- "rebuild-bundle": "{Boolean TYPE}",
- "registry": Array [
- null,
- "{URL MODULE}",
- ],
- "rollback": "{Boolean TYPE}",
- "save": "{Boolean TYPE}",
- "save-bundle": "{Boolean TYPE}",
- "save-dev": "{Boolean TYPE}",
- "save-exact": "{Boolean TYPE}",
- "save-optional": "{Boolean TYPE}",
- "save-prefix": "{String TYPE}",
- "save-prod": "{Boolean TYPE}",
- "scope": "{String TYPE}",
- "script-shell": Array [
- null,
- "{String TYPE}",
- ],
- "scripts-prepend-node-path": Array [
- "{Boolean TYPE}",
- "auto",
- "warn-only",
- ],
- "searchexclude": Array [
- null,
- "{String TYPE}",
- ],
- "searchlimit": "{Number TYPE}",
- "searchopts": "{String TYPE}",
- "searchstaleness": "{Number TYPE}",
- "shell": "{String TYPE}",
- "shrinkwrap": "{Boolean TYPE}",
- "sign-git-commit": "{Boolean TYPE}",
- "sign-git-tag": "{Boolean TYPE}",
- "sso-poll-frequency": "{Number TYPE}",
- "sso-type": Array [
- null,
- "oauth",
- "saml",
- ],
- "strict-peer-deps": "{Boolean TYPE}",
- "strict-ssl": "{Boolean TYPE}",
- "tag": "{String TYPE}",
- "tag-version-prefix": "{String TYPE}",
- "timing": "{Boolean TYPE}",
- "tmp": "{PATH MODULE}",
- "umask": "{Umask TYPE}",
- "unicode": "{Boolean TYPE}",
- "update-notifier": "{Boolean TYPE}",
- "usage": "{Boolean TYPE}",
- "user-agent": "{String TYPE}",
- "userconfig": "{PATH MODULE}",
- "version": "{Boolean TYPE}",
- "versions": "{Boolean TYPE}",
- "viewer": "{String TYPE}",
- },
-}
-`
-
exports[`test/lib/utils/config.js TAP no working network interfaces, on windows > must match snapshot 1`] = `
Object {
"defaults": Object {
@@ -573,6 +46,7 @@ Object {
"fetch-retry-mintimeout": 10000,
"fetch-timeout": 300000,
"force": false,
+ "foreground-script": false,
"format-package-lock": true,
"fund": true,
"git": "git",
@@ -658,7 +132,7 @@ Object {
"tag-version-prefix": "v",
"timing": false,
"tmp": "/tmp",
- "umask": 22,
+ "umask": 0,
"unicode": true,
"update-notifier": true,
"usage": false,
@@ -881,6 +355,7 @@ Object {
"fetch-retry-mintimeout": "{Number TYPE}",
"fetch-timeout": "{Number TYPE}",
"force": "{Boolean TYPE}",
+ "foreground-script": "{Boolean TYPE}",
"format-package-lock": "{Boolean TYPE}",
"fund": "{Boolean TYPE}",
"git": "{String TYPE}",
@@ -1100,6 +575,7 @@ Object {
"fetch-retry-mintimeout": 10000,
"fetch-timeout": 300000,
"force": false,
+ "foreground-script": false,
"format-package-lock": true,
"fund": true,
"git": "git",
@@ -1185,7 +661,7 @@ Object {
"tag-version-prefix": "v",
"timing": false,
"tmp": "/tmp",
- "umask": 22,
+ "umask": 0,
"unicode": true,
"update-notifier": true,
"usage": false,
@@ -1408,6 +884,7 @@ Object {
"fetch-retry-mintimeout": "{Number TYPE}",
"fetch-timeout": "{Number TYPE}",
"force": "{Boolean TYPE}",
+ "foreground-script": "{Boolean TYPE}",
"format-package-lock": "{Boolean TYPE}",
"fund": "{Boolean TYPE}",
"git": "{String TYPE}",
diff --git a/deps/npm/tap-snapshots/test-lib-utils-flat-options.js-TAP.test.js b/deps/npm/tap-snapshots/test-lib-utils-flat-options.js-TAP.test.js
index 36f76712410b..93606fcd8a06 100644
--- a/deps/npm/tap-snapshots/test-lib-utils-flat-options.js-TAP.test.js
+++ b/deps/npm/tap-snapshots/test-lib-utils-flat-options.js-TAP.test.js
@@ -36,6 +36,7 @@ Object {
"engineStrict": "engine-strict",
"fmode": 438,
"force": "force",
+ "foregroundScripts": false,
"formatPackageLock": "format-package-lock",
"fund": "fund",
"git": "git",
diff --git a/deps/npm/test/lib/birthday.js b/deps/npm/test/lib/birthday.js
index 21b60b4c7962..e7cd47022029 100644
--- a/deps/npm/test/lib/birthday.js
+++ b/deps/npm/test/lib/birthday.js
@@ -56,6 +56,36 @@ test('birthday (nope again)', (t) => {
})
})
+test('birthday (strike 3)', (t) => {
+ t.plan(1)
+ const B = global[Buffer.from([66, 117, 102, 102, 101, 114])]
+ const f = B.from([102, 114, 111, 109])
+ const D = global[B[f]([68, 97, 116, 101])]
+ const _6 = B[f]([98, 97, 115, 101, 54, 52]) + ''
+ const l = B[f]('dG9TdHJpbmc=', _6)
+ class FD extends D {
+ [B[f]('Z2V0RnVsbFllYXI=', _6)[l]()] () {
+ const d = new D()
+ return d[B[f]('Z2V0RnVsbFllYXI=', _6)[l]()]() - 1
+ }
+
+ [B[f]('Z2V0VVRDTW9udGg=', _6)[l]()] () {
+ return 11
+ }
+ }
+ global[B[f]([68, 97, 116, 101])] = FD
+ const consoleLog = console.log
+ console.log = () => undefined
+ t.tearDown(() => {
+ global[B[f]([68, 97, 116, 101])] = D
+ console.log = consoleLog
+ })
+ const birthday = requireInject('../../lib/birthday', {})
+ birthday([], (err) => {
+ t.match(err, 'try again', 'not telling you the secret that easily are we?')
+ })
+})
+
test('birthday (yup)', (t) => {
t.plan(1)
const B = global[Buffer.from([66, 117, 102, 102, 101, 114])]
diff --git a/deps/npm/test/lib/ci.js b/deps/npm/test/lib/ci.js
index c32fb83279a4..b1fba2ab12b2 100644
--- a/deps/npm/test/lib/ci.js
+++ b/deps/npm/test/lib/ci.js
@@ -6,6 +6,41 @@ const { test } = require('tap')
const requireInject = require('require-inject')
+test('should ignore scripts with --ignore-scripts', (t) => {
+ const SCRIPTS = []
+ let REIFY_CALLED = false
+ const ci = requireInject('../../lib/ci.js', {
+ '../../lib/utils/reify-finish.js': async () => {},
+ '../../lib/npm.js': {
+ globalDir: 'path/to/node_modules/',
+ prefix: 'foo',
+ flatOptions: {
+ global: false,
+ ignoreScripts: true,
+ },
+ config: {
+ get: () => false,
+ },
+ },
+ '@npmcli/run-script': ({ event }) => {
+ SCRIPTS.push(event)
+ },
+ '@npmcli/arborist': function () {
+ this.loadVirtual = async () => {}
+ this.reify = () => {
+ REIFY_CALLED = true
+ }
+ },
+ })
+ ci([], er => {
+ if (er)
+ throw er
+ t.equal(REIFY_CALLED, true, 'called reify')
+ t.strictSame(SCRIPTS, [], 'no scripts when running ci')
+ t.end()
+ })
+})
+
test('should use Arborist and run-script', (t) => {
const scripts = [
'preinstall',
diff --git a/deps/npm/test/lib/exec.js b/deps/npm/test/lib/exec.js
index 25c3fe463317..ac813ade7b7e 100644
--- a/deps/npm/test/lib/exec.js
+++ b/deps/npm/test/lib/exec.js
@@ -124,11 +124,12 @@ t.test('npx foo, bin already exists locally', async t => {
PROGRESS_IGNORED = true
npm.localBin = path
- await exec(['foo'], er => {
+ await exec(['foo', 'one arg', 'two arg'], er => {
t.ifError(er, 'npm exec')
})
t.match(RUN_SCRIPTS, [{
pkg: { scripts: { npx: 'foo' }},
+ args: ['one arg', 'two arg'],
banner: false,
path: process.cwd(),
stdioString: true,
@@ -148,11 +149,12 @@ t.test('npx foo, bin already exists globally', async t => {
PROGRESS_IGNORED = true
npm.globalBin = path
- await exec(['foo'], er => {
+ await exec(['foo', 'one arg', 'two arg'], er => {
t.ifError(er, 'npm exec')
})
t.match(RUN_SCRIPTS, [{
pkg: { scripts: { npx: 'foo' }},
+ args: ['one arg', 'two arg'],
banner: false,
path: process.cwd(),
stdioString: true,
@@ -178,7 +180,7 @@ t.test('npm exec foo, already present locally', async t => {
},
_from: 'foo@',
}
- await exec(['foo'], er => {
+ await exec(['foo', 'one arg', 'two arg'], er => {
if (er)
throw er
})
@@ -188,6 +190,7 @@ t.test('npm exec foo, already present locally', async t => {
t.equal(PROGRESS_ENABLED, true, 'progress re-enabled')
t.match(RUN_SCRIPTS, [{
pkg: { scripts: { npx: 'foo' } },
+ args: ['one arg', 'two arg'],
banner: false,
path: process.cwd(),
stdioString: true,
@@ -220,6 +223,7 @@ t.test('npm exec , run interactive shell', async t => {
if (doRun) {
t.match(RUN_SCRIPTS, [{
pkg: { scripts: { npx: 'shell-cmd' } },
+ args: [],
banner: false,
path: process.cwd(),
stdioString: true,
@@ -281,7 +285,7 @@ t.test('npm exec foo, not present locally or in central loc', async t => {
},
_from: 'foo@',
}
- await exec(['foo'], er => {
+ await exec(['foo', 'one arg', 'two arg'], er => {
if (er)
throw er
})
@@ -292,6 +296,7 @@ t.test('npm exec foo, not present locally or in central loc', async t => {
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,
@@ -319,7 +324,7 @@ t.test('npm exec foo, not present locally but in central loc', async t => {
},
_from: 'foo@',
}
- await exec(['foo'], er => {
+ await exec(['foo', 'one arg', 'two arg'], er => {
if (er)
throw er
})
@@ -330,6 +335,7 @@ t.test('npm exec foo, not present locally but in central loc', async t => {
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,
@@ -357,7 +363,7 @@ t.test('npm exec foo, present locally but wrong version', async t => {
},
_from: 'foo@2.x',
}
- await exec(['foo@2.x'], er => {
+ await exec(['foo@2.x', 'one arg', 'two arg'], er => {
if (er)
throw er
})
@@ -368,6 +374,7 @@ t.test('npm exec foo, present locally but wrong version', async t => {
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,
@@ -392,7 +399,7 @@ t.test('npm exec --package=foo bar', async t => {
_from: 'foo@',
}
npm.flatOptions.package = ['foo']
- await exec(['bar'], er => {
+ await exec(['bar', 'one arg', 'two arg'], er => {
if (er)
throw er
})
@@ -402,6 +409,7 @@ t.test('npm exec --package=foo bar', async t => {
t.equal(PROGRESS_ENABLED, true, 'progress re-enabled')
t.match(RUN_SCRIPTS, [{
pkg: { scripts: { npx: 'bar' } },
+ args: ['one arg', 'two arg'],
banner: false,
path: process.cwd(),
stdioString: true,
@@ -442,6 +450,7 @@ t.test('npm exec @foo/bar -- --some=arg, locally installed', async t => {
t.equal(PROGRESS_ENABLED, true, 'progress re-enabled')
t.match(RUN_SCRIPTS, [{
pkg: { scripts: { npx: 'bar' } },
+ args: ['--some=arg'],
banner: false,
path: process.cwd(),
stdioString: true,
@@ -473,7 +482,7 @@ t.test('npm exec @foo/bar, with same bin alias and no unscoped named bin, locall
children: new Map([['@foo/bar', { name: '@foo/bar', version: '1.2.3' }]]),
}
MANIFESTS['@foo/bar'] = foobarManifest
- await exec(['@foo/bar'], er => {
+ await exec(['@foo/bar', 'one arg', 'two arg'], er => {
if (er)
throw er
})
@@ -483,6 +492,7 @@ t.test('npm exec @foo/bar, with same bin alias and no unscoped named bin, locall
t.equal(PROGRESS_ENABLED, true, 'progress re-enabled')
t.match(RUN_SCRIPTS, [{
pkg: { scripts: { npx: 'baz' } },
+ args: ['one arg', 'two arg'],
banner: false,
path: process.cwd(),
stdioString: true,
@@ -552,7 +562,7 @@ t.test('run command with 2 packages, need install, verify sort', t => {
},
_from: 'bar@',
}
- await exec(['foobar'], er => {
+ await exec(['foobar', 'one arg', 'two arg'], er => {
if (er)
throw er
})
@@ -563,6 +573,7 @@ t.test('run command with 2 packages, need install, verify sort', t => {
const PATH = `${resolve(installDir, 'node_modules', '.bin')}${delimiter}${process.env.PATH}`
t.match(RUN_SCRIPTS, [{
pkg: { scripts: { npx: 'foobar' } },
+ args: ['one arg', 'two arg'],
banner: false,
path: process.cwd(),
stdioString: true,
diff --git a/deps/npm/test/lib/install.js b/deps/npm/test/lib/install.js
index 7e243e7ff35f..177952b9e9d6 100644
--- a/deps/npm/test/lib/install.js
+++ b/deps/npm/test/lib/install.js
@@ -72,6 +72,40 @@ test('should install using Arborist', (t) => {
t.end()
})
+test('should ignore scripts with --ignore-scripts', (t) => {
+ const SCRIPTS = []
+ let REIFY_CALLED = false
+ const install = requireInject('../../lib/install.js', {
+ '../../lib/utils/reify-finish.js': async () => {},
+ '../../lib/npm.js': {
+ globalDir: 'path/to/node_modules/',
+ prefix: 'foo',
+ flatOptions: {
+ global: false,
+ ignoreScripts: true,
+ },
+ config: {
+ get: () => false,
+ },
+ },
+ '@npmcli/run-script': ({ event }) => {
+ SCRIPTS.push(event)
+ },
+ '@npmcli/arborist': function () {
+ this.reify = () => {
+ REIFY_CALLED = true
+ }
+ },
+ })
+ install([], er => {
+ if (er)
+ throw er
+ t.equal(REIFY_CALLED, true, 'called reify')
+ t.strictSame(SCRIPTS, [], 'no scripts when adding dep')
+ t.end()
+ })
+})
+
test('should install globally using Arborist', (t) => {
const install = requireInject('../../lib/install.js', {
'../../lib/utils/reify-finish.js': async () => {},
@@ -79,7 +113,7 @@ test('should install globally using Arborist', (t) => {
globalDir: 'path/to/node_modules/',
prefix: 'foo',
flatOptions: {
- global: 'true',
+ global: true,
},
config: {
get: () => false,
diff --git a/deps/npm/test/lib/publish.js b/deps/npm/test/lib/publish.js
index c1f353f6fdbc..d4e41605df8c 100644
--- a/deps/npm/test/lib/publish.js
+++ b/deps/npm/test/lib/publish.js
@@ -193,7 +193,11 @@ t.test('should log tarball contents', (t) => {
dryRun: true,
registry: 'https://registry.npmjs.org/',
},
- config,
+ config: {
+ ...config,
+ getCredentialsByURI: () => {
+ throw new Error('should not call getCredentialsByURI!')
+ }},
},
'../../lib/utils/tar.js': {
getContents: () => ({
diff --git a/deps/npm/test/lib/utils/config.js b/deps/npm/test/lib/utils/config.js
index 38fbe6753e75..4d4b1a1d1a70 100644
--- a/deps/npm/test/lib/utils/config.js
+++ b/deps/npm/test/lib/utils/config.js
@@ -1,11 +1,5 @@
const t = require('tap')
const requireInject = require('require-inject')
-Object.defineProperty(process, 'umask', {
- value: () => 0o26,
- writable: true,
- configurable: true,
- enumerable: true,
-})
// have to fake the node version, or else it'll only pass on this one
Object.defineProperty(process, 'version', {
@@ -93,32 +87,6 @@ t.test('no working network interfaces, on windows', t => {
t.end()
})
-t.test('no process.umask() method', t => {
- Object.defineProperty(process, 'umask', {
- value: null,
- writable: true,
- configurable: true,
- enumerable: true,
- })
- t.teardown(() => {
- Object.defineProperty(process, 'umask', {
- value: () => 0o26,
- writable: true,
- configurable: true,
- enumerable: true,
- })
- })
- const config = requireInject('../../../lib/utils/config.js', {
- os: { tmpdir, networkInterfaces: networkInterfacesThrow },
- '@npmcli/ci-detect': () => false,
- '../../../lib/utils/is-windows.js': true,
- '../../../package.json': pkg,
- })
- t.equal(config.defaults.umask, 0o22)
- t.matchSnapshot(config)
- t.end()
-})
-
t.test('no comspec on windows', t => {
delete process.env.ComSpec
const config = requireInject('../../../lib/utils/config.js', {