diff --git a/deps/npm/docs/output/commands/npm-ls.html b/deps/npm/docs/output/commands/npm-ls.html index 324980536dc102..e2e494c3b11394 100644 --- a/deps/npm/docs/output/commands/npm-ls.html +++ b/deps/npm/docs/output/commands/npm-ls.html @@ -159,7 +159,7 @@

Description

the results to only the paths to the packages named. Note that nested packages will also show the paths to the specified packages. For example, running npm ls promzard in npm’s source tree will show:

-
npm@7.20.3 /path/to/npm
+
npm@7.20.5 /path/to/npm
 └─┬ init-package-json@0.0.4
   └── promzard@0.1.5
 
diff --git a/deps/npm/docs/output/commands/npm.html b/deps/npm/docs/output/commands/npm.html index 672238cee09d97..ff7ddf462a9dc0 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.20.3

+

7.20.5

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/lib/set.js b/deps/npm/lib/set.js index 74a002cd638be2..a9f16f3b345121 100644 --- a/deps/npm/lib/set.js +++ b/deps/npm/lib/set.js @@ -22,7 +22,7 @@ class Set extends BaseCommand { exec (args, cb) { if (!args.length) - return cb(this.usage) + return cb(this.usageError()) this.npm.commands.config(['set'].concat(args), cb) } } diff --git a/deps/npm/lib/test.js b/deps/npm/lib/test.js index e78fdf0c786c80..8ab1e8582340ff 100644 --- a/deps/npm/lib/test.js +++ b/deps/npm/lib/test.js @@ -19,15 +19,5 @@ class Test extends LifecycleCmd { 'script-shell', ] } - - exec (args, cb) { - super.exec(args, er => { - if (er && er.code === 'ELIFECYCLE') { - /* eslint-disable standard/no-callback-literal */ - cb('Test failed. See above for more details.') - } else - cb(er) - }) - } } module.exports = Test diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1 index 4e2f20ef30c66e..06e36e43552d15 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" "July 2021" "" "" +.TH "NPM\-ACCESS" "1" "August 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 9dcb4036f3359d..21184ac853b822 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" "July 2021" "" "" +.TH "NPM\-ADDUSER" "1" "August 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 b1638993cf8a5d..f0eaa99b3e782b 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" "July 2021" "" "" +.TH "NPM\-AUDIT" "1" "August 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 fd7e3129c6c9db..fd16515d63b146 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" "July 2021" "" "" +.TH "NPM\-BIN" "1" "August 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 1246f39bed7df1..48f6307f6ad9f9 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" "July 2021" "" "" +.TH "NPM\-BUGS" "1" "August 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 e2807ca57a817f..9053c09960cf97 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" "July 2021" "" "" +.TH "NPM\-CACHE" "1" "August 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 f4ad77607e77ae..1b853353e1e426 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" "July 2021" "" "" +.TH "NPM\-CI" "1" "August 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 1fc1ec9a778598..41fd2ae6037697 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" "July 2021" "" "" +.TH "NPM\-COMPLETION" "1" "August 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 405160025f1895..8a2bad925a1870 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" "July 2021" "" "" +.TH "NPM\-CONFIG" "1" "August 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 2930a90609d4ea..0325f013ce2326 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" "July 2021" "" "" +.TH "NPM\-DEDUPE" "1" "August 2021" "" "" .SH "NAME" \fBnpm-dedupe\fR \- Reduce duplication in the package tree .SS Synopsis diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1 index 54d3eae897f370..3a491cfef4c2bb 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" "July 2021" "" "" +.TH "NPM\-DEPRECATE" "1" "August 2021" "" "" .SH "NAME" \fBnpm-deprecate\fR \- Deprecate a version of a package .SS Synopsis diff --git a/deps/npm/man/man1/npm-diff.1 b/deps/npm/man/man1/npm-diff.1 index 5464370bfd5d2d..1a3cbcfbeddf6a 100644 --- a/deps/npm/man/man1/npm-diff.1 +++ b/deps/npm/man/man1/npm-diff.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DIFF" "1" "July 2021" "" "" +.TH "NPM\-DIFF" "1" "August 2021" "" "" .SH "NAME" \fBnpm-diff\fR \- The registry diff command .SS Synopsis diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1 index 5b403c4b19751c..e9213973982c30 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" "July 2021" "" "" +.TH "NPM\-DIST\-TAG" "1" "August 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 880d4f8cb75556..ac3328c8696274 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" "July 2021" "" "" +.TH "NPM\-DOCS" "1" "August 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 e803e49cab6c56..af40db2dd28dbe 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" "July 2021" "" "" +.TH "NPM\-DOCTOR" "1" "August 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 56404e9bb570c2..8c7a87432fee02 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" "July 2021" "" "" +.TH "NPM\-EDIT" "1" "August 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 4a0cc4e9a9d0b2..ffe52336a348b0 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" "July 2021" "" "" +.TH "NPM\-EXEC" "1" "August 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 dee71496115b35..08701546c0fc4f 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" "July 2021" "" "" +.TH "NPM\-EXPLAIN" "1" "August 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 4782519127cdb0..0cbcfea4e18372 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" "July 2021" "" "" +.TH "NPM\-EXPLORE" "1" "August 2021" "" "" .SH "NAME" \fBnpm-explore\fR \- Browse an installed package .SS Synopsis diff --git a/deps/npm/man/man1/npm-find-dupes.1 b/deps/npm/man/man1/npm-find-dupes.1 index 285dc3128d8cf0..c66dc4a7d91b4f 100644 --- a/deps/npm/man/man1/npm-find-dupes.1 +++ b/deps/npm/man/man1/npm-find-dupes.1 @@ -1,4 +1,4 @@ -.TH "NPM\-FIND\-DUPES" "1" "July 2021" "" "" +.TH "NPM\-FIND\-DUPES" "1" "August 2021" "" "" .SH "NAME" \fBnpm-find-dupes\fR \- Find duplication in the package tree .SS Synopsis diff --git a/deps/npm/man/man1/npm-fund.1 b/deps/npm/man/man1/npm-fund.1 index a1fc486010dc17..487dc371222ed7 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" "July 2021" "" "" +.TH "NPM\-FUND" "1" "August 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 ca85068745f41b..2c7aa246e27f2e 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" "July 2021" "" "" +.TH "NPM\-HELP\-SEARCH" "1" "August 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 7564968067cf25..2b501ea241d111 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" "July 2021" "" "" +.TH "NPM\-HELP" "1" "August 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 52dd622c0090aa..712f89911bbee0 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" "July 2021" "" "" +.TH "NPM\-HOOK" "1" "August 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 bce9c09f6ed0ca..efaa6c82e69dc7 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" "July 2021" "" "" +.TH "NPM\-INIT" "1" "August 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 b2fad00b06b2f1..3f0f8f8f1a1784 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" "July 2021" "" "" +.TH "NPM\-INSTALL\-CI\-TEST" "1" "August 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 0b403e8fee7865..b34c1b2bc5da60 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" "July 2021" "" "" +.TH "NPM\-INSTALL\-TEST" "1" "August 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 5ad3b9024fddfe..09ef828b6fb256 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" "July 2021" "" "" +.TH "NPM\-INSTALL" "1" "August 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 3527512232360d..8a2716753ff1c3 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" "July 2021" "" "" +.TH "NPM\-LINK" "1" "August 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 650e6f1b511e6d..eb9f8ee1421938 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" "July 2021" "" "" +.TH "NPM\-LOGOUT" "1" "August 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 0c6d83ee6d9161..94870c83c2912e 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" "July 2021" "" "" +.TH "NPM\-LS" "1" "August 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\.20\.3 /path/to/npm +npm@7\.20\.5 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 .fi diff --git a/deps/npm/man/man1/npm-org.1 b/deps/npm/man/man1/npm-org.1 index ca4d12eb3b466b..053c9ff65e7369 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" "July 2021" "" "" +.TH "NPM\-ORG" "1" "August 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 5bea638d57d8e9..acf6494bcebea2 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" "July 2021" "" "" +.TH "NPM\-OUTDATED" "1" "August 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 8e172d6955e1ab..8c50a9780bee8f 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" "July 2021" "" "" +.TH "NPM\-OWNER" "1" "August 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 7402a53f7c9c9d..2d8824c9851d5c 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" "July 2021" "" "" +.TH "NPM\-PACK" "1" "August 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 405ec2edac12ec..57b4cb21dcfae3 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" "July 2021" "" "" +.TH "NPM\-PING" "1" "August 2021" "" "" .SH "NAME" \fBnpm-ping\fR \- Ping npm registry .SS Synopsis diff --git a/deps/npm/man/man1/npm-pkg.1 b/deps/npm/man/man1/npm-pkg.1 index 8652df525ebf25..5ab2dfb5f98f77 100644 --- a/deps/npm/man/man1/npm-pkg.1 +++ b/deps/npm/man/man1/npm-pkg.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PKG" "1" "July 2021" "" "" +.TH "NPM\-PKG" "1" "August 2021" "" "" .SH "NAME" \fBnpm-pkg\fR \- Manages your package\.json .SS Synopsis diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1 index 369b13397bfddb..257739d43adeb0 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" "July 2021" "" "" +.TH "NPM\-PREFIX" "1" "August 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 930fbf2d9402af..e84421484c2ff3 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" "July 2021" "" "" +.TH "NPM\-PROFILE" "1" "August 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 41b7b00a5cdb1c..8532f3b21c5267 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" "July 2021" "" "" +.TH "NPM\-PRUNE" "1" "August 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 69637ce9799d36..acf2d23d140f87 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" "July 2021" "" "" +.TH "NPM\-PUBLISH" "1" "August 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 18b54c7bf75477..1bd8b9e27063c2 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" "July 2021" "" "" +.TH "NPM\-REBUILD" "1" "August 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 1f19785deda99c..3c72468ad4fa13 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" "July 2021" "" "" +.TH "NPM\-REPO" "1" "August 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 fa47d5255478a2..546344c72213e9 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" "July 2021" "" "" +.TH "NPM\-RESTART" "1" "August 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 84722286504842..c46329aeb0817b 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" "July 2021" "" "" +.TH "NPM\-ROOT" "1" "August 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 ddb01fa95bd913..5504993a0da7e1 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" "July 2021" "" "" +.TH "NPM\-RUN\-SCRIPT" "1" "August 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 d500a4e8ef8b92..377a26151058bc 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" "July 2021" "" "" +.TH "NPM\-SEARCH" "1" "August 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 064dd267e26f44..510fe600eb64a9 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" "July 2021" "" "" +.TH "NPM\-SET\-SCRIPT" "1" "August 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 3f10fe80c9b824..4cf505d65ddedd 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" "July 2021" "" "" +.TH "NPM\-SHRINKWRAP" "1" "August 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 174161972911cc..e89cccc6516570 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" "July 2021" "" "" +.TH "NPM\-STAR" "1" "August 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 adb87c1c9c654e..27636ccfb9e004 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" "July 2021" "" "" +.TH "NPM\-STARS" "1" "August 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 59c3806112ad6e..69e37577b1a506 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" "July 2021" "" "" +.TH "NPM\-START" "1" "August 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 2415db060fd216..4877acd83e096b 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" "July 2021" "" "" +.TH "NPM\-STOP" "1" "August 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 54e27248b54b80..7429bdd0f055a5 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" "July 2021" "" "" +.TH "NPM\-TEAM" "1" "August 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 c84d9bd8d1f01b..12557e4597d45a 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" "July 2021" "" "" +.TH "NPM\-TEST" "1" "August 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 d24138b9395c89..f0cb59cc1b6680 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" "July 2021" "" "" +.TH "NPM\-TOKEN" "1" "August 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 22875c6cfbe4c3..12f6dd40861d6a 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" "July 2021" "" "" +.TH "NPM\-UNINSTALL" "1" "August 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 50b4bd5e3b49e1..a226cb7ec3c23c 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" "July 2021" "" "" +.TH "NPM\-UNPUBLISH" "1" "August 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 29c18e8916e131..2cd38414aec180 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" "July 2021" "" "" +.TH "NPM\-UNSTAR" "1" "August 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 ca717f8d02fb2e..a768c65961db82 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" "July 2021" "" "" +.TH "NPM\-UPDATE" "1" "August 2021" "" "" .SH "NAME" \fBnpm-update\fR \- Update packages .SS Synopsis diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1 index f798ed97a15223..5a8fee83e7d422 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" "July 2021" "" "" +.TH "NPM\-VERSION" "1" "August 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 a63cab9feec386..91080c1e70952b 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" "July 2021" "" "" +.TH "NPM\-VIEW" "1" "August 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 506470abe2269f..df05868a8fcdd3 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" "July 2021" "" "" +.TH "NPM\-WHOAMI" "1" "August 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 d59e7cbce03178..6ca3a19f6c872f 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "July 2021" "" "" +.TH "NPM" "1" "August 2021" "" "" .SH "NAME" \fBnpm\fR \- javascript package manager .SS Synopsis @@ -10,7 +10,7 @@ npm [args] .RE .SS Version .P -7\.20\.3 +7\.20\.5 .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 c58b481079eacc..982127c8ad6dd5 100644 --- a/deps/npm/man/man1/npx.1 +++ b/deps/npm/man/man1/npx.1 @@ -1,4 +1,4 @@ -.TH "NPX" "1" "July 2021" "" "" +.TH "NPX" "1" "August 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 80b6db8074002f..de49122f3cec91 100644 --- a/deps/npm/man/man5/folders.5 +++ b/deps/npm/man/man5/folders.5 @@ -1,4 +1,4 @@ -.TH "FOLDERS" "5" "July 2021" "" "" +.TH "FOLDERS" "5" "August 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 70b3d2632a24f1..0759e770bea6a2 100644 --- a/deps/npm/man/man5/install.5 +++ b/deps/npm/man/man5/install.5 @@ -1,4 +1,4 @@ -.TH "INSTALL" "5" "July 2021" "" "" +.TH "INSTALL" "5" "August 2021" "" "" .SH "NAME" \fBinstall\fR \- Download and install node and npm .SS Description diff --git a/deps/npm/man/man5/npm-shrinkwrap-json.5 b/deps/npm/man/man5/npm-shrinkwrap-json.5 index 008e6f3bec0de2..2e3aa79adb1d60 100644 --- a/deps/npm/man/man5/npm-shrinkwrap-json.5 +++ b/deps/npm/man/man5/npm-shrinkwrap-json.5 @@ -1,4 +1,4 @@ -.TH "NPM\-SHRINKWRAP\.JSON" "5" "July 2021" "" "" +.TH "NPM\-SHRINKWRAP\.JSON" "5" "August 2021" "" "" .SH "NAME" \fBnpm-shrinkwrap.json\fR \- A publishable lockfile .SS Description diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5 index b0ee6ac4cfaa45..84a0ffadbee25a 100644 --- a/deps/npm/man/man5/npmrc.5 +++ b/deps/npm/man/man5/npmrc.5 @@ -1,4 +1,4 @@ -.TH "NPMRC" "5" "July 2021" "" "" +.TH "NPMRC" "5" "August 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 323394188a455b..2316ad04b1f19c 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" "July 2021" "" "" +.TH "PACKAGE\.JSON" "5" "August 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 0a6b97fee7904c..18f968ee6d8d1f 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" "July 2021" "" "" +.TH "PACKAGE\-LOCK\.JSON" "5" "August 2021" "" "" .SH "NAME" \fBpackage-lock.json\fR \- A manifestation of the manifest .SS Description diff --git a/deps/npm/man/man7/config.7 b/deps/npm/man/man7/config.7 index ac0a415f10a363..71ca215d4ec0cc 100644 --- a/deps/npm/man/man7/config.7 +++ b/deps/npm/man/man7/config.7 @@ -1,4 +1,4 @@ -.TH "CONFIG" "7" "July 2021" "" "" +.TH "CONFIG" "7" "August 2021" "" "" .SH "NAME" \fBconfig\fR \- More than you probably want to know about npm configuration .SS Description diff --git a/deps/npm/man/man7/developers.7 b/deps/npm/man/man7/developers.7 index 91132f0276b2dc..9c226dfc3715a4 100644 --- a/deps/npm/man/man7/developers.7 +++ b/deps/npm/man/man7/developers.7 @@ -1,4 +1,4 @@ -.TH "DEVELOPERS" "7" "July 2021" "" "" +.TH "DEVELOPERS" "7" "August 2021" "" "" .SH "NAME" \fBdevelopers\fR \- Developer Guide .SS Description diff --git a/deps/npm/man/man7/orgs.7 b/deps/npm/man/man7/orgs.7 index 68b968eea2a4fa..983a41c9c2daeb 100644 --- a/deps/npm/man/man7/orgs.7 +++ b/deps/npm/man/man7/orgs.7 @@ -1,4 +1,4 @@ -.TH "ORGS" "7" "July 2021" "" "" +.TH "ORGS" "7" "August 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 772d4b48220b5a..07f090af82e869 100644 --- a/deps/npm/man/man7/registry.7 +++ b/deps/npm/man/man7/registry.7 @@ -1,4 +1,4 @@ -.TH "REGISTRY" "7" "July 2021" "" "" +.TH "REGISTRY" "7" "August 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 a0c1c0073a8847..7e8a85039b8437 100644 --- a/deps/npm/man/man7/removal.7 +++ b/deps/npm/man/man7/removal.7 @@ -1,4 +1,4 @@ -.TH "REMOVAL" "7" "July 2021" "" "" +.TH "REMOVAL" "7" "August 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 218f4ee5a7dcd1..6cf9946d01aa44 100644 --- a/deps/npm/man/man7/scope.7 +++ b/deps/npm/man/man7/scope.7 @@ -1,4 +1,4 @@ -.TH "SCOPE" "7" "July 2021" "" "" +.TH "SCOPE" "7" "August 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 cac6ab0a2a3565..086f7289b5117b 100644 --- a/deps/npm/man/man7/scripts.7 +++ b/deps/npm/man/man7/scripts.7 @@ -1,4 +1,4 @@ -.TH "SCRIPTS" "7" "July 2021" "" "" +.TH "SCRIPTS" "7" "August 2021" "" "" .SH "NAME" \fBscripts\fR \- How npm handles the "scripts" field .SS Description diff --git a/deps/npm/man/man7/workspaces.7 b/deps/npm/man/man7/workspaces.7 index 52128895a4acb7..0e6e4c410cc3af 100644 --- a/deps/npm/man/man7/workspaces.7 +++ b/deps/npm/man/man7/workspaces.7 @@ -1,4 +1,4 @@ -.TH "WORKSPACES" "7" "July 2021" "" "" +.TH "WORKSPACES" "7" "August 2021" "" "" .SH "NAME" \fBworkspaces\fR \- Working with workspaces .SS Description diff --git a/deps/npm/node_modules/chalk/package.json b/deps/npm/node_modules/chalk/package.json index c2d63f67e5e955..47c23f29068caa 100644 --- a/deps/npm/node_modules/chalk/package.json +++ b/deps/npm/node_modules/chalk/package.json @@ -1,6 +1,6 @@ { "name": "chalk", - "version": "4.1.1", + "version": "4.1.2", "description": "Terminal string styling done right", "license": "MIT", "repository": "chalk/chalk", diff --git a/deps/npm/node_modules/chalk/readme.md b/deps/npm/node_modules/chalk/readme.md index 851259216bc193..a055d21c97ed76 100644 --- a/deps/npm/node_modules/chalk/readme.md +++ b/deps/npm/node_modules/chalk/readme.md @@ -33,7 +33,7 @@

