diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS
index 2b3e48e76516..3186985b8e3c 100644
--- a/deps/npm/AUTHORS
+++ b/deps/npm/AUTHORS
@@ -772,3 +772,7 @@ Seth Thomas
Andreas
Felipe Santos
Luigi Pinca
+Marco Sirabella
+wangsai
+Luke Hefson
+mrmlnc
diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md
index ce79e9368a6e..bed0f87c2b80 100644
--- a/deps/npm/CHANGELOG.md
+++ b/deps/npm/CHANGELOG.md
@@ -1,3 +1,94 @@
+## v7.12.1 (2021-05-10)
+
+### BUG FIXES
+
+* [`de49f58f5`](https://github.com/npm/cli/commit/de49f58f55dc2ac3a5057cd492a43c32ae41381e)
+ [#3216](https://github.com/npm/cli/issues/3216)
+ fix(contributing): link to proper cli repo
+ ([@mrmlnc](https://github.com/mrmlnc))
+* [`1d092144e`](https://github.com/npm/cli/commit/1d092144eaaabff63ac8424b40b2286822be7677)
+ [#3203](https://github.com/npm/cli/issues/3203)
+ fix(packages): locale-agnostic string sorting
+ ([@isaacs](https://github.com/isaacs))
+* [`0696fca13`](https://github.com/npm/cli/commit/0696fca13d10726e04ca97ff50eef7bd7455a3ab)
+ [#3209](https://github.com/npm/cli/issues/3209)
+ fix(view): fix non-registry specs
+ ([@wraithgar](https://github.com/wraithgar))
+* [`71ac93597`](https://github.com/npm/cli/commit/71ac935976390e4fd05987ff510049f82bc6e2a9)
+ [#3206](https://github.com/npm/cli/issues/3206)
+ chore(github): Convert md issue template to yaml
+ ([@lukehefson](https://github.com/lukehefson))
+* [`6fb386d3b`](https://github.com/npm/cli/commit/6fb386d3bfbaa8e4771ff87a08de1f3aa6f9b34d)
+ [#3201](https://github.com/npm/cli/issues/3201)
+ fix(tests): increase test fuzziness
+ ([@wraithgar](https://github.com/wraithgar))
+* [`f3a662fcd`](https://github.com/npm/cli/commit/f3a662fcd869653f9753aef3d40cc96ed28ed509)
+ [#3211](https://github.com/npm/cli/issues/3211)
+ fix(tests): use config defaults
+ ([@wraithgar](https://github.com/wraithgar))
+
+### DEPENDENCIES
+
+* [`285976fd1`](https://github.com/npm/cli/commit/285976fd12f037f59da47307d98df7ebda5278d9)
+ `@npmcli/arborist@2.4.4`
+ * fix(reify): properly save spec if prerelease
+* [`f9f24d17c`](https://github.com/npm/cli/commit/f9f24d17c29c421de3c9b82c6b98a40268aeb920)
+ `libnpmexec@1.1.1`
+ * fix(add): Specify 'en' locale to String.localeCompare
+* [`cb9f17499`](https://github.com/npm/cli/commit/cb9f174996dbb4779a1be82890564f9abffb11f4)
+ `glob@7.1.7`
+ * force 'en' locale in string sorting
+* [`24b4e4a41`](https://github.com/npm/cli/commit/24b4e4a41b451db3de381fac6b719149db14c288)
+ `ignore-walk@3.0.4`
+ * Avoid locale-specific sorting issues
+* [`1eb7e5c7d`](https://github.com/npm/cli/commit/1eb7e5c7d466293b472c2506c64e5a89ec84ac2f)
+ `@npmcli/arborist@2.4.3`
+ * guard against locale-specific sorting
+* [`a6a826067`](https://github.com/npm/cli/commit/a6a826067cb46c711521772c2d0158257d54400a)
+ `npm-packlist@2.2.2`:
+ * fix(sort): avoid locale-dependent sorting issues
+
+## v7.12.0 (2021-05-06)
+
+### FEATURES
+
+* [`701627c51`](https://github.com/npm/cli/commit/701627c5169934e59da2959d76a49c77278cc9dc)
+ [#3098](https://github.com/npm/cli/issues/3098)
+ feat(cache): Allow `add` to accept multiple specs
+ ([@mjsir911](https://github.com/mjsir911))
+* [`59171f030`](https://github.com/npm/cli/commit/59171f0304f048a009f1697eec6f74f778bc52ff)
+ [#3187](https://github.com/npm/cli/issues/3187)
+ feat(config): add workspaces boolean to user-agent
+ ([@nlf](https://github.com/nlf))
+
+### BUG FIXES
+
+* [`2c9b8713c`](https://github.com/npm/cli/commit/2c9b8713c4c88fbd0c3c48eb0de84dbd7269398f)
+ [#3182](https://github.com/npm/cli/issues/3182)
+ fix(docs): fix broken links
+ ([@wangsai](https://github.com/wangsai))
+* [`88cbc8c44`](https://github.com/npm/cli/commit/88cbc8c447cbaef20b5a8f19246211ce4918f4d8)
+ [#3198](https://github.com/npm/cli/issues/3198)
+ fix(tests): reflect new libnpmexec logic
+
+### DEPENDENCIES
+
+* [`d01ce5e13`](https://github.com/npm/cli/commit/d01ce5e132cb4661698012fd5017753c2bdb660b)
+ `libnpmexec@1.1.0`:
+ * feat: add walk up dir lookup to satisfy local bins
+* [`81c1dfaaa`](https://github.com/npm/cli/commit/81c1dfaaaf918229316a975aa8075769ffafdb6d)
+ `@npmcli/arborist@2.4.2`:
+ * fix(add): save packages in the right place
+ * fix(reify): do not clean up nodes with no parent
+ * fix(audit): support alias specs & root package names
+* [`87c2303ea`](https://github.com/npm/cli/commit/87c2303eaa6edfa5309da0a30f5ad291b6d57640)
+ `@npmcli/git@2.0.9`:
+ * fix(clone): Do not allow git replacement objects by default
+* [`99ff40dff`](https://github.com/npm/cli/commit/99ff40dff5e5e55a5d5f045ba90e76c08174ca38)
+ `npm-packlist@2.2.0`:
+ * feat(npmignore): Do not force include history, changelogs, notice
+ * fix(package.json): add missing bin/index.js to files
+
## v7.11.2 (2021-04-29)
### BUG FIXES
@@ -76,8 +167,8 @@
[#3126](https://github.com/npm/cli/issues/3126)
fix(logout): use isBasicAuth attribute
([@wraithgar](https://github.com/wraithgar))
-### DOCUMENTATION
+### DOCUMENTATION
* [`c93f1c39e`](https://github.com/npm/cli/commit/c93f1c39e326feff0857712a10ef6183fbafe1ab)
[#3101](https://github.com/npm/cli/issues/3101)
@@ -89,7 +180,6 @@
fix(usage): fix refs to ws shorthand
([@ruyadorno](https://github.com/ruyadorno))
-
### DEPENDENCIES
* [`83166ebcc`](https://github.com/npm/cli/commit/83166ebcc4ba5e3bf215f08151437d96637f4f33)
diff --git a/deps/npm/CONTRIBUTING.md b/deps/npm/CONTRIBUTING.md
index 6821da895b3b..558ce2a839b2 100644
--- a/deps/npm/CONTRIBUTING.md
+++ b/deps/npm/CONTRIBUTING.md
@@ -9,7 +9,7 @@ All interactions in the **npm** organization on GitHub are considered to be cove
**1. Clone this repository...**
```bash
-$ git clone git@github.com:npm/cli.git
+$ git clone git@github.com:npm/cli.git npm
```
**2. Navigate into project & install development-specific dependencies...**
diff --git a/deps/npm/docs/content/commands/npm-cache.md b/deps/npm/docs/content/commands/npm-cache.md
index bcc2989b7d3c..0bbb2756a40f 100644
--- a/deps/npm/docs/content/commands/npm-cache.md
+++ b/deps/npm/docs/content/commands/npm-cache.md
@@ -7,10 +7,10 @@ description: Manipulates packages cache
### Synopsis
```bash
-npm cache add
-npm cache add
-npm cache add
-npm cache add @
+npm cache add ...
+npm cache add ...
+npm cache add ...
+npm cache add @...
npm cache clean
aliases: npm cache clear, npm cache rm
@@ -25,7 +25,7 @@ Note: This command is unaware of workspaces.
Used to add, list, or clean the npm cache folder.
* add:
- Add the specified package to the local cache. This command is primarily
+ Add the specified packages to the local cache. This command is primarily
intended to be used internally by npm, but it can provide a way to
add data to the local installation cache explicitly.
diff --git a/deps/npm/docs/content/commands/npm-ci.md b/deps/npm/docs/content/commands/npm-ci.md
index 925ba8de2e5b..937553631ace 100644
--- a/deps/npm/docs/content/commands/npm-ci.md
+++ b/deps/npm/docs/content/commands/npm-ci.md
@@ -12,7 +12,7 @@ npm ci
### Description
-This command is similar to [`npm install`](/cli-commands/install), except
+This command is similar to [`npm install`](/commands/npm-install), except
it's meant to be used in automated environments such as test platforms,
continuous integration, and deployment -- or any situation where you want
to make sure you're doing a clean install of your dependencies.
diff --git a/deps/npm/docs/content/commands/npm-dedupe.md b/deps/npm/docs/content/commands/npm-dedupe.md
index c6d26126d307..f9bfd9e01532 100644
--- a/deps/npm/docs/content/commands/npm-dedupe.md
+++ b/deps/npm/docs/content/commands/npm-dedupe.md
@@ -74,7 +74,7 @@ Using `npm find-dupes` will run the command in `--dry-run` mode.
### See Also
-* [npm find-dupes](/cli-commands/find-dupes)
-* [npm ls](/cli-commands/ls)
-* [npm update](/cli-commands/update)
-* [npm install](/cli-commands/install)
+* [npm find-dupes](/commands/npm-find-dupes)
+* [npm ls](/commands/npm-ls)
+* [npm update](/commands/npm-update)
+* [npm install](/commands/npm-install)
diff --git a/deps/npm/docs/content/commands/npm-deprecate.md b/deps/npm/docs/content/commands/npm-deprecate.md
index 060379766105..73d88b3717bd 100644
--- a/deps/npm/docs/content/commands/npm-deprecate.md
+++ b/deps/npm/docs/content/commands/npm-deprecate.md
@@ -44,5 +44,5 @@ format an empty string.
* [npm publish](/commands/npm-publish)
* [npm registry](/using-npm/registry)
-* [npm owner](/cli-commands/owner)
-* [npm owner](/cli-commands/adduser)
+* [npm owner](/commands/npm-owner)
+* [npm owner](/commands/npm-adduser)
diff --git a/deps/npm/docs/content/commands/npm-explore.md b/deps/npm/docs/content/commands/npm-explore.md
index 7e2004b84c04..8bad293052ea 100644
--- a/deps/npm/docs/content/commands/npm-explore.md
+++ b/deps/npm/docs/content/commands/npm-explore.md
@@ -44,5 +44,4 @@ The shell to run for the `npm explore` command.
* [npm folders](/configuring-npm/folders)
* [npm edit](/commands/npm-edit)
* [npm rebuild](/commands/npm-rebuild)
-* [npm build](/commands/npm-build)
* [npm install](/commands/npm-install)
diff --git a/deps/npm/docs/content/commands/npm-find-dupes.md b/deps/npm/docs/content/commands/npm-find-dupes.md
index 6f55d47bfd7f..6557a071c82c 100644
--- a/deps/npm/docs/content/commands/npm-find-dupes.md
+++ b/deps/npm/docs/content/commands/npm-find-dupes.md
@@ -17,8 +17,8 @@ duplications, without actually changing the package tree.
### See Also
-* [npm dedupe](/cli-commands/dedupe)
-* [npm ls](/cli-commands/ls)
-* [npm update](/cli-commands/update)
-* [npm install](/cli-commands/install)
+* [npm dedupe](/commands/npm-dedupe)
+* [npm ls](/commands/npm-ls)
+* [npm update](/commands/npm-update)
+* [npm install](/commands/npm-install)
diff --git a/deps/npm/docs/content/commands/npm-install.md b/deps/npm/docs/content/commands/npm-install.md
index 5ab9275ee4ea..f81a8a246398 100644
--- a/deps/npm/docs/content/commands/npm-install.md
+++ b/deps/npm/docs/content/commands/npm-install.md
@@ -538,7 +538,6 @@ the specific folder structures that npm creates.
* [npm link](/commands/npm-link)
* [npm rebuild](/commands/npm-rebuild)
* [npm scripts](/using-npm/scripts)
-* [npm build](/commands/npm-build)
* [npm config](/commands/npm-config)
* [npmrc](/configuring-npm/npmrc)
* [npm registry](/using-npm/registry)
diff --git a/deps/npm/docs/content/commands/npm-unpublish.md b/deps/npm/docs/content/commands/npm-unpublish.md
index e9d6e9045c6f..2ce52d3f8cd4 100644
--- a/deps/npm/docs/content/commands/npm-unpublish.md
+++ b/deps/npm/docs/content/commands/npm-unpublish.md
@@ -34,7 +34,7 @@ This removes a package version from the registry, deleting its entry and
removing the tarball.
The npm registry will return an error if you are not [logged
-in](/commands/npm-login).
+in](/commands/npm-adduser).
If you do not specify a version or if you remove all of a package's
versions then the registry will remove the root package entry entirely.
@@ -52,4 +52,4 @@ passed.
* [npm registry](/using-npm/registry)
* [npm adduser](/commands/npm-adduser)
* [npm owner](/commands/npm-owner)
-* [npm login](/commands/npm-login)
+* [npm login](/commands/npm-adduser)
diff --git a/deps/npm/docs/content/commands/npm-view.md b/deps/npm/docs/content/commands/npm-view.md
index 8f7e886ed192..982ba2995517 100644
--- a/deps/npm/docs/content/commands/npm-view.md
+++ b/deps/npm/docs/content/commands/npm-view.md
@@ -73,7 +73,7 @@ npm view express contributors.name contributors.email
"Person" fields are shown as a string if they would be shown as an
object. So, for example, this will show the list of `npm` contributors in
-the shortened string format. (See [`package.json`](/configuring-npm/package.json) for more on this.)
+the shortened string format. (See [`package.json`](/configuring-npm/package-json) for more on this.)
```bash
npm view npm contributors
diff --git a/deps/npm/docs/content/commands/npm.md b/deps/npm/docs/content/commands/npm.md
index d01146d37041..2d86aa62c008 100644
--- a/deps/npm/docs/content/commands/npm.md
+++ b/deps/npm/docs/content/commands/npm.md
@@ -107,7 +107,7 @@ following help topics:
Create an account or log in. When you do this, npm will store
credentials in the user config file config file.
* publish:
- Use the [`npm publish`](/commands/npm-publish`) command to upload your
+ Use the [`npm publish`](/commands/npm-publish) command to upload your
code to the registry.
#### Configuration
diff --git a/deps/npm/docs/content/configuring-npm/folders.md b/deps/npm/docs/content/configuring-npm/folders.md
index 3ec716f2c67f..75e31cd73316 100644
--- a/deps/npm/docs/content/configuring-npm/folders.md
+++ b/deps/npm/docs/content/configuring-npm/folders.md
@@ -205,7 +205,7 @@ not be included in the package tarball.
This allows a package maintainer to install all of their dependencies
(and dev dependencies) locally, but only re-publish those items that
-cannot be found elsewhere. See [`package.json`](/configuring-npm/package.json) for more information.
+cannot be found elsewhere. See [`package.json`](/configuring-npm/package-json) for more information.
### See also
diff --git a/deps/npm/docs/content/configuring-npm/package-json.md b/deps/npm/docs/content/configuring-npm/package-json.md
index f5519f62bb32..3ed039902144 100644
--- a/deps/npm/docs/content/configuring-npm/package-json.md
+++ b/deps/npm/docs/content/configuring-npm/package-json.md
@@ -566,7 +566,7 @@ tarball or git URL.
**Please do not put test harnesses or transpilers or other "development"
time tools in your `dependencies` object.** See `devDependencies`, below.
-See [semver](/using-npm/semver#versions) for more details about specifying version ranges.
+See [semver](https://github.com/npm/node-semver#versions) for more details about specifying version ranges.
* `version` Must match `version` exactly
* `>version` Must be greater than `version`
diff --git a/deps/npm/docs/content/using-npm/config.md b/deps/npm/docs/content/using-npm/config.md
index 76ac4192f135..d8fb70fb74be 100644
--- a/deps/npm/docs/content/using-npm/config.md
+++ b/deps/npm/docs/content/using-npm/config.md
@@ -1253,7 +1253,8 @@ Show short usage output about the command specified.
#### `user-agent`
-* Default: "npm/{npm-version} node/{node-version} {platform} {arch} {ci}"
+* Default: "npm/{npm-version} node/{node-version} {platform} {arch}
+ workspaces/{workspaces} {ci}"
* Type: String
Sets the User-Agent request header. The following fields are replaced with
@@ -1263,6 +1264,8 @@ their actual counterparts:
* `{node-version}` - The Node.js version in use
* `{platform}` - The value of `process.platform`
* `{arch}` - The value of `process.arch`
+* `{workspaces}` - Set to `true` if the `workspaces` or `workspace` options
+ are set.
* `{ci}` - The value of the `ci-name` config, if set, prefixed with `ci/`, or
an empty string if `ci-name` is empty.
diff --git a/deps/npm/docs/content/using-npm/scripts.md b/deps/npm/docs/content/using-npm/scripts.md
index 9312a21546d6..82cde7d79094 100644
--- a/deps/npm/docs/content/using-npm/scripts.md
+++ b/deps/npm/docs/content/using-npm/scripts.md
@@ -118,11 +118,6 @@ The advantage of doing these things at `prepublish` time is that they can be don
* `prepare`
-#### [`npm env`](/commands/npm-env)
-
-* `env` (You can override the default behavior of `npm env` by defining
- a custom `env` entry in your `scripts` object)
-
#### [`npm install`](/commands/npm-install)
These also run when you run `npm install -g `
@@ -179,7 +174,7 @@ If there is a `restart` script defined, these events are run, otherwise
* `restart`
* `postrestart`
-#### [`npm run `](/commands/npm-run)
+#### [`npm run `](/commands/npm-run-script)
* `pre`
* ``
diff --git a/deps/npm/docs/output/commands/npm-cache.html b/deps/npm/docs/output/commands/npm-cache.html
index 22ca6f1999ba..cb886d3c7be3 100644
--- a/deps/npm/docs/output/commands/npm-cache.html
+++ b/deps/npm/docs/output/commands/npm-cache.html
@@ -145,10 +145,10 @@ Table of contents
Synopsis
-
npm cache add <tarball file>
-npm cache add <folder>
-npm cache add <tarball url>
-npm cache add <name>@<version>
+npm cache add <tarball file>...
+npm cache add <folder>...
+npm cache add <tarball url>...
+npm cache add <name>@<version>...
npm cache clean
aliases: npm cache clear, npm cache rm
@@ -161,7 +161,7 @@ Description
npm ci
Description
-This command is similar to npm install, except
+
This command is similar to npm install, except
it’s meant to be used in automated environments such as test platforms,
continuous integration, and deployment – or any situation where you want
to make sure you’re doing a clean install of your dependencies.
diff --git a/deps/npm/docs/output/commands/npm-dedupe.html b/deps/npm/docs/output/commands/npm-dedupe.html
index ccd9a03f4d82..795659a6103b 100644
--- a/deps/npm/docs/output/commands/npm-dedupe.html
+++ b/deps/npm/docs/output/commands/npm-dedupe.html
@@ -193,10 +193,10 @@ Description
Using npm find-dupes will run the command in --dry-run mode.
See Also
diff --git a/deps/npm/docs/output/commands/npm-deprecate.html b/deps/npm/docs/output/commands/npm-deprecate.html
index 88299a80bcfd..7f4409cd3ace 100644
--- a/deps/npm/docs/output/commands/npm-deprecate.html
+++ b/deps/npm/docs/output/commands/npm-deprecate.html
@@ -169,8 +169,8 @@ See Also
diff --git a/deps/npm/docs/output/commands/npm-explore.html b/deps/npm/docs/output/commands/npm-explore.html
index cd52ff96a684..8d1e2843d73e 100644
--- a/deps/npm/docs/output/commands/npm-explore.html
+++ b/deps/npm/docs/output/commands/npm-explore.html
@@ -171,7 +171,6 @@ See Also
npm folders
npm edit
npm rebuild
-npm build
npm install
diff --git a/deps/npm/docs/output/commands/npm-find-dupes.html b/deps/npm/docs/output/commands/npm-find-dupes.html
index 32d8993b99cc..7f7f3c101b25 100644
--- a/deps/npm/docs/output/commands/npm-find-dupes.html
+++ b/deps/npm/docs/output/commands/npm-find-dupes.html
@@ -152,10 +152,10 @@ Description
duplications, without actually changing the package tree.
See Also
diff --git a/deps/npm/docs/output/commands/npm-install.html b/deps/npm/docs/output/commands/npm-install.html
index 2794b9a983d0..8fff20fe836f 100644
--- a/deps/npm/docs/output/commands/npm-install.html
+++ b/deps/npm/docs/output/commands/npm-install.html
@@ -614,7 +614,6 @@ See Also
npm link
npm rebuild
npm scripts
-npm build
npm config
npmrc
npm registry
diff --git a/deps/npm/docs/output/commands/npm-ls.html b/deps/npm/docs/output/commands/npm-ls.html
index ede5cb042907..3d60f2baecd2 100644
--- a/deps/npm/docs/output/commands/npm-ls.html
+++ b/deps/npm/docs/output/commands/npm-ls.html
@@ -159,7 +159,7 @@ Description
the results to only the paths to the packages named. Note that nested
packages will also show the paths to the specified packages. For
example, running npm ls promzard in npm’s source tree will show:
-npm@7.11.2 /path/to/npm
+npm@7.12.1 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
diff --git a/deps/npm/docs/output/commands/npm-unpublish.html b/deps/npm/docs/output/commands/npm-unpublish.html
index 75751d3408cf..737d5336c83b 100644
--- a/deps/npm/docs/output/commands/npm-unpublish.html
+++ b/deps/npm/docs/output/commands/npm-unpublish.html
@@ -159,7 +159,7 @@ Warning
Description
This removes a package version from the registry, deleting its entry and
removing the tarball.
-The npm registry will return an error if you are not logged
+The npm registry will return an error if you are not logged
in.
If you do not specify a version or if you remove all of a package’s
versions then the registry will remove the root package entry entirely.
@@ -175,7 +175,7 @@ See Also
npm registry
npm adduser
npm owner
-npm login
+npm login
diff --git a/deps/npm/docs/output/commands/npm-view.html b/deps/npm/docs/output/commands/npm-view.html
index 7489b17b1cd0..77786b74fd8c 100644
--- a/deps/npm/docs/output/commands/npm-view.html
+++ b/deps/npm/docs/output/commands/npm-view.html
@@ -186,7 +186,7 @@ Description
“Person” fields are shown as a string if they would be shown as an
object. So, for example, this will show the list of npm contributors in
-the shortened string format. (See package.json for more on this.)
+the shortened string format. (See package.json for more on this.)
npm view npm contributors
If a version range is provided, then data will be printed for every
diff --git a/deps/npm/docs/output/commands/npm.html b/deps/npm/docs/output/commands/npm.html
index 311c581f681d..445abd0d5ce3 100644
--- a/deps/npm/docs/output/commands/npm.html
+++ b/deps/npm/docs/output/commands/npm.html
@@ -148,7 +148,7 @@
Table of contents
npm <command> [args]
Version
-7.11.2
+7.12.1
Description
npm is the package manager for the Node JavaScript platform. It puts
modules in place so that node can find them, and manages dependency
@@ -222,7 +222,7 @@
Developer Usage
Create an account or log in. When you do this, npm will store
credentials in the user config file config file.
publish:
-Use the npm publish command to upload your
+Use the npm publish command to upload your
code to the registry.
Configuration
diff --git a/deps/npm/docs/output/configuring-npm/folders.html b/deps/npm/docs/output/configuring-npm/folders.html
index 20027ea3a9f4..6cdae3cd1eca 100644
--- a/deps/npm/docs/output/configuring-npm/folders.html
+++ b/deps/npm/docs/output/configuring-npm/folders.html
@@ -292,7 +292,7 @@ Publishing
not be included in the package tarball.
This allows a package maintainer to install all of their dependencies
(and dev dependencies) locally, but only re-publish those items that
-cannot be found elsewhere. See package.json for more information.
+cannot be found elsewhere. See package.json for more information.
See also
- package.json
diff --git a/deps/npm/docs/output/configuring-npm/package-json.html b/deps/npm/docs/output/configuring-npm/package-json.html
index 84956dede7d2..f9c3ee6e4f5b 100644
--- a/deps/npm/docs/output/configuring-npm/package-json.html
+++ b/deps/npm/docs/output/configuring-npm/package-json.html
@@ -567,7 +567,7 @@ dependencies
tarball or git URL.
Please do not put test harnesses or transpilers or other “development”
time tools in your dependencies object. See devDependencies, below.
-See semver for more details about specifying version ranges.
+See semver for more details about specifying version ranges.
version Must match version exactly
>version Must be greater than version
diff --git a/deps/npm/docs/output/using-npm/config.html b/deps/npm/docs/output/using-npm/config.html
index 4435ce53bbaa..881080eb121c 100644
--- a/deps/npm/docs/output/using-npm/config.html
+++ b/deps/npm/docs/output/using-npm/config.html
@@ -1193,7 +1193,8 @@ usage
Show short usage output about the command specified.
user-agent
-- Default: “npm/{npm-version} node/{node-version} {platform} {arch} {ci}”
+- Default: “npm/{npm-version} node/{node-version} {platform} {arch}
+workspaces/{workspaces} {ci}”
- Type: String
Sets the User-Agent request header. The following fields are replaced with
@@ -1203,6 +1204,8 @@
user-agent
{node-version} - The Node.js version in use
{platform} - The value of process.platform
{arch} - The value of process.arch
+{workspaces} - Set to true if the workspaces or workspace options
+are set.
{ci} - The value of the ci-name config, if set, prefixed with ci/, or
an empty string if ci-name is empty.
diff --git a/deps/npm/docs/output/using-npm/scripts.html b/deps/npm/docs/output/using-npm/scripts.html
index e231cfec2ab8..dde9b1b75d71 100644
--- a/deps/npm/docs/output/using-npm/scripts.html
+++ b/deps/npm/docs/output/using-npm/scripts.html
@@ -141,7 +141,7 @@ scripts
Description
@@ -260,11 +260,6 @@
npm diff<
-
-
-env (You can override the default behavior of npm env by defining
-a custom env entry in your scripts object)
-
These also run when you run npm install -g <pkg-name>
-
+
pre<user-defined>
<user-defined>
diff --git a/deps/npm/lib/cache.js b/deps/npm/lib/cache.js
index 43902f43bbee..5d544b2dbd18 100644
--- a/deps/npm/lib/cache.js
+++ b/deps/npm/lib/cache.js
@@ -86,32 +86,30 @@ with --force.`)
return rimraf(cachePath)
}
- // npm cache add
- // npm cache add
- // npm cache add
- // npm cache add
+ // npm cache add ...
+ // npm cache add ...
+ // npm cache add ...
+ // npm cache add ...
async add (args) {
const usage = 'Usage:\n' +
- ' npm cache add \n' +
- ' npm cache add @\n' +
- ' npm cache add \n' +
- ' npm cache add \n'
+ ' npm cache add ...\n' +
+ ' npm cache add @...\n' +
+ ' npm cache add ...\n' +
+ ' npm cache add ...\n'
log.silly('cache add', 'args', args)
- const spec = args[0] && args[0] +
- (args[1] === undefined || args[1] === null ? '' : `@${args[1]}`)
-
- if (!spec)
+ if (args.length === 0)
throw Object.assign(new Error(usage), { code: 'EUSAGE' })
- log.silly('cache add', 'spec', spec)
-
- // we ask pacote for the thing, and then just throw the data
- // away so that it tee-pipes it into the cache like it does
- // for a normal request.
- await pacote.tarball.stream(spec, stream => {
- stream.resume()
- return stream.promise()
- }, this.npm.flatOptions)
+ return Promise.all(args.map(spec => {
+ log.silly('cache add', 'spec', spec)
+ // we ask pacote for the thing, and then just throw the data
+ // away so that it tee-pipes it into the cache like it does
+ // for a normal request.
+ return pacote.tarball.stream(spec, stream => {
+ stream.resume()
+ return stream.promise()
+ }, this.npm.flatOptions)
+ }))
}
async verify () {
diff --git a/deps/npm/lib/config.js b/deps/npm/lib/config.js
index f53d7e5ae271..4b3ac5873650 100644
--- a/deps/npm/lib/config.js
+++ b/deps/npm/lib/config.js
@@ -199,7 +199,7 @@ class Config extends BaseCommand {
; Configs like \`///:_authToken\` are auth that is restricted
; to the registry host specified.
-${data.split('\n').sort((a, b) => a.localeCompare(b)).join('\n').trim()}
+${data.split('\n').sort((a, b) => a.localeCompare(b, 'en')).join('\n').trim()}
;;;;
; all available options shown below with default values
@@ -227,7 +227,7 @@ ${defData}
if (where === 'default' && !long)
continue
- const keys = Object.keys(data).sort((a, b) => a.localeCompare(b))
+ const keys = Object.keys(data).sort((a, b) => a.localeCompare(b, 'en'))
if (!keys.length)
continue
diff --git a/deps/npm/lib/help.js b/deps/npm/lib/help.js
index 589819eb02a4..e9aade5215a8 100644
--- a/deps/npm/lib/help.js
+++ b/deps/npm/lib/help.js
@@ -77,7 +77,7 @@ class Help extends BaseCommand {
if (aManNumber !== bManNumber)
return aManNumber - bManNumber
- return a.localeCompare(b)
+ return a.localeCompare(b, 'en')
})
const man = mans[0]
diff --git a/deps/npm/lib/ls.js b/deps/npm/lib/ls.js
index ccd8b2ff9dea..9fa5fddd53f8 100644
--- a/deps/npm/lib/ls.js
+++ b/deps/npm/lib/ls.js
@@ -443,7 +443,7 @@ const augmentNodesWithMetadata = ({
}
const sortAlphabetically = (a, b) =>
- a.pkgid.localeCompare(b.pkgid)
+ a.pkgid.localeCompare(b.pkgid, 'en')
const humanOutput = ({ color, result, seenItems, unicode }) => {
// we need to traverse the entire tree in order to determine which items
diff --git a/deps/npm/lib/outdated.js b/deps/npm/lib/outdated.js
index 9b656d2aeede..a436059e9e2d 100644
--- a/deps/npm/lib/outdated.js
+++ b/deps/npm/lib/outdated.js
@@ -68,7 +68,7 @@ class Outdated extends BaseCommand {
}))
// sorts list alphabetically
- const outdated = this.list.sort((a, b) => a.name.localeCompare(b.name))
+ const outdated = this.list.sort((a, b) => a.name.localeCompare(b.name, 'en'))
// return if no outdated packages
if (outdated.length === 0 && !this.npm.config.get('json'))
@@ -149,7 +149,7 @@ class Outdated extends BaseCommand {
: edge.dev ? 'devDependencies'
: 'dependencies'
- for (const omitType of this.npm.config.get('omit') || []) {
+ for (const omitType of this.npm.config.get('omit')) {
if (node[omitType])
return
}
diff --git a/deps/npm/lib/utils/completion/installed-deep.js b/deps/npm/lib/utils/completion/installed-deep.js
index b65c17e41d74..2430688612cd 100644
--- a/deps/npm/lib/utils/completion/installed-deep.js
+++ b/deps/npm/lib/utils/completion/installed-deep.js
@@ -16,7 +16,7 @@ const installedDeep = async (npm) => {
})
.filter(i => (i.depth - 1) <= depth)
.sort((a, b) => a.depth - b.depth)
- .sort((a, b) => a.depth === b.depth ? a.name.localeCompare(b.name) : 0)
+ .sort((a, b) => a.depth === b.depth ? a.name.localeCompare(b.name, 'en') : 0)
const res = new Set()
const gArb = new Arborist({ global: true, path: resolve(npm.globalDir, '..') })
diff --git a/deps/npm/lib/utils/config/definitions.js b/deps/npm/lib/utils/config/definitions.js
index 3a50175d5db6..aa90de8e760b 100644
--- a/deps/npm/lib/utils/config/definitions.js
+++ b/deps/npm/lib/utils/config/definitions.js
@@ -1943,6 +1943,7 @@ define('user-agent', {
'node/{node-version} ' +
'{platform} ' +
'{arch} ' +
+ 'workspaces/{workspaces} ' +
'{ci}',
type: String,
description: `
@@ -1953,17 +1954,23 @@ define('user-agent', {
* \`{node-version}\` - The Node.js version in use
* \`{platform}\` - The value of \`process.platform\`
* \`{arch}\` - The value of \`process.arch\`
+ * \`{workspaces}\` - Set to \`true\` if the \`workspaces\` or \`workspace\`
+ options are set.
* \`{ci}\` - The value of the \`ci-name\` config, if set, prefixed with
\`ci/\`, or an empty string if \`ci-name\` is empty.
`,
flatten (key, obj, flatOptions) {
const value = obj[key]
const ciName = obj['ci-name']
+ let inWorkspaces = false
+ if (obj.workspaces || obj.workspace && obj.workspace.length)
+ inWorkspaces = true
flatOptions.userAgent =
value.replace(/\{node-version\}/gi, obj['node-version'])
.replace(/\{npm-version\}/gi, obj['npm-version'])
.replace(/\{platform\}/gi, process.platform)
.replace(/\{arch\}/gi, process.arch)
+ .replace(/\{workspaces\}/gi, inWorkspaces)
.replace(/\{ci\}/gi, ciName ? `ci/${ciName}` : '')
.trim()
// user-agent is a unique kind of config item that gets set from a template
diff --git a/deps/npm/lib/utils/config/describe-all.js b/deps/npm/lib/utils/config/describe-all.js
index ab3f3a63ea75..5fb785f08310 100644
--- a/deps/npm/lib/utils/config/describe-all.js
+++ b/deps/npm/lib/utils/config/describe-all.js
@@ -7,7 +7,7 @@ const describeAll = () => {
const sort = ([keya, {deprecated: depa}], [keyb, {deprecated: depb}]) => {
return depa && !depb ? 1
: !depa && depb ? -1
- : keya.localeCompare(keyb)
+ : keya.localeCompare(keyb, 'en')
}
return Object.entries(definitions).sort(sort)
.map(([key, def]) => def.describe())
diff --git a/deps/npm/lib/utils/npm-usage.js b/deps/npm/lib/utils/npm-usage.js
index bc397cb4d95e..ddb0bab0bc9a 100644
--- a/deps/npm/lib/utils/npm-usage.js
+++ b/deps/npm/lib/utils/npm-usage.js
@@ -62,7 +62,7 @@ const usages = (npm) => {
maxLen = Math.max(maxLen, c.length)
return set
}, [])
- .sort((a, b) => a[0].localeCompare(b[0]))
+ .sort((a, b) => a[0].localeCompare(b[0], 'en'))
.map(([c, usage]) => `\n ${c}${' '.repeat(maxLen - c.length + 1)}${
(usage.split('\n').join('\n' + ' '.repeat(maxLen + 5)))}`)
.join('\n')
diff --git a/deps/npm/lib/utils/tar.js b/deps/npm/lib/utils/tar.js
index 887c40a0f6eb..9e7c3329530e 100644
--- a/deps/npm/lib/utils/tar.js
+++ b/deps/npm/lib/utils/tar.js
@@ -76,7 +76,7 @@ const getContents = async (manifest, tarball) => {
})
const comparator = (a, b) => {
- return a.path.localeCompare(b.path, undefined, {
+ return a.path.localeCompare(b.path, 'en', {
sensitivity: 'case',
numeric: true,
})
@@ -84,7 +84,7 @@ const getContents = async (manifest, tarball) => {
const isUpper = (str) => {
const ch = str.charAt(0)
- return ch >= 'A' && ch <= 'Z'
+ return ch === ch.toUpperCase()
}
const uppers = files.filter(file => isUpper(file.path))
diff --git a/deps/npm/lib/view.js b/deps/npm/lib/view.js
index 91b32e2fd38f..9cc1aed91448 100644
--- a/deps/npm/lib/view.js
+++ b/deps/npm/lib/view.js
@@ -202,7 +202,10 @@ class View extends BaseCommand {
const spec = npa(pkg)
// get the data about this package
- let version = spec.rawSpec || this.npm.config.get('tag')
+ let version = this.npm.config.get('tag')
+ // rawSpec is the git url if this is from git
+ if (spec.type !== 'git' && spec.rawSpec)
+ version = spec.rawSpec
const pckmnt = await packument(spec, opts)
diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1
index f1deed4c428a..8165ccd46d5c 100644
--- a/deps/npm/man/man1/npm-access.1
+++ b/deps/npm/man/man1/npm-access.1
@@ -1,4 +1,4 @@
-.TH "NPM\-ACCESS" "1" "April 2021" "" ""
+.TH "NPM\-ACCESS" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-access\fR \- Set access level on published packages
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1
index aa7d0e5e527a..26f42858694a 100644
--- a/deps/npm/man/man1/npm-adduser.1
+++ b/deps/npm/man/man1/npm-adduser.1
@@ -1,4 +1,4 @@
-.TH "NPM\-ADDUSER" "1" "April 2021" "" ""
+.TH "NPM\-ADDUSER" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-adduser\fR \- Add a registry user account
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-audit.1 b/deps/npm/man/man1/npm-audit.1
index ebbb019ec8a3..cd63c2847309 100644
--- a/deps/npm/man/man1/npm-audit.1
+++ b/deps/npm/man/man1/npm-audit.1
@@ -1,4 +1,4 @@
-.TH "NPM\-AUDIT" "1" "April 2021" "" ""
+.TH "NPM\-AUDIT" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-audit\fR \- Run a security audit
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-bin.1 b/deps/npm/man/man1/npm-bin.1
index d7ddf05cb757..61e2ab1ea91c 100644
--- a/deps/npm/man/man1/npm-bin.1
+++ b/deps/npm/man/man1/npm-bin.1
@@ -1,4 +1,4 @@
-.TH "NPM\-BIN" "1" "April 2021" "" ""
+.TH "NPM\-BIN" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-bin\fR \- Display npm bin folder
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1
index 9d453b825b9f..c4297521de2b 100644
--- a/deps/npm/man/man1/npm-bugs.1
+++ b/deps/npm/man/man1/npm-bugs.1
@@ -1,4 +1,4 @@
-.TH "NPM\-BUGS" "1" "April 2021" "" ""
+.TH "NPM\-BUGS" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-bugs\fR \- Report bugs for a package in a web browser
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1
index 08913baa6325..25b9d0d79118 100644
--- a/deps/npm/man/man1/npm-cache.1
+++ b/deps/npm/man/man1/npm-cache.1
@@ -1,14 +1,14 @@
-.TH "NPM\-CACHE" "1" "April 2021" "" ""
+.TH "NPM\-CACHE" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-cache\fR \- Manipulates packages cache
.SS Synopsis
.P
.RS 2
.nf
-npm cache add
-npm cache add
-npm cache add
-npm cache add @
+npm cache add \.\.\.
+npm cache add \.\.\.
+npm cache add \.\.\.
+npm cache add @\.\.\.
npm cache clean
aliases: npm cache clear, npm cache rm
@@ -24,7 +24,7 @@ Used to add, list, or clean the npm cache folder\.
.RS 0
.IP \(bu 2
add:
-Add the specified package to the local cache\. This command is primarily
+Add the specified packages to the local cache\. This command is primarily
intended to be used internally by npm, but it can provide a way to
add data to the local installation cache explicitly\.
.IP \(bu 2
diff --git a/deps/npm/man/man1/npm-ci.1 b/deps/npm/man/man1/npm-ci.1
index 67f7245d01b9..481d3d23c95b 100644
--- a/deps/npm/man/man1/npm-ci.1
+++ b/deps/npm/man/man1/npm-ci.1
@@ -1,4 +1,4 @@
-.TH "NPM\-CI" "1" "April 2021" "" ""
+.TH "NPM\-CI" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-ci\fR \- Install a project with a clean slate
.SS Synopsis
@@ -10,7 +10,7 @@ npm ci
.RE
.SS Description
.P
-This command is similar to \fBnpm install\fP \fI/cli\-commands/install\fR, except
+This command is similar to npm help \fBinstall\fP, except
it's meant to be used in automated environments such as test platforms,
continuous integration, and deployment \-\- or any situation where you want
to make sure you're doing a clean install of your dependencies\.
diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1
index cb3e2d994356..dffedb6b639e 100644
--- a/deps/npm/man/man1/npm-completion.1
+++ b/deps/npm/man/man1/npm-completion.1
@@ -1,4 +1,4 @@
-.TH "NPM\-COMPLETION" "1" "April 2021" "" ""
+.TH "NPM\-COMPLETION" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-completion\fR \- Tab Completion for npm
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1
index c19d0411cb78..2ab14312a86a 100644
--- a/deps/npm/man/man1/npm-config.1
+++ b/deps/npm/man/man1/npm-config.1
@@ -1,4 +1,4 @@
-.TH "NPM\-CONFIG" "1" "April 2021" "" ""
+.TH "NPM\-CONFIG" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-config\fR \- Manage the npm configuration files
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1
index fd6cce4bc1b2..bd65bd3853c2 100644
--- a/deps/npm/man/man1/npm-dedupe.1
+++ b/deps/npm/man/man1/npm-dedupe.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DEDUPE" "1" "April 2021" "" ""
+.TH "NPM\-DEDUPE" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-dedupe\fR \- Reduce duplication in the package tree
.SS Synopsis
@@ -78,12 +78,12 @@ Using \fBnpm find\-dupes\fP will run the command in \fB\-\-dry\-run\fP mode\.
.SS See Also
.RS 0
.IP \(bu 2
-npm find\-dupes \fI/cli\-commands/find\-dupes\fR
+npm help find\-dupes
.IP \(bu 2
-npm ls \fI/cli\-commands/ls\fR
+npm help ls
.IP \(bu 2
-npm update \fI/cli\-commands/update\fR
+npm help update
.IP \(bu 2
-npm install \fI/cli\-commands/install\fR
+npm help install
.RE
diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1
index 33922d2e834c..c57decbba87b 100644
--- a/deps/npm/man/man1/npm-deprecate.1
+++ b/deps/npm/man/man1/npm-deprecate.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DEPRECATE" "1" "April 2021" "" ""
+.TH "NPM\-DEPRECATE" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-deprecate\fR \- Deprecate a version of a package
.SS Synopsis
@@ -48,8 +48,8 @@ npm help publish
.IP \(bu 2
npm help registry
.IP \(bu 2
-npm owner \fI/cli\-commands/owner\fR
+npm help owner
.IP \(bu 2
-npm owner \fI/cli\-commands/adduser\fR
+npm help owner
.RE
diff --git a/deps/npm/man/man1/npm-diff.1 b/deps/npm/man/man1/npm-diff.1
index 97092215bd89..079c73e46a44 100644
--- a/deps/npm/man/man1/npm-diff.1
+++ b/deps/npm/man/man1/npm-diff.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DIFF" "1" "April 2021" "" ""
+.TH "NPM\-DIFF" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-diff\fR \- The registry diff command
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1
index 6be3351be3cf..95ed35847231 100644
--- a/deps/npm/man/man1/npm-dist-tag.1
+++ b/deps/npm/man/man1/npm-dist-tag.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DIST\-TAG" "1" "April 2021" "" ""
+.TH "NPM\-DIST\-TAG" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-dist-tag\fR \- Modify package distribution tags
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1
index 5da2b661a549..1aec0eb795f4 100644
--- a/deps/npm/man/man1/npm-docs.1
+++ b/deps/npm/man/man1/npm-docs.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DOCS" "1" "April 2021" "" ""
+.TH "NPM\-DOCS" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-docs\fR \- Open documentation for a package in a web browser
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-doctor.1 b/deps/npm/man/man1/npm-doctor.1
index c3b11a902595..df05a562f95e 100644
--- a/deps/npm/man/man1/npm-doctor.1
+++ b/deps/npm/man/man1/npm-doctor.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DOCTOR" "1" "April 2021" "" ""
+.TH "NPM\-DOCTOR" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-doctor\fR \- Check your npm environment
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1
index 445439d1554b..425c769cfed1 100644
--- a/deps/npm/man/man1/npm-edit.1
+++ b/deps/npm/man/man1/npm-edit.1
@@ -1,4 +1,4 @@
-.TH "NPM\-EDIT" "1" "April 2021" "" ""
+.TH "NPM\-EDIT" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-edit\fR \- Edit an installed package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-exec.1 b/deps/npm/man/man1/npm-exec.1
index 1ac663ff18ef..5bb3736ae629 100644
--- a/deps/npm/man/man1/npm-exec.1
+++ b/deps/npm/man/man1/npm-exec.1
@@ -1,4 +1,4 @@
-.TH "NPM\-EXEC" "1" "April 2021" "" ""
+.TH "NPM\-EXEC" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-exec\fR \- Run a command from a local or remote npm package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-explain.1 b/deps/npm/man/man1/npm-explain.1
index efc531478820..87c84f1aaf26 100644
--- a/deps/npm/man/man1/npm-explain.1
+++ b/deps/npm/man/man1/npm-explain.1
@@ -1,4 +1,4 @@
-.TH "NPM\-EXPLAIN" "1" "April 2021" "" ""
+.TH "NPM\-EXPLAIN" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-explain\fR \- Explain installed packages
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1
index 7863f3a07115..205f0518e909 100644
--- a/deps/npm/man/man1/npm-explore.1
+++ b/deps/npm/man/man1/npm-explore.1
@@ -1,4 +1,4 @@
-.TH "NPM\-EXPLORE" "1" "April 2021" "" ""
+.TH "NPM\-EXPLORE" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-explore\fR \- Browse an installed package
.SS Synopsis
@@ -49,8 +49,6 @@ npm help edit
.IP \(bu 2
npm help rebuild
.IP \(bu 2
-npm help build
-.IP \(bu 2
npm help install
.RE
diff --git a/deps/npm/man/man1/npm-find-dupes.1 b/deps/npm/man/man1/npm-find-dupes.1
index 03ff67e95b57..e88c89408b35 100644
--- a/deps/npm/man/man1/npm-find-dupes.1
+++ b/deps/npm/man/man1/npm-find-dupes.1
@@ -1,4 +1,4 @@
-.TH "NPM\-FIND\-DUPES" "1" "April 2021" "" ""
+.TH "NPM\-FIND\-DUPES" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-find-dupes\fR \- Find duplication in the package tree
.SS Synopsis
@@ -15,12 +15,12 @@ duplications, without actually changing the package tree\.
.SS See Also
.RS 0
.IP \(bu 2
-npm dedupe \fI/cli\-commands/dedupe\fR
+npm help dedupe
.IP \(bu 2
-npm ls \fI/cli\-commands/ls\fR
+npm help ls
.IP \(bu 2
-npm update \fI/cli\-commands/update\fR
+npm help update
.IP \(bu 2
-npm install \fI/cli\-commands/install\fR
+npm help install
.RE
diff --git a/deps/npm/man/man1/npm-fund.1 b/deps/npm/man/man1/npm-fund.1
index dc67600e6ac2..81a277bb0087 100644
--- a/deps/npm/man/man1/npm-fund.1
+++ b/deps/npm/man/man1/npm-fund.1
@@ -1,4 +1,4 @@
-.TH "NPM\-FUND" "1" "April 2021" "" ""
+.TH "NPM\-FUND" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-fund\fR \- Retrieve funding information
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1
index a7bc089b1962..2f85992550d9 100644
--- a/deps/npm/man/man1/npm-help-search.1
+++ b/deps/npm/man/man1/npm-help-search.1
@@ -1,4 +1,4 @@
-.TH "NPM\-HELP\-SEARCH" "1" "April 2021" "" ""
+.TH "NPM\-HELP\-SEARCH" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-help-search\fR \- Search npm help documentation
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1
index 8e3282930002..f97f9117b685 100644
--- a/deps/npm/man/man1/npm-help.1
+++ b/deps/npm/man/man1/npm-help.1
@@ -1,4 +1,4 @@
-.TH "NPM\-HELP" "1" "April 2021" "" ""
+.TH "NPM\-HELP" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-help\fR \- Get help on npm
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-hook.1 b/deps/npm/man/man1/npm-hook.1
index 06cb0959fcc9..bb6b553a60c6 100644
--- a/deps/npm/man/man1/npm-hook.1
+++ b/deps/npm/man/man1/npm-hook.1
@@ -1,4 +1,4 @@
-.TH "NPM\-HOOK" "1" "April 2021" "" ""
+.TH "NPM\-HOOK" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-hook\fR \- Manage registry hooks
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1
index b4b09e598d24..9ba1cf0a6457 100644
--- a/deps/npm/man/man1/npm-init.1
+++ b/deps/npm/man/man1/npm-init.1
@@ -1,4 +1,4 @@
-.TH "NPM\-INIT" "1" "April 2021" "" ""
+.TH "NPM\-INIT" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-init\fR \- Create a package\.json file
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-install-ci-test.1 b/deps/npm/man/man1/npm-install-ci-test.1
index 22eb734e21e9..448a8514812d 100644
--- a/deps/npm/man/man1/npm-install-ci-test.1
+++ b/deps/npm/man/man1/npm-install-ci-test.1
@@ -1,4 +1,4 @@
-.TH "NPM\-INSTALL\-CI\-TEST" "1" "April 2021" "" ""
+.TH "NPM\-INSTALL\-CI\-TEST" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-install-ci-test\fR \- Install a project with a clean slate and run tests
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1
index 521d0bc5ebf4..03efe308f2ed 100644
--- a/deps/npm/man/man1/npm-install-test.1
+++ b/deps/npm/man/man1/npm-install-test.1
@@ -1,4 +1,4 @@
-.TH "NPM\-INSTALL\-TEST" "1" "April 2021" "" ""
+.TH "NPM\-INSTALL\-TEST" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-install-test\fR \- Install package(s) and run tests
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1
index 5ac2700d8298..c4567fb29204 100644
--- a/deps/npm/man/man1/npm-install.1
+++ b/deps/npm/man/man1/npm-install.1
@@ -1,4 +1,4 @@
-.TH "NPM\-INSTALL" "1" "April 2021" "" ""
+.TH "NPM\-INSTALL" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-install\fR \- Install a package
.SS Synopsis
@@ -576,8 +576,6 @@ npm help rebuild
.IP \(bu 2
npm help scripts
.IP \(bu 2
-npm help build
-.IP \(bu 2
npm help config
.IP \(bu 2
npm help npmrc
diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1
index 94afe9c3fdf8..404b04a5ce49 100644
--- a/deps/npm/man/man1/npm-link.1
+++ b/deps/npm/man/man1/npm-link.1
@@ -1,4 +1,4 @@
-.TH "NPM\-LINK" "1" "April 2021" "" ""
+.TH "NPM\-LINK" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-link\fR \- Symlink a package folder
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1
index 0f94b4663982..84a6851b284c 100644
--- a/deps/npm/man/man1/npm-logout.1
+++ b/deps/npm/man/man1/npm-logout.1
@@ -1,4 +1,4 @@
-.TH "NPM\-LOGOUT" "1" "April 2021" "" ""
+.TH "NPM\-LOGOUT" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-logout\fR \- Log out of the registry
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1
index 2d4720ad8a4a..c47da9187548 100644
--- a/deps/npm/man/man1/npm-ls.1
+++ b/deps/npm/man/man1/npm-ls.1
@@ -1,4 +1,4 @@
-.TH "NPM\-LS" "1" "April 2021" "" ""
+.TH "NPM\-LS" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-ls\fR \- List installed packages
.SS Synopsis
@@ -26,7 +26,7 @@ example, running \fBnpm ls promzard\fP in npm's source tree will show:
.P
.RS 2
.nf
-npm@7\.11\.2 /path/to/npm
+npm@7\.12\.1 /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 7d85be8760a8..18cb791b0713 100644
--- a/deps/npm/man/man1/npm-org.1
+++ b/deps/npm/man/man1/npm-org.1
@@ -1,4 +1,4 @@
-.TH "NPM\-ORG" "1" "April 2021" "" ""
+.TH "NPM\-ORG" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-org\fR \- Manage orgs
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1
index d90143428f2e..a7309f2dfb99 100644
--- a/deps/npm/man/man1/npm-outdated.1
+++ b/deps/npm/man/man1/npm-outdated.1
@@ -1,4 +1,4 @@
-.TH "NPM\-OUTDATED" "1" "April 2021" "" ""
+.TH "NPM\-OUTDATED" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-outdated\fR \- Check for outdated packages
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1
index 3731b383d761..7140aef06b61 100644
--- a/deps/npm/man/man1/npm-owner.1
+++ b/deps/npm/man/man1/npm-owner.1
@@ -1,4 +1,4 @@
-.TH "NPM\-OWNER" "1" "April 2021" "" ""
+.TH "NPM\-OWNER" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-owner\fR \- Manage package owners
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1
index adedbef0c1f5..ab34dc891d1c 100644
--- a/deps/npm/man/man1/npm-pack.1
+++ b/deps/npm/man/man1/npm-pack.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PACK" "1" "April 2021" "" ""
+.TH "NPM\-PACK" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-pack\fR \- Create a tarball from a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-ping.1 b/deps/npm/man/man1/npm-ping.1
index 9eb5ec12842b..385e4b8a810b 100644
--- a/deps/npm/man/man1/npm-ping.1
+++ b/deps/npm/man/man1/npm-ping.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PING" "1" "April 2021" "" ""
+.TH "NPM\-PING" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-ping\fR \- Ping npm registry
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1
index c4b8a36e954c..82de74199e92 100644
--- a/deps/npm/man/man1/npm-prefix.1
+++ b/deps/npm/man/man1/npm-prefix.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PREFIX" "1" "April 2021" "" ""
+.TH "NPM\-PREFIX" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-prefix\fR \- Display prefix
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-profile.1 b/deps/npm/man/man1/npm-profile.1
index 7b2ff13efae4..d2d412fe8bfa 100644
--- a/deps/npm/man/man1/npm-profile.1
+++ b/deps/npm/man/man1/npm-profile.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PROFILE" "1" "April 2021" "" ""
+.TH "NPM\-PROFILE" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-profile\fR \- Change settings on your registry profile
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1
index df8b82eb7b51..18d5e14dd1a0 100644
--- a/deps/npm/man/man1/npm-prune.1
+++ b/deps/npm/man/man1/npm-prune.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PRUNE" "1" "April 2021" "" ""
+.TH "NPM\-PRUNE" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-prune\fR \- Remove extraneous packages
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1
index ac7a0323a725..c405f64f27e3 100644
--- a/deps/npm/man/man1/npm-publish.1
+++ b/deps/npm/man/man1/npm-publish.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PUBLISH" "1" "April 2021" "" ""
+.TH "NPM\-PUBLISH" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-publish\fR \- Publish a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1
index 995c8ab5ea19..3a78852b5430 100644
--- a/deps/npm/man/man1/npm-rebuild.1
+++ b/deps/npm/man/man1/npm-rebuild.1
@@ -1,4 +1,4 @@
-.TH "NPM\-REBUILD" "1" "April 2021" "" ""
+.TH "NPM\-REBUILD" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-rebuild\fR \- Rebuild a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1
index 30b05534836d..bdb5452181e7 100644
--- a/deps/npm/man/man1/npm-repo.1
+++ b/deps/npm/man/man1/npm-repo.1
@@ -1,4 +1,4 @@
-.TH "NPM\-REPO" "1" "April 2021" "" ""
+.TH "NPM\-REPO" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-repo\fR \- Open package repository page in the browser
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1
index bd212fb466a0..4ecb71f177e3 100644
--- a/deps/npm/man/man1/npm-restart.1
+++ b/deps/npm/man/man1/npm-restart.1
@@ -1,4 +1,4 @@
-.TH "NPM\-RESTART" "1" "April 2021" "" ""
+.TH "NPM\-RESTART" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-restart\fR \- Restart a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1
index ddff01d429e2..e552a650986d 100644
--- a/deps/npm/man/man1/npm-root.1
+++ b/deps/npm/man/man1/npm-root.1
@@ -1,4 +1,4 @@
-.TH "NPM\-ROOT" "1" "April 2021" "" ""
+.TH "NPM\-ROOT" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-root\fR \- Display npm root
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1
index 53b88e6fab99..22222c6541e9 100644
--- a/deps/npm/man/man1/npm-run-script.1
+++ b/deps/npm/man/man1/npm-run-script.1
@@ -1,4 +1,4 @@
-.TH "NPM\-RUN\-SCRIPT" "1" "April 2021" "" ""
+.TH "NPM\-RUN\-SCRIPT" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-run-script\fR \- Run arbitrary package scripts
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1
index 068499dc99c2..5e889b15f624 100644
--- a/deps/npm/man/man1/npm-search.1
+++ b/deps/npm/man/man1/npm-search.1
@@ -1,4 +1,4 @@
-.TH "NPM\-SEARCH" "1" "April 2021" "" ""
+.TH "NPM\-SEARCH" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-search\fR \- Search for packages
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-set-script.1 b/deps/npm/man/man1/npm-set-script.1
index f348099fb48a..e9a380ee460e 100644
--- a/deps/npm/man/man1/npm-set-script.1
+++ b/deps/npm/man/man1/npm-set-script.1
@@ -1,4 +1,4 @@
-.TH "NPM\-SET\-SCRIPT" "1" "April 2021" "" ""
+.TH "NPM\-SET\-SCRIPT" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-set-script\fR \- Set tasks in the scripts section of package\.json
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1
index d349510e5a94..a57ffb18187c 100644
--- a/deps/npm/man/man1/npm-shrinkwrap.1
+++ b/deps/npm/man/man1/npm-shrinkwrap.1
@@ -1,4 +1,4 @@
-.TH "NPM\-SHRINKWRAP" "1" "April 2021" "" ""
+.TH "NPM\-SHRINKWRAP" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-shrinkwrap\fR \- Lock down dependency versions for publication
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1
index e95168e243f9..49f91c6466e8 100644
--- a/deps/npm/man/man1/npm-star.1
+++ b/deps/npm/man/man1/npm-star.1
@@ -1,4 +1,4 @@
-.TH "NPM\-STAR" "1" "April 2021" "" ""
+.TH "NPM\-STAR" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-star\fR \- Mark your favorite packages
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1
index fa16060953c2..397cfea91fe5 100644
--- a/deps/npm/man/man1/npm-stars.1
+++ b/deps/npm/man/man1/npm-stars.1
@@ -1,4 +1,4 @@
-.TH "NPM\-STARS" "1" "April 2021" "" ""
+.TH "NPM\-STARS" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-stars\fR \- View packages marked as favorites
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1
index 42d8b6cc96fe..84bdff0140dd 100644
--- a/deps/npm/man/man1/npm-start.1
+++ b/deps/npm/man/man1/npm-start.1
@@ -1,4 +1,4 @@
-.TH "NPM\-START" "1" "April 2021" "" ""
+.TH "NPM\-START" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-start\fR \- Start a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1
index 55be734ed48d..143aa56462d1 100644
--- a/deps/npm/man/man1/npm-stop.1
+++ b/deps/npm/man/man1/npm-stop.1
@@ -1,4 +1,4 @@
-.TH "NPM\-STOP" "1" "April 2021" "" ""
+.TH "NPM\-STOP" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-stop\fR \- Stop a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-team.1 b/deps/npm/man/man1/npm-team.1
index 94aa9d89ccaf..5816ea1d21bd 100644
--- a/deps/npm/man/man1/npm-team.1
+++ b/deps/npm/man/man1/npm-team.1
@@ -1,4 +1,4 @@
-.TH "NPM\-TEAM" "1" "April 2021" "" ""
+.TH "NPM\-TEAM" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-team\fR \- Manage organization teams and team memberships
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1
index cedbe681982f..4dd4bc2335f7 100644
--- a/deps/npm/man/man1/npm-test.1
+++ b/deps/npm/man/man1/npm-test.1
@@ -1,4 +1,4 @@
-.TH "NPM\-TEST" "1" "April 2021" "" ""
+.TH "NPM\-TEST" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-test\fR \- Test a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-token.1 b/deps/npm/man/man1/npm-token.1
index 5adf0cda6d82..2b45db5fc4e0 100644
--- a/deps/npm/man/man1/npm-token.1
+++ b/deps/npm/man/man1/npm-token.1
@@ -1,4 +1,4 @@
-.TH "NPM\-TOKEN" "1" "April 2021" "" ""
+.TH "NPM\-TOKEN" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-token\fR \- Manage your authentication tokens
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1
index 0de9f431be36..0ee2fded986c 100644
--- a/deps/npm/man/man1/npm-uninstall.1
+++ b/deps/npm/man/man1/npm-uninstall.1
@@ -1,4 +1,4 @@
-.TH "NPM\-UNINSTALL" "1" "April 2021" "" ""
+.TH "NPM\-UNINSTALL" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-uninstall\fR \- Remove a package
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1
index 9645ab106d0c..e0e2a6c81b2f 100644
--- a/deps/npm/man/man1/npm-unpublish.1
+++ b/deps/npm/man/man1/npm-unpublish.1
@@ -1,4 +1,4 @@
-.TH "NPM\-UNPUBLISH" "1" "April 2021" "" ""
+.TH "NPM\-UNPUBLISH" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-unpublish\fR \- Remove a package from the registry
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-unstar.1 b/deps/npm/man/man1/npm-unstar.1
index 86c152eb6d27..ec4cf6d2d1ff 100644
--- a/deps/npm/man/man1/npm-unstar.1
+++ b/deps/npm/man/man1/npm-unstar.1
@@ -1,4 +1,4 @@
-.TH "NPM\-UNSTAR" "1" "April 2021" "" ""
+.TH "NPM\-UNSTAR" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-unstar\fR \- Remove an item from your favorite packages
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1
index adaebe92db33..2ac1f9e8478e 100644
--- a/deps/npm/man/man1/npm-update.1
+++ b/deps/npm/man/man1/npm-update.1
@@ -1,4 +1,4 @@
-.TH "NPM\-UPDATE" "1" "April 2021" "" ""
+.TH "NPM\-UPDATE" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-update\fR \- Update packages
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1
index d926c9e5282e..02de076a10c4 100644
--- a/deps/npm/man/man1/npm-version.1
+++ b/deps/npm/man/man1/npm-version.1
@@ -1,4 +1,4 @@
-.TH "NPM\-VERSION" "1" "April 2021" "" ""
+.TH "NPM\-VERSION" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-version\fR \- Bump a package version
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1
index 498821fbb6ba..b3dac21b7572 100644
--- a/deps/npm/man/man1/npm-view.1
+++ b/deps/npm/man/man1/npm-view.1
@@ -1,4 +1,4 @@
-.TH "NPM\-VIEW" "1" "April 2021" "" ""
+.TH "NPM\-VIEW" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-view\fR \- View registry info
.SS Synopsis
diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1
index c38b46dff07a..ed54f2f00bc6 100644
--- a/deps/npm/man/man1/npm-whoami.1
+++ b/deps/npm/man/man1/npm-whoami.1
@@ -1,4 +1,4 @@
-.TH "NPM\-WHOAMI" "1" "April 2021" "" ""
+.TH "NPM\-WHOAMI" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-whoami\fR \- Display npm username
.SS Synopsis
diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1
index 8dbeca5362bb..4562527e1b5a 100644
--- a/deps/npm/man/man1/npm.1
+++ b/deps/npm/man/man1/npm.1
@@ -1,4 +1,4 @@
-.TH "NPM" "1" "April 2021" "" ""
+.TH "NPM" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm\fR \- javascript package manager
.SS Synopsis
@@ -10,7 +10,7 @@ npm [args]
.RE
.SS Version
.P
-7\.11\.2
+7\.12\.1
.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 87c018f41219..76305688fb0e 100644
--- a/deps/npm/man/man1/npx.1
+++ b/deps/npm/man/man1/npx.1
@@ -1,4 +1,4 @@
-.TH "NPX" "1" "April 2021" "" ""
+.TH "NPX" "1" "May 2021" "" ""
.SH "NAME"
\fBnpx\fR \- Run a command from a local or remote npm package
.SS Synopsis
diff --git a/deps/npm/man/man5/folders.5 b/deps/npm/man/man5/folders.5
index cacb710a03b0..ccf0c4f6e8f1 100644
--- a/deps/npm/man/man5/folders.5
+++ b/deps/npm/man/man5/folders.5
@@ -1,4 +1,4 @@
-.TH "FOLDERS" "5" "April 2021" "" ""
+.TH "FOLDERS" "5" "May 2021" "" ""
.SH "NAME"
\fBfolders\fR \- Folder Structures Used by npm
.SS Description
diff --git a/deps/npm/man/man5/install.5 b/deps/npm/man/man5/install.5
index 445353eb8565..5fc6f442a922 100644
--- a/deps/npm/man/man5/install.5
+++ b/deps/npm/man/man5/install.5
@@ -1,4 +1,4 @@
-.TH "INSTALL" "5" "April 2021" "" ""
+.TH "INSTALL" "5" "May 2021" "" ""
.SH "NAME"
\fBinstall\fR \- Download and install node and npm
.SS Description
diff --git a/deps/npm/man/man5/npm-shrinkwrap-json.5 b/deps/npm/man/man5/npm-shrinkwrap-json.5
index 27076ba3361f..2fdbdd139a9f 100644
--- a/deps/npm/man/man5/npm-shrinkwrap-json.5
+++ b/deps/npm/man/man5/npm-shrinkwrap-json.5
@@ -1,4 +1,4 @@
-.TH "NPM\-SHRINKWRAP\.JSON" "5" "April 2021" "" ""
+.TH "NPM\-SHRINKWRAP\.JSON" "5" "May 2021" "" ""
.SH "NAME"
\fBnpm-shrinkwrap.json\fR \- A publishable lockfile
.SS Description
diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5
index f880a269513a..1ecd71ff2145 100644
--- a/deps/npm/man/man5/npmrc.5
+++ b/deps/npm/man/man5/npmrc.5
@@ -1,4 +1,4 @@
-.TH "NPMRC" "5" "April 2021" "" ""
+.TH "NPMRC" "5" "May 2021" "" ""
.SH "NAME"
\fBnpmrc\fR \- The npm config files
.SS Description
diff --git a/deps/npm/man/man5/package-json.5 b/deps/npm/man/man5/package-json.5
index a882e445ca00..8b5b12e03829 100644
--- a/deps/npm/man/man5/package-json.5
+++ b/deps/npm/man/man5/package-json.5
@@ -1,4 +1,4 @@
-.TH "PACKAGE\.JSON" "5" "April 2021" "" ""
+.TH "PACKAGE\.JSON" "5" "May 2021" "" ""
.SH "NAME"
\fBpackage.json\fR \- Specifics of npm's package\.json handling
.SS Description
@@ -624,7 +624,7 @@ tarball or git URL\.
\fBPlease do not put test harnesses or transpilers or other "development"
time tools in your \fBdependencies\fP object\.\fR See \fBdevDependencies\fP, below\.
.P
-See npm help semver for more details about specifying version ranges\.
+See semver \fIhttps://github\.com/npm/node\-semver#versions\fR for more details about specifying version ranges\.
.RS 0
.IP \(bu 2
\fBversion\fP Must match \fBversion\fP exactly
diff --git a/deps/npm/man/man5/package-lock-json.5 b/deps/npm/man/man5/package-lock-json.5
index 765dd8499948..20bedd300097 100644
--- a/deps/npm/man/man5/package-lock-json.5
+++ b/deps/npm/man/man5/package-lock-json.5
@@ -1,4 +1,4 @@
-.TH "PACKAGE\-LOCK\.JSON" "5" "April 2021" "" ""
+.TH "PACKAGE\-LOCK\.JSON" "5" "May 2021" "" ""
.SH "NAME"
\fBpackage-lock.json\fR \- A manifestation of the manifest
.SS Description
diff --git a/deps/npm/man/man7/config.7 b/deps/npm/man/man7/config.7
index 522e974fc070..b8884ded13e4 100644
--- a/deps/npm/man/man7/config.7
+++ b/deps/npm/man/man7/config.7
@@ -1,4 +1,4 @@
-.TH "CONFIG" "7" "April 2021" "" ""
+.TH "CONFIG" "7" "May 2021" "" ""
.SH "NAME"
\fBconfig\fR \- More than you probably want to know about npm configuration
.SS Description
@@ -1666,7 +1666,8 @@ Show short usage output about the command specified\.
.SS \fBuser\-agent\fP
.RS 0
.IP \(bu 2
-Default: "npm/{npm\-version} node/{node\-version} {platform} {arch} {ci}"
+Default: "npm/{npm\-version} node/{node\-version} {platform} {arch}
+workspaces/{workspaces} {ci}"
.IP \(bu 2
Type: String
@@ -1684,6 +1685,9 @@ their actual counterparts:
.IP \(bu 2
\fB{arch}\fP \- The value of \fBprocess\.arch\fP
.IP \(bu 2
+\fB{workspaces}\fP \- Set to \fBtrue\fP if the \fBworkspaces\fP or \fBworkspace\fP options
+are set\.
+.IP \(bu 2
\fB{ci}\fP \- The value of the \fBci\-name\fP config, if set, prefixed with \fBci/\fP, or
an empty string if \fBci\-name\fP is empty\.
diff --git a/deps/npm/man/man7/developers.7 b/deps/npm/man/man7/developers.7
index 00dc1b14e241..0935fea65f50 100644
--- a/deps/npm/man/man7/developers.7
+++ b/deps/npm/man/man7/developers.7
@@ -1,4 +1,4 @@
-.TH "DEVELOPERS" "7" "April 2021" "" ""
+.TH "DEVELOPERS" "7" "May 2021" "" ""
.SH "NAME"
\fBdevelopers\fR \- Developer Guide
.SS Description
diff --git a/deps/npm/man/man7/orgs.7 b/deps/npm/man/man7/orgs.7
index 7f29cf2c2397..13c9b9dbadf1 100644
--- a/deps/npm/man/man7/orgs.7
+++ b/deps/npm/man/man7/orgs.7
@@ -1,4 +1,4 @@
-.TH "ORGS" "7" "April 2021" "" ""
+.TH "ORGS" "7" "May 2021" "" ""
.SH "NAME"
\fBorgs\fR \- Working with Teams & Orgs
.SS Description
diff --git a/deps/npm/man/man7/registry.7 b/deps/npm/man/man7/registry.7
index 2ff87e4a4c45..941a14500731 100644
--- a/deps/npm/man/man7/registry.7
+++ b/deps/npm/man/man7/registry.7
@@ -1,4 +1,4 @@
-.TH "REGISTRY" "7" "April 2021" "" ""
+.TH "REGISTRY" "7" "May 2021" "" ""
.SH "NAME"
\fBregistry\fR \- The JavaScript Package Registry
.SS Description
diff --git a/deps/npm/man/man7/removal.7 b/deps/npm/man/man7/removal.7
index e3508f6696d7..ead032bfdf45 100644
--- a/deps/npm/man/man7/removal.7
+++ b/deps/npm/man/man7/removal.7
@@ -1,4 +1,4 @@
-.TH "REMOVAL" "7" "April 2021" "" ""
+.TH "REMOVAL" "7" "May 2021" "" ""
.SH "NAME"
\fBremoval\fR \- Cleaning the Slate
.SS Synopsis
diff --git a/deps/npm/man/man7/scope.7 b/deps/npm/man/man7/scope.7
index 2a0fa9e1c8ea..716946d732af 100644
--- a/deps/npm/man/man7/scope.7
+++ b/deps/npm/man/man7/scope.7
@@ -1,4 +1,4 @@
-.TH "SCOPE" "7" "April 2021" "" ""
+.TH "SCOPE" "7" "May 2021" "" ""
.SH "NAME"
\fBscope\fR \- Scoped packages
.SS Description
diff --git a/deps/npm/man/man7/scripts.7 b/deps/npm/man/man7/scripts.7
index 2dc2486de7d5..63ebce805b4d 100644
--- a/deps/npm/man/man7/scripts.7
+++ b/deps/npm/man/man7/scripts.7
@@ -1,4 +1,4 @@
-.TH "SCRIPTS" "7" "April 2021" "" ""
+.TH "SCRIPTS" "7" "May 2021" "" ""
.SH "NAME"
\fBscripts\fR \- How npm handles the "scripts" field
.SS Description
@@ -160,13 +160,6 @@ These all run after the actual installation of modules into
.IP \(bu 2
\fBprepare\fP
-.RE
-.SS npm help \fBenv\fP
-.RS 0
-.IP \(bu 2
-\fBenv\fP (You can override the default behavior of \fBnpm env\fP by defining
- a custom \fBenv\fP entry in your \fBscripts\fP object)
-
.RE
.SS npm help \fBinstall\fP
.P
diff --git a/deps/npm/man/man7/workspaces.7 b/deps/npm/man/man7/workspaces.7
index 5b28ac54c5d1..dbb63528d6da 100644
--- a/deps/npm/man/man7/workspaces.7
+++ b/deps/npm/man/man7/workspaces.7
@@ -1,4 +1,4 @@
-.TH "WORKSPACES" "7" "April 2021" "" ""
+.TH "WORKSPACES" "7" "May 2021" "" ""
.SH "NAME"
\fBworkspaces\fR \- Working with workspaces
.SS Description
diff --git a/deps/npm/node_modules/@npmcli/arborist/CHANGELOG.md b/deps/npm/node_modules/@npmcli/arborist/CHANGELOG.md
deleted file mode 100644
index 3cd36d027b63..000000000000
--- a/deps/npm/node_modules/@npmcli/arborist/CHANGELOG.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# CHANGELOG
-
-## 2.0
-
-* BREAKING CHANGE: root node is now included in inventory
-* All parent/target/fsParent/etc. references set in `root` setter, rather
- than the hodgepodge of setters that existed before.
-* `treeCheck` function added, to enforce strict correctness guarantees when
- `ARBORIST_DEBUG=1` in the environment (on by default in Arborist tests).
-
-## 1.0
-
-* Release for npm v7 beta
-* Fully functional
-
-## 0.0
-
-* Proof of concept
-* Before this, it was [`read-package-tree`](http://npm.im/read-package-tree)
diff --git a/deps/npm/node_modules/@npmcli/arborist/bin/license.js b/deps/npm/node_modules/@npmcli/arborist/bin/license.js
index 4083ddc695d4..89d0d879036b 100644
--- a/deps/npm/node_modules/@npmcli/arborist/bin/license.js
+++ b/deps/npm/node_modules/@npmcli/arborist/bin/license.js
@@ -22,7 +22,7 @@ a.loadVirtual().then(tree => {
set.push([tree.inventory.query('license', license).size, license])
for (const [count, license] of set.sort((a, b) =>
- a[1] && b[1] ? b[0] - a[0] || a[1].localeCompare(b[1])
+ a[1] && b[1] ? b[0] - a[0] || a[1].localeCompare(b[1], 'en')
: a[1] ? -1
: b[1] ? 1
: 0))
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/add-rm-pkg-deps.js b/deps/npm/node_modules/@npmcli/arborist/lib/add-rm-pkg-deps.js
index 9a96fd1b3797..f78a43319be8 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/add-rm-pkg-deps.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/add-rm-pkg-deps.js
@@ -1,60 +1,60 @@
// add and remove dependency specs to/from pkg manifest
-const removeFromOthers = (name, type, pkg) => {
- const others = new Set([
- 'dependencies',
- 'optionalDependencies',
- 'devDependencies',
- 'peerDependenciesMeta',
- 'peerDependencies',
- ])
-
- switch (type) {
- case 'prod':
- others.delete('dependencies')
- break
- case 'dev':
- others.delete('devDependencies')
- others.delete('peerDependencies')
- others.delete('peerDependenciesMeta')
- break
- case 'optional':
- others.delete('optionalDependencies')
- break
- case 'peer':
- case 'peerOptional':
- others.delete('devDependencies')
- others.delete('peerDependencies')
- others.delete('peerDependenciesMeta')
- break
- }
-
- for (const other of others)
- deleteSubKey(pkg, other, name)
-}
-
-const add = ({pkg, add, saveBundle, saveType}) => {
+const add = ({pkg, add, saveBundle, saveType, log}) => {
for (const spec of add)
- addSingle({pkg, spec, saveBundle, saveType})
+ addSingle({pkg, spec, saveBundle, saveType, log})
return pkg
}
-const addSingle = ({pkg, spec, saveBundle, saveType}) => {
- if (!saveType)
- saveType = getSaveType(pkg, spec)
+// Canonical source of both the map between saveType and where it correlates to
+// in the package, and the names of all our dependencies attributes
+const saveTypeMap = new Map([
+ ['dev', 'devDependencies'],
+ ['optional', 'optionalDependencies'],
+ ['prod', 'dependencies'],
+ ['peerOptional', 'peerDependencies'],
+ ['peer', 'peerDependencies'],
+])
+const addSingle = ({pkg, spec, saveBundle, saveType, log}) => {
const { name, rawSpec } = spec
- removeFromOthers(name, saveType, pkg)
- const type = saveType === 'prod' ? 'dependencies'
- : saveType === 'optional' ? 'optionalDependencies'
- : saveType === 'peer' || saveType === 'peerOptional' ? 'peerDependencies'
- : saveType === 'dev' ? 'devDependencies'
- : /* istanbul ignore next */ null
- pkg[type] = pkg[type] || {}
- if (rawSpec !== '' || pkg[type][name] === undefined)
- pkg[type][name] = rawSpec || '*'
+ // if the user does not give us a type, we infer which type(s)
+ // to keep based on the same order of priority we do when
+ // building the tree as defined in the _loadDeps method of
+ // the node class.
+ if (!saveType)
+ saveType = inferSaveType(pkg, spec.name)
+
+ if (saveType === 'prod') {
+ // a production dependency can only exist as production (rpj ensures it
+ // doesn't coexist w/ optional)
+ deleteSubKey(pkg, 'devDependencies', name, 'dependencies', log)
+ deleteSubKey(pkg, 'peerDependencies', name, 'dependencies', log)
+ } else if (saveType === 'dev') {
+ // a dev dependency may co-exist as peer, or optional, but not production
+ deleteSubKey(pkg, 'dependencies', name, 'devDependencies', log)
+ } else if (saveType === 'optional') {
+ // an optional dependency may co-exist as dev (rpj ensures it doesn't
+ // coexist w/ prod)
+ deleteSubKey(pkg, 'peerDependencies', name, 'optionalDependencies', log)
+ } else { // peer or peerOptional is all that's left
+ // a peer dependency may coexist as dev
+ deleteSubKey(pkg, 'dependencies', name, 'peerDependencies', log)
+ deleteSubKey(pkg, 'optionalDependencies', name, 'peerDependencies', log)
+ }
+
+ const depType = saveTypeMap.get(saveType)
+
+ pkg[depType] = pkg[depType] || {}
+ if (rawSpec !== '' || pkg[depType][name] === undefined)
+ pkg[depType][name] = rawSpec || '*'
+ if (saveType === 'optional') {
+ // Affordance for previous npm versions that require this behaviour
+ pkg.dependencies = pkg.dependencies || {}
+ pkg.dependencies[name] = pkg.optionalDependencies[name]
+ }
if (saveType === 'peer' || saveType === 'peerOptional') {
const pdm = pkg.peerDependenciesMeta || {}
@@ -75,51 +75,53 @@ const addSingle = ({pkg, spec, saveBundle, saveType}) => {
// keep it sorted, keep it unique
const bd = new Set(pkg.bundleDependencies || [])
bd.add(spec.name)
- pkg.bundleDependencies = [...bd].sort((a, b) => a.localeCompare(b))
+ pkg.bundleDependencies = [...bd].sort((a, b) => a.localeCompare(b, 'en'))
}
}
-const getSaveType = (pkg, spec) => {
- const {name} = spec
- const {
- // these names are so lonnnnngggg
- devDependencies: devDeps,
- optionalDependencies: optDeps,
- peerDependencies: peerDeps,
- peerDependenciesMeta: peerDepsMeta,
- } = pkg
-
- if (peerDeps && peerDeps[name] !== undefined) {
- if (peerDepsMeta && peerDepsMeta[name] && peerDepsMeta[name].optional)
- return 'peerOptional'
- else
- return 'peer'
- } else if (devDeps && devDeps[name] !== undefined)
- return 'dev'
- else if (optDeps && optDeps[name] !== undefined)
- return 'optional'
- else
- return 'prod'
+// Finds where the package is already in the spec and infers saveType from that
+const inferSaveType = (pkg, name) => {
+ for (const saveType of saveTypeMap.keys()) {
+ if (hasSubKey(pkg, saveTypeMap.get(saveType), name)) {
+ if (
+ saveType === 'peerOptional' &&
+ (!hasSubKey(pkg, 'peerDependenciesMeta', name) ||
+ !pkg.peerDependenciesMeta[name].optional)
+ )
+ return 'peer'
+ return saveType
+ }
+ }
+ return 'prod'
}
-const deleteSubKey = (obj, k, sk) => {
- if (obj[k]) {
- delete obj[k][sk]
- if (!Object.keys(obj[k]).length)
- delete obj[k]
+const hasSubKey = (pkg, depType, name) => {
+ return pkg[depType] && Object.prototype.hasOwnProperty.call(pkg[depType], name)
+}
+
+// Removes a subkey and warns about it if it's being replaced
+const deleteSubKey = (pkg, depType, name, replacedBy, log) => {
+ if (hasSubKey(pkg, depType, name)) {
+ if (replacedBy && log)
+ log.warn('idealTree', `Removing ${depType}.${name} in favor of ${replacedBy}.${name}`)
+ delete pkg[depType][name]
+
+ // clean up peerDependenciesMeta if we are removing something from peerDependencies
+ if (depType === 'peerDependencies' && pkg.peerDependenciesMeta) {
+ delete pkg.peerDependenciesMeta[name]
+ if (!Object.keys(pkg.peerDependenciesMeta).length)
+ delete pkg.peerDependenciesMeta
+ }
+
+ if (!Object.keys(pkg[depType]).length)
+ delete pkg[depType]
}
}
const rm = (pkg, rm) => {
- for (const type of [
- 'dependencies',
- 'optionalDependencies',
- 'peerDependencies',
- 'peerDependenciesMeta',
- 'devDependencies',
- ]) {
+ for (const depType of new Set(saveTypeMap.values())) {
for (const name of rm)
- deleteSubKey(pkg, type, name)
+ deleteSubKey(pkg, depType, name)
}
if (pkg.bundleDependencies) {
pkg.bundleDependencies = pkg.bundleDependencies
@@ -130,4 +132,4 @@ const rm = (pkg, rm) => {
return pkg
}
-module.exports = { add, rm }
+module.exports = { add, rm, saveTypeMap, hasSubKey }
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js
index 7ee8dae35be1..ade9bbf1a152 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js
@@ -504,6 +504,7 @@ module.exports = cls => class IdealTreeBuilder extends cls {
saveBundle,
saveType,
path: this.path,
+ log: this.log,
})
})
}
@@ -763,7 +764,7 @@ This is a one-time fix-up, please be patient...
// sort physically shallower deps up to the front of the queue,
// because they'll affect things deeper in, then alphabetical
this[_depsQueue].sort((a, b) =>
- (a.depth - b.depth) || a.path.localeCompare(b.path))
+ (a.depth - b.depth) || a.path.localeCompare(b.path, 'en'))
const node = this[_depsQueue].shift()
const bd = node.package.bundleDependencies
@@ -901,7 +902,7 @@ This is a one-time fix-up, please be patient...
}
const placed = tasks
- .sort((a, b) => a.edge.name.localeCompare(b.edge.name))
+ .sort((a, b) => a.edge.name.localeCompare(b.edge.name, 'en'))
.map(({ edge, dep }) => this[_placeDep](dep, node, edge))
const promises = []
@@ -1146,7 +1147,7 @@ This is a one-time fix-up, please be patient...
// we typically only install non-optional peers, but we have to
// factor them into the peerSet so that we can avoid conflicts
.filter(e => e.peer && !(e.valid && e.to))
- .sort(({name: a}, {name: b}) => a.localeCompare(b))
+ .sort(({name: a}, {name: b}) => a.localeCompare(b, 'en'))
for (const edge of peerEdges) {
// already placed this one, and we're happy with it.
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/index.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/index.js
index 93b9aa382982..3578d50389ea 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/index.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/index.js
@@ -29,6 +29,7 @@
const {resolve} = require('path')
const {homedir} = require('os')
const procLog = require('../proc-log.js')
+const { saveTypeMap } = require('../add-rm-pkg-deps.js')
const mixins = [
require('../tracker.js'),
@@ -57,6 +58,8 @@ class Arborist extends Base {
packumentCache: options.packumentCache || new Map(),
log: options.log || procLog,
}
+ if (options.saveType && !saveTypeMap.get(options.saveType))
+ throw new Error(`Invalid saveType ${options.saveType}`)
this.cache = resolve(this.options.cache)
this.path = resolve(this.options.path)
process.emit('timeEnd', 'arborist:ctor')
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-virtual.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-virtual.js
index 2a222249d7a4..a98ed23b2a45 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-virtual.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-virtual.js
@@ -159,12 +159,12 @@ module.exports = cls => class VirtualLoader extends cls {
...depsToEdges('peerOptional', peerOptional),
...lockWS,
].sort(([atype, aname], [btype, bname]) =>
- atype.localeCompare(btype) || aname.localeCompare(bname))
+ atype.localeCompare(btype, 'en') || aname.localeCompare(bname, 'en'))
const rootEdges = [...root.edgesOut.values()]
.map(e => [e.type, e.name, e.spec])
.sort(([atype, aname], [btype, bname]) =>
- atype.localeCompare(btype) || aname.localeCompare(bname))
+ atype.localeCompare(btype, 'en') || aname.localeCompare(bname, 'en'))
if (rootEdges.length !== lockEdges.length) {
// something added or removed
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 390d3ce42aec..7cba1da00008 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js
@@ -14,7 +14,7 @@ const {
} = require('@npmcli/node-gyp')
const boolEnv = b => b ? '1' : ''
-const sortNodes = (a, b) => (a.depth - b.depth) || a.path.localeCompare(b.path)
+const sortNodes = (a, b) => (a.depth - b.depth) || a.path.localeCompare(b.path, 'en')
const _build = Symbol('build')
const _resetQueues = Symbol('resetQueues')
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 64f08756263c..b09a9e0fe16d 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js
@@ -3,9 +3,8 @@
const onExit = require('../signal-handling.js')
const pacote = require('pacote')
const rpj = require('read-package-json-fast')
-const { updateDepSpec } = require('../dep-spec.js')
const AuditReport = require('../audit-report.js')
-const {subset} = require('semver')
+const {subset, intersects} = require('semver')
const npa = require('npm-package-arg')
const {dirname, resolve, relative} = require('path')
@@ -28,6 +27,7 @@ const promiseAllRejectLate = require('promise-all-reject-late')
const optionalSet = require('../optional-set.js')
const updateRootPackageJson = require('../update-root-package-json.js')
const calcDepFlags = require('../calc-dep-flags.js')
+const { saveTypeMap, hasSubKey } = require('../add-rm-pkg-deps.js')
const _retiredPaths = Symbol('retiredPaths')
const _retiredUnchanged = Symbol('retiredUnchanged')
@@ -406,11 +406,14 @@ module.exports = cls => class Reifier extends cls {
return
process.emit('time', 'reify:trashOmits')
+ // node.parent is checked to make sure this is a node that's in the tree, and
+ // not the parent-less top level nodes
const filter = node =>
- node.peer && this[_omitPeer] ||
- node.dev && this[_omitDev] ||
- node.optional && this[_omitOptional] ||
- node.devOptional && this[_omitOptional] && this[_omitDev]
+ node.isDescendantOf(this.idealTree) &&
+ (node.peer && this[_omitPeer] ||
+ node.dev && this[_omitDev] ||
+ node.optional && this[_omitOptional] ||
+ node.devOptional && this[_omitOptional] && this[_omitDev])
for (const node of this.idealTree.inventory.filter(filter))
this[_addNodeToTrashList](node)
@@ -539,8 +542,8 @@ module.exports = cls => class Reifier extends cls {
// Do the best with what we have, or else remove it from the tree
// entirely, since we can't possibly reify it.
const res = node.resolved ? `${node.name}@${this[_registryResolved](node.resolved)}`
- : node.package.name && node.version
- ? `${node.package.name}@${node.version}`
+ : node.packageName && node.version
+ ? `${node.packageName}@${node.version}`
: null
// no idea what this thing is. remove it from the tree.
@@ -959,6 +962,7 @@ module.exports = cls => class Reifier extends cls {
const spec = subSpec ? subSpec.rawSpec : rawSpec
const child = root.children.get(name)
+ let newSpec
if (req.registry) {
const version = child.version
const prefixRange = version ? this[_savePrefix] + version : '*'
@@ -968,18 +972,26 @@ module.exports = cls => class Reifier extends cls {
// would allow versions outside the requested range. Tags and
// specific versions save with the save-prefix.
const isRange = (subSpec || req).type === 'range'
- const range = !isRange || subset(prefixRange, spec, { loose: true })
- ? prefixRange : spec
- const pname = child.package.name
+
+ let range = spec
+ if (
+ !isRange ||
+ spec === '*' ||
+ subset(prefixRange, spec, { loose: true })
+ )
+ range = prefixRange
+
+ const pname = child.packageName
const alias = name !== pname
- updateDepSpec(pkg, name, (alias ? `npm:${pname}@` : '') + range)
+ newSpec = alias ? `npm:${pname}@${range}` : range
} else if (req.hosted) {
// save the git+https url if it has auth, otherwise shortcut
const h = req.hosted
const opt = { noCommittish: false }
- const save = h.https && h.auth ? `git+${h.https(opt)}`
- : h.shortcut(opt)
- updateDepSpec(pkg, name, save)
+ if (h.https && h.auth)
+ newSpec = `git+${h.https(opt)}`
+ else
+ newSpec = h.shortcut(opt)
} else if (req.type === 'directory' || req.type === 'file') {
// save the relative path in package.json
// Normally saveSpec is updated with the proper relative
@@ -988,9 +1000,37 @@ module.exports = cls => class Reifier extends cls {
// thing, so just get the ultimate fetchSpec and relativize it.
const p = req.fetchSpec.replace(/^file:/, '')
const rel = relpath(root.realpath, p)
- updateDepSpec(pkg, name, `file:${rel}`)
+ newSpec = `file:${rel}`
} else
- updateDepSpec(pkg, name, req.saveSpec)
+ newSpec = req.saveSpec
+
+ if (options.saveType) {
+ const depType = saveTypeMap.get(options.saveType)
+ pkg[depType][name] = newSpec
+ // rpj will have moved it here if it was in both
+ // if it is empty it will be deleted later
+ if (options.saveType === 'prod' && pkg.optionalDependencies)
+ delete pkg.optionalDependencies[name]
+ } else {
+ if (hasSubKey(pkg, 'dependencies', name))
+ pkg.dependencies[name] = newSpec
+
+ if (hasSubKey(pkg, 'devDependencies', name)) {
+ pkg.devDependencies[name] = newSpec
+ // don't update peer or optional if we don't have to
+ if (hasSubKey(pkg, 'peerDependencies', name) && !intersects(newSpec, pkg.peerDependencies[name]))
+ pkg.peerDependencies[name] = newSpec
+
+ if (hasSubKey(pkg, 'optionalDependencies', name) && !intersects(newSpec, pkg.optionalDependencies[name]))
+ pkg.optionalDependencies[name] = newSpec
+ } else {
+ if (hasSubKey(pkg, 'peerDependencies', name))
+ pkg.peerDependencies[name] = newSpec
+
+ if (hasSubKey(pkg, 'optionalDependencies', name))
+ pkg.optionalDependencies[name] = newSpec
+ }
+ }
}
// refresh the edges so they have the correct specs
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/audit-report.js b/deps/npm/node_modules/@npmcli/arborist/lib/audit-report.js
index 77cd6511aea3..76387cde1d66 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/audit-report.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/audit-report.js
@@ -78,7 +78,7 @@ class AuditReport extends Map {
}
obj.vulnerabilities = vulnerabilities
- .sort(([a], [b]) => a.localeCompare(b))
+ .sort(([a], [b]) => a.localeCompare(b, 'en'))
.reduce((set, [name, vuln]) => {
set[name] = vuln
return set
@@ -101,13 +101,14 @@ class AuditReport extends Map {
async run () {
this.report = await this[_getReport]()
+ this.log.silly('audit report', this.report)
if (this.report)
await this[_init]()
return this
}
isVulnerable (node) {
- const vuln = this.get(node.package.name)
+ const vuln = this.get(node.packageName)
return !!(vuln && vuln.isVulnerable(node))
}
@@ -144,7 +145,7 @@ class AuditReport extends Map {
super.set(name, vuln)
const p = []
- for (const node of this.tree.inventory.query('name', name)) {
+ for (const node of this.tree.inventory.query('packageName', name)) {
if (shouldOmit(node, this[_omit]))
continue
@@ -167,7 +168,7 @@ class AuditReport extends Map {
this[_checkTopNode](dep, vuln, spec)
else {
// calculate a metavuln, if necessary
- p.push(this.calculator.calculate(dep.name, advisory).then(meta => {
+ p.push(this.calculator.calculate(dep.packageName, advisory).then(meta => {
if (meta.testVersion(dep.version, spec))
advisories.add(meta)
}))
@@ -228,6 +229,9 @@ class AuditReport extends Map {
if (!specObj.registry)
return false
+ if (specObj.subSpec)
+ spec = specObj.subSpec.rawSpec
+
// We don't provide fixes for top nodes other than root, but we
// still check to see if the node is fixable with a different version,
// and if that is a semver major bump.
@@ -289,6 +293,7 @@ class AuditReport extends Map {
try {
// first try the super fast bulk advisory listing
const body = prepareBulkData(this.tree, this[_omit])
+ this.log.silly('audit', 'bulk request', body)
// no sense asking if we don't have anything to audit,
// we know it'll be empty
@@ -304,7 +309,8 @@ class AuditReport extends Map {
})
return await res.json()
- } catch (_) {
+ } catch (er) {
+ this.log.silly('audit', 'bulk request failed', String(er.body))
// that failed, try the quick audit endpoint
const body = prepareData(this.tree, this.options)
const res = await fetch('/-/npm/v1/security/audits/quick', {
@@ -330,6 +336,7 @@ class AuditReport extends Map {
// return true if we should ignore this one
const shouldOmit = (node, omit) =>
!node.version ? true
+ : node.isRoot ? true
: omit.size === 0 ? false
: node.dev && omit.has('dev') ||
node.optional && omit.has('optional') ||
@@ -338,9 +345,9 @@ const shouldOmit = (node, omit) =>
const prepareBulkData = (tree, omit) => {
const payload = {}
- for (const name of tree.inventory.query('name')) {
+ for (const name of tree.inventory.query('packageName')) {
const set = new Set()
- for (const node of tree.inventory.query('name', name)) {
+ for (const node of tree.inventory.query('packageName', name)) {
if (shouldOmit(node, omit))
continue
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/dep-spec.js b/deps/npm/node_modules/@npmcli/arborist/lib/dep-spec.js
deleted file mode 100644
index 92911543e168..000000000000
--- a/deps/npm/node_modules/@npmcli/arborist/lib/dep-spec.js
+++ /dev/null
@@ -1,43 +0,0 @@
-const types = [
- 'peerDependencies',
- 'devDependencies',
- 'optionalDependencies',
- 'dependencies',
-]
-
-const findType = (pkg, name) => {
- for (const t of types) {
- if (pkg[t] && typeof pkg[t] === 'object' && pkg[t][name] !== undefined)
- return t
- }
- return 'dependencies'
-}
-
-// given a dep name and spec, update it wherever it exists in
-// the manifest, or add the spec to 'dependencies' if not found.
-const updateDepSpec = (pkg, name, newSpec) => {
- const type = findType(pkg, name)
- pkg[type] = pkg[type] || {}
- pkg[type][name] = newSpec
- return pkg
-}
-
-// sort alphabetically all types of deps for a given package
-const orderDeps = (pkg) => {
- for (const type of types) {
- if (pkg && pkg[type]) {
- pkg[type] = Object.keys(pkg[type])
- .sort((a, b) => a.localeCompare(b))
- .reduce((res, key) => {
- res[key] = pkg[type][key]
- return res
- }, {})
- }
- }
- return pkg
-}
-
-module.exports = {
- orderDeps,
- updateDepSpec,
-}
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/inventory.js b/deps/npm/node_modules/@npmcli/arborist/lib/inventory.js
index cef0c4e26589..757829188522 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/inventory.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/inventory.js
@@ -4,7 +4,7 @@
// keys is the set of fields to be able to query.
const _primaryKey = Symbol('_primaryKey')
const _index = Symbol('_index')
-const defaultKeys = ['name', 'license', 'funding', 'realpath']
+const defaultKeys = ['name', 'license', 'funding', 'realpath', 'packageName']
const { hasOwnProperty } = Object.prototype
const debug = require('./debug.js')
class Inventory extends Map {
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/node.js b/deps/npm/node_modules/@npmcli/arborist/lib/node.js
index a54f76afcdf3..370bfc9567d2 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/node.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/node.js
@@ -291,6 +291,10 @@ class Node {
return this[_package].version || ''
}
+ get packageName () {
+ return this[_package].name || null
+ }
+
get pkgid () {
const { name = '', version = '' } = this.package
// root package will prefer package name over folder name,
@@ -350,10 +354,10 @@ class Node {
}
const why = {
- name: this.isProjectRoot ? this.package.name : this.name,
+ name: this.isProjectRoot ? this.packageName : this.name,
version: this.package.version,
}
- if (this.errors.length || !this.package.name || !this.package.version) {
+ if (this.errors.length || !this.packageName || !this.package.version) {
why.errors = this.errors.length ? this.errors : [
new Error('invalid package: lacks name and/or version'),
]
@@ -460,7 +464,7 @@ class Node {
if (this.isProjectRoot)
return false
const { root } = this
- const { type, to } = root.edgesOut.get(this.package.name) || {}
+ const { type, to } = root.edgesOut.get(this.packageName) || {}
return type === 'workspace' && to && (to.target === this || to === this)
}
@@ -730,20 +734,14 @@ class Node {
[_loadDeps] () {
// Caveat! Order is relevant!
- // packages in optionalDependencies and prod/peer/dev are
- // optional. Packages in both deps and devDeps are required.
+ // Packages in optionalDependencies are optional.
+ // Packages in both deps and devDeps are required.
// Note the subtle breaking change from v6: it is no longer possible
// to have a different spec for a devDep than production dep.
- this[_loadDepType](this.package.optionalDependencies, 'optional')
// Linked targets that are disconnected from the tree are tops,
// but don't have a 'path' field, only a 'realpath', because we
// don't know their canonical location. We don't need their devDeps.
- const { isTop, path, sourceReference } = this
- const { isTop: srcTop, path: srcPath } = sourceReference || {}
- if (isTop && path && (!sourceReference || srcTop && srcPath))
- this[_loadDepType](this.package.devDependencies, 'dev')
-
const pd = this.package.peerDependencies
if (pd && typeof pd === 'object' && !this.legacyPeerDeps) {
const pm = this.package.peerDependenciesMeta || {}
@@ -760,19 +758,22 @@ class Node {
}
this[_loadDepType](this.package.dependencies, 'prod')
+ this[_loadDepType](this.package.optionalDependencies, 'optional')
+
+ const { isTop, path, sourceReference } = this
+ const { isTop: srcTop, path: srcPath } = sourceReference || {}
+ if (isTop && path && (!sourceReference || srcTop && srcPath))
+ this[_loadDepType](this.package.devDependencies, 'dev')
}
- [_loadDepType] (obj, type) {
- const from = this
+ [_loadDepType] (deps, type) {
const ad = this.package.acceptDependencies || {}
- for (const [name, spec] of Object.entries(obj || {})) {
- const accept = ad[name]
- // if it's already set, then we keep the existing edge
- // Prod deps should not be marked as dev, however.
- // NB: the Edge ctor adds itself to from.edgesOut
+ // Because of the order in which _loadDeps runs, we always want to
+ // prioritize a new edge over an existing one
+ for (const [name, spec] of Object.entries(deps || {})) {
const current = this.edgesOut.get(name)
- if (!current || current.dev && type === 'prod')
- new Edge({ from, name, spec, accept, type })
+ if (!current || current.type !== 'workspace')
+ new Edge({ from: this, name, spec, accept: ad[name], type })
}
}
@@ -965,8 +966,8 @@ class Node {
// if no resolved, check both package name and version
// otherwise, conclude that they are different things
- return this.package.name && node.package.name &&
- this.package.name === node.package.name &&
+ return this.packageName && node.packageName &&
+ this.packageName === node.packageName &&
this.version && node.version &&
this.version === node.version
}
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/printable.js b/deps/npm/node_modules/@npmcli/arborist/lib/printable.js
index 79f46a9e93c4..ce764071dc62 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/printable.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/printable.js
@@ -7,8 +7,8 @@ const relpath = require('./relpath.js')
class ArboristNode {
constructor (tree, path) {
this.name = tree.name
- if (tree.package.name && tree.package.name !== this.name)
- this.packageName = tree.package.name
+ if (tree.packageName && tree.packageName !== this.name)
+ this.packageName = tree.packageName
if (tree.version)
this.version = tree.version
this.location = tree.location
@@ -46,14 +46,14 @@ class ArboristNode {
// edgesOut sorted by name
if (tree.edgesOut.size) {
this.edgesOut = new Map([...tree.edgesOut.entries()]
- .sort(([a], [b]) => a.localeCompare(b))
+ .sort(([a], [b]) => a.localeCompare(b, 'en'))
.map(([name, edge]) => [name, new EdgeOut(edge)]))
}
// edgesIn sorted by location
if (tree.edgesIn.size) {
this.edgesIn = new Set([...tree.edgesIn]
- .sort((a, b) => a.from.location.localeCompare(b.from.location))
+ .sort((a, b) => a.from.location.localeCompare(b.from.location, 'en'))
.map(edge => new EdgeIn(edge)))
}
@@ -65,14 +65,14 @@ class ArboristNode {
// fsChildren sorted by path
if (tree.fsChildren.size) {
this.fsChildren = new Set([...tree.fsChildren]
- .sort(({path: a}, {path: b}) => a.localeCompare(b))
+ .sort(({path: a}, {path: b}) => a.localeCompare(b, 'en'))
.map(tree => printableTree(tree, path)))
}
// children sorted by name
if (tree.children.size) {
this.children = new Map([...tree.children.entries()]
- .sort(([a], [b]) => a.localeCompare(b))
+ .sort(([a], [b]) => a.localeCompare(b, 'en'))
.map(([name, tree]) => [name, printableTree(tree, path)]))
}
}
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/shrinkwrap.js b/deps/npm/node_modules/@npmcli/arborist/lib/shrinkwrap.js
index 342e78e9e3a7..cff9f09633df 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/shrinkwrap.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/shrinkwrap.js
@@ -254,7 +254,7 @@ class Shrinkwrap {
meta[key.replace(/^_/, '')] = val
})
// we only include name if different from the node path name
- const pname = node.package.name
+ const pname = node.packageName
if (pname && pname !== node.name)
meta.name = pname
@@ -825,7 +825,7 @@ class Shrinkwrap {
[_buildLegacyLockfile] (node, lock, path = []) {
if (node === this.tree) {
// the root node
- lock.name = node.package.name || node.name
+ lock.name = node.packageName || node.name
if (node.version)
lock.version = node.version
}
@@ -844,7 +844,7 @@ class Shrinkwrap {
/* istanbul ignore next - sort calling order is indeterminate */
return aloc.length > bloc.length ? 1
: bloc.length > aloc.length ? -1
- : aloc[aloc.length - 1].localeCompare(bloc[bloc.length - 1])
+ : aloc[aloc.length - 1].localeCompare(bloc[bloc.length - 1], 'en')
})[0]
const res = consistentResolve(node.resolved, this.path, this.path, true)
@@ -870,9 +870,9 @@ class Shrinkwrap {
lock.from = spec.raw
} else if (!node.isRoot &&
node.package &&
- node.package.name &&
- node.package.name !== node.name)
- lock.version = `npm:${node.package.name}@${node.version}`
+ node.packageName &&
+ node.packageName !== node.name)
+ lock.version = `npm:${node.packageName}@${node.version}`
else if (node.package && node.version)
lock.version = node.version
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/update-root-package-json.js b/deps/npm/node_modules/@npmcli/arborist/lib/update-root-package-json.js
index aba5614924ec..57ec41424875 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/update-root-package-json.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/update-root-package-json.js
@@ -6,8 +6,6 @@ const {resolve} = require('path')
const parseJSON = require('json-parse-even-better-errors')
-const { orderDeps } = require('./dep-spec.js')
-
const depTypes = new Set([
'dependencies',
'optionalDependencies',
@@ -15,6 +13,20 @@ const depTypes = new Set([
'peerDependencies',
])
+// sort alphabetically all types of deps for a given package
+const orderDeps = (pkg) => {
+ for (const type of depTypes) {
+ if (pkg && pkg[type]) {
+ pkg[type] = Object.keys(pkg[type])
+ .sort((a, b) => a.localeCompare(b, 'en'))
+ .reduce((res, key) => {
+ res[key] = pkg[type][key]
+ return res
+ }, {})
+ }
+ }
+ return pkg
+}
const parseJsonSafe = json => {
try {
return parseJSON(json)
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/vuln.js b/deps/npm/node_modules/@npmcli/arborist/lib/vuln.js
index 8f887a3fc96c..5b1d1dc1ab83 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/vuln.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/vuln.js
@@ -83,6 +83,9 @@ class Vuln {
if (!specObj.registry)
return true
+ if (specObj.subSpec)
+ spec = specObj.subSpec.rawSpec
+
for (const v of this.versions) {
if (satisfies(v, spec) && !satisfies(v, this.range, semverOpt))
return false
@@ -103,12 +106,12 @@ class Vuln {
vulnerableVersions: undefined,
id: undefined,
}).sort((a, b) =>
- String(a.source || a).localeCompare(String(b.source || b))),
+ String(a.source || a).localeCompare(String(b.source || b, 'en'))),
effects: [...this.effects].map(v => v.name)
- .sort(/* istanbul ignore next */(a, b) => a.localeCompare(b)),
+ .sort(/* istanbul ignore next */(a, b) => a.localeCompare(b, 'en')),
range: this.simpleRange,
nodes: [...this.nodes].map(n => n.location)
- .sort(/* istanbul ignore next */(a, b) => a.localeCompare(b)),
+ .sort(/* istanbul ignore next */(a, b) => a.localeCompare(b, 'en')),
fixAvailable: this[_fixAvailable],
}
}
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/yarn-lock.js b/deps/npm/node_modules/@npmcli/arborist/lib/yarn-lock.js
index 14c7691f1bd4..e237cc5c6a46 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/yarn-lock.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/yarn-lock.js
@@ -34,7 +34,7 @@ const {breadth} = require('treeverse')
// sort a key/value object into a string of JSON stringified keys and vals
const sortKV = obj => Object.keys(obj)
- .sort((a, b) => a.localeCompare(b))
+ .sort((a, b) => a.localeCompare(b, 'en'))
.map(k => ` ${JSON.stringify(k)} ${JSON.stringify(obj[k])}`)
.join('\n')
@@ -165,7 +165,7 @@ class YarnLock {
toString () {
return prefix + [...new Set([...this.entries.values()])]
.map(e => e.toString())
- .sort((a, b) => a.localeCompare(b)).join('\n\n') + '\n'
+ .sort((a, b) => a.localeCompare(b, 'en')).join('\n\n') + '\n'
}
fromTree (tree) {
@@ -175,7 +175,7 @@ class YarnLock {
tree,
visit: node => this.addEntryFromNode(node),
getChildren: node => [...node.children.values(), ...node.fsChildren]
- .sort((a, b) => a.depth - b.depth || a.name.localeCompare(b.name)),
+ .sort((a, b) => a.depth - b.depth || a.name.localeCompare(b.name, 'en')),
})
return this
}
@@ -183,7 +183,7 @@ class YarnLock {
addEntryFromNode (node) {
const specs = [...node.edgesIn]
.map(e => `${node.name}@${e.spec}`)
- .sort((a, b) => a.localeCompare(b))
+ .sort((a, b) => a.localeCompare(b, 'en'))
// Note:
// yarn will do excessive duplication in a case like this:
@@ -309,7 +309,7 @@ class YarnLockEntry {
toString () {
// sort objects to the bottom, then alphabetical
return ([...this[_specs]]
- .sort((a, b) => a.localeCompare(b))
+ .sort((a, b) => a.localeCompare(b, 'en'))
.map(JSON.stringify).join(', ') +
':\n' +
Object.getOwnPropertyNames(this)
@@ -318,7 +318,7 @@ class YarnLockEntry {
(a, b) =>
/* istanbul ignore next - sort call order is unpredictable */
(typeof this[a] === 'object') === (typeof this[b] === 'object')
- ? a.localeCompare(b)
+ ? a.localeCompare(b, 'en')
: typeof this[a] === 'object' ? 1 : -1)
.map(prop =>
typeof this[prop] !== 'object'
diff --git a/deps/npm/node_modules/@npmcli/arborist/package.json b/deps/npm/node_modules/@npmcli/arborist/package.json
index e7ac932e08d8..bbe87d8bf97a 100644
--- a/deps/npm/node_modules/@npmcli/arborist/package.json
+++ b/deps/npm/node_modules/@npmcli/arborist/package.json
@@ -1,6 +1,6 @@
{
"name": "@npmcli/arborist",
- "version": "2.4.1",
+ "version": "2.4.4",
"description": "Manage node_modules trees",
"dependencies": {
"@npmcli/installed-package-contents": "^1.0.7",
@@ -14,7 +14,7 @@
"cacache": "^15.0.3",
"common-ancestor-path": "^1.0.1",
"json-parse-even-better-errors": "^2.3.1",
- "json-stringify-nice": "^1.1.2",
+ "json-stringify-nice": "^1.1.4",
"mkdirp-infer-owner": "^2.0.0",
"npm-install-checks": "^4.0.0",
"npm-package-arg": "^8.1.0",
@@ -40,9 +40,8 @@
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"minify-registry-metadata": "^2.1.0",
- "mutate-fs": "^2.1.1",
- "tap": "^15.0.4",
- "tcompare": "^3.0.4"
+ "tap": "^15.0.9",
+ "tcompare": "^5.0.6"
},
"scripts": {
"test": "npm run test-only --",
@@ -74,11 +73,13 @@
"bin": {
"arborist": "bin/index.js"
},
+ "//": "sk test-env locale to catch locale-specific sorting",
"tap": {
"after": "test/fixtures/cleanup.js",
"coverage-map": "map.js",
"test-env": [
- "NODE_OPTIONS=--no-warnings"
+ "NODE_OPTIONS=--no-warnings",
+ "LC_ALL=sk"
],
"node-arg": [
"--no-warnings",
diff --git a/deps/npm/node_modules/@npmcli/git/lib/clone.js b/deps/npm/node_modules/@npmcli/git/lib/clone.js
index 1fea5acc8462..6754fd760600 100644
--- a/deps/npm/node_modules/@npmcli/git/lib/clone.js
+++ b/deps/npm/node_modules/@npmcli/git/lib/clone.js
@@ -30,7 +30,7 @@ const pickManifest = require('npm-pick-manifest')
const fs = require('fs')
const mkdirp = require('mkdirp')
-module.exports = (repo, ref = 'HEAD', target = null, /* istanbul ignore next */ opts = {}) =>
+module.exports = (repo, ref = 'HEAD', target = null, opts = {}) =>
revs(repo, opts).then(revs => clone(
repo,
revs,
diff --git a/deps/npm/node_modules/@npmcli/git/lib/spawn.js b/deps/npm/node_modules/@npmcli/git/lib/spawn.js
index cee3a7baf407..337164a9a012 100644
--- a/deps/npm/node_modules/@npmcli/git/lib/spawn.js
+++ b/deps/npm/node_modules/@npmcli/git/lib/spawn.js
@@ -10,6 +10,11 @@ module.exports = (gitArgs, opts = {}) => {
if (gitPath instanceof Error) { return Promise.reject(gitPath) }
+ // undocumented option, mostly only here for tests
+ const args = opts.allowReplace || gitArgs[0] === '--no-replace-objects'
+ ? gitArgs
+ : ['--no-replace-objects', ...gitArgs]
+
const log = opts.log || procLog
let retry = opts.retry
if (retry === null || retry === undefined) {
@@ -22,11 +27,11 @@ module.exports = (gitArgs, opts = {}) => {
}
return promiseRetry((retry, number) => {
if (number !== 1) {
- log.silly('pacote', `Retrying git command: ${
- gitArgs.join(' ')} attempt # ${number}`)
+ log.silly('git', `Retrying git command: ${
+ args.join(' ')} attempt # ${number}`)
}
- return spawn(gitPath, gitArgs, makeOpts(opts))
+ return spawn(gitPath, args, makeOpts(opts))
.catch(er => {
if (!shouldRetry(er.stderr, number)) {
throw er
diff --git a/deps/npm/node_modules/@npmcli/git/package.json b/deps/npm/node_modules/@npmcli/git/package.json
index 9b368c31e262..0fe94686ece2 100644
--- a/deps/npm/node_modules/@npmcli/git/package.json
+++ b/deps/npm/node_modules/@npmcli/git/package.json
@@ -1,6 +1,6 @@
{
"name": "@npmcli/git",
- "version": "2.0.8",
+ "version": "2.0.9",
"main": "lib/index.js",
"files": [
"lib/*.js"
@@ -29,7 +29,7 @@
"devDependencies": {
"slash": "^3.0.0",
"standard": "^16.0.3",
- "tap": "^14.11.0"
+ "tap": "^15.0.6"
},
"dependencies": {
"@npmcli/promise-spawn": "^1.3.2",
diff --git a/deps/npm/node_modules/glob/README.md b/deps/npm/node_modules/glob/README.md
index 0916a48255cd..2dde30a597d7 100644
--- a/deps/npm/node_modules/glob/README.md
+++ b/deps/npm/node_modules/glob/README.md
@@ -7,7 +7,7 @@ Match files using the patterns the shell uses, like stars and stuff.
This is a glob implementation in JavaScript. It uses the `minimatch`
library to do its matching.
-
+
## Usage
diff --git a/deps/npm/node_modules/glob/common.js b/deps/npm/node_modules/glob/common.js
index 66651bb3aac6..d14157a0aec8 100644
--- a/deps/npm/node_modules/glob/common.js
+++ b/deps/npm/node_modules/glob/common.js
@@ -1,5 +1,3 @@
-exports.alphasort = alphasort
-exports.alphasorti = alphasorti
exports.setopts = setopts
exports.ownProp = ownProp
exports.makeAbs = makeAbs
@@ -17,12 +15,8 @@ var minimatch = require("minimatch")
var isAbsolute = require("path-is-absolute")
var Minimatch = minimatch.Minimatch
-function alphasorti (a, b) {
- return a.toLowerCase().localeCompare(b.toLowerCase())
-}
-
function alphasort (a, b) {
- return a.localeCompare(b)
+ return a.localeCompare(b, 'en')
}
function setupIgnores (self, options) {
@@ -150,7 +144,7 @@ function finish (self) {
all = Object.keys(all)
if (!self.nosort)
- all = all.sort(self.nocase ? alphasorti : alphasort)
+ all = all.sort(alphasort)
// at *some* point we statted all of these
if (self.mark) {
diff --git a/deps/npm/node_modules/glob/glob.js b/deps/npm/node_modules/glob/glob.js
index 58dec0f6c2bd..dc27aef10b34 100644
--- a/deps/npm/node_modules/glob/glob.js
+++ b/deps/npm/node_modules/glob/glob.js
@@ -51,8 +51,6 @@ var assert = require('assert')
var isAbsolute = require('path-is-absolute')
var globSync = require('./sync.js')
var common = require('./common.js')
-var alphasort = common.alphasort
-var alphasorti = common.alphasorti
var setopts = common.setopts
var ownProp = common.ownProp
var inflight = require('inflight')
diff --git a/deps/npm/node_modules/glob/package.json b/deps/npm/node_modules/glob/package.json
index 6477c3070cb1..b345ae1e9fd8 100644
--- a/deps/npm/node_modules/glob/package.json
+++ b/deps/npm/node_modules/glob/package.json
@@ -2,7 +2,7 @@
"author": "Isaac Z. Schlueter (http://blog.izs.me/)",
"name": "glob",
"description": "a little globber",
- "version": "7.1.6",
+ "version": "7.1.7",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-glob.git"
@@ -27,13 +27,18 @@
"devDependencies": {
"mkdirp": "0",
"rimraf": "^2.2.8",
- "tap": "^12.0.1",
+ "tap": "^15.0.6",
"tick": "0.0.6"
},
+ "tap": {
+ "before": "test/00-setup.js",
+ "after": "test/zz-cleanup.js",
+ "jobs": 1
+ },
"scripts": {
"prepublish": "npm run benchclean",
"profclean": "rm -f v8.log profile.txt",
- "test": "tap test/*.js --cov",
+ "test": "tap",
"test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js",
"bench": "bash benchmark.sh",
"prof": "bash prof.sh && cat profile.txt",
diff --git a/deps/npm/node_modules/glob/sync.js b/deps/npm/node_modules/glob/sync.js
index c952134baa7e..10b0ed2c0026 100644
--- a/deps/npm/node_modules/glob/sync.js
+++ b/deps/npm/node_modules/glob/sync.js
@@ -11,8 +11,6 @@ var path = require('path')
var assert = require('assert')
var isAbsolute = require('path-is-absolute')
var common = require('./common.js')
-var alphasort = common.alphasort
-var alphasorti = common.alphasorti
var setopts = common.setopts
var ownProp = common.ownProp
var childrenIgnored = common.childrenIgnored
diff --git a/deps/npm/node_modules/ignore-walk/index.js b/deps/npm/node_modules/ignore-walk/index.js
index eec6851804a9..c01d57de2a03 100644
--- a/deps/npm/node_modules/ignore-walk/index.js
+++ b/deps/npm/node_modules/ignore-walk/index.js
@@ -23,7 +23,7 @@ class Walker extends EE {
}
sort (a, b) {
- return a.localeCompare(b)
+ return a.localeCompare(b, 'en')
}
emit (ev, data) {
diff --git a/deps/npm/node_modules/ignore-walk/package.json b/deps/npm/node_modules/ignore-walk/package.json
index 99d2c2e64de9..7d48b977e070 100644
--- a/deps/npm/node_modules/ignore-walk/package.json
+++ b/deps/npm/node_modules/ignore-walk/package.json
@@ -1,13 +1,13 @@
{
"name": "ignore-walk",
- "version": "3.0.3",
+ "version": "3.0.4",
"description": "Nested/recursive `.gitignore`/`.npmignore` parsing and filtering.",
"main": "index.js",
"devDependencies": {
"mkdirp": "^0.5.1",
"mutate-fs": "^1.1.0",
"rimraf": "^2.6.1",
- "tap": "^14.6.9"
+ "tap": "^15.0.6"
},
"scripts": {
"test": "tap",
@@ -36,6 +36,9 @@
"minimatch": "^3.0.4"
},
"tap": {
+ "test-env": "LC_ALL=sk",
+ "before": "test/00-setup.js",
+ "after": "test/zz-cleanup.js",
"jobs": 1
}
}
diff --git a/deps/npm/node_modules/json-stringify-nice/index.js b/deps/npm/node_modules/json-stringify-nice/index.js
index 2c722a752c68..36557bb055f0 100644
--- a/deps/npm/node_modules/json-stringify-nice/index.js
+++ b/deps/npm/node_modules/json-stringify-nice/index.js
@@ -5,7 +5,7 @@ const compare = (ak, bk, prefKeys) =>
: prefKeys.includes(bk) && !prefKeys.includes(ak) ? 1
: prefKeys.includes(ak) && prefKeys.includes(bk)
? prefKeys.indexOf(ak) - prefKeys.indexOf(bk)
- : ak.localeCompare(bk)
+ : ak.localeCompare(bk, 'en')
const sort = (replacer, seen) => (key, val) => {
const prefKeys = Array.isArray(replacer) ? replacer : []
diff --git a/deps/npm/node_modules/json-stringify-nice/package.json b/deps/npm/node_modules/json-stringify-nice/package.json
index ea4f486c5e0b..c9663290ee4b 100644
--- a/deps/npm/node_modules/json-stringify-nice/package.json
+++ b/deps/npm/node_modules/json-stringify-nice/package.json
@@ -1,21 +1,34 @@
{
"name": "json-stringify-nice",
- "version": "1.1.3",
+ "version": "1.1.4",
"description": "Stringify an object sorting scalars before objects, and defaulting to 2-space indent",
"author": "Isaac Z. Schlueter (https://izs.me)",
"license": "ISC",
"scripts": {
"test": "tap",
+ "posttest": "npm run lint",
"snap": "tap",
+ "postsnap": "npm run lintfix",
+ "eslint": "eslint",
+ "lint": "npm run eslint -- index.js test/**/*.js",
+ "lintfix": "npm run lint -- --fix",
"preversion": "npm test",
"postversion": "npm publish",
"postpublish": "git push origin --follow-tags"
},
"tap": {
+ "test-env": [
+ "LC_ALL=sk"
+ ],
"check-coverage": true
},
"devDependencies": {
- "tap": "^14.9.2"
+ "eslint": "^7.25.0",
+ "eslint-plugin-import": "^2.22.1",
+ "eslint-plugin-node": "^11.1.0",
+ "eslint-plugin-promise": "^5.1.0",
+ "eslint-plugin-standard": "^5.0.0",
+ "tap": "^15.0.6"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
diff --git a/deps/npm/node_modules/libnpmexec/CHANGELOG.md b/deps/npm/node_modules/libnpmexec/CHANGELOG.md
deleted file mode 100644
index 9de3013f0ad9..000000000000
--- a/deps/npm/node_modules/libnpmexec/CHANGELOG.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# Changelog
-
-## v1.0.0
-
-- Initial implementation, moves the code that used to live in the **npm cli**,
-ref: https://github.com/npm/cli/blob/release/v7.10.0/lib/exec.js into this
-separate module, providing a programmatic API to the **npm exec** functionality.
diff --git a/deps/npm/node_modules/libnpmexec/README.md b/deps/npm/node_modules/libnpmexec/README.md
index a436c9a5a2bc..fb7a77176001 100644
--- a/deps/npm/node_modules/libnpmexec/README.md
+++ b/deps/npm/node_modules/libnpmexec/README.md
@@ -31,7 +31,7 @@ await libexec({
- `call`: An alternative command to run when using `packages` option **String**, defaults to empty string.
- `cache`: The path location to where the npm cache folder is placed **String**
- `color`: Output should use color? **Boolean**, defaults to `false`
- - `localBin`: Location to the `node_modules/.bin` folder of the local project **String**, defaults to empty string.
+ - `localBin`: Location to the `node_modules/.bin` folder of the local project to start scanning for bin files **String**, defaults to `./node_modules/.bin`. **libexec** will walk up the directory structure looking for `node_modules/.bin` folders in parent folders that might satisfy the current `arg` and will use that bin if found.
- `locationMsg`: Overrides "at location" message when entering interactive mode **String**
- `log`: Sets an optional logger **Object**, defaults to `proc-log` module usage.
- `globalBin`: Location to the global space bin folder, same as: `$(npm bin -g)` **String**, defaults to empty string.
diff --git a/deps/npm/node_modules/libnpmexec/lib/cache-install-dir.js b/deps/npm/node_modules/libnpmexec/lib/cache-install-dir.js
index 1bee28989bf7..9e30d62a1e10 100644
--- a/deps/npm/node_modules/libnpmexec/lib/cache-install-dir.js
+++ b/deps/npm/node_modules/libnpmexec/lib/cache-install-dir.js
@@ -12,7 +12,7 @@ const cacheInstallDir = ({ cache, packages }) => {
const getHash = (packages) =>
crypto.createHash('sha512')
- .update(packages.sort((a, b) => a.localeCompare(b)).join('\n'))
+ .update(packages.sort((a, b) => a.localeCompare(b, 'en')).join('\n'))
.digest('hex')
.slice(0, 16)
diff --git a/deps/npm/node_modules/libnpmexec/lib/file-exists.js b/deps/npm/node_modules/libnpmexec/lib/file-exists.js
new file mode 100644
index 000000000000..a115be14b004
--- /dev/null
+++ b/deps/npm/node_modules/libnpmexec/lib/file-exists.js
@@ -0,0 +1,29 @@
+const { resolve } = require('path')
+const { promisify } = require('util')
+const stat = promisify(require('fs').stat)
+const walkUp = require('walk-up-path')
+
+const fileExists = (file) => stat(file)
+ .then((stat) => stat.isFile())
+ .catch(() => false)
+
+const localFileExists = async (dir, binName, root = '/') => {
+ root = resolve(root).toLowerCase()
+
+ for (const path of walkUp(resolve(dir))) {
+ const binDir = resolve(path, 'node_modules', '.bin')
+
+ if (await fileExists(resolve(binDir, binName)))
+ return binDir
+
+ if (path.toLowerCase() === root)
+ return false
+ }
+
+ return false
+}
+
+module.exports = {
+ fileExists,
+ localFileExists,
+}
diff --git a/deps/npm/node_modules/libnpmexec/lib/index.js b/deps/npm/node_modules/libnpmexec/lib/index.js
index 906a0b5407c1..a48c654bf6a4 100644
--- a/deps/npm/node_modules/libnpmexec/lib/index.js
+++ b/deps/npm/node_modules/libnpmexec/lib/index.js
@@ -1,7 +1,6 @@
-const { delimiter, resolve } = require('path')
+const { delimiter, dirname, resolve } = require('path')
const { promisify } = require('util')
const read = promisify(require('read'))
-const stat = promisify(require('fs').stat)
const Arborist = require('@npmcli/arborist')
const ciDetect = require('@npmcli/ci-detect')
@@ -12,15 +11,12 @@ const pacote = require('pacote')
const readPackageJson = require('read-package-json-fast')
const cacheInstallDir = require('./cache-install-dir.js')
+const { fileExists, localFileExists } = require('./file-exists.js')
const getBinFromManifest = require('./get-bin-from-manifest.js')
const manifestMissing = require('./manifest-missing.js')
const noTTY = require('./no-tty.js')
const runScript = require('./run-script.js')
-const fileExists = (file) => stat(file)
- .then((stat) => stat.isFile())
- .catch(() => false)
-
/* istanbul ignore next */
const PATH = (
process.env.PATH || process.env.Path || process.env.path
@@ -31,7 +27,7 @@ const exec = async (opts) => {
args = [],
call = '',
color = false,
- localBin = '',
+ localBin = resolve('./node_modules/.bin'),
locationMsg = undefined,
globalBin = '',
output,
@@ -72,8 +68,10 @@ const exec = async (opts) => {
// the behavior of treating the single argument as a package name
if (needPackageCommandSwap) {
let binExists = false
- if (await fileExists(`${localBin}/${args[0]}`)) {
- pathArr.unshift(localBin)
+ const dir = dirname(dirname(localBin))
+ const localBinPath = await localFileExists(dir, args[0])
+ if (localBinPath) {
+ pathArr.unshift(localBinPath)
binExists = true
} else if (await fileExists(`${globalBin}/${args[0]}`)) {
pathArr.unshift(globalBin)
@@ -145,7 +143,7 @@ const exec = async (opts) => {
},
}))
.map(mani => mani._from)
- .sort((a, b) => a.localeCompare(b))
+ .sort((a, b) => a.localeCompare(b, 'en'))
// no need to install if already present
if (add.length) {
diff --git a/deps/npm/node_modules/libnpmexec/package.json b/deps/npm/node_modules/libnpmexec/package.json
index 1b7d24103be7..c113ac6d0a60 100644
--- a/deps/npm/node_modules/libnpmexec/package.json
+++ b/deps/npm/node_modules/libnpmexec/package.json
@@ -1,6 +1,6 @@
{
"name": "libnpmexec",
- "version": "1.0.1",
+ "version": "1.1.1",
"files": [
"lib"
],
@@ -46,7 +46,7 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-standard": "^5.0.0",
- "tap": "^15.0.2"
+ "tap": "^15.0.6"
},
"dependencies": {
"@npmcli/arborist": "^2.3.0",
@@ -58,6 +58,7 @@
"pacote": "^11.3.1",
"proc-log": "^1.0.0",
"read": "^1.0.7",
- "read-package-json-fast": "^2.0.2"
+ "read-package-json-fast": "^2.0.2",
+ "walk-up-path": "^1.0.0"
}
}
diff --git a/deps/npm/node_modules/npm-packlist/bin/index.js b/deps/npm/node_modules/npm-packlist/bin/index.js
index f06feffd9b55..40811db7d32e 100755
--- a/deps/npm/node_modules/npm-packlist/bin/index.js
+++ b/deps/npm/node_modules/npm-packlist/bin/index.js
@@ -12,13 +12,14 @@ process.argv.slice(2).forEach(arg => {
dirs.push(arg)
})
-const sort = list => doSort ? list.sort((a, b) => a.localeCompare(b)) : list
+const sort = list => doSort ? list.sort((a, b) => a.localeCompare(b, 'en')) : list
const packlist = require('../')
if (!dirs.length)
console.log(sort(packlist.sync({ path: process.cwd() })).join('\n'))
-else
+else {
dirs.forEach(path => {
console.log(`> ${path}`)
console.log(sort(packlist.sync({ path })).join('\n'))
})
+}
diff --git a/deps/npm/node_modules/npm-packlist/index.js b/deps/npm/node_modules/npm-packlist/index.js
index 8f62983e6f6c..f498fa008cec 100644
--- a/deps/npm/node_modules/npm-packlist/index.js
+++ b/deps/npm/node_modules/npm-packlist/index.js
@@ -26,11 +26,10 @@ const normalizePackageBin = require('npm-normalize-package-bin')
// localized documentation and other use cases. Adding a `/` to
// these rules, while tempting and arguably more "correct", is a
// significant change that will break existing use cases.
-const packageMustHaveFileNames =
- 'readme|copying|license|licence|notice|changes|changelog|history'
+const packageMustHaveFileNames = 'readme|copying|license|licence'
const packageMustHaves = `@(${packageMustHaveFileNames}){,.*[^~$]}`
-const packageMustHavesRE = new RegExp(`^(${packageMustHaveFileNames})(\\..*[^~\$])?$`, 'i')
+const packageMustHavesRE = new RegExp(`^(${packageMustHaveFileNames})(\\..*[^~$])?$`, 'i')
const fs = require('fs')
const glob = require('glob')
@@ -76,13 +75,11 @@ const npmWalker = Class => class Walker extends Class {
'package.json',
'.npmignore',
'.gitignore',
- packageNecessaryRules
+ packageNecessaryRules,
]
opt.includeEmpty = false
opt.path = opt.path || process.cwd()
- const dirName = path.basename(opt.path)
- const parentName = path.basename(path.dirname(opt.path))
// only follow links in the root node_modules folder, because if those
// folders are included, it's because they're bundled, and bundles
@@ -90,7 +87,7 @@ const npmWalker = Class => class Walker extends Class {
// This regexp tests to see that we're either a node_modules folder,
// or a @scope within a node_modules folder, in the root's node_modules
// hierarchy (ie, not in test/foo/node_modules/ or something).
- const followRe = /^(?:\/node_modules\/(?:@[^\/]+\/[^\/]+|[^\/]+)\/)*\/node_modules(?:\/@[^\/]+)?$/
+ const followRe = /^(?:\/node_modules\/(?:@[^/]+\/[^/]+|[^/]+)\/)*\/node_modules(?:\/@[^/]+)?$/
const rootPath = opt.parent ? opt.parent.root : opt.path
const followTestPath = opt.path.replace(/\\/g, '/').substr(rootPath.length)
opt.follow = followRe.test(followTestPath)
@@ -104,10 +101,10 @@ const npmWalker = Class => class Walker extends Class {
this.bundled = opt.bundled || []
this.bundledScopes = Array.from(new Set(
this.bundled.filter(f => /^@/.test(f))
- .map(f => f.split('/')[0])))
+ .map(f => f.split('/')[0])))
const rules = defaultRules.join('\n') + '\n'
this.packageJsonCache = opt.packageJsonCache || new Map()
- super.onReadIgnoreFile(rootBuiltinRules, rules, _=>_)
+ super.onReadIgnoreFile(rootBuiltinRules, rules, _ => _)
} else {
this.bundled = []
this.bundledScopes = []
@@ -129,9 +126,8 @@ const npmWalker = Class => class Walker extends Class {
// to be in the state the user wants to include them, and
// a package.json somewhere else might be a template or
// test or something else entirely.
- if (this.parent || !entries.includes('package.json')) {
+ if (this.parent || !entries.includes('package.json'))
return super.onReaddir(entries)
- }
// when the cache has been seeded with the root manifest,
// we must respect that (it may differ from the filesystem)
@@ -141,9 +137,8 @@ const npmWalker = Class => class Walker extends Class {
const pkg = this.packageJsonCache.get(ig)
// fall back to filesystem when seeded manifest is invalid
- if (!pkg || typeof pkg !== 'object') {
+ if (!pkg || typeof pkg !== 'object')
return this.readPackageJson(entries)
- }
// feels wonky, but this ensures package bin is _always_
// normalized, as well as guarding against invalid JSON
@@ -175,7 +170,7 @@ const npmWalker = Class => class Walker extends Class {
'/package.json',
'/npm-shrinkwrap.json',
'!/package-lock.json',
- packageMustHaves,
+ packageMustHaves
)
return files
}
@@ -233,9 +228,8 @@ const npmWalker = Class => class Walker extends Class {
return this.emit('error', er)
results[i] = { negate, fileList }
- if (--n === 0) {
+ if (--n === 0)
processResults(results)
- }
}
const processResults = results => {
for (const {negate, fileList} of results) {
@@ -273,7 +267,7 @@ const npmWalker = Class => class Walker extends Class {
filterEntry (entry, partial) {
// get the partial path from the root of the walk
const p = this.path.substr(this.root.length + 1)
- const pkgre = /^node_modules\/(@[^\/]+\/?[^\/]+|[^\/]+)(\/.*)?$/
+ const pkgre = /^node_modules\/(@[^/]+\/?[^/]+|[^/]+)(\/.*)?$/
const isRoot = !this.parent
const pkg = isRoot && pkgre.test(entry) ?
entry.replace(pkgre, '$1') : null
@@ -283,7 +277,7 @@ const npmWalker = Class => class Walker extends Class {
return (
// if we're in a bundled package, check with the parent.
/^node_modules($|\/)/i.test(p) ? this.parent.filterEntry(
- this.basename + '/' + entry, partial)
+ this.basename + '/' + entry, partial)
// if package is bundled, all files included
// also include @scope dirs for bundled scoped deps
@@ -291,8 +285,8 @@ const npmWalker = Class => class Walker extends Class {
// However, this only matters if we're in the root.
// node_modules folders elsewhere, like lib/node_modules,
// should be included normally unless ignored.
- : pkg ? -1 !== this.bundled.indexOf(pkg) ||
- -1 !== this.bundledScopes.indexOf(pkg)
+ : pkg ? this.bundled.indexOf(pkg) !== -1 ||
+ this.bundledScopes.indexOf(pkg) !== -1
// only walk top node_modules if we want to bundle something
: rootNM ? !!this.bundled.length
@@ -308,10 +302,10 @@ const npmWalker = Class => class Walker extends Class {
? true
// package-lock never included
- : isRoot && entry === 'package-lock.json' ? false
+ : isRoot && entry === 'package-lock.json' ? false
- // otherwise, follow ignore-walk's logic
- : super.filterEntry(entry, partial)
+ // otherwise, follow ignore-walk's logic
+ : super.filterEntry(entry, partial)
)
}
@@ -454,12 +448,11 @@ const sort = (a, b) => {
const basea = path.basename(a).toLowerCase()
const baseb = path.basename(b).toLowerCase()
- return exta.localeCompare(extb) ||
- basea.localeCompare(baseb) ||
- a.localeCompare(b)
+ return exta.localeCompare(extb, 'en') ||
+ basea.localeCompare(baseb, 'en') ||
+ a.localeCompare(b, 'en')
}
-
module.exports = walk
walk.sync = walkSync
walk.Walker = Walker
diff --git a/deps/npm/node_modules/npm-packlist/package.json b/deps/npm/node_modules/npm-packlist/package.json
index 1276b4841369..49fa947547b6 100644
--- a/deps/npm/node_modules/npm-packlist/package.json
+++ b/deps/npm/node_modules/npm-packlist/package.json
@@ -1,6 +1,6 @@
{
"name": "npm-packlist",
- "version": "2.1.5",
+ "version": "2.2.2",
"description": "Get a list of the files to add from a folder into an npm package",
"directories": {
"test": "test"
@@ -15,25 +15,38 @@
"author": "Isaac Z. Schlueter (http://blog.izs.me/)",
"license": "ISC",
"files": [
+ "bin/index.js",
"index.js"
],
"devDependencies": {
+ "eslint": "^7.25.0",
+ "eslint-plugin-import": "^2.22.1",
+ "eslint-plugin-node": "^11.1.0",
+ "eslint-plugin-promise": "^5.1.0",
+ "eslint-plugin-standard": "^5.0.0",
"mutate-fs": "^2.1.1",
- "require-inject": "^1.4.4",
- "tap": "^14.10.8"
+ "tap": "^15.0.6"
},
"scripts": {
"test": "tap",
+ "posttest": "npm run lint",
"snap": "tap",
+ "postsnap": "npm run lintfix",
"preversion": "npm test",
"postversion": "npm publish",
- "prepublishOnly": "git push origin --follow-tags"
+ "prepublishOnly": "git push origin --follow-tags",
+ "eslint": "eslint",
+ "lint": "npm run eslint -- index.js bin/index.js \"test/**/*.js\"",
+ "lintfix": "npm run lint -- --fix"
},
"repository": {
"type": "git",
"url": "git+https://github.com/npm/npm-packlist.git"
},
"tap": {
+ "test-env": [
+ "LC_ALL=sk"
+ ],
"check-coverage": true,
"nyc-arg": [
"--include=index.js",
diff --git a/deps/npm/package.json b/deps/npm/package.json
index 19326a9aa59d..70f94838882b 100644
--- a/deps/npm/package.json
+++ b/deps/npm/package.json
@@ -1,5 +1,5 @@
{
- "version": "7.11.2",
+ "version": "7.12.1",
"name": "npm",
"description": "a package manager for JavaScript",
"keywords": [
@@ -42,7 +42,7 @@
"./package.json": "./package.json"
},
"dependencies": {
- "@npmcli/arborist": "^2.4.1",
+ "@npmcli/arborist": "^2.4.4",
"@npmcli/ci-detect": "^1.2.0",
"@npmcli/config": "^2.2.0",
"@npmcli/run-script": "^1.8.5",
@@ -57,7 +57,7 @@
"cli-columns": "^3.1.2",
"cli-table3": "^0.6.0",
"columnify": "~1.5.4",
- "glob": "^7.1.4",
+ "glob": "^7.1.7",
"graceful-fs": "^4.2.6",
"hosted-git-info": "^4.0.2",
"ini": "^2.0.0",
@@ -67,7 +67,7 @@
"leven": "^3.1.0",
"libnpmaccess": "^4.0.2",
"libnpmdiff": "^2.0.4",
- "libnpmexec": "^1.0.1",
+ "libnpmexec": "^1.1.1",
"libnpmfund": "^1.0.2",
"libnpmhook": "^6.0.2",
"libnpmorg": "^2.0.2",
@@ -182,15 +182,15 @@
"devDependencies": {
"@mdx-js/mdx": "^1.6.22",
"cmark-gfm": "^0.8.5",
- "eslint": "^7.23.0",
+ "eslint": "^7.26.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
- "eslint-plugin-promise": "^4.3.1",
+ "eslint-plugin-promise": "^5.1.0",
"eslint-plugin-standard": "^5.0.0",
"jsdom": "^16.5.2",
"licensee": "^8.1.0",
"marked-man": "^0.7.0",
- "tap": "^15.0.6",
+ "tap": "^15.0.9",
"yaml": "^1.10.2"
},
"scripts": {
@@ -216,6 +216,9 @@
"Remove the 'files' below once we're done porting old tests over"
],
"tap": {
+ "test-env": [
+ "LC_ALL=sk"
+ ],
"color": 1,
"files": "test/{lib,bin}",
"coverage-map": "test/coverage-map.js",
diff --git a/deps/npm/tap-snapshots/test/lib/config.js.test.cjs b/deps/npm/tap-snapshots/test/lib/config.js.test.cjs
index 68c50d699a43..a293eda63a0b 100644
--- a/deps/npm/tap-snapshots/test/lib/config.js.test.cjs
+++ b/deps/npm/tap-snapshots/test/lib/config.js.test.cjs
@@ -88,6 +88,9 @@ exports[`test/lib/config.js TAP config edit > should write config file 2`] = `
exports[`test/lib/config.js TAP config get no args > should list configs on config get no args 1`] = `
; "cli" config from command line options
+cat = true
+chai = true
+dog = true
editor = "vi"
global = false
json = false
@@ -109,6 +112,9 @@ init.version = "1.0.0"
; "cli" config from command line options
+cat = true
+chai = true
+dog = true
editor = "vi"
global = false
json = false
@@ -118,6 +124,9 @@ long = true
exports[`test/lib/config.js TAP config list > should list configs 1`] = `
; "cli" config from command line options
+cat = true
+chai = true
+dog = true
editor = "vi"
global = false
json = false
@@ -132,6 +141,9 @@ long = false
exports[`test/lib/config.js TAP config list overrides > should list overridden configs 1`] = `
; "cli" config from command line options
+cat = true
+chai = true
+dog = true
editor = "vi"
global = false
init.author.name = "Bar"
diff --git a/deps/npm/tap-snapshots/test/lib/ls.js.test.cjs b/deps/npm/tap-snapshots/test/lib/ls.js.test.cjs
index 0278f6af1f2e..67359f4b3a34 100644
--- a/deps/npm/tap-snapshots/test/lib/ls.js.test.cjs
+++ b/deps/npm/tap-snapshots/test/lib/ls.js.test.cjs
@@ -47,8 +47,8 @@ test-npm-ls-ignore-missing-optional@1.2.3 {project}
exports[`test/lib/ls.js TAP ls --depth=0 > should output tree containing only top-level dependencies 1`] = `
test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls---depth-0
-+-- foo@1.0.0
-\`-- lorem@1.0.0
++-- chai@1.0.0
+\`-- foo@1.0.0
`
@@ -64,7 +64,7 @@ exports[`test/lib/ls.js TAP ls --dev > should output tree containing dev deps 1`
test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls---dev
\`-- dev-dep@1.0.0
\`-- foo@1.0.0
- \`-- bar@1.0.0
+ \`-- dog@1.0.0
`
@@ -78,10 +78,10 @@ exports[`test/lib/ls.js TAP ls --long --depth=0 > should output tree containing
test-npm-ls@1.0.0
| {CWD}/tap-testdir-ls-ls---long---depth-0
|
++-- chai@1.0.0
+|
+-- dev-dep@1.0.0
| A DEV dep kind of dep
-+-- lorem@1.0.0
-|
+-- optional-dep@1.0.0
| Maybe a dep?
+-- peer-dep@1.0.0
@@ -95,13 +95,13 @@ exports[`test/lib/ls.js TAP ls --long > should output tree info with description
test-npm-ls@1.0.0
| {CWD}/tap-testdir-ls-ls---long
|
++-- chai@1.0.0
+|
+-- dev-dep@1.0.0
| | A DEV dep kind of dep
| \`-- foo@1.0.0
| |
-| \`-- bar@1.0.0
-|
-+-- lorem@1.0.0
+| \`-- dog@1.0.0
|
+-- optional-dep@1.0.0
| Maybe a dep?
@@ -109,7 +109,7 @@ test-npm-ls@1.0.0
| Peer-dep description here
\`-- prod-dep@1.0.0
| A PROD dep kind of dep
- \`-- bar@2.0.0
+ \`-- dog@2.0.0
A dep that bars
`
@@ -118,37 +118,37 @@ exports[`test/lib/ls.js TAP ls --only=development > should output tree containin
test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls---only-development
\`-- dev-dep@1.0.0
\`-- foo@1.0.0
- \`-- bar@1.0.0
+ \`-- dog@1.0.0
`
exports[`test/lib/ls.js TAP ls --only=prod > should output tree containing only prod deps 1`] = `
test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls---only-prod
-+-- lorem@1.0.0
++-- chai@1.0.0
+-- optional-dep@1.0.0
\`-- prod-dep@1.0.0
- \`-- bar@2.0.0
+ \`-- dog@2.0.0
`
exports[`test/lib/ls.js TAP ls --parseable --depth=0 > should output tree containing only top-level dependencies 1`] = `
{CWD}/tap-testdir-ls-ls---parseable---depth-0
+{CWD}/tap-testdir-ls-ls---parseable---depth-0/node_modules/chai
{CWD}/tap-testdir-ls-ls---parseable---depth-0/node_modules/foo
-{CWD}/tap-testdir-ls-ls---parseable---depth-0/node_modules/lorem
`
exports[`test/lib/ls.js TAP ls --parseable --depth=1 > should output parseable containing top-level deps and their deps only 1`] = `
{CWD}/tap-testdir-ls-ls---parseable---depth-1
+{CWD}/tap-testdir-ls-ls---parseable---depth-1/node_modules/chai
{CWD}/tap-testdir-ls-ls---parseable---depth-1/node_modules/foo
-{CWD}/tap-testdir-ls-ls---parseable---depth-1/node_modules/lorem
-{CWD}/tap-testdir-ls-ls---parseable---depth-1/node_modules/bar
+{CWD}/tap-testdir-ls-ls---parseable---depth-1/node_modules/dog
`
exports[`test/lib/ls.js TAP ls --parseable --dev > should output tree containing dev deps 1`] = `
{CWD}/tap-testdir-ls-ls---parseable---dev
{CWD}/tap-testdir-ls-ls---parseable---dev/node_modules/dev-dep
{CWD}/tap-testdir-ls-ls---parseable---dev/node_modules/foo
-{CWD}/tap-testdir-ls-ls---parseable---dev/node_modules/bar
+{CWD}/tap-testdir-ls-ls---parseable---dev/node_modules/dog
`
exports[`test/lib/ls.js TAP ls --parseable --link > should output tree containing linked deps 1`] = `
@@ -158,8 +158,8 @@ exports[`test/lib/ls.js TAP ls --parseable --link > should output tree containin
exports[`test/lib/ls.js TAP ls --parseable --long --depth=0 > should output tree containing top-level deps with descriptions 1`] = `
{CWD}/tap-testdir-ls-ls---parseable---long---depth-0:test-npm-ls@1.0.0
+{CWD}/tap-testdir-ls-ls---parseable---long---depth-0/node_modules/chai:chai@1.0.0
{CWD}/tap-testdir-ls-ls---parseable---long---depth-0/node_modules/dev-dep:dev-dep@1.0.0
-{CWD}/tap-testdir-ls-ls---parseable---long---depth-0/node_modules/lorem:lorem@1.0.0
{CWD}/tap-testdir-ls-ls---parseable---long---depth-0/node_modules/optional-dep:optional-dep@1.0.0
{CWD}/tap-testdir-ls-ls---parseable---long---depth-0/node_modules/peer-dep:peer-dep@1.0.0
{CWD}/tap-testdir-ls-ls---parseable---long---depth-0/node_modules/prod-dep:prod-dep@1.0.0
@@ -167,64 +167,64 @@ exports[`test/lib/ls.js TAP ls --parseable --long --depth=0 > should output tree
exports[`test/lib/ls.js TAP ls --parseable --long > should output tree info with descriptions 1`] = `
{CWD}/tap-testdir-ls-ls---parseable---long:test-npm-ls@1.0.0
+{CWD}/tap-testdir-ls-ls---parseable---long/node_modules/chai:chai@1.0.0
{CWD}/tap-testdir-ls-ls---parseable---long/node_modules/dev-dep:dev-dep@1.0.0
-{CWD}/tap-testdir-ls-ls---parseable---long/node_modules/lorem:lorem@1.0.0
{CWD}/tap-testdir-ls-ls---parseable---long/node_modules/optional-dep:optional-dep@1.0.0
{CWD}/tap-testdir-ls-ls---parseable---long/node_modules/peer-dep:peer-dep@1.0.0
{CWD}/tap-testdir-ls-ls---parseable---long/node_modules/prod-dep:prod-dep@1.0.0
{CWD}/tap-testdir-ls-ls---parseable---long/node_modules/foo:foo@1.0.0
-{CWD}/tap-testdir-ls-ls---parseable---long/node_modules/prod-dep/node_modules/bar:bar@2.0.0
-{CWD}/tap-testdir-ls-ls---parseable---long/node_modules/bar:bar@1.0.0
+{CWD}/tap-testdir-ls-ls---parseable---long/node_modules/prod-dep/node_modules/dog:dog@2.0.0
+{CWD}/tap-testdir-ls-ls---parseable---long/node_modules/dog:dog@1.0.0
`
exports[`test/lib/ls.js TAP ls --parseable --long missing/invalid/extraneous > should output parseable result containing EXTRANEOUS/INVALID labels 1`] = `
{CWD}/tap-testdir-ls-ls---parseable---long-missing-invalid-extraneous:test-npm-ls@1.0.0
+{CWD}/tap-testdir-ls-ls---parseable---long-missing-invalid-extraneous/node_modules/chai:chai@1.0.0:EXTRANEOUS
{CWD}/tap-testdir-ls-ls---parseable---long-missing-invalid-extraneous/node_modules/foo:foo@1.0.0:INVALID
-{CWD}/tap-testdir-ls-ls---parseable---long-missing-invalid-extraneous/node_modules/lorem:lorem@1.0.0:EXTRANEOUS
-{CWD}/tap-testdir-ls-ls---parseable---long-missing-invalid-extraneous/node_modules/bar:bar@1.0.0
+{CWD}/tap-testdir-ls-ls---parseable---long-missing-invalid-extraneous/node_modules/dog:dog@1.0.0
`
exports[`test/lib/ls.js TAP ls --parseable --long print symlink target location > should output parseable results with symlink targets 1`] = `
{CWD}/tap-testdir-ls-ls---parseable---long-print-symlink-target-location:test-npm-ls@1.0.0
+{CWD}/tap-testdir-ls-ls---parseable---long-print-symlink-target-location/node_modules/chai:chai@1.0.0
{CWD}/tap-testdir-ls-ls---parseable---long-print-symlink-target-location/node_modules/dev-dep:dev-dep@1.0.0
{CWD}/tap-testdir-ls-ls---parseable---long-print-symlink-target-location/node_modules/linked-dep:linked-dep@1.0.0:{CWD}/tap-testdir-ls-ls---parseable---long-print-symlink-target-location/linked-dep
-{CWD}/tap-testdir-ls-ls---parseable---long-print-symlink-target-location/node_modules/lorem:lorem@1.0.0
{CWD}/tap-testdir-ls-ls---parseable---long-print-symlink-target-location/node_modules/optional-dep:optional-dep@1.0.0
{CWD}/tap-testdir-ls-ls---parseable---long-print-symlink-target-location/node_modules/peer-dep:peer-dep@1.0.0
{CWD}/tap-testdir-ls-ls---parseable---long-print-symlink-target-location/node_modules/prod-dep:prod-dep@1.0.0
{CWD}/tap-testdir-ls-ls---parseable---long-print-symlink-target-location/node_modules/foo:foo@1.0.0
-{CWD}/tap-testdir-ls-ls---parseable---long-print-symlink-target-location/node_modules/prod-dep/node_modules/bar:bar@2.0.0
-{CWD}/tap-testdir-ls-ls---parseable---long-print-symlink-target-location/node_modules/bar:bar@1.0.0
+{CWD}/tap-testdir-ls-ls---parseable---long-print-symlink-target-location/node_modules/prod-dep/node_modules/dog:dog@2.0.0
+{CWD}/tap-testdir-ls-ls---parseable---long-print-symlink-target-location/node_modules/dog:dog@1.0.0
`
exports[`test/lib/ls.js TAP ls --parseable --long with extraneous deps > should output long parseable output with extraneous info 1`] = `
{CWD}/tap-testdir-ls-ls---parseable---long-with-extraneous-deps:test-npm-ls@1.0.0
+{CWD}/tap-testdir-ls-ls---parseable---long-with-extraneous-deps/node_modules/chai:chai@1.0.0:EXTRANEOUS
{CWD}/tap-testdir-ls-ls---parseable---long-with-extraneous-deps/node_modules/foo:foo@1.0.0
-{CWD}/tap-testdir-ls-ls---parseable---long-with-extraneous-deps/node_modules/lorem:lorem@1.0.0:EXTRANEOUS
-{CWD}/tap-testdir-ls-ls---parseable---long-with-extraneous-deps/node_modules/bar:bar@1.0.0
+{CWD}/tap-testdir-ls-ls---parseable---long-with-extraneous-deps/node_modules/dog:dog@1.0.0
`
exports[`test/lib/ls.js TAP ls --parseable --only=development > should output tree containing only development deps 1`] = `
{CWD}/tap-testdir-ls-ls---parseable---only-development
{CWD}/tap-testdir-ls-ls---parseable---only-development/node_modules/dev-dep
{CWD}/tap-testdir-ls-ls---parseable---only-development/node_modules/foo
-{CWD}/tap-testdir-ls-ls---parseable---only-development/node_modules/bar
+{CWD}/tap-testdir-ls-ls---parseable---only-development/node_modules/dog
`
exports[`test/lib/ls.js TAP ls --parseable --only=prod > should output tree containing only prod deps 1`] = `
{CWD}/tap-testdir-ls-ls---parseable---only-prod
-{CWD}/tap-testdir-ls-ls---parseable---only-prod/node_modules/lorem
+{CWD}/tap-testdir-ls-ls---parseable---only-prod/node_modules/chai
{CWD}/tap-testdir-ls-ls---parseable---only-prod/node_modules/optional-dep
{CWD}/tap-testdir-ls-ls---parseable---only-prod/node_modules/prod-dep
-{CWD}/tap-testdir-ls-ls---parseable---only-prod/node_modules/prod-dep/node_modules/bar
+{CWD}/tap-testdir-ls-ls---parseable---only-prod/node_modules/prod-dep/node_modules/dog
`
exports[`test/lib/ls.js TAP ls --parseable --production > should output tree containing production deps 1`] = `
{CWD}/tap-testdir-ls-ls---parseable---production
-{CWD}/tap-testdir-ls-ls---parseable---production/node_modules/lorem
+{CWD}/tap-testdir-ls-ls---parseable---production/node_modules/chai
{CWD}/tap-testdir-ls-ls---parseable---production/node_modules/optional-dep
{CWD}/tap-testdir-ls-ls---parseable---production/node_modules/prod-dep
-{CWD}/tap-testdir-ls-ls---parseable---production/node_modules/prod-dep/node_modules/bar
+{CWD}/tap-testdir-ls-ls---parseable---production/node_modules/prod-dep/node_modules/dog
`
exports[`test/lib/ls.js TAP ls --parseable cycle deps > should print tree output omitting deduped ref 1`] = `
@@ -235,8 +235,8 @@ exports[`test/lib/ls.js TAP ls --parseable cycle deps > should print tree output
exports[`test/lib/ls.js TAP ls --parseable default --depth value should be 0 > should output parseable output containing only top-level dependencies 1`] = `
{CWD}/tap-testdir-ls-ls---parseable-default---depth-value-should-be-0
+{CWD}/tap-testdir-ls-ls---parseable-default---depth-value-should-be-0/node_modules/chai
{CWD}/tap-testdir-ls-ls---parseable-default---depth-value-should-be-0/node_modules/foo
-{CWD}/tap-testdir-ls-ls---parseable-default---depth-value-should-be-0/node_modules/lorem
`
exports[`test/lib/ls.js TAP ls --parseable empty location > should print empty result 1`] = `
@@ -245,9 +245,9 @@ exports[`test/lib/ls.js TAP ls --parseable empty location > should print empty r
exports[`test/lib/ls.js TAP ls --parseable extraneous deps > should output containing problems info 1`] = `
{CWD}/tap-testdir-ls-ls---parseable-extraneous-deps
+{CWD}/tap-testdir-ls-ls---parseable-extraneous-deps/node_modules/chai
{CWD}/tap-testdir-ls-ls---parseable-extraneous-deps/node_modules/foo
-{CWD}/tap-testdir-ls-ls---parseable-extraneous-deps/node_modules/lorem
-{CWD}/tap-testdir-ls-ls---parseable-extraneous-deps/node_modules/bar
+{CWD}/tap-testdir-ls-ls---parseable-extraneous-deps/node_modules/dog
`
exports[`test/lib/ls.js TAP ls --parseable from and resolved properties > should not be printed in tree output 1`] = `
@@ -268,23 +268,23 @@ exports[`test/lib/ls.js TAP ls --parseable json read problems > should print emp
exports[`test/lib/ls.js TAP ls --parseable missing package.json > should output parseable missing name/version of top-level package 1`] = `
{CWD}/tap-testdir-ls-ls---parseable-missing-package.json
-{CWD}/tap-testdir-ls-ls---parseable-missing-package.json/node_modules/bar
+{CWD}/tap-testdir-ls-ls---parseable-missing-package.json/node_modules/chai
+{CWD}/tap-testdir-ls-ls---parseable-missing-package.json/node_modules/dog
{CWD}/tap-testdir-ls-ls---parseable-missing-package.json/node_modules/foo
-{CWD}/tap-testdir-ls-ls---parseable-missing-package.json/node_modules/lorem
`
exports[`test/lib/ls.js TAP ls --parseable missing/invalid/extraneous > should output parseable containing top-level deps and their deps only 1`] = `
{CWD}/tap-testdir-ls-ls---parseable-missing-invalid-extraneous
+{CWD}/tap-testdir-ls-ls---parseable-missing-invalid-extraneous/node_modules/chai
{CWD}/tap-testdir-ls-ls---parseable-missing-invalid-extraneous/node_modules/foo
-{CWD}/tap-testdir-ls-ls---parseable-missing-invalid-extraneous/node_modules/lorem
-{CWD}/tap-testdir-ls-ls---parseable-missing-invalid-extraneous/node_modules/bar
+{CWD}/tap-testdir-ls-ls---parseable-missing-invalid-extraneous/node_modules/dog
`
exports[`test/lib/ls.js TAP ls --parseable no args > should output parseable representation of dependencies structure 1`] = `
{CWD}/tap-testdir-ls-ls---parseable-no-args
+{CWD}/tap-testdir-ls-ls---parseable-no-args/node_modules/chai
{CWD}/tap-testdir-ls-ls---parseable-no-args/node_modules/foo
-{CWD}/tap-testdir-ls-ls---parseable-no-args/node_modules/lorem
-{CWD}/tap-testdir-ls-ls---parseable-no-args/node_modules/bar
+{CWD}/tap-testdir-ls-ls---parseable-no-args/node_modules/dog
`
exports[`test/lib/ls.js TAP ls --parseable resolved points to git ref > should output tree containing git refs 1`] = `
@@ -294,26 +294,26 @@ exports[`test/lib/ls.js TAP ls --parseable resolved points to git ref > should o
exports[`test/lib/ls.js TAP ls --parseable unmet optional dep > should output parseable with empty entry for missing optional deps 1`] = `
{CWD}/tap-testdir-ls-ls---parseable-unmet-optional-dep
+{CWD}/tap-testdir-ls-ls---parseable-unmet-optional-dep/node_modules/chai
{CWD}/tap-testdir-ls-ls---parseable-unmet-optional-dep/node_modules/dev-dep
-{CWD}/tap-testdir-ls-ls---parseable-unmet-optional-dep/node_modules/lorem
{CWD}/tap-testdir-ls-ls---parseable-unmet-optional-dep/node_modules/optional-dep
{CWD}/tap-testdir-ls-ls---parseable-unmet-optional-dep/node_modules/peer-dep
{CWD}/tap-testdir-ls-ls---parseable-unmet-optional-dep/node_modules/prod-dep
{CWD}/tap-testdir-ls-ls---parseable-unmet-optional-dep/node_modules/foo
-{CWD}/tap-testdir-ls-ls---parseable-unmet-optional-dep/node_modules/prod-dep/node_modules/bar
-{CWD}/tap-testdir-ls-ls---parseable-unmet-optional-dep/node_modules/bar
+{CWD}/tap-testdir-ls-ls---parseable-unmet-optional-dep/node_modules/prod-dep/node_modules/dog
+{CWD}/tap-testdir-ls-ls---parseable-unmet-optional-dep/node_modules/dog
`
exports[`test/lib/ls.js TAP ls --parseable unmet peer dep > should output parseable signaling missing peer dep in problems 1`] = `
{CWD}/tap-testdir-ls-ls---parseable-unmet-peer-dep
+{CWD}/tap-testdir-ls-ls---parseable-unmet-peer-dep/node_modules/chai
{CWD}/tap-testdir-ls-ls---parseable-unmet-peer-dep/node_modules/dev-dep
-{CWD}/tap-testdir-ls-ls---parseable-unmet-peer-dep/node_modules/lorem
{CWD}/tap-testdir-ls-ls---parseable-unmet-peer-dep/node_modules/optional-dep
{CWD}/tap-testdir-ls-ls---parseable-unmet-peer-dep/node_modules/peer-dep
{CWD}/tap-testdir-ls-ls---parseable-unmet-peer-dep/node_modules/prod-dep
{CWD}/tap-testdir-ls-ls---parseable-unmet-peer-dep/node_modules/foo
-{CWD}/tap-testdir-ls-ls---parseable-unmet-peer-dep/node_modules/prod-dep/node_modules/bar
-{CWD}/tap-testdir-ls-ls---parseable-unmet-peer-dep/node_modules/bar
+{CWD}/tap-testdir-ls-ls---parseable-unmet-peer-dep/node_modules/prod-dep/node_modules/dog
+{CWD}/tap-testdir-ls-ls---parseable-unmet-peer-dep/node_modules/dog
`
exports[`test/lib/ls.js TAP ls --parseable using aliases > should output tree containing aliases 1`] = `
@@ -322,11 +322,11 @@ exports[`test/lib/ls.js TAP ls --parseable using aliases > should output tree co
`
exports[`test/lib/ls.js TAP ls --parseable with filter arg > should output parseable contaning only occurrences of filtered by package 1`] = `
-{CWD}/tap-testdir-ls-ls---parseable-with-filter-arg/node_modules/lorem
+{CWD}/tap-testdir-ls-ls---parseable-with-filter-arg/node_modules/chai
`
exports[`test/lib/ls.js TAP ls --parseable with filter arg nested dep > should output parseable contaning only occurrences of filtered package 1`] = `
-{CWD}/tap-testdir-ls-ls---parseable-with-filter-arg-nested-dep/node_modules/bar
+{CWD}/tap-testdir-ls-ls---parseable-with-filter-arg-nested-dep/node_modules/dog
`
exports[`test/lib/ls.js TAP ls --parseable with missing filter arg > should output parseable output containing no dependencies info 1`] = `
@@ -334,16 +334,16 @@ exports[`test/lib/ls.js TAP ls --parseable with missing filter arg > should outp
`
exports[`test/lib/ls.js TAP ls --parseable with multiple filter args > should output parseable contaning only occurrences of multiple filtered packages and their ancestors 1`] = `
-{CWD}/tap-testdir-ls-ls---parseable-with-multiple-filter-args/node_modules/lorem
-{CWD}/tap-testdir-ls-ls---parseable-with-multiple-filter-args/node_modules/bar
+{CWD}/tap-testdir-ls-ls---parseable-with-multiple-filter-args/node_modules/chai
+{CWD}/tap-testdir-ls-ls---parseable-with-multiple-filter-args/node_modules/dog
`
exports[`test/lib/ls.js TAP ls --production > should output tree containing production deps 1`] = `
test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls---production
-+-- lorem@1.0.0
++-- chai@1.0.0
+-- optional-dep@1.0.0
\`-- prod-dep@1.0.0
- \`-- bar@2.0.0
+ \`-- dog@2.0.0
`
@@ -355,10 +355,10 @@ npm-broken-resolved-field-test@1.0.0 {CWD}/tap-testdir-ls-ls-broken-resolved-fie
exports[`test/lib/ls.js TAP ls colored output > should output tree containing color info 1`] = `
[0mtest-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-colored-output[0m
+[0m+-- chai@1.0.0 [32m[40mextraneous[49m[39m[0m
[0m+-- foo@1.0.0 [31m[40minvalid[49m[39m[0m
-[0m| \`-- bar@1.0.0[0m
-[0m+-- [31m[40mUNMET DEPENDENCY[49m[39m ipsum@^1.0.0[0m
-[0m\`-- lorem@1.0.0 [32m[40mextraneous[49m[39m[0m
+[0m| \`-- dog@1.0.0[0m
+[0m\`-- [31m[40mUNMET DEPENDENCY[49m[39m ipsum@^1.0.0[0m
[0m[0m
`
@@ -388,8 +388,8 @@ test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-deduped-missing-dep
exports[`test/lib/ls.js TAP ls default --depth value should be 0 > should output tree containing only top-level dependencies 1`] = `
test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-default---depth-value-should-be-0
-+-- foo@1.0.0
-\`-- lorem@1.0.0
++-- chai@1.0.0
+\`-- foo@1.0.0
`
@@ -401,9 +401,9 @@ exports[`test/lib/ls.js TAP ls empty location > should print empty result 1`] =
exports[`test/lib/ls.js TAP ls extraneous deps > should output containing problems info 1`] = `
test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-extraneous-deps
-+-- foo@1.0.0
-| \`-- bar@1.0.0
-\`-- lorem@1.0.0 extraneous
++-- chai@1.0.0 extraneous
+\`-- foo@1.0.0
+ \`-- dog@1.0.0
`
@@ -461,14 +461,14 @@ exports[`test/lib/ls.js TAP ls invalid deduped dep > should output tree signalin
exports[`test/lib/ls.js TAP ls invalid peer dep > should output tree signaling mismatching peer dep in problems 1`] = `
test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-invalid-peer-dep
++-- chai@1.0.0
+-- dev-dep@1.0.0
| \`-- foo@1.0.0
-| \`-- bar@1.0.0
-+-- lorem@1.0.0
+| \`-- dog@1.0.0
+-- optional-dep@1.0.0
+-- peer-dep@1.0.0 invalid
\`-- prod-dep@1.0.0
- \`-- bar@2.0.0
+ \`-- dog@2.0.0
`
@@ -494,27 +494,27 @@ filter-by-child-of-missing-dep@1.0.0 {CWD}/tap-testdir-ls-ls-loading-a-tree-cont
exports[`test/lib/ls.js TAP ls missing package.json > should output tree missing name/version of top-level package 1`] = `
{CWD}/tap-testdir-ls-ls-missing-package.json
-+-- bar@1.0.0 extraneous
-+-- foo@1.0.0 extraneous
-| \`-- bar@1.0.0 deduped
-\`-- lorem@1.0.0 extraneous
++-- chai@1.0.0 extraneous
++-- dog@1.0.0 extraneous
+\`-- foo@1.0.0 extraneous
+ \`-- dog@1.0.0 deduped
`
exports[`test/lib/ls.js TAP ls missing/invalid/extraneous > should output tree containing missing, invalid, extraneous labels 1`] = `
test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-missing-invalid-extraneous
++-- chai@1.0.0 extraneous
+-- foo@1.0.0 invalid
-| \`-- bar@1.0.0
-+-- UNMET DEPENDENCY ipsum@^1.0.0
-\`-- lorem@1.0.0 extraneous
+| \`-- dog@1.0.0
+\`-- UNMET DEPENDENCY ipsum@^1.0.0
`
exports[`test/lib/ls.js TAP ls no args > should output tree representation of dependencies structure 1`] = `
test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-no-args
-+-- foo@1.0.0
-| \`-- bar@1.0.0
-\`-- lorem@1.0.0
++-- chai@1.0.0
+\`-- foo@1.0.0
+ \`-- dog@1.0.0
`
@@ -534,15 +534,15 @@ test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-resolved-points-to-git-ref
exports[`test/lib/ls.js TAP ls unmet optional dep > should output tree with empty entry for missing optional deps 1`] = `
[0mtest-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-unmet-optional-dep[0m
+[0m+-- chai@1.0.0[0m
[0m+-- dev-dep@1.0.0[0m
[0m| \`-- foo@1.0.0[0m
-[0m| \`-- bar@1.0.0[0m
-[0m+-- lorem@1.0.0[0m
+[0m| \`-- dog@1.0.0[0m
[0m+-- [33m[40mUNMET OPTIONAL DEPENDENCY[49m[39m missing-optional-dep@^1.0.0[0m
[0m+-- optional-dep@1.0.0 [31m[40minvalid[49m[39m[0m
[0m+-- peer-dep@1.0.0[0m
[0m\`-- prod-dep@1.0.0[0m
-[0m \`-- bar@2.0.0[0m
+[0m \`-- dog@2.0.0[0m
[0m[0m
`
@@ -586,14 +586,14 @@ test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-with-dot-filter-arg
exports[`test/lib/ls.js TAP ls with filter arg > should output tree contaning only occurrences of filtered by package and colored output 1`] = `
[0mtest-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-with-filter-arg[0m
-[0m\`-- [33m[40mlorem@1.0.0[49m[39m[0m
+[0m\`-- [33m[40mchai@1.0.0[49m[39m[0m
[0m[0m
`
exports[`test/lib/ls.js TAP ls with filter arg nested dep > should output tree contaning only occurrences of filtered package and its ancestors 1`] = `
test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-with-filter-arg-nested-dep
\`-- foo@1.0.0
- \`-- bar@1.0.0
+ \`-- dog@1.0.0
`
@@ -605,9 +605,9 @@ test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-with-missing-filter-arg
exports[`test/lib/ls.js TAP ls with multiple filter args > should output tree contaning only occurrences of multiple filtered packages and their ancestors 1`] = `
test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-with-multiple-filter-args
-+-- foo@1.0.0
-| \`-- bar@1.0.0
-\`-- lorem@1.0.0
++-- chai@1.0.0
+\`-- foo@1.0.0
+ \`-- dog@1.0.0
`
diff --git a/deps/npm/tap-snapshots/test/lib/outdated.js.test.cjs b/deps/npm/tap-snapshots/test/lib/outdated.js.test.cjs
index e57d7110b227..fdb25e90eb8c 100644
--- a/deps/npm/tap-snapshots/test/lib/outdated.js.test.cjs
+++ b/deps/npm/tap-snapshots/test/lib/outdated.js.test.cjs
@@ -7,38 +7,38 @@
'use strict'
exports[`test/lib/outdated.js TAP should display outdated deps outdated --all > must match snapshot 1`] = `
-Package Current Wanted Latest Location Depended by
-alpha 1.0.0 1.0.1 1.0.1 node_modules/alpha tap-testdir-outdated-should-display-outdated-deps
-beta 1.0.0 1.0.1 1.0.1 node_modules/beta tap-testdir-outdated-should-display-outdated-deps
-gamma 1.0.1 1.0.1 2.0.0 node_modules/gamma tap-testdir-outdated-should-display-outdated-deps
-theta MISSING 1.0.1 1.0.1 - tap-testdir-outdated-should-display-outdated-deps
+Package Current Wanted Latest Location Depended by
+cat 1.0.0 1.0.1 1.0.1 node_modules/cat tap-testdir-outdated-should-display-outdated-deps
+chai 1.0.0 1.0.1 1.0.1 node_modules/chai tap-testdir-outdated-should-display-outdated-deps
+dog 1.0.1 1.0.1 2.0.0 node_modules/dog tap-testdir-outdated-should-display-outdated-deps
+theta MISSING 1.0.1 1.0.1 - tap-testdir-outdated-should-display-outdated-deps
`
exports[`test/lib/outdated.js TAP should display outdated deps outdated --json --long > must match snapshot 1`] = `
{
- "alpha": {
+ "cat": {
"current": "1.0.0",
"wanted": "1.0.1",
"latest": "1.0.1",
"dependent": "tap-testdir-outdated-should-display-outdated-deps",
- "location": "{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/alpha",
+ "location": "{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/cat",
"type": "dependencies"
},
- "beta": {
+ "chai": {
"current": "1.0.0",
"wanted": "1.0.1",
"latest": "1.0.1",
"dependent": "tap-testdir-outdated-should-display-outdated-deps",
- "location": "{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/beta",
+ "location": "{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/chai",
"type": "peerDependencies"
},
- "gamma": {
+ "dog": {
"current": "1.0.1",
"wanted": "1.0.1",
"latest": "2.0.0",
"dependent": "tap-testdir-outdated-should-display-outdated-deps",
- "location": "{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/gamma",
+ "location": "{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/dog",
"type": "dependencies"
},
"theta": {
@@ -53,26 +53,26 @@ exports[`test/lib/outdated.js TAP should display outdated deps outdated --json -
exports[`test/lib/outdated.js TAP should display outdated deps outdated --json > must match snapshot 1`] = `
{
- "alpha": {
+ "cat": {
"current": "1.0.0",
"wanted": "1.0.1",
"latest": "1.0.1",
"dependent": "tap-testdir-outdated-should-display-outdated-deps",
- "location": "{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/alpha"
+ "location": "{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/cat"
},
- "beta": {
+ "chai": {
"current": "1.0.0",
"wanted": "1.0.1",
"latest": "1.0.1",
"dependent": "tap-testdir-outdated-should-display-outdated-deps",
- "location": "{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/beta"
+ "location": "{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/chai"
},
- "gamma": {
+ "dog": {
"current": "1.0.1",
"wanted": "1.0.1",
"latest": "2.0.0",
"dependent": "tap-testdir-outdated-should-display-outdated-deps",
- "location": "{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/gamma"
+ "location": "{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/dog"
},
"theta": {
"wanted": "1.0.1",
@@ -84,71 +84,71 @@ exports[`test/lib/outdated.js TAP should display outdated deps outdated --json >
exports[`test/lib/outdated.js TAP should display outdated deps outdated --long > must match snapshot 1`] = `
-Package Current Wanted Latest Location Depended by Package Type Homepage
-alpha 1.0.0 1.0.1 1.0.1 node_modules/alpha tap-testdir-outdated-should-display-outdated-deps dependencies
-beta 1.0.0 1.0.1 1.0.1 node_modules/beta tap-testdir-outdated-should-display-outdated-deps peerDependencies
-gamma 1.0.1 1.0.1 2.0.0 node_modules/gamma tap-testdir-outdated-should-display-outdated-deps dependencies
-theta MISSING 1.0.1 1.0.1 - tap-testdir-outdated-should-display-outdated-deps dependencies
+Package Current Wanted Latest Location Depended by Package Type Homepage
+cat 1.0.0 1.0.1 1.0.1 node_modules/cat tap-testdir-outdated-should-display-outdated-deps dependencies
+chai 1.0.0 1.0.1 1.0.1 node_modules/chai tap-testdir-outdated-should-display-outdated-deps peerDependencies
+dog 1.0.1 1.0.1 2.0.0 node_modules/dog tap-testdir-outdated-should-display-outdated-deps dependencies
+theta MISSING 1.0.1 1.0.1 - tap-testdir-outdated-should-display-outdated-deps dependencies
`
exports[`test/lib/outdated.js TAP should display outdated deps outdated --omit=dev --omit=peer > must match snapshot 1`] = `
-[4mPackage[24m [4mCurrent[24m [4mWanted[24m [4mLatest[24m [4mLocation[24m [4mDepended by[24m
-[31malpha[39m 1.0.0 [32m1.0.1[39m [35m1.0.1[39m node_modules/alpha tap-testdir-outdated-should-display-outdated-deps
-[33mgamma[39m 1.0.1 [32m1.0.1[39m [35m2.0.0[39m node_modules/gamma tap-testdir-outdated-should-display-outdated-deps
-[31mtheta[39m MISSING [32m1.0.1[39m [35m1.0.1[39m - tap-testdir-outdated-should-display-outdated-deps
+[4mPackage[24m [4mCurrent[24m [4mWanted[24m [4mLatest[24m [4mLocation[24m [4mDepended by[24m
+[31mcat[39m 1.0.0 [32m1.0.1[39m [35m1.0.1[39m node_modules/cat tap-testdir-outdated-should-display-outdated-deps
+[33mdog[39m 1.0.1 [32m1.0.1[39m [35m2.0.0[39m node_modules/dog tap-testdir-outdated-should-display-outdated-deps
+[31mtheta[39m MISSING [32m1.0.1[39m [35m1.0.1[39m - tap-testdir-outdated-should-display-outdated-deps
`
exports[`test/lib/outdated.js TAP should display outdated deps outdated --omit=dev > must match snapshot 1`] = `
-[4mPackage[24m [4mCurrent[24m [4mWanted[24m [4mLatest[24m [4mLocation[24m [4mDepended by[24m
-[31malpha[39m 1.0.0 [32m1.0.1[39m [35m1.0.1[39m node_modules/alpha tap-testdir-outdated-should-display-outdated-deps
-[31mbeta[39m 1.0.0 [32m1.0.1[39m [35m1.0.1[39m node_modules/beta tap-testdir-outdated-should-display-outdated-deps
-[33mgamma[39m 1.0.1 [32m1.0.1[39m [35m2.0.0[39m node_modules/gamma tap-testdir-outdated-should-display-outdated-deps
-[31mtheta[39m MISSING [32m1.0.1[39m [35m1.0.1[39m - tap-testdir-outdated-should-display-outdated-deps
+[4mPackage[24m [4mCurrent[24m [4mWanted[24m [4mLatest[24m [4mLocation[24m [4mDepended by[24m
+[31mcat[39m 1.0.0 [32m1.0.1[39m [35m1.0.1[39m node_modules/cat tap-testdir-outdated-should-display-outdated-deps
+[31mchai[39m 1.0.0 [32m1.0.1[39m [35m1.0.1[39m node_modules/chai tap-testdir-outdated-should-display-outdated-deps
+[33mdog[39m 1.0.1 [32m1.0.1[39m [35m2.0.0[39m node_modules/dog tap-testdir-outdated-should-display-outdated-deps
+[31mtheta[39m MISSING [32m1.0.1[39m [35m1.0.1[39m - tap-testdir-outdated-should-display-outdated-deps
`
exports[`test/lib/outdated.js TAP should display outdated deps outdated --omit=prod > must match snapshot 1`] = `
-[4mPackage[24m [4mCurrent[24m [4mWanted[24m [4mLatest[24m [4mLocation[24m [4mDepended by[24m
-[31malpha[39m 1.0.0 [32m1.0.1[39m [35m1.0.1[39m node_modules/alpha tap-testdir-outdated-should-display-outdated-deps
-[31mbeta[39m 1.0.0 [32m1.0.1[39m [35m1.0.1[39m node_modules/beta tap-testdir-outdated-should-display-outdated-deps
-[33mgamma[39m 1.0.1 [32m1.0.1[39m [35m2.0.0[39m node_modules/gamma tap-testdir-outdated-should-display-outdated-deps
+[4mPackage[24m [4mCurrent[24m [4mWanted[24m [4mLatest[24m [4mLocation[24m [4mDepended by[24m
+[31mcat[39m 1.0.0 [32m1.0.1[39m [35m1.0.1[39m node_modules/cat tap-testdir-outdated-should-display-outdated-deps
+[31mchai[39m 1.0.0 [32m1.0.1[39m [35m1.0.1[39m node_modules/chai tap-testdir-outdated-should-display-outdated-deps
+[33mdog[39m 1.0.1 [32m1.0.1[39m [35m2.0.0[39m node_modules/dog tap-testdir-outdated-should-display-outdated-deps
`
exports[`test/lib/outdated.js TAP should display outdated deps outdated --parseable --long > must match snapshot 1`] = `
-{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/alpha:alpha@1.0.1:alpha@1.0.0:alpha@1.0.1:tap-testdir-outdated-should-display-outdated-deps:dependencies:
-{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/beta:beta@1.0.1:beta@1.0.0:beta@1.0.1:tap-testdir-outdated-should-display-outdated-deps:peerDependencies:
-{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/gamma:gamma@1.0.1:gamma@1.0.1:gamma@2.0.0:tap-testdir-outdated-should-display-outdated-deps:dependencies:
+{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/cat:cat@1.0.1:cat@1.0.0:cat@1.0.1:tap-testdir-outdated-should-display-outdated-deps:dependencies:
+{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/chai:chai@1.0.1:chai@1.0.0:chai@1.0.1:tap-testdir-outdated-should-display-outdated-deps:peerDependencies:
+{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/dog:dog@1.0.1:dog@1.0.1:dog@2.0.0:tap-testdir-outdated-should-display-outdated-deps:dependencies:
:theta@1.0.1:MISSING:theta@1.0.1:tap-testdir-outdated-should-display-outdated-deps:dependencies:
`
exports[`test/lib/outdated.js TAP should display outdated deps outdated --parseable > must match snapshot 1`] = `
-{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/alpha:alpha@1.0.1:alpha@1.0.0:alpha@1.0.1:tap-testdir-outdated-should-display-outdated-deps
-{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/beta:beta@1.0.1:beta@1.0.0:beta@1.0.1:tap-testdir-outdated-should-display-outdated-deps
-{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/gamma:gamma@1.0.1:gamma@1.0.1:gamma@2.0.0:tap-testdir-outdated-should-display-outdated-deps
+{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/cat:cat@1.0.1:cat@1.0.0:cat@1.0.1:tap-testdir-outdated-should-display-outdated-deps
+{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/chai:chai@1.0.1:chai@1.0.0:chai@1.0.1:tap-testdir-outdated-should-display-outdated-deps
+{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/dog:dog@1.0.1:dog@1.0.1:dog@2.0.0:tap-testdir-outdated-should-display-outdated-deps
:theta@1.0.1:MISSING:theta@1.0.1:tap-testdir-outdated-should-display-outdated-deps
`
exports[`test/lib/outdated.js TAP should display outdated deps outdated > must match snapshot 1`] = `
-[4mPackage[24m [4mCurrent[24m [4mWanted[24m [4mLatest[24m [4mLocation[24m [4mDepended by[24m
-[31malpha[39m 1.0.0 [32m1.0.1[39m [35m1.0.1[39m node_modules/alpha tap-testdir-outdated-should-display-outdated-deps
-[31mbeta[39m 1.0.0 [32m1.0.1[39m [35m1.0.1[39m node_modules/beta tap-testdir-outdated-should-display-outdated-deps
-[33mgamma[39m 1.0.1 [32m1.0.1[39m [35m2.0.0[39m node_modules/gamma tap-testdir-outdated-should-display-outdated-deps
-[31mtheta[39m MISSING [32m1.0.1[39m [35m1.0.1[39m - tap-testdir-outdated-should-display-outdated-deps
+[4mPackage[24m [4mCurrent[24m [4mWanted[24m [4mLatest[24m [4mLocation[24m [4mDepended by[24m
+[31mcat[39m 1.0.0 [32m1.0.1[39m [35m1.0.1[39m node_modules/cat tap-testdir-outdated-should-display-outdated-deps
+[31mchai[39m 1.0.0 [32m1.0.1[39m [35m1.0.1[39m node_modules/chai tap-testdir-outdated-should-display-outdated-deps
+[33mdog[39m 1.0.1 [32m1.0.1[39m [35m2.0.0[39m node_modules/dog tap-testdir-outdated-should-display-outdated-deps
+[31mtheta[39m MISSING [32m1.0.1[39m [35m1.0.1[39m - tap-testdir-outdated-should-display-outdated-deps
`
exports[`test/lib/outdated.js TAP should display outdated deps outdated global > must match snapshot 1`] = `
-Package Current Wanted Latest Location Depended by
-alpha 1.0.0 1.0.1 1.0.1 node_modules/alpha global
+Package Current Wanted Latest Location Depended by
+cat 1.0.0 1.0.1 1.0.1 node_modules/cat global
`
exports[`test/lib/outdated.js TAP should display outdated deps outdated specific dep > must match snapshot 1`] = `
-Package Current Wanted Latest Location Depended by
-alpha 1.0.0 1.0.1 1.0.1 node_modules/alpha tap-testdir-outdated-should-display-outdated-deps
+Package Current Wanted Latest Location Depended by
+cat 1.0.0 1.0.1 1.0.1 node_modules/cat tap-testdir-outdated-should-display-outdated-deps
`
diff --git a/deps/npm/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs b/deps/npm/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs
index d6761ea30c74..53aef86f79d1 100644
--- a/deps/npm/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs
+++ b/deps/npm/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs
@@ -1132,7 +1132,8 @@ Show short usage output about the command specified.
#### \`user-agent\`
-* Default: "npm/{npm-version} node/{node-version} {platform} {arch} {ci}"
+* Default: "npm/{npm-version} node/{node-version} {platform} {arch}
+ workspaces/{workspaces} {ci}"
* Type: String
Sets the User-Agent request header. The following fields are replaced with
@@ -1142,6 +1143,8 @@ their actual counterparts:
* \`{node-version}\` - The Node.js version in use
* \`{platform}\` - The value of \`process.platform\`
* \`{arch}\` - The value of \`process.arch\`
+* \`{workspaces}\` - Set to \`true\` if the \`workspaces\` or \`workspace\` options
+ are set.
* \`{ci}\` - The value of the \`ci-name\` config, if set, prefixed with \`ci/\`, or
an empty string if \`ci-name\` is empty.
diff --git a/deps/npm/tap-snapshots/test/lib/utils/tar.js.test.cjs b/deps/npm/tap-snapshots/test/lib/utils/tar.js.test.cjs
index e117b38def9b..af0b1454b262 100644
--- a/deps/npm/tap-snapshots/test/lib/utils/tar.js.test.cjs
+++ b/deps/npm/tap-snapshots/test/lib/utils/tar.js.test.cjs
@@ -11,6 +11,9 @@ exports[`test/lib/utils/tar.js TAP should log tarball contents > must match snap
package: my-cool-pkg@1.0.0
=== Tarball Contents ===
+4B cat
+4B chai
+4B dog
97B package.json
=== Bundled Dependencies ===
@@ -20,14 +23,14 @@ bundle-dep
name: my-cool-pkg
version: 1.0.0
filename: my-cool-pkg-1.0.0.tgz
-package size: 216 B
-unpacked size: 101 B
-shasum: a604258e06adecec0b18f48e901c5802f19f7dab
-integrity: sha512-fnN6NmI8DerTt[...]6rH17jx7OIFig==
+package size: 274 B
+unpacked size: 113 B
+shasum: cd0dfccff77dff944eb761854bc0b0497d974f67
+integrity: sha512-qeFip1jH05vkW[...]zHSdMdPpYogMA==
bundled deps: 1
bundled files: 0
-own files: 2
-total files: 2
+own files: 5
+total files: 5
`
diff --git a/deps/npm/tap-snapshots/test/lib/view.js.test.cjs b/deps/npm/tap-snapshots/test/lib/view.js.test.cjs
index 1cdf356356af..9aafe50e4189 100644
--- a/deps/npm/tap-snapshots/test/lib/view.js.test.cjs
+++ b/deps/npm/tap-snapshots/test/lib/view.js.test.cjs
@@ -80,7 +80,7 @@ dist
.unpackedSize:[33m1[39m B
dist-tags:
-
+[1m[32mlatest[39m[22m: 1.0.0
published [33ma year ago[39m
`
@@ -97,18 +97,50 @@ dist
.unpackedSize:[33m1[39m B
dist-tags:
-
+[1m[32mlatest[39m[22m: 1.0.0
published [33ma year ago[39m
`
+exports[`test/lib/view.js TAP should log package info package from git > must match snapshot 1`] = `
+
+
+[4m[1m[32mgreen[39m@[32m1.0.0[39m[22m[24m | [32mACME[39m | deps: [36m2[39m | versions: [33m2[39m
+green is a very important color
+
+[1m[31mDEPRECATED[39m[22m!! - true
+
+keywords:[33mcolors[39m, [33mgreen[39m, [33mcrayola[39m
+
+bin:[33mgreen[39m
+
+dist
+.tarball:[36mhttp://hm.green.com/1.0.0.tgz[39m
+.shasum:[33m123[39m
+.integrity:[33m---[39m
+.unpackedSize:[33m1[39m B
+
+dependencies:
+[33mred[39m: 1.0.0
+[33myellow[39m: 1.0.0
+
+maintainers:
+-[33mclaudia[39m <[36mc@yellow.com[39m>
+-[33misaacs[39m <[36mi@yellow.com[39m>
+
+dist-tags:
+[1m[32mlatest[39m[22m: 1.0.0
+`
+
exports[`test/lib/view.js TAP should log package info package with --json and semver range > must match snapshot 1`] = `
[
{
"_npmUser": "claudia ",
"name": "cyan",
- "dist-tags": {},
+ "dist-tags": {
+ "latest": "1.0.0"
+ },
"versions": [
"1.0.0",
"1.0.1"
@@ -125,7 +157,9 @@ exports[`test/lib/view.js TAP should log package info package with --json and se
{
"_npmUser": "claudia ",
"name": "cyan",
- "dist-tags": {},
+ "dist-tags": {
+ "latest": "1.0.0"
+ },
"versions": [
"1.0.0",
"1.0.1"
@@ -249,7 +283,7 @@ dist
.unpackedSize:[33m1[39m B
dist-tags:
-
+[1m[32mlatest[39m[22m: 1.0.0
published by [33mclaudia[39m <[36mclaudia@cyan.com[39m>
`
@@ -266,7 +300,7 @@ dist
.unpackedSize:[33m1[39m B
dist-tags:
-
+[1m[32mlatest[39m[22m: 1.0.0
published [33ma year ago[39m
`
diff --git a/deps/npm/test/fixtures/mock-npm.js b/deps/npm/test/fixtures/mock-npm.js
index 01f482bde291..aa8d44020ee3 100644
--- a/deps/npm/test/fixtures/mock-npm.js
+++ b/deps/npm/test/fixtures/mock-npm.js
@@ -2,6 +2,8 @@
// npm.config You still need a separate flatOptions but this is the first step
// to eventually just using npm itself
+const realConfig = require('../../lib/utils/config')
+
const mockLog = {
clearProgress: () => {},
disableProgress: () => {},
@@ -25,10 +27,10 @@ const mockNpm = (base = {}) => {
config: {
// for now just set `find` to what config.find should return
// this works cause `find` is not an existing config entry
- find: (k) => config[k],
- get: (k) => config[k],
+ find: (k) => ({...realConfig.defaults, ...config})[k],
+ get: (k) => ({...realConfig.defaults, ...config})[k],
set: (k, v) => config[k] = v,
- list: [config]
+ list: [{ ...realConfig.defaults, ...config}]
},
}
}
diff --git a/deps/npm/test/lib/cache.js b/deps/npm/test/lib/cache.js
index bbebae8894ba..bad0ede89e10 100644
--- a/deps/npm/test/lib/cache.js
+++ b/deps/npm/test/lib/cache.js
@@ -134,20 +134,21 @@ t.test('cache add pkg only', t => {
})
})
-t.test('cache add pkg w/ spec modifier', t => {
+t.test('cache add multiple pkgs', t => {
t.teardown(() => {
logOutput = []
tarballStreamSpec = ''
tarballStreamOpts = {}
})
- cache.exec(['add', 'mypkg', 'latest'], err => {
+ cache.exec(['add', 'mypkg', 'anotherpkg'], err => {
t.error(err)
t.strictSame(logOutput, [
- ['silly', 'cache add', 'args', ['mypkg', 'latest']],
- ['silly', 'cache add', 'spec', 'mypkg@latest'],
+ ['silly', 'cache add', 'args', ['mypkg', 'anotherpkg']],
+ ['silly', 'cache add', 'spec', 'mypkg'],
+ ['silly', 'cache add', 'spec', 'anotherpkg'],
], 'logs correctly')
- t.equal(tarballStreamSpec, 'mypkg@latest', 'passes the correct spec to pacote')
+ t.equal(tarballStreamSpec, 'anotherpkg', 'passes the correct spec to pacote')
t.same(tarballStreamOpts, npm.flatOptions, 'passes the correct options to pacote')
t.end()
})
diff --git a/deps/npm/test/lib/config.js b/deps/npm/test/lib/config.js
index 155ad0bcfb1b..6c04293137af 100644
--- a/deps/npm/test/lib/config.js
+++ b/deps/npm/test/lib/config.js
@@ -49,6 +49,9 @@ const cliConfig = {
json: false,
long: false,
global: false,
+ cat: true,
+ chai: true,
+ dog: true,
}
const npm = {
@@ -197,6 +200,9 @@ t.test('config list --json', t => {
json: true,
long: false,
global: false,
+ cat: true,
+ chai: true,
+ dog: true,
},
'should list configs usin json'
)
diff --git a/deps/npm/test/lib/dist-tag.js b/deps/npm/test/lib/dist-tag.js
index 701bdc6e48c3..6bc17168cdce 100644
--- a/deps/npm/test/lib/dist-tag.js
+++ b/deps/npm/test/lib/dist-tag.js
@@ -68,10 +68,9 @@ const DistTag = t.mock('../../lib/dist-tag.js', {
},
})
+const config = {}
const npm = mockNpm({
- config: {
- global: false,
- },
+ config,
output: msg => {
result = result ? [result, msg].join('\n') : msg
},
@@ -349,6 +348,10 @@ t.test('add using valid semver range as name', (t) => {
t.test('add missing args', (t) => {
npm.prefix = t.testdir({})
+ config.tag = ''
+ t.teardown(() => {
+ delete config.tag
+ })
distTag.exec(['add', '@scoped/another@7.7.7'], (err) => {
t.matchSnapshot(err, 'should exit usage error message')
t.end()
diff --git a/deps/npm/test/lib/exec.js b/deps/npm/test/lib/exec.js
index 5ecc73274876..33e30e24f84e 100644
--- a/deps/npm/test/lib/exec.js
+++ b/deps/npm/test/lib/exec.js
@@ -121,11 +121,15 @@ t.afterEach(() => {
t.test('npx foo, bin already exists locally', t => {
const path = t.testdir({
- foo: 'just some file',
+ node_modules: {
+ '.bin': {
+ foo: 'just some file',
+ },
+ },
})
PROGRESS_IGNORED = true
- npm.localBin = path
+ npm.localBin = resolve(path, 'node_modules', '.bin')
exec.exec(['foo', 'one arg', 'two arg'], er => {
t.error(er, 'npm exec')
@@ -137,7 +141,7 @@ t.test('npx foo, bin already exists locally', t => {
stdioString: true,
event: 'npx',
env: {
- PATH: [path, ...PATH].join(delimiter),
+ PATH: [npm.localBin, ...PATH].join(delimiter),
},
stdio: 'inherit',
}])
@@ -147,11 +151,15 @@ t.test('npx foo, bin already exists locally', t => {
t.test('npx foo, bin already exists globally', t => {
const path = t.testdir({
- foo: 'just some file',
+ node_modules: {
+ '.bin': {
+ foo: 'just some file',
+ },
+ },
})
PROGRESS_IGNORED = true
- npm.globalBin = path
+ npm.globalBin = resolve(path, 'node_modules', '.bin')
exec.exec(['foo', 'one arg', 'two arg'], er => {
t.error(er, 'npm exec')
@@ -163,7 +171,7 @@ t.test('npx foo, bin already exists globally', t => {
stdioString: true,
event: 'npx',
env: {
- PATH: [path, ...PATH].join(delimiter),
+ PATH: [npm.globalBin, ...PATH].join(delimiter),
},
stdio: 'inherit',
}])
@@ -593,7 +601,7 @@ t.test('run command with 2 packages, need install, verify sort', t => {
for (const packages of cases) {
t.test(packages.join(', '), t => {
config.package = packages
- const add = packages.map(p => `${p}@`).sort((a, b) => a.localeCompare(b))
+ const add = packages.map(p => `${p}@`).sort((a, b) => a.localeCompare(b, 'en'))
const path = t.testdir()
const installDir = resolve('cache-dir/_npx/07de77790e5f40f2')
npm.localPrefix = path
@@ -748,7 +756,7 @@ t.test('prompt when installs are needed if not already present and shell is a TT
config.package = packages
config.yes = undefined
- const add = packages.map(p => `${p}@`).sort((a, b) => a.localeCompare(b))
+ const add = packages.map(p => `${p}@`).sort((a, b) => a.localeCompare(b, 'en'))
const path = t.testdir()
const installDir = resolve('cache-dir/_npx/07de77790e5f40f2')
npm.localPrefix = path
@@ -817,7 +825,7 @@ t.test('skip prompt when installs are needed if not already present and shell is
config.package = packages
config.yes = undefined
- const add = packages.map(p => `${p}@`).sort((a, b) => a.localeCompare(b))
+ const add = packages.map(p => `${p}@`).sort((a, b) => a.localeCompare(b, 'en'))
const path = t.testdir()
const installDir = resolve('cache-dir/_npx/07de77790e5f40f2')
npm.localPrefix = path
@@ -884,7 +892,7 @@ t.test('skip prompt when installs are needed if not already present and shell is
config.package = packages
config.yes = undefined
- const add = packages.map(p => `${p}@`).sort((a, b) => a.localeCompare(b))
+ const add = packages.map(p => `${p}@`).sort((a, b) => a.localeCompare(b, 'en'))
const path = t.testdir()
const installDir = resolve('cache-dir/_npx/f7fbba6e0636f890')
npm.localPrefix = path
diff --git a/deps/npm/test/lib/link.js b/deps/npm/test/lib/link.js
index 34c533fb72cd..d3e66185280a 100644
--- a/deps/npm/test/lib/link.js
+++ b/deps/npm/test/lib/link.js
@@ -27,7 +27,7 @@ const printLinks = async (opts) => {
const arb = new Arborist(opts)
const tree = await arb.loadActual()
const linkedItems = [...tree.inventory.values()]
- .sort((a, b) => a.pkgid.localeCompare(b.pkgid))
+ .sort((a, b) => a.pkgid.localeCompare(b.pkgid, 'en'))
for (const item of linkedItems) {
if (item.target)
res += `${item.path} -> ${item.target.path}\n`
diff --git a/deps/npm/test/lib/load-all-commands.js b/deps/npm/test/lib/load-all-commands.js
index 8267cd5437ec..935019756e28 100644
--- a/deps/npm/test/lib/load-all-commands.js
+++ b/deps/npm/test/lib/load-all-commands.js
@@ -15,7 +15,7 @@ t.test('load each command', t => {
npm.load((er) => {
t.notOk(er)
npm.config.set('usage', true)
- for (const cmd of cmdList.sort((a, b) => a.localeCompare(b))) {
+ for (const cmd of cmdList.sort((a, b) => a.localeCompare(b, 'en'))) {
t.test(cmd, t => {
const impl = npm.commands[cmd]
if (impl.completion)
diff --git a/deps/npm/test/lib/ls.js b/deps/npm/test/lib/ls.js
index 6eeaf0ad671b..276a06180f65 100644
--- a/deps/npm/test/lib/ls.js
+++ b/deps/npm/test/lib/ls.js
@@ -21,19 +21,19 @@ const simpleNmFixture = {
name: 'foo',
version: '1.0.0',
dependencies: {
- bar: '^1.0.0',
+ dog: '^1.0.0',
},
}),
},
- bar: {
+ dog: {
'package.json': JSON.stringify({
- name: 'bar',
+ name: 'dog',
version: '1.0.0',
}),
},
- lorem: {
+ chai: {
'package.json': JSON.stringify({
- name: 'lorem',
+ name: 'chai',
version: '1.0.0',
}),
},
@@ -58,13 +58,13 @@ const diffDepTypesNmFixture = {
description: 'A PROD dep kind of dep',
version: '1.0.0',
dependencies: {
- bar: '^2.0.0',
+ dog: '^2.0.0',
},
}),
node_modules: {
- bar: {
+ dog: {
'package.json': JSON.stringify({
- name: 'bar',
+ name: 'dog',
description: 'A dep that bars',
version: '2.0.0',
}),
@@ -132,7 +132,7 @@ t.test('ls', (t) => {
version: '1.0.0',
dependencies: {
foo: '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
}),
...simpleNmFixture,
@@ -181,12 +181,12 @@ t.test('ls', (t) => {
version: '1.0.0',
dependencies: {
foo: '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
}),
...simpleNmFixture,
})
- ls.exec(['lorem'], (err) => {
+ ls.exec(['chai'], (err) => {
t.error(err, 'npm ls')
t.matchSnapshot(redactCwd(result), 'should output tree contaning only occurrences of filtered by package and colored output')
npm.color = false
@@ -224,12 +224,12 @@ t.test('ls', (t) => {
version: '1.0.0',
dependencies: {
foo: '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
}),
...simpleNmFixture,
})
- ls.exec(['bar'], (err) => {
+ ls.exec(['dog'], (err) => {
t.error(err, 'npm ls')
t.matchSnapshot(redactCwd(result), 'should output tree contaning only occurrences of filtered package and its ancestors')
t.end()
@@ -243,7 +243,7 @@ t.test('ls', (t) => {
version: '1.0.0',
dependencies: {
foo: '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
ipsum: '^1.0.0',
},
}),
@@ -257,7 +257,7 @@ t.test('ls', (t) => {
},
},
})
- ls.exec(['bar@*', 'lorem@1.0.0'], (err) => {
+ ls.exec(['dog@*', 'chai@1.0.0'], (err) => {
t.error(err, 'npm ls')
t.matchSnapshot(redactCwd(result), 'should output tree contaning only occurrences of multiple filtered packages and their ancestors')
t.end()
@@ -271,7 +271,7 @@ t.test('ls', (t) => {
version: '1.0.0',
dependencies: {
foo: '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
}),
...simpleNmFixture,
@@ -298,7 +298,7 @@ t.test('ls', (t) => {
version: '1.0.0',
dependencies: {
foo: '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
}),
...simpleNmFixture,
@@ -321,7 +321,7 @@ t.test('ls', (t) => {
version: '1.0.0',
dependencies: {
foo: '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
}),
...simpleNmFixture,
@@ -412,9 +412,9 @@ t.test('ls', (t) => {
t.equal(err.code, 'ELSPROBLEMS', 'should have error code')
t.equal(
redactCwd(err.message).replace(/\r\n/g, '\n'),
+ 'extraneous: chai@1.0.0 {CWD}/tap-testdir-ls-ls-missing-invalid-extraneous/node_modules/chai\n' +
'invalid: foo@1.0.0 {CWD}/tap-testdir-ls-ls-missing-invalid-extraneous/node_modules/foo\n' +
- 'missing: ipsum@^1.0.0, required by test-npm-ls@1.0.0\n' +
- 'extraneous: lorem@1.0.0 {CWD}/tap-testdir-ls-ls-missing-invalid-extraneous/node_modules/lorem',
+ 'missing: ipsum@^1.0.0, required by test-npm-ls@1.0.0',
'should log missing/invalid/extraneous errors'
)
t.matchSnapshot(redactCwd(result), 'should output tree containing missing, invalid, extraneous labels')
@@ -451,7 +451,7 @@ t.test('ls', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
devDependencies: {
'dev-dep': '^1.0.0',
@@ -480,7 +480,7 @@ t.test('ls', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
devDependencies: {
'dev-dep': '^1.0.0',
@@ -509,7 +509,7 @@ t.test('ls', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
'linked-dep': '^1.0.0',
},
devDependencies: {
@@ -584,7 +584,7 @@ t.test('ls', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
devDependencies: {
'dev-dep': '^1.0.0',
@@ -613,7 +613,7 @@ t.test('ls', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
devDependencies: {
'dev-dep': '^1.0.0',
@@ -642,7 +642,7 @@ t.test('ls', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
devDependencies: {
'dev-dep': '^1.0.0',
@@ -673,7 +673,7 @@ t.test('ls', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
devDependencies: {
'dev-dep': '^1.0.0',
@@ -723,7 +723,7 @@ t.test('ls', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
devDependencies: {
'dev-dep': '^1.0.0',
@@ -835,7 +835,7 @@ t.test('ls', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
devDependencies: {
'dev-dep': '^1.0.0',
@@ -1243,7 +1243,7 @@ t.test('ls', (t) => {
dependencies: {
a: {
version: '1.0.1',
- resolved: 'foo@bar://b8f3a2fc0c3bb8ffd8b0d0072cc6b5a3667e963c',
+ resolved: 'foo@dog://b8f3a2fc0c3bb8ffd8b0d0072cc6b5a3667e963c',
integrity: 'sha512-8AN9lNCcBt5Xeje7fMEEpp5K3rgcAzIpTtAjYb/YMUYu8SbIVF6wz0WqACDVKvpQOUcSfNHZQNLNmue0QSwXOQ==',
},
},
@@ -1544,7 +1544,7 @@ t.test('ls --parseable', (t) => {
version: '1.0.0',
dependencies: {
foo: '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
}),
...simpleNmFixture,
@@ -1592,12 +1592,12 @@ t.test('ls --parseable', (t) => {
version: '1.0.0',
dependencies: {
foo: '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
}),
...simpleNmFixture,
})
- ls.exec(['lorem'], (err) => {
+ ls.exec(['chai'], (err) => {
t.error(err, 'npm ls')
t.matchSnapshot(redactCwd(result), 'should output parseable contaning only occurrences of filtered by package')
t.end()
@@ -1611,12 +1611,12 @@ t.test('ls --parseable', (t) => {
version: '1.0.0',
dependencies: {
foo: '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
}),
...simpleNmFixture,
})
- ls.exec(['bar'], (err) => {
+ ls.exec(['dog'], (err) => {
t.error(err, 'npm ls')
t.matchSnapshot(redactCwd(result), 'should output parseable contaning only occurrences of filtered package')
t.end()
@@ -1630,7 +1630,7 @@ t.test('ls --parseable', (t) => {
version: '1.0.0',
dependencies: {
foo: '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
ipsum: '^1.0.0',
},
}),
@@ -1644,7 +1644,7 @@ t.test('ls --parseable', (t) => {
},
},
})
- ls.exec(['bar@*', 'lorem@1.0.0'], (err) => {
+ ls.exec(['dog@*', 'chai@1.0.0'], (err) => {
t.error(err, 'npm ls')
t.matchSnapshot(redactCwd(result), 'should output parseable contaning only occurrences of multiple filtered packages and their ancestors')
t.end()
@@ -1658,7 +1658,7 @@ t.test('ls --parseable', (t) => {
version: '1.0.0',
dependencies: {
foo: '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
}),
...simpleNmFixture,
@@ -1685,7 +1685,7 @@ t.test('ls --parseable', (t) => {
version: '1.0.0',
dependencies: {
foo: '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
}),
...simpleNmFixture,
@@ -1708,7 +1708,7 @@ t.test('ls --parseable', (t) => {
version: '1.0.0',
dependencies: {
foo: '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
}),
...simpleNmFixture,
@@ -1731,7 +1731,7 @@ t.test('ls --parseable', (t) => {
version: '1.0.0',
dependencies: {
foo: '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
}),
...simpleNmFixture,
@@ -1772,7 +1772,7 @@ t.test('ls --parseable', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
devDependencies: {
'dev-dep': '^1.0.0',
@@ -1801,7 +1801,7 @@ t.test('ls --parseable', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
devDependencies: {
'dev-dep': '^1.0.0',
@@ -1830,7 +1830,7 @@ t.test('ls --parseable', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
'linked-dep': '^1.0.0',
},
devDependencies: {
@@ -1869,7 +1869,7 @@ t.test('ls --parseable', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
devDependencies: {
'dev-dep': '^1.0.0',
@@ -1898,7 +1898,7 @@ t.test('ls --parseable', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
devDependencies: {
'dev-dep': '^1.0.0',
@@ -1927,7 +1927,7 @@ t.test('ls --parseable', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
devDependencies: {
'dev-dep': '^1.0.0',
@@ -1995,7 +1995,7 @@ t.test('ls --parseable', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
'linked-dep': '^1.0.0',
},
devDependencies: {
@@ -2037,7 +2037,7 @@ t.test('ls --parseable', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
devDependencies: {
'dev-dep': '^1.0.0',
@@ -2087,7 +2087,7 @@ t.test('ls --parseable', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
devDependencies: {
'dev-dep': '^1.0.0',
@@ -2114,7 +2114,7 @@ t.test('ls --parseable', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
devDependencies: {
'dev-dep': '^1.0.0',
@@ -2463,7 +2463,7 @@ t.test('ls --json', (t) => {
version: '1.0.0',
dependencies: {
foo: '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
}),
...simpleNmFixture,
@@ -2479,12 +2479,12 @@ t.test('ls --json', (t) => {
foo: {
version: '1.0.0',
dependencies: {
- bar: {
+ dog: {
version: '1.0.0',
},
},
},
- lorem: {
+ chai: {
version: '1.0.0',
},
},
@@ -2505,16 +2505,16 @@ t.test('ls --json', (t) => {
jsonParse(result),
{
problems: [
- 'extraneous: bar@1.0.0 {CWD}/tap-testdir-ls-ls---json-missing-package.json/node_modules/bar',
+ 'extraneous: chai@1.0.0 {CWD}/tap-testdir-ls-ls---json-missing-package.json/node_modules/chai',
+ 'extraneous: dog@1.0.0 {CWD}/tap-testdir-ls-ls---json-missing-package.json/node_modules/dog',
'extraneous: foo@1.0.0 {CWD}/tap-testdir-ls-ls---json-missing-package.json/node_modules/foo',
- 'extraneous: lorem@1.0.0 {CWD}/tap-testdir-ls-ls---json-missing-package.json/node_modules/lorem',
],
dependencies: {
- bar: {
+ dog: {
version: '1.0.0',
extraneous: true,
problems: [
- 'extraneous: bar@1.0.0 {CWD}/tap-testdir-ls-ls---json-missing-package.json/node_modules/bar',
+ 'extraneous: dog@1.0.0 {CWD}/tap-testdir-ls-ls---json-missing-package.json/node_modules/dog',
],
},
foo: {
@@ -2524,16 +2524,16 @@ t.test('ls --json', (t) => {
'extraneous: foo@1.0.0 {CWD}/tap-testdir-ls-ls---json-missing-package.json/node_modules/foo',
],
dependencies: {
- bar: {
+ dog: {
version: '1.0.0',
},
},
},
- lorem: {
+ chai: {
version: '1.0.0',
extraneous: true,
problems: [
- 'extraneous: lorem@1.0.0 {CWD}/tap-testdir-ls-ls---json-missing-package.json/node_modules/lorem',
+ 'extraneous: chai@1.0.0 {CWD}/tap-testdir-ls-ls---json-missing-package.json/node_modules/chai',
],
},
},
@@ -2563,22 +2563,22 @@ t.test('ls --json', (t) => {
name: 'test-npm-ls',
version: '1.0.0',
problems: [
- 'extraneous: lorem@1.0.0 {CWD}/tap-testdir-ls-ls---json-extraneous-deps/node_modules/lorem',
+ 'extraneous: chai@1.0.0 {CWD}/tap-testdir-ls-ls---json-extraneous-deps/node_modules/chai',
],
dependencies: {
foo: {
version: '1.0.0',
dependencies: {
- bar: {
+ dog: {
version: '1.0.0',
},
},
},
- lorem: {
+ chai: {
version: '1.0.0',
extraneous: true,
problems: [
- 'extraneous: lorem@1.0.0 {CWD}/tap-testdir-ls-ls---json-extraneous-deps/node_modules/lorem',
+ 'extraneous: chai@1.0.0 {CWD}/tap-testdir-ls-ls---json-extraneous-deps/node_modules/chai',
],
},
},
@@ -2597,8 +2597,8 @@ t.test('ls --json', (t) => {
version: '1.0.0',
dependencies: {
foo: '^1.0.0',
- bar: '^1.0.0',
- lorem: '^1.0.0',
+ dog: '^1.0.0',
+ chai: '^1.0.0',
ipsum: '^1.0.0',
},
}),
@@ -2638,12 +2638,12 @@ t.test('ls --json', (t) => {
version: '1.0.0',
dependencies: {
foo: '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
}),
...simpleNmFixture,
})
- ls.exec(['lorem'], (err) => {
+ ls.exec(['chai'], (err) => {
t.error(err, 'npm ls')
t.same(
jsonParse(result),
@@ -2651,7 +2651,7 @@ t.test('ls --json', (t) => {
name: 'test-npm-ls',
version: '1.0.0',
dependencies: {
- lorem: {
+ chai: {
version: '1.0.0',
},
},
@@ -2674,12 +2674,12 @@ t.test('ls --json', (t) => {
version: '1.0.0',
dependencies: {
foo: '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
}),
...simpleNmFixture,
})
- ls.exec(['bar'], (err) => {
+ ls.exec(['dog'], (err) => {
t.error(err, 'npm ls')
t.same(
jsonParse(result),
@@ -2690,7 +2690,7 @@ t.test('ls --json', (t) => {
foo: {
version: '1.0.0',
dependencies: {
- bar: {
+ dog: {
version: '1.0.0',
},
},
@@ -2710,7 +2710,7 @@ t.test('ls --json', (t) => {
version: '1.0.0',
dependencies: {
foo: '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
ipsum: '^1.0.0',
},
}),
@@ -2724,7 +2724,7 @@ t.test('ls --json', (t) => {
},
},
})
- ls.exec(['bar@*', 'lorem@1.0.0'], (err) => {
+ ls.exec(['dog@*', 'chai@1.0.0'], (err) => {
t.error(err, 'npm ls')
t.same(
jsonParse(result),
@@ -2735,12 +2735,12 @@ t.test('ls --json', (t) => {
foo: {
version: '1.0.0',
dependencies: {
- bar: {
+ dog: {
version: '1.0.0',
},
},
},
- lorem: {
+ chai: {
version: '1.0.0',
},
},
@@ -2758,7 +2758,7 @@ t.test('ls --json', (t) => {
version: '1.0.0',
dependencies: {
foo: '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
}),
...simpleNmFixture,
@@ -2792,7 +2792,7 @@ t.test('ls --json', (t) => {
version: '1.0.0',
dependencies: {
foo: '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
}),
...simpleNmFixture,
@@ -2808,7 +2808,7 @@ t.test('ls --json', (t) => {
foo: {
version: '1.0.0',
},
- lorem: {
+ chai: {
version: '1.0.0',
},
},
@@ -2830,7 +2830,7 @@ t.test('ls --json', (t) => {
version: '1.0.0',
dependencies: {
foo: '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
}),
...simpleNmFixture,
@@ -2846,7 +2846,7 @@ t.test('ls --json', (t) => {
foo: {
version: '1.0.0',
},
- lorem: {
+ chai: {
version: '1.0.0',
},
},
@@ -2868,7 +2868,7 @@ t.test('ls --json', (t) => {
version: '1.0.0',
dependencies: {
foo: '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
}),
...simpleNmFixture,
@@ -2884,12 +2884,12 @@ t.test('ls --json', (t) => {
foo: {
version: '1.0.0',
dependencies: {
- bar: {
+ dog: {
version: '1.0.0',
},
},
},
- lorem: {
+ chai: {
version: '1.0.0',
},
},
@@ -2922,9 +2922,9 @@ t.test('ls --json', (t) => {
name: 'test-npm-ls',
version: '1.0.0',
problems: [
+ 'extraneous: chai@1.0.0 {CWD}/tap-testdir-ls-ls---json-missing-invalid-extraneous/node_modules/chai',
'invalid: foo@1.0.0 {CWD}/tap-testdir-ls-ls---json-missing-invalid-extraneous/node_modules/foo',
'missing: ipsum@^1.0.0, required by test-npm-ls@1.0.0',
- 'extraneous: lorem@1.0.0 {CWD}/tap-testdir-ls-ls---json-missing-invalid-extraneous/node_modules/lorem',
],
dependencies: {
foo: {
@@ -2934,16 +2934,16 @@ t.test('ls --json', (t) => {
'invalid: foo@1.0.0 {CWD}/tap-testdir-ls-ls---json-missing-invalid-extraneous/node_modules/foo',
],
dependencies: {
- bar: {
+ dog: {
version: '1.0.0',
},
},
},
- lorem: {
+ chai: {
version: '1.0.0',
extraneous: true,
problems: [
- 'extraneous: lorem@1.0.0 {CWD}/tap-testdir-ls-ls---json-missing-invalid-extraneous/node_modules/lorem',
+ 'extraneous: chai@1.0.0 {CWD}/tap-testdir-ls-ls---json-missing-invalid-extraneous/node_modules/chai',
],
},
ipsum: {
@@ -2969,7 +2969,7 @@ t.test('ls --json', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
devDependencies: {
'dev-dep': '^1.0.0',
@@ -2995,7 +2995,7 @@ t.test('ls --json', (t) => {
dependencies: {
foo: {
version: '1.0.0',
- dependencies: { bar: { version: '1.0.0' } },
+ dependencies: { dog: { version: '1.0.0' } },
},
},
},
@@ -3016,7 +3016,7 @@ t.test('ls --json', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
devDependencies: {
'dev-dep': '^1.0.0',
@@ -3042,7 +3042,7 @@ t.test('ls --json', (t) => {
dependencies: {
foo: {
version: '1.0.0',
- dependencies: { bar: { version: '1.0.0' } },
+ dependencies: { dog: { version: '1.0.0' } },
},
},
},
@@ -3063,7 +3063,7 @@ t.test('ls --json', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
'linked-dep': '^1.0.0',
},
devDependencies: {
@@ -3115,7 +3115,7 @@ t.test('ls --json', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
devDependencies: {
'dev-dep': '^1.0.0',
@@ -3136,9 +3136,9 @@ t.test('ls --json', (t) => {
name: 'test-npm-ls',
version: '1.0.0',
dependencies: {
- lorem: { version: '1.0.0' },
+ chai: { version: '1.0.0' },
'optional-dep': { version: '1.0.0' },
- 'prod-dep': { version: '1.0.0', dependencies: { bar: { version: '2.0.0' } } },
+ 'prod-dep': { version: '1.0.0', dependencies: { dog: { version: '2.0.0' } } },
},
},
'should output json containing production deps'
@@ -3156,7 +3156,7 @@ t.test('ls --json', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
devDependencies: {
'dev-dep': '^1.0.0',
@@ -3177,9 +3177,9 @@ t.test('ls --json', (t) => {
name: 'test-npm-ls',
version: '1.0.0',
dependencies: {
- lorem: { version: '1.0.0' },
+ chai: { version: '1.0.0' },
'optional-dep': { version: '1.0.0' },
- 'prod-dep': { version: '1.0.0', dependencies: { bar: { version: '2.0.0' } } },
+ 'prod-dep': { version: '1.0.0', dependencies: { dog: { version: '2.0.0' } } },
},
},
'should output json containing only prod deps'
@@ -3326,7 +3326,7 @@ t.test('ls --json', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
devDependencies: {
'dev-dep': '^1.0.0',
@@ -3367,21 +3367,21 @@ t.test('ls --json', (t) => {
name: 'foo',
version: '1.0.0',
dependencies: {
- bar: {
- name: 'bar',
+ dog: {
+ name: 'dog',
version: '1.0.0',
- _id: 'bar@1.0.0',
+ _id: 'dog@1.0.0',
devDependencies: {},
peerDependencies: {},
_dependencies: {},
- path: '{CWD}/tap-testdir-ls-ls---json---long/node_modules/bar',
+ path: '{CWD}/tap-testdir-ls-ls---json---long/node_modules/dog',
extraneous: false,
},
},
_id: 'foo@1.0.0',
devDependencies: {},
peerDependencies: {},
- _dependencies: { bar: '^1.0.0' },
+ _dependencies: { dog: '^1.0.0' },
path: '{CWD}/tap-testdir-ls-ls---json---long/node_modules/foo',
extraneous: false,
},
@@ -3393,14 +3393,14 @@ t.test('ls --json', (t) => {
path: '{CWD}/tap-testdir-ls-ls---json---long/node_modules/dev-dep',
extraneous: false,
},
- lorem: {
- name: 'lorem',
+ chai: {
+ name: 'chai',
version: '1.0.0',
- _id: 'lorem@1.0.0',
+ _id: 'chai@1.0.0',
devDependencies: {},
peerDependencies: {},
_dependencies: {},
- path: '{CWD}/tap-testdir-ls-ls---json---long/node_modules/lorem',
+ path: '{CWD}/tap-testdir-ls-ls---json---long/node_modules/chai',
extraneous: false,
},
'optional-dep': {
@@ -3419,22 +3419,22 @@ t.test('ls --json', (t) => {
description: 'A PROD dep kind of dep',
version: '1.0.0',
dependencies: {
- bar: {
- name: 'bar',
+ dog: {
+ name: 'dog',
description: 'A dep that bars',
version: '2.0.0',
- _id: 'bar@2.0.0',
+ _id: 'dog@2.0.0',
devDependencies: {},
peerDependencies: {},
_dependencies: {},
- path: '{CWD}/tap-testdir-ls-ls---json---long/node_modules/prod-dep/node_modules/bar',
+ path: '{CWD}/tap-testdir-ls-ls---json---long/node_modules/prod-dep/node_modules/dog',
extraneous: false,
},
},
_id: 'prod-dep@1.0.0',
devDependencies: {},
peerDependencies: {},
- _dependencies: { bar: '^2.0.0' },
+ _dependencies: { dog: '^2.0.0' },
path: '{CWD}/tap-testdir-ls-ls---json---long/node_modules/prod-dep',
extraneous: false,
},
@@ -3443,7 +3443,7 @@ t.test('ls --json', (t) => {
optionalDependencies: { 'optional-dep': '^1.0.0' },
peerDependencies: { 'peer-dep': '^1.0.0' },
_id: 'test-npm-ls@1.0.0',
- _dependencies: { 'prod-dep': '^1.0.0', lorem: '^1.0.0', 'optional-dep': '^1.0.0' },
+ _dependencies: { 'prod-dep': '^1.0.0', chai: '^1.0.0', 'optional-dep': '^1.0.0' },
path: '{CWD}/tap-testdir-ls-ls---json---long',
extraneous: false,
},
@@ -3464,7 +3464,7 @@ t.test('ls --json', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
devDependencies: {
'dev-dep': '^1.0.0',
@@ -3507,14 +3507,14 @@ t.test('ls --json', (t) => {
path: '{CWD}/tap-testdir-ls-ls---json---long---depth-0/node_modules/dev-dep',
extraneous: false,
},
- lorem: {
- name: 'lorem',
+ chai: {
+ name: 'chai',
version: '1.0.0',
- _id: 'lorem@1.0.0',
+ _id: 'chai@1.0.0',
devDependencies: {},
peerDependencies: {},
_dependencies: {},
- path: '{CWD}/tap-testdir-ls-ls---json---long---depth-0/node_modules/lorem',
+ path: '{CWD}/tap-testdir-ls-ls---json---long---depth-0/node_modules/chai',
extraneous: false,
},
'optional-dep': {
@@ -3535,7 +3535,7 @@ t.test('ls --json', (t) => {
_id: 'prod-dep@1.0.0',
devDependencies: {},
peerDependencies: {},
- _dependencies: { bar: '^2.0.0' },
+ _dependencies: { dog: '^2.0.0' },
path: '{CWD}/tap-testdir-ls-ls---json---long---depth-0/node_modules/prod-dep',
extraneous: false,
},
@@ -3544,7 +3544,7 @@ t.test('ls --json', (t) => {
optionalDependencies: { 'optional-dep': '^1.0.0' },
peerDependencies: { 'peer-dep': '^1.0.0' },
_id: 'test-npm-ls@1.0.0',
- _dependencies: { 'prod-dep': '^1.0.0', lorem: '^1.0.0', 'optional-dep': '^1.0.0' },
+ _dependencies: { 'prod-dep': '^1.0.0', chai: '^1.0.0', 'optional-dep': '^1.0.0' },
path: '{CWD}/tap-testdir-ls-ls---json---long---depth-0',
extraneous: false,
},
@@ -3598,7 +3598,7 @@ t.test('ls --json', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
devDependencies: {
'dev-dep': '^1.0.0',
@@ -3635,13 +3635,13 @@ t.test('ls --json', (t) => {
dependencies: {
foo: {
version: '1.0.0',
- dependencies: { bar: { version: '1.0.0' } },
+ dependencies: { dog: { version: '1.0.0' } },
},
},
},
- lorem: { version: '1.0.0' },
+ chai: { version: '1.0.0' },
'optional-dep': { version: '1.0.0' },
- 'prod-dep': { version: '1.0.0', dependencies: { bar: { version: '2.0.0' } } },
+ 'prod-dep': { version: '1.0.0', dependencies: { dog: { version: '2.0.0' } } },
},
},
'should output json signaling missing peer dep in problems'
@@ -3657,7 +3657,7 @@ t.test('ls --json', (t) => {
version: '1.0.0',
dependencies: {
'prod-dep': '^1.0.0',
- lorem: '^1.0.0',
+ chai: '^1.0.0',
},
devDependencies: {
'dev-dep': '^1.0.0',
@@ -3699,12 +3699,12 @@ t.test('ls --json', (t) => {
dependencies: {
foo: {
version: '1.0.0',
- dependencies: { bar: { version: '1.0.0' } },
+ dependencies: { dog: { version: '1.0.0' } },
},
},
},
- lorem: { version: '1.0.0' },
- 'prod-dep': { version: '1.0.0', dependencies: { bar: { version: '2.0.0' } } },
+ chai: { version: '1.0.0' },
+ 'prod-dep': { version: '1.0.0', dependencies: { dog: { version: '2.0.0' } } },
'missing-optional-dep': {}, // missing optional dep has an empty entry in json output
},
},
diff --git a/deps/npm/test/lib/outdated.js b/deps/npm/test/lib/outdated.js
index 605853056a00..f7d572821275 100644
--- a/deps/npm/test/lib/outdated.js
+++ b/deps/npm/test/lib/outdated.js
@@ -3,8 +3,8 @@ const mockNpm = require('../fixtures/mock-npm')
const packument = spec => {
const mocks = {
- alpha: {
- name: 'alpha',
+ cat: {
+ name: 'cat',
'dist-tags': {
latest: '1.0.1',
},
@@ -12,13 +12,13 @@ const packument = spec => {
'1.0.1': {
version: '1.0.1',
dependencies: {
- gamma: '2.0.0',
+ dog: '2.0.0',
},
},
},
},
- beta: {
- name: 'beta',
+ chai: {
+ name: 'chai',
'dist-tags': {
latest: '1.0.1',
},
@@ -28,8 +28,8 @@ const packument = spec => {
},
},
},
- gamma: {
- name: 'gamma',
+ dog: {
+ name: 'dog',
'dist-tags': {
latest: '2.0.0',
},
@@ -74,9 +74,9 @@ const output = (msg) => {
const globalDir = t.testdir({
node_modules: {
- alpha: {
+ cat: {
'package.json': JSON.stringify({
- name: 'alpha',
+ name: 'cat',
version: '1.0.0',
}, null, 2),
},
@@ -116,8 +116,8 @@ t.test('should display outdated deps', t => {
name: 'delta',
version: '1.0.0',
dependencies: {
- alpha: '^1.0.0',
- gamma: '^1.0.0',
+ cat: '^1.0.0',
+ dog: '^1.0.0',
theta: '^1.0.0',
},
devDependencies: {
@@ -127,36 +127,36 @@ t.test('should display outdated deps', t => {
lorem: '^1.0.0',
},
peerDependencies: {
- beta: '^1.0.0',
+ chai: '^1.0.0',
},
}, null, 2),
node_modules: {
- alpha: {
+ cat: {
'package.json': JSON.stringify({
- name: 'alpha',
+ name: 'cat',
version: '1.0.0',
dependencies: {
- gamma: '2.0.0',
+ dog: '2.0.0',
},
}, null, 2),
node_modules: {
- gamma: {
+ dog: {
'package.json': JSON.stringify({
- name: 'gamma',
+ name: 'dog',
version: '2.0.0',
}, null, 2),
},
},
},
- beta: {
+ chai: {
'package.json': JSON.stringify({
- name: 'beta',
+ name: 'chai',
version: '1.0.0',
}, null, 2),
},
- gamma: {
+ dog: {
'package.json': JSON.stringify({
- name: 'gamma',
+ name: 'dog',
version: '1.0.1',
}, null, 2),
},
@@ -307,7 +307,7 @@ t.test('should display outdated deps', t => {
config: {
global: false,
},
- }).exec(['alpha'], () => {
+ }).exec(['cat'], () => {
t.matchSnapshot(logs)
t.end()
})
@@ -322,13 +322,13 @@ t.test('should return if no outdated deps', t => {
name: 'delta',
version: '1.0.0',
dependencies: {
- alpha: '^1.0.0',
+ cat: '^1.0.0',
},
}, null, 2),
node_modules: {
- alpha: {
+ cat: {
'package.json': JSON.stringify({
- name: 'alpha',
+ name: 'cat',
version: '1.0.1',
}, null, 2),
},
@@ -376,7 +376,7 @@ t.test('should skip missing non-prod deps', t => {
name: 'delta',
version: '1.0.0',
devDependencies: {
- beta: '^1.0.0',
+ chai: '^1.0.0',
},
}, null, 2),
node_modules: {},
@@ -396,13 +396,13 @@ t.test('should skip invalid pkg ranges', t => {
name: 'delta',
version: '1.0.0',
dependencies: {
- alpha: '>=^2',
+ cat: '>=^2',
},
}, null, 2),
node_modules: {
- alpha: {
+ cat: {
'package.json': JSON.stringify({
- name: 'alpha',
+ name: 'cat',
version: '1.0.0',
}, null, 2),
},
@@ -421,13 +421,13 @@ t.test('should skip git specs', t => {
name: 'delta',
version: '1.0.0',
dependencies: {
- alpha: 'github:username/foo',
+ cat: 'github:username/foo',
},
}, null, 2),
node_modules: {
- alpha: {
+ cat: {
'package.json': JSON.stringify({
- name: 'alpha',
+ name: 'cat',
version: '1.0.0',
}, null, 2),
},
diff --git a/deps/npm/test/lib/utils/cleanup-log-files.js b/deps/npm/test/lib/utils/cleanup-log-files.js
index 61240b7b523d..e97cf36b55de 100644
--- a/deps/npm/test/lib/utils/cleanup-log-files.js
+++ b/deps/npm/test/lib/utils/cleanup-log-files.js
@@ -71,7 +71,7 @@ t.test('rimraf fail', t => {
const warnings = []
const warn = (...warning) => warnings.push(basename(warning[2]))
return cleanup(cache, 3, warn).then(() => {
- t.strictSame(warnings.sort((a, b) => a.localeCompare(b)), [
+ t.strictSame(warnings.sort((a, b) => a.localeCompare(b, 'en')), [
'1-debug.log',
'2-debug.log',
])
diff --git a/deps/npm/test/lib/utils/completion/installed-deep.js b/deps/npm/test/lib/utils/completion/installed-deep.js
index ba14798bbec1..21e77a568bd8 100644
--- a/deps/npm/test/lib/utils/completion/installed-deep.js
+++ b/deps/npm/test/lib/utils/completion/installed-deep.js
@@ -63,6 +63,15 @@ const fixture = {
'package.json': JSON.stringify({
name: 'c',
version: '1.0.0',
+ dependencies: {
+ ch: '1.0.0',
+ },
+ }),
+ },
+ ch: {
+ 'package.json': JSON.stringify({
+ name: 'ch',
+ version: '1.0.0',
}),
},
d: {
@@ -160,8 +169,8 @@ t.test('get list of package names', async t => {
['foo', '-g'],
['a-bar', '-g'],
'a', 'b', 'c',
- 'd', 'e', 'f',
- 'g', 'bb',
+ 'ch', 'd', 'e',
+ 'f', 'g', 'bb',
],
'should return list of package names and global flag'
)
@@ -211,9 +220,9 @@ t.test('limit depth', async t => {
['bar', '-g'],
['foo', '-g'],
'a', 'b',
- 'c', 'd',
- 'e', 'f',
- 'g',
+ 'c', 'ch',
+ 'd', 'e',
+ 'f', 'g',
],
'should print only packages up to the specified depth'
)
diff --git a/deps/npm/test/lib/utils/config/definitions.js b/deps/npm/test/lib/utils/config/definitions.js
index f735223655f5..49e415288379 100644
--- a/deps/npm/test/lib/utils/config/definitions.js
+++ b/deps/npm/test/lib/utils/config/definitions.js
@@ -729,7 +729,7 @@ t.test('user-agent', t => {
}
const flat = {}
const expectNoCI = `npm/1.2.3 node/9.8.7 ` +
- `${process.platform} ${process.arch}`
+ `${process.platform} ${process.arch} workspaces/false`
definitions['user-agent'].flatten('user-agent', obj, flat)
t.equal(flat.userAgent, expectNoCI)
t.equal(process.env.npm_config_user_agent, flat.userAgent, 'npm_user_config environment is set')
@@ -742,6 +742,23 @@ t.test('user-agent', t => {
t.equal(flat.userAgent, expectCI)
t.equal(process.env.npm_config_user_agent, flat.userAgent, 'npm_user_config environment is set')
t.equal(obj['user-agent'], flat.userAgent, 'config user-agent template is translated')
+
+ delete obj['ci-name']
+ obj.workspaces = true
+ obj['user-agent'] = definitions['user-agent'].default
+ const expectWorkspaces = expectNoCI.replace('workspaces/false', 'workspaces/true')
+ definitions['user-agent'].flatten('user-agent', obj, flat)
+ t.equal(flat.userAgent, expectWorkspaces)
+ t.equal(process.env.npm_config_user_agent, flat.userAgent, 'npm_user_config environment is set')
+ t.equal(obj['user-agent'], flat.userAgent, 'config user-agent template is translated')
+
+ delete obj.workspaces
+ obj.workspace = ['foo']
+ obj['user-agent'] = definitions['user-agent'].default
+ definitions['user-agent'].flatten('user-agent', obj, flat)
+ t.equal(flat.userAgent, expectWorkspaces)
+ t.equal(process.env.npm_config_user_agent, flat.userAgent, 'npm_user_config environment is set')
+ t.equal(obj['user-agent'], flat.userAgent, 'config user-agent template is translated')
t.end()
})
diff --git a/deps/npm/test/lib/utils/tar.js b/deps/npm/test/lib/utils/tar.js
index 5758442fcb6f..2662d47ace48 100644
--- a/deps/npm/test/lib/utils/tar.js
+++ b/deps/npm/test/lib/utils/tar.js
@@ -26,6 +26,9 @@ t.test('should log tarball contents', async (t) => {
'bundle-dep',
],
}, null, 2),
+ cat: 'meow',
+ chai: 'blub',
+ dog: 'woof',
node_modules: {
'bundle-dep': 'toto',
},
diff --git a/deps/npm/test/lib/utils/update-notifier.js b/deps/npm/test/lib/utils/update-notifier.js
index 1735b31057b1..ad4d407728f9 100644
--- a/deps/npm/test/lib/utils/update-notifier.js
+++ b/deps/npm/test/lib/utils/update-notifier.js
@@ -145,15 +145,15 @@ t.test('situations in which we do not notify', t => {
})
t.test('only check weekly for GA releases', async t => {
- // the 10 is fuzz factor for test environment
- STAT_MTIME = Date.now() - (1000 * 60 * 60 * 24 * 7) + 10
+ // One week (plus five minutes to account for test environment fuzziness)
+ STAT_MTIME = Date.now() - (1000 * 60 * 60 * 24 * 7) + (1000 * 60 * 5)
t.equal(await updateNotifier(npm), null)
t.strictSame(MANIFEST_REQUEST, [], 'no requests for manifests')
})
t.test('only check daily for betas', async t => {
- // the 10 is fuzz factor for test environment
- STAT_MTIME = Date.now() - (1000 * 60 * 60 * 24) + 10
+ // One day (plus five minutes to account for test environment fuzziness)
+ STAT_MTIME = Date.now() - (1000 * 60 * 60 * 24) + (1000 * 60 * 5)
t.equal(await updateNotifier({ ...npm, version: HAVE_BETA }), null)
t.strictSame(MANIFEST_REQUEST, [], 'no requests for manifests')
})
diff --git a/deps/npm/test/lib/view.js b/deps/npm/test/lib/view.js
index eb2beb9ff586..4544d7d5d1a9 100644
--- a/deps/npm/test/lib/view.js
+++ b/deps/npm/test/lib/view.js
@@ -34,7 +34,9 @@ const packument = (nv, opts) => {
},
blue: {
name: 'blue',
- 'dist-tags': {},
+ 'dist-tags': {
+ latest: '1.0.0',
+ },
time: {
'1.0.0': '2019-08-06T16:21:09.842Z',
},
@@ -59,7 +61,9 @@ const packument = (nv, opts) => {
email: 'claudia@cyan.com',
},
name: 'cyan',
- 'dist-tags': {},
+ 'dist-tags': {
+ latest: '1.0.0',
+ },
versions: {
'1.0.0': {
version: '1.0.0',
@@ -236,6 +240,8 @@ const packument = (nv, opts) => {
},
},
}
+ if (nv.type === 'git')
+ return mocks[nv.hosted.project]
return mocks[nv.name]
}
@@ -248,7 +254,7 @@ t.test('should log package info', t => {
},
})
const npm = mockNpm({
- config: { global: false },
+ config: { unicode: false },
})
const view = new View(npm)
@@ -258,7 +264,10 @@ t.test('should log package info', t => {
},
})
const jsonNpm = mockNpm({
- config: { json: true },
+ config: {
+ json: true,
+ tag: 'latest',
+ },
})
const viewJson = new ViewJson(jsonNpm)
@@ -268,13 +277,17 @@ t.test('should log package info', t => {
},
})
const unicodeNpm = mockNpm({
- config: {
- global: false,
- unicode: true,
- },
+ config: { unicode: true },
})
const viewUnicode = new ViewUnicode(unicodeNpm)
+ t.test('package from git', t => {
+ view.exec(['https://github.com/npm/green'], () => {
+ t.matchSnapshot(logs)
+ t.end()
+ })
+ })
+
t.test('package with license, bugs, repository and other fields', t => {
view.exec(['green@1.0.0'], () => {
t.matchSnapshot(logs)
@@ -358,7 +371,6 @@ t.test('should log info of package in current working dir', t => {
prefix: testDir,
config: {
tag: '1.0.0',
- global: false,
},
})
const view = new View(npm)
@@ -388,8 +400,8 @@ t.test('should log info by field name', t => {
})
const jsonNpm = mockNpm({
config: {
+ tag: 'latest',
json: true,
- global: false,
},
})
@@ -400,9 +412,7 @@ t.test('should log info by field name', t => {
packument,
},
})
- const npm = mockNpm({
- config: { global: false },
- })
+ const npm = mockNpm()
const view = new View(npm)
t.test('readme', t => {
@@ -474,7 +484,10 @@ t.test('should log info by field name', t => {
t.test('throw error if global mode', (t) => {
const View = t.mock('../../lib/view.js')
const npm = mockNpm({
- config: { global: true },
+ config: {
+ global: true,
+ tag: 'latest',
+ },
})
const view = new View(npm)
view.exec([], (err) => {
@@ -489,7 +502,6 @@ t.test('throw ENOENT error if package.json misisng', (t) => {
const View = t.mock('../../lib/view.js')
const npm = mockNpm({
prefix: testDir,
- config: { global: false },
})
const view = new View(npm)
view.exec([], (err) => {
@@ -506,7 +518,6 @@ t.test('throw EJSONPARSE error if package.json not json', (t) => {
const View = t.mock('../../lib/view.js')
const npm = mockNpm({
prefix: testDir,
- config: { global: false },
})
const view = new View(npm)
view.exec([], (err) => {
@@ -523,7 +534,6 @@ t.test('throw error if package.json has no name', (t) => {
const View = t.mock('../../lib/view.js')
const npm = mockNpm({
prefix: testDir,
- config: { global: false },
})
const view = new View(npm)
view.exec([], (err) => {
@@ -541,7 +551,6 @@ t.test('throws when unpublished', (t) => {
const npm = mockNpm({
config: {
tag: '1.0.1',
- global: false,
},
})
const view = new View(npm)
@@ -581,6 +590,7 @@ t.test('workspaces', t => {
},
})
const config = {
+ unicode: false,
tag: 'latest',
}
let warnMsg
@@ -684,7 +694,6 @@ t.test('completion', async t => {
const npm = mockNpm({
config: {
tag: '1.0.1',
- global: false,
},
})
const view = new View(npm)
@@ -700,7 +709,6 @@ t.test('no registry completion', async t => {
const npm = mockNpm({
config: {
tag: '1.0.1',
- global: false,
},
})
const view = new View(npm)