diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index 3280578d751912..35bf14fbbc7238 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,3 +1,51 @@ +## v7.0.0 (2020-10-12) + +### BUG FIXES + +* [`7bcdb3636`](https://github.com/npm/cli/commit/7bcdb3636e29291b9c722fe03a8450859dcb5b4f) + [#1949](https://github.com/npm/cli/pull/1949) fix: ensure `publishConfig` + is passed through ([@nlf](https://github.com/nlf)) +* [`97978462e`](https://github.com/npm/cli/commit/97978462e9050261e4ce2549e71fe94a48796577) + fix: patch `config.js` to remove duplicate vals + ([@darcyclarke](https://github.com/darcyclarke)) + +### DOCUMENTION + +* [`60769d757`](https://github.com/npm/cli/commit/60769d757859c88e2cceab66975f182a47822816) + [#1911](https://github.com/npm/cli/pull/1911) docs: v7 npm-install + refresh ([@ruyadorno](https://github.com/ruyadorno)) +* [`08de49042`](https://github.com/npm/cli/commit/08de4904255742cbf7477a20bdeebe82f283a406) + [#1938](https://github.com/npm/cli/pull/1938) docs: v7 using npm config + updates ([@ruyadorno](https://github.com/ruyadorno)) + +### DEPENDENCIES + +* [`15366a1cf`](https://github.com/npm/cli/commit/15366a1cf0073327b90ac7eb977ff8a73b52cc62) + `npm-registry-fetch@8.1.5` +* [`f04a74140`](https://github.com/npm/cli/commit/f04a74140bf65db36be3c379e0eb20dd6db3cc5c) + `init-package-json@2.0.0` + * [`1de21dce0`](https://github.com/npm/cli/commit/1de21dce0e56874203a789ce33124a4fc4d3b15f) + fix: support dot-separated aliases defined in a `.npmrc` ini files + for `init-*` configs ([@ruyadorno](https://github.com/ruyadorno)) +* [`a67275cd9`](https://github.com/npm/cli/commit/a67275cd9a75fa05ee3d3265832d0a015b14e81c) + `eslint@7.11.0` +* [`6fb83b78d`](https://github.com/npm/cli/commit/6fb83b78db09adfafd7cbd4b926e77802c4993e4) + `hosted-git-info@3.0.6` +* [`1ca30cc9b`](https://github.com/npm/cli/commit/1ca30cc9b8e7edc2043c1f848855f19781729dc9) + `libnpmfund@1.0.0` +* [`28a2d2ba4`](https://github.com/npm/cli/commit/28a2d2ba4a63808614f5d98685a64531e3198b93) + `@npmcli/arborist@1.0.0` + * [npm/rfcs#239](https://github.com/npm/rfcs/pull/239) Improve handling + of conflicting `peerDependencies` in transitive dependencies, so that + `--force` will always accept a best effort override, and + `--strict-peer-deps` will fail faster on conflicts. +* [`9306c6833`](https://github.com/npm/cli/commit/9306c6833e2e77675e0cfddd569b6b54a8bcf172) + `libnpmfund@1.0.1` +* [`fafb348ef`](https://github.com/npm/cli/commit/fafb348ef976116d47ada238beb258d5db5758a7) + `npm-package-arg@8.1.0` +* [`365f2e756`](https://github.com/npm/cli/commit/365f2e7565d0cfde858a43d894a77fb3c6338bb7) + `read-package-json@3.0.0` + ## v7.0.0-rc.4 (2020-10-09) * [`09b456f2d`](https://github.com/npm/cli/commit/09b456f2d776e2757956d2b9869febd1e01a1076) diff --git a/deps/npm/docs/content/cli-commands/npm-install.md b/deps/npm/docs/content/cli-commands/npm-install.md index be196fa825546b..a76518432fb9c0 100644 --- a/deps/npm/docs/content/cli-commands/npm-install.md +++ b/deps/npm/docs/content/cli-commands/npm-install.md @@ -29,10 +29,17 @@ common options: [-P|--save-prod|-D|--save-dev|-O|--save-optional] [-E|--save-exa ### Description -This command installs a package, and any packages that it depends on. If the -package has a package-lock or shrinkwrap file, the installation of dependencies -will be driven by that, with an `npm-shrinkwrap.json` taking precedence if both -files exist. See [package-lock.json](/configuring-npm/package-lock-json) and [`npm shrinkwrap`](/cli-commands/shrinkwrap). +This command installs a package and any packages that it depends on. If the +package has a package-lock, or an npm shrinkwrap file, or a yarn lock file, the +installation of dependencies will be driven by that, respecting the following +order of precedence: + +* `node_modules/.package-lock.json` +* `npm-shrinkwrap.json` +* `package-lock.json` +* `yarn.lock` + +See [package-lock.json](/configuring-npm/package-lock-json) and [`npm shrinkwrap`](/cli-commands/shrinkwrap). A `package` is: @@ -50,9 +57,9 @@ perhaps if you also want to be able to easily install it elsewhere after packing it up into a tarball (b). -* `npm install` (in package directory, no arguments): +* `npm install` (in a package directory, no arguments): - Install the dependencies in the local node_modules folder. + Install the dependencies in the local `node_modules` folder. In global mode (ie, with `-g` or `--global` appended to the command), it installs the current package context (ie, the current working @@ -75,13 +82,13 @@ after packing it up into a tarball (b). Install the package in the directory as a symlink in the current project. Its dependencies will be installed before it's linked. If `` sits inside the root of your project, its dependencies may be hoisted to the - toplevel `node_modules` as they would for other types of dependencies. + top-level `node_modules` as they would for other types of dependencies. * `npm install `: Install a package that is sitting on the filesystem. Note: if you just want to link a dev directory into your npm root, you can do this more easily by - using `npm link`. + using [`npm link`](/cli-commands/npm-link). Tarball requirements: * The filename *must* use `.tar`, `.tar.gz`, or `.tgz` as @@ -114,24 +121,6 @@ after packing it up into a tarball (b). npm install sax -* `npm install @npm:`: - - Install a package under a custom alias. Allows multiple versions of - a same-name package side-by-side, more convenient import names for - packages with otherwise long ones and using git forks replacements - or forked npm packages as replacements. Aliasing works only on your - project and does not rename packages in transitive dependencies. - Aliases should follow the naming conventions stated in - [`validate-npm-package-name`](https://www.npmjs.com/package/validate-npm-package-name#naming-rules). - - Examples: - - npm install my-react@npm:react - npm install jquery2@npm:jquery@2 - npm install jquery3@npm:jquery@3 - npm install npa@npm:npm-package-arg - - `npm install` saves any specified packages into `dependencies` by default. Additionally, you can control where and how they get saved with some additional flags: @@ -181,6 +170,24 @@ after packing it up into a tarball (b). working directory, then it will try to install that, and only try to fetch the package by name if it is not valid. +* `npm install @npm:`: + + Install a package under a custom alias. Allows multiple versions of + a same-name package side-by-side, more convenient import names for + packages with otherwise long ones, and using git forks replacements + or forked npm packages as replacements. Aliasing works only on your + project and does not rename packages in transitive dependencies. + Aliases should follow the naming conventions stated in + [`validate-npm-package-name`](https://www.npmjs.com/package/validate-npm-package-name#naming-rules). + + Examples: + + npm install my-react@npm:react + npm install jquery2@npm:jquery@2 + npm install jquery3@npm:jquery@3 + npm install npa@npm:npm-package-arg + + * `npm install [<@scope>/]@`: Install the version of the package that is referenced by the specified tag. @@ -217,7 +224,7 @@ after packing it up into a tarball (b). Example: ```bash npm install sax@">=0.1.0 <0.2.0" - npm install @myorg/privatepackage@">=0.1.0 <0.2.0" + npm install @myorg/privatepackage@"16 - 17" ``` * `npm install `: @@ -263,6 +270,7 @@ after packing it up into a tarball (b). ```bash npm install git+ssh://git@github.com:npm/cli.git#v1.0.27 + npm install git+ssh://git@github.com:npm/cli#pull/273 npm install git+ssh://git@github.com:npm/cli#semver:^5.0 npm install git+https://isaacs@github.com/npm/cli.git npm install git://github.com/npm/cli.git#v1.0.27 @@ -283,7 +291,7 @@ after packing it up into a tarball (b). specified, then `master` is used. As with regular git dependencies, `dependencies` and `devDependencies` will - be installed if the package has a `prepare` script, before the package is + be installed if the package has a `prepare` script before the package is done installing. Examples: @@ -300,7 +308,7 @@ after packing it up into a tarball (b). optional and will not be saved in `package.json`. As with regular git dependencies, `dependencies` and `devDependencies` will - be installed if the package has a `prepare` script, before the package is + be installed if the package has a `prepare` script before the package is done installing. Example: @@ -322,7 +330,7 @@ after packing it up into a tarball (b). specified, then `master` is used. As with regular git dependencies, `dependencies` and `devDependencies` will - be installed if the package has a `prepare` script, before the package is + be installed if the package has a `prepare` script before the package is done installing. Example: @@ -344,7 +352,7 @@ after packing it up into a tarball (b). specified, then `master` is used. As with regular git dependencies, `dependencies` and `devDependencies` will - be installed if the package has a `prepare` script, before the package is + be installed if the package has a `prepare` script before the package is done installing. Example: @@ -354,7 +362,7 @@ after packing it up into a tarball (b). npm install gitlab:myusr/myproj#semver:^5.0 ``` -You may combine multiple arguments, and even multiple types of arguments. +You may combine multiple arguments and even multiple types of arguments. For example: ```bash @@ -378,10 +386,6 @@ local copy exists on disk. npm install sax --force ``` -The `--no-fund` argument will hide the message displayed at the end of each -install that acknowledges the number of dependencies looking for funding. -See `npm-fund(1)` - The `-g` or `--global` argument will cause npm to install the package globally rather than locally. See [folders](/configuring-npm/folders). @@ -398,17 +402,29 @@ The `--legacy-bundling` argument will cause npm to install the package such that versions of npm prior to 1.4, such as the one included with node 0.8, can install the package. This eliminates all automatic deduping. +The `--legacy-peer-deps` argument will cause npm to ignore all +`peerDependencies` when installing, similar to npm@6 and older. + The `--link` argument will cause npm to link global installs into the -local space in some cases. +local space whenever packages from the global space may satisfy a dependency +required version. + +The `--no-audit` argument can be used to disable sending audit reports to +the configured registries. See [`npm-audit`](npm-audit) for details on what +is sent. The `--no-bin-links` argument will prevent npm from creating symlinks for any binaries the package might contain. +The `--no-fund` argument will hide the message displayed at the end of each +install that acknowledges the number of dependencies looking for funding. +See [`npm-fund`](/cli-commands/npm-fund) + The `--no-optional` argument will prevent optional dependencies from being installed. The `--no-shrinkwrap` argument, which will ignore an available -package lock or shrinkwrap file and use the package.json instead. +package-lock or shrinkwrap file and use the package.json instead. The `--no-package-lock` argument will prevent npm from creating a `package-lock.json` file. When running with package-lock's disabled npm @@ -418,32 +434,20 @@ The `--nodedir=/path/to/node/source` argument will allow npm to find the node source code so that npm can compile native modules. The `--only={prod[uction]|dev[elopment]}` argument will cause either only -`devDependencies` or only non-`devDependencies` to be installed regardless of the `NODE_ENV`. +`devDependencies` or only non-`devDependencies` to be installed regardless +of the `NODE_ENV`. -The `--no-audit` argument can be used to disable sending of audit reports to -the configured registries. See [`npm-audit`](npm-audit) for details on what is sent. +The `--strict-peer-deps` argument will cause the install to fail on any +`peerDependencies` conflict, even if it's possible to use a heuristic to +provide a least-surprising resolution to a given conflict. See [`config`](/using-npm/config). Many of the configuration params have some effect on installation, since that's most of what npm does. #### Algorithm -To install a package, npm uses the following algorithm: -```bash -load the existing node_modules tree from disk -clone the tree -fetch the package.json and assorted metadata and add it to the clone -walk the clone and add any missing dependencies - dependencies will be added as close to the top as is possible - without breaking any other modules -compare the original tree with the cloned tree and make a list of -actions to take to convert one to the other -execute all of the actions, deepest first - kinds of actions are install, update, remove and move -``` - -For this `package{dep}` structure: `A{B,C}, B{C}, C{D}`, -this algorithm produces: +Given a `package{dep}` structure: `A{B,C}, B{C}, C{D}`, +the npm install algorithm produces: ```bash A @@ -466,39 +470,13 @@ A +-- D@1 ``` -Because B's D@1 will be installed in the top level, C now has to install D@2 +Because B's D@1 will be installed in the top-level, C now has to install D@2 privately for itself. This algorithm is deterministic, but different trees may be produced if two dependencies are requested for installation in a different order. -See [folders](/configuring-npm/folders) for a more detailed description of the specific folder structures that npm creates. - -### Limitations of npm's Install Algorithm - -npm will refuse to install any package with an identical name to the -current package. This can be overridden with the `--force` flag, but in -most cases can simply be addressed by changing the local package name. - -There are some very rare and pathological edge-cases where a cycle can -cause npm to try to install a never-ending tree of packages. Here is -the simplest case: - -```bash -A -> B -> A' -> B' -> A -> B -> A' -> B' -> A -> ... -``` - -where `A` is some version of a package, and `A'` is a different version -of the same package. Because `B` depends on a different version of `A` -than the one that is already in the tree, it must install a separate -copy. The same is true of `A'`, which must install `B'`. Because `B'` -depends on the original version of `A`, which has been overridden, the -cycle falls into infinite regress. - -To avoid this situation, npm flat-out refuses to install any -`name@version` that is already present anywhere in the tree of package -folder ancestors. A more correct, but more complex, solution would be -to symlink the existing version into the new location. If this ever -affects a real use-case, it will be investigated. +See [folders](/configuring-npm/folders) for a more detailed description of the +specific folder structures that npm creates. ### See Also diff --git a/deps/npm/docs/content/using-npm/config.md b/deps/npm/docs/content/using-npm/config.md index eef83ab8a101c2..c71e945129c5a9 100644 --- a/deps/npm/docs/content/using-npm/config.md +++ b/deps/npm/docs/content/using-npm/config.md @@ -109,33 +109,6 @@ npm ls -gpld npm ls --global --parseable --long --loglevel info ``` -### Per-Package Config Settings - -When running scripts (see [`scripts`](/using-npm/scripts)) the package.json "config" -keys are overwritten in the environment if there is a config param of -`[@]:`. For example, if the package.json has -this: - -```json -{ "name" : "foo" -, "config" : { "port" : "8080" } -, "scripts" : { "start" : "node server.js" } } -``` - -and the server.js is this: - -```javascript -http.createServer(...).listen(process.env.npm_package_config_port) -``` - -then the user could change the behavior by doing: - -```bash -npm config set foo:port 80 -``` - -See [package.json](/configuring-npm/package-json) for more information. - ### Config Settings #### access @@ -325,6 +298,18 @@ Number of ms to wait for cache lock files to expire. `--cache-min=9999 (or bigger)` is an alias for `--prefer-offline`. +#### call + +* Default: "" +* Type: String + +Optional companion option for `npm exec`, `npx` that allows for specifying a +custom command to be run along with the installed packages. + +```bash +npm exec --package yo --package generator-node --call "yo node" +``` + #### cert * Default: `null` @@ -346,6 +331,13 @@ It is _not_ the path to a certificate file (and there is no "certfile" option). This is a list of CIDR address to be used when configuring limited access tokens with the `npm token create` command. +#### commit-hooks + +* Default: `true` +* Type: Boolean + +Run git commit hooks when using the `npm version` command. + #### color * Default: true @@ -359,12 +351,12 @@ disabled when the environment variable `NO_COLOR` is set to any value. #### depth -* Default: 0 -* Type: Number +* Default: null +* Type: null or Number The depth to go when recursing packages for `npm ls`. -To make this default to `Infinity` instead of `0`, set `--all`. +To make this default to `Infinity` instead of `null`, set `--all`. #### description @@ -378,7 +370,7 @@ Show the description in `npm search` * Default: false * Type: Boolean -Install `dev-dependencies` along with packages. +\[Deprecated\] Install `dev-dependencies` along with packages. #### dry-run @@ -438,6 +430,15 @@ recommended that you do not use this option! Format `package-lock.json` or `npm-shrinkwrap.json` as a human readable file. +#### fund + +* Default: true +* Type: Boolean + +When "true" displays the message at the end of each `npm install` +aknowledging the number of dependencies looking for funding. +See [`npm fund`](/cli-commands/fund) for details. + #### fetch-retries * Default: 2 @@ -477,15 +478,6 @@ packages. The maximum amount of time to wait for HTTP requests to complete. -#### fund - -* Default: true -* Type: Boolean - -When "true" displays the message at the end of each `npm install` -aknowledging the number of dependencies looking for funding. -See [`npm fund`](/cli-commands/fund) for details. - #### git * Default: `"git"` @@ -502,13 +494,6 @@ the git binary. Tag the commit when using the `npm version` command. -#### commit-hooks - -* Default: `true` -* Type: Boolean - -Run git commit hooks when using the `npm version` command. - #### global * Default: false @@ -542,14 +527,6 @@ on will be flattened in their `node_modules` folders. This obviously will eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling` will be preferred. -#### group - -* Default: GID of the current process -* Type: String or Number - -The group to use when running package scripts in global mode as the root -user. - #### heading * Default: `"npm"` @@ -591,18 +568,27 @@ If true, npm will not run `prepublish` scripts. If true, npm does not run scripts specified in package.json files. +#### include + +* Default: `[prod|dev|optional|peer]` +* Type: Array + +Option that allows for defining which types of dependencies to install. + #### init-module +* Alias: `init.module` * Default: ~/.npm-init.js * Type: path A module that will be loaded by the `npm init` command. See the documentation for the -[init-package-json](https://github.com/isaacs/init-package-json) module +[init-package-json](https://github.com/npm/init-package-json) module for more information, or [npm init](/cli-commands/init). #### init-author-name +* Alias: `init.author.name` * Default: "" * Type: String @@ -610,6 +596,7 @@ The value `npm init` should use by default for the package author's name. #### init-author-email +* Alias: `init.author.email` * Default: "" * Type: String @@ -617,6 +604,7 @@ The value `npm init` should use by default for the package author's email. #### init-author-url +* Alias: `init.author.url` * Default: "" * Type: String @@ -624,6 +612,7 @@ The value `npm init` should use by default for the package author's homepage. #### init-license +* Alias: `init.license` * Default: "ISC" * Type: String @@ -631,6 +620,7 @@ The value `npm init` should use by default for the package license. #### init-version +* Alias: `init.version` * Default: "1.0.0" * Type: semver @@ -1247,15 +1237,6 @@ on success, but left behind on failure for forensic purposes. When set to true, npm uses unicode characters in the tree output. When false, it uses ascii characters to draw trees. -#### unsafe-perm - -* Default: false if running as root, true otherwise -* Type: Boolean - -Set to true to suppress the UID/GID switching when running package -scripts. If set explicitly to false, then installing as a non-root user -will fail. - #### update-notifier * Default: true @@ -1272,13 +1253,6 @@ version of npm than the latest. Set to show short usage output (like the -H output) instead of complete help when doing [`npm help`](/cli-commands/help). -#### user - -* Default: "nobody" -* Type: String or Number - -The UID to set to when running package scripts as root. - #### userconfig * Default: ~/.npmrc diff --git a/deps/npm/docs/public/cli-commands/npm-access/index.html b/deps/npm/docs/public/cli-commands/npm-access/index.html index dc55e42fed5629..4918604773503f 100644 --- a/deps/npm/docs/public/cli-commands/npm-access/index.html +++ b/deps/npm/docs/public/cli-commands/npm-access/index.html @@ -76,7 +76,7 @@ } } }) -

npm access

+

npm access

Set access level on published packages

Synopsis

npm access public [<package>]
@@ -150,4 +150,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-adduser/index.html b/deps/npm/docs/public/cli-commands/npm-adduser/index.html index f252affcdf60f7..0dfd583e081e81 100644 --- a/deps/npm/docs/public/cli-commands/npm-adduser/index.html +++ b/deps/npm/docs/public/cli-commands/npm-adduser/index.html @@ -76,7 +76,7 @@ } } }) -

+

section: cli-commands title: npm-adduser description: Set access level on published packages

@@ -145,4 +145,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-audit/index.html b/deps/npm/docs/public/cli-commands/npm-audit/index.html index 51bf06f53ed74b..944bf3f43c55e0 100644 --- a/deps/npm/docs/public/cli-commands/npm-audit/index.html +++ b/deps/npm/docs/public/cli-commands/npm-audit/index.html @@ -76,7 +76,7 @@ } } }) -

npm audit

+

npm audit

Run a security audit

Synopsis

npm audit [--json|--parseable|--audit-level=(low|moderate|high|critical)]
@@ -167,4 +167,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-bin/index.html b/deps/npm/docs/public/cli-commands/npm-bin/index.html index 335d007d77aa9e..1171efadbd1c10 100644 --- a/deps/npm/docs/public/cli-commands/npm-bin/index.html +++ b/deps/npm/docs/public/cli-commands/npm-bin/index.html @@ -76,7 +76,7 @@ } } }) -

npm bin

+

npm bin

Display npm bin folder

Synopsis

npm bin [-g|--global]
@@ -96,4 +96,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-bugs/index.html b/deps/npm/docs/public/cli-commands/npm-bugs/index.html index 3b7c8493f45d83..34671e1ed4a4e2 100644 --- a/deps/npm/docs/public/cli-commands/npm-bugs/index.html +++ b/deps/npm/docs/public/cli-commands/npm-bugs/index.html @@ -76,7 +76,7 @@ } } }) -

npm bugs

+

npm bugs

Bugs for a package in a web browser maybe

Synopsis

npm bugs [<pkgname> [<pkgname> ...]]
@@ -119,4 +119,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-bundle/index.html b/deps/npm/docs/public/cli-commands/npm-bundle/index.html index e096775f4cbfa8..5aa55a320e5ab4 100644 --- a/deps/npm/docs/public/cli-commands/npm-bundle/index.html +++ b/deps/npm/docs/public/cli-commands/npm-bundle/index.html @@ -76,7 +76,7 @@ } } }) -

npm bundle

+

npm bundle

REMOVED

Description

The npm bundle command has been removed in 1.0, for the simple reason @@ -93,4 +93,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-cache/index.html b/deps/npm/docs/public/cli-commands/npm-cache/index.html index 7b2f5bfb477de6..c47902bd16af54 100644 --- a/deps/npm/docs/public/cli-commands/npm-cache/index.html +++ b/deps/npm/docs/public/cli-commands/npm-cache/index.html @@ -76,7 +76,7 @@ } } }) -

npm cache

+

npm cache

Manipulates packages cache

Synopsis

npm cache add <tarball file>
@@ -147,4 +147,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-ci/index.html b/deps/npm/docs/public/cli-commands/npm-ci/index.html index b4267dcf18a9c0..6e59c5de98d33c 100644 --- a/deps/npm/docs/public/cli-commands/npm-ci/index.html +++ b/deps/npm/docs/public/cli-commands/npm-ci/index.html @@ -76,7 +76,7 @@ } } }) -

npm ci

+

npm ci

Install a project with a clean slate

Synopsis

npm ci
@@ -124,4 +124,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-completion/index.html b/deps/npm/docs/public/cli-commands/npm-completion/index.html index f7effb9bc62874..d412fa3dea2ba8 100644 --- a/deps/npm/docs/public/cli-commands/npm-completion/index.html +++ b/deps/npm/docs/public/cli-commands/npm-completion/index.html @@ -76,7 +76,7 @@ } } }) -

npm completion

+

npm completion

Tab Completion for npm

Synopsis

source <(npm completion)
@@ -106,4 +106,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-config/index.html b/deps/npm/docs/public/cli-commands/npm-config/index.html index dcabf623d55a98..31fd29c1bd4501 100644 --- a/deps/npm/docs/public/cli-commands/npm-config/index.html +++ b/deps/npm/docs/public/cli-commands/npm-config/index.html @@ -76,7 +76,7 @@ } } }) -

npm config

+

npm config

Manage the npm configuration files

Synopsis

npm config set <key> <value> [-g|--global]
@@ -130,4 +130,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-dedupe/index.html b/deps/npm/docs/public/cli-commands/npm-dedupe/index.html index f45995396eb53c..faaa6121c9cf80 100644 --- a/deps/npm/docs/public/cli-commands/npm-dedupe/index.html +++ b/deps/npm/docs/public/cli-commands/npm-dedupe/index.html @@ -76,7 +76,7 @@ } } }) -

npm dedupe

+

npm dedupe

Reduce duplication

Synopsis

npm dedupe
@@ -124,4 +124,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-deprecate/index.html b/deps/npm/docs/public/cli-commands/npm-deprecate/index.html index e318eee7950ae9..60e47bf0a965e9 100644 --- a/deps/npm/docs/public/cli-commands/npm-deprecate/index.html +++ b/deps/npm/docs/public/cli-commands/npm-deprecate/index.html @@ -76,7 +76,7 @@ } } }) -

npm deprecate

+

npm deprecate

Deprecate a version of a package

Synopsis

npm deprecate <pkg>[@<version>] <message>
@@ -102,4 +102,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-dist-tag/index.html b/deps/npm/docs/public/cli-commands/npm-dist-tag/index.html index 649153bc99a0df..33e9577d79879d 100644 --- a/deps/npm/docs/public/cli-commands/npm-dist-tag/index.html +++ b/deps/npm/docs/public/cli-commands/npm-dist-tag/index.html @@ -76,7 +76,7 @@ } } }) -

+

section: cli-commands title: npm-dist-tag description: Modify package distribution tags

@@ -151,4 +151,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-docs/index.html b/deps/npm/docs/public/cli-commands/npm-docs/index.html index 3e3905817d5698..47e251863e2456 100644 --- a/deps/npm/docs/public/cli-commands/npm-docs/index.html +++ b/deps/npm/docs/public/cli-commands/npm-docs/index.html @@ -76,7 +76,7 @@ } } }) -

npm docs

+

npm docs

Docs for a package in a web browser maybe

Synopsis

npm docs [<pkgname> [<pkgname> ...]]
@@ -119,4 +119,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-doctor/index.html b/deps/npm/docs/public/cli-commands/npm-doctor/index.html index 9bdde83f73ba87..751c4b6ccc9a4d 100644 --- a/deps/npm/docs/public/cli-commands/npm-doctor/index.html +++ b/deps/npm/docs/public/cli-commands/npm-doctor/index.html @@ -76,7 +76,7 @@ } } }) -

npm doctor

+

npm doctor

Check your environments

Synopsis

npm doctor
@@ -165,4 +165,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-edit/index.html b/deps/npm/docs/public/cli-commands/npm-edit/index.html index 38e8d02e6cca29..4db120eae06a05 100644 --- a/deps/npm/docs/public/cli-commands/npm-edit/index.html +++ b/deps/npm/docs/public/cli-commands/npm-edit/index.html @@ -76,7 +76,7 @@ } } }) -

npm edit

+

npm edit

Edit an installed package

Synopsis

npm edit <pkg>[/<subpkg>...]
@@ -112,4 +112,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-exec/index.html b/deps/npm/docs/public/cli-commands/npm-exec/index.html index a8fc6dd0e863e0..d0e15cb49a35c7 100644 --- a/deps/npm/docs/public/cli-commands/npm-exec/index.html +++ b/deps/npm/docs/public/cli-commands/npm-exec/index.html @@ -76,7 +76,7 @@ } } }) -

npm exec

+

npm exec

Run a command from a local or remote npm package

Synopsis

npm exec -- <pkg>[@<version>] [args...]
@@ -206,4 +206,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-explain/index.html b/deps/npm/docs/public/cli-commands/npm-explain/index.html index b550d426ccdd8e..ea048280130502 100644 --- a/deps/npm/docs/public/cli-commands/npm-explain/index.html +++ b/deps/npm/docs/public/cli-commands/npm-explain/index.html @@ -76,7 +76,7 @@ } } }) -

npm explain

+

npm explain

Explain installed packages

Synopsis

npm explain <folder | specifier>
@@ -135,4 +135,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-explore/index.html b/deps/npm/docs/public/cli-commands/npm-explore/index.html index 5f8b066638ba6c..298ab3c1a056fd 100644 --- a/deps/npm/docs/public/cli-commands/npm-explore/index.html +++ b/deps/npm/docs/public/cli-commands/npm-explore/index.html @@ -76,7 +76,7 @@ } } }) -

+

section: cli-commands title: npm-explore description: Browse an installed package

@@ -116,4 +116,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-fund/index.html b/deps/npm/docs/public/cli-commands/npm-fund/index.html index 6ae430f1a03efb..4eeeeccb44ded0 100644 --- a/deps/npm/docs/public/cli-commands/npm-fund/index.html +++ b/deps/npm/docs/public/cli-commands/npm-fund/index.html @@ -76,7 +76,7 @@ } } }) -

npm fund

+

npm fund

Retrieve funding information

Synopsis

    npm fund [<pkg>]
@@ -130,4 +130,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-help-search/index.html b/deps/npm/docs/public/cli-commands/npm-help-search/index.html index 9a2dc3c42f73c3..91bbbeba8f0a9e 100644 --- a/deps/npm/docs/public/cli-commands/npm-help-search/index.html +++ b/deps/npm/docs/public/cli-commands/npm-help-search/index.html @@ -76,7 +76,7 @@ } } }) -

npm help-search

+

npm help-search

Search npm help documentation

Synopsis

npm help-search <text>
@@ -107,4 +107,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-help/index.html b/deps/npm/docs/public/cli-commands/npm-help/index.html index f5602ac782696e..edb58873159dc3 100644 --- a/deps/npm/docs/public/cli-commands/npm-help/index.html +++ b/deps/npm/docs/public/cli-commands/npm-help/index.html @@ -76,7 +76,7 @@ } } }) -

npm help

+

npm help

Get help on npm

Synopsis

npm help <term> [<terms..>]
@@ -109,4 +109,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-hook/index.html b/deps/npm/docs/public/cli-commands/npm-hook/index.html index 99e8663248335e..adad1a82a2b7e1 100644 --- a/deps/npm/docs/public/cli-commands/npm-hook/index.html +++ b/deps/npm/docs/public/cli-commands/npm-hook/index.html @@ -76,7 +76,7 @@ } } }) -

npm hook

+

npm hook

Manage registry hooks

Synopsis

npm hook ls [pkg]
@@ -121,4 +121,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-init/index.html b/deps/npm/docs/public/cli-commands/npm-init/index.html index 21ea6ede13d0f6..31c6a86603dce0 100644 --- a/deps/npm/docs/public/cli-commands/npm-init/index.html +++ b/deps/npm/docs/public/cli-commands/npm-init/index.html @@ -76,7 +76,7 @@ } } }) -

npm init

+

npm init

create a package.json file

Synopsis

npm init [--force|-f|--yes|-y|--scope]
@@ -128,4 +128,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-install-ci-test/index.html b/deps/npm/docs/public/cli-commands/npm-install-ci-test/index.html index 0c1892e1d8c5be..3a07f37197a9a0 100644 --- a/deps/npm/docs/public/cli-commands/npm-install-ci-test/index.html +++ b/deps/npm/docs/public/cli-commands/npm-install-ci-test/index.html @@ -76,7 +76,7 @@ } } }) -

npm install-ci-test

+

npm install-ci-test

Install a project with a clean slate and run tests

Synopsis

npm install-ci-test
@@ -95,4 +95,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-install-test/index.html b/deps/npm/docs/public/cli-commands/npm-install-test/index.html index 78a6a93e158359..ed2e80538f6278 100644 --- a/deps/npm/docs/public/cli-commands/npm-install-test/index.html +++ b/deps/npm/docs/public/cli-commands/npm-install-test/index.html @@ -76,7 +76,7 @@ } } }) -

npm install-test

+

npm install-test

Install package(s) and run tests

Synopsis

npm install-test (with no args, in package dir)
@@ -104,4 +104,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-install/index.html b/deps/npm/docs/public/cli-commands/npm-install/index.html index 226e794469c4f2..7418957489feee 100644 --- a/deps/npm/docs/public/cli-commands/npm-install/index.html +++ b/deps/npm/docs/public/cli-commands/npm-install/index.html @@ -76,7 +76,7 @@ } } }) -

npm install

+

npm install

Install a package

Synopsis

Description

-

This command installs a package, and any packages that it depends on. If the -package has a package-lock or shrinkwrap file, the installation of dependencies -will be driven by that, with an npm-shrinkwrap.json taking precedence if both -files exist. See package-lock.json and npm shrinkwrap.

+

This command installs a package and any packages that it depends on. If the +package has a package-lock, or an npm shrinkwrap file, or a yarn lock file, the +installation of dependencies will be driven by that, respecting the following +order of precedence:

+
    +
  • node_modules/.package-lock.json
  • +
  • npm-shrinkwrap.json
  • +
  • package-lock.json
  • +
  • yarn.lock
  • +
+

See package-lock.json and npm shrinkwrap.

A package is:

  • npm install <git remote url>:

    @@ -280,6 +287,7 @@

    See the git man page for details.

    Examples:

    npm install git+ssh://git@github.com:npm/cli.git#v1.0.27
    +npm install git+ssh://git@github.com:npm/cli#pull/273
     npm install git+ssh://git@github.com:npm/cli#semver:^5.0
     npm install git+https://isaacs@github.com/npm/cli.git
     npm install git://github.com/npm/cli.git#v1.0.27
    @@ -297,7 +305,7 @@ 

    #<commit-ish> or #semver:<semver> is specified, then master is used.

    As with regular git dependencies, dependencies and devDependencies will -be installed if the package has a prepare script, before the package is +be installed if the package has a prepare script before the package is done installing.

    Examples:

  • -

    You may combine multiple arguments, and even multiple types of arguments. +

    You may combine multiple arguments and even multiple types of arguments. For example:

    npm install sax@">=0.1.0 <0.2.0" bench supervisor

    The --tag argument will apply to all of the specified install targets. If a @@ -361,9 +369,6 @@

    The -f or --force argument will force npm to fetch remote resources even if a local copy exists on disk.

    npm install sax --force
    -

    The --no-fund argument will hide the message displayed at the end of each -install that acknowledges the number of dependencies looking for funding. -See npm-fund(1)

    The -g or --global argument will cause npm to install the package globally rather than locally. See folders.

    The --global-style argument will cause npm to install the package into @@ -376,39 +381,39 @@

    The --legacy-bundling argument will cause npm to install the package such that versions of npm prior to 1.4, such as the one included with node 0.8, can install the package. This eliminates all automatic deduping.

    +

    The --legacy-peer-deps argument will cause npm to ignore all +peerDependencies when installing, similar to npm@6 and older.

    The --link argument will cause npm to link global installs into the -local space in some cases.

    +local space whenever packages from the global space may satisfy a dependency +required version.

    +

    The --no-audit argument can be used to disable sending audit reports to +the configured registries. See npm-audit for details on what +is sent.

    The --no-bin-links argument will prevent npm from creating symlinks for any binaries the package might contain.

    +

    The --no-fund argument will hide the message displayed at the end of each +install that acknowledges the number of dependencies looking for funding. +See npm-fund

    The --no-optional argument will prevent optional dependencies from being installed.

    The --no-shrinkwrap argument, which will ignore an available -package lock or shrinkwrap file and use the package.json instead.

    +package-lock or shrinkwrap file and use the package.json instead.

    The --no-package-lock argument will prevent npm from creating a package-lock.json file. When running with package-lock's disabled npm will not automatically prune your node modules when installing.

    The --nodedir=/path/to/node/source argument will allow npm to find the node source code so that npm can compile native modules.

    The --only={prod[uction]|dev[elopment]} argument will cause either only -devDependencies or only non-devDependencies to be installed regardless of the NODE_ENV.

    -

    The --no-audit argument can be used to disable sending of audit reports to -the configured registries. See npm-audit for details on what is sent.

    +devDependencies or only non-devDependencies to be installed regardless +of the NODE_ENV.

    +

    The --strict-peer-deps argument will cause the install to fail on any +peerDependencies conflict, even if it's possible to use a heuristic to +provide a least-surprising resolution to a given conflict.

    See config. Many of the configuration params have some effect on installation, since that's most of what npm does.

    Algorithm

    -

    To install a package, npm uses the following algorithm:

    -
    load the existing node_modules tree from disk
    -clone the tree
    -fetch the package.json and assorted metadata and add it to the clone
    -walk the clone and add any missing dependencies
    -  dependencies will be added as close to the top as is possible
    -  without breaking any other modules
    -compare the original tree with the cloned tree and make a list of
    -actions to take to convert one to the other
    -execute all of the actions, deepest first
    -  kinds of actions are install, update, remove and move
    -

    For this package{dep} structure: A{B,C}, B{C}, C{D}, -this algorithm produces:

    +

    Given a package{dep} structure: A{B,C}, B{C}, C{D}, +the npm install algorithm produces:

    A
     +-- B
     +-- C
    @@ -422,30 +427,12 @@ 

    folders for a more detailed description of the specific folder structures that npm creates.

    -

    Limitations of npm's Install Algorithm

    -

    npm will refuse to install any package with an identical name to the -current package. This can be overridden with the --force flag, but in -most cases can simply be addressed by changing the local package name.

    -

    There are some very rare and pathological edge-cases where a cycle can -cause npm to try to install a never-ending tree of packages. Here is -the simplest case:

    -
    A -> B -> A' -> B' -> A -> B -> A' -> B' -> A -> ...
    -

    where A is some version of a package, and A' is a different version -of the same package. Because B depends on a different version of A -than the one that is already in the tree, it must install a separate -copy. The same is true of A', which must install B'. Because B' -depends on the original version of A, which has been overridden, the -cycle falls into infinite regress.

    -

    To avoid this situation, npm flat-out refuses to install any -name@version that is already present anywhere in the tree of package -folder ancestors. A more correct, but more complex, solution would be -to symlink the existing version into the new location. If this ever -affects a real use-case, it will be investigated.

    +

    See folders for a more detailed description of the +specific folder structures that npm creates.

    See Also

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-link/index.html b/deps/npm/docs/public/cli-commands/npm-link/index.html index d850c87766ce23..71fdb10c4abe4d 100644 --- a/deps/npm/docs/public/cli-commands/npm-link/index.html +++ b/deps/npm/docs/public/cli-commands/npm-link/index.html @@ -76,7 +76,7 @@ } } }) -

    npm link

    +

    npm link

    Synopsis

    npm link (in package dir)
    @@ -136,4 +136,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-logout/index.html b/deps/npm/docs/public/cli-commands/npm-logout/index.html index ba8508271b0f58..84ec104a5837fb 100644 --- a/deps/npm/docs/public/cli-commands/npm-logout/index.html +++ b/deps/npm/docs/public/cli-commands/npm-logout/index.html @@ -76,7 +76,7 @@ } } }) -

    npm logout

    +

    npm logout

    Log out of the registry

    Synopsis

    npm logout [--registry=<url>] [--scope=<@scope>]
    @@ -111,4 +111,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-ls/index.html b/deps/npm/docs/public/cli-commands/npm-ls/index.html index 50055899b87846..f46291ead05555 100644 --- a/deps/npm/docs/public/cli-commands/npm-ls/index.html +++ b/deps/npm/docs/public/cli-commands/npm-ls/index.html @@ -76,7 +76,7 @@ } } }) -

    npm ls

    +
    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-org/index.html b/deps/npm/docs/public/cli-commands/npm-org/index.html index 2ccb825a2421b6..b50e1c96110af0 100644 --- a/deps/npm/docs/public/cli-commands/npm-org/index.html +++ b/deps/npm/docs/public/cli-commands/npm-org/index.html @@ -76,7 +76,7 @@ } } }) -

    npm org

    +

    npm org

    Manage orgs

    Synopsis

    npm org set <orgname> <username> [developer | admin | owner]
    @@ -109,4 +109,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-outdated/index.html b/deps/npm/docs/public/cli-commands/npm-outdated/index.html index 4d2134b1204c11..8cc04200addb69 100644 --- a/deps/npm/docs/public/cli-commands/npm-outdated/index.html +++ b/deps/npm/docs/public/cli-commands/npm-outdated/index.html @@ -76,7 +76,7 @@ } } }) -

    npm outdated

    +

    npm outdated

    Check for outdated packages

    Synopsis

    npm outdated [[<@scope>/]<pkg> ...]
    @@ -179,4 +179,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-owner/index.html b/deps/npm/docs/public/cli-commands/npm-owner/index.html index f3d6f4b9319081..1ac790d2ddca63 100644 --- a/deps/npm/docs/public/cli-commands/npm-owner/index.html +++ b/deps/npm/docs/public/cli-commands/npm-owner/index.html @@ -76,7 +76,7 @@ } } }) -

    npm owner

    +

    npm owner

    Manage package owners

    Synopsis

    npm owner add <user> [<@scope>/]<pkg>
    @@ -116,4 +116,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-pack/index.html b/deps/npm/docs/public/cli-commands/npm-pack/index.html index d49cfc73ef102f..5203ec42e4dec4 100644 --- a/deps/npm/docs/public/cli-commands/npm-pack/index.html +++ b/deps/npm/docs/public/cli-commands/npm-pack/index.html @@ -76,7 +76,7 @@ } } }) -

    npm pack

    +

    npm pack

    Create a tarball from a package

    Synopsis

    npm pack [[<@scope>/]<pkg>...] [--dry-run]
    @@ -104,4 +104,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-ping/index.html b/deps/npm/docs/public/cli-commands/npm-ping/index.html index c0b848871a8b85..d67c1c7d379b1c 100644 --- a/deps/npm/docs/public/cli-commands/npm-ping/index.html +++ b/deps/npm/docs/public/cli-commands/npm-ping/index.html @@ -76,7 +76,7 @@ } } }) -

    npm ping

    +

    npm ping

    Ping npm registry

    Synopsis

    npm ping [--registry <registry>]
    @@ -97,4 +97,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-prefix/index.html b/deps/npm/docs/public/cli-commands/npm-prefix/index.html index 6764a6b62238ad..93b3a8ec71888f 100644 --- a/deps/npm/docs/public/cli-commands/npm-prefix/index.html +++ b/deps/npm/docs/public/cli-commands/npm-prefix/index.html @@ -76,7 +76,7 @@ } } }) -

    npm prefix

    +

    npm prefix

    Display prefix

    Synopsis

    npm prefix [-g]
    @@ -100,4 +100,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-profile/index.html b/deps/npm/docs/public/cli-commands/npm-profile/index.html index 466473ca2af0c5..2b3d724eb83a03 100644 --- a/deps/npm/docs/public/cli-commands/npm-profile/index.html +++ b/deps/npm/docs/public/cli-commands/npm-profile/index.html @@ -76,7 +76,7 @@ } } }) -

    npm profile

    +

    npm profile

    Change settings on your registry profile

    Synopsis

    npm profile get [--json|--parseable] [<property>]
    @@ -150,4 +150,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-prune/index.html b/deps/npm/docs/public/cli-commands/npm-prune/index.html index 52a0629df1140a..b7a802ab1b1263 100644 --- a/deps/npm/docs/public/cli-commands/npm-prune/index.html +++ b/deps/npm/docs/public/cli-commands/npm-prune/index.html @@ -76,7 +76,7 @@ } } }) -

    npm prune

    +

    npm prune

    Remove extraneous packages

    Synopsis

    npm prune [[<@scope>/]<pkg>...] [--production] [--dry-run] [--json]
    @@ -110,4 +110,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-publish/index.html b/deps/npm/docs/public/cli-commands/npm-publish/index.html index 5717934c24bba3..0e525d57119c4d 100644 --- a/deps/npm/docs/public/cli-commands/npm-publish/index.html +++ b/deps/npm/docs/public/cli-commands/npm-publish/index.html @@ -76,7 +76,7 @@ } } }) -

    npm publish

    +

    npm publish

    Publish a package

    Synopsis

    npm publish [<tarball>|<folder>] [--tag <tag>] [--access <public|restricted>] [--otp otpcode] [--dry-run]
    @@ -142,4 +142,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-rebuild/index.html b/deps/npm/docs/public/cli-commands/npm-rebuild/index.html index fae521d64741d2..2c174c6f376bb3 100644 --- a/deps/npm/docs/public/cli-commands/npm-rebuild/index.html +++ b/deps/npm/docs/public/cli-commands/npm-rebuild/index.html @@ -76,7 +76,7 @@ } } }) -

    npm rebuild

    +

    npm rebuild

    Rebuild a package

    Synopsis

    npm rebuild [[<@scope>/<name>]...]
    @@ -95,4 +95,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-repo/index.html b/deps/npm/docs/public/cli-commands/npm-repo/index.html index 750941fa716ec3..aa16c099c3bdf6 100644 --- a/deps/npm/docs/public/cli-commands/npm-repo/index.html +++ b/deps/npm/docs/public/cli-commands/npm-repo/index.html @@ -76,7 +76,7 @@ } } }) -

    npm repo

    +

    npm repo

    Open package repository page in the browser

    Synopsis

    npm repo [<pkgname> [<pkgname> ...]]
    @@ -106,4 +106,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-restart/index.html b/deps/npm/docs/public/cli-commands/npm-restart/index.html index a66e3943e70e9e..404953444e8f90 100644 --- a/deps/npm/docs/public/cli-commands/npm-restart/index.html +++ b/deps/npm/docs/public/cli-commands/npm-restart/index.html @@ -76,7 +76,7 @@ } } }) -

    npm restart

    +

    npm restart

    Restart a package

    Synopsis

    npm restart [-- <args>]
    @@ -115,4 +115,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-root/index.html b/deps/npm/docs/public/cli-commands/npm-root/index.html index 15870a41f86e5d..bd7c15bca4f8f0 100644 --- a/deps/npm/docs/public/cli-commands/npm-root/index.html +++ b/deps/npm/docs/public/cli-commands/npm-root/index.html @@ -76,7 +76,7 @@ } } }) -

    npm root

    +

    npm root

    Display npm root

    Synopsis

    npm root [-g]
    @@ -96,4 +96,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-run-script/index.html b/deps/npm/docs/public/cli-commands/npm-run-script/index.html index 95d470ffc4ec1f..238412452b945d 100644 --- a/deps/npm/docs/public/cli-commands/npm-run-script/index.html +++ b/deps/npm/docs/public/cli-commands/npm-run-script/index.html @@ -76,7 +76,7 @@ } } }) -

    npm run-script

    +

    npm run-script

    Run arbitrary package scripts

    Synopsis

    npm run-script <command> [--silent] [-- <args>...]
    @@ -145,4 +145,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-search/index.html b/deps/npm/docs/public/cli-commands/npm-search/index.html index daa59da2feffda..23ba2329c4707e 100644 --- a/deps/npm/docs/public/cli-commands/npm-search/index.html +++ b/deps/npm/docs/public/cli-commands/npm-search/index.html @@ -76,7 +76,7 @@ } } }) -

    npm search

    +

    npm search

    Search for packages

    Synopsis

    npm search [-l|--long] [--json] [--parseable] [--no-description] [search terms ...]
    @@ -170,4 +170,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-shrinkwrap/index.html b/deps/npm/docs/public/cli-commands/npm-shrinkwrap/index.html index 651fa00fcccafc..ade4331614f5af 100644 --- a/deps/npm/docs/public/cli-commands/npm-shrinkwrap/index.html +++ b/deps/npm/docs/public/cli-commands/npm-shrinkwrap/index.html @@ -76,7 +76,7 @@ } } }) -

    npm shrinkwrap

    +

    npm shrinkwrap

    Lock down dependency versions for publication

    Synopsis

    npm shrinkwrap
    @@ -103,4 +103,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-star/index.html b/deps/npm/docs/public/cli-commands/npm-star/index.html index 4e812c54fd97ca..cbb07699a26857 100644 --- a/deps/npm/docs/public/cli-commands/npm-star/index.html +++ b/deps/npm/docs/public/cli-commands/npm-star/index.html @@ -76,7 +76,7 @@ } } }) -

    npm star

    +

    npm star

    Mark your favorite packages

    Synopsis

    npm star [<pkg>...]
    @@ -98,4 +98,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-stars/index.html b/deps/npm/docs/public/cli-commands/npm-stars/index.html index 04053e311a4945..3a617853ee19d8 100644 --- a/deps/npm/docs/public/cli-commands/npm-stars/index.html +++ b/deps/npm/docs/public/cli-commands/npm-stars/index.html @@ -76,7 +76,7 @@ } } }) -

    npm stars

    +

    npm stars

    View packages marked as favorites

    Synopsis

    npm stars [<user>]
    @@ -98,4 +98,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-start/index.html b/deps/npm/docs/public/cli-commands/npm-start/index.html index 96ee00ee3d8276..165f0ad156ae3c 100644 --- a/deps/npm/docs/public/cli-commands/npm-start/index.html +++ b/deps/npm/docs/public/cli-commands/npm-start/index.html @@ -76,7 +76,7 @@ } } }) -

    npm start

    +

    npm start

    Start a package

    Synopsis

    npm start [-- <args>]
    @@ -100,4 +100,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-stop/index.html b/deps/npm/docs/public/cli-commands/npm-stop/index.html index b272aea10cbaaa..6855c2733fab94 100644 --- a/deps/npm/docs/public/cli-commands/npm-stop/index.html +++ b/deps/npm/docs/public/cli-commands/npm-stop/index.html @@ -76,7 +76,7 @@ } } }) -

    npm stop

    +

    npm stop

    Stop a package

    Synopsis

    npm stop [-- <args>]
    @@ -96,4 +96,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-team/index.html b/deps/npm/docs/public/cli-commands/npm-team/index.html index 72bc6a42ea0bd9..d4dedf3825068a 100644 --- a/deps/npm/docs/public/cli-commands/npm-team/index.html +++ b/deps/npm/docs/public/cli-commands/npm-team/index.html @@ -76,7 +76,7 @@ } } }) -

    npm team

    +

    npm team

    Manage organization teams and team memberships

    Synopsis

    npm team create <scope:team>
    @@ -127,4 +127,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-test/index.html b/deps/npm/docs/public/cli-commands/npm-test/index.html index 02b29dedab445d..bc5ed0b3333c91 100644 --- a/deps/npm/docs/public/cli-commands/npm-test/index.html +++ b/deps/npm/docs/public/cli-commands/npm-test/index.html @@ -76,7 +76,7 @@ } } }) -

    npm test

    +

    npm test

    Test a package

    Synopsis

    npm test [-- <args>]
    @@ -98,4 +98,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-token/index.html b/deps/npm/docs/public/cli-commands/npm-token/index.html index ef225d61632bfd..b896171cca51bc 100644 --- a/deps/npm/docs/public/cli-commands/npm-token/index.html +++ b/deps/npm/docs/public/cli-commands/npm-token/index.html @@ -76,7 +76,7 @@ } } }) -

    npm token

    +

    npm token

    Manage your authentication tokens

    Synopsis

      npm token list [--json|--parseable]
    @@ -135,4 +135,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-uninstall/index.html b/deps/npm/docs/public/cli-commands/npm-uninstall/index.html index 1a7c37da1ca308..f2e851d1620f2a 100644 --- a/deps/npm/docs/public/cli-commands/npm-uninstall/index.html +++ b/deps/npm/docs/public/cli-commands/npm-uninstall/index.html @@ -76,7 +76,7 @@ } } }) -

    npm uninstall

    +

    npm uninstall

    Remove a package

    Synopsis

    npm uninstall [<@scope>/]<pkg>[@<version>]... [-S|--save|-D|--save-dev|-O|--save-optional|--no-save]
    @@ -120,4 +120,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-unpublish/index.html b/deps/npm/docs/public/cli-commands/npm-unpublish/index.html index 0cd093012b8296..c7c79db93db0ff 100644 --- a/deps/npm/docs/public/cli-commands/npm-unpublish/index.html +++ b/deps/npm/docs/public/cli-commands/npm-unpublish/index.html @@ -76,7 +76,7 @@ } } }) -

    npm unpublish

    +

    npm unpublish

    Remove a package from the registry

    Synopsis

    Unpublishing a single version of a package

    @@ -108,4 +108,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-update/index.html b/deps/npm/docs/public/cli-commands/npm-update/index.html index fbe288f5c2aee7..2d5ccf652afca6 100644 --- a/deps/npm/docs/public/cli-commands/npm-update/index.html +++ b/deps/npm/docs/public/cli-commands/npm-update/index.html @@ -76,7 +76,7 @@ } } }) -

    npm update

    +

    npm update

    Update a package

    Synopsis

    npm update [-g] [<pkg>...]
    @@ -169,4 +169,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-version/index.html b/deps/npm/docs/public/cli-commands/npm-version/index.html index bd11770b1620f0..284d57786c099c 100644 --- a/deps/npm/docs/public/cli-commands/npm-version/index.html +++ b/deps/npm/docs/public/cli-commands/npm-version/index.html @@ -76,7 +76,7 @@ } } }) -

    npm version

    +

    npm version

    Bump a package version

    Synopsis

    npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease [--preid=<prerelease-id>] | from-git]
    @@ -182,4 +182,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-view/index.html b/deps/npm/docs/public/cli-commands/npm-view/index.html index 8900442dddfa44..9b413e14dfca57 100644 --- a/deps/npm/docs/public/cli-commands/npm-view/index.html +++ b/deps/npm/docs/public/cli-commands/npm-view/index.html @@ -76,7 +76,7 @@ } } }) -

    npm view

    +

    npm view

    View registry info

    Synopsis

    npm view [<@scope>/]<name>[@<version>] [<field>[.<subfield>]...]
    @@ -147,4 +147,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-whoami/index.html b/deps/npm/docs/public/cli-commands/npm-whoami/index.html index dd050f23dfe21a..08f74cab5d94ab 100644 --- a/deps/npm/docs/public/cli-commands/npm-whoami/index.html +++ b/deps/npm/docs/public/cli-commands/npm-whoami/index.html @@ -76,7 +76,7 @@ } } }) -

    npm whoami

    +

    npm whoami

    Display npm username

    Synopsis

    npm whoami [--registry <registry>]
    @@ -94,4 +94,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm/index.html b/deps/npm/docs/public/cli-commands/npm/index.html index 1d3dc15885f48a..119e885928e66d 100644 --- a/deps/npm/docs/public/cli-commands/npm/index.html +++ b/deps/npm/docs/public/cli-commands/npm/index.html @@ -76,12 +76,12 @@ } } }) -

    npm

    +

    npm

    javascript package manager

    Synopsis

    npm <command> [args]

    Version

    -

    7.0.0-rc.4

    +

    7.0.0

    Description

    npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency @@ -213,4 +213,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npx/index.html b/deps/npm/docs/public/cli-commands/npx/index.html index 0107f5c1a2d593..edf42c987f9373 100644 --- a/deps/npm/docs/public/cli-commands/npx/index.html +++ b/deps/npm/docs/public/cli-commands/npx/index.html @@ -76,7 +76,7 @@ } } }) -

    npx

    +

    npx

    Run a command from a local or remote npm package

    Synopsis

    npm exec -- <pkg>[@<version>] [args...]
    @@ -206,4 +206,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/folders/index.html b/deps/npm/docs/public/configuring-npm/folders/index.html index af5d4e1381be91..bbf95c9a8a3e48 100644 --- a/deps/npm/docs/public/configuring-npm/folders/index.html +++ b/deps/npm/docs/public/configuring-npm/folders/index.html @@ -76,7 +76,7 @@ } } }) -

    folders

    +

    folders

    Folder Structures Used by npm

    Description

    npm puts various things on your computer. That's its job.

    @@ -242,4 +242,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/install/index.html b/deps/npm/docs/public/configuring-npm/install/index.html index 7dc24cc83fcbf0..0c5c9719c03d45 100644 --- a/deps/npm/docs/public/configuring-npm/install/index.html +++ b/deps/npm/docs/public/configuring-npm/install/index.html @@ -76,7 +76,7 @@ } } }) -

    install

    +

    install

    Download and Install npm

    Description

    To publish and install packages to and from the public npm registry, you must install Node.js and the npm command line interface using either a Node version manager or a Node installer. We strongly recommend using a Node version manager to install Node.js and npm. We do not recommend using a Node installer, since the Node installation process installs npm in a directory with local permissions and can cause permissions errors when you run npm packages globally.

    @@ -125,4 +125,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/npmrc/index.html b/deps/npm/docs/public/configuring-npm/npmrc/index.html index 028ae09e471c62..2251442eea6ca6 100644 --- a/deps/npm/docs/public/configuring-npm/npmrc/index.html +++ b/deps/npm/docs/public/configuring-npm/npmrc/index.html @@ -76,7 +76,7 @@ } } }) -

    npmrc

    +

    npmrc

    The npm config files

    Description

    npm gets its config settings from the command line, environment @@ -147,4 +147,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/package-json/index.html b/deps/npm/docs/public/configuring-npm/package-json/index.html index b90ccc1627c1a0..ea4cfa76713499 100644 --- a/deps/npm/docs/public/configuring-npm/package-json/index.html +++ b/deps/npm/docs/public/configuring-npm/package-json/index.html @@ -76,7 +76,7 @@ } } }) -

    package.json

    +

    package.json

    Specifics of npm's package.json handling

    Description

    This document is all you need to know about what's required in your package.json @@ -715,4 +715,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/package-lock-json/index.html b/deps/npm/docs/public/configuring-npm/package-lock-json/index.html index a5768638f137d5..f5d33966cb57f5 100644 --- a/deps/npm/docs/public/configuring-npm/package-lock-json/index.html +++ b/deps/npm/docs/public/configuring-npm/package-lock-json/index.html @@ -76,7 +76,7 @@ } } }) -

    package-lock.json

    +

    package-lock.json

    A manifestation of the manifest

    Description

    package-lock.json is automatically generated for any operations where npm @@ -188,4 +188,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/package-locks/index.html b/deps/npm/docs/public/configuring-npm/package-locks/index.html index 5a95fd23e5724e..8f0829ca6e0316 100644 --- a/deps/npm/docs/public/configuring-npm/package-locks/index.html +++ b/deps/npm/docs/public/configuring-npm/package-locks/index.html @@ -76,7 +76,7 @@ } } }) -

    package-locks

    +

    package-locks

    An explanation of npm lockfiles

    Description

    Conceptually, the "input" to npm install is a package.json, while its @@ -216,4 +216,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/shrinkwrap-json/index.html b/deps/npm/docs/public/configuring-npm/shrinkwrap-json/index.html index 0ec658b89cba58..c712c243807600 100644 --- a/deps/npm/docs/public/configuring-npm/shrinkwrap-json/index.html +++ b/deps/npm/docs/public/configuring-npm/shrinkwrap-json/index.html @@ -76,7 +76,7 @@ } } }) -

    npm shrinkwrap.json

    +

    npm shrinkwrap.json

    A publishable lockfile

    Description

    npm-shrinkwrap.json is a file created by npm shrinkwrap. It is identical to @@ -104,4 +104,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/index.html b/deps/npm/docs/public/index.html index d0977400f81a0a..a12a5fe6b7d119 100644 --- a/deps/npm/docs/public/index.html +++ b/deps/npm/docs/public/index.html @@ -130,4 +130,4 @@ } } }) -
    npm cli _
    The intelligent package manager for the Node Javascript Platform. Install stuff and get coding!
    npm cli _
    The intelligent package manager for the Node Javascript Platform. Install stuff and get coding!
    npm cli _
    The intelligent package manager for the Node Javascript Platform. Install stuff and get coding!

    The current stable version of npm is available on GitHub.

    To upgrade, run: npm install npm@latest -g

    \ No newline at end of file +
    npm cli _
    The intelligent package manager for the Node Javascript Platform. Install stuff and get coding!
    npm cli _
    The intelligent package manager for the Node Javascript Platform. Install stuff and get coding!
    npm cli _
    The intelligent package manager for the Node Javascript Platform. Install stuff and get coding!

    The current stable version of npm is available on GitHub.

    To upgrade, run: npm install npm@latest -g

    \ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/config/index.html b/deps/npm/docs/public/using-npm/config/index.html index 53e0de69ee02ae..370b93da67a516 100644 --- a/deps/npm/docs/public/using-npm/config/index.html +++ b/deps/npm/docs/public/using-npm/config/index.html @@ -76,7 +76,7 @@ } } }) -

    config

    +

    config

    More than you probably want to know about npm configuration

    Description

    npm gets its configuration values from the following sources, sorted by priority:

    @@ -158,19 +158,6 @@

    npm ls -gpld
     # same as:
     npm ls --global --parseable --long --loglevel info

    -

    Per-Package Config Settings

    -

    When running scripts (see scripts) the package.json "config" -keys are overwritten in the environment if there is a config param of -<name>[@<version>]:<key>. For example, if the package.json has -this:

    -
    { "name" : "foo"
    -, "config" : { "port" : "8080" }
    -, "scripts" : { "start" : "node server.js" } }
    -

    and the server.js is this:

    -
    http.createServer(...).listen(process.env.npm_package_config_port)
    -

    then the user could change the behavior by doing:

    -
    npm config set foo:port 80
    -

    See package.json for more information.

    Config Settings

    access

      @@ -325,6 +312,14 @@

      --prefer-offline.

      --cache-min=9999 (or bigger) is an alias for --prefer-offline.

      +

      call

      +
        +
      • Default: ""
      • +
      • Type: String
      • +
      +

      Optional companion option for npm exec, npx that allows for specifying a +custom command to be run along with the installed packages.

      +
      npm exec --package yo --package generator-node --call "yo node"

      cert

      • Default: null
      • @@ -340,6 +335,12 @@

        npm token create command.

        +

        commit-hooks

        +
          +
        • Default: true
        • +
        • Type: Boolean
        • +
        +

        Run git commit hooks when using the npm version command.

        color

        • Default: true
        • @@ -351,11 +352,11 @@

          NO_COLOR is set to any value.

          depth

            -
          • Default: 0
          • -
          • Type: Number
          • +
          • Default: null
          • +
          • Type: null or Number

          The depth to go when recursing packages for npm ls.

          -

          To make this default to Infinity instead of 0, set --all.

          +

          To make this default to Infinity instead of null, set --all.

          description

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/developers/index.html b/deps/npm/docs/public/using-npm/developers/index.html index fc89a39df0d4e8..2e078591fbd24a 100644 --- a/deps/npm/docs/public/using-npm/developers/index.html +++ b/deps/npm/docs/public/using-npm/developers/index.html @@ -76,7 +76,7 @@ } } }) -

    developers

    +

    developers

    Developer Guide

    Description

    So, you've decided to use npm to develop (and maybe publish/deploy) @@ -261,4 +261,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/disputes/index.html b/deps/npm/docs/public/using-npm/disputes/index.html index 3c43f4de296908..e82618bb125221 100644 --- a/deps/npm/docs/public/using-npm/disputes/index.html +++ b/deps/npm/docs/public/using-npm/disputes/index.html @@ -76,7 +76,7 @@ } } }) -

    disputes

    +

    disputes

    Handling Module Name Disputes

    This document describes the steps that you should take to resolve module name disputes with other npm publishers. It also describes special steps you should @@ -194,4 +194,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/orgs/index.html b/deps/npm/docs/public/using-npm/orgs/index.html index f7558a67f6d480..7c28d797487420 100644 --- a/deps/npm/docs/public/using-npm/orgs/index.html +++ b/deps/npm/docs/public/using-npm/orgs/index.html @@ -76,7 +76,7 @@ } } }) -

    orgs

    +

    orgs

    Working with Teams & Orgs

    Description

    There are three levels of org users:

    @@ -146,4 +146,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/registry/index.html b/deps/npm/docs/public/using-npm/registry/index.html index e00d236bf7b30b..537fee763e95c3 100644 --- a/deps/npm/docs/public/using-npm/registry/index.html +++ b/deps/npm/docs/public/using-npm/registry/index.html @@ -76,7 +76,7 @@ } } }) -

    registry

    +

    registry

    The JavaScript Package Registry

    Description

    To resolve packages by name and version, npm talks to a registry website @@ -158,4 +158,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/removal/index.html b/deps/npm/docs/public/using-npm/removal/index.html index 03ff7ad3ee4f9b..d82a849be04e50 100644 --- a/deps/npm/docs/public/using-npm/removal/index.html +++ b/deps/npm/docs/public/using-npm/removal/index.html @@ -76,7 +76,7 @@ } } }) -

    removal

    +

    removal

    Cleaning the Slate

    Synopsis

    So sad to see you go.

    @@ -118,4 +118,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/scope/index.html b/deps/npm/docs/public/using-npm/scope/index.html index 3a6ea82edce615..3d6c1561430be7 100644 --- a/deps/npm/docs/public/using-npm/scope/index.html +++ b/deps/npm/docs/public/using-npm/scope/index.html @@ -76,7 +76,7 @@ } } }) -

    scope

    +

    scope

    Scoped packages

    Description

    All npm packages have a name. Some package names also have a scope. A scope @@ -161,4 +161,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/scripts/index.html b/deps/npm/docs/public/using-npm/scripts/index.html index 190bef26dd9c61..ca9ba582b9f1b9 100644 --- a/deps/npm/docs/public/using-npm/scripts/index.html +++ b/deps/npm/docs/public/using-npm/scripts/index.html @@ -76,7 +76,7 @@ } } }) -

    scripts

    +

    scripts

    How npm handles the "scripts" field

    Description

    The "scripts" property of of your package.json file supports a number of built-in scripts and their preset life cycle events as well as arbitrary scripts. These all can be executed by running npm run-script <stage> or npm run <stage> for short. Pre and post commands with matching names will be run for those as well (e.g. premyscript, myscript, postmyscript). Scripts from dependencies can be run with npm explore <pkg> -- npm run <stage>.

    @@ -325,4 +325,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/semver/index.html b/deps/npm/docs/public/using-npm/semver/index.html index 05db202794b54e..b72916ee602444 100644 --- a/deps/npm/docs/public/using-npm/semver/index.html +++ b/deps/npm/docs/public/using-npm/semver/index.html @@ -76,7 +76,7 @@ } } }) -

    semver(7) -- The semantic versioner for npm

    +

    semver(7) -- The semantic versioner for npm

    Install

    npm install --save semver

    Usage

    @@ -437,4 +437,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/lib/publish.js b/deps/npm/lib/publish.js index 602d213b683939..1ff7366255a2d6 100644 --- a/deps/npm/lib/publish.js +++ b/deps/npm/lib/publish.js @@ -69,7 +69,8 @@ const publish_ = async (arg, opts) => { // The purpose of re-reading the manifest is in case it changed, // so that we send the latest and greatest thing to the registry manifest = await readJson(`${arg}/package.json`) - await otplease(opts, opts => libpub(arg, manifest, opts)) + const { publishConfig } = manifest + await otplease(opts, opts => libpub(arg, manifest, { ...opts, publishConfig })) } // publish diff --git a/deps/npm/lib/utils/config.js b/deps/npm/lib/utils/config.js index e505810da56f73..440806f7964f80 100644 --- a/deps/npm/lib/utils/config.js +++ b/deps/npm/lib/utils/config.js @@ -102,6 +102,12 @@ const defaults = { 'init-license': 'ISC', 'init-module': '~/.npm-init.js', 'init-version': '1.0.0', + 'init.author.email': '', + 'init.author.name': '', + 'init.author.url': '', + 'init.license': 'ISC', + 'init.module': '~/.npm-init.js', + 'init.version': '1.0.0', json: false, key: null, 'legacy-bundling': false, @@ -238,6 +244,12 @@ const types = { 'init-license': String, 'init-module': path, 'init-version': semver, + 'init.author.email': String, + 'init.author.name': String, + 'init.author.url': ['', url], + 'init.license': String, + 'init.module': path, + 'init.version': semver, json: Boolean, key: [null, String], 'legacy-bundling': Boolean, diff --git a/deps/npm/lib/utils/explain-dep.js b/deps/npm/lib/utils/explain-dep.js index facab373baad6a..af819f1c2f3cec 100644 --- a/deps/npm/lib/utils/explain-dep.js +++ b/deps/npm/lib/utils/explain-dep.js @@ -58,7 +58,7 @@ const explainDependents = ({ name, dependents }, depth, color) => { const max = Math.ceil(depth / 2) const messages = dependents.slice(0, max) - .map(dep => explainDependency(name, dep, depth, color)) + .map(edge => explainEdge(edge, depth, color)) // show just the names of the first 5 deps that overflowed the list if (dependents.length > max) { @@ -82,7 +82,7 @@ const explainDependents = ({ name, dependents }, depth, color) => { return str.split('\n').join('\n ') } -const explainDependency = (name, { type, from, spec }, depth, color) => { +const explainEdge = ({ name, type, from, spec }, depth, color) => { const { bold } = color ? chalk : nocolor return (type === 'prod' ? '' : `${colorType(type, color)} `) + `${bold(name)}@"${bold(spec)}" from ` + @@ -98,4 +98,4 @@ const explainFrom = (from, depth, color) => { explainDependents(from, depth - 1, color) } -module.exports = { explainNode, printNode } +module.exports = { explainNode, printNode, explainEdge } diff --git a/deps/npm/lib/utils/explain-eresolve.js b/deps/npm/lib/utils/explain-eresolve.js index 51a856f6cb9232..07a63c240f8d97 100644 --- a/deps/npm/lib/utils/explain-eresolve.js +++ b/deps/npm/lib/utils/explain-eresolve.js @@ -8,47 +8,23 @@ const npm = require('../npm.js') const { writeFileSync } = require('fs') const { resolve } = require('path') -const { explainNode, printNode } = require('./explain-dep.js') +const { explainEdge, explainNode, printNode } = require('./explain-dep.js') // expl is an explanation object that comes from Arborist. It looks like: -// { -// dep: { -// whileInstalling: { -// explanation of the thing being installed when we hit the conflict -// }, -// name, -// version, -// dependents: [ -// things depending on this node (ie, reason for inclusion) -// { name, version, dependents }, ... -// ] -// } -// current: { -// explanation of the current node that already was in the tree conflicting -// } -// peerConflict: { -// explanation of the peer dependency that couldn't be added, or null -// } -// fixWithForce: Boolean - can we use --force to push through this? -// type: type of the edge that couldn't be met -// isPeer: true if the edge that couldn't be met is a peer dependency -// } // Depth is how far we want to want to descend into the object making a report. // The full report (ie, depth=Infinity) is always written to the cache folder // at ${cache}/eresolve-report.txt along with full json. const explainEresolve = (expl, color, depth) => { - const { dep, current, peerConflict } = expl + const { edge, current, peerConflict } = expl const out = [] - /* istanbul ignore else - should always have this for ERESOLVEs */ - if (dep.whileInstalling) { - out.push('While resolving: ' + printNode(dep.whileInstalling, color)) + if (edge.from && edge.from.whileInstalling) { + out.push('While resolving: ' + printNode(edge.from.whileInstalling, color)) } out.push('Found: ' + explainNode(current, depth, color)) - - out.push('\nCould not add conflicting dependency: ' + - explainNode(dep, depth, color)) + out.push('\nCould not resolve dependency:\n' + + explainEdge(edge, depth, color)) if (peerConflict) { const heading = '\nConflicting peer dependency:' @@ -63,9 +39,9 @@ const explainEresolve = (expl, color, depth) => { const report = (expl, depth = 4) => { const fullReport = resolve(npm.cache, 'eresolve-report.txt') - const orForce = expl.fixWithForce ? ' or --force' : '' + const orNoStrict = expl.strictPeerDeps ? '--no-strict-peer-deps, ' : '' const fix = `Fix the upstream dependency conflict, or retry -this command with --legacy-peer-deps${orForce} +this command with ${orNoStrict}--force, or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution.` writeFileSync(fullReport, `# npm resolution error report diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1 index e7eb08bbdc0b3e..f0002bd5160de3 100644 --- a/deps/npm/man/man1/npm-install.1 +++ b/deps/npm/man/man1/npm-install.1 @@ -23,10 +23,23 @@ common options: [\-P|\-\-save\-prod|\-D|\-\-save\-dev|\-O|\-\-save\-optional] [\ .RE .SS Description .P -This command installs a package, and any packages that it depends on\. If the -package has a package\-lock or shrinkwrap file, the installation of dependencies -will be driven by that, with an \fBnpm\-shrinkwrap\.json\fP taking precedence if both -files exist\. See npm help package\-lock\.json and npm help \fBshrinkwrap\fP\|\. +This command installs a package and any packages that it depends on\. If the +package has a package\-lock, or an npm shrinkwrap file, or a yarn lock file, the +installation of dependencies will be driven by that, respecting the following +order of precedence: +.RS 0 +.IP \(bu 2 +\fBnode_modules/\.package\-lock\.json\fP +.IP \(bu 2 +\fBnpm\-shrinkwrap\.json\fP +.IP \(bu 2 +\fBpackage\-lock\.json\fP +.IP \(bu 2 +\fByarn\.lock\fP + +.RE +.P +See npm help package\-lock\.json and npm help \fBshrinkwrap\fP\|\. .P A \fBpackage\fP is: .RS 0 @@ -53,8 +66,8 @@ perhaps if you also want to be able to easily install it elsewhere after packing it up into a tarball (b)\. .RS 0 .IP \(bu 2 -\fBnpm install\fP (in package directory, no arguments): - Install the dependencies in the local node_modules folder\. +\fBnpm install\fP (in a package directory, no arguments): + Install the dependencies in the local \fBnode_modules\fP folder\. In global mode (ie, with \fB\-g\fP or \fB\-\-global\fP appended to the command), it installs the current package context (ie, the current working directory) as a global package\. @@ -75,12 +88,12 @@ NOTE: The \fB\-\-production\fP flag has no particular meaning when adding a Install the package in the directory as a symlink in the current project\. Its dependencies will be installed before it's linked\. If \fB\fP sits inside the root of your project, its dependencies may be hoisted to the - toplevel \fBnode_modules\fP as they would for other types of dependencies\. + top\-level \fBnode_modules\fP as they would for other types of dependencies\. .IP \(bu 2 \fBnpm install \fP: Install a package that is sitting on the filesystem\. Note: if you just want to link a dev directory into your npm root, you can do this more easily by - using \fBnpm link\fP\|\. + using npm help \fBlink\fP\|\. Tarball requirements: .RS .IP \(bu 2 @@ -123,66 +136,44 @@ npm install \./package\.tgz npm install sax .fi .RE + \fBnpm install\fP saves any specified packages into \fBdependencies\fP by default\. + Additionally, you can control where and how they get saved with some + additional flags: +.RS .IP \(bu 2 -\fBnpm install @npm:\fP: - Install a package under a custom alias\. Allows multiple versions of - a same\-name package side\-by\-side, more convenient import names for - packages with otherwise long ones and using git forks replacements - or forked npm packages as replacements\. Aliasing works only on your - project and does not rename packages in transitive dependencies\. - Aliases should follow the naming conventions stated in - \fBvalidate\-npm\-package\-name\fP \fIhttps://www\.npmjs\.com/package/validate\-npm\-package\-name#naming\-rules\fR\|\. - Examples: +\fB\-P, \-\-save\-prod\fP: Package will appear in your \fBdependencies\fP\|\. This is the .P .RS 2 .nf - npm install my\-react@npm:react - npm install jquery2@npm:jquery@2 - npm install jquery3@npm:jquery@3 - npm install npa@npm:npm\-package\-arg + default unless `\-D` or `\-O` are present\. .fi .RE - -.RE -.P -.RS 2 -.nf -`npm install` saves any specified packages into `dependencies` by default\. -Additionally, you can control where and how they get saved with some -additional flags: - -* `\-P, \-\-save\-prod`: Package will appear in your `dependencies`\. This is the - default unless `\-D` or `\-O` are present\. - -* `\-D, \-\-save\-dev`: Package will appear in your `devDependencies`\. - -* `\-O, \-\-save\-optional`: Package will appear in your `optionalDependencies`\. - -* `\-\-no\-save`: Prevents saving to `dependencies`\. - +.IP \(bu 2 +\fB\-D, \-\-save\-dev\fP: Package will appear in your \fBdevDependencies\fP\|\. +.IP \(bu 2 +\fB\-O, \-\-save\-optional\fP: Package will appear in your \fBoptionalDependencies\fP\|\. +.IP \(bu 2 +\fB\-\-no\-save\fP: Prevents saving to \fBdependencies\fP\|\. When using any of the above options to save dependencies to your package\.json, there are two additional, optional flags: - -* `\-E, \-\-save\-exact`: Saved dependencies will be configured with an - exact version rather than using npm's default semver range - operator\. - -* `\-B, \-\-save\-bundle`: Saved dependencies will also be added to your `bundleDependencies` list\. - -Further, if you have an `npm\-shrinkwrap\.json` or `package\-lock\.json` then it +.IP \(bu 2 +\fB\-E, \-\-save\-exact\fP: Saved dependencies will be configured with an +exact version rather than using npm's default semver range +operator\. +.IP \(bu 2 +\fB\-B, \-\-save\-bundle\fP: Saved dependencies will also be added to your \fBbundleDependencies\fP list\. +Further, if you have an \fBnpm\-shrinkwrap\.json\fP or \fBpackage\-lock\.json\fP then it will be updated as well\. - -`` is optional\. The package will be downloaded from the registry +\fB\fP is optional\. The package will be downloaded from the registry associated with the specified scope\. If no registry is associated with -the given scope the default registry is assumed\. See npm help `scope`\. - +the given scope the default registry is assumed\. See npm help \fBscope\fP\|\. Note: if you do not include the @\-symbol on your scope name, npm will interpret this as a GitHub repository instead, see below\. Scopes names must also be followed by a slash\. - Examples: - -```bash +.P +.RS 2 +.nf npm install sax npm install githubname/reponame npm install @myorg/privatepackage @@ -190,12 +181,34 @@ npm install node\-tap \-\-save\-dev npm install dtrace\-provider \-\-save\-optional npm install readable\-stream \-\-save\-exact npm install ansi\-regex \-\-save\-bundle -``` - -**Note**: If there is a file or folder named `` in the current +.fi +.RE +.IP \(bu 2 +\fINote*\fR: If there is a file or folder named \fB\fP in the current working directory, then it will try to install that, and only try to fetch the package by name if it is not valid\. + +.RE +.IP \(bu 2 +\fBnpm install @npm:\fP: + Install a package under a custom alias\. Allows multiple versions of + a same\-name package side\-by\-side, more convenient import names for + packages with otherwise long ones, and using git forks replacements + or forked npm packages as replacements\. Aliasing works only on your + project and does not rename packages in transitive dependencies\. + Aliases should follow the naming conventions stated in + \fBvalidate\-npm\-package\-name\fP \fIhttps://www\.npmjs\.com/package/validate\-npm\-package\-name#naming\-rules\fR\|\. + Examples: +.P +.RS 2 +.nf + npm install my\-react@npm:react + npm install jquery2@npm:jquery@2 + npm install jquery3@npm:jquery@3 + npm install npa@npm:npm\-package\-arg .fi +.RE + .RE .RS 0 .IP \(bu 2 @@ -234,7 +247,7 @@ fetch the package by name if it is not valid\. .RS 2 .nf npm install sax@">=0\.1\.0 <0\.2\.0" - npm install @myorg/privatepackage@">=0\.1\.0 <0\.2\.0" + npm install @myorg/privatepackage@"16 \- 17" .fi .RE .IP \(bu 2 @@ -283,6 +296,7 @@ Examples: .RS 2 .nf npm install git+ssh://git@github\.com:npm/cli\.git#v1\.0\.27 +npm install git+ssh://git@github\.com:npm/cli#pull/273 npm install git+ssh://git@github\.com:npm/cli#semver:^5\.0 npm install git+https://isaacs@github\.com/npm/cli\.git npm install git://github\.com/npm/cli\.git#v1\.0\.27 @@ -304,7 +318,7 @@ GIT_SSH_COMMAND='ssh \-i ~/\.ssh/custom_ident' npm install git+ssh://git@github\ registry dependency\. If neither \fB#\fP or \fB#semver:\fP is specified, then \fBmaster\fP is used\. As with regular git dependencies, \fBdependencies\fP and \fBdevDependencies\fP will - be installed if the package has a \fBprepare\fP script, before the package is + be installed if the package has a \fBprepare\fP script before the package is done installing\. Examples: .P @@ -320,7 +334,7 @@ GIT_SSH_COMMAND='ssh \-i ~/\.ssh/custom_ident' npm install git+ssh://git@github\ clone it using \fBgit\fP\|\. The GitHub username associated with the gist is optional and will not be saved in \fBpackage\.json\fP\|\. As with regular git dependencies, \fBdependencies\fP and \fBdevDependencies\fP will - be installed if the package has a \fBprepare\fP script, before the package is + be installed if the package has a \fBprepare\fP script before the package is done installing\. Example: .P @@ -340,7 +354,7 @@ GIT_SSH_COMMAND='ssh \-i ~/\.ssh/custom_ident' npm install git+ssh://git@github\ registry dependency\. If neither \fB#\fP or \fB#semver:\fP is specified, then \fBmaster\fP is used\. As with regular git dependencies, \fBdependencies\fP and \fBdevDependencies\fP will - be installed if the package has a \fBprepare\fP script, before the package is + be installed if the package has a \fBprepare\fP script before the package is done installing\. Example: .P @@ -360,7 +374,7 @@ GIT_SSH_COMMAND='ssh \-i ~/\.ssh/custom_ident' npm install git+ssh://git@github\ registry dependency\. If neither \fB#\fP or \fB#semver:\fP is specified, then \fBmaster\fP is used\. As with regular git dependencies, \fBdependencies\fP and \fBdevDependencies\fP will - be installed if the package has a \fBprepare\fP script, before the package is + be installed if the package has a \fBprepare\fP script before the package is done installing\. Example: .P @@ -373,7 +387,7 @@ GIT_SSH_COMMAND='ssh \-i ~/\.ssh/custom_ident' npm install git+ssh://git@github\ .RE .P -You may combine multiple arguments, and even multiple types of arguments\. +You may combine multiple arguments and even multiple types of arguments\. For example: .P .RS 2 @@ -401,10 +415,6 @@ npm install sax \-\-force .fi .RE .P -The \fB\-\-no\-fund\fP argument will hide the message displayed at the end of each -install that acknowledges the number of dependencies looking for funding\. -See \fBnpm\-fund(1)\fP -.P The \fB\-g\fP or \fB\-\-global\fP argument will cause npm to install the package globally rather than locally\. See npm help folders\. .P @@ -421,17 +431,29 @@ The \fB\-\-legacy\-bundling\fP argument will cause npm to install the package su that versions of npm prior to 1\.4, such as the one included with node 0\.8, can install the package\. This eliminates all automatic deduping\. .P +The \fB\-\-legacy\-peer\-deps\fP argument will cause npm to ignore all +\fBpeerDependencies\fP when installing, similar to npm@6 and older\. +.P The \fB\-\-link\fP argument will cause npm to link global installs into the -local space in some cases\. +local space whenever packages from the global space may satisfy a dependency +required version\. +.P +The \fB\-\-no\-audit\fP argument can be used to disable sending audit reports to +the configured registries\. See \fBnpm\-audit\fP \fInpm\-audit\fR for details on what +is sent\. .P The \fB\-\-no\-bin\-links\fP argument will prevent npm from creating symlinks for any binaries the package might contain\. .P +The \fB\-\-no\-fund\fP argument will hide the message displayed at the end of each +install that acknowledges the number of dependencies looking for funding\. +See npm help \fBnpm\-fund\fP +.P The \fB\-\-no\-optional\fP argument will prevent optional dependencies from being installed\. .P The \fB\-\-no\-shrinkwrap\fP argument, which will ignore an available -package lock or shrinkwrap file and use the package\.json instead\. +package\-lock or shrinkwrap file and use the package\.json instead\. .P The \fB\-\-no\-package\-lock\fP argument will prevent npm from creating a \fBpackage\-lock\.json\fP file\. When running with package\-lock's disabled npm @@ -441,34 +463,19 @@ The \fB\-\-nodedir=/path/to/node/source\fP argument will allow npm to find the node source code so that npm can compile native modules\. .P The \fB\-\-only={prod[uction]|dev[elopment]}\fP argument will cause either only -\fBdevDependencies\fP or only non\-\fBdevDependencies\fP to be installed regardless of the \fBNODE_ENV\fP\|\. +\fBdevDependencies\fP or only non\-\fBdevDependencies\fP to be installed regardless +of the \fBNODE_ENV\fP\|\. .P -The \fB\-\-no\-audit\fP argument can be used to disable sending of audit reports to -the configured registries\. See \fBnpm\-audit\fP \fInpm\-audit\fR for details on what is sent\. +The \fB\-\-strict\-peer\-deps\fP argument will cause the install to fail on any +\fBpeerDependencies\fP conflict, even if it's possible to use a heuristic to +provide a least\-surprising resolution to a given conflict\. .P See npm help \fBconfig\fP\|\. Many of the configuration params have some effect on installation, since that's most of what npm does\. .SS Algorithm .P -To install a package, npm uses the following algorithm: -.P -.RS 2 -.nf -load the existing node_modules tree from disk -clone the tree -fetch the package\.json and assorted metadata and add it to the clone -walk the clone and add any missing dependencies - dependencies will be added as close to the top as is possible - without breaking any other modules -compare the original tree with the cloned tree and make a list of -actions to take to convert one to the other -execute all of the actions, deepest first - kinds of actions are install, update, remove and move -.fi -.RE -.P -For this \fBpackage{dep}\fP structure: \fBA{B,C}, B{C}, C{D}\fP, -this algorithm produces: +Given a \fBpackage{dep}\fP structure: \fBA{B,C}, B{C}, C{D}\fP, +the npm install algorithm produces: .P .RS 2 .nf @@ -495,40 +502,13 @@ A .fi .RE .P -Because B's D@1 will be installed in the top level, C now has to install D@2 +Because B's D@1 will be installed in the top\-level, C now has to install D@2 privately for itself\. This algorithm is deterministic, but different trees may be produced if two dependencies are requested for installation in a different order\. .P -See npm help folders for a more detailed description of the specific folder structures that npm creates\. -.SS Limitations of npm's Install Algorithm -.P -npm will refuse to install any package with an identical name to the -current package\. This can be overridden with the \fB\-\-force\fP flag, but in -most cases can simply be addressed by changing the local package name\. -.P -There are some very rare and pathological edge\-cases where a cycle can -cause npm to try to install a never\-ending tree of packages\. Here is -the simplest case: -.P -.RS 2 -.nf -A \-> B \-> A' \-> B' \-> A \-> B \-> A' \-> B' \-> A \-> \.\.\. -.fi -.RE -.P -where \fBA\fP is some version of a package, and \fBA'\fP is a different version -of the same package\. Because \fBB\fP depends on a different version of \fBA\fP -than the one that is already in the tree, it must install a separate -copy\. The same is true of \fBA'\fP, which must install \fBB'\fP\|\. Because \fBB'\fP -depends on the original version of \fBA\fP, which has been overridden, the -cycle falls into infinite regress\. -.P -To avoid this situation, npm flat\-out refuses to install any -\fBname@version\fP that is already present anywhere in the tree of package -folder ancestors\. A more correct, but more complex, solution would be -to symlink the existing version into the new location\. If this ever -affects a real use\-case, it will be investigated\. +See npm help folders for a more detailed description of the +specific folder structures that npm creates\. .SS See Also .RS 0 .IP \(bu 2 diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index 576959980089fc..1d505a9d3f31a9 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -22,7 +22,7 @@ For example, running \fBnpm ls promzard\fP in npm's source tree will show: .P .RS 2 .nf - npm@7\.0\.0\-rc\.4 /path/to/npm + npm@7\.0\.0 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 .fi diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index 530e53179f205e..30a71a2cf0dad7 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -10,7 +10,7 @@ npm [args] .RE .SS Version .P -7\.0\.0\-rc\.4 +7\.0\.0 .SS Description .P npm is the package manager for the Node JavaScript platform\. It puts diff --git a/deps/npm/man/man7/config.7 b/deps/npm/man/man7/config.7 index f748ea33e93d2c..fa49fe41473934 100644 --- a/deps/npm/man/man7/config.7 +++ b/deps/npm/man/man7/config.7 @@ -132,38 +132,6 @@ npm ls \-gpld npm ls \-\-global \-\-parseable \-\-long \-\-loglevel info .fi .RE -.SS Per\-Package Config Settings -.P -When running scripts (see npm help \fBscripts\fP) the package\.json "config" -keys are overwritten in the environment if there is a config param of -\fB[@]:\fP\|\. For example, if the package\.json has -this: -.P -.RS 2 -.nf -{ "name" : "foo" -, "config" : { "port" : "8080" } -, "scripts" : { "start" : "node server\.js" } } -.fi -.RE -.P -and the server\.js is this: -.P -.RS 2 -.nf -http\.createServer(\.\.\.)\.listen(process\.env\.npm_package_config_port) -.fi -.RE -.P -then the user could change the behavior by doing: -.P -.RS 2 -.nf -npm config set foo:port 80 -.fi -.RE -.P -See npm help package\.json for more information\. .SS Config Settings .SS access .RS 0 @@ -414,6 +382,23 @@ Type: Number \fBDEPRECATED\fR: This option has been deprecated in favor of \fB\-\-prefer\-offline\fP\|\. .P \fB\-\-cache\-min=9999 (or bigger)\fP is an alias for \fB\-\-prefer\-offline\fP\|\. +.SS call +.RS 0 +.IP \(bu 2 +Default: "" +.IP \(bu 2 +Type: String + +.RE +.P +Optional companion option for \fBnpm exec\fP, \fBnpx\fP that allows for specifying a +custom command to be run along with the installed packages\. +.P +.RS 2 +.nf +npm exec \-\-package yo \-\-package generator\-node \-\-call "yo node" +.fi +.RE .SS cert .RS 0 .IP \(bu 2 @@ -443,6 +428,16 @@ Type: String, Array, null .RE .P This is a list of CIDR address to be used when configuring limited access tokens with the \fBnpm token create\fP command\. +.SS commit\-hooks +.RS 0 +.IP \(bu 2 +Default: \fBtrue\fP +.IP \(bu 2 +Type: Boolean + +.RE +.P +Run git commit hooks when using the \fBnpm version\fP command\. .SS color .RS 0 .IP \(bu 2 @@ -460,15 +455,15 @@ disabled when the environment variable \fBNO_COLOR\fP is set to any value\. .SS depth .RS 0 .IP \(bu 2 -Default: 0 +Default: null .IP \(bu 2 -Type: Number +Type: null or Number .RE .P The depth to go when recursing packages for \fBnpm ls\fP\|\. .P -To make this default to \fBInfinity\fP instead of \fB0\fP, set \fB\-\-all\fP\|\. +To make this default to \fBInfinity\fP instead of \fBnull\fP, set \fB\-\-all\fP\|\. .SS description .RS 0 .IP \(bu 2 @@ -488,7 +483,7 @@ Type: Boolean .RE .P -Install \fBdev\-dependencies\fP along with packages\. +[Deprecated] Install \fBdev\-dependencies\fP along with packages\. .SS dry\-run .RS 0 .IP \(bu 2 @@ -572,6 +567,18 @@ Type: Boolean .RE .P Format \fBpackage\-lock\.json\fP or \fBnpm\-shrinkwrap\.json\fP as a human readable file\. +.SS fund +.RS 0 +.IP \(bu 2 +Default: true +.IP \(bu 2 +Type: Boolean + +.RE +.P +When "true" displays the message at the end of each \fBnpm install\fP +aknowledging the number of dependencies looking for funding\. +See npm help \fBfund\fP for details\. .SS fetch\-retries .RS 0 .IP \(bu 2 @@ -626,18 +633,6 @@ Type: Number .RE .P The maximum amount of time to wait for HTTP requests to complete\. -.SS fund -.RS 0 -.IP \(bu 2 -Default: true -.IP \(bu 2 -Type: Boolean - -.RE -.P -When "true" displays the message at the end of each \fBnpm install\fP -aknowledging the number of dependencies looking for funding\. -See npm help \fBfund\fP for details\. .SS git .RS 0 .IP \(bu 2 @@ -660,16 +655,6 @@ Type: Boolean .RE .P Tag the commit when using the \fBnpm version\fP command\. -.SS commit\-hooks -.RS 0 -.IP \(bu 2 -Default: \fBtrue\fP -.IP \(bu 2 -Type: Boolean - -.RE -.P -Run git commit hooks when using the \fBnpm version\fP command\. .SS global .RS 0 .IP \(bu 2 @@ -717,17 +702,6 @@ direct dependencies will show in \fBnode_modules\fP and everything they depend on will be flattened in their \fBnode_modules\fP folders\. This obviously will eliminate some deduping\. If used with \fBlegacy\-bundling\fP, \fBlegacy\-bundling\fP will be preferred\. -.SS group -.RS 0 -.IP \(bu 2 -Default: GID of the current process -.IP \(bu 2 -Type: String or Number - -.RE -.P -The group to use when running package scripts in global mode as the root -user\. .SS heading .RS 0 .IP \(bu 2 @@ -784,9 +758,21 @@ Type: Boolean .RE .P If true, npm does not run scripts specified in package\.json files\. +.SS include +.RS 0 +.IP \(bu 2 +Default: \fB[prod|dev|optional|peer]\fP +.IP \(bu 2 +Type: Array + +.RE +.P +Option that allows for defining which types of dependencies to install\. .SS init\-module .RS 0 .IP \(bu 2 +Alias: \fBinit\.module\fP +.IP \(bu 2 Default: ~/\.npm\-init\.js .IP \(bu 2 Type: path @@ -795,11 +781,13 @@ Type: path .P A module that will be loaded by the \fBnpm init\fP command\. See the documentation for the -init\-package\-json \fIhttps://github\.com/isaacs/init\-package\-json\fR module +init\-package\-json \fIhttps://github\.com/npm/init\-package\-json\fR module for more information, or npm help init\. .SS init\-author\-name .RS 0 .IP \(bu 2 +Alias: \fBinit\.author\.name\fP +.IP \(bu 2 Default: "" .IP \(bu 2 Type: String @@ -810,6 +798,8 @@ The value \fBnpm init\fP should use by default for the package author's name\. .SS init\-author\-email .RS 0 .IP \(bu 2 +Alias: \fBinit\.author\.email\fP +.IP \(bu 2 Default: "" .IP \(bu 2 Type: String @@ -820,6 +810,8 @@ The value \fBnpm init\fP should use by default for the package author's email\. .SS init\-author\-url .RS 0 .IP \(bu 2 +Alias: \fBinit\.author\.url\fP +.IP \(bu 2 Default: "" .IP \(bu 2 Type: String @@ -830,6 +822,8 @@ The value \fBnpm init\fP should use by default for the package author's homepage .SS init\-license .RS 0 .IP \(bu 2 +Alias: \fBinit\.license\fP +.IP \(bu 2 Default: "ISC" .IP \(bu 2 Type: String @@ -840,6 +834,8 @@ The value \fBnpm init\fP should use by default for the package license\. .SS init\-version .RS 0 .IP \(bu 2 +Alias: \fBinit\.version\fP +.IP \(bu 2 Default: "1\.0\.0" .IP \(bu 2 Type: semver @@ -1652,18 +1648,6 @@ Type: Boolean .P When set to true, npm uses unicode characters in the tree output\. When false, it uses ascii characters to draw trees\. -.SS unsafe\-perm -.RS 0 -.IP \(bu 2 -Default: false if running as root, true otherwise -.IP \(bu 2 -Type: Boolean - -.RE -.P -Set to true to suppress the UID/GID switching when running package -scripts\. If set explicitly to false, then installing as a non\-root user -will fail\. .SS update\-notifier .RS 0 .IP \(bu 2 @@ -1686,16 +1670,6 @@ Type: Boolean .P Set to show short usage output (like the \-H output) instead of complete help when doing npm help \fBhelp\fP\|\. -.SS user -.RS 0 -.IP \(bu 2 -Default: "nobody" -.IP \(bu 2 -Type: String or Number - -.RE -.P -The UID to set to when running package scripts as root\. .SS userconfig .RS 0 .IP \(bu 2 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 51708ce7371046..368ca30597f9ed 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 @@ -70,7 +70,7 @@ const _queueNamedUpdates = Symbol('queueNamedUpdates') const _queueVulnDependents = Symbol('queueVulnDependents') const _avoidRange = Symbol('avoidRange') const _shouldUpdateNode = Symbol('shouldUpdateNode') -const _resetDepFlags = Symbol('resetDepFlags') +const resetDepFlags = require('../reset-dep-flags.js') const _loadFailures = Symbol('loadFailures') const _pruneFailedOptional = Symbol('pruneFailedOptional') const _linkNodes = Symbol('linkNodes') @@ -89,10 +89,19 @@ const _strictPeerDeps = Symbol('strictPeerDeps') const _checkEngineAndPlatform = Symbol('checkEngineAndPlatform') const _checkEngine = Symbol('checkEngine') const _checkPlatform = Symbol('checkPlatform') +const _virtualRoots = Symbol('virtualRoots') +const _virtualRoot = Symbol('virtualRoot') // used for the ERESOLVE error to show the last peer conflict encountered const _peerConflict = Symbol('peerConflict') +const _failPeerConflict = Symbol('failPeerConflict') +const _explainPeerConflict = Symbol('explainPeerConflict') +const _warnPeerConflict = Symbol('warnPeerConflict') +const _edgesOverridden = Symbol('edgesOverridden') +// exposed symbol for unit testing the placeDep method directly +const _peerSetSource = Symbol.for('peerSetSource') + // used by Reify mixin const _force = Symbol.for('force') const _explicitRequests = Symbol.for('explicitRequests') @@ -142,6 +151,13 @@ module.exports = cls => class IdealTreeBuilder extends cls { this[_linkNodes] = new Set() this[_manifests] = new Map() this[_peerConflict] = null + this[_edgesOverridden] = new Set() + + // a map of each module in a peer set to the thing that depended on + // that set of peers in the first place. Use a WeakMap so that we + // don't hold onto references for nodes that are garbage collected. + this[_peerSetSource] = new WeakMap() + this[_virtualRoots] = new Map() } get explicitRequests () { @@ -294,6 +310,7 @@ module.exports = cls => class IdealTreeBuilder extends cls { await new this.constructor(this.options).loadActual({ root }) return root }) + .then(tree => { // null the virtual tree, because we're about to hack away at it // if you want another one, load another copy. @@ -707,16 +724,42 @@ This is a one-time fix-up, please be patient... // Set `preferDedupe: true` in the options to replace the shallower // dep if allowed. - const tasks = await Promise.all( - // resolve all the edges into nodes using pacote.manifest - // return a {dep,edge} object so that we can track the reason - // for this node through the parallelized async operation. - // note that dep.edgesOut will have all its peer deps resolved, - // since they're relevant in the calculation about where to place - // the new and/or updated dependency. - this[_problemEdges](node).map(edge => this[_nodeFromEdge](edge) - .then(dep => ({edge, dep}))) - ) + const tasks = [] + const peerSource = this[_peerSetSource].get(node) || node + for (const edge of this[_problemEdges](node)) { + if (this[_edgesOverridden].has(edge)) + continue + + // peerSetSource is only relevant when we have a peerEntryEdge + // otherwise we're setting regular non-peer deps as if they have + // a virtual root of whatever brought in THIS node. + // so we VR the node itself if the edge is not a peer + const source = edge.peer ? peerSource : node + const virtualRoot = this[_virtualRoot](source, true) + // reuse virtual root if we already have one, but don't + // try to do the override ahead of time, since we MAY be able + // to create a more correct tree than the virtual root could. + const vrEdge = virtualRoot && virtualRoot.edgesOut.get(edge.name) + const vrDep = vrEdge && vrEdge.valid && vrEdge.to + // only re-use the virtualRoot if it's a peer edge we're placing. + // otherwise, we end up in situations where we override peer deps that + // we could have otherwise found homes for. Eg: + // xy -> (x, y) + // x -> PEER(z@1) + // y -> PEER(z@2) + // If xy is a dependency, we can resolve this like: + // project + // +-- xy + // | +-- y + // | +-- z@2 + // +-- x + // +-- z@1 + // But if x and y are loaded in the same virtual root, then they will + // be forced to agree on a version of z. + const dep = vrDep && vrDep.satisfies(edge) ? vrDep + : await this[_nodeFromEdge](edge, edge.peer ? virtualRoot : null) + tasks.push({edge, dep}) + } const placed = tasks .sort((a, b) => a.edge.name.localeCompare(b.edge.name)) @@ -746,33 +789,45 @@ This is a one-time fix-up, please be patient... // loads a node from an edge, and then loads its peer deps (and their // peer deps, on down the line) into a virtual root parent. - [_nodeFromEdge] (edge, parent) { + [_nodeFromEdge] (edge, parent_) { // create a virtual root node with the same deps as the node that // is requesting this one, so that we can get all the peer deps in // a context where they're likely to be resolvable. - const { legacyPeerDeps } = this - parent = parent || new Node({ - path: '/virtual-root', - sourceReference: edge.from, - legacyPeerDeps, - }) + const parent = parent_ || this[_virtualRoot](edge.from) const spec = npa.resolve(edge.name, edge.spec, edge.from.path) return this[_nodeFromSpec](edge.name, spec, parent, edge) .then(node => { - // handle otherwise unresolvable dependency nesting loops by - // creating a symbolic link - // a1 -> b1 -> a2 -> b2 -> a1 -> ... - // instead of nesting forever, when the loop occurs, create - // a symbolic link to the earlier instance + // handle otherwise unresolvable dependency nesting loops by + // creating a symbolic link + // a1 -> b1 -> a2 -> b2 -> a1 -> ... + // instead of nesting forever, when the loop occurs, create + // a symbolic link to the earlier instance for (let p = edge.from.resolveParent; p; p = p.resolveParent) { if (p.matches(node) && !p.isRoot) return new Link({ parent, target: p }) } + // keep track of the thing that caused this node to be included. + const src = parent.sourceReference + this[_peerSetSource].set(node, src) return this[_loadPeerSet](node) }) } + [_virtualRoot] (node, reuse = false) { + if (reuse && this[_virtualRoots].has(node)) + return this[_virtualRoots].get(node) + + const vr = new Node({ + path: '/virtual-root', + sourceReference: node, + legacyPeerDeps: this.legacyPeerDeps, + }) + + this[_virtualRoots].set(node, vr) + return vr + } + [_problemEdges] (node) { // skip over any bundled deps, they're not our problem. // Note that this WILL fetch bundled meta-deps which are also dependencies @@ -801,14 +856,14 @@ This is a one-time fix-up, please be patient... if (edge.to && edge.to.inShrinkwrap) return false - // If the edge has an error, there's a problem. - if (!edge.valid) - return true - // If the edge has no destination, that's a problem. if (!edge.to) return edge.type !== 'peerOptional' + // If the edge has an error, there's a problem. + if (!edge.valid) + return true + // If user has explicitly asked to update this package by name, it's a problem. if (this[_updateNames].includes(edge.name)) return true @@ -891,19 +946,100 @@ This is a one-time fix-up, please be patient... // We prefer to get peer deps that meet the requiring node's dependency, // if possible, since that almost certainly works (since that package was // developed with this set of deps) and will typically be more restrictive. - [_loadPeerSet] (node) { + // Note that the peers in the set can conflict either with each other, + // or with a direct dependency from the virtual root parent! In strict + // mode, this is always an error. In force mode, it never is, and we + // prefer the parent's non-peer dep over a peer dep, or the version that + // gets placed first. In non-strict mode, we behave strictly if the + // virtual root is based on the root project, and allow non-peer parent + // deps to override, but throw if no preference can be determined. + async [_loadPeerSet] (node) { const peerEdges = [...node.edgesOut.values()] - .filter(e => e.peer && !e.valid) - .map(e => node.parent && node.parent.edgesOut.get(e.name) || e) - return Promise.all( - peerEdges.map(edge => this[_nodeFromEdge](edge, node.parent)) - ).then(() => node) + // we only care about peers here, and don't install peerOptionals + .filter(e => e.peer && !e.valid && !e.optional) + .sort(({name: a}, {name: b}) => a.localeCompare(b)) + + for (const edge of peerEdges) { + // already placed this one, and we're happy with it. + if (edge.valid) + continue + + const parentEdge = node.parent.edgesOut.get(edge.name) + const {isRoot, isWorkspace} = node.parent.sourceReference + const isMine = isRoot || isWorkspace + if (edge.missing) { + if (!parentEdge) { + // easy, just put the thing there + await this[_nodeFromEdge](edge, node.parent) + continue + } else { + // try to put the parent's preference, and make sure that satisfies. + // if so, we're good. + // if it does not, then we have a problem in strict mode, no problem + // in force mode, and a problem in non-strict mode if this isn't + // on behalf of the root node. In all such cases, we warn at least. + await this[_nodeFromEdge](parentEdge, node.parent) + + // hooray! that worked! + if (edge.valid) + continue + + // allow it + if (this[_force] || !isMine && !this[_strictPeerDeps]) + continue + else + this[_failPeerConflict](edge) + } + } + + // at this point we know that there is a dep there, and + // we don't like it. always fail strictly, always allow forcibly or + // in non-strict mode if it's not our fault. don't warn here, because + // we are going to warn again when we place the deps, if we end up + // overriding for something else. + if (this[_force] || !isMine && !this[_strictPeerDeps]) + continue + + // ok, it's the root, or we're in unforced strict mode, so this is bad + this[_failPeerConflict](edge) + } + return node + } + + [_failPeerConflict] (edge) { + const expl = this[_explainPeerConflict](edge) + throw Object.assign(new Error('unable to resolve dependency tree'), expl) + } + + [_explainPeerConflict] (edge) { + const node = edge.from + const curNode = node.resolve(edge.name) + const pc = this[_peerConflict] || { peer: null, current: null } + const current = curNode ? curNode.explain() : pc.current + const peerConflict = pc.peer + return { + code: 'ERESOLVE', + current, + edge: edge.explain(), + peerConflict, + strictPeerDeps: this[_strictPeerDeps], + } + } + + [_warnPeerConflict] (edge) { + // track that we've overridden this edge, so that we don't keep trying + // to re-resolve it in an infinite loop. + this[_edgesOverridden].add(edge) + const expl = this[_explainPeerConflict](edge) + this.log.warn('ERESOLVE', 'overriding peer dependency', expl) } // starting from either node, or in the case of non-root peer deps, // the node's parent, walk up the tree until we find the first spot // where this dep cannot be placed, and use the one right before that. // place dep, requested by node, to satisfy edge + // XXX split this out into a separate method or mixin? It's quite a lot + // of functionality that ought to have its own unit tests more conveniently. [_placeDep] (dep, node, edge, peerEntryEdge = null) { if (edge.to && !edge.error && @@ -911,16 +1047,15 @@ This is a one-time fix-up, please be patient... !this[_isVulnerable](edge.to)) return [] - // top nodes should still get peer deps from their parent or fsParent - // if possible, and only install locally if there's no other option, - // eg for a link outside of the project root. + // top nodes should still get peer deps from their fsParent if possible, + // and only install locally if there's no other option, eg for a link + // outside of the project root, or for a conflicted dep. const start = edge.peer && !node.isRoot ? node.resolveParent || node : node let target let canPlace = null - let warnPeer = false for (let check = start; check; check = check.resolveParent) { const cp = this[_canPlaceDep](dep, check, edge, peerEntryEdge) @@ -928,17 +1063,8 @@ This is a one-time fix-up, please be patient... if (cp !== CONFLICT) { canPlace = cp target = check - } else { - if (check === start) { - // if it's a peer dep, and the first place we're putting it conflicts - // because the node has a direct dependency on the pkg in question, - // then we treat that as an override when --force is applied, and - // just warn about it. - const checkEdge = check.edgesOut.get(edge.name) - warnPeer = check === start && edge.peer && checkEdge - } + } else break - } // nest packages like npm v1 and v2 // very disk-inefficient @@ -951,38 +1077,16 @@ This is a one-time fix-up, please be patient... break } - if (!target) { - const curNode = node.resolve(edge.name) - const pc = this[_peerConflict] || { peer: null, current: null } - // we'll only get one of these - const current = curNode ? curNode.explain() : pc.current - const peerConflict = pc.peer - const expl = { - code: 'ERESOLVE', - dep: dep.explain(edge), - current, - peerConflict, - fixWithForce: edge.peer && !!warnPeer, - type: edge.type, - isPeer: edge.peer, - } - const override = this[_force] || !this[_strictPeerDeps] - - if (override && expl.fixWithForce) { - this.log.warn('ERESOLVE', 'overriding peer dependency', expl) - return [] - } else { - const er = new Error('unable to resolve dependency tree') - throw Object.assign(er, expl) - } - } + if (!target) + this[_failPeerConflict](edge) this.log.silly( 'placeDep', target.location || 'ROOT', - `${edge.name}@${edge.spec}`, - canPlace, - `for: ${node.package._id || node.location}` + `${dep.name}@${dep.version}`, + canPlace.description || /* istanbul ignore next */ canPlace, + `for: ${node.package._id || node.location}`, + `want: ${edge.spec || '*'}` ) // it worked, so we clearly have no peer conflicts at this point. @@ -1034,10 +1138,12 @@ This is a one-time fix-up, please be patient... edge.to.parent = null // visit any dependents who are upset by this change - for (const edge of dep.edgesIn) { - if (!edge.valid) { - this.addTracker('idealTree', edge.from.name, edge.from.location) - this[_depsQueue].push(edge.from) + // if it's an angry overridden peer edge, however, make sure we + // skip over it! + for (const edgeIn of dep.edgesIn) { + if (edgeIn !== edge && !edgeIn.valid && !this[_depsSeen].has(edge.from)) { + this.addTracker('idealTree', edgeIn.from.name, edgeIn.from.location) + this[_depsQueue].push(edgeIn.from) } } @@ -1073,28 +1179,30 @@ This is a one-time fix-up, please be patient... // also place its unmet or invalid peer deps at this location // note that dep has now been removed from the virtualRoot set // by virtue of being placed in the target's node_modules. - if (virtualRoot) { - const peers = [] - // double loop so that we don't yank things out and then fail to find - // them in the virtualRoot's children. - for (const peerEdge of dep.edgesOut.values()) { - // XXX needs some rework - if (peerEdge.peer && !peerEdge.valid) { - const peer = virtualRoot.children.get(peerEdge.name) /* istanbul ignore next - should be impossible */ || - peerEdge.to - /* istanbul ignore else - should be impossible */ - if (peer) - peers.push([peer, peerEdge]) - } - } + const peers = [] + // double loop so that we don't yank things out and then fail to find + // them in the virtualRoot's children. + for (const peerEdge of dep.edgesOut.values()) { + if (!peerEdge.peer || peerEdge.valid) + continue + const peer = virtualRoot.children.get(peerEdge.name) + // since we re-use virtualRoots, it's possible that the node was + // already placed somewhere in the tree, and thus plucked off the + // virtual root. however, in that case, it should have been no + // longer a missing/invalid peer dep, so something is messed up. + if (peer) + peers.push([peer, peerEdge]) + } - for (const [peer, peerEdge] of peers) { - const peerPlaced = this[_placeDep]( - peer, dep, peerEdge, peerEntryEdge || edge) - placed.push(...peerPlaced) - } + for (const [peer, peerEdge] of peers) { + const peerPlaced = this[_placeDep]( + peer, dep, peerEdge, peerEntryEdge || edge) + placed.push(...peerPlaced) } + // we're done with this now, clean it up. + this[_virtualRoots].delete(virtualRoot.sourceReference) + return placed } @@ -1138,43 +1246,41 @@ This is a one-time fix-up, please be patient... // When we check peers, we pass along the peerEntryEdge to track the // original edge that caused us to load the family of peer dependencies. [_canPlaceDep] (dep, target, edge, peerEntryEdge = null) { - // peer deps of root deps are effectively root deps - const isRootDep = target.isRoot && ( - // a direct dependency from the root node - edge.from === target || - // a member of the peer set of a direct root dependency - peerEntryEdge && peerEntryEdge.from === target - ) - const entryEdge = peerEntryEdge || edge + const source = this[_peerSetSource].get(dep) + const virtualRoot = dep.parent + const vrEdge = virtualRoot.edgesOut.get(edge.name) - // has child by that name already - if (target.children.has(dep.name)) { - const current = target.children.get(dep.name) - // if the integrities match, then it's literally the same exact bytes, - // even if it came from somewhere else. - if (dep.integrity && dep.integrity === current.integrity) - return KEEP + const isSource = target === source + const { isRoot, isWorkspace } = source || {} + const isMine = isRoot || isWorkspace - // we can always place the root's deps in the root nm folder - if (isRootDep) - return this[_canPlacePeers](dep, target, edge, REPLACE, peerEntryEdge) + if (target.children.has(edge.name)) { + const current = target.children.get(edge.name) - // if the version is greater, try to use the new one - const curVer = current.version - const newVer = dep.version - // always try to replace if the version is greater + // same thing = keep + if (dep.matches(current)) + return KEEP + + const { version: curVer } = current + const { version: newVer } = dep const tryReplace = curVer && newVer && semver.gte(newVer, curVer) - if (tryReplace && current.canReplaceWith(dep)) - return this[_canPlacePeers](dep, target, edge, REPLACE, peerEntryEdge) + if (tryReplace && dep.canReplace(current)) { + const res = this[_canPlacePeers](dep, target, edge, REPLACE, peerEntryEdge) + /* istanbul ignore else - It's extremely rare that a replaceable + * node would be a conflict, if the current one wasn't a conflict, + * but it is theoretically possible if peer deps are pinned. In + * that case we treat it like any other conflict, and keep trying */ + if (res !== CONFLICT) + return res + } - // ok, see if the current one satisfies the edge we're working on then + // ok, can't replace the current with new one, but maybe current is ok? if (edge.satisfiedBy(current)) return KEEP - // last try, if we prefer deduplication over novelty, check to see if - // this (older) dep can satisfy the needs of the less nested instance - if (this[_preferDedupe] && current.canReplaceWith(dep)) { + // if we prefer deduping, then try replacing newer with older + if (this[_preferDedupe] && !tryReplace && dep.canReplace(current)) { const res = this[_canPlacePeers](dep, target, edge, REPLACE, peerEntryEdge) /* istanbul ignore else - It's extremely rare that a replaceable * node would be a conflict, if the current one wasn't a conflict, @@ -1184,50 +1290,90 @@ This is a one-time fix-up, please be patient... return res } - // if this is a peer dep, AND target is the resolveParent of the edge, - // then this is the only place it can go. If the current node is not - // a non-peer dependency of this specific target, then it can replace - // and dupe it deeper in the tree. If the current node is a peer dep - // in a set that is a non-peer dep of a deeper target, then replace - // the whole peer set and the module bringing it in, and add the - // dependent to the queue for re-evaluation. - if (edge.peer && target === edge.from.resolveParent && !peerEntryEdge) { + // check for conflict override cases. + // first: is this the only place this thing can go? If the target is + // the source, then one of these things are true. + // + // 1. the conflicted dep was deduped up to here from a lower dependency + // w -> (x,y) + // x -> (z) + // y -> PEER(p@1) + // z -> (q) + // q -> (p@2) + // + // When building, let's say that x is fully placed, with all of its + // deps, and we're _adding_ y. Since the peer on p@1 was not initially + // present, it's been deduped up to w, and now needs to be pushed out. + // Replace it, and potentially also replace its peer set (though that'll + // be accomplished by making the same determination when we call + // _canPlacePeers) + // + // 2. the dep we're TRYING to place here ought to be overridden by the + // one that's here now, because current is (a) a direct dep of the + // source, or (b) an already-placed peer in a conflicted peer set, or + // (c) an already-placed peer in a different peer set at the same level. + // If strict or ours, conflict. Otherwise, keep. + if (isSource) { + // check to see if the current module could go deeper in the tree const peerSet = getPeerSet(current) - for (const p of peerSet) { + let canReplace = true + OUTER: for (const p of peerSet) { // if any have a non-peer dep from the target, or a peer dep if - // the target is root, then we can't safely replace. + // the target is root, then cannot safely replace and dupe deeper. for (const edge of p.edgesIn) { - if (edge.peer) { - // root deps take precedence always. - // in case this is an edge coming from a link it's also - // going to conflict since deps are effectively relative - // to its link node parent - if (edge.from.isTop) - return CONFLICT - - // other peer deps on this node are irrelevant though. + if (peerSet.has(edge.from)) continue + + // only respect valid edges, however, since we're likely trying + // to fix the very one that's currently broken! + if (edge.from === target && edge.valid) { + canReplace = false + break OUTER } - // note that we MAY resolve this conflict by using the target's - // conflicting dep on the peer, if --force is set. - if (edge.from === target) - return CONFLICT } } - // all peers could be nested deeper in the tree, so replace - // adding to the queue will happen later when we scan dep's edgesIn - return REPLACE + if (canReplace) { + const ret = this[_canPlacePeers](dep, target, edge, REPLACE, peerEntryEdge) + /* istanbul ignore else - extremely rare that the peer set would + * conflict if we can replace the node in question, but theoretically + * possible, if peer deps are pinned aggressively. */ + if (ret !== CONFLICT) + return ret + } + + // so it's not a deeper dep that's been deduped. That means that the + // only way it could have ended up here is if it's a conflicted peer. + /* istanbul ignore else - would have already crashed if not forced, + * and either mine or strict, when creating the peerSet. Keeping this + * check so that we're not only relying on action at a distance. */ + if (!this[_strictPeerDeps] && !isMine || this[_force]) { + this[_warnPeerConflict](edge, dep) + return KEEP + } + } + + if (vrEdge && vrEdge.satisfiedBy(current)) { + /* istanbul ignore else - If the virtual root was satisfied, in + * such a way that it was an override, and it's NOT forced, and is + * ours, or is in strict mode, then it would have crashed during + * the creation of the peerSet. Nevertheless, this is a good check + * to ensure we're not warning when we should be conflicting. */ + if (this[_force] || !isMine && !this[_strictPeerDeps]) { + this[_warnPeerConflict](edge) + return KEEP + } } - // no agreement could be reached :( + // no justification for overriding, and no agreement possible. return CONFLICT } - // check to see if the target DOESN'T have a child by that name, - // but DOES have a conflicting dependency of its own. no need to check - // if this is the edge we're already looking to resolve! + // no existing node at this location! + // check to see if the target doesn't have a child by that name, + // but WANTS one, and won't be happy with this one. if this is the + // edge we're looking to resolve, then not relevant, of course. if (target !== entryEdge.from && target.edgesOut.has(dep.name)) { - const edge = target.edgesOut.get(dep.name) + const targetEdge = target.edgesOut.get(dep.name) // It might be that the dep would not be valid here, BUT some other // version would. Could to try to resolve that, but that makes this no // longer a pure synchronous function. ugh. @@ -1240,15 +1386,28 @@ This is a one-time fix-up, please be patient... // a specific name, however, or if a dep makes an incompatible change // to its peer dep in a non-semver-major version bump, or if the parent // is unbounded in its dependency list. - if (!edge.satisfiedBy(dep)) + if (!targetEdge.satisfiedBy(dep)) { + if (isSource) { + // conflicted peer dep. accept what's there, if overriding + /* istanbul ignore else - If it's the source, and the source's edge + * is not valid, then either we crashed when creating the peer set, + * or it's forced, or it's not ours and not strict. Keep this check + * to avoid relying on action at a distance, however. */ + if (this[_force] || !isMine && !this[_strictPeerDeps]) { + this[_warnPeerConflict](edge) + return KEEP + } + } + return CONFLICT + } } - // check to see what the name resolves to here, and who depends on it - // and if they'd be ok with the new dep being there instead. we know - // at this point that it's not the target's direct child node. this is - // only a check we do when deduping. if it's a direct dep of the target, - // then we just make the invalid edge and resolve it later. + // check to see what that name resolves to here, and who may depend on + // being able to reach it by crawling up past this parent. we know + // at this point that it's not the target's direct child node. if it's + // a direct dep of the target, we just make the invalid edge and + // resolve it later. const current = target !== entryEdge.from && target.resolve(dep.name) if (current) { for (const edge of current.edgesIn.values()) { @@ -1259,6 +1418,7 @@ This is a one-time fix-up, please be patient... } } + // no objections! ok to place here return this[_canPlacePeers](dep, target, edge, OK, peerEntryEdge) } @@ -1271,25 +1431,28 @@ This is a one-time fix-up, please be patient... return ret for (const peer of dep.parent.children.values()) { - if (peer !== dep) { - const peerEdge = dep.edgesOut.get(peer.name) || - [...peer.edgesIn].find(e => e.peer) - /* istanbul ignore else - pretty sure this is impossible, but just - being cautious */ - if (peerEdge) { - const canPlacePeer = this[_canPlaceDep](peer, target, peerEdge, edge) - if (canPlacePeer === CONFLICT) { - const current = target.resolve(peer.name) - this[_peerConflict] = { - peer: peer.explain(peerEdge), - current: current && current.explain(), - } - return CONFLICT - } - } + if (peer === dep) + continue + + const peerEdge = dep.edgesOut.get(peer.name) || + [...peer.edgesIn].find(e => e.peer) + + /* istanbul ignore if - pretty sure this is impossible, but just + being cautious */ + if (!peerEdge) + continue + + const canPlacePeer = this[_canPlaceDep](peer, target, peerEdge, edge) + if (canPlacePeer !== CONFLICT) + continue + + const current = target.resolve(peer.name) + this[_peerConflict] = { + peer: peer.explain(peerEdge), + current: current && current.explain(), } + return CONFLICT } - return ret } @@ -1362,7 +1525,7 @@ This is a one-time fix-up, please be patient... // nothing to prune, because we built it from scratch. if we didn't // add or remove anything, then also nothing to do. if (metaFromDisk && mutateTree) - this[_resetDepFlags]() + resetDepFlags(this.idealTree) // update all the dev/optional/etc flags in the tree // either we started with a fresh tree, or we @@ -1397,22 +1560,6 @@ This is a one-time fix-up, please be patient... node.parent = null } - // we'll need to actually do a walk from the root, because you can have - // a cycle of deps that all depend on each other, but no path from root. - // Also, since the ideal tree is loaded from the shrinkwrap, it had - // extraneous flags set false that might now be actually extraneous, and - // dev/optional flags that are also now incorrect. This method sets - // all flags to true, so we can find the set that is actually extraneous. - [_resetDepFlags] () { - for (const node of this.idealTree.inventory.values()) { - node.extraneous = true - node.dev = true - node.devOptional = true - node.peer = true - node.optional = true - } - } - [_pruneFailedOptional] () { for (const node of this[_loadFailures]) { if (!node.optional) diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/edge.js b/deps/npm/node_modules/@npmcli/arborist/lib/edge.js index 210e35cbcf51b2..0e30f463363700 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/edge.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/edge.js @@ -12,6 +12,8 @@ const _name = Symbol('_name') const _error = Symbol('_error') const _loadError = Symbol('_loadError') const _setFrom = Symbol('_setFrom') +const _explain = Symbol('_explain') +const _explanation = Symbol('_explanation') const types = new Set([ 'prod', @@ -60,6 +62,25 @@ class Edge { return depValid(node, this.spec, this.accept, this.from) } + explain (seen = []) { + if (this[_explanation]) + return this[_explanation] + + return this[_explanation] = this[_explain](seen) + } + + // return the edge data, and an explanation of how that edge came to be here + [_explain] (seen) { + const { error, from } = this + return { + type: this.type, + name: this.name, + spec: this.spec, + ...(error ? { error } : {}), + ...(from ? { from: from.explain(null, seen) } : {}), + } + } + get workspace () { return this[_type] === 'workspace' } @@ -125,6 +146,7 @@ class Edge { } reload (hard = false) { + this[_explanation] = null const newTo = this[_from].resolve(this.name) if (newTo !== this[_to]) { if (this[_to]) @@ -138,6 +160,7 @@ class Edge { } detach () { + this[_explanation] = null if (this[_to]) this[_to].edgesIn.delete(this) this[_from].edgesOut.delete(this.name) @@ -147,6 +170,7 @@ class Edge { } [_setFrom] (node) { + this[_explanation] = null this[_from] = node if (node.edgesOut.has(this.name)) node.edgesOut.get(this.name).detach() diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/node.js b/deps/npm/node_modules/@npmcli/arborist/lib/node.js index cc5e97f9e4b2b0..e30ae0232e9ca7 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/node.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/node.js @@ -57,7 +57,6 @@ const _delistFromMeta = Symbol('_delistFromMeta') const _global = Symbol.for('global') const _workspaces = Symbol('_workspaces') const _explain = Symbol('_explain') -const _explainEdge = Symbol('_explainEdge') const _explanation = Symbol('_explanation') const relpath = require('./relpath.js') @@ -340,9 +339,8 @@ class Node { why.whileInstalling = { name, version, + path: this.root.sourceReference.path, } - if (edge) - this[_explainEdge](edge, seen) } if (this.sourceReference) @@ -358,7 +356,7 @@ class Node { why.dependents = [] if (edge) - why.dependents.push(this[_explainEdge](edge, seen)) + why.dependents.push(edge.explain(seen)) else { // if we have an edge from the root, just show that, and stop there // no need to go deeper, because it doesn't provide much more value. @@ -376,21 +374,11 @@ class Node { edges.push(edge) } for (const edge of edges) - why.dependents.push(this[_explainEdge](edge, seen)) + why.dependents.push(edge.explain(seen)) } return why } - // return the edge data, and an explanation of how that edge came to be here - [_explainEdge] (edge, seen) { - return { - type: edge.type, - spec: edge.spec, - ...(edge.error ? { error: edge.error } : {}), - from: edge.from.explain(null, seen), - } - } - isDescendantOf (node) { for (let p = this; p; p = p.parent) { if (p === node) @@ -448,6 +436,14 @@ class Node { return !!bundler && bundler !== this.root } + get isWorkspace () { + if (this.isRoot) + return false + const { root } = this + const { type, to } = root.edgesOut.get(this.package.name) || {} + return type === 'workspace' && to && (to.target === this || to === this) + } + get isRoot () { return this === this.root } diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/reset-dep-flags.js b/deps/npm/node_modules/@npmcli/arborist/lib/reset-dep-flags.js new file mode 100644 index 00000000000000..e259e901a56254 --- /dev/null +++ b/deps/npm/node_modules/@npmcli/arborist/lib/reset-dep-flags.js @@ -0,0 +1,15 @@ +// Sometimes we need to actually do a walk from the root, because you can +// have a cycle of deps that all depend on each other, but no path from root. +// Also, since the ideal tree is loaded from the shrinkwrap, it had extraneous +// flags set false that might now be actually extraneous, and dev/optional +// flags that are also now incorrect. This method sets all flags to true, so +// we can find the set that is actually extraneous. +module.exports = tree => { + for (const node of tree.inventory.values()) { + node.extraneous = true + node.dev = true + node.devOptional = true + node.peer = true + node.optional = true + } +} diff --git a/deps/npm/node_modules/@npmcli/arborist/package.json b/deps/npm/node_modules/@npmcli/arborist/package.json index ea0aea167f0f3f..0bfeb079e9eddb 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": "0.0.33", + "version": "1.0.0", "description": "Manage node_modules trees", "dependencies": { "@npmcli/installed-package-contents": "^1.0.5", @@ -8,7 +8,7 @@ "@npmcli/metavuln-calculator": "^1.0.0", "@npmcli/name-from-folder": "^1.0.1", "@npmcli/node-gyp": "^1.0.0", - "@npmcli/run-script": "^1.7.0", + "@npmcli/run-script": "^1.7.2", "bin-links": "^2.2.1", "cacache": "^15.0.3", "common-ancestor-path": "^1.0.1", diff --git a/deps/npm/node_modules/bcrypt-pbkdf/CONTRIBUTING.md b/deps/npm/node_modules/bcrypt-pbkdf/CONTRIBUTING.md deleted file mode 100644 index 401d34ed5c7a3f..00000000000000 --- a/deps/npm/node_modules/bcrypt-pbkdf/CONTRIBUTING.md +++ /dev/null @@ -1,13 +0,0 @@ -# Contributing - -This repository uses [cr.joyent.us](https://cr.joyent.us) (Gerrit) for new -changes. Anyone can submit changes. To get started, see the [cr.joyent.us user -guide](https://github.com/joyent/joyent-gerrit/blob/master/docs/user/README.md). -This repo does not use GitHub pull requests. - -See the [Joyent Engineering -Guidelines](https://github.com/joyent/eng/blob/master/docs/index.md) for general -best practices expected in this repository. - -If you're changing something non-trivial or user-facing, you may want to submit -an issue first. diff --git a/deps/npm/node_modules/hosted-git-info/CHANGELOG.md b/deps/npm/node_modules/hosted-git-info/CHANGELOG.md index afdd90e138593b..7d7bee91c42e8c 100644 --- a/deps/npm/node_modules/hosted-git-info/CHANGELOG.md +++ b/deps/npm/node_modules/hosted-git-info/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [3.0.6](https://github.com/npm/hosted-git-info/compare/v3.0.5...v3.0.6) (2020-10-12) + + +### Bug Fixes + +* support to github gist legacy hash length ([c067102](https://github.com/npm/hosted-git-info/commit/c067102)), closes [#68](https://github.com/npm/hosted-git-info/issues/68) + + + ## [3.0.5](https://github.com/npm/hosted-git-info/compare/v3.0.4...v3.0.5) (2020-07-11) diff --git a/deps/npm/node_modules/hosted-git-info/git-host-info.js b/deps/npm/node_modules/hosted-git-info/git-host-info.js index 8147e3348f5e80..ffd401de548e82 100644 --- a/deps/npm/node_modules/hosted-git-info/git-host-info.js +++ b/deps/npm/node_modules/hosted-git-info/git-host-info.js @@ -30,7 +30,7 @@ var gitHosts = module.exports = { gist: { 'protocols': [ 'git', 'git+ssh', 'git+https', 'ssh', 'https' ], 'domain': 'gist.github.com', - 'pathmatch': /^[/](?:([^/]+)[/])?([a-z0-9]{32,})(?:[.]git)?$/, + 'pathmatch': /^[/](?:([^/]+)[/])?([a-z0-9]{7,})(?:[.]git)?$/, 'filetemplate': 'https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}', 'bugstemplate': 'https://{domain}/{project}', 'gittemplate': 'git://{domain}/{project}.git{#committish}', diff --git a/deps/npm/node_modules/hosted-git-info/package.json b/deps/npm/node_modules/hosted-git-info/package.json index 407ffe0f9bc1ea..7d1314c42ae4b7 100644 --- a/deps/npm/node_modules/hosted-git-info/package.json +++ b/deps/npm/node_modules/hosted-git-info/package.json @@ -1,6 +1,6 @@ { "name": "hosted-git-info", - "version": "3.0.5", + "version": "3.0.6", "description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab", "main": "index.js", "repository": { diff --git a/deps/npm/node_modules/init-package-json/CHANGELOG.md b/deps/npm/node_modules/init-package-json/CHANGELOG.md index 35096f4abb0c56..92e92aed117148 100644 --- a/deps/npm/node_modules/init-package-json/CHANGELOG.md +++ b/deps/npm/node_modules/init-package-json/CHANGELOG.md @@ -1,6 +1,10 @@ # Change Log -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [2.0.0](https://github.com/npm/init-package-json/compare/v1.10.3...v2.0.0) (2020-10-09) +* BREAKING: requires node10+ +* fix: compat with new `@npmcli/config` module +* chore: update deps to latest and greatest ## [1.10.3](https://github.com/npm/init-package-json/compare/v1.10.2...v1.10.3) (2018-03-07) diff --git a/deps/npm/node_modules/init-package-json/default-input.js b/deps/npm/node_modules/init-package-json/default-input.js index 7d859a0d9b105e..8e9fe0b573ea5f 100644 --- a/deps/npm/node_modules/init-package-json/default-input.js +++ b/deps/npm/node_modules/init-package-json/default-input.js @@ -70,8 +70,14 @@ exports.name = yes ? name : prompt('package name', niceName(name), function (da return er }) +const defaultDottedInitVersion = config && + config.defaults && + config.defaults['init.version'] +const dottedInitVersion = + config.get('init.version') !== defaultDottedInitVersion && + config.get('init.version') var version = package.version || - config.get('init.version') || + dottedInitVersion || config.get('init-version') || '1.0.0' exports.version = yes ? @@ -230,8 +236,14 @@ if (!package.author) { : yes ? '' : prompt('author') } +const defaultDottedInitLicense = config && + config.defaults && + config.defaults['init.license'] +const dottedInitLicense = + config.get('init.license') !== defaultDottedInitLicense && + config.get('init.license') var license = package.license || - config.get('init.license') || + dottedInitLicense || config.get('init-license') || 'ISC' exports.license = yes ? license : prompt('license', license, function (data) { diff --git a/deps/npm/node_modules/init-package-json/node_modules/hosted-git-info/CHANGELOG.md b/deps/npm/node_modules/init-package-json/node_modules/hosted-git-info/CHANGELOG.md deleted file mode 100644 index 4f86601e029e95..00000000000000 --- a/deps/npm/node_modules/init-package-json/node_modules/hosted-git-info/CHANGELOG.md +++ /dev/null @@ -1,141 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - - -## [2.8.8](https://github.com/npm/hosted-git-info/compare/v2.8.7...v2.8.8) (2020-02-29) - - -### Bug Fixes - -* [#61](https://github.com/npm/hosted-git-info/issues/61) & [#65](https://github.com/npm/hosted-git-info/issues/65) addressing issues w/ url.URL implmentation which regressed node 6 support ([5038b18](https://github.com/npm/hosted-git-info/commit/5038b18)), closes [#66](https://github.com/npm/hosted-git-info/issues/66) - - - - -## [2.8.7](https://github.com/npm/hosted-git-info/compare/v2.8.6...v2.8.7) (2020-02-26) - - -### Bug Fixes - -* Do not attempt to use url.URL when unavailable ([2d0bb66](https://github.com/npm/hosted-git-info/commit/2d0bb66)), closes [#61](https://github.com/npm/hosted-git-info/issues/61) [#62](https://github.com/npm/hosted-git-info/issues/62) -* Do not pass scp-style URLs to the WhatWG url.URL ([f2cdfcf](https://github.com/npm/hosted-git-info/commit/f2cdfcf)), closes [#60](https://github.com/npm/hosted-git-info/issues/60) - - - - -## [2.8.6](https://github.com/npm/hosted-git-info/compare/v2.8.5...v2.8.6) (2020-02-25) - - - - -## [2.8.5](https://github.com/npm/hosted-git-info/compare/v2.8.4...v2.8.5) (2019-10-07) - - -### Bug Fixes - -* updated pathmatch for gitlab ([e8325b5](https://github.com/npm/hosted-git-info/commit/e8325b5)), closes [#51](https://github.com/npm/hosted-git-info/issues/51) -* updated pathmatch for gitlab ([ffe056f](https://github.com/npm/hosted-git-info/commit/ffe056f)) - - - - -## [2.8.4](https://github.com/npm/hosted-git-info/compare/v2.8.3...v2.8.4) (2019-08-12) - - - - -## [2.8.3](https://github.com/npm/hosted-git-info/compare/v2.8.2...v2.8.3) (2019-08-12) - - - - -## [2.8.2](https://github.com/npm/hosted-git-info/compare/v2.8.1...v2.8.2) (2019-08-05) - - -### Bug Fixes - -* http protocol use sshurl by default ([3b1d629](https://github.com/npm/hosted-git-info/commit/3b1d629)), closes [#48](https://github.com/npm/hosted-git-info/issues/48) - - - - -## [2.8.1](https://github.com/npm/hosted-git-info/compare/v2.8.0...v2.8.1) (2019-08-05) - - -### Bug Fixes - -* ignore noCommittish on tarball url generation ([5d4a8d7](https://github.com/npm/hosted-git-info/commit/5d4a8d7)) -* use gist tarball url that works for anonymous gists ([1692435](https://github.com/npm/hosted-git-info/commit/1692435)) - - - - -# [2.8.0](https://github.com/npm/hosted-git-info/compare/v2.7.1...v2.8.0) (2019-08-05) - - -### Bug Fixes - -* Allow slashes in gitlab project section ([bbcf7b2](https://github.com/npm/hosted-git-info/commit/bbcf7b2)), closes [#46](https://github.com/npm/hosted-git-info/issues/46) [#43](https://github.com/npm/hosted-git-info/issues/43) -* **git-host:** disallow URI-encoded slash (%2F) in `path` ([3776fa5](https://github.com/npm/hosted-git-info/commit/3776fa5)), closes [#44](https://github.com/npm/hosted-git-info/issues/44) -* **gitlab:** Do not URL encode slashes in project name for GitLab https URL ([cbf04f9](https://github.com/npm/hosted-git-info/commit/cbf04f9)), closes [#47](https://github.com/npm/hosted-git-info/issues/47) -* do not allow invalid gist urls ([d5cf830](https://github.com/npm/hosted-git-info/commit/d5cf830)) -* **cache:** Switch to lru-cache to save ourselves from unlimited memory consumption ([e518222](https://github.com/npm/hosted-git-info/commit/e518222)), closes [#38](https://github.com/npm/hosted-git-info/issues/38) - - -### Features - -* give these objects a name ([60abaea](https://github.com/npm/hosted-git-info/commit/60abaea)) - - - - -## [2.7.1](https://github.com/npm/hosted-git-info/compare/v2.7.0...v2.7.1) (2018-07-07) - - -### Bug Fixes - -* **index:** Guard against non-string types ([5bc580d](https://github.com/npm/hosted-git-info/commit/5bc580d)) -* **parse:** Crash on strings that parse to having no host ([c931482](https://github.com/npm/hosted-git-info/commit/c931482)), closes [#35](https://github.com/npm/hosted-git-info/issues/35) - - - - -# [2.7.0](https://github.com/npm/hosted-git-info/compare/v2.6.1...v2.7.0) (2018-07-06) - - -### Bug Fixes - -* **github tarball:** update github tarballtemplate ([6efd582](https://github.com/npm/hosted-git-info/commit/6efd582)), closes [#34](https://github.com/npm/hosted-git-info/issues/34) -* **gitlab docs:** switched to lowercase anchors for readmes ([701bcd1](https://github.com/npm/hosted-git-info/commit/701bcd1)) - - -### Features - -* **all:** Support www. prefixes on hostnames ([3349575](https://github.com/npm/hosted-git-info/commit/3349575)), closes [#32](https://github.com/npm/hosted-git-info/issues/32) - - - - -## [2.6.1](https://github.com/npm/hosted-git-info/compare/v2.6.0...v2.6.1) (2018-06-25) - -### Bug Fixes - -* **Revert:** "compat: remove Object.assign fallback ([#25](https://github.com/npm/hosted-git-info/issues/25))" ([cce5a62](https://github.com/npm/hosted-git-info/commit/cce5a62)) -* **Revert:** "git-host: fix forgotten extend()" ([a815ec9](https://github.com/npm/hosted-git-info/commit/a815ec9)) - - - - -# [2.6.0](https://github.com/npm/hosted-git-info/compare/v2.5.0...v2.6.0) (2018-03-07) - - -### Bug Fixes - -* **compat:** remove Object.assign fallback ([#25](https://github.com/npm/hosted-git-info/issues/25)) ([627ab55](https://github.com/npm/hosted-git-info/commit/627ab55)) -* **git-host:** fix forgotten extend() ([eba1f7b](https://github.com/npm/hosted-git-info/commit/eba1f7b)) - - -### Features - -* **browse:** fragment support for browse() ([#28](https://github.com/npm/hosted-git-info/issues/28)) ([cd5e5bb](https://github.com/npm/hosted-git-info/commit/cd5e5bb)) diff --git a/deps/npm/node_modules/init-package-json/node_modules/hosted-git-info/README.md b/deps/npm/node_modules/init-package-json/node_modules/hosted-git-info/README.md deleted file mode 100644 index 7b723f6b9e2134..00000000000000 --- a/deps/npm/node_modules/init-package-json/node_modules/hosted-git-info/README.md +++ /dev/null @@ -1,133 +0,0 @@ -# hosted-git-info - -This will let you identify and transform various git hosts URLs between -protocols. It also can tell you what the URL is for the raw path for -particular file for direct access without git. - -## Example - -```javascript -var hostedGitInfo = require("hosted-git-info") -var info = hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git", opts) -/* info looks like: -{ - type: "github", - domain: "github.com", - user: "npm", - project: "hosted-git-info" -} -*/ -``` - -If the URL can't be matched with a git host, `null` will be returned. We -can match git, ssh and https urls. Additionally, we can match ssh connect -strings (`git@github.com:npm/hosted-git-info`) and shortcuts (eg, -`github:npm/hosted-git-info`). Github specifically, is detected in the case -of a third, unprefixed, form: `npm/hosted-git-info`. - -If it does match, the returned object has properties of: - -* info.type -- The short name of the service -* info.domain -- The domain for git protocol use -* info.user -- The name of the user/org on the git host -* info.project -- The name of the project on the git host - -## Version Contract - -The major version will be bumped any time… - -* The constructor stops accepting URLs that it previously accepted. -* A method is removed. -* A method can no longer accept the number and type of arguments it previously accepted. -* A method can return a different type than it currently returns. - -Implications: - -* I do not consider the specific format of the urls returned from, say - `.https()` to be a part of the contract. The contract is that it will - return a string that can be used to fetch the repo via HTTPS. But what - that string looks like, specifically, can change. -* Dropping support for a hosted git provider would constitute a breaking - change. - -## Usage - -### var info = hostedGitInfo.fromUrl(gitSpecifier[, options]) - -* *gitSpecifer* is a URL of a git repository or a SCP-style specifier of one. -* *options* is an optional object. It can have the following properties: - * *noCommittish* — If true then committishes won't be included in generated URLs. - * *noGitPlus* — If true then `git+` won't be prefixed on URLs. - -## Methods - -All of the methods take the same options as the `fromUrl` factory. Options -provided to a method override those provided to the constructor. - -* info.file(path, opts) - -Given the path of a file relative to the repository, returns a URL for -directly fetching it from the githost. If no committish was set then -`master` will be used as the default. - -For example `hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git#v1.0.0").file("package.json")` -would return `https://raw.githubusercontent.com/npm/hosted-git-info/v1.0.0/package.json` - -* info.shortcut(opts) - -eg, `github:npm/hosted-git-info` - -* info.browse(path, fragment, opts) - -eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0`, -`https://github.com/npm/hosted-git-info/tree/v1.2.0/package.json`, -`https://github.com/npm/hosted-git-info/tree/v1.2.0/REAMDE.md#supported-hosts` - -* info.bugs(opts) - -eg, `https://github.com/npm/hosted-git-info/issues` - -* info.docs(opts) - -eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0#readme` - -* info.https(opts) - -eg, `git+https://github.com/npm/hosted-git-info.git` - -* info.sshurl(opts) - -eg, `git+ssh://git@github.com/npm/hosted-git-info.git` - -* info.ssh(opts) - -eg, `git@github.com:npm/hosted-git-info.git` - -* info.path(opts) - -eg, `npm/hosted-git-info` - -* info.tarball(opts) - -eg, `https://github.com/npm/hosted-git-info/archive/v1.2.0.tar.gz` - -* info.getDefaultRepresentation() - -Returns the default output type. The default output type is based on the -string you passed in to be parsed - -* info.toString(opts) - -Uses the getDefaultRepresentation to call one of the other methods to get a URL for -this resource. As such `hostedGitInfo.fromUrl(url).toString()` will give -you a normalized version of the URL that still uses the same protocol. - -Shortcuts will still be returned as shortcuts, but the special case github -form of `org/project` will be normalized to `github:org/project`. - -SSH connect strings will be normalized into `git+ssh` URLs. - -## Supported hosts - -Currently this supports Github, Bitbucket and Gitlab. Pull requests for -additional hosts welcome. diff --git a/deps/npm/node_modules/init-package-json/node_modules/hosted-git-info/git-host-info.js b/deps/npm/node_modules/init-package-json/node_modules/hosted-git-info/git-host-info.js deleted file mode 100644 index 8147e3348f5e80..00000000000000 --- a/deps/npm/node_modules/init-package-json/node_modules/hosted-git-info/git-host-info.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict' - -var gitHosts = module.exports = { - github: { - // First two are insecure and generally shouldn't be used any more, but - // they are still supported. - 'protocols': [ 'git', 'http', 'git+ssh', 'git+https', 'ssh', 'https' ], - 'domain': 'github.com', - 'treepath': 'tree', - 'filetemplate': 'https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}', - 'bugstemplate': 'https://{domain}/{user}/{project}/issues', - 'gittemplate': 'git://{auth@}{domain}/{user}/{project}.git{#committish}', - 'tarballtemplate': 'https://codeload.{domain}/{user}/{project}/tar.gz/{committish}' - }, - bitbucket: { - 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], - 'domain': 'bitbucket.org', - 'treepath': 'src', - 'tarballtemplate': 'https://{domain}/{user}/{project}/get/{committish}.tar.gz' - }, - gitlab: { - 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], - 'domain': 'gitlab.com', - 'treepath': 'tree', - 'bugstemplate': 'https://{domain}/{user}/{project}/issues', - 'httpstemplate': 'git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}', - 'tarballtemplate': 'https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}', - 'pathmatch': /^[/]([^/]+)[/]((?!.*(\/-\/|\/repository\/archive\.tar\.gz\?=.*|\/repository\/[^/]+\/archive.tar.gz$)).*?)(?:[.]git|[/])?$/ - }, - gist: { - 'protocols': [ 'git', 'git+ssh', 'git+https', 'ssh', 'https' ], - 'domain': 'gist.github.com', - 'pathmatch': /^[/](?:([^/]+)[/])?([a-z0-9]{32,})(?:[.]git)?$/, - 'filetemplate': 'https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}', - 'bugstemplate': 'https://{domain}/{project}', - 'gittemplate': 'git://{domain}/{project}.git{#committish}', - 'sshtemplate': 'git@{domain}:/{project}.git{#committish}', - 'sshurltemplate': 'git+ssh://git@{domain}/{project}.git{#committish}', - 'browsetemplate': 'https://{domain}/{project}{/committish}', - 'browsefiletemplate': 'https://{domain}/{project}{/committish}{#path}', - 'docstemplate': 'https://{domain}/{project}{/committish}', - 'httpstemplate': 'git+https://{domain}/{project}.git{#committish}', - 'shortcuttemplate': '{type}:{project}{#committish}', - 'pathtemplate': '{project}{#committish}', - 'tarballtemplate': 'https://codeload.github.com/gist/{project}/tar.gz/{committish}', - 'hashformat': function (fragment) { - return 'file-' + formatHashFragment(fragment) - } - } -} - -var gitHostDefaults = { - 'sshtemplate': 'git@{domain}:{user}/{project}.git{#committish}', - 'sshurltemplate': 'git+ssh://git@{domain}/{user}/{project}.git{#committish}', - 'browsetemplate': 'https://{domain}/{user}/{project}{/tree/committish}', - 'browsefiletemplate': 'https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}', - 'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#readme', - 'httpstemplate': 'git+https://{auth@}{domain}/{user}/{project}.git{#committish}', - 'filetemplate': 'https://{domain}/{user}/{project}/raw/{committish}/{path}', - 'shortcuttemplate': '{type}:{user}/{project}{#committish}', - 'pathtemplate': '{user}/{project}{#committish}', - 'pathmatch': /^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/, - 'hashformat': formatHashFragment -} - -Object.keys(gitHosts).forEach(function (name) { - Object.keys(gitHostDefaults).forEach(function (key) { - if (gitHosts[name][key]) return - gitHosts[name][key] = gitHostDefaults[key] - }) - gitHosts[name].protocols_re = RegExp('^(' + - gitHosts[name].protocols.map(function (protocol) { - return protocol.replace(/([\\+*{}()[\]$^|])/g, '\\$1') - }).join('|') + '):$') -}) - -function formatHashFragment (fragment) { - return fragment.toLowerCase().replace(/^\W+|\/|\W+$/g, '').replace(/\W+/g, '-') -} diff --git a/deps/npm/node_modules/init-package-json/node_modules/hosted-git-info/git-host.js b/deps/npm/node_modules/init-package-json/node_modules/hosted-git-info/git-host.js deleted file mode 100644 index 9616fbaa6b4af0..00000000000000 --- a/deps/npm/node_modules/init-package-json/node_modules/hosted-git-info/git-host.js +++ /dev/null @@ -1,156 +0,0 @@ -'use strict' -var gitHosts = require('./git-host-info.js') -/* eslint-disable node/no-deprecated-api */ - -// copy-pasta util._extend from node's source, to avoid pulling -// the whole util module into peoples' webpack bundles. -/* istanbul ignore next */ -var extend = Object.assign || function _extend (target, source) { - // Don't do anything if source isn't an object - if (source === null || typeof source !== 'object') return target - - var keys = Object.keys(source) - var i = keys.length - while (i--) { - target[keys[i]] = source[keys[i]] - } - return target -} - -module.exports = GitHost -function GitHost (type, user, auth, project, committish, defaultRepresentation, opts) { - var gitHostInfo = this - gitHostInfo.type = type - Object.keys(gitHosts[type]).forEach(function (key) { - gitHostInfo[key] = gitHosts[type][key] - }) - gitHostInfo.user = user - gitHostInfo.auth = auth - gitHostInfo.project = project - gitHostInfo.committish = committish - gitHostInfo.default = defaultRepresentation - gitHostInfo.opts = opts || {} -} - -GitHost.prototype.hash = function () { - return this.committish ? '#' + this.committish : '' -} - -GitHost.prototype._fill = function (template, opts) { - if (!template) return - var vars = extend({}, opts) - vars.path = vars.path ? vars.path.replace(/^[/]+/g, '') : '' - opts = extend(extend({}, this.opts), opts) - var self = this - Object.keys(this).forEach(function (key) { - if (self[key] != null && vars[key] == null) vars[key] = self[key] - }) - var rawAuth = vars.auth - var rawcommittish = vars.committish - var rawFragment = vars.fragment - var rawPath = vars.path - var rawProject = vars.project - Object.keys(vars).forEach(function (key) { - var value = vars[key] - if ((key === 'path' || key === 'project') && typeof value === 'string') { - vars[key] = value.split('/').map(function (pathComponent) { - return encodeURIComponent(pathComponent) - }).join('/') - } else { - vars[key] = encodeURIComponent(value) - } - }) - vars['auth@'] = rawAuth ? rawAuth + '@' : '' - vars['#fragment'] = rawFragment ? '#' + this.hashformat(rawFragment) : '' - vars.fragment = vars.fragment ? vars.fragment : '' - vars['#path'] = rawPath ? '#' + this.hashformat(rawPath) : '' - vars['/path'] = vars.path ? '/' + vars.path : '' - vars.projectPath = rawProject.split('/').map(encodeURIComponent).join('/') - if (opts.noCommittish) { - vars['#committish'] = '' - vars['/tree/committish'] = '' - vars['/committish'] = '' - vars.committish = '' - } else { - vars['#committish'] = rawcommittish ? '#' + rawcommittish : '' - vars['/tree/committish'] = vars.committish - ? '/' + vars.treepath + '/' + vars.committish - : '' - vars['/committish'] = vars.committish ? '/' + vars.committish : '' - vars.committish = vars.committish || 'master' - } - var res = template - Object.keys(vars).forEach(function (key) { - res = res.replace(new RegExp('[{]' + key + '[}]', 'g'), vars[key]) - }) - if (opts.noGitPlus) { - return res.replace(/^git[+]/, '') - } else { - return res - } -} - -GitHost.prototype.ssh = function (opts) { - return this._fill(this.sshtemplate, opts) -} - -GitHost.prototype.sshurl = function (opts) { - return this._fill(this.sshurltemplate, opts) -} - -GitHost.prototype.browse = function (P, F, opts) { - if (typeof P === 'string') { - if (typeof F !== 'string') { - opts = F - F = null - } - return this._fill(this.browsefiletemplate, extend({ - fragment: F, - path: P - }, opts)) - } else { - return this._fill(this.browsetemplate, P) - } -} - -GitHost.prototype.docs = function (opts) { - return this._fill(this.docstemplate, opts) -} - -GitHost.prototype.bugs = function (opts) { - return this._fill(this.bugstemplate, opts) -} - -GitHost.prototype.https = function (opts) { - return this._fill(this.httpstemplate, opts) -} - -GitHost.prototype.git = function (opts) { - return this._fill(this.gittemplate, opts) -} - -GitHost.prototype.shortcut = function (opts) { - return this._fill(this.shortcuttemplate, opts) -} - -GitHost.prototype.path = function (opts) { - return this._fill(this.pathtemplate, opts) -} - -GitHost.prototype.tarball = function (opts_) { - var opts = extend({}, opts_, { noCommittish: false }) - return this._fill(this.tarballtemplate, opts) -} - -GitHost.prototype.file = function (P, opts) { - return this._fill(this.filetemplate, extend({ path: P }, opts)) -} - -GitHost.prototype.getDefaultRepresentation = function () { - return this.default -} - -GitHost.prototype.toString = function (opts) { - if (this.default && typeof this[this.default] === 'function') return this[this.default](opts) - return this.sshurl(opts) -} diff --git a/deps/npm/node_modules/init-package-json/node_modules/hosted-git-info/index.js b/deps/npm/node_modules/init-package-json/node_modules/hosted-git-info/index.js deleted file mode 100644 index 21e53fe3724be1..00000000000000 --- a/deps/npm/node_modules/init-package-json/node_modules/hosted-git-info/index.js +++ /dev/null @@ -1,148 +0,0 @@ -'use strict' -var url = require('url') -var gitHosts = require('./git-host-info.js') -var GitHost = module.exports = require('./git-host.js') - -var protocolToRepresentationMap = { - 'git+ssh:': 'sshurl', - 'git+https:': 'https', - 'ssh:': 'sshurl', - 'git:': 'git' -} - -function protocolToRepresentation (protocol) { - return protocolToRepresentationMap[protocol] || protocol.slice(0, -1) -} - -var authProtocols = { - 'git:': true, - 'https:': true, - 'git+https:': true, - 'http:': true, - 'git+http:': true -} - -var cache = {} - -module.exports.fromUrl = function (giturl, opts) { - if (typeof giturl !== 'string') return - var key = giturl + JSON.stringify(opts || {}) - - if (!(key in cache)) { - cache[key] = fromUrl(giturl, opts) - } - - return cache[key] -} - -function fromUrl (giturl, opts) { - if (giturl == null || giturl === '') return - var url = fixupUnqualifiedGist( - isGitHubShorthand(giturl) ? 'github:' + giturl : giturl - ) - var parsed = parseGitUrl(url) - var shortcutMatch = url.match(new RegExp('^([^:]+):(?:(?:[^@:]+(?:[^@]+)?@)?([^/]*))[/](.+?)(?:[.]git)?($|#)')) - var matches = Object.keys(gitHosts).map(function (gitHostName) { - try { - var gitHostInfo = gitHosts[gitHostName] - var auth = null - if (parsed.auth && authProtocols[parsed.protocol]) { - auth = parsed.auth - } - var committish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null - var user = null - var project = null - var defaultRepresentation = null - if (shortcutMatch && shortcutMatch[1] === gitHostName) { - user = shortcutMatch[2] && decodeURIComponent(shortcutMatch[2]) - project = decodeURIComponent(shortcutMatch[3]) - defaultRepresentation = 'shortcut' - } else { - if (parsed.host && parsed.host !== gitHostInfo.domain && parsed.host.replace(/^www[.]/, '') !== gitHostInfo.domain) return - if (!gitHostInfo.protocols_re.test(parsed.protocol)) return - if (!parsed.path) return - var pathmatch = gitHostInfo.pathmatch - var matched = parsed.path.match(pathmatch) - if (!matched) return - /* istanbul ignore else */ - if (matched[1] !== null && matched[1] !== undefined) { - user = decodeURIComponent(matched[1].replace(/^:/, '')) - } - project = decodeURIComponent(matched[2]) - defaultRepresentation = protocolToRepresentation(parsed.protocol) - } - return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation, opts) - } catch (ex) { - /* istanbul ignore else */ - if (ex instanceof URIError) { - } else throw ex - } - }).filter(function (gitHostInfo) { return gitHostInfo }) - if (matches.length !== 1) return - return matches[0] -} - -function isGitHubShorthand (arg) { - // Note: This does not fully test the git ref format. - // See https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html - // - // The only way to do this properly would be to shell out to - // git-check-ref-format, and as this is a fast sync function, - // we don't want to do that. Just let git fail if it turns - // out that the commit-ish is invalid. - // GH usernames cannot start with . or - - return /^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(arg) -} - -function fixupUnqualifiedGist (giturl) { - // necessary for round-tripping gists - var parsed = url.parse(giturl) - if (parsed.protocol === 'gist:' && parsed.host && !parsed.path) { - return parsed.protocol + '/' + parsed.host - } else { - return giturl - } -} - -function parseGitUrl (giturl) { - var matched = giturl.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/) - if (!matched) { - var legacy = url.parse(giturl) - // If we don't have url.URL, then sorry, this is just not fixable. - // This affects Node <= 6.12. - if (legacy.auth && typeof url.URL === 'function') { - // git urls can be in the form of scp-style/ssh-connect strings, like - // git+ssh://user@host.com:some/path, which the legacy url parser - // supports, but WhatWG url.URL class does not. However, the legacy - // parser de-urlencodes the username and password, so something like - // https://user%3An%40me:p%40ss%3Aword@x.com/ becomes - // https://user:n@me:p@ss:word@x.com/ which is all kinds of wrong. - // Pull off just the auth and host, so we dont' get the confusing - // scp-style URL, then pass that to the WhatWG parser to get the - // auth properly escaped. - var authmatch = giturl.match(/[^@]+@[^:/]+/) - /* istanbul ignore else - this should be impossible */ - if (authmatch) { - var whatwg = new url.URL(authmatch[0]) - legacy.auth = whatwg.username || '' - if (whatwg.password) legacy.auth += ':' + whatwg.password - } - } - return legacy - } - return { - protocol: 'git+ssh:', - slashes: true, - auth: matched[1], - host: matched[2], - port: null, - hostname: matched[2], - hash: matched[4], - search: null, - query: null, - pathname: '/' + matched[3], - path: '/' + matched[3], - href: 'git+ssh://' + matched[1] + '@' + matched[2] + - '/' + matched[3] + (matched[4] || '') - } -} diff --git a/deps/npm/node_modules/init-package-json/node_modules/hosted-git-info/package.json b/deps/npm/node_modules/init-package-json/node_modules/hosted-git-info/package.json deleted file mode 100644 index e47c096ef2a620..00000000000000 --- a/deps/npm/node_modules/init-package-json/node_modules/hosted-git-info/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "hosted-git-info", - "version": "2.8.8", - "description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab", - "main": "index.js", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/hosted-git-info.git" - }, - "keywords": [ - "git", - "github", - "bitbucket", - "gitlab" - ], - "author": "Rebecca Turner (http://re-becca.org)", - "license": "ISC", - "bugs": { - "url": "https://github.com/npm/hosted-git-info/issues" - }, - "homepage": "https://github.com/npm/hosted-git-info", - "scripts": { - "prerelease": "npm t", - "postrelease": "npm publish --tag=ancient-legacy-fixes && git push --follow-tags", - "posttest": "standard", - "release": "standard-version -s", - "test:coverage": "tap --coverage-report=html -J --coverage=90 --no-esm test/*.js", - "test": "tap -J --coverage=90 --no-esm test/*.js" - }, - "devDependencies": { - "standard": "^11.0.1", - "standard-version": "^4.4.0", - "tap": "^12.7.0" - }, - "files": [ - "index.js", - "git-host.js", - "git-host-info.js" - ] -} diff --git a/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/CHANGELOG.md b/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/CHANGELOG.md deleted file mode 100644 index 1b3431acced775..00000000000000 --- a/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/CHANGELOG.md +++ /dev/null @@ -1,26 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - - -## [6.1.1](https://github.com/npm/npm-package-arg/compare/v6.1.0...v6.1.1) (2019-08-21) - - -### Bug Fixes - -* preserve drive letter on windows git file:// urls ([3909203](https://github.com/npm/npm-package-arg/commit/3909203)) - - - - -# [6.1.0](https://github.com/npm/npm-package-arg/compare/v6.0.0...v6.1.0) (2018-04-10) - - -### Bug Fixes - -* **git:** Fix gitRange for git+ssh for private git ([#33](https://github.com/npm/npm-package-arg/issues/33)) ([647a0b3](https://github.com/npm/npm-package-arg/commit/647a0b3)) - - -### Features - -* **alias:** add `npm:` registry alias spec ([#34](https://github.com/npm/npm-package-arg/issues/34)) ([ab99f8e](https://github.com/npm/npm-package-arg/commit/ab99f8e)) diff --git a/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/LICENSE b/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/LICENSE deleted file mode 100644 index 05eeeb88c2ef4c..00000000000000 --- a/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/README.md b/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/README.md deleted file mode 100644 index 847341b21a3b78..00000000000000 --- a/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/README.md +++ /dev/null @@ -1,83 +0,0 @@ -# npm-package-arg - -[![Build Status](https://travis-ci.org/npm/npm-package-arg.svg?branch=master)](https://travis-ci.org/npm/npm-package-arg) - -Parses package name and specifier passed to commands like `npm install` or -`npm cache add`, or as found in `package.json` dependency sections. - -## EXAMPLES - -```javascript -var assert = require("assert") -var npa = require("npm-package-arg") - -// Pass in the descriptor, and it'll return an object -try { - var parsed = npa("@bar/foo@1.2") -} catch (ex) { - … -} -``` - -## USING - -`var npa = require('npm-package-arg')` - -### var result = npa(*arg*[, *where*]) - -* *arg* - a string that you might pass to `npm install`, like: -`foo@1.2`, `@bar/foo@1.2`, `foo@user/foo`, `http://x.com/foo.tgz`, -`git+https://github.com/user/foo`, `bitbucket:user/foo`, `foo.tar.gz`, -`../foo/bar/` or `bar`. If the *arg* you provide doesn't have a specifier -part, eg `foo` then the specifier will default to `latest`. -* *where* - Optionally the path to resolve file paths relative to. Defaults to `process.cwd()` - -**Throws** if the package name is invalid, a dist-tag is invalid or a URL's protocol is not supported. - -### var result = npa.resolve(*name*, *spec*[, *where*]) - -* *name* - The name of the module you want to install. For example: `foo` or `@bar/foo`. -* *spec* - The specifier indicating where and how you can get this module. Something like: -`1.2`, `^1.7.17`, `http://x.com/foo.tgz`, `git+https://github.com/user/foo`, -`bitbucket:user/foo`, `file:foo.tar.gz` or `file:../foo/bar/`. If not -included then the default is `latest`. -* *where* - Optionally the path to resolve file paths relative to. Defaults to `process.cwd()` - -**Throws** if the package name is invalid, a dist-tag is invalid or a URL's protocol is not supported. - -## RESULT OBJECT - -The objects that are returned by npm-package-arg contain the following -keys: - -* `type` - One of the following strings: - * `git` - A git repo - * `tag` - A tagged version, like `"foo@latest"` - * `version` - A specific version number, like `"foo@1.2.3"` - * `range` - A version range, like `"foo@2.x"` - * `file` - A local `.tar.gz`, `.tar` or `.tgz` file. - * `directory` - A local directory. - * `remote` - An http url (presumably to a tgz) -* `registry` - If true this specifier refers to a resource hosted on a - registry. This is true for `tag`, `version` and `range` types. -* `name` - If known, the `name` field expected in the resulting pkg. -* `scope` - If a name is something like `@org/module` then the `scope` - field will be set to `@org`. If it doesn't have a scoped name, then - scope is `null`. -* `escapedName` - A version of `name` escaped to match the npm scoped packages - specification. Mostly used when making requests against a registry. When - `name` is `null`, `escapedName` will also be `null`. -* `rawSpec` - The specifier part that was parsed out in calls to `npa(arg)`, - or the value of `spec` in calls to `npa.resolve(name, spec). -* `saveSpec` - The normalized specifier, for saving to package.json files. - `null` for registry dependencies. -* `fetchSpec` - The version of the specifier to be used to fetch this - resource. `null` for shortcuts to hosted git dependencies as there isn't - just one URL to try with them. -* `gitRange` - If set, this is a semver specifier to match against git tags with -* `gitCommittish` - If set, this is the specific committish to use with a git dependency. -* `hosted` - If `from === 'hosted'` then this will be a `hosted-git-info` - object. This property is not included when serializing the object as - JSON. -* `raw` - The original un-modified string that was provided. If called as - `npa.resolve(name, spec)` then this will be `name + '@' + spec`. diff --git a/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/npa.js b/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/npa.js deleted file mode 100644 index bf2c17cfd513fb..00000000000000 --- a/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/npa.js +++ /dev/null @@ -1,301 +0,0 @@ -'use strict' -module.exports = npa -module.exports.resolve = resolve -module.exports.Result = Result - -let url -let HostedGit -let semver -let path_ -function path () { - if (!path_) path_ = require('path') - return path_ -} -let validatePackageName -let osenv - -const isWindows = process.platform === 'win32' || global.FAKE_WINDOWS -const hasSlashes = isWindows ? /\\|[/]/ : /[/]/ -const isURL = /^(?:git[+])?[a-z]+:/i -const isFilename = /[.](?:tgz|tar.gz|tar)$/i - -function npa (arg, where) { - let name - let spec - if (typeof arg === 'object') { - if (arg instanceof Result && (!where || where === arg.where)) { - return arg - } else if (arg.name && arg.rawSpec) { - return npa.resolve(arg.name, arg.rawSpec, where || arg.where) - } else { - return npa(arg.raw, where || arg.where) - } - } - const nameEndsAt = arg[0] === '@' ? arg.slice(1).indexOf('@') + 1 : arg.indexOf('@') - const namePart = nameEndsAt > 0 ? arg.slice(0, nameEndsAt) : arg - if (isURL.test(arg)) { - spec = arg - } else if (namePart[0] !== '@' && (hasSlashes.test(namePart) || isFilename.test(namePart))) { - spec = arg - } else if (nameEndsAt > 0) { - name = namePart - spec = arg.slice(nameEndsAt + 1) - } else { - if (!validatePackageName) validatePackageName = require('validate-npm-package-name') - const valid = validatePackageName(arg) - if (valid.validForOldPackages) { - name = arg - } else { - spec = arg - } - } - return resolve(name, spec, where, arg) -} - -const isFilespec = isWindows ? /^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/ : /^(?:[.]|~[/]|[/]|[a-zA-Z]:)/ - -function resolve (name, spec, where, arg) { - const res = new Result({ - raw: arg, - name: name, - rawSpec: spec, - fromArgument: arg != null - }) - - if (name) res.setName(name) - - if (spec && (isFilespec.test(spec) || /^file:/i.test(spec))) { - return fromFile(res, where) - } else if (spec && /^npm:/i.test(spec)) { - return fromAlias(res, where) - } - if (!HostedGit) HostedGit = require('hosted-git-info') - const hosted = HostedGit.fromUrl(spec, {noGitPlus: true, noCommittish: true}) - if (hosted) { - return fromHostedGit(res, hosted) - } else if (spec && isURL.test(spec)) { - return fromURL(res) - } else if (spec && (hasSlashes.test(spec) || isFilename.test(spec))) { - return fromFile(res, where) - } else { - return fromRegistry(res) - } -} - -function invalidPackageName (name, valid) { - const err = new Error(`Invalid package name "${name}": ${valid.errors.join('; ')}`) - err.code = 'EINVALIDPACKAGENAME' - return err -} -function invalidTagName (name) { - const err = new Error(`Invalid tag name "${name}": Tags may not have any characters that encodeURIComponent encodes.`) - err.code = 'EINVALIDTAGNAME' - return err -} - -function Result (opts) { - this.type = opts.type - this.registry = opts.registry - this.where = opts.where - if (opts.raw == null) { - this.raw = opts.name ? opts.name + '@' + opts.rawSpec : opts.rawSpec - } else { - this.raw = opts.raw - } - this.name = undefined - this.escapedName = undefined - this.scope = undefined - this.rawSpec = opts.rawSpec == null ? '' : opts.rawSpec - this.saveSpec = opts.saveSpec - this.fetchSpec = opts.fetchSpec - if (opts.name) this.setName(opts.name) - this.gitRange = opts.gitRange - this.gitCommittish = opts.gitCommittish - this.hosted = opts.hosted -} - -Result.prototype.setName = function (name) { - if (!validatePackageName) validatePackageName = require('validate-npm-package-name') - const valid = validatePackageName(name) - if (!valid.validForOldPackages) { - throw invalidPackageName(name, valid) - } - this.name = name - this.scope = name[0] === '@' ? name.slice(0, name.indexOf('/')) : undefined - // scoped packages in couch must have slash url-encoded, e.g. @foo%2Fbar - this.escapedName = name.replace('/', '%2f') - return this -} - -Result.prototype.toString = function () { - const full = [] - if (this.name != null && this.name !== '') full.push(this.name) - const spec = this.saveSpec || this.fetchSpec || this.rawSpec - if (spec != null && spec !== '') full.push(spec) - return full.length ? full.join('@') : this.raw -} - -Result.prototype.toJSON = function () { - const result = Object.assign({}, this) - delete result.hosted - return result -} - -function setGitCommittish (res, committish) { - if (committish != null && committish.length >= 7 && committish.slice(0, 7) === 'semver:') { - res.gitRange = decodeURIComponent(committish.slice(7)) - res.gitCommittish = null - } else { - res.gitCommittish = committish === '' ? null : committish - } - return res -} - -const isAbsolutePath = /^[/]|^[A-Za-z]:/ - -function resolvePath (where, spec) { - if (isAbsolutePath.test(spec)) return spec - return path().resolve(where, spec) -} - -function isAbsolute (dir) { - if (dir[0] === '/') return true - if (/^[A-Za-z]:/.test(dir)) return true - return false -} - -function fromFile (res, where) { - if (!where) where = process.cwd() - res.type = isFilename.test(res.rawSpec) ? 'file' : 'directory' - res.where = where - - const spec = res.rawSpec.replace(/\\/g, '/') - .replace(/^file:[/]*([A-Za-z]:)/, '$1') // drive name paths on windows - .replace(/^file:(?:[/]*([~./]))?/, '$1') - if (/^~[/]/.test(spec)) { - // this is needed for windows and for file:~/foo/bar - if (!osenv) osenv = require('osenv') - res.fetchSpec = resolvePath(osenv.home(), spec.slice(2)) - res.saveSpec = 'file:' + spec - } else { - res.fetchSpec = resolvePath(where, spec) - if (isAbsolute(spec)) { - res.saveSpec = 'file:' + spec - } else { - res.saveSpec = 'file:' + path().relative(where, res.fetchSpec) - } - } - return res -} - -function fromHostedGit (res, hosted) { - res.type = 'git' - res.hosted = hosted - res.saveSpec = hosted.toString({noGitPlus: false, noCommittish: false}) - res.fetchSpec = hosted.getDefaultRepresentation() === 'shortcut' ? null : hosted.toString() - return setGitCommittish(res, hosted.committish) -} - -function unsupportedURLType (protocol, spec) { - const err = new Error(`Unsupported URL Type "${protocol}": ${spec}`) - err.code = 'EUNSUPPORTEDPROTOCOL' - return err -} - -function matchGitScp (spec) { - // git ssh specifiers are overloaded to also use scp-style git - // specifiers, so we have to parse those out and treat them special. - // They are NOT true URIs, so we can't hand them to `url.parse`. - // - // This regex looks for things that look like: - // git+ssh://git@my.custom.git.com:username/project.git#deadbeef - // - // ...and various combinations. The username in the beginning is *required*. - const matched = spec.match(/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/i) - return matched && !matched[1].match(/:[0-9]+\/?.*$/i) && { - fetchSpec: matched[1], - gitCommittish: matched[2] == null ? null : matched[2] - } -} - -function fromURL (res) { - if (!url) url = require('url') - const urlparse = url.parse(res.rawSpec) - res.saveSpec = res.rawSpec - // check the protocol, and then see if it's git or not - switch (urlparse.protocol) { - case 'git:': - case 'git+http:': - case 'git+https:': - case 'git+rsync:': - case 'git+ftp:': - case 'git+file:': - case 'git+ssh:': - res.type = 'git' - const match = urlparse.protocol === 'git+ssh:' && matchGitScp(res.rawSpec) - if (match) { - setGitCommittish(res, match.gitCommittish) - res.fetchSpec = match.fetchSpec - } else { - setGitCommittish(res, urlparse.hash != null ? urlparse.hash.slice(1) : '') - urlparse.protocol = urlparse.protocol.replace(/^git[+]/, '') - if (urlparse.protocol === 'file:' && /^git\+file:\/\/[a-z]:/i.test(res.rawSpec)) { - // keep the drive letter : on windows file paths - urlparse.host += ':' - urlparse.hostname += ':' - } - delete urlparse.hash - res.fetchSpec = url.format(urlparse) - } - break - case 'http:': - case 'https:': - res.type = 'remote' - res.fetchSpec = res.saveSpec - break - - default: - throw unsupportedURLType(urlparse.protocol, res.rawSpec) - } - - return res -} - -function fromAlias (res, where) { - const subSpec = npa(res.rawSpec.substr(4), where) - if (subSpec.type === 'alias') { - throw new Error('nested aliases not supported') - } - if (!subSpec.registry) { - throw new Error('aliases only work for registry deps') - } - res.subSpec = subSpec - res.registry = true - res.type = 'alias' - res.saveSpec = null - res.fetchSpec = null - return res -} - -function fromRegistry (res) { - res.registry = true - const spec = res.rawSpec === '' ? 'latest' : res.rawSpec - // no save spec for registry components as we save based on the fetched - // version, not on the argument so this can't compute that. - res.saveSpec = null - res.fetchSpec = spec - if (!semver) semver = require('semver') - const version = semver.valid(spec, true) - const range = semver.validRange(spec, true) - if (version) { - res.type = 'version' - } else if (range) { - res.type = 'range' - } else { - if (encodeURIComponent(spec) !== spec) { - throw invalidTagName(spec) - } - res.type = 'tag' - } - return res -} diff --git a/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/package.json b/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/package.json deleted file mode 100644 index 4c11182d2cff7d..00000000000000 --- a/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "npm-package-arg", - "version": "6.1.1", - "description": "Parse the things that can be arguments to `npm install`", - "main": "npa.js", - "directories": { - "test": "test" - }, - "files": [ - "npa.js" - ], - "dependencies": { - "hosted-git-info": "^2.7.1", - "osenv": "^0.1.5", - "semver": "^5.6.0", - "validate-npm-package-name": "^3.0.0" - }, - "devDependencies": { - "standard": "^11.0.1", - "standard-version": "^4.4.0", - "tap": "^12.5.0", - "weallbehave": "^1.2.0", - "weallcontribute": "^1.0.8" - }, - "scripts": { - "prerelease": "npm t", - "postrelease": "npm publish && git push --follow-tags", - "pretest": "standard", - "release": "standard-version -s", - "test": "tap --100 -J --coverage test/*.js", - "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", - "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/npm-package-arg" - }, - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC", - "bugs": { - "url": "https://github.com/npm/npm-package-arg/issues" - }, - "homepage": "https://github.com/npm/npm-package-arg" -} diff --git a/deps/npm/node_modules/init-package-json/node_modules/read-package-json/CHANGELOG.md b/deps/npm/node_modules/init-package-json/node_modules/read-package-json/CHANGELOG.md new file mode 100644 index 00000000000000..4b710cb2ab1059 --- /dev/null +++ b/deps/npm/node_modules/init-package-json/node_modules/read-package-json/CHANGELOG.md @@ -0,0 +1,41 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +## [2.1.2](https://github.com/npm/read-package-json/compare/v2.1.1...v2.1.2) (2020-08-20) + + +### Bug Fixes + +* even better json errors, remove graceful-fs ([fdbf082](https://github.com/npm/read-package-json/commit/fdbf082)) + + + + +## [2.1.1](https://github.com/npm/read-package-json/compare/v2.1.0...v2.1.1) (2019-12-09) + + +### Bug Fixes + +* normalize and sanitize pkg bin entries ([b8cb5fa](https://github.com/npm/read-package-json/commit/b8cb5fa)) + + + + +# [2.1.0](https://github.com/npm/read-package-json/compare/v2.0.13...v2.1.0) (2019-08-13) + + +### Features + +* support bundleDependencies: true ([76f6f42](https://github.com/npm/read-package-json/commit/76f6f42)) + + + + +## [2.0.13](https://github.com/npm/read-package-json/compare/v2.0.12...v2.0.13) (2018-03-08) + + +### Bug Fixes + +* **git:** support git packed refs --all mode ([#77](https://github.com/npm/read-package-json/issues/77)) ([1869940](https://github.com/npm/read-package-json/commit/1869940)) diff --git a/deps/npm/node_modules/init-package-json/node_modules/hosted-git-info/LICENSE b/deps/npm/node_modules/init-package-json/node_modules/read-package-json/LICENSE similarity index 93% rename from deps/npm/node_modules/init-package-json/node_modules/hosted-git-info/LICENSE rename to deps/npm/node_modules/init-package-json/node_modules/read-package-json/LICENSE index 45055763dc838d..052085c436514a 100644 --- a/deps/npm/node_modules/init-package-json/node_modules/hosted-git-info/LICENSE +++ b/deps/npm/node_modules/init-package-json/node_modules/read-package-json/LICENSE @@ -1,4 +1,6 @@ -Copyright (c) 2015, Rebecca Turner +The ISC License + +Copyright (c) Isaac Z. Schlueter Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/deps/npm/node_modules/init-package-json/node_modules/read-package-json/README.md b/deps/npm/node_modules/init-package-json/node_modules/read-package-json/README.md new file mode 100644 index 00000000000000..da1f63dc8828bf --- /dev/null +++ b/deps/npm/node_modules/init-package-json/node_modules/read-package-json/README.md @@ -0,0 +1,151 @@ +# read-package-json + +This is the thing that npm uses to read package.json files. It +validates some stuff, and loads some default things. + +It keeps a cache of the files you've read, so that you don't end +up reading the same package.json file multiple times. + +Note that if you just want to see what's literally in the package.json +file, you can usually do `var data = require('some-module/package.json')`. + +This module is basically only needed by npm, but it's handy to see what +npm will see when it looks at your package. + +## Usage + +```javascript +var readJson = require('read-package-json') + +// readJson(filename, [logFunction=noop], [strict=false], cb) +readJson('/path/to/package.json', console.error, false, function (er, data) { + if (er) { + console.error("There was an error reading the file") + return + } + + console.error('the package data is', data) +}); +``` + +## readJson(file, [logFn = noop], [strict = false], cb) + +* `file` {String} The path to the package.json file +* `logFn` {Function} Function to handle logging. Defaults to a noop. +* `strict` {Boolean} True to enforce SemVer 2.0 version strings, and + other strict requirements. +* `cb` {Function} Gets called with `(er, data)`, as is The Node Way. + +Reads the JSON file and does the things. + +## `package.json` Fields + +See `man 5 package.json` or `npm help json`. + +## readJson.log + +By default this is a reference to the `npmlog` module. But if that +module can't be found, then it'll be set to just a dummy thing that does +nothing. + +Replace with your own `{log,warn,error}` object for fun loggy time. + +## readJson.extras(file, data, cb) + +Run all the extra stuff relative to the file, with the parsed data. + +Modifies the data as it does stuff. Calls the cb when it's done. + +## readJson.extraSet = [fn, fn, ...] + +Array of functions that are called by `extras`. Each one receives the +arguments `fn(file, data, cb)` and is expected to call `cb(er, data)` +when done or when an error occurs. + +Order is indeterminate, so each function should be completely +independent. + +Mix and match! + +## Other Relevant Files Besides `package.json` + +Some other files have an effect on the resulting data object, in the +following ways: + +### `README?(.*)` + +If there is a `README` or `README.*` file present, then npm will attach +a `readme` field to the data with the contents of this file. + +Owing to the fact that roughly 100% of existing node modules have +Markdown README files, it will generally be assumed to be Markdown, +regardless of the extension. Please plan accordingly. + +### `server.js` + +If there is a `server.js` file, and there is not already a +`scripts.start` field, then `scripts.start` will be set to `node +server.js`. + +### `AUTHORS` + +If there is not already a `contributors` field, then the `contributors` +field will be set to the contents of the `AUTHORS` file, split by lines, +and parsed. + +### `bindings.gyp` + +If a bindings.gyp file exists, and there is not already a +`scripts.install` field, then the `scripts.install` field will be set to +`node-gyp rebuild`. + +### `index.js` + +If the json file does not exist, but there is a `index.js` file +present instead, and that file has a package comment, then it will try +to parse the package comment, and use that as the data instead. + +A package comment looks like this: + +```javascript +/**package + * { "name": "my-bare-module" + * , "version": "1.2.3" + * , "description": "etc...." } + **/ + +// or... + +/**package +{ "name": "my-bare-module" +, "version": "1.2.3" +, "description": "etc...." } +**/ +``` + +The important thing is that it starts with `/**package`, and ends with +`**/`. If the package.json file exists, then the index.js is not +parsed. + +### `{directories.man}/*.[0-9]` + +If there is not already a `man` field defined as an array of files or a +single file, and +there is a `directories.man` field defined, then that directory will +be searched for manpages. + +Any valid manpages found in that directory will be assigned to the `man` +array, and installed in the appropriate man directory at package install +time, when installed globally on a Unix system. + +### `{directories.bin}/*` + +If there is not already a `bin` field defined as a string filename or a +hash of ` : ` pairs, then the `directories.bin` +directory will be searched and all the files within it will be linked as +executables at install time. + +When installing locally, npm links bins into `node_modules/.bin`, which +is in the `PATH` environ when npm runs scripts. When +installing globally, they are linked into `{prefix}/bin`, which is +presumably in the `PATH` environment variable. diff --git a/deps/npm/node_modules/init-package-json/node_modules/read-package-json/package.json b/deps/npm/node_modules/init-package-json/node_modules/read-package-json/package.json new file mode 100644 index 00000000000000..988508baa4b1fc --- /dev/null +++ b/deps/npm/node_modules/init-package-json/node_modules/read-package-json/package.json @@ -0,0 +1,33 @@ +{ + "name": "read-package-json", + "version": "2.1.2", + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "description": "The thing npm uses to read package.json files with semantics and defaults and validation", + "repository": { + "type": "git", + "url": "https://github.com/npm/read-package-json.git" + }, + "main": "read-json.js", + "scripts": { + "prerelease": "npm t", + "postrelease": "npm publish && git push --follow-tags", + "pretest": "standard", + "release": "standard-version -s", + "test": "tap --nyc-arg=--all --coverage test/*.js" + }, + "dependencies": { + "glob": "^7.1.1", + "normalize-package-data": "^2.0.0", + "npm-normalize-package-bin": "^1.0.0", + "json-parse-even-better-errors": "^2.3.0" + }, + "devDependencies": { + "standard": "^11.0.0", + "standard-version": "^4.3.0", + "tap": "^11.1.2" + }, + "license": "ISC", + "files": [ + "read-json.js" + ] +} diff --git a/deps/npm/node_modules/init-package-json/node_modules/read-package-json/read-json.js b/deps/npm/node_modules/init-package-json/node_modules/read-package-json/read-json.js new file mode 100644 index 00000000000000..0e91e784ec4fdf --- /dev/null +++ b/deps/npm/node_modules/init-package-json/node_modules/read-package-json/read-json.js @@ -0,0 +1,469 @@ +var fs = require('fs') + +var path = require('path') + +var glob = require('glob') +var normalizeData = require('normalize-package-data') +var safeJSON = require('json-parse-even-better-errors') +var util = require('util') +var normalizePackageBin = require('npm-normalize-package-bin') + +module.exports = readJson + +// put more stuff on here to customize. +readJson.extraSet = [ + bundleDependencies, + gypfile, + serverjs, + scriptpath, + authors, + readme, + mans, + bins, + githead +] + +var typoWarned = {} +var cache = {} + +function readJson (file, log_, strict_, cb_) { + var log, strict, cb + for (var i = 1; i < arguments.length - 1; i++) { + if (typeof arguments[i] === 'boolean') { + strict = arguments[i] + } else if (typeof arguments[i] === 'function') { + log = arguments[i] + } + } + + if (!log) log = function () {} + cb = arguments[ arguments.length - 1 ] + + readJson_(file, log, strict, cb) +} + +function readJson_ (file, log, strict, cb) { + fs.readFile(file, 'utf8', function (er, d) { + parseJson(file, er, d, log, strict, cb) + }) +} + +function stripBOM (content) { + // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) + // because the buffer-to-string conversion in `fs.readFileSync()` + // translates it to FEFF, the UTF-16 BOM. + if (content.charCodeAt(0) === 0xFEFF) content = content.slice(1) + return content +} + +function jsonClone (obj) { + if (obj == null) { + return obj + } else if (Array.isArray(obj)) { + var newarr = new Array(obj.length) + for (var ii in obj) { + newarr[ii] = obj[ii] + } + } else if (typeof obj === 'object') { + var newobj = {} + for (var kk in obj) { + newobj[kk] = jsonClone[kk] + } + } else { + return obj + } +} + +function parseJson (file, er, d, log, strict, cb) { + if (er && er.code === 'ENOENT') { + return fs.stat(path.dirname(file), function (err, stat) { + if (!err && stat && !stat.isDirectory()) { + // ENOTDIR isn't used on Windows, but npm expects it. + er = Object.create(er) + er.code = 'ENOTDIR' + return cb(er) + } else { + return indexjs(file, er, log, strict, cb) + } + }) + } + if (er) return cb(er) + + if (cache[d]) return cb(null, jsonClone(cache[d])) + + var data + + try { + data = safeJSON(stripBOM(d)) + } catch (er) { + data = parseIndex(d) + if (!data) return cb(parseError(er, file)) + } + + extrasCached(file, d, data, log, strict, cb) +} + +function extrasCached (file, d, data, log, strict, cb) { + extras(file, data, log, strict, function (err, data) { + if (!err) { + cache[d] = jsonClone(data) + } + cb(err, data) + }) +} + +function indexjs (file, er, log, strict, cb) { + if (path.basename(file) === 'index.js') return cb(er) + + var index = path.resolve(path.dirname(file), 'index.js') + fs.readFile(index, 'utf8', function (er2, d) { + if (er2) return cb(er) + + if (cache[d]) return cb(null, cache[d]) + + var data = parseIndex(d) + if (!data) return cb(er) + + extrasCached(file, d, data, log, strict, cb) + }) +} + +readJson.extras = extras +function extras (file, data, log_, strict_, cb_) { + var log, strict, cb + for (var i = 2; i < arguments.length - 1; i++) { + if (typeof arguments[i] === 'boolean') { + strict = arguments[i] + } else if (typeof arguments[i] === 'function') { + log = arguments[i] + } + } + + if (!log) log = function () {} + cb = arguments[i] + + var set = readJson.extraSet + var n = set.length + var errState = null + set.forEach(function (fn) { + fn(file, data, then) + }) + + function then (er) { + if (errState) return + if (er) return cb(errState = er) + if (--n > 0) return + final(file, data, log, strict, cb) + } +} + +function scriptpath (file, data, cb) { + if (!data.scripts) return cb(null, data) + var k = Object.keys(data.scripts) + k.forEach(scriptpath_, data.scripts) + cb(null, data) +} + +function scriptpath_ (key) { + var s = this[key] + // This is never allowed, and only causes problems + if (typeof s !== 'string') return delete this[key] + + var spre = /^(\.[/\\])?node_modules[/\\].bin[\\/]/ + if (s.match(spre)) { + this[key] = this[key].replace(spre, '') + } +} + +function gypfile (file, data, cb) { + var dir = path.dirname(file) + var s = data.scripts || {} + if (s.install || s.preinstall) return cb(null, data) + + glob('*.gyp', { cwd: dir }, function (er, files) { + if (er) return cb(er) + if (data.gypfile === false) return cb(null, data) + gypfile_(file, data, files, cb) + }) +} + +function gypfile_ (file, data, files, cb) { + if (!files.length) return cb(null, data) + var s = data.scripts || {} + s.install = 'node-gyp rebuild' + data.scripts = s + data.gypfile = true + return cb(null, data) +} + +function serverjs (file, data, cb) { + var dir = path.dirname(file) + var s = data.scripts || {} + if (s.start) return cb(null, data) + glob('server.js', { cwd: dir }, function (er, files) { + if (er) return cb(er) + serverjs_(file, data, files, cb) + }) +} + +function serverjs_ (file, data, files, cb) { + if (!files.length) return cb(null, data) + var s = data.scripts || {} + s.start = 'node server.js' + data.scripts = s + return cb(null, data) +} + +function authors (file, data, cb) { + if (data.contributors) return cb(null, data) + var af = path.resolve(path.dirname(file), 'AUTHORS') + fs.readFile(af, 'utf8', function (er, ad) { + // ignore error. just checking it. + if (er) return cb(null, data) + authors_(file, data, ad, cb) + }) +} + +function authors_ (file, data, ad, cb) { + ad = ad.split(/\r?\n/g).map(function (line) { + return line.replace(/^\s*#.*$/, '').trim() + }).filter(function (line) { + return line + }) + data.contributors = ad + return cb(null, data) +} + +function readme (file, data, cb) { + if (data.readme) return cb(null, data) + var dir = path.dirname(file) + var globOpts = { cwd: dir, nocase: true, mark: true } + glob('{README,README.*}', globOpts, function (er, files) { + if (er) return cb(er) + // don't accept directories. + files = files.filter(function (file) { + return !file.match(/\/$/) + }) + if (!files.length) return cb() + var fn = preferMarkdownReadme(files) + var rm = path.resolve(dir, fn) + readme_(file, data, rm, cb) + }) +} + +function preferMarkdownReadme (files) { + var fallback = 0 + var re = /\.m?a?r?k?d?o?w?n?$/i + for (var i = 0; i < files.length; i++) { + if (files[i].match(re)) { + return files[i] + } else if (files[i].match(/README$/)) { + fallback = i + } + } + // prefer README.md, followed by README; otherwise, return + // the first filename (which could be README) + return files[fallback] +} + +function readme_ (file, data, rm, cb) { + var rmfn = path.basename(rm) + fs.readFile(rm, 'utf8', function (er, rm) { + // maybe not readable, or something. + if (er) return cb() + data.readme = rm + data.readmeFilename = rmfn + return cb(er, data) + }) +} + +function mans (file, data, cb) { + var m = data.directories && data.directories.man + if (data.man || !m) return cb(null, data) + m = path.resolve(path.dirname(file), m) + glob('**/*.[0-9]', { cwd: m }, function (er, mans) { + if (er) return cb(er) + mans_(file, data, mans, cb) + }) +} + +function mans_ (file, data, mans, cb) { + var m = data.directories && data.directories.man + data.man = mans.map(function (mf) { + return path.resolve(path.dirname(file), m, mf) + }) + return cb(null, data) +} + +function bins (file, data, cb) { + data = normalizePackageBin(data) + + var m = data.directories && data.directories.bin + if (data.bin || !m) return cb(null, data) + + m = path.resolve(path.dirname(file), m) + glob('**', { cwd: m }, function (er, bins) { + if (er) return cb(er) + bins_(file, data, bins, cb) + }) +} + +function bins_ (file, data, bins, cb) { + var m = (data.directories && data.directories.bin) || '.' + data.bin = bins.reduce(function (acc, mf) { + if (mf && mf.charAt(0) !== '.') { + var f = path.basename(mf) + acc[f] = path.join(m, mf) + } + return acc + }, {}) + return cb(null, normalizePackageBin(data)) +} + +function bundleDependencies (file, data, cb) { + var bd = 'bundleDependencies' + var bdd = 'bundledDependencies' + // normalize key name + if (data[bdd] !== undefined) { + if (data[bd] === undefined) data[bd] = data[bdd] + delete data[bdd] + } + if (data[bd] === false) delete data[bd] + else if (data[bd] === true) { + data[bd] = Object.keys(data.dependencies || {}) + } else if (data[bd] !== undefined && !Array.isArray(data[bd])) { + delete data[bd] + } + return cb(null, data) +} + +function githead (file, data, cb) { + if (data.gitHead) return cb(null, data) + var dir = path.dirname(file) + var head = path.resolve(dir, '.git/HEAD') + fs.readFile(head, 'utf8', function (er, head) { + if (er) return cb(null, data) + githead_(file, data, dir, head, cb) + }) +} + +function githead_ (file, data, dir, head, cb) { + if (!head.match(/^ref: /)) { + data.gitHead = head.trim() + return cb(null, data) + } + var headRef = head.replace(/^ref: /, '').trim() + var headFile = path.resolve(dir, '.git', headRef) + fs.readFile(headFile, 'utf8', function (er, head) { + if (er || !head) { + var packFile = path.resolve(dir, '.git/packed-refs') + return fs.readFile(packFile, 'utf8', function (er, refs) { + if (er || !refs) { + return cb(null, data) + } + refs = refs.split('\n') + for (var i = 0; i < refs.length; i++) { + var match = refs[i].match(/^([0-9a-f]{40}) (.+)$/) + if (match && match[2].trim() === headRef) { + data.gitHead = match[1] + break + } + } + return cb(null, data) + }) + } + head = head.replace(/^ref: /, '').trim() + data.gitHead = head + return cb(null, data) + }) +} + +/** + * Warn if the bin references don't point to anything. This might be better in + * normalize-package-data if it had access to the file path. + */ +function checkBinReferences_ (file, data, warn, cb) { + if (!(data.bin instanceof Object)) return cb() + + var keys = Object.keys(data.bin) + var keysLeft = keys.length + if (!keysLeft) return cb() + + function handleExists (relName, result) { + keysLeft-- + if (!result) warn('No bin file found at ' + relName) + if (!keysLeft) cb() + } + + keys.forEach(function (key) { + var dirName = path.dirname(file) + var relName = data.bin[key] + /* istanbul ignore if - impossible, bins have been normalized */ + if (typeof relName !== 'string') { + var msg = 'Bin filename for ' + key + + ' is not a string: ' + util.inspect(relName) + warn(msg) + delete data.bin[key] + handleExists(relName, true) + return + } + var binPath = path.resolve(dirName, relName) + fs.stat(binPath, (err) => handleExists(relName, !err)) + }) +} + +function final (file, data, log, strict, cb) { + var pId = makePackageId(data) + + function warn (msg) { + if (typoWarned[pId]) return + if (log) log('package.json', pId, msg) + } + + try { + normalizeData(data, warn, strict) + } catch (error) { + return cb(error) + } + + checkBinReferences_(file, data, warn, function () { + typoWarned[pId] = true + cb(null, data) + }) +} + +function makePackageId (data) { + var name = cleanString(data.name) + var ver = cleanString(data.version) + return name + '@' + ver +} + +function cleanString (str) { + return (!str || typeof (str) !== 'string') ? '' : str.trim() +} + +// /**package { "name": "foo", "version": "1.2.3", ... } **/ +function parseIndex (data) { + data = data.split(/^\/\*\*package(?:\s|$)/m) + + if (data.length < 2) return null + data = data[1] + data = data.split(/\*\*\/$/m) + + if (data.length < 2) return null + data = data[0] + data = data.replace(/^\s*\*/mg, '') + + try { + return safeJSON(data) + } catch (er) { + return null + } +} + +function parseError (ex, file) { + var e = new Error('Failed to parse json\n' + ex.message) + e.code = 'EJSONPARSE' + e.file = file + return e +} diff --git a/deps/npm/node_modules/init-package-json/node_modules/semver/CHANGELOG.md b/deps/npm/node_modules/init-package-json/node_modules/semver/CHANGELOG.md deleted file mode 100644 index 66304fdd23678a..00000000000000 --- a/deps/npm/node_modules/init-package-json/node_modules/semver/CHANGELOG.md +++ /dev/null @@ -1,39 +0,0 @@ -# changes log - -## 5.7 - -* Add `minVersion` method - -## 5.6 - -* Move boolean `loose` param to an options object, with - backwards-compatibility protection. -* Add ability to opt out of special prerelease version handling with - the `includePrerelease` option flag. - -## 5.5 - -* Add version coercion capabilities - -## 5.4 - -* Add intersection checking - -## 5.3 - -* Add `minSatisfying` method - -## 5.2 - -* Add `prerelease(v)` that returns prerelease components - -## 5.1 - -* Add Backus-Naur for ranges -* Remove excessively cute inspection methods - -## 5.0 - -* Remove AMD/Browserified build artifacts -* Fix ltr and gtr when using the `*` range -* Fix for range `*` with a prerelease identifier diff --git a/deps/npm/node_modules/init-package-json/node_modules/semver/LICENSE b/deps/npm/node_modules/init-package-json/node_modules/semver/LICENSE deleted file mode 100644 index 19129e315fe593..00000000000000 --- a/deps/npm/node_modules/init-package-json/node_modules/semver/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/init-package-json/node_modules/semver/README.md b/deps/npm/node_modules/init-package-json/node_modules/semver/README.md deleted file mode 100644 index f8dfa5a0df5fc4..00000000000000 --- a/deps/npm/node_modules/init-package-json/node_modules/semver/README.md +++ /dev/null @@ -1,412 +0,0 @@ -semver(1) -- The semantic versioner for npm -=========================================== - -## Install - -```bash -npm install --save semver -```` - -## Usage - -As a node module: - -```js -const semver = require('semver') - -semver.valid('1.2.3') // '1.2.3' -semver.valid('a.b.c') // null -semver.clean(' =v1.2.3 ') // '1.2.3' -semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true -semver.gt('1.2.3', '9.8.7') // false -semver.lt('1.2.3', '9.8.7') // true -semver.minVersion('>=1.0.0') // '1.0.0' -semver.valid(semver.coerce('v2')) // '2.0.0' -semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' -``` - -As a command-line utility: - -``` -$ semver -h - -A JavaScript implementation of the https://semver.org/ specification -Copyright Isaac Z. Schlueter - -Usage: semver [options] [ [...]] -Prints valid versions sorted by SemVer precedence - -Options: --r --range - Print versions that match the specified range. - --i --increment [] - Increment a version by the specified level. Level can - be one of: major, minor, patch, premajor, preminor, - prepatch, or prerelease. Default level is 'patch'. - Only one version may be specified. - ---preid - Identifier to be used to prefix premajor, preminor, - prepatch or prerelease version increments. - --l --loose - Interpret versions and ranges loosely - --p --include-prerelease - Always include prerelease versions in range matching - --c --coerce - Coerce a string into SemVer if possible - (does not imply --loose) - -Program exits successfully if any valid version satisfies -all supplied ranges, and prints all satisfying versions. - -If no satisfying versions are found, then exits failure. - -Versions are printed in ascending order, so supplying -multiple versions to the utility will just sort them. -``` - -## Versions - -A "version" is described by the `v2.0.0` specification found at -. - -A leading `"="` or `"v"` character is stripped off and ignored. - -## Ranges - -A `version range` is a set of `comparators` which specify versions -that satisfy the range. - -A `comparator` is composed of an `operator` and a `version`. The set -of primitive `operators` is: - -* `<` Less than -* `<=` Less than or equal to -* `>` Greater than -* `>=` Greater than or equal to -* `=` Equal. If no operator is specified, then equality is assumed, - so this operator is optional, but MAY be included. - -For example, the comparator `>=1.2.7` would match the versions -`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` -or `1.1.0`. - -Comparators can be joined by whitespace to form a `comparator set`, -which is satisfied by the **intersection** of all of the comparators -it includes. - -A range is composed of one or more comparator sets, joined by `||`. A -version matches a range if and only if every comparator in at least -one of the `||`-separated comparator sets is satisfied by the version. - -For example, the range `>=1.2.7 <1.3.0` would match the versions -`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, -or `1.1.0`. - -The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, -`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. - -### Prerelease Tags - -If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then -it will only be allowed to satisfy comparator sets if at least one -comparator with the same `[major, minor, patch]` tuple also has a -prerelease tag. - -For example, the range `>1.2.3-alpha.3` would be allowed to match the -version `1.2.3-alpha.7`, but it would *not* be satisfied by -`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater -than" `1.2.3-alpha.3` according to the SemVer sort rules. The version -range only accepts prerelease tags on the `1.2.3` version. The -version `3.4.5` *would* satisfy the range, because it does not have a -prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. - -The purpose for this behavior is twofold. First, prerelease versions -frequently are updated very quickly, and contain many breaking changes -that are (by the author's design) not yet fit for public consumption. -Therefore, by default, they are excluded from range matching -semantics. - -Second, a user who has opted into using a prerelease version has -clearly indicated the intent to use *that specific* set of -alpha/beta/rc versions. By including a prerelease tag in the range, -the user is indicating that they are aware of the risk. However, it -is still not appropriate to assume that they have opted into taking a -similar risk on the *next* set of prerelease versions. - -Note that this behavior can be suppressed (treating all prerelease -versions as if they were normal versions, for the purpose of range -matching) by setting the `includePrerelease` flag on the options -object to any -[functions](https://github.com/npm/node-semver#functions) that do -range matching. - -#### Prerelease Identifiers - -The method `.inc` takes an additional `identifier` string argument that -will append the value of the string as a prerelease identifier: - -```javascript -semver.inc('1.2.3', 'prerelease', 'beta') -// '1.2.4-beta.0' -``` - -command-line example: - -```bash -$ semver 1.2.3 -i prerelease --preid beta -1.2.4-beta.0 -``` - -Which then can be used to increment further: - -```bash -$ semver 1.2.4-beta.0 -i prerelease -1.2.4-beta.1 -``` - -### Advanced Range Syntax - -Advanced range syntax desugars to primitive comparators in -deterministic ways. - -Advanced ranges may be combined in the same way as primitive -comparators using white space or `||`. - -#### Hyphen Ranges `X.Y.Z - A.B.C` - -Specifies an inclusive set. - -* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` - -If a partial version is provided as the first version in the inclusive -range, then the missing pieces are replaced with zeroes. - -* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` - -If a partial version is provided as the second version in the -inclusive range, then all versions that start with the supplied parts -of the tuple are accepted, but nothing that would be greater than the -provided tuple parts. - -* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` -* `1.2.3 - 2` := `>=1.2.3 <3.0.0` - -#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` - -Any of `X`, `x`, or `*` may be used to "stand in" for one of the -numeric values in the `[major, minor, patch]` tuple. - -* `*` := `>=0.0.0` (Any version satisfies) -* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) -* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) - -A partial version range is treated as an X-Range, so the special -character is in fact optional. - -* `""` (empty string) := `*` := `>=0.0.0` -* `1` := `1.x.x` := `>=1.0.0 <2.0.0` -* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` - -#### Tilde Ranges `~1.2.3` `~1.2` `~1` - -Allows patch-level changes if a minor version is specified on the -comparator. Allows minor-level changes if not. - -* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` -* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) -* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) -* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` -* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) -* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) -* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. - -#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` - -Allows changes that do not modify the left-most non-zero digit in the -`[major, minor, patch]` tuple. In other words, this allows patch and -minor updates for versions `1.0.0` and above, patch updates for -versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. - -Many authors treat a `0.x` version as if the `x` were the major -"breaking-change" indicator. - -Caret ranges are ideal when an author may make breaking changes -between `0.2.4` and `0.3.0` releases, which is a common practice. -However, it presumes that there will *not* be breaking changes between -`0.2.4` and `0.2.5`. It allows for changes that are presumed to be -additive (but non-breaking), according to commonly observed practices. - -* `^1.2.3` := `>=1.2.3 <2.0.0` -* `^0.2.3` := `>=0.2.3 <0.3.0` -* `^0.0.3` := `>=0.0.3 <0.0.4` -* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. -* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the - `0.0.3` version *only* will be allowed, if they are greater than or - equal to `beta`. So, `0.0.3-pr.2` would be allowed. - -When parsing caret ranges, a missing `patch` value desugars to the -number `0`, but will allow flexibility within that value, even if the -major and minor versions are both `0`. - -* `^1.2.x` := `>=1.2.0 <2.0.0` -* `^0.0.x` := `>=0.0.0 <0.1.0` -* `^0.0` := `>=0.0.0 <0.1.0` - -A missing `minor` and `patch` values will desugar to zero, but also -allow flexibility within those values, even if the major version is -zero. - -* `^1.x` := `>=1.0.0 <2.0.0` -* `^0.x` := `>=0.0.0 <1.0.0` - -### Range Grammar - -Putting all this together, here is a Backus-Naur grammar for ranges, -for the benefit of parser authors: - -```bnf -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ -``` - -## Functions - -All methods and classes take a final `options` object argument. All -options in this object are `false` by default. The options supported -are: - -- `loose` Be more forgiving about not-quite-valid semver strings. - (Any resulting output will always be 100% strict compliant, of - course.) For backwards compatibility reasons, if the `options` - argument is a boolean value instead of an object, it is interpreted - to be the `loose` param. -- `includePrerelease` Set to suppress the [default - behavior](https://github.com/npm/node-semver#prerelease-tags) of - excluding prerelease tagged versions from ranges unless they are - explicitly opted into. - -Strict-mode Comparators and Ranges will be strict about the SemVer -strings that they parse. - -* `valid(v)`: Return the parsed version, or null if it's not valid. -* `inc(v, release)`: Return the version incremented by the release - type (`major`, `premajor`, `minor`, `preminor`, `patch`, - `prepatch`, or `prerelease`), or null if it's not valid - * `premajor` in one call will bump the version up to the next major - version and down to a prerelease of that major version. - `preminor`, and `prepatch` work the same way. - * If called from a non-prerelease version, the `prerelease` will work the - same as `prepatch`. It increments the patch version, then makes a - prerelease. If the input version is already a prerelease it simply - increments it. -* `prerelease(v)`: Returns an array of prerelease components, or null - if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` -* `major(v)`: Return the major version number. -* `minor(v)`: Return the minor version number. -* `patch(v)`: Return the patch version number. -* `intersects(r1, r2, loose)`: Return true if the two supplied ranges - or comparators intersect. -* `parse(v)`: Attempt to parse a string as a semantic version, returning either - a `SemVer` object or `null`. - -### Comparison - -* `gt(v1, v2)`: `v1 > v2` -* `gte(v1, v2)`: `v1 >= v2` -* `lt(v1, v2)`: `v1 < v2` -* `lte(v1, v2)`: `v1 <= v2` -* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, - even if they're not the exact same string. You already know how to - compare strings. -* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. -* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call - the corresponding function above. `"==="` and `"!=="` do simple - string comparison, but are included for completeness. Throws if an - invalid comparison string is provided. -* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if - `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. -* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions - in descending order when passed to `Array.sort()`. -* `diff(v1, v2)`: Returns difference between two versions by the release type - (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), - or null if the versions are the same. - -### Comparators - -* `intersects(comparator)`: Return true if the comparators intersect - -### Ranges - -* `validRange(range)`: Return the valid range or null if it's not valid -* `satisfies(version, range)`: Return true if the version satisfies the - range. -* `maxSatisfying(versions, range)`: Return the highest version in the list - that satisfies the range, or `null` if none of them do. -* `minSatisfying(versions, range)`: Return the lowest version in the list - that satisfies the range, or `null` if none of them do. -* `minVersion(range)`: Return the lowest version that can possibly match - the given range. -* `gtr(version, range)`: Return `true` if version is greater than all the - versions possible in the range. -* `ltr(version, range)`: Return `true` if version is less than all the - versions possible in the range. -* `outside(version, range, hilo)`: Return true if the version is outside - the bounds of the range in either the high or low direction. The - `hilo` argument must be either the string `'>'` or `'<'`. (This is - the function called by `gtr` and `ltr`.) -* `intersects(range)`: Return true if any of the ranges comparators intersect - -Note that, since ranges may be non-contiguous, a version might not be -greater than a range, less than a range, *or* satisfy a range! For -example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` -until `2.0.0`, so the version `1.2.10` would not be greater than the -range (because `2.0.1` satisfies, which is higher), nor less than the -range (since `1.2.8` satisfies, which is lower), and it also does not -satisfy the range. - -If you want to know if a version satisfies or does not satisfy a -range, use the `satisfies(version, range)` function. - -### Coercion - -* `coerce(version)`: Coerces a string to semver if possible - -This aims to provide a very forgiving translation of a non-semver string to -semver. It looks for the first digit in a string, and consumes all -remaining characters which satisfy at least a partial semver (e.g., `1`, -`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer -versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All -surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes -`3.4.0`). Only text which lacks digits will fail coercion (`version one` -is not valid). The maximum length for any semver component considered for -coercion is 16 characters; longer components will be ignored -(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any -semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value -components are invalid (`9999999999999999.4.7.4` is likely invalid). diff --git a/deps/npm/node_modules/init-package-json/node_modules/semver/bin/semver b/deps/npm/node_modules/init-package-json/node_modules/semver/bin/semver deleted file mode 100755 index 801e77f1303c15..00000000000000 --- a/deps/npm/node_modules/init-package-json/node_modules/semver/bin/semver +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env node -// Standalone semver comparison program. -// Exits successfully and prints matching version(s) if -// any supplied version is valid and passes all tests. - -var argv = process.argv.slice(2) - -var versions = [] - -var range = [] - -var inc = null - -var version = require('../package.json').version - -var loose = false - -var includePrerelease = false - -var coerce = false - -var identifier - -var semver = require('../semver') - -var reverse = false - -var options = {} - -main() - -function main () { - if (!argv.length) return help() - while (argv.length) { - var a = argv.shift() - var indexOfEqualSign = a.indexOf('=') - if (indexOfEqualSign !== -1) { - a = a.slice(0, indexOfEqualSign) - argv.unshift(a.slice(indexOfEqualSign + 1)) - } - switch (a) { - case '-rv': case '-rev': case '--rev': case '--reverse': - reverse = true - break - case '-l': case '--loose': - loose = true - break - case '-p': case '--include-prerelease': - includePrerelease = true - break - case '-v': case '--version': - versions.push(argv.shift()) - break - case '-i': case '--inc': case '--increment': - switch (argv[0]) { - case 'major': case 'minor': case 'patch': case 'prerelease': - case 'premajor': case 'preminor': case 'prepatch': - inc = argv.shift() - break - default: - inc = 'patch' - break - } - break - case '--preid': - identifier = argv.shift() - break - case '-r': case '--range': - range.push(argv.shift()) - break - case '-c': case '--coerce': - coerce = true - break - case '-h': case '--help': case '-?': - return help() - default: - versions.push(a) - break - } - } - - var options = { loose: loose, includePrerelease: includePrerelease } - - versions = versions.map(function (v) { - return coerce ? (semver.coerce(v) || { version: v }).version : v - }).filter(function (v) { - return semver.valid(v) - }) - if (!versions.length) return fail() - if (inc && (versions.length !== 1 || range.length)) { return failInc() } - - for (var i = 0, l = range.length; i < l; i++) { - versions = versions.filter(function (v) { - return semver.satisfies(v, range[i], options) - }) - if (!versions.length) return fail() - } - return success(versions) -} - -function failInc () { - console.error('--inc can only be used on a single version with no range') - fail() -} - -function fail () { process.exit(1) } - -function success () { - var compare = reverse ? 'rcompare' : 'compare' - versions.sort(function (a, b) { - return semver[compare](a, b, options) - }).map(function (v) { - return semver.clean(v, options) - }).map(function (v) { - return inc ? semver.inc(v, inc, options, identifier) : v - }).forEach(function (v, i, _) { console.log(v) }) -} - -function help () { - console.log(['SemVer ' + version, - '', - 'A JavaScript implementation of the https://semver.org/ specification', - 'Copyright Isaac Z. Schlueter', - '', - 'Usage: semver [options] [ [...]]', - 'Prints valid versions sorted by SemVer precedence', - '', - 'Options:', - '-r --range ', - ' Print versions that match the specified range.', - '', - '-i --increment []', - ' Increment a version by the specified level. Level can', - ' be one of: major, minor, patch, premajor, preminor,', - " prepatch, or prerelease. Default level is 'patch'.", - ' Only one version may be specified.', - '', - '--preid ', - ' Identifier to be used to prefix premajor, preminor,', - ' prepatch or prerelease version increments.', - '', - '-l --loose', - ' Interpret versions and ranges loosely', - '', - '-p --include-prerelease', - ' Always include prerelease versions in range matching', - '', - '-c --coerce', - ' Coerce a string into SemVer if possible', - ' (does not imply --loose)', - '', - 'Program exits successfully if any valid version satisfies', - 'all supplied ranges, and prints all satisfying versions.', - '', - 'If no satisfying versions are found, then exits failure.', - '', - 'Versions are printed in ascending order, so supplying', - 'multiple versions to the utility will just sort them.' - ].join('\n')) -} diff --git a/deps/npm/node_modules/init-package-json/node_modules/semver/package.json b/deps/npm/node_modules/init-package-json/node_modules/semver/package.json deleted file mode 100644 index 69d2db162c9297..00000000000000 --- a/deps/npm/node_modules/init-package-json/node_modules/semver/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "semver", - "version": "5.7.1", - "description": "The semantic version parser used by npm.", - "main": "semver.js", - "scripts": { - "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags" - }, - "devDependencies": { - "tap": "^13.0.0-rc.18" - }, - "license": "ISC", - "repository": "https://github.com/npm/node-semver", - "bin": { - "semver": "./bin/semver" - }, - "files": [ - "bin", - "range.bnf", - "semver.js" - ], - "tap": { - "check-coverage": true - } -} diff --git a/deps/npm/node_modules/init-package-json/node_modules/semver/range.bnf b/deps/npm/node_modules/init-package-json/node_modules/semver/range.bnf deleted file mode 100644 index d4c6ae0d76c9ac..00000000000000 --- a/deps/npm/node_modules/init-package-json/node_modules/semver/range.bnf +++ /dev/null @@ -1,16 +0,0 @@ -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | [1-9] ( [0-9] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ diff --git a/deps/npm/node_modules/init-package-json/node_modules/semver/semver.js b/deps/npm/node_modules/init-package-json/node_modules/semver/semver.js deleted file mode 100644 index d315d5d68b179e..00000000000000 --- a/deps/npm/node_modules/init-package-json/node_modules/semver/semver.js +++ /dev/null @@ -1,1483 +0,0 @@ -exports = module.exports = SemVer - -var debug -/* istanbul ignore next */ -if (typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG)) { - debug = function () { - var args = Array.prototype.slice.call(arguments, 0) - args.unshift('SEMVER') - console.log.apply(console, args) - } -} else { - debug = function () {} -} - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0' - -var MAX_LENGTH = 256 -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || - /* istanbul ignore next */ 9007199254740991 - -// Max safe segment length for coercion. -var MAX_SAFE_COMPONENT_LENGTH = 16 - -// The actual regexps go on exports.re -var re = exports.re = [] -var src = exports.src = [] -var R = 0 - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -var NUMERICIDENTIFIER = R++ -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' -var NUMERICIDENTIFIERLOOSE = R++ -src[NUMERICIDENTIFIERLOOSE] = '[0-9]+' - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -var NONNUMERICIDENTIFIER = R++ -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' - -// ## Main Version -// Three dot-separated numeric identifiers. - -var MAINVERSION = R++ -src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')' - -var MAINVERSIONLOOSE = R++ -src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')' - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -var PRERELEASEIDENTIFIER = R++ -src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -var PRERELEASEIDENTIFIERLOOSE = R++ -src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -var PRERELEASE = R++ -src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' - -var PRERELEASELOOSE = R++ -src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -var BUILDIDENTIFIER = R++ -src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+' - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -var BUILD = R++ -src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -var FULL = R++ -var FULLPLAIN = 'v?' + src[MAINVERSION] + - src[PRERELEASE] + '?' + - src[BUILD] + '?' - -src[FULL] = '^' + FULLPLAIN + '$' - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + - src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?' - -var LOOSE = R++ -src[LOOSE] = '^' + LOOSEPLAIN + '$' - -var GTLT = R++ -src[GTLT] = '((?:<|>)?=?)' - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++ -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' -var XRANGEIDENTIFIER = R++ -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' - -var XRANGEPLAIN = R++ -src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:' + src[PRERELEASE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGEPLAINLOOSE = R++ -src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[PRERELEASELOOSE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGE = R++ -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' -var XRANGELOOSE = R++ -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -var COERCE = R++ -src[COERCE] = '(?:^|[^\\d])' + - '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:$|[^\\d])' - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -var LONETILDE = R++ -src[LONETILDE] = '(?:~>?)' - -var TILDETRIM = R++ -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') -var tildeTrimReplace = '$1~' - -var TILDE = R++ -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' -var TILDELOOSE = R++ -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -var LONECARET = R++ -src[LONECARET] = '(?:\\^)' - -var CARETTRIM = R++ -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') -var caretTrimReplace = '$1^' - -var CARET = R++ -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' -var CARETLOOSE = R++ -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++ -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' -var COMPARATOR = R++ -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++ -src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' - -// this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') -var comparatorTrimReplace = '$1$2$3' - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -var HYPHENRANGE = R++ -src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAIN] + ')' + - '\\s*$' - -var HYPHENRANGELOOSE = R++ -src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s*$' - -// Star ranges basically just allow anything at all. -var STAR = R++ -src[STAR] = '(<|>)?=?\\s*\\*' - -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - debug(i, src[i]) - if (!re[i]) { - re[i] = new RegExp(src[i]) - } -} - -exports.parse = parse -function parse (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - if (version.length > MAX_LENGTH) { - return null - } - - var r = options.loose ? re[LOOSE] : re[FULL] - if (!r.test(version)) { - return null - } - - try { - return new SemVer(version, options) - } catch (er) { - return null - } -} - -exports.valid = valid -function valid (version, options) { - var v = parse(version, options) - return v ? v.version : null -} - -exports.clean = clean -function clean (version, options) { - var s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} - -exports.SemVer = SemVer - -function SemVer (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - if (version instanceof SemVer) { - if (version.loose === options.loose) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') - } - - if (!(this instanceof SemVer)) { - return new SemVer(version, options) - } - - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - - var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]) - - if (!m) { - throw new TypeError('Invalid Version: ' + version) - } - - this.raw = version - - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map(function (id) { - if (/^[0-9]+$/.test(id)) { - var num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } - - this.build = m[5] ? m[5].split('.') : [] - this.format() -} - -SemVer.prototype.format = function () { - this.version = this.major + '.' + this.minor + '.' + this.patch - if (this.prerelease.length) { - this.version += '-' + this.prerelease.join('.') - } - return this.version -} - -SemVer.prototype.toString = function () { - return this.version -} - -SemVer.prototype.compare = function (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return this.compareMain(other) || this.comparePre(other) -} - -SemVer.prototype.compareMain = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) -} - -SemVer.prototype.comparePre = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - - var i = 0 - do { - var a = this.prerelease[i] - var b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) -} - -// preminor will bump the version up to the next minor release, and immediately -// down to pre-release. premajor and prepatch work the same way. -SemVer.prototype.inc = function (release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier) - this.inc('pre', identifier) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier) - } - this.inc('pre', identifier) - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if (this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) { - this.prerelease = [0] - } else { - var i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - this.prerelease.push(0) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, 0] - } - } else { - this.prerelease = [identifier, 0] - } - } - break - - default: - throw new Error('invalid increment argument: ' + release) - } - this.format() - this.raw = this.version - return this -} - -exports.inc = inc -function inc (version, release, loose, identifier) { - if (typeof (loose) === 'string') { - identifier = loose - loose = undefined - } - - try { - return new SemVer(version, loose).inc(release, identifier).version - } catch (er) { - return null - } -} - -exports.diff = diff -function diff (version1, version2) { - if (eq(version1, version2)) { - return null - } else { - var v1 = parse(version1) - var v2 = parse(version2) - var prefix = '' - if (v1.prerelease.length || v2.prerelease.length) { - prefix = 'pre' - var defaultResult = 'prerelease' - } - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return prefix + key - } - } - } - return defaultResult // may be undefined - } -} - -exports.compareIdentifiers = compareIdentifiers - -var numeric = /^[0-9]+$/ -function compareIdentifiers (a, b) { - var anum = numeric.test(a) - var bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b - } - - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} - -exports.rcompareIdentifiers = rcompareIdentifiers -function rcompareIdentifiers (a, b) { - return compareIdentifiers(b, a) -} - -exports.major = major -function major (a, loose) { - return new SemVer(a, loose).major -} - -exports.minor = minor -function minor (a, loose) { - return new SemVer(a, loose).minor -} - -exports.patch = patch -function patch (a, loose) { - return new SemVer(a, loose).patch -} - -exports.compare = compare -function compare (a, b, loose) { - return new SemVer(a, loose).compare(new SemVer(b, loose)) -} - -exports.compareLoose = compareLoose -function compareLoose (a, b) { - return compare(a, b, true) -} - -exports.rcompare = rcompare -function rcompare (a, b, loose) { - return compare(b, a, loose) -} - -exports.sort = sort -function sort (list, loose) { - return list.sort(function (a, b) { - return exports.compare(a, b, loose) - }) -} - -exports.rsort = rsort -function rsort (list, loose) { - return list.sort(function (a, b) { - return exports.rcompare(a, b, loose) - }) -} - -exports.gt = gt -function gt (a, b, loose) { - return compare(a, b, loose) > 0 -} - -exports.lt = lt -function lt (a, b, loose) { - return compare(a, b, loose) < 0 -} - -exports.eq = eq -function eq (a, b, loose) { - return compare(a, b, loose) === 0 -} - -exports.neq = neq -function neq (a, b, loose) { - return compare(a, b, loose) !== 0 -} - -exports.gte = gte -function gte (a, b, loose) { - return compare(a, b, loose) >= 0 -} - -exports.lte = lte -function lte (a, b, loose) { - return compare(a, b, loose) <= 0 -} - -exports.cmp = cmp -function cmp (a, op, b, loose) { - switch (op) { - case '===': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a === b - - case '!==': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a !== b - - case '': - case '=': - case '==': - return eq(a, b, loose) - - case '!=': - return neq(a, b, loose) - - case '>': - return gt(a, b, loose) - - case '>=': - return gte(a, b, loose) - - case '<': - return lt(a, b, loose) - - case '<=': - return lte(a, b, loose) - - default: - throw new TypeError('Invalid operator: ' + op) - } -} - -exports.Comparator = Comparator -function Comparator (comp, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } - - if (!(this instanceof Comparator)) { - return new Comparator(comp, options) - } - - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) - - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } - - debug('comp', this) -} - -var ANY = {} -Comparator.prototype.parse = function (comp) { - var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR] - var m = comp.match(r) - - if (!m) { - throw new TypeError('Invalid comparator: ' + comp) - } - - this.operator = m[1] - if (this.operator === '=') { - this.operator = '' - } - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } -} - -Comparator.prototype.toString = function () { - return this.value -} - -Comparator.prototype.test = function (version) { - debug('Comparator.test', version, this.options.loose) - - if (this.semver === ANY) { - return true - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - return cmp(version, this.operator, this.semver, this.options) -} - -Comparator.prototype.intersects = function (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - var rangeTmp - - if (this.operator === '') { - rangeTmp = new Range(comp.value, options) - return satisfies(this.value, rangeTmp, options) - } else if (comp.operator === '') { - rangeTmp = new Range(this.value, options) - return satisfies(comp.semver, rangeTmp, options) - } - - var sameDirectionIncreasing = - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>') - var sameDirectionDecreasing = - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<') - var sameSemVer = this.semver.version === comp.semver.version - var differentDirectionsInclusive = - (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<=') - var oppositeDirectionsLessThan = - cmp(this.semver, '<', comp.semver, options) && - ((this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<')) - var oppositeDirectionsGreaterThan = - cmp(this.semver, '>', comp.semver, options) && - ((this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>')) - - return sameDirectionIncreasing || sameDirectionDecreasing || - (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || oppositeDirectionsGreaterThan -} - -exports.Range = Range -function Range (range, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (range instanceof Range) { - if (range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease) { - return range - } else { - return new Range(range.raw, options) - } - } - - if (range instanceof Comparator) { - return new Range(range.value, options) - } - - if (!(this instanceof Range)) { - return new Range(range, options) - } - - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First, split based on boolean or || - this.raw = range - this.set = range.split(/\s*\|\|\s*/).map(function (range) { - return this.parseRange(range.trim()) - }, this).filter(function (c) { - // throw out any that are not relevant for whatever reason - return c.length - }) - - if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + range) - } - - this.format() -} - -Range.prototype.format = function () { - this.range = this.set.map(function (comps) { - return comps.join(' ').trim() - }).join('||').trim() - return this.range -} - -Range.prototype.toString = function () { - return this.range -} - -Range.prototype.parseRange = function (range) { - var loose = this.options.loose - range = range.trim() - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE] - range = range.replace(hr, hyphenReplace) - debug('hyphen replace', range) - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, re[COMPARATORTRIM]) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[TILDETRIM], tildeTrimReplace) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[CARETTRIM], caretTrimReplace) - - // normalize spaces - range = range.split(/\s+/).join(' ') - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR] - var set = range.split(' ').map(function (comp) { - return parseComparator(comp, this.options) - }, this).join(' ').split(/\s+/) - if (this.options.loose) { - // in loose mode, throw out any that are not valid comparators - set = set.filter(function (comp) { - return !!comp.match(compRe) - }) - } - set = set.map(function (comp) { - return new Comparator(comp, this.options) - }, this) - - return set -} - -Range.prototype.intersects = function (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } - - return this.set.some(function (thisComparators) { - return thisComparators.every(function (thisComparator) { - return range.set.some(function (rangeComparators) { - return rangeComparators.every(function (rangeComparator) { - return thisComparator.intersects(rangeComparator, options) - }) - }) - }) - }) -} - -// Mostly just for testing and legacy API reasons -exports.toComparators = toComparators -function toComparators (range, options) { - return new Range(range, options).set.map(function (comp) { - return comp.map(function (c) { - return c.value - }).join(' ').trim().split(' ') - }) -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -function parseComparator (comp, options) { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} - -function isX (id) { - return !id || id.toLowerCase() === 'x' || id === '*' -} - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceTilde(comp, options) - }).join(' ') -} - -function replaceTilde (comp, options) { - var r = options.loose ? re[TILDELOOSE] : re[TILDE] - return comp.replace(r, function (_, M, m, p, pr) { - debug('tilde', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0 - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else if (pr) { - debug('replaceTilde pr', pr) - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } else { - // ~1.2.3 == >=1.2.3 <1.3.0 - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - - debug('tilde return', ret) - return ret - }) -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceCaret(comp, options) - }).join(' ') -} - -function replaceCaret (comp, options) { - debug('caret', comp, options) - var r = options.loose ? re[CARETLOOSE] : re[CARET] - return comp.replace(r, function (_, M, m, p, pr) { - debug('caret', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - if (M === '0') { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else { - ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + (+M + 1) + '.0.0' - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + (+M + 1) + '.0.0' - } - } - - debug('caret return', ret) - return ret - }) -} - -function replaceXRanges (comp, options) { - debug('replaceXRanges', comp, options) - return comp.split(/\s+/).map(function (comp) { - return replaceXRange(comp, options) - }).join(' ') -} - -function replaceXRange (comp, options) { - comp = comp.trim() - var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] - return comp.replace(r, function (ret, gtlt, M, m, p, pr) { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - var xM = isX(M) - var xm = xM || isX(m) - var xp = xm || isX(p) - var anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' - } - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - // >1.2.3 => >= 1.2.4 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } - - ret = gtlt + M + '.' + m + '.' + p - } else if (xm) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (xp) { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } - - debug('xRange return', ret) - - return ret - }) -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -function replaceStars (comp, options) { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[STAR], '') -} - -// This function is passed to string.replace(re[HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0 -function hyphenReplace ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = '>=' + fM + '.0.0' - } else if (isX(fp)) { - from = '>=' + fM + '.' + fm + '.0' - } else { - from = '>=' + from - } - - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = '<' + (+tM + 1) + '.0.0' - } else if (isX(tp)) { - to = '<' + tM + '.' + (+tm + 1) + '.0' - } else if (tpr) { - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr - } else { - to = '<=' + to - } - - return (from + ' ' + to).trim() -} - -// if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function (version) { - if (!version) { - return false - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false -} - -function testSet (set, version, options) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } - - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === ANY) { - continue - } - - if (set[i].semver.prerelease.length > 0) { - var allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false - } - - return true -} - -exports.satisfies = satisfies -function satisfies (version, range, options) { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} - -exports.maxSatisfying = maxSatisfying -function maxSatisfying (versions, range, options) { - var max = null - var maxSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} - -exports.minSatisfying = minSatisfying -function minSatisfying (versions, range, options) { - var min = null - var minSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } - } - }) - return min -} - -exports.minVersion = minVersion -function minVersion (range, loose) { - range = new Range(range, loose) - - var minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } - - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } - - minver = null - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - comparators.forEach(function (comparator) { - // Clone to avoid manipulating the comparator's semver object. - var compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!minver || gt(minver, compver)) { - minver = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error('Unexpected operation: ' + comparator.operator) - } - }) - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} - -exports.validRange = validRange -function validRange (range, options) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} - -// Determine if version is less than all the versions possible in the range -exports.ltr = ltr -function ltr (version, range, options) { - return outside(version, range, '<', options) -} - -// Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr -function gtr (version, range, options) { - return outside(version, range, '>', options) -} - -exports.outside = outside -function outside (version, range, hilo, options) { - version = new SemVer(version, options) - range = new Range(range, options) - - var gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - - // If it satisifes the range it is not outside - if (satisfies(version, range, options)) { - return false - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - var high = null - var low = null - - comparators.forEach(function (comparator) { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true -} - -exports.prerelease = prerelease -function prerelease (version, options) { - var parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} - -exports.intersects = intersects -function intersects (r1, r2, options) { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2) -} - -exports.coerce = coerce -function coerce (version) { - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - var match = version.match(re[COERCE]) - - if (match == null) { - return null - } - - return parse(match[1] + - '.' + (match[2] || '0') + - '.' + (match[3] || '0')) -} diff --git a/deps/npm/node_modules/init-package-json/package.json b/deps/npm/node_modules/init-package-json/package.json index ce44c9b7d8154a..931b630d34d902 100644 --- a/deps/npm/node_modules/init-package-json/package.json +++ b/deps/npm/node_modules/init-package-json/package.json @@ -1,12 +1,12 @@ { "name": "init-package-json", - "version": "1.10.3", + "version": "2.0.0", "main": "init-package-json.js", "scripts": { - "prerelease": "npm t", - "postrelease": "npm publish && git push --follow-tags", - "release": "standard-version -s", - "test": "tap --nyc-arg=--all --coverage test" + "test": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags" }, "repository": { "type": "git", @@ -17,20 +17,25 @@ "description": "A node module to get your node module started", "dependencies": { "glob": "^7.1.1", - "npm-package-arg": "^4.0.0 || ^5.0.0 || ^6.0.0", + "npm-package-arg": "^8.0.1", "promzard": "^0.3.0", "read": "~1.0.1", - "read-package-json": "1 || 2", - "semver": "2.x || 3.x || 4 || 5", - "validate-npm-package-license": "^3.0.1", + "read-package-json": "^2.1.2", + "semver": "^7.3.2", + "validate-npm-package-license": "^3.0.4", "validate-npm-package-name": "^3.0.0" }, "devDependencies": { - "mkdirp": "^0.5.1", - "npm": "^5.7.1", - "rimraf": "^2.1.4", - "standard-version": "^4.3.0", - "tap": "^11.1.2" + "@npmcli/config": "^1.2.1", + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2", + "tap": "^14.10.8" + }, + "engines": { + "node": ">=10" + }, + "tap": { + "jobs": "1" }, "keywords": [ "init", diff --git a/deps/npm/node_modules/jsprim/CONTRIBUTING.md b/deps/npm/node_modules/jsprim/CONTRIBUTING.md deleted file mode 100644 index 750cef8dfd54a6..00000000000000 --- a/deps/npm/node_modules/jsprim/CONTRIBUTING.md +++ /dev/null @@ -1,19 +0,0 @@ -# Contributing - -This repository uses [cr.joyent.us](https://cr.joyent.us) (Gerrit) for new -changes. Anyone can submit changes. To get started, see the [cr.joyent.us user -guide](https://github.com/joyent/joyent-gerrit/blob/master/docs/user/README.md). -This repo does not use GitHub pull requests. - -See the [Joyent Engineering -Guidelines](https://github.com/joyent/eng/blob/master/docs/index.md) for general -best practices expected in this repository. - -Contributions should be "make prepush" clean. The "prepush" target runs the -"check" target, which requires these separate tools: - -* https://github.com/davepacheco/jsstyle -* https://github.com/davepacheco/javascriptlint - -If you're changing something non-trivial or user-facing, you may want to submit -an issue first. diff --git a/deps/npm/node_modules/libnpmfund/package.json b/deps/npm/node_modules/libnpmfund/package.json index 4710accd3cf513..f337fffd15fd7c 100644 --- a/deps/npm/node_modules/libnpmfund/package.json +++ b/deps/npm/node_modules/libnpmfund/package.json @@ -1,6 +1,6 @@ { "name": "libnpmfund", - "version": "0.0.0", + "version": "1.0.1", "files": [ "index.js" ], @@ -47,6 +47,6 @@ "tap": "^14.10.7" }, "dependencies": { - "@npmcli/arborist": "1 || 0" + "@npmcli/arborist": "^0.0.33 || ^1.x" } } diff --git a/deps/npm/node_modules/node-gyp/CONTRIBUTING.md b/deps/npm/node_modules/node-gyp/CONTRIBUTING.md deleted file mode 100644 index c1c50eab4e58b7..00000000000000 --- a/deps/npm/node_modules/node-gyp/CONTRIBUTING.md +++ /dev/null @@ -1,34 +0,0 @@ -# Contributing to node-gyp - -## Code of Conduct - -Please read the -[Code of Conduct](https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md) -which explains the minimum behavior expectations for node-gyp contributors. - - -## Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -* (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -* (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -* (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -* (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. diff --git a/deps/npm/node_modules/node-gyp/gyp/CODE_OF_CONDUCT.md b/deps/npm/node_modules/node-gyp/gyp/CODE_OF_CONDUCT.md deleted file mode 100644 index 4c211405596cb4..00000000000000 --- a/deps/npm/node_modules/node-gyp/gyp/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,4 +0,0 @@ -# Code of Conduct - -* [Node.js Code of Conduct](https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md) -* [Node.js Moderation Policy](https://github.com/nodejs/admin/blob/master/Moderation-Policy.md) diff --git a/deps/npm/node_modules/node-gyp/gyp/CONTRIBUTING.md b/deps/npm/node_modules/node-gyp/gyp/CONTRIBUTING.md deleted file mode 100644 index f9dd574a47cd9d..00000000000000 --- a/deps/npm/node_modules/node-gyp/gyp/CONTRIBUTING.md +++ /dev/null @@ -1,32 +0,0 @@ -# Contributing to gyp-next - -## Code of Conduct - -This project is bound to the [Node.js Code of Conduct](https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md). - - -## Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -* (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -* (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -* (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -* (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. diff --git a/deps/npm/node_modules/npm-package-arg/package.json b/deps/npm/node_modules/npm-package-arg/package.json index a1a09c18bf6e93..5035feef35181b 100644 --- a/deps/npm/node_modules/npm-package-arg/package.json +++ b/deps/npm/node_modules/npm-package-arg/package.json @@ -1,6 +1,6 @@ { "name": "npm-package-arg", - "version": "8.0.1", + "version": "8.1.0", "description": "Parse the things that can be arguments to `npm install`", "main": "npa.js", "directories": { @@ -10,7 +10,7 @@ "npa.js" ], "dependencies": { - "hosted-git-info": "^3.0.2", + "hosted-git-info": "^3.0.6", "semver": "^7.0.0", "validate-npm-package-name": "^3.0.0" }, diff --git a/deps/npm/node_modules/npm-registry-fetch/CHANGELOG.md b/deps/npm/node_modules/npm-registry-fetch/CHANGELOG.md index c121079bd445b1..fc26ee1bda4baf 100644 --- a/deps/npm/node_modules/npm-registry-fetch/CHANGELOG.md +++ b/deps/npm/node_modules/npm-registry-fetch/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [8.1.5](https://github.com/npm/registry-fetch/compare/v8.1.4...v8.1.5) (2020-10-12) + + +### Bug Fixes + +* respect publishConfig.registry when specified ([32e36ef](https://github.com/npm/registry-fetch/commit/32e36efe86302ed319973cd5b1e6ccc3f62e557e)), closes [#35](https://github.com/npm/registry-fetch/issues/35) + ### [8.1.4](https://github.com/npm/registry-fetch/compare/v8.1.3...v8.1.4) (2020-08-17) diff --git a/deps/npm/node_modules/npm-registry-fetch/index.js b/deps/npm/node_modules/npm-registry-fetch/index.js index eb48ba6c052b06..2324e7fbfd00be 100644 --- a/deps/npm/node_modules/npm-registry-fetch/index.js +++ b/deps/npm/node_modules/npm-registry-fetch/index.js @@ -29,6 +29,7 @@ function regFetch (uri, /* istanbul ignore next */ opts_ = {}) { } const registry = opts.registry = ( (opts.spec && pickRegistry(opts.spec, opts)) || + (opts.publishConfig && opts.publishConfig.registry) || opts.registry || /* istanbul ignore next */ 'https://registry.npmjs.org/' @@ -155,6 +156,10 @@ function pickRegistry (spec, opts = {}) { registry = opts[opts.scope.replace(/^@?/, '@') + ':registry'] } + if (!registry && opts.publishConfig) { + registry = opts.publishConfig.registry + } + if (!registry) { registry = opts.registry || 'https://registry.npmjs.org/' } diff --git a/deps/npm/node_modules/npm-registry-fetch/package.json b/deps/npm/node_modules/npm-registry-fetch/package.json index c68a42286a4511..5aeddc5b39102b 100644 --- a/deps/npm/node_modules/npm-registry-fetch/package.json +++ b/deps/npm/node_modules/npm-registry-fetch/package.json @@ -1,6 +1,6 @@ { "name": "npm-registry-fetch", - "version": "8.1.4", + "version": "8.1.5", "description": "Fetch-based http client for use with npm registry APIs", "main": "index.js", "files": [ diff --git a/deps/npm/node_modules/read-package-json/CHANGELOG.md b/deps/npm/node_modules/read-package-json/CHANGELOG.md index 4b710cb2ab1059..e63fd10f7703ec 100644 --- a/deps/npm/node_modules/read-package-json/CHANGELOG.md +++ b/deps/npm/node_modules/read-package-json/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +# [3.0.0](https://github.com/npm/read-package-json/compare/v2.1.2...v3.0.0) (2020-10-13) + + +### Bug Fixes + +* check-in updated lockfile ([19d9fbe](https://github.com/npm/read-package-json/commit/19d9fbe)) + + + ## [2.1.2](https://github.com/npm/read-package-json/compare/v2.1.1...v2.1.2) (2020-08-20) diff --git a/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/AUTHORS b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/AUTHORS new file mode 100644 index 00000000000000..66282ba1d11971 --- /dev/null +++ b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/AUTHORS @@ -0,0 +1,4 @@ +# Names sorted by how much code was originally theirs. +Isaac Z. Schlueter +Meryn Stol +Robert Kowalski diff --git a/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/LICENSE b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/LICENSE new file mode 100644 index 00000000000000..6ed662cd5d14de --- /dev/null +++ b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/LICENSE @@ -0,0 +1,30 @@ +This package contains code originally written by Isaac Z. Schlueter. +Used with permission. + +Copyright (c) Meryn Stol ("Author") +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/README.md b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/README.md new file mode 100644 index 00000000000000..4f88b7058dc5e9 --- /dev/null +++ b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/README.md @@ -0,0 +1,106 @@ +# normalize-package-data [![Build Status](https://travis-ci.org/npm/normalize-package-data.png?branch=master)](https://travis-ci.org/npm/normalize-package-data) + +normalize-package-data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry. + +normalize-package-data is used by [read-package-json](https://npmjs.org/package/read-package-json) to normalize the data it reads from a package.json file. In turn, read-package-json is used by [npm](https://npmjs.org/package/npm) and various npm-related tools. + +## Installation + +``` +npm install normalize-package-data +``` + +## Usage + +Basic usage is really simple. You call the function that normalize-package-data exports. Let's call it `normalizeData`. + +```javascript +normalizeData = require('normalize-package-data') +packageData = require("./package.json") +normalizeData(packageData) +// packageData is now normalized +``` + +#### Strict mode + +You may activate strict validation by passing true as the second argument. + +```javascript +normalizeData = require('normalize-package-data') +packageData = require("./package.json") +normalizeData(packageData, true) +// packageData is now normalized +``` + +If strict mode is activated, only Semver 2.0 version strings are accepted. Otherwise, Semver 1.0 strings are accepted as well. Packages must have a name, and the name field must not have contain leading or trailing whitespace. + +#### Warnings + +Optionally, you may pass a "warning" function. It gets called whenever the `normalizeData` function encounters something that doesn't look right. It indicates less than perfect input data. + +```javascript +normalizeData = require('normalize-package-data') +packageData = require("./package.json") +warnFn = function(msg) { console.error(msg) } +normalizeData(packageData, warnFn) +// packageData is now normalized. Any number of warnings may have been logged. +``` + +You may combine strict validation with warnings by passing `true` as the second argument, and `warnFn` as third. + +When `private` field is set to `true`, warnings will be suppressed. + +### Potential exceptions + +If the supplied data has an invalid name or version vield, `normalizeData` will throw an error. Depending on where you call `normalizeData`, you may want to catch these errors so can pass them to a callback. + +## What normalization (currently) entails + +* The value of `name` field gets trimmed (unless in strict mode). +* The value of the `version` field gets cleaned by `semver.clean`. See [documentation for the semver module](https://github.com/isaacs/node-semver). +* If `name` and/or `version` fields are missing, they are set to empty strings. +* If `files` field is not an array, it will be removed. +* If `bin` field is a string, then `bin` field will become an object with `name` set to the value of the `name` field, and `bin` set to the original string value. +* If `man` field is a string, it will become an array with the original string as its sole member. +* If `keywords` field is string, it is considered to be a list of keywords separated by one or more white-space characters. It gets converted to an array by splitting on `\s+`. +* All people fields (`author`, `maintainers`, `contributors`) get converted into objects with name, email and url properties. +* If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`. +* If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs. +* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched. +* As of v2: Dependencies that point at known hosted git providers (currently: github, bitbucket, gitlab) will have their URLs canonicalized, but protocols will be preserved. +* As of v2: Dependencies that use shortcuts for hosted git providers (`org/proj`, `github:org/proj`, `bitbucket:org/proj`, `gitlab:org/proj`, `gist:docid`) will have the shortcut left in place. (In the case of github, the `org/proj` form will be expanded to `github:org/proj`.) THIS MARKS A BREAKING CHANGE FROM V1, where the shorcut was previously expanded to a URL. +* If `description` field does not exist, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`. +* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `"git"`. +* If `repository.url` is not a valid url, but in the style of "[owner-name]/[repo-name]", `repository.url` will be set to git+https://github.com/[owner-name]/[repo-name].git +* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value. +* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen. +* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed. +* If `homepage` field is not a string, it will be removed. +* If the url in the `homepage` field does not specify a protocol, then http is assumed. For example, `myproject.org` will be changed to `http://myproject.org`. +* If `homepage` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `homepage` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]#readme . If the repository field points to a GitHub Gist repo url, the associated http url is chosen. + +### Rules for name field + +If `name` field is given, the value of the name field must be a string. The string may not: + +* start with a period. +* contain the following characters: `/@\s+%` +* contain any characters that would need to be encoded for use in urls. +* resemble the word `node_modules` or `favicon.ico` (case doesn't matter). + +### Rules for version field + +If `version` field is given, the value of the version field must be a valid *semver* string, as determined by the `semver.valid` method. See [documentation for the semver module](https://github.com/isaacs/node-semver). + +### Rules for license field + +The `license` field should be a valid *SPDX license expression* or one of the special values allowed by [validate-npm-package-license](https://npmjs.com/package/validate-npm-package-license). See [documentation for the license field in package.json](https://docs.npmjs.com/files/package.json#license). + +## Credits + +This package contains code based on read-package-json written by Isaac Z. Schlueter. Used with permisson. + +## License + +normalize-package-data is released under the [BSD 2-Clause License](http://opensource.org/licenses/MIT). +Copyright (c) 2013 Meryn Stol diff --git a/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/extract_description.js b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/extract_description.js new file mode 100644 index 00000000000000..83f10aa0a79066 --- /dev/null +++ b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/extract_description.js @@ -0,0 +1,14 @@ +module.exports = extractDescription + +// Extracts description from contents of a readme file in markdown format +function extractDescription (d) { + if (!d) return; + if (d === "ERROR: No README data found!") return; + // the first block of text before the first heading + // that isn't the first line heading + d = d.trim().split('\n') + for (var s = 0; d[s] && d[s].trim().match(/^(#|$)/); s ++); + var l = d.length + for (var e = s + 1; e < l && d[e].trim(); e ++); + return d.slice(s, e).join(' ').trim() +} diff --git a/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js new file mode 100644 index 00000000000000..27682e9611afd2 --- /dev/null +++ b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js @@ -0,0 +1,418 @@ +var semver = require("semver") +var validateLicense = require('validate-npm-package-license'); +var hostedGitInfo = require("hosted-git-info") +var isBuiltinModule = require("resolve").isCore +var depTypes = ["dependencies","devDependencies","optionalDependencies"] +var extractDescription = require("./extract_description") +var url = require("url") +var typos = require("./typos.json") + +var fixer = module.exports = { + // default warning function + warn: function() {}, + + fixRepositoryField: function(data) { + if (data.repositories) { + this.warn("repositories"); + data.repository = data.repositories[0] + } + if (!data.repository) return this.warn("missingRepository") + if (typeof data.repository === "string") { + data.repository = { + type: "git", + url: data.repository + } + } + var r = data.repository.url || "" + if (r) { + var hosted = hostedGitInfo.fromUrl(r) + if (hosted) { + r = data.repository.url + = hosted.getDefaultRepresentation() == "shortcut" ? hosted.https() : hosted.toString() + } + } + + if (r.match(/github.com\/[^\/]+\/[^\/]+\.git\.git$/)) { + this.warn("brokenGitUrl", r) + } + } + +, fixTypos: function(data) { + Object.keys(typos.topLevel).forEach(function (d) { + if (data.hasOwnProperty(d)) { + this.warn("typo", d, typos.topLevel[d]) + } + }, this) + } + +, fixScriptsField: function(data) { + if (!data.scripts) return + if (typeof data.scripts !== "object") { + this.warn("nonObjectScripts") + delete data.scripts + return + } + Object.keys(data.scripts).forEach(function (k) { + if (typeof data.scripts[k] !== "string") { + this.warn("nonStringScript") + delete data.scripts[k] + } else if (typos.script[k] && !data.scripts[typos.script[k]]) { + this.warn("typo", k, typos.script[k], "scripts") + } + }, this) + } + +, fixFilesField: function(data) { + var files = data.files + if (files && !Array.isArray(files)) { + this.warn("nonArrayFiles") + delete data.files + } else if (data.files) { + data.files = data.files.filter(function(file) { + if (!file || typeof file !== "string") { + this.warn("invalidFilename", file) + return false + } else { + return true + } + }, this) + } + } + +, fixBinField: function(data) { + if (!data.bin) return; + if (typeof data.bin === "string") { + var b = {} + var match + if (match = data.name.match(/^@[^/]+[/](.*)$/)) { + b[match[1]] = data.bin + } else { + b[data.name] = data.bin + } + data.bin = b + } + } + +, fixManField: function(data) { + if (!data.man) return; + if (typeof data.man === "string") { + data.man = [ data.man ] + } + } +, fixBundleDependenciesField: function(data) { + var bdd = "bundledDependencies" + var bd = "bundleDependencies" + if (data[bdd] && !data[bd]) { + data[bd] = data[bdd] + delete data[bdd] + } + if (data[bd] && !Array.isArray(data[bd])) { + this.warn("nonArrayBundleDependencies") + delete data[bd] + } else if (data[bd]) { + data[bd] = data[bd].filter(function(bd) { + if (!bd || typeof bd !== 'string') { + this.warn("nonStringBundleDependency", bd) + return false + } else { + if (!data.dependencies) { + data.dependencies = {} + } + if (!data.dependencies.hasOwnProperty(bd)) { + this.warn("nonDependencyBundleDependency", bd) + data.dependencies[bd] = "*" + } + return true + } + }, this) + } + } + +, fixDependencies: function(data, strict) { + var loose = !strict + objectifyDeps(data, this.warn) + addOptionalDepsToDeps(data, this.warn) + this.fixBundleDependenciesField(data) + + ;['dependencies','devDependencies'].forEach(function(deps) { + if (!(deps in data)) return + if (!data[deps] || typeof data[deps] !== "object") { + this.warn("nonObjectDependencies", deps) + delete data[deps] + return + } + Object.keys(data[deps]).forEach(function (d) { + var r = data[deps][d] + if (typeof r !== 'string') { + this.warn("nonStringDependency", d, JSON.stringify(r)) + delete data[deps][d] + } + var hosted = hostedGitInfo.fromUrl(data[deps][d]) + if (hosted) data[deps][d] = hosted.toString() + }, this) + }, this) + } + +, fixModulesField: function (data) { + if (data.modules) { + this.warn("deprecatedModules") + delete data.modules + } + } + +, fixKeywordsField: function (data) { + if (typeof data.keywords === "string") { + data.keywords = data.keywords.split(/,\s+/) + } + if (data.keywords && !Array.isArray(data.keywords)) { + delete data.keywords + this.warn("nonArrayKeywords") + } else if (data.keywords) { + data.keywords = data.keywords.filter(function(kw) { + if (typeof kw !== "string" || !kw) { + this.warn("nonStringKeyword"); + return false + } else { + return true + } + }, this) + } + } + +, fixVersionField: function(data, strict) { + // allow "loose" semver 1.0 versions in non-strict mode + // enforce strict semver 2.0 compliance in strict mode + var loose = !strict + if (!data.version) { + data.version = "" + return true + } + if (!semver.valid(data.version, loose)) { + throw new Error('Invalid version: "'+ data.version + '"') + } + data.version = semver.clean(data.version, loose) + return true + } + +, fixPeople: function(data) { + modifyPeople(data, unParsePerson) + modifyPeople(data, parsePerson) + } + +, fixNameField: function(data, options) { + if (typeof options === "boolean") options = {strict: options} + else if (typeof options === "undefined") options = {} + var strict = options.strict + if (!data.name && !strict) { + data.name = "" + return + } + if (typeof data.name !== "string") { + throw new Error("name field must be a string.") + } + if (!strict) + data.name = data.name.trim() + ensureValidName(data.name, strict, options.allowLegacyCase) + if (isBuiltinModule(data.name)) + this.warn("conflictingName", data.name) + } + + +, fixDescriptionField: function (data) { + if (data.description && typeof data.description !== 'string') { + this.warn("nonStringDescription") + delete data.description + } + if (data.readme && !data.description) + data.description = extractDescription(data.readme) + if(data.description === undefined) delete data.description; + if (!data.description) this.warn("missingDescription") + } + +, fixReadmeField: function (data) { + if (!data.readme) { + this.warn("missingReadme") + data.readme = "ERROR: No README data found!" + } + } + +, fixBugsField: function(data) { + if (!data.bugs && data.repository && data.repository.url) { + var hosted = hostedGitInfo.fromUrl(data.repository.url) + if(hosted && hosted.bugs()) { + data.bugs = {url: hosted.bugs()} + } + } + else if(data.bugs) { + var emailRe = /^.+@.*\..+$/ + if(typeof data.bugs == "string") { + if(emailRe.test(data.bugs)) + data.bugs = {email:data.bugs} + else if(url.parse(data.bugs).protocol) + data.bugs = {url: data.bugs} + else + this.warn("nonEmailUrlBugsString") + } + else { + bugsTypos(data.bugs, this.warn) + var oldBugs = data.bugs + data.bugs = {} + if(oldBugs.url) { + if(typeof(oldBugs.url) == "string" && url.parse(oldBugs.url).protocol) + data.bugs.url = oldBugs.url + else + this.warn("nonUrlBugsUrlField") + } + if(oldBugs.email) { + if(typeof(oldBugs.email) == "string" && emailRe.test(oldBugs.email)) + data.bugs.email = oldBugs.email + else + this.warn("nonEmailBugsEmailField") + } + } + if(!data.bugs.email && !data.bugs.url) { + delete data.bugs + this.warn("emptyNormalizedBugs") + } + } + } + +, fixHomepageField: function(data) { + if (!data.homepage && data.repository && data.repository.url) { + var hosted = hostedGitInfo.fromUrl(data.repository.url) + if (hosted && hosted.docs()) data.homepage = hosted.docs() + } + if (!data.homepage) return + + if(typeof data.homepage !== "string") { + this.warn("nonUrlHomepage") + return delete data.homepage + } + if(!url.parse(data.homepage).protocol) { + data.homepage = "http://" + data.homepage + } + } + +, fixLicenseField: function(data) { + if (!data.license) { + return this.warn("missingLicense") + } else{ + if ( + typeof(data.license) !== 'string' || + data.license.length < 1 || + data.license.trim() === '' + ) { + this.warn("invalidLicense") + } else { + if (!validateLicense(data.license).validForNewPackages) + this.warn("invalidLicense") + } + } + } +} + +function isValidScopedPackageName(spec) { + if (spec.charAt(0) !== '@') return false + + var rest = spec.slice(1).split('/') + if (rest.length !== 2) return false + + return rest[0] && rest[1] && + rest[0] === encodeURIComponent(rest[0]) && + rest[1] === encodeURIComponent(rest[1]) +} + +function isCorrectlyEncodedName(spec) { + return !spec.match(/[\/@\s\+%:]/) && + spec === encodeURIComponent(spec) +} + +function ensureValidName (name, strict, allowLegacyCase) { + if (name.charAt(0) === "." || + !(isValidScopedPackageName(name) || isCorrectlyEncodedName(name)) || + (strict && (!allowLegacyCase) && name !== name.toLowerCase()) || + name.toLowerCase() === "node_modules" || + name.toLowerCase() === "favicon.ico") { + throw new Error("Invalid name: " + JSON.stringify(name)) + } +} + +function modifyPeople (data, fn) { + if (data.author) data.author = fn(data.author) + ;["maintainers", "contributors"].forEach(function (set) { + if (!Array.isArray(data[set])) return; + data[set] = data[set].map(fn) + }) + return data +} + +function unParsePerson (person) { + if (typeof person === "string") return person + var name = person.name || "" + var u = person.url || person.web + var url = u ? (" ("+u+")") : "" + var e = person.email || person.mail + var email = e ? (" <"+e+">") : "" + return name+email+url +} + +function parsePerson (person) { + if (typeof person !== "string") return person + var name = person.match(/^([^\(<]+)/) + var url = person.match(/\(([^\)]+)\)/) + var email = person.match(/<([^>]+)>/) + var obj = {} + if (name && name[0].trim()) obj.name = name[0].trim() + if (email) obj.email = email[1]; + if (url) obj.url = url[1]; + return obj +} + +function addOptionalDepsToDeps (data, warn) { + var o = data.optionalDependencies + if (!o) return; + var d = data.dependencies || {} + Object.keys(o).forEach(function (k) { + d[k] = o[k] + }) + data.dependencies = d +} + +function depObjectify (deps, type, warn) { + if (!deps) return {} + if (typeof deps === "string") { + deps = deps.trim().split(/[\n\r\s\t ,]+/) + } + if (!Array.isArray(deps)) return deps + warn("deprecatedArrayDependencies", type) + var o = {} + deps.filter(function (d) { + return typeof d === "string" + }).forEach(function(d) { + d = d.trim().split(/(:?[@\s><=])/) + var dn = d.shift() + var dv = d.join("") + dv = dv.trim() + dv = dv.replace(/^@/, "") + o[dn] = dv + }) + return o +} + +function objectifyDeps (data, warn) { + depTypes.forEach(function (type) { + if (!data[type]) return; + data[type] = depObjectify(data[type], type, warn) + }) +} + +function bugsTypos(bugs, warn) { + if (!bugs) return + Object.keys(bugs).forEach(function (k) { + if (typos.bugs[k]) { + warn("typo", k, typos.bugs[k], "bugs") + bugs[typos.bugs[k]] = bugs[k] + delete bugs[k] + } + }) +} diff --git a/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/make_warning.js b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/make_warning.js new file mode 100644 index 00000000000000..4ac74ad7cb25c3 --- /dev/null +++ b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/make_warning.js @@ -0,0 +1,23 @@ +var util = require("util") +var messages = require("./warning_messages.json") + +module.exports = function() { + var args = Array.prototype.slice.call(arguments, 0) + var warningName = args.shift() + if (warningName == "typo") { + return makeTypoWarning.apply(null,args) + } + else { + var msgTemplate = messages[warningName] ? messages[warningName] : warningName + ": '%s'" + args.unshift(msgTemplate) + return util.format.apply(null, args) + } +} + +function makeTypoWarning (providedName, probableName, field) { + if (field) { + providedName = field + "['" + providedName + "']" + probableName = field + "['" + probableName + "']" + } + return util.format(messages.typo, providedName, probableName) +} diff --git a/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/normalize.js b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/normalize.js new file mode 100644 index 00000000000000..bd1bfef123103a --- /dev/null +++ b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/normalize.js @@ -0,0 +1,39 @@ +module.exports = normalize + +var fixer = require("./fixer") +normalize.fixer = fixer + +var makeWarning = require("./make_warning") + +var fieldsToFix = ['name','version','description','repository','modules','scripts' + ,'files','bin','man','bugs','keywords','readme','homepage','license'] +var otherThingsToFix = ['dependencies','people', 'typos'] + +var thingsToFix = fieldsToFix.map(function(fieldName) { + return ucFirst(fieldName) + "Field" +}) +// two ways to do this in CoffeeScript on only one line, sub-70 chars: +// thingsToFix = fieldsToFix.map (name) -> ucFirst(name) + "Field" +// thingsToFix = (ucFirst(name) + "Field" for name in fieldsToFix) +thingsToFix = thingsToFix.concat(otherThingsToFix) + +function normalize (data, warn, strict) { + if(warn === true) warn = null, strict = true + if(!strict) strict = false + if(!warn || data.private) warn = function(msg) { /* noop */ } + + if (data.scripts && + data.scripts.install === "node-gyp rebuild" && + !data.scripts.preinstall) { + data.gypfile = true + } + fixer.warn = function() { warn(makeWarning.apply(null, arguments)) } + thingsToFix.forEach(function(thingName) { + fixer["fix" + ucFirst(thingName)](data, strict) + }) + data._id = data.name + "@" + data.version +} + +function ucFirst (string) { + return string.charAt(0).toUpperCase() + string.slice(1); +} diff --git a/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/safe_format.js b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/safe_format.js new file mode 100644 index 00000000000000..b07f1006d1ad29 --- /dev/null +++ b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/safe_format.js @@ -0,0 +1,9 @@ +var util = require('util') + +module.exports = function() { + var args = Array.prototype.slice.call(arguments, 0) + args.forEach(function(arg) { + if (!arg) throw new TypeError('Bad arguments.') + }) + return util.format.apply(null, arguments) +} diff --git a/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/typos.json b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/typos.json new file mode 100644 index 00000000000000..7f9dd283b30ff3 --- /dev/null +++ b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/typos.json @@ -0,0 +1,25 @@ +{ + "topLevel": { + "dependancies": "dependencies" + ,"dependecies": "dependencies" + ,"depdenencies": "dependencies" + ,"devEependencies": "devDependencies" + ,"depends": "dependencies" + ,"dev-dependencies": "devDependencies" + ,"devDependences": "devDependencies" + ,"devDepenencies": "devDependencies" + ,"devdependencies": "devDependencies" + ,"repostitory": "repository" + ,"repo": "repository" + ,"prefereGlobal": "preferGlobal" + ,"hompage": "homepage" + ,"hampage": "homepage" + ,"autohr": "author" + ,"autor": "author" + ,"contributers": "contributors" + ,"publicationConfig": "publishConfig" + ,"script": "scripts" + }, + "bugs": { "web": "url", "name": "url" }, + "script": { "server": "start", "tests": "test" } +} diff --git a/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/warning_messages.json b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/warning_messages.json new file mode 100644 index 00000000000000..4890f506ed965a --- /dev/null +++ b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/warning_messages.json @@ -0,0 +1,30 @@ +{ + "repositories": "'repositories' (plural) Not supported. Please pick one as the 'repository' field" + ,"missingRepository": "No repository field." + ,"brokenGitUrl": "Probably broken git url: %s" + ,"nonObjectScripts": "scripts must be an object" + ,"nonStringScript": "script values must be string commands" + ,"nonArrayFiles": "Invalid 'files' member" + ,"invalidFilename": "Invalid filename in 'files' list: %s" + ,"nonArrayBundleDependencies": "Invalid 'bundleDependencies' list. Must be array of package names" + ,"nonStringBundleDependency": "Invalid bundleDependencies member: %s" + ,"nonDependencyBundleDependency": "Non-dependency in bundleDependencies: %s" + ,"nonObjectDependencies": "%s field must be an object" + ,"nonStringDependency": "Invalid dependency: %s %s" + ,"deprecatedArrayDependencies": "specifying %s as array is deprecated" + ,"deprecatedModules": "modules field is deprecated" + ,"nonArrayKeywords": "keywords should be an array of strings" + ,"nonStringKeyword": "keywords should be an array of strings" + ,"conflictingName": "%s is also the name of a node core module." + ,"nonStringDescription": "'description' field should be a string" + ,"missingDescription": "No description" + ,"missingReadme": "No README data" + ,"missingLicense": "No license field." + ,"nonEmailUrlBugsString": "Bug string field must be url, email, or {email,url}" + ,"nonUrlBugsUrlField": "bugs.url field must be a string url. Deleted." + ,"nonEmailBugsEmailField": "bugs.email field must be a string email. Deleted." + ,"emptyNormalizedBugs": "Normalized value of bugs field is an empty object. Deleted." + ,"nonUrlHomepage": "homepage field must be a string url. Deleted." + ,"invalidLicense": "license should be a valid SPDX license expression" + ,"typo": "%s should probably be %s." +} diff --git a/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/package.json b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/package.json new file mode 100644 index 00000000000000..8df2f8fcac21e7 --- /dev/null +++ b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/package.json @@ -0,0 +1,32 @@ +{ + "name": "normalize-package-data", + "version": "3.0.0", + "author": "Meryn Stol ", + "description": "Normalizes data that can be found in package.json files.", + "license": "BSD-2-Clause", + "repository": { + "type": "git", + "url": "git://github.com/npm/normalize-package-data.git" + }, + "main": "lib/normalize.js", + "scripts": { + "test": "tap test/*.js" + }, + "dependencies": { + "hosted-git-info": "^3.0.6", + "resolve": "^1.17.0", + "semver": "^7.3.2", + "validate-npm-package-license": "^3.0.1" + }, + "devDependencies": { + "tap": "^14.10.8" + }, + "files": [ + "lib/*.js", + "lib/*.json", + "AUTHORS" + ], + "engines": { + "node": ">=10" + } +} diff --git a/deps/npm/node_modules/read-package-json/package.json b/deps/npm/node_modules/read-package-json/package.json index 988508baa4b1fc..755dd3747a56a9 100644 --- a/deps/npm/node_modules/read-package-json/package.json +++ b/deps/npm/node_modules/read-package-json/package.json @@ -1,6 +1,6 @@ { "name": "read-package-json", - "version": "2.1.2", + "version": "3.0.0", "author": "Isaac Z. Schlueter (http://blog.izs.me/)", "description": "The thing npm uses to read package.json files with semantics and defaults and validation", "repository": { @@ -17,9 +17,9 @@ }, "dependencies": { "glob": "^7.1.1", - "normalize-package-data": "^2.0.0", - "npm-normalize-package-bin": "^1.0.0", - "json-parse-even-better-errors": "^2.3.0" + "json-parse-even-better-errors": "^2.3.0", + "normalize-package-data": "^3.0.0", + "npm-normalize-package-bin": "^1.0.0" }, "devDependencies": { "standard": "^11.0.0", @@ -29,5 +29,8 @@ "license": "ISC", "files": [ "read-json.js" - ] + ], + "engines": { + "node": ">=10" + } } diff --git a/deps/npm/node_modules/readable-stream/CONTRIBUTING.md b/deps/npm/node_modules/readable-stream/CONTRIBUTING.md deleted file mode 100644 index f478d58dca85b2..00000000000000 --- a/deps/npm/node_modules/readable-stream/CONTRIBUTING.md +++ /dev/null @@ -1,38 +0,0 @@ -# Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -* (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -* (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -* (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -* (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. - -## Moderation Policy - -The [Node.js Moderation Policy] applies to this WG. - -## Code of Conduct - -The [Node.js Code of Conduct][] applies to this WG. - -[Node.js Code of Conduct]: -https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md -[Node.js Moderation Policy]: -https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/deps/npm/node_modules/uuid/CONTRIBUTING.md b/deps/npm/node_modules/uuid/CONTRIBUTING.md deleted file mode 100644 index 4a4503d02ca583..00000000000000 --- a/deps/npm/node_modules/uuid/CONTRIBUTING.md +++ /dev/null @@ -1,18 +0,0 @@ -# Contributing - -Please feel free to file GitHub Issues or propose Pull Requests. We're always happy to discuss improvements to this library! - -## Testing - -```shell -npm test -``` - -## Releasing - -Releases are supposed to be done from master, version bumping is automated through [`standard-version`](https://github.com/conventional-changelog/standard-version): - -```shell -npm run release -- --dry-run # verify output manually -npm run release # follow the instructions from the output of this command -``` diff --git a/deps/npm/node_modules/verror/CONTRIBUTING.md b/deps/npm/node_modules/verror/CONTRIBUTING.md deleted file mode 100644 index 750cef8dfd54a6..00000000000000 --- a/deps/npm/node_modules/verror/CONTRIBUTING.md +++ /dev/null @@ -1,19 +0,0 @@ -# Contributing - -This repository uses [cr.joyent.us](https://cr.joyent.us) (Gerrit) for new -changes. Anyone can submit changes. To get started, see the [cr.joyent.us user -guide](https://github.com/joyent/joyent-gerrit/blob/master/docs/user/README.md). -This repo does not use GitHub pull requests. - -See the [Joyent Engineering -Guidelines](https://github.com/joyent/eng/blob/master/docs/index.md) for general -best practices expected in this repository. - -Contributions should be "make prepush" clean. The "prepush" target runs the -"check" target, which requires these separate tools: - -* https://github.com/davepacheco/jsstyle -* https://github.com/davepacheco/javascriptlint - -If you're changing something non-trivial or user-facing, you may want to submit -an issue first. diff --git a/deps/npm/package.json b/deps/npm/package.json index 1c93e64ca5c104..28db391a6bbe0f 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "7.0.0-rc.4", + "version": "7.0.0", "name": "npm", "description": "a package manager for JavaScript", "keywords": [ @@ -42,7 +42,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@npmcli/arborist": "^0.0.33", + "@npmcli/arborist": "^1.0.0", "@npmcli/ci-detect": "^1.2.0", "@npmcli/config": "^1.2.1", "@npmcli/run-script": "^1.7.0", @@ -62,14 +62,14 @@ "editor": "~1.0.0", "glob": "^7.1.4", "graceful-fs": "^4.2.3", - "hosted-git-info": "^3.0.5", + "hosted-git-info": "^3.0.6", "inherits": "^2.0.4", "ini": "^1.3.5", - "init-package-json": "^1.10.3", + "init-package-json": "^2.0.0", "is-cidr": "^4.0.2", "leven": "^3.1.0", "libnpmaccess": "^4.0.0", - "libnpmfund": "0.0.0", + "libnpmfund": "^1.0.1", "libnpmhook": "^6.0.0", "libnpmorg": "^2.0.0", "libnpmpack": "^2.0.0", @@ -83,7 +83,7 @@ "ms": "^2.1.2", "nopt": "^5.0.0", "npm-audit-report": "^2.1.4", - "npm-package-arg": "^8.0.1", + "npm-package-arg": "^8.1.0", "npm-pick-manifest": "^6.1.0", "npm-profile": "^5.0.1", "npm-registry-fetch": "^8.1.4", @@ -94,7 +94,7 @@ "parse-conflict-json": "^1.1.1", "qrcode-terminal": "^0.12.0", "read": "~1.0.7", - "read-package-json": "^2.1.2", + "read-package-json": "^3.0.0", "read-package-json-fast": "^1.2.1", "rimraf": "^3.0.2", "semver": "^7.3.2", @@ -176,7 +176,7 @@ "write-file-atomic" ], "devDependencies": { - "eslint": "^7.10.0", + "eslint": "^7.11.0", "eslint-plugin-import": "^2.22.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.2.1", diff --git a/deps/npm/tap-snapshots/test-lib-utils-config.js-TAP.test.js b/deps/npm/tap-snapshots/test-lib-utils-config.js-TAP.test.js index c1a1ddd48c3483..5190a5604a2407 100644 --- a/deps/npm/tap-snapshots/test-lib-utils-config.js-TAP.test.js +++ b/deps/npm/tap-snapshots/test-lib-utils-config.js-TAP.test.js @@ -64,6 +64,12 @@ Object { "init-license": "ISC", "init-module": "~/.npm-init.js", "init-version": "1.0.0", + "init.author.email": "", + "init.author.name": "", + "init.author.url": "", + "init.license": "ISC", + "init.module": "~/.npm-init.js", + "init.version": "1.0.0", "json": false, "key": null, "legacy-bundling": false, @@ -377,6 +383,15 @@ Object { "init-license": "{String TYPE}", "init-module": "{PATH MODULE}", "init-version": "{SEMVER MODULE}", + "init.author.email": "{String TYPE}", + "init.author.name": "{String TYPE}", + "init.author.url": Array [ + "", + "{URL MODULE}", + ], + "init.license": "{String TYPE}", + "init.module": "{PATH MODULE}", + "init.version": "{SEMVER MODULE}", "json": "{Boolean TYPE}", "key": Array [ null, @@ -578,6 +593,12 @@ Object { "init-license": "ISC", "init-module": "~/.npm-init.js", "init-version": "1.0.0", + "init.author.email": "", + "init.author.name": "", + "init.author.url": "", + "init.license": "ISC", + "init.module": "~/.npm-init.js", + "init.version": "1.0.0", "json": false, "key": null, "legacy-bundling": false, @@ -891,6 +912,15 @@ Object { "init-license": "{String TYPE}", "init-module": "{PATH MODULE}", "init-version": "{SEMVER MODULE}", + "init.author.email": "{String TYPE}", + "init.author.name": "{String TYPE}", + "init.author.url": Array [ + "", + "{URL MODULE}", + ], + "init.license": "{String TYPE}", + "init.module": "{PATH MODULE}", + "init.version": "{SEMVER MODULE}", "json": "{Boolean TYPE}", "key": Array [ null, @@ -1092,6 +1122,12 @@ Object { "init-license": "ISC", "init-module": "~/.npm-init.js", "init-version": "1.0.0", + "init.author.email": "", + "init.author.name": "", + "init.author.url": "", + "init.license": "ISC", + "init.module": "~/.npm-init.js", + "init.version": "1.0.0", "json": false, "key": null, "legacy-bundling": false, @@ -1405,6 +1441,15 @@ Object { "init-license": "{String TYPE}", "init-module": "{PATH MODULE}", "init-version": "{SEMVER MODULE}", + "init.author.email": "{String TYPE}", + "init.author.name": "{String TYPE}", + "init.author.url": Array [ + "", + "{URL MODULE}", + ], + "init.license": "{String TYPE}", + "init.module": "{PATH MODULE}", + "init.version": "{SEMVER MODULE}", "json": "{Boolean TYPE}", "key": Array [ null, diff --git a/deps/npm/tap-snapshots/test-lib-utils-explain-dep.js-TAP.test.js b/deps/npm/tap-snapshots/test-lib-utils-explain-dep.js-TAP.test.js index 658cecb1ca68c9..48f84e5111821f 100644 --- a/deps/npm/tap-snapshots/test-lib-utils-explain-dep.js-TAP.test.js +++ b/deps/npm/tap-snapshots/test-lib-utils-explain-dep.js-TAP.test.js @@ -77,7 +77,7 @@ exports[`test/lib/utils/explain-dep.js TAP manyDeps > explain color deep 1`] = ` prod-dep@"1.x" from the root project optional manydep@"1.x" from optdep@1.0.0 optional node_modules/optdep - optdep optdep@"1.0.0" from the root project + optional optdep@"1.0.0" from the root project manydep@"1.0.x" from extra-neos@1337.420.69-lol extraneous node_modules/extra-neos dev manydep@"*" from deep-dev@2.3.4 dev @@ -114,13 +114,13 @@ manydep@1.0.0 exports[`test/lib/utils/explain-dep.js TAP optional > explain color deep 1`] = ` optdep@1.0.0 optional node_modules/optdep - optdep optdep@"1.0.0" from the root project + optional optdep@"1.0.0" from the root project ` exports[`test/lib/utils/explain-dep.js TAP optional > explain nocolor shallow 1`] = ` optdep@1.0.0 optional node_modules/optdep - optdep optdep@"1.0.0" from the root project + optional optdep@"1.0.0" from the root project ` exports[`test/lib/utils/explain-dep.js TAP optional > print color 1`] = ` diff --git a/deps/npm/tap-snapshots/test-lib-utils-explain-eresolve.js-TAP.test.js b/deps/npm/tap-snapshots/test-lib-utils-explain-eresolve.js-TAP.test.js index 716d82ced382ba..87dcb861c633f1 100644 --- a/deps/npm/tap-snapshots/test-lib-utils-explain-eresolve.js-TAP.test.js +++ b/deps/npm/tap-snapshots/test-lib-utils-explain-eresolve.js-TAP.test.js @@ -5,17 +5,121 @@ * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' +exports[`test/lib/utils/explain-eresolve.js TAP chain-conflict > explain with color 1`] = ` +While resolving: project@1.2.3 +Found: @isaacs/testing-peer-dep-conflict-chain-d@2.0.0 +node_modules/@isaacs/testing-peer-dep-conflict-chain-d + @isaacs/testing-peer-dep-conflict-chain-d@"2" from the root project + +Could not resolve dependency: +peer @isaacs/testing-peer-dep-conflict-chain-d@"1" from @isaacs/testing-peer-dep-conflict-chain-c@1.0.0 +node_modules/@isaacs/testing-peer-dep-conflict-chain-c + @isaacs/testing-peer-dep-conflict-chain-c@"1" from the root project +` + +exports[`test/lib/utils/explain-eresolve.js TAP chain-conflict > explain with no color, depth of 6 1`] = ` +While resolving: project@1.2.3 +Found: @isaacs/testing-peer-dep-conflict-chain-d@2.0.0 +node_modules/@isaacs/testing-peer-dep-conflict-chain-d + @isaacs/testing-peer-dep-conflict-chain-d@"2" from the root project + +Could not resolve dependency: +peer @isaacs/testing-peer-dep-conflict-chain-d@"1" from @isaacs/testing-peer-dep-conflict-chain-c@1.0.0 +node_modules/@isaacs/testing-peer-dep-conflict-chain-c + @isaacs/testing-peer-dep-conflict-chain-c@"1" from the root project +` + +exports[`test/lib/utils/explain-eresolve.js TAP chain-conflict > report 1`] = ` +# npm resolution error report + +\${TIME} + +While resolving: project@1.2.3 +Found: @isaacs/testing-peer-dep-conflict-chain-d@2.0.0 +node_modules/@isaacs/testing-peer-dep-conflict-chain-d + @isaacs/testing-peer-dep-conflict-chain-d@"2" from the root project + +Could not resolve dependency: +peer @isaacs/testing-peer-dep-conflict-chain-d@"1" from @isaacs/testing-peer-dep-conflict-chain-c@1.0.0 +node_modules/@isaacs/testing-peer-dep-conflict-chain-c + @isaacs/testing-peer-dep-conflict-chain-c@"1" from the root project + +Fix the upstream dependency conflict, or retry +this command with --force, or --legacy-peer-deps +to accept an incorrect (and potentially broken) dependency resolution. + +Raw JSON explanation object: + +{ + "name": "chain-conflict", + "json": true +} + +` + +exports[`test/lib/utils/explain-eresolve.js TAP chain-conflict > report with color 1`] = ` +While resolving: project@1.2.3 +Found: @isaacs/testing-peer-dep-conflict-chain-d@2.0.0 +node_modules/@isaacs/testing-peer-dep-conflict-chain-d + @isaacs/testing-peer-dep-conflict-chain-d@"2" from the root project + +Could not resolve dependency: +peer @isaacs/testing-peer-dep-conflict-chain-d@"1" from @isaacs/testing-peer-dep-conflict-chain-c@1.0.0 +node_modules/@isaacs/testing-peer-dep-conflict-chain-c + @isaacs/testing-peer-dep-conflict-chain-c@"1" from the root project + +Fix the upstream dependency conflict, or retry +this command with --force, or --legacy-peer-deps +to accept an incorrect (and potentially broken) dependency resolution. + +See \${REPORT} for a full report. +` + +exports[`test/lib/utils/explain-eresolve.js TAP chain-conflict > report with color, depth only 2 1`] = ` +While resolving: project@1.2.3 +Found: @isaacs/testing-peer-dep-conflict-chain-d@2.0.0 +node_modules/@isaacs/testing-peer-dep-conflict-chain-d + @isaacs/testing-peer-dep-conflict-chain-d@"2" from the root project + +Could not resolve dependency: +peer @isaacs/testing-peer-dep-conflict-chain-d@"1" from @isaacs/testing-peer-dep-conflict-chain-c@1.0.0 +node_modules/@isaacs/testing-peer-dep-conflict-chain-c + @isaacs/testing-peer-dep-conflict-chain-c@"1" from the root project + +Fix the upstream dependency conflict, or retry +this command with --force, or --legacy-peer-deps +to accept an incorrect (and potentially broken) dependency resolution. + +See \${REPORT} for a full report. +` + +exports[`test/lib/utils/explain-eresolve.js TAP chain-conflict > report with no color, depth of 6 1`] = ` +While resolving: project@1.2.3 +Found: @isaacs/testing-peer-dep-conflict-chain-d@2.0.0 +node_modules/@isaacs/testing-peer-dep-conflict-chain-d + @isaacs/testing-peer-dep-conflict-chain-d@"2" from the root project + +Could not resolve dependency: +peer @isaacs/testing-peer-dep-conflict-chain-d@"1" from @isaacs/testing-peer-dep-conflict-chain-c@1.0.0 +node_modules/@isaacs/testing-peer-dep-conflict-chain-c + @isaacs/testing-peer-dep-conflict-chain-c@"1" from the root project + +Fix the upstream dependency conflict, or retry +this command with --force, or --legacy-peer-deps +to accept an incorrect (and potentially broken) dependency resolution. + +See \${REPORT} for a full report. +` + exports[`test/lib/utils/explain-eresolve.js TAP cycleNested > explain with color 1`] = ` -While resolving: @isaacs/peer-dep-cycle-a@1.0.0 Found: @isaacs/peer-dep-cycle-c@2.0.0 node_modules/@isaacs/peer-dep-cycle-c @isaacs/peer-dep-cycle-c@"2.x" from the root project -Could not add conflicting dependency: @isaacs/peer-dep-cycle-b@1.0.0 -node_modules/@isaacs/peer-dep-cycle-b - peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 - node_modules/@isaacs/peer-dep-cycle-a - @isaacs/peer-dep-cycle-a@"1.x" from the root project +Could not resolve dependency: +peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 +node_modules/@isaacs/peer-dep-cycle-a + @isaacs/peer-dep-cycle-a@"1.x" from the root project Conflicting peer dependency: @isaacs/peer-dep-cycle-c@1.0.0 node_modules/@isaacs/peer-dep-cycle-c @@ -26,16 +130,14 @@ Conflicting peer dependency: @isaacs/peer-dep-cycle-c@1.0.0[2 ` exports[`test/lib/utils/explain-eresolve.js TAP cycleNested > explain with no color, depth of 6 1`] = ` -While resolving: @isaacs/peer-dep-cycle-a@1.0.0 Found: @isaacs/peer-dep-cycle-c@2.0.0 node_modules/@isaacs/peer-dep-cycle-c @isaacs/peer-dep-cycle-c@"2.x" from the root project -Could not add conflicting dependency: @isaacs/peer-dep-cycle-b@1.0.0 -node_modules/@isaacs/peer-dep-cycle-b - peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 - node_modules/@isaacs/peer-dep-cycle-a - @isaacs/peer-dep-cycle-a@"1.x" from the root project +Could not resolve dependency: +peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 +node_modules/@isaacs/peer-dep-cycle-a + @isaacs/peer-dep-cycle-a@"1.x" from the root project Conflicting peer dependency: @isaacs/peer-dep-cycle-c@1.0.0 node_modules/@isaacs/peer-dep-cycle-c @@ -51,16 +153,14 @@ exports[`test/lib/utils/explain-eresolve.js TAP cycleNested > report 1`] = ` \${TIME} -While resolving: @isaacs/peer-dep-cycle-a@1.0.0 Found: @isaacs/peer-dep-cycle-c@2.0.0 node_modules/@isaacs/peer-dep-cycle-c @isaacs/peer-dep-cycle-c@"2.x" from the root project -Could not add conflicting dependency: @isaacs/peer-dep-cycle-b@1.0.0 -node_modules/@isaacs/peer-dep-cycle-b - peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 - node_modules/@isaacs/peer-dep-cycle-a - @isaacs/peer-dep-cycle-a@"1.x" from the root project +Could not resolve dependency: +peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 +node_modules/@isaacs/peer-dep-cycle-a + @isaacs/peer-dep-cycle-a@"1.x" from the root project Conflicting peer dependency: @isaacs/peer-dep-cycle-c@1.0.0 node_modules/@isaacs/peer-dep-cycle-c @@ -71,7 +171,7 @@ node_modules/@isaacs/peer-dep-cycle-c @isaacs/peer-dep-cycle-a@"1.x" from the root project Fix the upstream dependency conflict, or retry -this command with --legacy-peer-deps +this command with --no-strict-peer-deps, --force, or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution. Raw JSON explanation object: @@ -84,16 +184,14 @@ Raw JSON explanation object: ` exports[`test/lib/utils/explain-eresolve.js TAP cycleNested > report with color 1`] = ` -While resolving: @isaacs/peer-dep-cycle-a@1.0.0 Found: @isaacs/peer-dep-cycle-c@2.0.0 node_modules/@isaacs/peer-dep-cycle-c @isaacs/peer-dep-cycle-c@"2.x" from the root project -Could not add conflicting dependency: @isaacs/peer-dep-cycle-b@1.0.0 -node_modules/@isaacs/peer-dep-cycle-b - peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 - node_modules/@isaacs/peer-dep-cycle-a - @isaacs/peer-dep-cycle-a@"1.x" from the root project +Could not resolve dependency: +peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 +node_modules/@isaacs/peer-dep-cycle-a + @isaacs/peer-dep-cycle-a@"1.x" from the root project Conflicting peer dependency: @isaacs/peer-dep-cycle-c@1.0.0 node_modules/@isaacs/peer-dep-cycle-c @@ -104,23 +202,21 @@ Conflicting peer dependency: @isaacs/peer-dep-cycle-c@1.0.0[2 @isaacs/peer-dep-cycle-a@"1.x" from the root project Fix the upstream dependency conflict, or retry -this command with --legacy-peer-deps +this command with --no-strict-peer-deps, --force, or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution. See \${REPORT} for a full report. ` exports[`test/lib/utils/explain-eresolve.js TAP cycleNested > report with color, depth only 2 1`] = ` -While resolving: @isaacs/peer-dep-cycle-a@1.0.0 Found: @isaacs/peer-dep-cycle-c@2.0.0 node_modules/@isaacs/peer-dep-cycle-c @isaacs/peer-dep-cycle-c@"2.x" from the root project -Could not add conflicting dependency: @isaacs/peer-dep-cycle-b@1.0.0 -node_modules/@isaacs/peer-dep-cycle-b - peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 - node_modules/@isaacs/peer-dep-cycle-a - @isaacs/peer-dep-cycle-a@"1.x" from the root project +Could not resolve dependency: +peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 +node_modules/@isaacs/peer-dep-cycle-a + @isaacs/peer-dep-cycle-a@"1.x" from the root project Conflicting peer dependency: @isaacs/peer-dep-cycle-c@1.0.0 node_modules/@isaacs/peer-dep-cycle-c @@ -130,23 +226,21 @@ Conflicting peer dependency: @isaacs/peer-dep-cycle-c@1.0.0[2 node_modules/@isaacs/peer-dep-cycle-a Fix the upstream dependency conflict, or retry -this command with --legacy-peer-deps +this command with --no-strict-peer-deps, --force, or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution. See \${REPORT} for a full report. ` exports[`test/lib/utils/explain-eresolve.js TAP cycleNested > report with no color, depth of 6 1`] = ` -While resolving: @isaacs/peer-dep-cycle-a@1.0.0 Found: @isaacs/peer-dep-cycle-c@2.0.0 node_modules/@isaacs/peer-dep-cycle-c @isaacs/peer-dep-cycle-c@"2.x" from the root project -Could not add conflicting dependency: @isaacs/peer-dep-cycle-b@1.0.0 -node_modules/@isaacs/peer-dep-cycle-b - peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 - node_modules/@isaacs/peer-dep-cycle-a - @isaacs/peer-dep-cycle-a@"1.x" from the root project +Could not resolve dependency: +peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 +node_modules/@isaacs/peer-dep-cycle-a + @isaacs/peer-dep-cycle-a@"1.x" from the root project Conflicting peer dependency: @isaacs/peer-dep-cycle-c@1.0.0 node_modules/@isaacs/peer-dep-cycle-c @@ -157,86 +251,50 @@ node_modules/@isaacs/peer-dep-cycle-c @isaacs/peer-dep-cycle-a@"1.x" from the root project Fix the upstream dependency conflict, or retry -this command with --legacy-peer-deps +this command with --no-strict-peer-deps, --force, or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution. See \${REPORT} for a full report. ` exports[`test/lib/utils/explain-eresolve.js TAP gatsby > explain with color 1`] = ` -While resolving: gatsby-interface@0.0.166 -Found: react@16.13.1 -node_modules/react - peer react@"^16.4.2" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - 26 more (react-dom, @reach/router, gatsby-cli, gatsby-link, ...) - -Could not add conflicting dependency: react@16.8.1 -node_modules/react - peer react@"16.8.1" from gatsby-interface@0.0.166 - node_modules/gatsby-recipes/node_modules/gatsby-interface - gatsby-interface@"^0.0.166" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes +While resolving: gatsby-recipes@0.2.31 +Found: ink@3.0.0-7 +node_modules/ink + dev ink@"next" from gatsby-recipes@0.2.31 + node_modules/gatsby-recipes + gatsby-recipes@"^0.2.31" from gatsby-cli@2.12.107 + node_modules/gatsby-cli + +Could not resolve dependency: +peer ink@">=2.0.0" from ink-box@1.0.0 +node_modules/ink-box + ink-box@"^1.0.0" from gatsby-recipes@0.2.31 + node_modules/gatsby-recipes ` exports[`test/lib/utils/explain-eresolve.js TAP gatsby > explain with no color, depth of 6 1`] = ` -While resolving: gatsby-interface@0.0.166 -Found: react@16.13.1 -node_modules/react - peer react@"^16.4.2" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@"^16.13.1" from react-dom@16.13.1 - node_modules/react-dom - peer react-dom@"^16.4.2" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react-dom@"15.x || 16.x || 16.4.0-alpha.0911da3" from @reach/router@1.3.4 - node_modules/@reach/router - @reach/router@"^1.3.4" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer @reach/router@"^1.3.3" from gatsby-link@2.4.13 - node_modules/gatsby-link - gatsby-link@"^2.4.13" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - 1 more (gatsby-react-router-scroll) - peer react-dom@"^16.4.2" from gatsby-link@2.4.13 - node_modules/gatsby-link - gatsby-link@"^2.4.13" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - 2 more (gatsby-react-router-scroll, react-hot-loader) - peer react@"15.x || 16.x || 16.4.0-alpha.0911da3" from @reach/router@1.3.4 - node_modules/@reach/router - @reach/router@"^1.3.4" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer @reach/router@"^1.3.3" from gatsby-link@2.4.13 - node_modules/gatsby-link - gatsby-link@"^2.4.13" from gatsby@2.24.53 +While resolving: gatsby-recipes@0.2.31 +Found: ink@3.0.0-7 +node_modules/ink + dev ink@"next" from gatsby-recipes@0.2.31 + node_modules/gatsby-recipes + gatsby-recipes@"^0.2.31" from gatsby-cli@2.12.107 + node_modules/gatsby-cli + gatsby-cli@"^2.12.107" from gatsby@2.24.74 node_modules/gatsby gatsby@"" from the root project - peer @reach/router@"^1.0.0" from gatsby-react-router-scroll@3.0.12 - node_modules/gatsby-react-router-scroll - gatsby-react-router-scroll@"^3.0.12" from gatsby@2.24.53 + +Could not resolve dependency: +peer ink@">=2.0.0" from ink-box@1.0.0 +node_modules/ink-box + ink-box@"^1.0.0" from gatsby-recipes@0.2.31 + node_modules/gatsby-recipes + gatsby-recipes@"^0.2.31" from gatsby-cli@2.12.107 + node_modules/gatsby-cli + gatsby-cli@"^2.12.107" from gatsby@2.24.74 node_modules/gatsby gatsby@"" from the root project - 24 more (gatsby-cli, gatsby-link, gatsby-react-router-scroll, ...) - -Could not add conflicting dependency: react@16.8.1 -node_modules/react - peer react@"16.8.1" from gatsby-interface@0.0.166 - node_modules/gatsby-recipes/node_modules/gatsby-interface - gatsby-interface@"^0.0.166" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project ` exports[`test/lib/utils/explain-eresolve.js TAP gatsby > report 1`] = ` @@ -244,439 +302,30 @@ exports[`test/lib/utils/explain-eresolve.js TAP gatsby > report 1`] = ` \${TIME} -While resolving: gatsby-interface@0.0.166 -Found: react@16.13.1 -node_modules/react - peer react@"^16.4.2" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@"^16.13.1" from react-dom@16.13.1 - node_modules/react-dom - peer react-dom@"^16.4.2" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react-dom@"15.x || 16.x || 16.4.0-alpha.0911da3" from @reach/router@1.3.4 - node_modules/@reach/router - @reach/router@"^1.3.4" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer @reach/router@"^1.3.3" from gatsby-link@2.4.13 - node_modules/gatsby-link - gatsby-link@"^2.4.13" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer @reach/router@"^1.0.0" from gatsby-react-router-scroll@3.0.12 - node_modules/gatsby-react-router-scroll - gatsby-react-router-scroll@"^3.0.12" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react-dom@"^16.4.2" from gatsby-link@2.4.13 - node_modules/gatsby-link - gatsby-link@"^2.4.13" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react-dom@"^16.4.2" from gatsby-react-router-scroll@3.0.12 - node_modules/gatsby-react-router-scroll - gatsby-react-router-scroll@"^3.0.12" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react-dom@"^15.0.0 || ^16.0.0" from react-hot-loader@4.12.21 - node_modules/react-hot-loader - react-hot-loader@"^4.12.21" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@"15.x || 16.x || 16.4.0-alpha.0911da3" from @reach/router@1.3.4 - node_modules/@reach/router - @reach/router@"^1.3.4" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer @reach/router@"^1.3.3" from gatsby-link@2.4.13 - node_modules/gatsby-link - gatsby-link@"^2.4.13" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer @reach/router@"^1.0.0" from gatsby-react-router-scroll@3.0.12 - node_modules/gatsby-react-router-scroll - gatsby-react-router-scroll@"^3.0.12" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - react@"^16.8.0" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@"^16.4.2" from gatsby-link@2.4.13 - node_modules/gatsby-link - gatsby-link@"^2.4.13" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@"^16.4.2" from gatsby-react-router-scroll@3.0.12 - node_modules/gatsby-react-router-scroll - gatsby-react-router-scroll@"^3.0.12" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@"^15.0.0 || ^16.0.0" from react-hot-loader@4.12.21 - node_modules/react-hot-loader - react-hot-loader@"^4.12.21" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@"^0.14.0 || ^15.0.0 || ^16.0.0" from create-react-context@0.3.0 - node_modules/create-react-context - create-react-context@"0.3.0" from @reach/router@1.3.4 - node_modules/@reach/router - @reach/router@"^1.3.4" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer @reach/router@"^1.3.3" from gatsby-link@2.4.13 - node_modules/gatsby-link - gatsby-link@"^2.4.13" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer @reach/router@"^1.0.0" from gatsby-react-router-scroll@3.0.12 - node_modules/gatsby-react-router-scroll - gatsby-react-router-scroll@"^3.0.12" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@"^16.12.0" from gatsby-recipes@0.2.20 +While resolving: gatsby-recipes@0.2.31 +Found: ink@3.0.0-7 +node_modules/ink + dev ink@"next" from gatsby-recipes@0.2.31 node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 + gatsby-recipes@"^0.2.31" from gatsby-cli@2.12.107 node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 + gatsby-cli@"^2.12.107" from gatsby@2.24.74 node_modules/gatsby gatsby@"" from the root project - peer react@">=16.8.0" from ink@2.7.1 - node_modules/ink - ink@"^2.7.1" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer ink@"^2.0.0" from ink-spinner@3.1.0 - node_modules/ink-spinner - ink-spinner@"^3.1.0" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer ink@">=2.0.0" from ink-box@1.0.0 - node_modules/ink-box - ink-box@"^1.0.0" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@"^16.8.2" from ink-spinner@3.1.0 - node_modules/ink-spinner - ink-spinner@"^3.1.0" from gatsby-cli@2.12.91 + +Could not resolve dependency: +peer ink@">=2.0.0" from ink-box@1.0.0 +node_modules/ink-box + ink-box@"^1.0.0" from gatsby-recipes@0.2.31 + node_modules/gatsby-recipes + gatsby-recipes@"^0.2.31" from gatsby-cli@2.12.107 node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 + gatsby-cli@"^2.12.107" from gatsby@2.24.74 node_modules/gatsby gatsby@"" from the root project - peer react@">=16.3.0" from @emotion/core@10.0.35 - node_modules/@emotion/core - @emotion/core@"^10.0.14" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer @emotion/core@"^10.0.27" from @emotion/styled@10.0.27 - node_modules/@emotion/styled - @emotion/styled@"^10.0.14" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer @emotion/styled@"^10.0.14" from gatsby-interface@0.0.166 - node_modules/gatsby-recipes/node_modules/gatsby-interface - gatsby-interface@"^0.0.166" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer @emotion/core@"^10.0.14" from gatsby-interface@0.0.166 - node_modules/gatsby-recipes/node_modules/gatsby-interface - gatsby-interface@"^0.0.166" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer @emotion/core@"^10.0.28" from @emotion/styled-base@10.0.31 - node_modules/@emotion/styled-base - @emotion/styled-base@"^10.0.27" from @emotion/styled@10.0.27 - node_modules/@emotion/styled - @emotion/styled@"^10.0.14" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer @emotion/styled@"^10.0.14" from gatsby-interface@0.0.166 - node_modules/gatsby-recipes/node_modules/gatsby-interface - gatsby-interface@"^0.0.166" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@">=16.3.0" from @emotion/styled@10.0.27 - node_modules/@emotion/styled - @emotion/styled@"^10.0.14" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer @emotion/styled@"^10.0.14" from gatsby-interface@0.0.166 - node_modules/gatsby-recipes/node_modules/gatsby-interface - gatsby-interface@"^0.0.166" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@"^16.13.1" from @mdx-js/react@2.0.0-next.7 - node_modules/@mdx-js/react - @mdx-js/react@"^2.0.0-next.4" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - @mdx-js/react@"^2.0.0-next.7" from @mdx-js/runtime@2.0.0-next.7 - node_modules/@mdx-js/runtime - @mdx-js/runtime@"^2.0.0-next.4" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@"^16.13.1" from @mdx-js/runtime@2.0.0-next.7 - node_modules/@mdx-js/runtime - @mdx-js/runtime@"^2.0.0-next.4" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@">=16.8.0" from formik@2.1.5 - node_modules/formik - formik@"^2.0.8" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer formik@"^2.0.8" from gatsby-interface@0.0.166 - node_modules/gatsby-recipes/node_modules/gatsby-interface - gatsby-interface@"^0.0.166" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@"^16.4.2" from gatsby@2.6.0 - node_modules/gatsby-recipes/node_modules/gatsby - peer gatsby@"2.6.0" from gatsby-interface@0.0.166 - node_modules/gatsby-recipes/node_modules/gatsby-interface - gatsby-interface@"^0.0.166" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@"^16.0.0" from react-dom@16.8.1 - node_modules/gatsby-recipes/node_modules/react-dom - peer react-dom@"16.8.1" from gatsby-interface@0.0.166 - node_modules/gatsby-recipes/node_modules/gatsby-interface - gatsby-interface@"^0.0.166" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react-dom@"^16.4.2" from gatsby@2.6.0 - node_modules/gatsby-recipes/node_modules/gatsby - peer gatsby@"2.6.0" from gatsby-interface@0.0.166 - node_modules/gatsby-recipes/node_modules/gatsby-interface - gatsby-interface@"^0.0.166" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react-dom@"^0.14.0 || ^15.0.0 || ^16.0.0" from gatsby-react-router-scroll@2.3.1 - node_modules/gatsby-recipes/node_modules/gatsby-react-router-scroll - gatsby-react-router-scroll@"^2.0.7" from gatsby@2.6.0 - node_modules/gatsby-recipes/node_modules/gatsby - peer gatsby@"2.6.0" from gatsby-interface@0.0.166 - node_modules/gatsby-recipes/node_modules/gatsby-interface - gatsby-interface@"^0.0.166" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@"*" from react-icons@3.11.0 - node_modules/react-icons - react-icons@"^3.0.1" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react-icons@"^3.2.1" from gatsby-interface@0.0.166 - node_modules/gatsby-recipes/node_modules/gatsby-interface - gatsby-interface@"^0.0.166" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@">=16.8.0" from ink-box@1.0.0 - node_modules/ink-box - ink-box@"^1.0.0" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@"^0.14.0 || ^15.0.0 || ^16.0.0" from react-circular-progressbar@2.0.3 - node_modules/react-circular-progressbar - react-circular-progressbar@"^2.0.0" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@"^16.13.1" from react-reconciler@0.25.1 - node_modules/react-reconciler - react-reconciler@"^0.25.1" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@">= 16.8.0" from urql@1.10.0 - node_modules/urql - urql@"^1.9.7" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@">=16.3.0" from @emotion/styled-base@10.0.31 - node_modules/@emotion/styled-base - @emotion/styled-base@"^10.0.27" from @emotion/styled@10.0.27 - node_modules/@emotion/styled - @emotion/styled@"^10.0.14" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer @emotion/styled@"^10.0.14" from gatsby-interface@0.0.166 - node_modules/gatsby-recipes/node_modules/gatsby-interface - gatsby-interface@"^0.0.166" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@"^16.0.0" from react-reconciler@0.24.0 - node_modules/ink/node_modules/react-reconciler - react-reconciler@"^0.24.0" from ink@2.7.1 - node_modules/ink - ink@"^2.7.1" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer ink@"^2.0.0" from ink-spinner@3.1.0 - node_modules/ink-spinner - ink-spinner@"^3.1.0" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer ink@">=2.0.0" from ink-box@1.0.0 - node_modules/ink-box - ink-box@"^1.0.0" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@"^0.14.0 || ^15.0.0 || ^16.0.0" from gatsby-react-router-scroll@2.3.1 - node_modules/gatsby-recipes/node_modules/gatsby-react-router-scroll - gatsby-react-router-scroll@"^2.0.7" from gatsby@2.6.0 - node_modules/gatsby-recipes/node_modules/gatsby - peer gatsby@"2.6.0" from gatsby-interface@0.0.166 - node_modules/gatsby-recipes/node_modules/gatsby-interface - gatsby-interface@"^0.0.166" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@"^16.13.1" from @mdx-js/react@1.6.16 - node_modules/gatsby-recipes/node_modules/gatsby-interface/node_modules/@mdx-js/react - @mdx-js/react@"^1.5.2" from gatsby-interface@0.0.166 - node_modules/gatsby-recipes/node_modules/gatsby-interface - gatsby-interface@"^0.0.166" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - -Could not add conflicting dependency: react@16.8.1 -node_modules/react - peer react@"16.8.1" from gatsby-interface@0.0.166 - node_modules/gatsby-recipes/node_modules/gatsby-interface - gatsby-interface@"^0.0.166" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project Fix the upstream dependency conflict, or retry -this command with --legacy-peer-deps or --force +this command with --no-strict-peer-deps, --force, or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution. Raw JSON explanation object: @@ -689,127 +338,81 @@ Raw JSON explanation object: ` exports[`test/lib/utils/explain-eresolve.js TAP gatsby > report with color 1`] = ` -While resolving: gatsby-interface@0.0.166 -Found: react@16.13.1 -node_modules/react - peer react@"^16.4.2" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@"^16.13.1" from react-dom@16.13.1 - node_modules/react-dom - peer react-dom@"^16.4.2" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react-dom@"15.x || 16.x || 16.4.0-alpha.0911da3" from @reach/router@1.3.4 - node_modules/@reach/router - @reach/router@"^1.3.4" from gatsby@2.24.53 +While resolving: gatsby-recipes@0.2.31 +Found: ink@3.0.0-7 +node_modules/ink + dev ink@"next" from gatsby-recipes@0.2.31 + node_modules/gatsby-recipes + gatsby-recipes@"^0.2.31" from gatsby-cli@2.12.107 + node_modules/gatsby-cli + gatsby-cli@"^2.12.107" from gatsby@2.24.74 node_modules/gatsby gatsby@"" from the root project - 2 more (gatsby-link, gatsby-react-router-scroll) - 3 more (gatsby-link, gatsby-react-router-scroll, react-hot-loader) - 25 more (@reach/router, gatsby-cli, gatsby-link, ...) - -Could not add conflicting dependency: react@16.8.1 -node_modules/react - peer react@"16.8.1" from gatsby-interface@0.0.166 - node_modules/gatsby-recipes/node_modules/gatsby-interface - gatsby-interface@"^0.0.166" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby + +Could not resolve dependency: +peer ink@">=2.0.0" from ink-box@1.0.0 +node_modules/ink-box + ink-box@"^1.0.0" from gatsby-recipes@0.2.31 + node_modules/gatsby-recipes + gatsby-recipes@"^0.2.31" from gatsby-cli@2.12.107 + node_modules/gatsby-cli + gatsby-cli@"^2.12.107" from gatsby@2.24.74 + node_modules/gatsby Fix the upstream dependency conflict, or retry -this command with --legacy-peer-deps or --force +this command with --no-strict-peer-deps, --force, or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution. See \${REPORT} for a full report. ` exports[`test/lib/utils/explain-eresolve.js TAP gatsby > report with color, depth only 2 1`] = ` -While resolving: gatsby-interface@0.0.166 -Found: react@16.13.1 -node_modules/react - peer react@"^16.4.2" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - 26 more (react-dom, @reach/router, gatsby-cli, gatsby-link, ...) - -Could not add conflicting dependency: react@16.8.1 -node_modules/react - peer react@"16.8.1" from gatsby-interface@0.0.166 - node_modules/gatsby-recipes/node_modules/gatsby-interface - gatsby-interface@"^0.0.166" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes +While resolving: gatsby-recipes@0.2.31 +Found: ink@3.0.0-7 +node_modules/ink + dev ink@"next" from gatsby-recipes@0.2.31 + node_modules/gatsby-recipes + gatsby-recipes@"^0.2.31" from gatsby-cli@2.12.107 + node_modules/gatsby-cli + +Could not resolve dependency: +peer ink@">=2.0.0" from ink-box@1.0.0 +node_modules/ink-box + ink-box@"^1.0.0" from gatsby-recipes@0.2.31 + node_modules/gatsby-recipes Fix the upstream dependency conflict, or retry -this command with --legacy-peer-deps or --force +this command with --no-strict-peer-deps, --force, or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution. See \${REPORT} for a full report. ` exports[`test/lib/utils/explain-eresolve.js TAP gatsby > report with no color, depth of 6 1`] = ` -While resolving: gatsby-interface@0.0.166 -Found: react@16.13.1 -node_modules/react - peer react@"^16.4.2" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react@"^16.13.1" from react-dom@16.13.1 - node_modules/react-dom - peer react-dom@"^16.4.2" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer react-dom@"15.x || 16.x || 16.4.0-alpha.0911da3" from @reach/router@1.3.4 - node_modules/@reach/router - @reach/router@"^1.3.4" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer @reach/router@"^1.3.3" from gatsby-link@2.4.13 - node_modules/gatsby-link - gatsby-link@"^2.4.13" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - 1 more (gatsby-react-router-scroll) - peer react-dom@"^16.4.2" from gatsby-link@2.4.13 - node_modules/gatsby-link - gatsby-link@"^2.4.13" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - 2 more (gatsby-react-router-scroll, react-hot-loader) - peer react@"15.x || 16.x || 16.4.0-alpha.0911da3" from @reach/router@1.3.4 - node_modules/@reach/router - @reach/router@"^1.3.4" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project - peer @reach/router@"^1.3.3" from gatsby-link@2.4.13 - node_modules/gatsby-link - gatsby-link@"^2.4.13" from gatsby@2.24.53 +While resolving: gatsby-recipes@0.2.31 +Found: ink@3.0.0-7 +node_modules/ink + dev ink@"next" from gatsby-recipes@0.2.31 + node_modules/gatsby-recipes + gatsby-recipes@"^0.2.31" from gatsby-cli@2.12.107 + node_modules/gatsby-cli + gatsby-cli@"^2.12.107" from gatsby@2.24.74 node_modules/gatsby gatsby@"" from the root project - peer @reach/router@"^1.0.0" from gatsby-react-router-scroll@3.0.12 - node_modules/gatsby-react-router-scroll - gatsby-react-router-scroll@"^3.0.12" from gatsby@2.24.53 + +Could not resolve dependency: +peer ink@">=2.0.0" from ink-box@1.0.0 +node_modules/ink-box + ink-box@"^1.0.0" from gatsby-recipes@0.2.31 + node_modules/gatsby-recipes + gatsby-recipes@"^0.2.31" from gatsby-cli@2.12.107 + node_modules/gatsby-cli + gatsby-cli@"^2.12.107" from gatsby@2.24.74 node_modules/gatsby gatsby@"" from the root project - 24 more (gatsby-cli, gatsby-link, gatsby-react-router-scroll, ...) - -Could not add conflicting dependency: react@16.8.1 -node_modules/react - peer react@"16.8.1" from gatsby-interface@0.0.166 - node_modules/gatsby-recipes/node_modules/gatsby-interface - gatsby-interface@"^0.0.166" from gatsby-recipes@0.2.20 - node_modules/gatsby-recipes - gatsby-recipes@"^0.2.20" from gatsby-cli@2.12.91 - node_modules/gatsby-cli - gatsby-cli@"^2.12.91" from gatsby@2.24.53 - node_modules/gatsby - gatsby@"" from the root project Fix the upstream dependency conflict, or retry -this command with --legacy-peer-deps or --force +this command with --no-strict-peer-deps, --force, or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution. See \${REPORT} for a full report. @@ -821,12 +424,11 @@ Found: @isaacs/peer-dep-cycle-c@2.0.0 node_modules/@isaacs/peer-dep-cycle-c @isaacs/peer-dep-cycle-c@"2.x" from the root project -Could not add conflicting dependency: @isaacs/peer-dep-cycle-c@1.0.0 -node_modules/@isaacs/peer-dep-cycle-c - peer @isaacs/peer-dep-cycle-c@"1" from @isaacs/peer-dep-cycle-b@1.0.0 - node_modules/@isaacs/peer-dep-cycle-b - peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 - node_modules/@isaacs/peer-dep-cycle-a +Could not resolve dependency: +peer @isaacs/peer-dep-cycle-c@"1" from @isaacs/peer-dep-cycle-b@1.0.0 +node_modules/@isaacs/peer-dep-cycle-b + peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 + node_modules/@isaacs/peer-dep-cycle-a ` exports[`test/lib/utils/explain-eresolve.js TAP withShrinkwrap > explain with no color, depth of 6 1`] = ` @@ -835,13 +437,12 @@ Found: @isaacs/peer-dep-cycle-c@2.0.0 node_modules/@isaacs/peer-dep-cycle-c @isaacs/peer-dep-cycle-c@"2.x" from the root project -Could not add conflicting dependency: @isaacs/peer-dep-cycle-c@1.0.0 -node_modules/@isaacs/peer-dep-cycle-c - peer @isaacs/peer-dep-cycle-c@"1" from @isaacs/peer-dep-cycle-b@1.0.0 - node_modules/@isaacs/peer-dep-cycle-b - peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 - node_modules/@isaacs/peer-dep-cycle-a - @isaacs/peer-dep-cycle-a@"1.x" from the root project +Could not resolve dependency: +peer @isaacs/peer-dep-cycle-c@"1" from @isaacs/peer-dep-cycle-b@1.0.0 +node_modules/@isaacs/peer-dep-cycle-b + peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 + node_modules/@isaacs/peer-dep-cycle-a + @isaacs/peer-dep-cycle-a@"1.x" from the root project ` exports[`test/lib/utils/explain-eresolve.js TAP withShrinkwrap > report 1`] = ` @@ -854,16 +455,15 @@ Found: @isaacs/peer-dep-cycle-c@2.0.0 node_modules/@isaacs/peer-dep-cycle-c @isaacs/peer-dep-cycle-c@"2.x" from the root project -Could not add conflicting dependency: @isaacs/peer-dep-cycle-c@1.0.0 -node_modules/@isaacs/peer-dep-cycle-c - peer @isaacs/peer-dep-cycle-c@"1" from @isaacs/peer-dep-cycle-b@1.0.0 - node_modules/@isaacs/peer-dep-cycle-b - peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 - node_modules/@isaacs/peer-dep-cycle-a - @isaacs/peer-dep-cycle-a@"1.x" from the root project +Could not resolve dependency: +peer @isaacs/peer-dep-cycle-c@"1" from @isaacs/peer-dep-cycle-b@1.0.0 +node_modules/@isaacs/peer-dep-cycle-b + peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 + node_modules/@isaacs/peer-dep-cycle-a + @isaacs/peer-dep-cycle-a@"1.x" from the root project Fix the upstream dependency conflict, or retry -this command with --legacy-peer-deps or --force +this command with --no-strict-peer-deps, --force, or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution. Raw JSON explanation object: @@ -881,16 +481,15 @@ Found: @isaacs/peer-dep-cycle-c@2.0.0 node_modules/@isaacs/peer-dep-cycle-c @isaacs/peer-dep-cycle-c@"2.x" from the root project -Could not add conflicting dependency: @isaacs/peer-dep-cycle-c@1.0.0 -node_modules/@isaacs/peer-dep-cycle-c - peer @isaacs/peer-dep-cycle-c@"1" from @isaacs/peer-dep-cycle-b@1.0.0 - node_modules/@isaacs/peer-dep-cycle-b - peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 - node_modules/@isaacs/peer-dep-cycle-a - @isaacs/peer-dep-cycle-a@"1.x" from the root project +Could not resolve dependency: +peer @isaacs/peer-dep-cycle-c@"1" from @isaacs/peer-dep-cycle-b@1.0.0 +node_modules/@isaacs/peer-dep-cycle-b + peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 + node_modules/@isaacs/peer-dep-cycle-a + @isaacs/peer-dep-cycle-a@"1.x" from the root project Fix the upstream dependency conflict, or retry -this command with --legacy-peer-deps or --force +this command with --no-strict-peer-deps, --force, or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution. See \${REPORT} for a full report. @@ -902,15 +501,14 @@ Found: @isaacs/peer-dep-cycle-c@2.0.0 node_modules/@isaacs/peer-dep-cycle-c @isaacs/peer-dep-cycle-c@"2.x" from the root project -Could not add conflicting dependency: @isaacs/peer-dep-cycle-c@1.0.0 -node_modules/@isaacs/peer-dep-cycle-c - peer @isaacs/peer-dep-cycle-c@"1" from @isaacs/peer-dep-cycle-b@1.0.0 - node_modules/@isaacs/peer-dep-cycle-b - peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 - node_modules/@isaacs/peer-dep-cycle-a +Could not resolve dependency: +peer @isaacs/peer-dep-cycle-c@"1" from @isaacs/peer-dep-cycle-b@1.0.0 +node_modules/@isaacs/peer-dep-cycle-b + peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 + node_modules/@isaacs/peer-dep-cycle-a Fix the upstream dependency conflict, or retry -this command with --legacy-peer-deps or --force +this command with --no-strict-peer-deps, --force, or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution. See \${REPORT} for a full report. @@ -922,16 +520,15 @@ Found: @isaacs/peer-dep-cycle-c@2.0.0 node_modules/@isaacs/peer-dep-cycle-c @isaacs/peer-dep-cycle-c@"2.x" from the root project -Could not add conflicting dependency: @isaacs/peer-dep-cycle-c@1.0.0 -node_modules/@isaacs/peer-dep-cycle-c - peer @isaacs/peer-dep-cycle-c@"1" from @isaacs/peer-dep-cycle-b@1.0.0 - node_modules/@isaacs/peer-dep-cycle-b - peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 - node_modules/@isaacs/peer-dep-cycle-a - @isaacs/peer-dep-cycle-a@"1.x" from the root project +Could not resolve dependency: +peer @isaacs/peer-dep-cycle-c@"1" from @isaacs/peer-dep-cycle-b@1.0.0 +node_modules/@isaacs/peer-dep-cycle-b + peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 + node_modules/@isaacs/peer-dep-cycle-a + @isaacs/peer-dep-cycle-a@"1.x" from the root project Fix the upstream dependency conflict, or retry -this command with --legacy-peer-deps or --force +this command with --no-strict-peer-deps, --force, or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution. See \${REPORT} for a full report. diff --git a/deps/npm/test/fixtures/eresolve-explanations.js b/deps/npm/test/fixtures/eresolve-explanations.js index 3b1cd41a25ebe3..b59671d200f216 100644 --- a/deps/npm/test/fixtures/eresolve-explanations.js +++ b/deps/npm/test/fixtures/eresolve-explanations.js @@ -3,29 +3,23 @@ module.exports = { cycleNested: { code: 'ERESOLVE', - dep: { + edge: { + type: 'peer', name: '@isaacs/peer-dep-cycle-b', - version: '1.0.0', - whileInstalling: { name: '@isaacs/peer-dep-cycle-a', version: '1.0.0' }, - location: 'node_modules/@isaacs/peer-dep-cycle-b', - dependents: [ - { - type: 'peer', - spec: '1', - from: { + spec: '1', + from: { + name: '@isaacs/peer-dep-cycle-a', + version: '1.0.0', + location: 'node_modules/@isaacs/peer-dep-cycle-a', + dependents: [ + { + type: 'prod', name: '@isaacs/peer-dep-cycle-a', - version: '1.0.0', - location: 'node_modules/@isaacs/peer-dep-cycle-a', - dependents: [ - { - type: 'prod', - spec: '1.x', - from: { location: '/some/project' } - } - ] + spec: '1.x', + from: { location: '/some/project' } } - } - ] + ] + } }, current: { name: '@isaacs/peer-dep-cycle-c', @@ -34,6 +28,7 @@ module.exports = { dependents: [ { type: 'prod', + name: '@isaacs/peer-dep-cycle-c', spec: '2.x', from: { location: '/some/project' } } @@ -47,6 +42,7 @@ module.exports = { dependents: [ { type: 'peer', + name: '@isaacs/peer-dep-cycle-c', spec: '1', from: { name: '@isaacs/peer-dep-cycle-b', @@ -56,6 +52,7 @@ module.exports = { dependents: [ { type: 'peer', + name: '@isaacs/peer-dep-cycle-b', spec: '1', from: { name: '@isaacs/peer-dep-cycle-a', @@ -64,6 +61,7 @@ module.exports = { dependents: [ { type: 'prod', + name: '@isaacs/peer-dep-cycle-a', spec: '1.x', from: { location: '/some/project' } } @@ -75,48 +73,42 @@ module.exports = { } ] }, - fixWithForce: false, - type: 'peer', - isPeer: true + strictPeerDeps: true, }, withShrinkwrap: { code: 'ERESOLVE', - dep: { + edge: { + type: 'peer', name: '@isaacs/peer-dep-cycle-c', - version: '1.0.0', - whileInstalling: { name: '@isaacs/peer-dep-cycle-b', version: '1.0.0' }, - location: 'node_modules/@isaacs/peer-dep-cycle-c', - dependents: [ - { - type: 'peer', - spec: '1', - error: 'INVALID', - from: { + spec: '1', + error: 'INVALID', + from: { + name: '@isaacs/peer-dep-cycle-b', + version: '1.0.0', + location: 'node_modules/@isaacs/peer-dep-cycle-b', + whileInstalling: { name: '@isaacs/peer-dep-cycle-b', version: '1.0.0' }, + dependents: [ + { + type: 'peer', name: '@isaacs/peer-dep-cycle-b', - version: '1.0.0', - location: 'node_modules/@isaacs/peer-dep-cycle-b', - dependents: [ - { - type: 'peer', - spec: '1', - from: { + spec: '1', + from: { + name: '@isaacs/peer-dep-cycle-a', + version: '1.0.0', + location: 'node_modules/@isaacs/peer-dep-cycle-a', + dependents: [ + { + type: 'prod', name: '@isaacs/peer-dep-cycle-a', - version: '1.0.0', - location: 'node_modules/@isaacs/peer-dep-cycle-a', - dependents: [ - { - type: 'prod', - spec: '1.x', - from: { location: '/some/project' } - } - ] + spec: '1.x', + from: { location: '/some/project' } } - } - ] + ] + } } - } - ] + ] + } }, current: { name: '@isaacs/peer-dep-cycle-c', @@ -125,295 +117,108 @@ module.exports = { dependents: [ { type: 'prod', + name: '@isaacs/peer-dep-cycle-c', spec: '2.x', from: { location: '/some/project' } } ] }, - fixWithForce: true, - type: 'peer' + strictPeerDeps: true, }, - gatsby: { + 'chain-conflict': { code: 'ERESOLVE', - dep: { - name: 'react', - version: '16.8.1', + current: { + name: '@isaacs/testing-peer-dep-conflict-chain-d', + version: '2.0.0', whileInstalling: { - name: 'gatsby-interface', - version: '0.0.166' + name: 'project', + version: '1.2.3', + path: '/some/project' }, - location: 'node_modules/react', + location: 'node_modules/@isaacs/testing-peer-dep-conflict-chain-d', dependents: [ { - type: 'peer', - spec: '16.8.1', - error: 'INVALID', - from: { - name: 'gatsby-interface', - version: '0.0.166', - location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', - dependents: [ - { - type: 'prod', - spec: '^0.0.166', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } + type: 'prod', + name: '@isaacs/testing-peer-dep-conflict-chain-d', + spec: '2', + from: { location: '/some/project' } } ] }, + edge: { + type: 'peer', + name: '@isaacs/testing-peer-dep-conflict-chain-d', + spec: '1', + error: 'INVALID', + from: { + name: '@isaacs/testing-peer-dep-conflict-chain-c', + version: '1.0.0', + whileInstalling: { + name: 'project', + version: '1.2.3', + path: '/some/project' + }, + location: 'node_modules/@isaacs/testing-peer-dep-conflict-chain-c', + dependents: [ + { + type: 'prod', + name: '@isaacs/testing-peer-dep-conflict-chain-c', + spec: '1', + from: { location: '/some/project' } + } + ] + } + }, + peerConflict: null, + strictPeerDeps: false + }, + + gatsby: { + code: 'ERESOLVE', current: { - name: 'react', - version: '16.13.1', - location: 'node_modules/react', + name: 'ink', + version: '3.0.0-7', + whileInstalling: { + name: 'gatsby-recipes', + version: '0.2.31', + path: '/some/project/node_modules/gatsby-recipes' + }, + location: 'node_modules/ink', dependents: [ { - type: 'peer', - spec: '^16.4.2', + type: 'dev', + name: 'ink', + spec: 'next', from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', + name: 'gatsby-recipes', + version: '0.2.31', + location: 'node_modules/gatsby-recipes', dependents: [ { type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - }, - { - type: 'peer', - spec: '^16.13.1', - from: { - name: 'react-dom', - version: '16.13.1', - location: 'node_modules/react-dom', - dependents: [ - { - type: 'peer', - spec: '^16.4.2', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - }, - { - type: 'peer', - spec: '15.x || 16.x || 16.4.0-alpha.0911da3', - from: { - name: '@reach/router', - version: '1.3.4', - location: 'node_modules/@reach/router', - dependents: [ - { - type: 'prod', - spec: '^1.3.4', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - }, - { - type: 'peer', - spec: '^1.3.3', - from: { - name: 'gatsby-link', - version: '2.4.13', - location: 'node_modules/gatsby-link', - dependents: [ - { - type: 'prod', - spec: '^2.4.13', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^1.0.0', - from: { - name: 'gatsby-react-router-scroll', - version: '3.0.12', - location: 'node_modules/gatsby-react-router-scroll', - dependents: [ - { - type: 'prod', - spec: '^3.0.12', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^16.4.2', - from: { - name: 'gatsby-link', - version: '2.4.13', - location: 'node_modules/gatsby-link', - dependents: [ - { - type: 'prod', - spec: '^2.4.13', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^16.4.2', - from: { - name: 'gatsby-react-router-scroll', - version: '3.0.12', - location: 'node_modules/gatsby-react-router-scroll', - dependents: [ - { - type: 'prod', - spec: '^3.0.12', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^15.0.0 || ^16.0.0', + name: 'gatsby-recipes', + spec: '^0.2.31', from: { - name: 'react-hot-loader', - version: '4.12.21', - location: 'node_modules/react-hot-loader', + name: 'gatsby-cli', + version: '2.12.107', + location: 'node_modules/gatsby-cli', dependents: [ { type: 'prod', - spec: '^4.12.21', + name: 'gatsby-cli', + spec: '^2.12.107', from: { name: 'gatsby', - version: '2.24.53', + version: '2.24.74', location: 'node_modules/gatsby', dependents: [ { type: 'prod', + name: 'gatsby', spec: '', from: { - location: '/path/to/gatsby-user' + location: '/some/project/gatsby-user' } } ] @@ -424,2153 +229,73 @@ module.exports = { } ] } + } + ] + }, + edge: { + type: 'peer', + name: 'ink', + spec: '>=2.0.0', + error: 'INVALID', + from: { + name: 'ink-box', + version: '1.0.0', + whileInstalling: { + name: 'gatsby-recipes', + version: '0.2.31', + path: '/some/project/gatsby-user/node_modules/gatsby-recipes' }, - { - type: 'peer', - spec: '15.x || 16.x || 16.4.0-alpha.0911da3', - from: { - name: '@reach/router', - version: '1.3.4', - location: 'node_modules/@reach/router', - dependents: [ - { - type: 'prod', - spec: '^1.3.4', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - }, - { - type: 'peer', - spec: '^1.3.3', - from: { - name: 'gatsby-link', - version: '2.4.13', - location: 'node_modules/gatsby-link', - dependents: [ - { - type: 'prod', - spec: '^2.4.13', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' + location: 'node_modules/ink-box', + dependents: [ + { + type: 'prod', + name: 'ink-box', + spec: '^1.0.0', + from: { + name: 'gatsby-recipes', + version: '0.2.31', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + name: 'gatsby-recipes', + spec: '^0.2.31', + from: { + name: 'gatsby-cli', + version: '2.12.107', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + name: 'gatsby-cli', + spec: '^2.12.107', + from: { + name: 'gatsby', + version: '2.24.74', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + name: 'gatsby', + spec: '', + from: { + location: '/some/project/gatsby-user' + } } - } - ] + ] + } } - } - ] + ] + } } - }, - { - type: 'peer', - spec: '^1.0.0', - from: { - name: 'gatsby-react-router-scroll', - version: '3.0.12', - location: 'node_modules/gatsby-react-router-scroll', - dependents: [ - { - type: 'prod', - spec: '^3.0.12', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'prod', - spec: '^16.8.0', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^16.4.2', - from: { - name: 'gatsby-link', - version: '2.4.13', - location: 'node_modules/gatsby-link', - dependents: [ - { - type: 'prod', - spec: '^2.4.13', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^16.4.2', - from: { - name: 'gatsby-react-router-scroll', - version: '3.0.12', - location: 'node_modules/gatsby-react-router-scroll', - dependents: [ - { - type: 'prod', - spec: '^3.0.12', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^15.0.0 || ^16.0.0', - from: { - name: 'react-hot-loader', - version: '4.12.21', - location: 'node_modules/react-hot-loader', - dependents: [ - { - type: 'prod', - spec: '^4.12.21', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^0.14.0 || ^15.0.0 || ^16.0.0', - from: { - name: 'create-react-context', - version: '0.3.0', - location: 'node_modules/create-react-context', - dependents: [ - { - type: 'prod', - spec: '0.3.0', - from: { - name: '@reach/router', - version: '1.3.4', - location: 'node_modules/@reach/router', - dependents: [ - { - type: 'prod', - spec: '^1.3.4', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - }, - { - type: 'peer', - spec: '^1.3.3', - from: { - name: 'gatsby-link', - version: '2.4.13', - location: 'node_modules/gatsby-link', - dependents: [ - { - type: 'prod', - spec: '^2.4.13', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^1.0.0', - from: { - name: 'gatsby-react-router-scroll', - version: '3.0.12', - location: 'node_modules/gatsby-react-router-scroll', - dependents: [ - { - type: 'prod', - spec: '^3.0.12', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^16.12.0', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '>=16.8.0', - from: { - name: 'ink', - version: '2.7.1', - location: 'node_modules/ink', - dependents: [ - { - type: 'prod', - spec: '^2.7.1', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^2.0.0', - from: { - name: 'ink-spinner', - version: '3.1.0', - location: 'node_modules/ink-spinner', - dependents: [ - { - type: 'prod', - spec: '^3.1.0', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '>=2.0.0', - from: { - name: 'ink-box', - version: '1.0.0', - location: 'node_modules/ink-box', - dependents: [ - { - type: 'prod', - spec: '^1.0.0', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^16.8.2', - from: { - name: 'ink-spinner', - version: '3.1.0', - location: 'node_modules/ink-spinner', - dependents: [ - { - type: 'prod', - spec: '^3.1.0', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '>=16.3.0', - from: { - name: '@emotion/core', - version: '10.0.35', - location: 'node_modules/@emotion/core', - dependents: [ - { - type: 'prod', - spec: '^10.0.14', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^10.0.27', - from: { - name: '@emotion/styled', - version: '10.0.27', - location: 'node_modules/@emotion/styled', - dependents: [ - { - type: 'prod', - spec: '^10.0.14', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^10.0.14', - from: { - name: 'gatsby-interface', - version: '0.0.166', - location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', - dependents: [ - { - type: 'prod', - spec: '^0.0.166', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^10.0.14', - from: { - name: 'gatsby-interface', - version: '0.0.166', - location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', - dependents: [ - { - type: 'prod', - spec: '^0.0.166', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^10.0.28', - from: { - name: '@emotion/styled-base', - version: '10.0.31', - location: 'node_modules/@emotion/styled-base', - dependents: [ - { - type: 'prod', - spec: '^10.0.27', - from: { - name: '@emotion/styled', - version: '10.0.27', - location: 'node_modules/@emotion/styled', - dependents: [ - { - type: 'prod', - spec: '^10.0.14', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^10.0.14', - from: { - name: 'gatsby-interface', - version: '0.0.166', - location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', - dependents: [ - { - type: 'prod', - spec: '^0.0.166', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '>=16.3.0', - from: { - name: '@emotion/styled', - version: '10.0.27', - location: 'node_modules/@emotion/styled', - dependents: [ - { - type: 'prod', - spec: '^10.0.14', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^10.0.14', - from: { - name: 'gatsby-interface', - version: '0.0.166', - location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', - dependents: [ - { - type: 'prod', - spec: '^0.0.166', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^16.13.1', - from: { - name: '@mdx-js/react', - version: '2.0.0-next.7', - location: 'node_modules/@mdx-js/react', - dependents: [ - { - type: 'prod', - spec: '^2.0.0-next.4', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'prod', - spec: '^2.0.0-next.7', - from: { - name: '@mdx-js/runtime', - version: '2.0.0-next.7', - location: 'node_modules/@mdx-js/runtime', - dependents: [ - { - type: 'prod', - spec: '^2.0.0-next.4', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^16.13.1', - from: { - name: '@mdx-js/runtime', - version: '2.0.0-next.7', - location: 'node_modules/@mdx-js/runtime', - dependents: [ - { - type: 'prod', - spec: '^2.0.0-next.4', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '>=16.8.0', - from: { - name: 'formik', - version: '2.1.5', - location: 'node_modules/formik', - dependents: [ - { - type: 'prod', - spec: '^2.0.8', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^2.0.8', - from: { - name: 'gatsby-interface', - version: '0.0.166', - location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', - dependents: [ - { - type: 'prod', - spec: '^0.0.166', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^16.4.2', - from: { - name: 'gatsby', - version: '2.6.0', - location: 'node_modules/gatsby-recipes/node_modules/gatsby', - dependents: [ - { - type: 'peer', - spec: '2.6.0', - from: { - name: 'gatsby-interface', - version: '0.0.166', - location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', - dependents: [ - { - type: 'prod', - spec: '^0.0.166', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^16.0.0', - from: { - name: 'react-dom', - version: '16.8.1', - location: 'node_modules/gatsby-recipes/node_modules/react-dom', - dependents: [ - { - type: 'peer', - spec: '16.8.1', - from: { - name: 'gatsby-interface', - version: '0.0.166', - location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', - dependents: [ - { - type: 'prod', - spec: '^0.0.166', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^16.4.2', - from: { - name: 'gatsby', - version: '2.6.0', - location: 'node_modules/gatsby-recipes/node_modules/gatsby', - dependents: [ - { - type: 'peer', - spec: '2.6.0', - from: { - name: 'gatsby-interface', - version: '0.0.166', - location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', - dependents: [ - { - type: 'prod', - spec: '^0.0.166', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^0.14.0 || ^15.0.0 || ^16.0.0', - from: { - name: 'gatsby-react-router-scroll', - version: '2.3.1', - location: 'node_modules/gatsby-recipes/node_modules/gatsby-react-router-scroll', - dependents: [ - { - type: 'prod', - spec: '^2.0.7', - from: { - name: 'gatsby', - version: '2.6.0', - location: 'node_modules/gatsby-recipes/node_modules/gatsby', - dependents: [ - { - type: 'peer', - spec: '2.6.0', - from: { - name: 'gatsby-interface', - version: '0.0.166', - location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', - dependents: [ - { - type: 'prod', - spec: '^0.0.166', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '*', - from: { - name: 'react-icons', - version: '3.11.0', - location: 'node_modules/react-icons', - dependents: [ - { - type: 'prod', - spec: '^3.0.1', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^3.2.1', - from: { - name: 'gatsby-interface', - version: '0.0.166', - location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', - dependents: [ - { - type: 'prod', - spec: '^0.0.166', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] + ] + } } - }, - { - type: 'peer', - spec: '>=16.8.0', - from: { - name: 'ink-box', - version: '1.0.0', - location: 'node_modules/ink-box', - dependents: [ - { - type: 'prod', - spec: '^1.0.0', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^0.14.0 || ^15.0.0 || ^16.0.0', - from: { - name: 'react-circular-progressbar', - version: '2.0.3', - location: 'node_modules/react-circular-progressbar', - dependents: [ - { - type: 'prod', - spec: '^2.0.0', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^16.13.1', - from: { - name: 'react-reconciler', - version: '0.25.1', - location: 'node_modules/react-reconciler', - dependents: [ - { - type: 'prod', - spec: '^0.25.1', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '>= 16.8.0', - from: { - name: 'urql', - version: '1.10.0', - location: 'node_modules/urql', - dependents: [ - { - type: 'prod', - spec: '^1.9.7', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '>=16.3.0', - from: { - name: '@emotion/styled-base', - version: '10.0.31', - location: 'node_modules/@emotion/styled-base', - dependents: [ - { - type: 'prod', - spec: '^10.0.27', - from: { - name: '@emotion/styled', - version: '10.0.27', - location: 'node_modules/@emotion/styled', - dependents: [ - { - type: 'prod', - spec: '^10.0.14', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^10.0.14', - from: { - name: 'gatsby-interface', - version: '0.0.166', - location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', - dependents: [ - { - type: 'prod', - spec: '^0.0.166', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^16.0.0', - from: { - name: 'react-reconciler', - version: '0.24.0', - location: 'node_modules/ink/node_modules/react-reconciler', - dependents: [ - { - type: 'prod', - spec: '^0.24.0', - from: { - name: 'ink', - version: '2.7.1', - location: 'node_modules/ink', - dependents: [ - { - type: 'prod', - spec: '^2.7.1', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^2.0.0', - from: { - name: 'ink-spinner', - version: '3.1.0', - location: 'node_modules/ink-spinner', - dependents: [ - { - type: 'prod', - spec: '^3.1.0', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '>=2.0.0', - from: { - name: 'ink-box', - version: '1.0.0', - location: 'node_modules/ink-box', - dependents: [ - { - type: 'prod', - spec: '^1.0.0', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^0.14.0 || ^15.0.0 || ^16.0.0', - from: { - name: 'gatsby-react-router-scroll', - version: '2.3.1', - location: 'node_modules/gatsby-recipes/node_modules/gatsby-react-router-scroll', - dependents: [ - { - type: 'prod', - spec: '^2.0.7', - from: { - name: 'gatsby', - version: '2.6.0', - location: 'node_modules/gatsby-recipes/node_modules/gatsby', - dependents: [ - { - type: 'peer', - spec: '2.6.0', - from: { - name: 'gatsby-interface', - version: '0.0.166', - location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', - dependents: [ - { - type: 'prod', - spec: '^0.0.166', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - type: 'peer', - spec: '^16.13.1', - from: { - name: '@mdx-js/react', - version: '1.6.16', - location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface/node_modules/@mdx-js/react', - dependents: [ - { - type: 'prod', - spec: '^1.5.2', - from: { - name: 'gatsby-interface', - version: '0.0.166', - location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', - dependents: [ - { - type: 'prod', - spec: '^0.0.166', - from: { - name: 'gatsby-recipes', - version: '0.2.20', - location: 'node_modules/gatsby-recipes', - dependents: [ - { - type: 'prod', - spec: '^0.2.20', - from: { - name: 'gatsby-cli', - version: '2.12.91', - location: 'node_modules/gatsby-cli', - dependents: [ - { - type: 'prod', - spec: '^2.12.91', - from: { - name: 'gatsby', - version: '2.24.53', - location: 'node_modules/gatsby', - dependents: [ - { - type: 'prod', - spec: '', - from: { - location: '/path/to/gatsby-user' - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] + ] + } }, peerConflict: null, - fixWithForce: true, - type: 'peer', - isPeer: true + strictPeerDeps: true } + } diff --git a/deps/npm/test/lib/publish.js b/deps/npm/test/lib/publish.js index 5c5780de8fbefe..e26fdb382ce539 100644 --- a/deps/npm/test/lib/publish.js +++ b/deps/npm/test/lib/publish.js @@ -2,10 +2,12 @@ const { test, cleanSnapshot } = require('tap') const requireInject = require('require-inject') test('should publish with libnpmpublish', (t) => { + const publishConfig = { registry: 'https://some.registry' } const testDir = t.testdir({ 'package.json': JSON.stringify({ name: 'my-cool-pkg', - version: '1.0.0' + version: '1.0.0', + publishConfig }, null, 2) }) @@ -32,6 +34,7 @@ test('should publish with libnpmpublish', (t) => { t.ok(arg, 'gets path') t.ok(manifest, 'gets manifest') t.ok(opts, 'gets opts object') + t.same(opts.publishConfig, publishConfig, 'publishConfig is passed through') t.ok(true, 'libnpmpublish is called') } }, diff --git a/deps/npm/test/lib/utils/explain-dep.js b/deps/npm/test/lib/utils/explain-dep.js index 5e54658009e73b..e0305348653af0 100644 --- a/deps/npm/test/lib/utils/explain-dep.js +++ b/deps/npm/test/lib/utils/explain-dep.js @@ -13,6 +13,7 @@ const cases = { dependents: [ { type: 'prod', + name: 'prod-dep', spec: '1.x', from: { location: '/path/to/project' @@ -29,6 +30,7 @@ const cases = { dependents: [ { type: 'prod', + name: 'deep-dev', spec: '2.x', from: { name: 'metadev', @@ -37,6 +39,7 @@ const cases = { dependents: [ { type: 'prod', + name: 'metadev', spec: '3.x', from: { name: 'topdev', @@ -45,6 +48,7 @@ const cases = { dependents: [ { type: 'dev', + name: 'topdev', spec: '4.x', from: { location: '/path/to/project' @@ -66,7 +70,8 @@ const cases = { optional: true, dependents: [ { - type: 'optdep', + type: 'optional', + name: 'optdep', spec: '1.0.0', from: { location: '/path/to/project' @@ -83,6 +88,7 @@ const cases = { dependents: [ { type: 'peer', + name: 'peer', spec: '1.0.0', from: { location: '/path/to/project' @@ -106,31 +112,37 @@ cases.manyDeps = { dependents: [ { type: 'prod', + name: 'manydep', spec: '1.0.0', from: cases.prodDep }, { type: 'optional', + name: 'manydep', spec: '1.x', from: cases.optional }, { type: 'prod', + name: 'manydep', spec: '1.0.x', from: cases.extraneous }, { type: 'dev', + name: 'manydep', spec: '*', from: cases.deepDev }, { type: 'peer', + name: 'manydep', spec: '>1.0.0-beta <1.0.1', from: cases.peer }, { type: 'prod', + name: 'manydep', spec: '1', from: { name: 'a package with a pretty long name', @@ -142,6 +154,7 @@ cases.manyDeps = { }, { type: 'prod', + name: 'manydep', spec: '1', from: { name: 'another package with a pretty long name', @@ -153,6 +166,7 @@ cases.manyDeps = { }, { type: 'prod', + name: 'manydep', spec: '1', from: { name: 'yet another a package with a pretty long name',