- +

@@ -48,6 +48,12 @@ and avoiding access controls. Keep your team and servers in sync with Doppler. +
+ +

+ UI Bakery +
+

diff --git a/deps/npm/node_modules/graceful-fs/graceful-fs.js b/deps/npm/node_modules/graceful-fs/graceful-fs.js index e15042da910306..947cd94bb41bca 100644 --- a/deps/npm/node_modules/graceful-fs/graceful-fs.js +++ b/deps/npm/node_modules/graceful-fs/graceful-fs.js @@ -54,7 +54,7 @@ if (!fs[gracefulQueue]) { return fs$close.call(fs, fd, function (err) { // This function uses the graceful-fs shared queue if (!err) { - retry() + resetQueue() } if (typeof cb === 'function') @@ -72,7 +72,7 @@ if (!fs[gracefulQueue]) { function closeSync (fd) { // This function uses the graceful-fs shared queue fs$closeSync.apply(fs, arguments) - retry() + resetQueue() } Object.defineProperty(closeSync, previousSymbol, { @@ -114,14 +114,13 @@ function patch (fs) { return go$readFile(path, options, cb) - function go$readFile (path, options, cb) { + function go$readFile (path, options, cb, startTime) { return fs$readFile(path, options, function (err) { if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$readFile, [path, options, cb]]) + enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()]) else { if (typeof cb === 'function') cb.apply(this, arguments) - retry() } }) } @@ -135,14 +134,13 @@ function patch (fs) { return go$writeFile(path, data, options, cb) - function go$writeFile (path, data, options, cb) { + function go$writeFile (path, data, options, cb, startTime) { return fs$writeFile(path, data, options, function (err) { if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$writeFile, [path, data, options, cb]]) + enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) else { if (typeof cb === 'function') cb.apply(this, arguments) - retry() } }) } @@ -157,14 +155,13 @@ function patch (fs) { return go$appendFile(path, data, options, cb) - function go$appendFile (path, data, options, cb) { + function go$appendFile (path, data, options, cb, startTime) { return fs$appendFile(path, data, options, function (err) { if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$appendFile, [path, data, options, cb]]) + enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) else { if (typeof cb === 'function') cb.apply(this, arguments) - retry() } }) } @@ -178,49 +175,43 @@ function patch (fs) { cb = flags flags = 0 } - return fs$copyFile(src, dest, flags, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([fs$copyFile, [src, dest, flags, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) + return go$copyFile(src, dest, flags, cb) + + function go$copyFile (src, dest, flags, cb, startTime) { + return fs$copyFile(src, dest, flags, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } } var fs$readdir = fs.readdir fs.readdir = readdir function readdir (path, options, cb) { - var args = [path] - if (typeof options !== 'function') { - args.push(options) - } else { - cb = options - } - args.push(go$readdir$cb) - - return go$readdir(args) + if (typeof options === 'function') + cb = options, options = null - function go$readdir$cb (err, files) { - if (files && files.sort) - files.sort() + return go$readdir(path, options, cb) - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$readdir, [args]]) + function go$readdir (path, options, cb, startTime) { + return fs$readdir(path, options, function (err, files) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readdir, [path, options, cb], err, startTime || Date.now(), Date.now()]) + else { + if (files && files.sort) + files.sort() - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } + if (typeof cb === 'function') + cb.call(this, err, files) + } + }) } } - function go$readdir (args) { - return fs$readdir.apply(fs, args) - } - if (process.version.substr(0, 4) === 'v0.8') { var legStreams = legacy(fs) ReadStream = legStreams.ReadStream @@ -343,14 +334,13 @@ function patch (fs) { return go$open(path, flags, mode, cb) - function go$open (path, flags, mode, cb) { + function go$open (path, flags, mode, cb, startTime) { return fs$open(path, flags, mode, function (err, fd) { if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$open, [path, flags, mode, cb]]) + enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()]) else { if (typeof cb === 'function') cb.apply(this, arguments) - retry() } }) } @@ -362,12 +352,78 @@ function patch (fs) { function enqueue (elem) { debug('ENQUEUE', elem[0].name, elem[1]) fs[gracefulQueue].push(elem) + retry() +} + +// keep track of the timeout between retry() calls +var retryTimer + +// reset the startTime and lastTime to now +// this resets the start of the 60 second overall timeout as well as the +// delay between attempts so that we'll retry these jobs sooner +function resetQueue () { + var now = Date.now() + for (var i = 0; i < fs[gracefulQueue].length; ++i) { + // entries that are only a length of 2 are from an older version, don't + // bother modifying those since they'll be retried anyway. + if (fs[gracefulQueue][i].length > 2) { + fs[gracefulQueue][i][3] = now // startTime + fs[gracefulQueue][i][4] = now // lastTime + } + } + // call retry to make sure we're actively processing the queue + retry() } function retry () { + // clear the timer and remove it to help prevent unintended concurrency + clearTimeout(retryTimer) + retryTimer = undefined + + if (fs[gracefulQueue].length === 0) + return + var elem = fs[gracefulQueue].shift() - if (elem) { - debug('RETRY', elem[0].name, elem[1]) - elem[0].apply(null, elem[1]) + var fn = elem[0] + var args = elem[1] + // these items may be unset if they were added by an older graceful-fs + var err = elem[2] + var startTime = elem[3] + var lastTime = elem[4] + + // if we don't have a startTime we have no way of knowing if we've waited + // long enough, so go ahead and retry this item now + if (startTime === undefined) { + debug('RETRY', fn.name, args) + fn.apply(null, args) + } else if (Date.now() - startTime >= 60000) { + // it's been more than 60 seconds total, bail now + debug('TIMEOUT', fn.name, args) + var cb = args.pop() + if (typeof cb === 'function') + cb.call(null, err) + } else { + // the amount of time between the last attempt and right now + var sinceAttempt = Date.now() - lastTime + // the amount of time between when we first tried, and when we last tried + // rounded up to at least 1 + var sinceStart = Math.max(lastTime - startTime, 1) + // backoff. wait longer than the total time we've been retrying, but only + // up to a maximum of 100ms + var desiredDelay = Math.min(sinceStart * 1.2, 100) + // it's been long enough since the last retry, do it again + if (sinceAttempt >= desiredDelay) { + debug('RETRY', fn.name, args) + fn.apply(null, args.concat([startTime])) + } else { + // if we can't do this job yet, push it to the end of the queue + // and let the next iteration check again + fs[gracefulQueue].push(elem) + } + } + + // schedule our next run if one isn't already scheduled + if (retryTimer === undefined) { + retryTimer = setTimeout(retry, 0) } } diff --git a/deps/npm/node_modules/graceful-fs/package.json b/deps/npm/node_modules/graceful-fs/package.json index d73f971fc22f56..032c7d0b584485 100644 --- a/deps/npm/node_modules/graceful-fs/package.json +++ b/deps/npm/node_modules/graceful-fs/package.json @@ -1,7 +1,7 @@ { "name": "graceful-fs", "description": "A drop-in replacement for fs, making various improvements.", - "version": "4.2.6", + "version": "4.2.8", "repository": { "type": "git", "url": "https://github.com/isaacs/node-graceful-fs" diff --git a/deps/npm/node_modules/libnpmexec/lib/index.js b/deps/npm/node_modules/libnpmexec/lib/index.js index 57c2a148d34892..3f1463d767a8e0 100644 --- a/deps/npm/node_modules/libnpmexec/lib/index.js +++ b/deps/npm/node_modules/libnpmexec/lib/index.js @@ -165,6 +165,8 @@ const exec = async (opts) => { const prompt = `Need to install the following packages:\n${ addList }Ok to proceed? ` + if (typeof log.clearProgress === 'function') + log.clearProgress() const confirm = await read({ prompt, default: 'y' }) if (confirm.trim().toLowerCase().charAt(0) !== 'y') throw new Error('canceled') diff --git a/deps/npm/node_modules/libnpmexec/package.json b/deps/npm/node_modules/libnpmexec/package.json index dff91077d148a0..2668f11731e6f5 100644 --- a/deps/npm/node_modules/libnpmexec/package.json +++ b/deps/npm/node_modules/libnpmexec/package.json @@ -1,6 +1,6 @@ { "name": "libnpmexec", - "version": "2.0.0", + "version": "2.0.1", "files": [ "lib" ], diff --git a/deps/npm/node_modules/tar/lib/extract.js b/deps/npm/node_modules/tar/lib/extract.js index f269145edef7ad..98e946ec5bfbbc 100644 --- a/deps/npm/node_modules/tar/lib/extract.js +++ b/deps/npm/node_modules/tar/lib/extract.js @@ -6,6 +6,7 @@ const Unpack = require('./unpack.js') const fs = require('fs') const fsm = require('fs-minipass') const path = require('path') +const stripSlash = require('./strip-trailing-slashes.js') module.exports = (opt_, files, cb) => { if (typeof opt_ === 'function') @@ -41,7 +42,7 @@ module.exports = (opt_, files, cb) => { // construct a filter that limits the file entries listed // include child entries if a dir is included const filesFilter = (opt, files) => { - const map = new Map(files.map(f => [f.replace(/\/+$/, ''), true])) + const map = new Map(files.map(f => [stripSlash(f), true])) const filter = opt.filter const mapHas = (file, r) => { @@ -55,8 +56,8 @@ const filesFilter = (opt, files) => { } opt.filter = filter - ? (file, entry) => filter(file, entry) && mapHas(file.replace(/\/+$/, '')) - : file => mapHas(file.replace(/\/+$/, '')) + ? (file, entry) => filter(file, entry) && mapHas(stripSlash(file)) + : file => mapHas(stripSlash(file)) } const extractFileSync = opt => { diff --git a/deps/npm/node_modules/tar/lib/list.js b/deps/npm/node_modules/tar/lib/list.js index 702cfea808d421..a0c1cf2fbc7eac 100644 --- a/deps/npm/node_modules/tar/lib/list.js +++ b/deps/npm/node_modules/tar/lib/list.js @@ -9,6 +9,7 @@ const Parser = require('./parse.js') const fs = require('fs') const fsm = require('fs-minipass') const path = require('path') +const stripSlash = require('./strip-trailing-slashes.js') module.exports = (opt_, files, cb) => { if (typeof opt_ === 'function') @@ -54,7 +55,7 @@ const onentryFunction = opt => { // construct a filter that limits the file entries listed // include child entries if a dir is included const filesFilter = (opt, files) => { - const map = new Map(files.map(f => [f.replace(/\/+$/, ''), true])) + const map = new Map(files.map(f => [stripSlash(f), true])) const filter = opt.filter const mapHas = (file, r) => { @@ -68,8 +69,8 @@ const filesFilter = (opt, files) => { } opt.filter = filter - ? (file, entry) => filter(file, entry) && mapHas(file.replace(/\/+$/, '')) - : file => mapHas(file.replace(/\/+$/, '')) + ? (file, entry) => filter(file, entry) && mapHas(stripSlash(file)) + : file => mapHas(stripSlash(file)) } const listFileSync = opt => { diff --git a/deps/npm/node_modules/tar/lib/pack.js b/deps/npm/node_modules/tar/lib/pack.js index 492fe18ec47ee4..df7f9f1c8df5bf 100644 --- a/deps/npm/node_modules/tar/lib/pack.js +++ b/deps/npm/node_modules/tar/lib/pack.js @@ -134,9 +134,6 @@ const Pack = warner(class Pack extends MiniPass { [ADDTARENTRY] (p) { const absolute = path.resolve(this.cwd, p.path) - if (this.prefix) - p.path = this.prefix + '/' + p.path.replace(/^\.(\/+|$)/, '') - // in this case, we don't have to wait for the stat if (!this.filter(p.path, p)) p.resume() @@ -153,9 +150,6 @@ const Pack = warner(class Pack extends MiniPass { [ADDFSENTRY] (p) { const absolute = path.resolve(this.cwd, p) - if (this.prefix) - p = this.prefix + '/' + p.replace(/^\.(\/+|$)/, '') - this[QUEUE].push(new PackJob(p, absolute)) this[PROCESS]() } @@ -298,6 +292,7 @@ const Pack = warner(class Pack extends MiniPass { statCache: this.statCache, noMtime: this.noMtime, mtime: this.mtime, + prefix: this.prefix, } } @@ -323,10 +318,7 @@ const Pack = warner(class Pack extends MiniPass { if (job.readdir) { job.readdir.forEach(entry => { - const p = this.prefix ? - job.path.slice(this.prefix.length + 1) || './' - : job.path - + const p = job.path const base = p === './' ? '' : p.replace(/\/*$/, '/') this[ADDFSENTRY](base + entry) }) @@ -381,10 +373,7 @@ class PackSync extends Pack { if (job.readdir) { job.readdir.forEach(entry => { - const p = this.prefix ? - job.path.slice(this.prefix.length + 1) || './' - : job.path - + const p = job.path const base = p === './' ? '' : p.replace(/\/*$/, '/') this[ADDFSENTRY](base + entry) }) diff --git a/deps/npm/node_modules/tar/lib/strip-trailing-slashes.js b/deps/npm/node_modules/tar/lib/strip-trailing-slashes.js new file mode 100644 index 00000000000000..f702ed5a5c0ce5 --- /dev/null +++ b/deps/npm/node_modules/tar/lib/strip-trailing-slashes.js @@ -0,0 +1,24 @@ +// this is the only approach that was significantly faster than using +// str.replace(/\/+$/, '') for strings ending with a lot of / chars and +// containing multiple / chars. +const batchStrings = [ + '/'.repeat(1024), + '/'.repeat(512), + '/'.repeat(256), + '/'.repeat(128), + '/'.repeat(64), + '/'.repeat(32), + '/'.repeat(16), + '/'.repeat(8), + '/'.repeat(4), + '/'.repeat(2), + '/', +] + +module.exports = str => { + for (const s of batchStrings) { + while (str.length >= s.length && str.slice(-1 * s.length) === s) + str = str.slice(0, -1 * s.length) + } + return str +} diff --git a/deps/npm/node_modules/tar/lib/unpack.js b/deps/npm/node_modules/tar/lib/unpack.js index edaf7833cdb5b7..282e04f945c50a 100644 --- a/deps/npm/node_modules/tar/lib/unpack.js +++ b/deps/npm/node_modules/tar/lib/unpack.js @@ -205,6 +205,8 @@ class Unpack extends Parser { if (parts.length < this.strip) return false entry.path = parts.slice(this.strip).join('/') + if (entry.path === '' && entry.type !== 'Directory' && entry.type !== 'GNUDumpDir') + return false if (entry.type === 'Link') { const linkparts = entry.linkpath.split(/\/|\\/) @@ -333,17 +335,35 @@ class Unpack extends Parser { mode: mode, autoClose: false, }) - stream.on('error', er => this[ONERROR](er, entry)) + stream.on('error', er => { + if (stream.fd) + fs.close(stream.fd, () => {}) + // flush all the data out so that we aren't left hanging + // if the error wasn't actually fatal. otherwise the parse + // is blocked, and we never proceed. + stream.write = () => true + this[ONERROR](er, entry) + fullyDone() + }) let actions = 1 const done = er => { - if (er) - return this[ONERROR](er, entry) + if (er) { + /* istanbul ignore else - we should always have a fd by now */ + if (stream.fd) + fs.close(stream.fd, () => {}) + this[ONERROR](er, entry) + fullyDone() + return + } if (--actions === 0) { fs.close(stream.fd, er => { + if (er) + this[ONERROR](er, entry) + else + this[UNPEND]() fullyDone() - er ? this[ONERROR](er, entry) : this[UNPEND]() }) } } @@ -378,7 +398,10 @@ class Unpack extends Parser { const tx = this.transform ? this.transform(entry) || entry : entry if (tx !== entry) { - tx.on('error', er => this[ONERROR](er, entry)) + tx.on('error', er => { + this[ONERROR](er, entry) + fullyDone() + }) entry.pipe(tx) } tx.pipe(stream) @@ -388,8 +411,9 @@ class Unpack extends Parser { const mode = entry.mode & 0o7777 || this.dmode this[MKDIR](entry.absolute, mode, er => { if (er) { + this[ONERROR](er, entry) fullyDone() - return this[ONERROR](er, entry) + return } let actions = 1 @@ -480,8 +504,9 @@ class Unpack extends Parser { this[MKDIR](path.dirname(entry.absolute), this.dmode, er => { if (er) { + this[ONERROR](er, entry) done() - return this[ONERROR](er, entry) + return } fs.lstat(entry.absolute, (er, st) => { if (st && (this.keep || this.newer && st.mtime > entry.mtime)) { @@ -489,7 +514,6 @@ class Unpack extends Parser { done() } else if (er || this[ISREUSABLE](entry, st)) this[MAKEFS](null, entry, done) - else if (st.isDirectory()) { if (entry.type === 'Directory') { if (!this.noChmod && (!entry.mode || (st.mode & 0o7777) === entry.mode)) @@ -507,8 +531,11 @@ class Unpack extends Parser { } [MAKEFS] (er, entry, done) { - if (er) - return this[ONERROR](er, entry) + if (er) { + this[ONERROR](er, entry) + done() + return + } switch (entry.type) { case 'File': @@ -532,10 +559,12 @@ class Unpack extends Parser { // XXX: get the type ('file' or 'dir') for windows fs[link](linkpath, entry.absolute, er => { if (er) - return this[ONERROR](er, entry) + this[ONERROR](er, entry) + else { + this[UNPEND]() + entry.resume() + } done() - this[UNPEND]() - entry.resume() }) } } diff --git a/deps/npm/node_modules/tar/lib/write-entry.js b/deps/npm/node_modules/tar/lib/write-entry.js index 0301759ad386f2..0457f3aefe2a89 100644 --- a/deps/npm/node_modules/tar/lib/write-entry.js +++ b/deps/npm/node_modules/tar/lib/write-entry.js @@ -5,6 +5,13 @@ const Header = require('./header.js') const fs = require('fs') const path = require('path') +const prefixPath = (path, prefix) => { + if (!prefix) + return path + path = path.replace(/^\.([/\\]|$)/, '') + return prefix + '/' + path +} + const maxReadSize = 16 * 1024 * 1024 const PROCESS = Symbol('process') const FILE = Symbol('file') @@ -21,6 +28,9 @@ const OPENFILE = Symbol('openfile') const ONOPENFILE = Symbol('onopenfile') const CLOSE = Symbol('close') const MODE = Symbol('mode') +const AWAITDRAIN = Symbol('awaitDrain') +const ONDRAIN = Symbol('ondrain') +const PREFIX = Symbol('prefix') const warner = require('./warn-mixin.js') const winchars = require('./winchars.js') const stripAbsolutePath = require('./strip-absolute-path.js') @@ -48,6 +58,16 @@ const WriteEntry = warner(class WriteEntry extends MiniPass { this.noPax = !!opt.noPax this.noMtime = !!opt.noMtime this.mtime = opt.mtime || null + this.prefix = opt.prefix || null + + this.fd = null + this.blockLen = null + this.blockRemain = null + this.buf = null + this.offset = null + this.length = null + this.pos = null + this.remain = null if (typeof opt.onwarn === 'function') this.on('warn', opt.onwarn) @@ -117,13 +137,19 @@ const WriteEntry = warner(class WriteEntry extends MiniPass { return modeFix(mode, this.type === 'Directory', this.portable) } + [PREFIX] (path) { + return prefixPath(path, this.prefix) + } + [HEADER] () { if (this.type === 'Directory' && this.portable) this.noMtime = true this.header = new Header({ - path: this.path, - linkpath: this.linkpath, + path: this[PREFIX](this.path), + // only apply the prefix to hard links. + linkpath: this.type === 'Link' ? this[PREFIX](this.linkpath) + : this.linkpath, // only the permissions and setuid/setgid/sticky bitflags // not the higher-order bits that specify file type mode: this[MODE](this.stat.mode), @@ -139,13 +165,14 @@ const WriteEntry = warner(class WriteEntry extends MiniPass { }) if (this.header.encode() && !this.noPax) { - this.write(new Pax({ + super.write(new Pax({ atime: this.portable ? null : this.header.atime, ctime: this.portable ? null : this.header.ctime, gid: this.portable ? null : this.header.gid, mtime: this.noMtime ? null : this.mtime || this.header.mtime, - path: this.path, - linkpath: this.linkpath, + path: this[PREFIX](this.path), + linkpath: this.type === 'Link' ? this[PREFIX](this.linkpath) + : this.linkpath, size: this.header.size, uid: this.portable ? null : this.header.uid, uname: this.portable ? null : this.header.uname, @@ -154,7 +181,7 @@ const WriteEntry = warner(class WriteEntry extends MiniPass { nlink: this.portable ? null : this.stat.nlink, }).encode()) } - this.write(this.header.block) + super.write(this.header.block) } [DIRECTORY] () { @@ -214,74 +241,107 @@ const WriteEntry = warner(class WriteEntry extends MiniPass { } [ONOPENFILE] (fd) { - const blockLen = 512 * Math.ceil(this.stat.size / 512) - const bufLen = Math.min(blockLen, this.maxReadSize) - const buf = Buffer.allocUnsafe(bufLen) - this[READ](fd, buf, 0, buf.length, 0, this.stat.size, blockLen) + this.fd = fd + this.blockLen = 512 * Math.ceil(this.stat.size / 512) + this.blockRemain = this.blockLen + const bufLen = Math.min(this.blockLen, this.maxReadSize) + this.buf = Buffer.allocUnsafe(bufLen) + this.offset = 0 + this.pos = 0 + this.remain = this.stat.size + this.length = this.buf.length + this[READ]() } - [READ] (fd, buf, offset, length, pos, remain, blockRemain) { + [READ] () { + const { fd, buf, offset, length, pos } = this fs.read(fd, buf, offset, length, pos, (er, bytesRead) => { if (er) { // ignoring the error from close(2) is a bad practice, but at // this point we already have an error, don't need another one - return this[CLOSE](fd, () => this.emit('error', er)) + return this[CLOSE](() => this.emit('error', er)) } - this[ONREAD](fd, buf, offset, length, pos, remain, blockRemain, bytesRead) + this[ONREAD](bytesRead) }) } - [CLOSE] (fd, cb) { - fs.close(fd, cb) + [CLOSE] (cb) { + fs.close(this.fd, cb) } - [ONREAD] (fd, buf, offset, length, pos, remain, blockRemain, bytesRead) { - if (bytesRead <= 0 && remain > 0) { + [ONREAD] (bytesRead) { + if (bytesRead <= 0 && this.remain > 0) { const er = new Error('encountered unexpected EOF') er.path = this.absolute er.syscall = 'read' er.code = 'EOF' - return this[CLOSE](fd, () => this.emit('error', er)) + return this[CLOSE](() => this.emit('error', er)) } - if (bytesRead > remain) { + if (bytesRead > this.remain) { const er = new Error('did not encounter expected EOF') er.path = this.absolute er.syscall = 'read' er.code = 'EOF' - return this[CLOSE](fd, () => this.emit('error', er)) + return this[CLOSE](() => this.emit('error', er)) } // null out the rest of the buffer, if we could fit the block padding - if (bytesRead === remain) { - for (let i = bytesRead; i < length && bytesRead < blockRemain; i++) { - buf[i + offset] = 0 + // at the end of this loop, we've incremented bytesRead and this.remain + // to be incremented up to the blockRemain level, as if we had expected + // to get a null-padded file, and read it until the end. then we will + // decrement both remain and blockRemain by bytesRead, and know that we + // reached the expected EOF, without any null buffer to append. + if (bytesRead === this.remain) { + for (let i = bytesRead; i < this.length && bytesRead < this.blockRemain; i++) { + this.buf[i + this.offset] = 0 bytesRead++ - remain++ + this.remain++ } } - const writeBuf = offset === 0 && bytesRead === buf.length ? - buf : buf.slice(offset, offset + bytesRead) - remain -= bytesRead - blockRemain -= bytesRead - pos += bytesRead - offset += bytesRead + const writeBuf = this.offset === 0 && bytesRead === this.buf.length ? + this.buf : this.buf.slice(this.offset, this.offset + bytesRead) - this.write(writeBuf) + const flushed = this.write(writeBuf) + if (!flushed) + this[AWAITDRAIN](() => this[ONDRAIN]()) + else + this[ONDRAIN]() + } + + [AWAITDRAIN] (cb) { + this.once('drain', cb) + } - if (!remain) { - if (blockRemain) - this.write(Buffer.alloc(blockRemain)) - return this[CLOSE](fd, er => er ? this.emit('error', er) : this.end()) + write (writeBuf) { + if (this.blockRemain < writeBuf.length) { + const er = new Error('writing more data than expected') + er.path = this.absolute + return this.emit('error', er) } + this.remain -= writeBuf.length + this.blockRemain -= writeBuf.length + this.pos += writeBuf.length + this.offset += writeBuf.length + return super.write(writeBuf) + } - if (offset >= length) { - buf = Buffer.allocUnsafe(length) - offset = 0 + [ONDRAIN] () { + if (!this.remain) { + if (this.blockRemain) + super.write(Buffer.alloc(this.blockRemain)) + return this[CLOSE](er => er ? this.emit('error', er) : this.end()) } - length = buf.length - offset - this[READ](fd, buf, offset, length, pos, remain, blockRemain) + + if (this.offset >= this.length) { + // if we only have a smaller bit left to read, alloc a smaller buffer + // otherwise, keep it the same length it was before. + this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)) + this.offset = 0 + } + this.length = this.buf.length - this.offset + this[READ]() } }) @@ -298,25 +358,30 @@ class WriteEntrySync extends WriteEntry { this[ONOPENFILE](fs.openSync(this.absolute, 'r')) } - [READ] (fd, buf, offset, length, pos, remain, blockRemain) { + [READ] () { let threw = true try { + const { fd, buf, offset, length, pos } = this const bytesRead = fs.readSync(fd, buf, offset, length, pos) - this[ONREAD](fd, buf, offset, length, pos, remain, blockRemain, bytesRead) + this[ONREAD](bytesRead) threw = false } 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, () => {}) + this[CLOSE](() => {}) } catch (er) {} } } } - [CLOSE] (fd, cb) { - fs.closeSync(fd) + [AWAITDRAIN] (cb) { + cb() + } + + [CLOSE] (cb) { + fs.closeSync(this.fd) cb() } } @@ -336,6 +401,8 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass { if (this.type === 'Directory' && this.portable) this.noMtime = true + this.prefix = opt.prefix || null + this.path = readEntry.path this.mode = this[MODE](readEntry.mode) this.uid = this.portable ? null : readEntry.uid @@ -364,8 +431,9 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass { this.blockRemain = readEntry.startBlockSize this.header = new Header({ - path: this.path, - linkpath: this.linkpath, + path: this[PREFIX](this.path), + linkpath: this.type === 'Link' ? this[PREFIX](this.linkpath) + : this.linkpath, // only the permissions and setuid/setgid/sticky bitflags // not the higher-order bits that specify file type mode: this.mode, @@ -392,8 +460,9 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass { ctime: this.portable ? null : this.ctime, gid: this.portable ? null : this.gid, mtime: this.noMtime ? null : this.mtime, - path: this.path, - linkpath: this.linkpath, + path: this[PREFIX](this.path), + linkpath: this.type === 'Link' ? this[PREFIX](this.linkpath) + : this.linkpath, size: this.size, uid: this.portable ? null : this.uid, uname: this.portable ? null : this.uname, @@ -407,6 +476,10 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass { readEntry.pipe(this) } + [PREFIX] (path) { + return prefixPath(path, this.prefix) + } + [MODE] (mode) { return modeFix(mode, this.type === 'Directory', this.portable) } @@ -421,7 +494,7 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass { end () { if (this.blockRemain) - this.write(Buffer.alloc(this.blockRemain)) + super.write(Buffer.alloc(this.blockRemain)) return super.end() } }) diff --git a/deps/npm/node_modules/tar/package.json b/deps/npm/node_modules/tar/package.json index 1c82ac7291631e..fbde61edcc51ea 100644 --- a/deps/npm/node_modules/tar/package.json +++ b/deps/npm/node_modules/tar/package.json @@ -2,7 +2,7 @@ "author": "Isaac Z. Schlueter (http://blog.izs.me/)", "name": "tar", "description": "tar for node", - "version": "6.1.2", + "version": "6.1.6", "repository": { "type": "git", "url": "https://github.com/npm/node-tar.git" diff --git a/deps/npm/package.json b/deps/npm/package.json index b728f9f88d1ec7..357e066a5efa18 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "7.20.3", + "version": "7.20.5", "name": "npm", "description": "a package manager for JavaScript", "workspaces": [ @@ -64,13 +64,13 @@ "archy": "~1.0.0", "byte-size": "^7.0.1", "cacache": "^15.2.0", - "chalk": "^4.1.0", + "chalk": "^4.1.2", "chownr": "^2.0.0", "cli-columns": "^3.1.2", "cli-table3": "^0.6.0", "columnify": "~1.5.4", "glob": "^7.1.7", - "graceful-fs": "^4.2.6", + "graceful-fs": "^4.2.8", "hosted-git-info": "^4.0.2", "ini": "^2.0.0", "init-package-json": "^2.0.3", @@ -79,7 +79,7 @@ "leven": "^3.1.0", "libnpmaccess": "^4.0.2", "libnpmdiff": "^2.0.4", - "libnpmexec": "^2.0.0", + "libnpmexec": "^2.0.1", "libnpmfund": "^1.1.0", "libnpmhook": "^6.0.2", "libnpmorg": "^2.0.2", @@ -114,7 +114,7 @@ "rimraf": "^3.0.2", "semver": "^7.3.5", "ssri": "^8.0.1", - "tar": "^6.1.2", + "tar": "^6.1.6", "text-table": "~0.2.0", "tiny-relative-date": "^1.3.0", "treeverse": "^1.0.4", @@ -199,6 +199,7 @@ "eslint-plugin-promise": "^5.1.0", "eslint-plugin-standard": "^5.0.0", "licensee": "^8.2.0", + "spawk": "^1.7.1", "tap": "^15.0.9" }, "scripts": { diff --git a/deps/npm/test/fixtures/mock-npm.js b/deps/npm/test/fixtures/mock-npm.js index e3be10b4b9aa3f..3faf8d5cf4f6be 100644 --- a/deps/npm/test/fixtures/mock-npm.js +++ b/deps/npm/test/fixtures/mock-npm.js @@ -9,6 +9,10 @@ for (const level in npmlog.levels) const { title, execPath } = process const RealMockNpm = (t, otherMocks = {}) => { + t.afterEach(() => { + outputs.length = 0 + logs.length = 0 + }) t.teardown(() => { npm.perfStop() npmlog.record.length = 0 @@ -22,6 +26,9 @@ const RealMockNpm = (t, otherMocks = {}) => { }) const logs = [] const outputs = [] + const joinedOutput = () => { + return outputs.map(o => o.join(' ')).join('\n') + } const npm = t.mock('../../lib/npm.js', otherMocks) const command = async (command, args = []) => { return new Promise((resolve, reject) => { @@ -43,7 +50,7 @@ const RealMockNpm = (t, otherMocks = {}) => { } } npm.output = (...msg) => outputs.push(msg) - return { npm, logs, outputs, command } + return { npm, logs, outputs, command, joinedOutput } } const realConfig = require('../../lib/utils/config') diff --git a/deps/npm/test/lib/find-dupes.js b/deps/npm/test/lib/find-dupes.js index c7b33ceb6ed343..17940764b94a59 100644 --- a/deps/npm/test/lib/find-dupes.js +++ b/deps/npm/test/lib/find-dupes.js @@ -1,24 +1,26 @@ const t = require('tap') -const FindDupes = require('../../lib/find-dupes.js') +const { real: mockNpm } = require('../fixtures/mock-npm') -t.test('should run dedupe in dryRun mode', (t) => { - t.plan(3) - const findDupesTest = new FindDupes({ - config: { - set: (k, v) => { - t.match(k, 'dry-run') - t.match(v, true) - }, +t.test('should run dedupe in dryRun mode', async (t) => { + t.plan(5) + const { npm, command } = mockNpm(t, { + '@npmcli/arborist': function (args) { + t.ok(args, 'gets options object') + t.ok(args.path, 'gets path option') + t.ok(args.dryRun, 'is called in dryRun mode') + this.dedupe = () => { + t.ok(true, 'dedupe is called') + } }, - commands: { - dedupe: (args, cb) => { - t.match(args, []) - cb() - }, + '../../lib/utils/reify-finish.js': (npm, arb) => { + t.ok(arb, 'gets arborist tree') }, }) - findDupesTest.exec({}, () => { - t.end() - }) + await npm.load() + // explicitly set to false so we can be 100% sure it's always true when it + // hits arborist + npm.config.set('dry-run', false) + npm.config.set('prefix', 'foo') + await command('find-dupes') }) diff --git a/deps/npm/test/lib/get.js b/deps/npm/test/lib/get.js index 9b77fbba3e6f40..30e26b7453fe8c 100644 --- a/deps/npm/test/lib/get.js +++ b/deps/npm/test/lib/get.js @@ -1,16 +1,16 @@ const t = require('tap') +const { real: mockNpm } = require('../fixtures/mock-npm') -t.test('should retrieve values from npm.commands.config', (t) => { - const Get = t.mock('../../lib/get.js') - const get = new Get({ - commands: { - config: ([action, arg]) => { - t.equal(action, 'get', 'should use config get action') - t.equal(arg, 'foo', 'should use expected key') - t.end() - }, - }, - }) - - get.exec(['foo']) +t.test('should retrieve values from config', async t => { + const { joinedOutput, command, npm } = mockNpm(t) + const name = 'editor' + const value = 'vigor' + await npm.load() + npm.config.set(name, value) + await command('get', [name]) + t.equal( + joinedOutput(), + value, + 'outputs config item' + ) }) diff --git a/deps/npm/test/lib/load-all.js b/deps/npm/test/lib/load-all.js index e6e407805346d5..c38c244934ec39 100644 --- a/deps/npm/test/lib/load-all.js +++ b/deps/npm/test/lib/load-all.js @@ -1,15 +1,24 @@ const t = require('tap') const glob = require('glob') const { resolve } = require('path') +const { real: mockNpm } = require('../fixtures/mock-npm') const full = process.env.npm_lifecycle_event === 'check-coverage' if (!full) t.pass('nothing to do here, not checking for full coverage') else { - // some files do config.get() on load, so have to load npm first - const npm = require('../../lib/npm.js') - t.test('load npm first', t => npm.load(t.end)) + const { npm } = mockNpm(t) + + t.teardown(() => { + const exitHandler = require('../../lib/utils/exit-handler.js') + exitHandler.setNpm(npm) + exitHandler() + }) + + t.test('load npm first', async t => { + await npm.load() + }) t.test('load all the files', t => { // just load all the files so we measure coverage for the missing tests @@ -21,11 +30,4 @@ else { t.pass('loaded all files') t.end() }) - - t.test('call the exit handler so we dont freak out', t => { - const exitHandler = require('../../lib/utils/exit-handler.js') - exitHandler.setNpm(npm) - exitHandler() - t.end() - }) } diff --git a/deps/npm/test/lib/prefix.js b/deps/npm/test/lib/prefix.js index 526631388e74ff..18a37f3ccd1e0e 100644 --- a/deps/npm/test/lib/prefix.js +++ b/deps/npm/test/lib/prefix.js @@ -1,19 +1,13 @@ const t = require('tap') +const { real: mockNpm } = require('../fixtures/mock-npm') -t.test('prefix', (t) => { - t.plan(3) - const dir = '/prefix/dir' - - const Prefix = require('../../lib/prefix.js') - const prefix = new Prefix({ - prefix: dir, - output: (output) => { - t.equal(output, dir, 'prints the correct directory') - }, - }) - - prefix.exec([], (err) => { - t.error(err, 'npm prefix') - t.ok('should have printed directory') - }) +t.test('prefix', async (t) => { + const { joinedOutput, command, npm } = mockNpm(t) + await npm.load() + await command('prefix') + t.equal( + joinedOutput(), + npm.prefix, + 'outputs npm.prefix' + ) }) diff --git a/deps/npm/test/lib/prune.js b/deps/npm/test/lib/prune.js index 87bb1370f3a194..3e47feb4613942 100644 --- a/deps/npm/test/lib/prune.js +++ b/deps/npm/test/lib/prune.js @@ -1,7 +1,9 @@ const t = require('tap') +const { real: mockNpm } = require('../fixtures/mock-npm') -t.test('should prune using Arborist', (t) => { - const Prune = t.mock('../../lib/prune.js', { +t.test('should prune using Arborist', async (t) => { + t.plan(4) + const { command, npm } = mockNpm(t, { '@npmcli/arborist': function (args) { t.ok(args, 'gets options object') t.ok(args.path, 'gets path option') @@ -13,16 +15,6 @@ t.test('should prune using Arborist', (t) => { t.ok(arb, 'gets arborist tree') }, }) - const prune = new Prune({ - prefix: 'foo', - flatOptions: { - foo: 'bar', - }, - }) - prune.exec(null, er => { - if (er) - throw er - t.ok(true, 'callback is called') - t.end() - }) + await npm.load() + await command('prune') }) diff --git a/deps/npm/test/lib/restart.js b/deps/npm/test/lib/restart.js index 9719476c418073..153c31447282cd 100644 --- a/deps/npm/test/lib/restart.js +++ b/deps/npm/test/lib/restart.js @@ -1,16 +1,36 @@ const t = require('tap') -let runArgs -const npm = { - commands: { - 'run-script': (args, cb) => { - runArgs = args - cb() - }, - }, -} -const Restart = require('../../lib/restart.js') -const restart = new Restart(npm) -restart.exec(['foo'], () => { - t.match(runArgs, ['restart', 'foo']) - t.end() +const spawk = require('spawk') +const { real: mockNpm } = require('../fixtures/mock-npm') + +spawk.preventUnmatched() +t.teardown(() => { + spawk.unload() +}) + +// TODO this ... smells. npm "script-shell" config mentions defaults but those +// are handled by run-script, not npm. So for now we have to tie tests to some +// pretty specific internals of runScript +const makeSpawnArgs = require('@npmcli/run-script/lib/make-spawn-args.js') + +t.test('should run stop script from package.json', async t => { + const prefix = t.testdir({ + 'package.json': JSON.stringify({ + name: 'x', + version: '1.2.3', + scripts: { + restart: 'node ./test-restart.js', + }, + }), + }) + const { command, npm } = mockNpm(t) + await npm.load() + npm.log.level = 'silent' + npm.localPrefix = prefix + const [scriptShell] = makeSpawnArgs({ path: prefix }) + const script = spawk.spawn(scriptShell, (args) => { + t.ok(args.includes('node ./test-restart.js "foo"'), 'ran stop script with extra args') + return true + }) + await command('restart', ['foo']) + t.ok(script.called, 'script ran') }) diff --git a/deps/npm/test/lib/root.js b/deps/npm/test/lib/root.js index 5460f3d4985c22..7b91654c6c98fe 100644 --- a/deps/npm/test/lib/root.js +++ b/deps/npm/test/lib/root.js @@ -1,19 +1,13 @@ const t = require('tap') +const { real: mockNpm } = require('../fixtures/mock-npm') -t.test('root', (t) => { - t.plan(3) - const dir = '/root/dir' - - const Root = require('../../lib/root.js') - const root = new Root({ - dir, - output: (output) => { - t.equal(output, dir, 'prints the correct directory') - }, - }) - - root.exec([], (err) => { - t.error(err, 'npm root') - t.ok('should have printed directory') - }) +t.test('prefix', async (t) => { + const { joinedOutput, command, npm } = mockNpm(t) + await npm.load() + await command('root') + t.equal( + joinedOutput(), + npm.dir, + 'outputs npm.dir' + ) }) diff --git a/deps/npm/test/lib/set.js b/deps/npm/test/lib/set.js index f51065a4b293db..14d094001b446a 100644 --- a/deps/npm/test/lib/set.js +++ b/deps/npm/test/lib/set.js @@ -1,5 +1,32 @@ const t = require('tap') +// can't run this until npm set can save to npm.localPrefix +t.skip('npm set', async t => { + const { real: mockNpm } = require('../fixtures/mock-npm') + const { joinedOutput, command, npm } = mockNpm(t) + await npm.load() + + t.test('no args', async t => { + t.rejects( + command('set'), + /Usage:/, + 'prints usage' + ) + }) + + t.test('test-config-item', async t => { + npm.localPrefix = t.testdir({}) + t.not(npm.config.get('test-config-item', 'project'), 'test config value', 'config is not already new value') + // This will write to ~/.npmrc! + // Don't unskip until we can write to project level + await command('set', ['test-config-item=test config value']) + t.equal(joinedOutput(), '', 'outputs nothing') + t.equal(npm.config.get('test-config-item', 'project'), 'test config value', 'config is set to new value') + }) +}) + +// Everything after this can go away once the above test is unskipped + let configArgs = null const npm = { commands: { diff --git a/deps/npm/test/lib/start.js b/deps/npm/test/lib/start.js index 4e77f9691b815b..5c38c71a9a6499 100644 --- a/deps/npm/test/lib/start.js +++ b/deps/npm/test/lib/start.js @@ -1,16 +1,36 @@ const t = require('tap') -let runArgs -const npm = { - commands: { - 'run-script': (args, cb) => { - runArgs = args - cb() - }, - }, -} -const Start = require('../../lib/start.js') -const start = new Start(npm) -start.exec(['foo'], () => { - t.match(runArgs, ['start', 'foo']) - t.end() +const spawk = require('spawk') +const { real: mockNpm } = require('../fixtures/mock-npm') + +spawk.preventUnmatched() +t.teardown(() => { + spawk.unload() +}) + +// TODO this ... smells. npm "script-shell" config mentions defaults but those +// are handled by run-script, not npm. So for now we have to tie tests to some +// pretty specific internals of runScript +const makeSpawnArgs = require('@npmcli/run-script/lib/make-spawn-args.js') + +t.test('should run stop script from package.json', async t => { + const prefix = t.testdir({ + 'package.json': JSON.stringify({ + name: 'x', + version: '1.2.3', + scripts: { + start: 'node ./test-start.js', + }, + }), + }) + const { command, npm } = mockNpm(t) + await npm.load() + npm.log.level = 'silent' + npm.localPrefix = prefix + const [scriptShell] = makeSpawnArgs({ path: prefix }) + const script = spawk.spawn(scriptShell, (args) => { + t.ok(args.includes('node ./test-start.js "foo"'), 'ran start script with extra args') + return true + }) + await command('start', ['foo']) + t.ok(script.called, 'script ran') }) diff --git a/deps/npm/test/lib/stop.js b/deps/npm/test/lib/stop.js index 92ca84bd8741ab..04cdb4e5e7516e 100644 --- a/deps/npm/test/lib/stop.js +++ b/deps/npm/test/lib/stop.js @@ -1,16 +1,36 @@ const t = require('tap') -let runArgs -const npm = { - commands: { - 'run-script': (args, cb) => { - runArgs = args - cb() - }, - }, -} -const Stop = require('../../lib/stop.js') -const stop = new Stop(npm) -stop.exec(['foo'], () => { - t.match(runArgs, ['stop', 'foo']) - t.end() +const spawk = require('spawk') +const { real: mockNpm } = require('../fixtures/mock-npm') + +spawk.preventUnmatched() +t.teardown(() => { + spawk.unload() +}) + +// TODO this ... smells. npm "script-shell" config mentions defaults but those +// are handled by run-script, not npm. So for now we have to tie tests to some +// pretty specific internals of runScript +const makeSpawnArgs = require('@npmcli/run-script/lib/make-spawn-args.js') + +t.test('should run stop script from package.json', async t => { + const prefix = t.testdir({ + 'package.json': JSON.stringify({ + name: 'x', + version: '1.2.3', + scripts: { + stop: 'node ./test-stop.js', + }, + }), + }) + const { command, npm } = mockNpm(t) + await npm.load() + npm.log.level = 'silent' + npm.localPrefix = prefix + const [scriptShell] = makeSpawnArgs({ path: prefix }) + const script = spawk.spawn(scriptShell, (args) => { + t.ok(args.includes('node ./test-stop.js "foo"'), 'ran stop script with extra args') + return true + }) + await command('stop', ['foo']) + t.ok(script.called, 'script ran') }) diff --git a/deps/npm/test/lib/test.js b/deps/npm/test/lib/test.js index c151b1e825343f..d597ba2743837e 100644 --- a/deps/npm/test/lib/test.js +++ b/deps/npm/test/lib/test.js @@ -1,38 +1,36 @@ const t = require('tap') -let RUN_ARGS = null -const npm = { - commands: { - 'run-script': (args, cb) => { - RUN_ARGS = args - cb() - }, - }, -} -const Test = require('../../lib/test.js') -const test = new Test(npm) +const spawk = require('spawk') +const { real: mockNpm } = require('../fixtures/mock-npm') -t.test('run a test', t => { - test.exec([], (er) => { - t.strictSame(RUN_ARGS, ['test'], 'added "test" to the args') - }) - test.exec(['hello', 'world'], (er) => { - t.strictSame(RUN_ARGS, ['test', 'hello', 'world'], 'added positional args') - }) +spawk.preventUnmatched() +t.teardown(() => { + spawk.unload() +}) - const lcErr = Object.assign(new Error('should not see this'), { - code: 'ELIFECYCLE', - }) - const otherErr = new Error('should see this') +// TODO this ... smells. npm "script-shell" config mentions defaults but those +// are handled by run-script, not npm. So for now we have to tie tests to some +// pretty specific internals of runScript +const makeSpawnArgs = require('@npmcli/run-script/lib/make-spawn-args.js') - npm.commands['run-script'] = (args, cb) => cb(lcErr) - test.exec([], (er) => { - t.equal(er, 'Test failed. See above for more details.') +t.test('should run stop script from package.json', async t => { + const prefix = t.testdir({ + 'package.json': JSON.stringify({ + name: 'x', + version: '1.2.3', + scripts: { + test: 'node ./test-test.js', + }, + }), }) - - npm.commands['run-script'] = (args, cb) => cb(otherErr) - test.exec([], (er) => { - t.match(er, { message: 'should see this' }) + const { command, npm } = mockNpm(t) + await npm.load() + npm.log.level = 'silent' + npm.localPrefix = prefix + const [scriptShell] = makeSpawnArgs({ path: prefix }) + const script = spawk.spawn(scriptShell, (args) => { + t.ok(args.includes('node ./test-test.js "foo"'), 'ran test script with extra args') + return true }) - - t.end() + await command('test', ['foo']) + t.ok(script.called, 'script ran') }) diff --git a/deps/npm/test/lib/whoami.js b/deps/npm/test/lib/whoami.js index 9190e3858b137a..c54ee2a5a2be78 100644 --- a/deps/npm/test/lib/whoami.js +++ b/deps/npm/test/lib/whoami.js @@ -1,41 +1,25 @@ const t = require('tap') -const { fake: mockNpm } = require('../fixtures/mock-npm') +const { real: mockNpm } = require('../fixtures/mock-npm') -t.test('whoami', (t) => { - t.plan(3) - const Whoami = t.mock('../../lib/whoami.js', { - '../../lib/utils/get-identity.js': () => Promise.resolve('foo'), - }) - const npm = mockNpm({ - config: { json: false }, - output: (output) => { - t.equal(output, 'foo', 'should output the username') - }, - }) - - const whoami = new Whoami(npm) +const username = 'foo' +const { joinedOutput, command, npm } = mockNpm(t, { + '../../lib/utils/get-identity.js': () => Promise.resolve(username), +}) - whoami.exec([], (err) => { - t.error(err, 'npm whoami') - t.ok('should successfully print username') - }) +t.before(async () => { + await npm.load() }) -t.test('whoami json', (t) => { - t.plan(3) - const Whoami = t.mock('../../lib/whoami.js', { - '../../lib/utils/get-identity.js': () => Promise.resolve('foo'), - }) - const npm = mockNpm({ - config: { json: true }, - output: (output) => { - t.equal(output, '"foo"', 'should output the username') - }, - }) - const whoami = new Whoami(npm) +t.test('npm whoami', async (t) => { + await command('whoami') + t.equal(joinedOutput(), username, 'should print username') +}) - whoami.exec([], (err) => { - t.error(err, 'npm whoami') - t.ok('should successfully print username as json') +t.test('npm whoami --json', async (t) => { + t.teardown(() => { + npm.config.set('json', false) }) + npm.config.set('json', true) + await command('whoami') + t.equal(JSON.parse(joinedOutput()), username, 'should print username') })