From 303165d1f394fbb0ae2c8c70a22eb6ebc600e2eb Mon Sep 17 00:00:00 2001 From: npm CLI robot Date: Wed, 29 Jan 2025 21:26:03 +0000 Subject: [PATCH] deps: upgrade npm to 11.1.0 --- deps/npm/README.md | 10 +- .../docs/content/commands/npm-deprecate.md | 15 + deps/npm/docs/content/commands/npm-ls.md | 4 +- .../docs/content/commands/npm-undeprecate.md | 63 ++++ deps/npm/docs/content/commands/npm.md | 2 +- .../content/configuring-npm/package-json.md | 110 +++---- deps/npm/docs/content/using-npm/config.md | 2 +- deps/npm/docs/output/commands/npm-access.html | 4 +- .../npm/docs/output/commands/npm-adduser.html | 4 +- deps/npm/docs/output/commands/npm-audit.html | 4 +- deps/npm/docs/output/commands/npm-bugs.html | 4 +- deps/npm/docs/output/commands/npm-cache.html | 4 +- deps/npm/docs/output/commands/npm-ci.html | 4 +- .../docs/output/commands/npm-completion.html | 4 +- deps/npm/docs/output/commands/npm-config.html | 4 +- deps/npm/docs/output/commands/npm-dedupe.html | 4 +- .../docs/output/commands/npm-deprecate.html | 17 +- deps/npm/docs/output/commands/npm-diff.html | 4 +- .../docs/output/commands/npm-dist-tag.html | 4 +- deps/npm/docs/output/commands/npm-docs.html | 4 +- deps/npm/docs/output/commands/npm-doctor.html | 4 +- deps/npm/docs/output/commands/npm-edit.html | 4 +- deps/npm/docs/output/commands/npm-exec.html | 4 +- .../npm/docs/output/commands/npm-explain.html | 4 +- .../npm/docs/output/commands/npm-explore.html | 4 +- .../docs/output/commands/npm-find-dupes.html | 4 +- deps/npm/docs/output/commands/npm-fund.html | 4 +- .../docs/output/commands/npm-help-search.html | 4 +- deps/npm/docs/output/commands/npm-help.html | 4 +- deps/npm/docs/output/commands/npm-init.html | 4 +- .../output/commands/npm-install-ci-test.html | 4 +- .../output/commands/npm-install-test.html | 4 +- .../npm/docs/output/commands/npm-install.html | 4 +- deps/npm/docs/output/commands/npm-link.html | 4 +- deps/npm/docs/output/commands/npm-login.html | 4 +- deps/npm/docs/output/commands/npm-logout.html | 4 +- deps/npm/docs/output/commands/npm-ls.html | 8 +- deps/npm/docs/output/commands/npm-org.html | 4 +- .../docs/output/commands/npm-outdated.html | 4 +- deps/npm/docs/output/commands/npm-owner.html | 4 +- deps/npm/docs/output/commands/npm-pack.html | 4 +- deps/npm/docs/output/commands/npm-ping.html | 4 +- deps/npm/docs/output/commands/npm-pkg.html | 4 +- deps/npm/docs/output/commands/npm-prefix.html | 4 +- .../npm/docs/output/commands/npm-profile.html | 4 +- deps/npm/docs/output/commands/npm-prune.html | 4 +- .../npm/docs/output/commands/npm-publish.html | 4 +- deps/npm/docs/output/commands/npm-query.html | 4 +- .../npm/docs/output/commands/npm-rebuild.html | 4 +- deps/npm/docs/output/commands/npm-repo.html | 4 +- .../npm/docs/output/commands/npm-restart.html | 4 +- deps/npm/docs/output/commands/npm-root.html | 4 +- .../docs/output/commands/npm-run-script.html | 4 +- deps/npm/docs/output/commands/npm-sbom.html | 4 +- deps/npm/docs/output/commands/npm-search.html | 4 +- .../docs/output/commands/npm-shrinkwrap.html | 4 +- deps/npm/docs/output/commands/npm-star.html | 4 +- deps/npm/docs/output/commands/npm-stars.html | 4 +- deps/npm/docs/output/commands/npm-start.html | 4 +- deps/npm/docs/output/commands/npm-stop.html | 4 +- deps/npm/docs/output/commands/npm-team.html | 4 +- deps/npm/docs/output/commands/npm-test.html | 4 +- deps/npm/docs/output/commands/npm-token.html | 4 +- .../docs/output/commands/npm-undeprecate.html | 209 +++++++++++++ .../docs/output/commands/npm-uninstall.html | 4 +- .../docs/output/commands/npm-unpublish.html | 4 +- deps/npm/docs/output/commands/npm-unstar.html | 4 +- deps/npm/docs/output/commands/npm-update.html | 4 +- .../npm/docs/output/commands/npm-version.html | 4 +- deps/npm/docs/output/commands/npm-view.html | 4 +- deps/npm/docs/output/commands/npm-whoami.html | 4 +- deps/npm/docs/output/commands/npm.html | 6 +- deps/npm/docs/output/commands/npx.html | 4 +- .../docs/output/configuring-npm/folders.html | 4 +- .../docs/output/configuring-npm/install.html | 4 +- .../output/configuring-npm/npm-global.html | 4 +- .../docs/output/configuring-npm/npm-json.html | 114 ++++---- .../configuring-npm/npm-shrinkwrap-json.html | 4 +- .../docs/output/configuring-npm/npmrc.html | 4 +- .../output/configuring-npm/package-json.html | 114 ++++---- .../configuring-npm/package-lock-json.html | 4 +- deps/npm/docs/output/using-npm/config.html | 6 +- .../using-npm/dependency-selectors.html | 4 +- .../npm/docs/output/using-npm/developers.html | 4 +- deps/npm/docs/output/using-npm/logging.html | 4 +- deps/npm/docs/output/using-npm/orgs.html | 4 +- .../docs/output/using-npm/package-spec.html | 4 +- deps/npm/docs/output/using-npm/registry.html | 4 +- deps/npm/docs/output/using-npm/removal.html | 4 +- deps/npm/docs/output/using-npm/scope.html | 4 +- deps/npm/docs/output/using-npm/scripts.html | 4 +- .../npm/docs/output/using-npm/workspaces.html | 4 +- deps/npm/lib/base-cmd.js | 1 - deps/npm/lib/cli/entry.js | 2 - deps/npm/lib/cli/validate-engines.js | 2 - deps/npm/lib/commands/cache.js | 2 - deps/npm/lib/commands/deprecate.js | 24 +- deps/npm/lib/commands/doctor.js | 1 - deps/npm/lib/commands/install.js | 1 - deps/npm/lib/commands/org.js | 1 - deps/npm/lib/commands/publish.js | 45 +-- deps/npm/lib/commands/sbom.js | 2 - deps/npm/lib/commands/token.js | 2 - deps/npm/lib/commands/undeprecate.js | 13 + deps/npm/lib/commands/version.js | 1 - deps/npm/lib/utils/cmd-list.js | 1 + deps/npm/lib/utils/did-you-mean.js | 1 - deps/npm/lib/utils/format-search-stream.js | 55 ++-- deps/npm/lib/utils/reify-output.js | 2 - deps/npm/lib/utils/sbom-cyclonedx.js | 29 +- deps/npm/lib/utils/sbom-spdx.js | 12 +- deps/npm/lib/utils/tar.js | 1 - deps/npm/lib/utils/verify-signatures.js | 10 - deps/npm/man/man1/npm-access.1 | 2 +- deps/npm/man/man1/npm-adduser.1 | 2 +- deps/npm/man/man1/npm-audit.1 | 2 +- deps/npm/man/man1/npm-bugs.1 | 2 +- deps/npm/man/man1/npm-cache.1 | 2 +- deps/npm/man/man1/npm-ci.1 | 2 +- deps/npm/man/man1/npm-completion.1 | 2 +- deps/npm/man/man1/npm-config.1 | 2 +- deps/npm/man/man1/npm-dedupe.1 | 2 +- deps/npm/man/man1/npm-deprecate.1 | 14 +- deps/npm/man/man1/npm-diff.1 | 2 +- deps/npm/man/man1/npm-dist-tag.1 | 2 +- deps/npm/man/man1/npm-docs.1 | 2 +- deps/npm/man/man1/npm-doctor.1 | 2 +- deps/npm/man/man1/npm-edit.1 | 2 +- deps/npm/man/man1/npm-exec.1 | 2 +- deps/npm/man/man1/npm-explain.1 | 2 +- deps/npm/man/man1/npm-explore.1 | 2 +- deps/npm/man/man1/npm-find-dupes.1 | 2 +- deps/npm/man/man1/npm-fund.1 | 2 +- deps/npm/man/man1/npm-help-search.1 | 2 +- deps/npm/man/man1/npm-help.1 | 2 +- deps/npm/man/man1/npm-init.1 | 2 +- deps/npm/man/man1/npm-install-ci-test.1 | 2 +- deps/npm/man/man1/npm-install-test.1 | 2 +- deps/npm/man/man1/npm-install.1 | 2 +- deps/npm/man/man1/npm-link.1 | 2 +- deps/npm/man/man1/npm-login.1 | 2 +- deps/npm/man/man1/npm-logout.1 | 2 +- deps/npm/man/man1/npm-ls.1 | 6 +- deps/npm/man/man1/npm-org.1 | 2 +- deps/npm/man/man1/npm-outdated.1 | 2 +- deps/npm/man/man1/npm-owner.1 | 2 +- deps/npm/man/man1/npm-pack.1 | 2 +- deps/npm/man/man1/npm-ping.1 | 2 +- deps/npm/man/man1/npm-pkg.1 | 2 +- deps/npm/man/man1/npm-prefix.1 | 2 +- deps/npm/man/man1/npm-profile.1 | 2 +- deps/npm/man/man1/npm-prune.1 | 2 +- deps/npm/man/man1/npm-publish.1 | 2 +- deps/npm/man/man1/npm-query.1 | 2 +- deps/npm/man/man1/npm-rebuild.1 | 2 +- deps/npm/man/man1/npm-repo.1 | 2 +- deps/npm/man/man1/npm-restart.1 | 2 +- deps/npm/man/man1/npm-root.1 | 2 +- deps/npm/man/man1/npm-run-script.1 | 2 +- deps/npm/man/man1/npm-sbom.1 | 2 +- deps/npm/man/man1/npm-search.1 | 2 +- deps/npm/man/man1/npm-shrinkwrap.1 | 2 +- deps/npm/man/man1/npm-star.1 | 2 +- deps/npm/man/man1/npm-stars.1 | 2 +- deps/npm/man/man1/npm-start.1 | 2 +- deps/npm/man/man1/npm-stop.1 | 2 +- deps/npm/man/man1/npm-team.1 | 2 +- deps/npm/man/man1/npm-test.1 | 2 +- deps/npm/man/man1/npm-token.1 | 2 +- deps/npm/man/man1/npm-undeprecate.1 | 57 ++++ deps/npm/man/man1/npm-uninstall.1 | 2 +- deps/npm/man/man1/npm-unpublish.1 | 2 +- deps/npm/man/man1/npm-unstar.1 | 2 +- deps/npm/man/man1/npm-update.1 | 2 +- deps/npm/man/man1/npm-version.1 | 2 +- deps/npm/man/man1/npm-view.1 | 2 +- deps/npm/man/man1/npm-whoami.1 | 2 +- deps/npm/man/man1/npm.1 | 4 +- deps/npm/man/man1/npx.1 | 2 +- deps/npm/man/man5/folders.5 | 2 +- deps/npm/man/man5/install.5 | 2 +- deps/npm/man/man5/npm-global.5 | 2 +- deps/npm/man/man5/npm-json.5 | 106 +++---- deps/npm/man/man5/npm-shrinkwrap-json.5 | 2 +- deps/npm/man/man5/npmrc.5 | 2 +- deps/npm/man/man5/package-json.5 | 106 +++---- deps/npm/man/man5/package-lock-json.5 | 2 +- deps/npm/man/man7/config.7 | 4 +- deps/npm/man/man7/dependency-selectors.7 | 2 +- deps/npm/man/man7/developers.7 | 2 +- deps/npm/man/man7/logging.7 | 2 +- deps/npm/man/man7/orgs.7 | 2 +- deps/npm/man/man7/package-spec.7 | 2 +- deps/npm/man/man7/registry.7 | 2 +- deps/npm/man/man7/removal.7 | 2 +- deps/npm/man/man7/scope.7 | 2 +- deps/npm/man/man7/scripts.7 | 2 +- deps/npm/man/man7/workspaces.7 | 2 +- .../config/lib/definitions/definitions.js | 2 +- .../node_modules/@npmcli/config/package.json | 2 +- .../@npmcli/package-json/lib/index.js | 4 +- .../package-json/lib/normalize-data.js | 257 ++++++++++++++++ .../@npmcli/package-json/lib/normalize.js | 28 +- .../@npmcli/package-json/package.json | 12 +- .../dist/__generated__/events.js | 4 +- .../google/api/field_behavior.js | 8 +- .../google/protobuf/descriptor.js | 38 +-- .../dist/__generated__/sigstore_common.js | 24 +- .../dist/__generated__/sigstore_trustroot.js | 4 +- .../__generated__/sigstore_verification.js | 6 +- .../@sigstore/protobuf-specs/package.json | 8 +- deps/npm/node_modules/chalk/package.json | 6 +- .../source/vendor/supports-color/browser.js | 8 +- .../source/vendor/supports-color/index.js | 4 +- .../node_modules/spdx-license-ids/index.json | 14 + .../spdx-license-ids/package.json | 16 +- deps/npm/package.json | 10 +- .../test/lib/commands/completion.js.test.cjs | 1 + .../test/lib/commands/install.js.test.cjs | 6 +- .../test/lib/commands/publish.js.test.cjs | 29 +- .../test/lib/commands/sbom.js.test.cjs | 274 ++++++++++++++++-- .../test/lib/commands/search.js.test.cjs | 146 ++++++++++ .../tap-snapshots/test/lib/docs.js.test.cjs | 28 +- .../tap-snapshots/test/lib/npm.js.test.cjs | 52 ++-- .../test/lib/utils/sbom-cyclonedx.js.test.cjs | 202 +++++-------- .../test/lib/utils/sbom-spdx.js.test.cjs | 89 ++++++ deps/npm/test/lib/cli/exit-handler.js | 1 - deps/npm/test/lib/cli/validate-engines.js | 1 - deps/npm/test/lib/commands/audit.js | 6 - deps/npm/test/lib/commands/cache.js | 14 - deps/npm/test/lib/commands/deprecate.js | 33 ++- deps/npm/test/lib/commands/help-search.js | 2 - deps/npm/test/lib/commands/ls.js | 40 --- deps/npm/test/lib/commands/publish.js | 98 +++++-- deps/npm/test/lib/commands/sbom.js | 91 ++++++ deps/npm/test/lib/commands/search.js | 24 ++ deps/npm/test/lib/commands/undeprecate.js | 72 +++++ deps/npm/test/lib/utils/sbom-cyclonedx.js | 13 +- deps/npm/test/lib/utils/sbom-spdx.js | 12 +- 239 files changed, 2324 insertions(+), 1018 deletions(-) create mode 100644 deps/npm/docs/content/commands/npm-undeprecate.md create mode 100644 deps/npm/docs/output/commands/npm-undeprecate.html create mode 100644 deps/npm/lib/commands/undeprecate.js create mode 100644 deps/npm/man/man1/npm-undeprecate.1 create mode 100644 deps/npm/node_modules/@npmcli/package-json/lib/normalize-data.js create mode 100644 deps/npm/test/lib/commands/undeprecate.js diff --git a/deps/npm/README.md b/deps/npm/README.md index 3dc35a384255..6271d5d33c0f 100644 --- a/deps/npm/README.md +++ b/deps/npm/README.md @@ -1,16 +1,8 @@ # npm - a JavaScript package manager -[![npm version](https://img.shields.io/npm/v/npm.svg)](https://npm.im/npm) -[![license](https://img.shields.io/npm/l/npm.svg)](https://npm.im/npm) -[![CI - cli](https://github.com/npm/cli/actions/workflows/ci.yml/badge.svg)](https://github.com/npm/cli/actions/workflows/ci.yml) -[![Benchmark Suite](https://github.com/npm/cli/actions/workflows/benchmark.yml/badge.svg)](https://github.com/npm/cli/actions/workflows/benchmark.yml) - ### Requirements -One of the following versions of [Node.js](https://nodejs.org/en/download/) must be installed to run **`npm`**: - -* `18.x.x` >= `18.17.0` -* `20.5.0` or higher +You should be running a currently supported version of [Node.js](https://nodejs.org/en/download/) to run **`npm`**. For a list of which versions of Node.js are currently supported, please see the [Node.js releases](https://nodejs.org/en/about/previous-releases) page. ### Installation diff --git a/deps/npm/docs/content/commands/npm-deprecate.md b/deps/npm/docs/content/commands/npm-deprecate.md index 706ecf3135c4..80b039b25a0d 100644 --- a/deps/npm/docs/content/commands/npm-deprecate.md +++ b/deps/npm/docs/content/commands/npm-deprecate.md @@ -64,6 +64,21 @@ password, npm will prompt on the command line for one. +#### `dry-run` + +* Default: false +* Type: Boolean + +Indicates that you don't want npm to make any changes and that it should +only report what it would have done. This can be passed into any of the +commands that modify your local installation, eg, `install`, `update`, +`dedupe`, `uninstall`, as well as `pack` and `publish`. + +Note: This is NOT honored by other network related commands, eg `dist-tags`, +`owner`, etc. + + + ### See Also * [package spec](/using-npm/package-spec) diff --git a/deps/npm/docs/content/commands/npm-ls.md b/deps/npm/docs/content/commands/npm-ls.md index 1169da1f0973..9e9a48911448 100644 --- a/deps/npm/docs/content/commands/npm-ls.md +++ b/deps/npm/docs/content/commands/npm-ls.md @@ -27,7 +27,7 @@ packages will *also* show the paths to the specified packages. For example, running `npm ls promzard` in npm's source tree will show: ```bash -npm@11.0.0 /path/to/npm +npm@11.1.0 /path/to/npm └─┬ init-package-json@0.0.4 └── promzard@0.1.5 ``` @@ -107,7 +107,7 @@ folder instead of the current working directory. See #### `depth` -* Default: `Infinity` if `--all` is set, otherwise `1` +* Default: `Infinity` if `--all` is set, otherwise `0` * Type: null or Number The depth to go when recursing packages for `npm ls`. diff --git a/deps/npm/docs/content/commands/npm-undeprecate.md b/deps/npm/docs/content/commands/npm-undeprecate.md new file mode 100644 index 000000000000..f9abfd794c7e --- /dev/null +++ b/deps/npm/docs/content/commands/npm-undeprecate.md @@ -0,0 +1,63 @@ +--- +title: npm-undeprecate +section: 1 +description: Undeprecate a version of a package +--- + +### Synopsis + +```bash +npm undeprecate +``` + +Note: This command is unaware of workspaces. + +### Description + +This command will update the npm registry entry for a package, removing any +deprecation warnings that currently exist. + +It works in the same way as [npm deprecate](/commands/npm-deprecate), except +that this command removes deprecation warnings instead of adding them. + +### Configuration + +#### `registry` + +* Default: "https://registry.npmjs.org/" +* Type: URL + +The base URL of the npm registry. + + + +#### `otp` + +* Default: null +* Type: null or String + +This is a one-time password from a two-factor authenticator. It's needed +when publishing or changing package permissions with `npm access`. + +If not set, and a registry response fails with a challenge for a one-time +password, npm will prompt on the command line for one. + + + +#### `dry-run` + +* Default: false +* Type: Boolean + +Indicates that you don't want npm to make any changes and that it should +only report what it would have done. This can be passed into any of the +commands that modify your local installation, eg, `install`, `update`, +`dedupe`, `uninstall`, as well as `pack` and `publish`. + +Note: This is NOT honored by other network related commands, eg `dist-tags`, +`owner`, etc. + + +### See Also + +* [npm deprecate](/commands/npm-deprecate) diff --git a/deps/npm/docs/content/commands/npm.md b/deps/npm/docs/content/commands/npm.md index 36398a3cb34f..30e48bcfd2ac 100644 --- a/deps/npm/docs/content/commands/npm.md +++ b/deps/npm/docs/content/commands/npm.md @@ -14,7 +14,7 @@ Note: This command is unaware of workspaces. ### Version -11.0.0 +11.1.0 ### Description diff --git a/deps/npm/docs/content/configuring-npm/package-json.md b/deps/npm/docs/content/configuring-npm/package-json.md index 90fbcee64de7..40830e0f00df 100644 --- a/deps/npm/docs/content/configuring-npm/package-json.md +++ b/deps/npm/docs/content/configuring-npm/package-json.md @@ -47,7 +47,7 @@ Some tips: that name already, before you get too attached to it. -A name can be optionally prefixed by a scope, e.g. `@myorg/mypackage`. See +A name can be optionally prefixed by a scope, e.g. `@npm/example`. See [`scope`](/using-npm/scope) for more detail. ### version @@ -80,7 +80,7 @@ The URL to the project homepage. Example: ```json -"homepage": "https://github.com/owner/project#readme" +"homepage": "https://github.com/npm/example#readme" ``` ### bugs @@ -94,8 +94,8 @@ It should look like this: ```json { "bugs": { - "url": "https://github.com/owner/project/issues", - "email": "project@hostname.com" + "url": "https://github.com/npm/example/issues", + "email": "example@npmjs.com" } } ``` @@ -121,7 +121,7 @@ SPDX license identifier for the license you're using, like this: ``` You can check [the full list of SPDX license -IDs](https://spdx.org/licenses/). Ideally you should pick one that is +IDs](https://spdx.org/licenses/). Ideally, you should pick one that is [OSI](https://opensource.org/licenses/) approved. If your package is licensed under multiple common licenses, use an [SPDX @@ -204,8 +204,8 @@ like this: ```json { "name" : "Barney Rubble", - "email" : "b@rubble.com", - "url" : "http://barnyrubble.tumblr.com/" + "email" : "barney@npmjs.com", + "url" : "http://barnyrubble.npmjs.com/" } ``` @@ -214,7 +214,7 @@ you: ```json { - "author": "Barney Rubble (http://barnyrubble.tumblr.com/)" + "author": "Barney Rubble (http://barnyrubble.npmjs.com/)" } ``` @@ -232,7 +232,7 @@ string URL, or an array of objects and string URLs: { "funding": { "type" : "individual", - "url" : "http://example.com/donate" + "url" : "http://npmjs.com/donate" } } ``` @@ -241,14 +241,14 @@ string URL, or an array of objects and string URLs: { "funding": { "type" : "patreon", - "url" : "https://www.patreon.com/my-account" + "url" : "https://www.patreon.com/user" } } ``` ```json { - "funding": "http://example.com/donate" + "funding": "http://npmjs.com/donate" } ``` @@ -257,12 +257,12 @@ string URL, or an array of objects and string URLs: "funding": [ { "type" : "individual", - "url" : "http://example.com/donate" + "url" : "http://npmjs.com/donate" }, - "http://example.com/donateAlso", + "http://npmjs.com/donate-also", { "type" : "patreon", - "url" : "https://www.patreon.com/my-account" + "url" : "https://www.patreon.com/user" } ] } @@ -539,9 +539,9 @@ same shortcut syntax you use for `npm install`: ```json { - "repository": "npm/npm", + "repository": "npm/example", - "repository": "github:user/repo", + "repository": "github:npm/example", "repository": "gist:11081aaa281", @@ -623,7 +623,7 @@ See [semver](https://github.com/npm/node-semver#versions) for more details about * `tag` A specific version tagged and published as `tag` See [`npm dist-tag`](/commands/npm-dist-tag) * `path/path/path` See [Local Paths](#local-paths) below -* `npm:@scope/pkg@version` Custom alias for a pacakge See [`package-spec`](/using-npm/package-spec#aliases) +* `npm:@scope/pkg@version` Custom alias for a package See [`package-spec`](/using-npm/package-spec#aliases) For example, these are all valid: @@ -635,7 +635,7 @@ For example, these are all valid: "baz": ">1.0.2 <=2.3.4", "boo": "2.0.1", "qux": "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0", - "asd": "http://asdf.com/asdf.tar.gz", + "asd": "http://npmjs.com/example.tar.gz", "til": "~1.2", "elf": "~1.2.3", "two": "2.x", @@ -714,7 +714,7 @@ included. For example: "dependencies": { "express": "expressjs/express", "mocha": "mochajs/mocha#4727d357ea", - "module": "user/repo#feature\/branch" + "module": "npm/example-github-repo#feature\/branch" } } ``` @@ -773,7 +773,7 @@ For example: ```json { - "name": "ethopia-waza", + "name": "@npm/ethopia-waza", "description": "a delightfully fruity coffee varietal", "version": "1.2.3", "devDependencies": { @@ -803,21 +803,21 @@ For example: ```json { - "name": "tea-latte", + "name": "@npm/tea-latte", "version": "1.3.5", "peerDependencies": { - "tea": "2.x" + "@npm/tea": "2.x" } } ``` -This ensures your package `tea-latte` can be installed *along* with the -second major version of the host package `tea` only. `npm install +This ensures your package `@npm/tea-latte` can be installed *along* with the +second major version of the host package `@npm/tea` only. `npm install tea-latte` could possibly yield the following dependency graph: ```bash -├── tea-latte@1.3.5 -└── tea@2.2.0 +├── @npm/tea-latte@1.3.5 +└── @npm/tea@2.2.0 ``` In npm versions 3 through 6, `peerDependencies` were not automatically @@ -849,14 +849,14 @@ For example: ```json { - "name": "tea-latte", + "name": "@npm/tea-latte", "version": "1.3.5", "peerDependencies": { - "tea": "2.x", - "soy-milk": "1.2" + "@npm/tea": "2.x", + "@npm/soy-milk": "1.2" }, "peerDependenciesMeta": { - "soy-milk": { + "@npm/soy-milk": { "optional": true } } @@ -879,17 +879,17 @@ If we define a package.json like this: ```json { - "name": "awesome-web-framework", + "name": "@npm/awesome-web-framework", "version": "1.0.0", "bundleDependencies": [ - "renderized", - "super-streams" + "@npm/renderized", + "@npm/super-streams" ] } ``` -we can obtain `awesome-web-framework-1.0.0.tgz` file by running `npm pack`. -This file contains the dependencies `renderized` and `super-streams` which +we can obtain `@npm/awesome-web-framework-1.0.0.tgz` file by running `npm pack`. +This file contains the dependencies `@npm/renderized` and `@npm/super-streams` which can be installed in a new project by executing `npm install awesome-web-framework-1.0.0.tgz`. Note that the package names do not include any versions, as that information is specified in `dependencies`. @@ -914,8 +914,8 @@ dependency. For example, something like this: ```js try { - var foo = require('foo') - var fooVersion = require('foo/package.json').version + var foo = require('@npm/foo') + var fooVersion = require('@npm/foo/package.json').version } catch (er) { foo = null } @@ -957,49 +957,49 @@ what version your dependencies rely on: ```json { "overrides": { - "foo": "1.0.0" + "@npm/foo": "1.0.0" } } ``` The above is a short hand notation, the full object form can be used to allow overriding a package itself as well as a child of the package. This will cause -`foo` to always be `1.0.0` while also making `bar` at any depth beyond `foo` +`@npm/foo` to always be `1.0.0` while also making `@npm/bar` at any depth beyond `@npm/foo` also `1.0.0`: ```json { "overrides": { - "foo": { + "@npm/foo": { ".": "1.0.0", - "bar": "1.0.0" + "@npm/bar": "1.0.0" } } } ``` -To only override `foo` to be `1.0.0` when it's a child (or grandchild, or great +To only override `@npm/foo` to be `1.0.0` when it's a child (or grandchild, or great grandchild, etc) of the package `bar`: ```json { "overrides": { - "bar": { - "foo": "1.0.0" + "@npm/bar": { + "@npm/foo": "1.0.0" } } } ``` -Keys can be nested to any arbitrary length. To override `foo` only when it's a -child of `bar` and only when `bar` is a child of `baz`: +Keys can be nested to any arbitrary length. To override `@npm/foo` only when it's a +child of `@npm/bar` and only when `@npm/bar` is a child of `@npm/baz`: ```json { "overrides": { - "baz": { - "bar": { - "foo": "1.0.0" + "@npm/baz": { + "@npm/bar": { + "@npm/foo": "1.0.0" } } } @@ -1007,13 +1007,13 @@ child of `bar` and only when `bar` is a child of `baz`: ``` The key of an override can also include a version, or range of versions. -To override `foo` to `1.0.0`, but only when it's a child of `bar@2.0.0`: +To override `@npm/foo` to `1.0.0`, but only when it's a child of `@npm/bar@2.0.0`: ```json { "overrides": { - "bar@2.0.0": { - "foo": "1.0.0" + "@npm/bar@2.0.0": { + "@npm/foo": "1.0.0" } } } @@ -1028,7 +1028,7 @@ package you wish the version to match with a `$`. ```json { "dependencies": { - "foo": "^1.0.0" + "@npm/foo": "^1.0.0" }, "overrides": { // BAD, will throw an EOVERRIDE error @@ -1036,9 +1036,9 @@ package you wish the version to match with a `$`. // GOOD, specs match so override is allowed // "foo": "^1.0.0" // BEST, the override is defined as a reference to the dependency - "foo": "$foo", + "@npm/foo": "$foo", // the referenced package does not need to match the overridden one - "bar": "$foo" + "@npm/bar": "$foo" } } ``` diff --git a/deps/npm/docs/content/using-npm/config.md b/deps/npm/docs/content/using-npm/config.md index 4209b9bb1ae5..98875dfa3244 100644 --- a/deps/npm/docs/content/using-npm/config.md +++ b/deps/npm/docs/content/using-npm/config.md @@ -360,7 +360,7 @@ are same as `cpu` field of package.json, which comes from `process.arch`. #### `depth` -* Default: `Infinity` if `--all` is set, otherwise `1` +* Default: `Infinity` if `--all` is set, otherwise `0` * Type: null or Number The depth to go when recursing packages for `npm ls`. diff --git a/deps/npm/docs/output/commands/npm-access.html b/deps/npm/docs/output/commands/npm-access.html index 705489bba532..1e1ac9581dcd 100644 --- a/deps/npm/docs/output/commands/npm-access.html +++ b/deps/npm/docs/output/commands/npm-access.html @@ -141,9 +141,9 @@
-

+

npm-access - @11.0.0 + @11.1.0

Set access level on published packages
diff --git a/deps/npm/docs/output/commands/npm-adduser.html b/deps/npm/docs/output/commands/npm-adduser.html index c71dd30b1fd8..efb7054b83f9 100644 --- a/deps/npm/docs/output/commands/npm-adduser.html +++ b/deps/npm/docs/output/commands/npm-adduser.html @@ -141,9 +141,9 @@
-

+

npm-adduser - @11.0.0 + @11.1.0

Add a registry user account
diff --git a/deps/npm/docs/output/commands/npm-audit.html b/deps/npm/docs/output/commands/npm-audit.html index 15c2d5129d18..31ddedcdef36 100644 --- a/deps/npm/docs/output/commands/npm-audit.html +++ b/deps/npm/docs/output/commands/npm-audit.html @@ -141,9 +141,9 @@
-

+

npm-audit - @11.0.0 + @11.1.0

Run a security audit
diff --git a/deps/npm/docs/output/commands/npm-bugs.html b/deps/npm/docs/output/commands/npm-bugs.html index 6afee0196962..4ca7bf0f028e 100644 --- a/deps/npm/docs/output/commands/npm-bugs.html +++ b/deps/npm/docs/output/commands/npm-bugs.html @@ -141,9 +141,9 @@
-

+

npm-bugs - @11.0.0 + @11.1.0

Report bugs for a package in a web browser
diff --git a/deps/npm/docs/output/commands/npm-cache.html b/deps/npm/docs/output/commands/npm-cache.html index dc0e1d7792d5..4f55c5eb53a0 100644 --- a/deps/npm/docs/output/commands/npm-cache.html +++ b/deps/npm/docs/output/commands/npm-cache.html @@ -141,9 +141,9 @@
-

+

npm-cache - @11.0.0 + @11.1.0

Manipulates packages cache
diff --git a/deps/npm/docs/output/commands/npm-ci.html b/deps/npm/docs/output/commands/npm-ci.html index da9bef01d517..542595006586 100644 --- a/deps/npm/docs/output/commands/npm-ci.html +++ b/deps/npm/docs/output/commands/npm-ci.html @@ -141,9 +141,9 @@
-

+

npm-ci - @11.0.0 + @11.1.0

Clean install a project
diff --git a/deps/npm/docs/output/commands/npm-completion.html b/deps/npm/docs/output/commands/npm-completion.html index 687fd873263c..b3d0830b63d7 100644 --- a/deps/npm/docs/output/commands/npm-completion.html +++ b/deps/npm/docs/output/commands/npm-completion.html @@ -141,9 +141,9 @@
-

+

npm-completion - @11.0.0 + @11.1.0

Tab Completion for npm
diff --git a/deps/npm/docs/output/commands/npm-config.html b/deps/npm/docs/output/commands/npm-config.html index 6db882f847de..7dadee19db7a 100644 --- a/deps/npm/docs/output/commands/npm-config.html +++ b/deps/npm/docs/output/commands/npm-config.html @@ -141,9 +141,9 @@
-

+

npm-config - @11.0.0 + @11.1.0

Manage the npm configuration files
diff --git a/deps/npm/docs/output/commands/npm-dedupe.html b/deps/npm/docs/output/commands/npm-dedupe.html index 598f7ff9472d..6cb3a894676f 100644 --- a/deps/npm/docs/output/commands/npm-dedupe.html +++ b/deps/npm/docs/output/commands/npm-dedupe.html @@ -141,9 +141,9 @@
-

+

npm-dedupe - @11.0.0 + @11.1.0

Reduce duplication in the package tree
diff --git a/deps/npm/docs/output/commands/npm-deprecate.html b/deps/npm/docs/output/commands/npm-deprecate.html index 88e4c4682407..38cd75f7f063 100644 --- a/deps/npm/docs/output/commands/npm-deprecate.html +++ b/deps/npm/docs/output/commands/npm-deprecate.html @@ -141,16 +141,16 @@
-

+

npm-deprecate - @11.0.0 + @11.1.0

Deprecate a version of a package

Table of contents

- +

Synopsis

@@ -190,6 +190,17 @@

otp

when publishing or changing package permissions with npm access.

If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one.

+

dry-run

+
    +
  • Default: false
  • +
  • Type: Boolean
  • +
+

Indicates that you don't want npm to make any changes and that it should +only report what it would have done. This can be passed into any of the +commands that modify your local installation, eg, install, update, +dedupe, uninstall, as well as pack and publish.

+

Note: This is NOT honored by other network related commands, eg dist-tags, +owner, etc.

See Also

  • package spec
  • diff --git a/deps/npm/docs/output/commands/npm-diff.html b/deps/npm/docs/output/commands/npm-diff.html index d682aff9b479..08df918242b6 100644 --- a/deps/npm/docs/output/commands/npm-diff.html +++ b/deps/npm/docs/output/commands/npm-diff.html @@ -141,9 +141,9 @@
    -

    +

    npm-diff - @11.0.0 + @11.1.0

    The registry diff command
    diff --git a/deps/npm/docs/output/commands/npm-dist-tag.html b/deps/npm/docs/output/commands/npm-dist-tag.html index 34698aa4bcd5..2b9edfe90a7d 100644 --- a/deps/npm/docs/output/commands/npm-dist-tag.html +++ b/deps/npm/docs/output/commands/npm-dist-tag.html @@ -141,9 +141,9 @@
    -

    +

    npm-dist-tag - @11.0.0 + @11.1.0

    Modify package distribution tags
    diff --git a/deps/npm/docs/output/commands/npm-docs.html b/deps/npm/docs/output/commands/npm-docs.html index cf0980ddecfd..50f16c96a975 100644 --- a/deps/npm/docs/output/commands/npm-docs.html +++ b/deps/npm/docs/output/commands/npm-docs.html @@ -141,9 +141,9 @@
    -

    +

    npm-docs - @11.0.0 + @11.1.0

    Open documentation for a package in a web browser
    diff --git a/deps/npm/docs/output/commands/npm-doctor.html b/deps/npm/docs/output/commands/npm-doctor.html index c662329ee540..fa3519fd6129 100644 --- a/deps/npm/docs/output/commands/npm-doctor.html +++ b/deps/npm/docs/output/commands/npm-doctor.html @@ -141,9 +141,9 @@
    -

    +

    npm-doctor - @11.0.0 + @11.1.0

    Check the health of your npm environment
    diff --git a/deps/npm/docs/output/commands/npm-edit.html b/deps/npm/docs/output/commands/npm-edit.html index bea9f5731865..de834e216dce 100644 --- a/deps/npm/docs/output/commands/npm-edit.html +++ b/deps/npm/docs/output/commands/npm-edit.html @@ -141,9 +141,9 @@
    -

    +

    npm-edit - @11.0.0 + @11.1.0

    Edit an installed package
    diff --git a/deps/npm/docs/output/commands/npm-exec.html b/deps/npm/docs/output/commands/npm-exec.html index 3a60bfbe9e79..e0fef9ffdcde 100644 --- a/deps/npm/docs/output/commands/npm-exec.html +++ b/deps/npm/docs/output/commands/npm-exec.html @@ -141,9 +141,9 @@
    -

    +

    npm-exec - @11.0.0 + @11.1.0

    Run a command from a local or remote npm package
    diff --git a/deps/npm/docs/output/commands/npm-explain.html b/deps/npm/docs/output/commands/npm-explain.html index f9a4cfd44a15..4b90870653f6 100644 --- a/deps/npm/docs/output/commands/npm-explain.html +++ b/deps/npm/docs/output/commands/npm-explain.html @@ -141,9 +141,9 @@
    -

    +

    npm-explain - @11.0.0 + @11.1.0

    Explain installed packages
    diff --git a/deps/npm/docs/output/commands/npm-explore.html b/deps/npm/docs/output/commands/npm-explore.html index 63c33e340bb6..d4dd7049129e 100644 --- a/deps/npm/docs/output/commands/npm-explore.html +++ b/deps/npm/docs/output/commands/npm-explore.html @@ -141,9 +141,9 @@
    -

    +

    npm-explore - @11.0.0 + @11.1.0

    Browse an installed package
    diff --git a/deps/npm/docs/output/commands/npm-find-dupes.html b/deps/npm/docs/output/commands/npm-find-dupes.html index 888337152aff..01dd00adfbd9 100644 --- a/deps/npm/docs/output/commands/npm-find-dupes.html +++ b/deps/npm/docs/output/commands/npm-find-dupes.html @@ -141,9 +141,9 @@
    -

    +

    npm-find-dupes - @11.0.0 + @11.1.0

    Find duplication in the package tree
    diff --git a/deps/npm/docs/output/commands/npm-fund.html b/deps/npm/docs/output/commands/npm-fund.html index 56eff2d49873..1335b9a4a456 100644 --- a/deps/npm/docs/output/commands/npm-fund.html +++ b/deps/npm/docs/output/commands/npm-fund.html @@ -141,9 +141,9 @@
    -

    +

    npm-fund - @11.0.0 + @11.1.0

    Retrieve funding information
    diff --git a/deps/npm/docs/output/commands/npm-help-search.html b/deps/npm/docs/output/commands/npm-help-search.html index cc62294b5622..8d26d3109386 100644 --- a/deps/npm/docs/output/commands/npm-help-search.html +++ b/deps/npm/docs/output/commands/npm-help-search.html @@ -141,9 +141,9 @@
    -

    +

    npm-help-search - @11.0.0 + @11.1.0

    Search npm help documentation
    diff --git a/deps/npm/docs/output/commands/npm-help.html b/deps/npm/docs/output/commands/npm-help.html index f7f6085021a4..2b2cba996e43 100644 --- a/deps/npm/docs/output/commands/npm-help.html +++ b/deps/npm/docs/output/commands/npm-help.html @@ -141,9 +141,9 @@
    -

    +

    npm-help - @11.0.0 + @11.1.0

    Get help on npm
    diff --git a/deps/npm/docs/output/commands/npm-init.html b/deps/npm/docs/output/commands/npm-init.html index 0a95b514d387..ce7826f6d2d7 100644 --- a/deps/npm/docs/output/commands/npm-init.html +++ b/deps/npm/docs/output/commands/npm-init.html @@ -141,9 +141,9 @@
    -

    +

    npm-init - @11.0.0 + @11.1.0

    Create a package.json file
    diff --git a/deps/npm/docs/output/commands/npm-install-ci-test.html b/deps/npm/docs/output/commands/npm-install-ci-test.html index 1ac7a4650e8e..bb4fbe65d7c6 100644 --- a/deps/npm/docs/output/commands/npm-install-ci-test.html +++ b/deps/npm/docs/output/commands/npm-install-ci-test.html @@ -141,9 +141,9 @@
    -

    +

    npm-install-ci-test - @11.0.0 + @11.1.0

    Install a project with a clean slate and run tests
    diff --git a/deps/npm/docs/output/commands/npm-install-test.html b/deps/npm/docs/output/commands/npm-install-test.html index e9c0ec8aa23f..fde6444dc6d8 100644 --- a/deps/npm/docs/output/commands/npm-install-test.html +++ b/deps/npm/docs/output/commands/npm-install-test.html @@ -141,9 +141,9 @@
    -

    +

    npm-install-test - @11.0.0 + @11.1.0

    Install package(s) and run tests
    diff --git a/deps/npm/docs/output/commands/npm-install.html b/deps/npm/docs/output/commands/npm-install.html index 466171e4eeca..aa41a8a80c6c 100644 --- a/deps/npm/docs/output/commands/npm-install.html +++ b/deps/npm/docs/output/commands/npm-install.html @@ -141,9 +141,9 @@
    -

    +

    npm-install - @11.0.0 + @11.1.0

    Install a package
    diff --git a/deps/npm/docs/output/commands/npm-link.html b/deps/npm/docs/output/commands/npm-link.html index 76b8ed6c57ea..939fccc74b2b 100644 --- a/deps/npm/docs/output/commands/npm-link.html +++ b/deps/npm/docs/output/commands/npm-link.html @@ -141,9 +141,9 @@
    -

    +

    npm-link - @11.0.0 + @11.1.0

    Symlink a package folder
    diff --git a/deps/npm/docs/output/commands/npm-login.html b/deps/npm/docs/output/commands/npm-login.html index 6d7c32a66c57..90120e5dc25f 100644 --- a/deps/npm/docs/output/commands/npm-login.html +++ b/deps/npm/docs/output/commands/npm-login.html @@ -141,9 +141,9 @@
    -

    +

    npm-login - @11.0.0 + @11.1.0

    Login to a registry user account
    diff --git a/deps/npm/docs/output/commands/npm-logout.html b/deps/npm/docs/output/commands/npm-logout.html index 830870308030..50b66742c5d5 100644 --- a/deps/npm/docs/output/commands/npm-logout.html +++ b/deps/npm/docs/output/commands/npm-logout.html @@ -141,9 +141,9 @@
    -

    +

    npm-logout - @11.0.0 + @11.1.0

    Log out of the registry
    diff --git a/deps/npm/docs/output/commands/npm-ls.html b/deps/npm/docs/output/commands/npm-ls.html index 2f60ef088402..eeb76ce0f20a 100644 --- a/deps/npm/docs/output/commands/npm-ls.html +++ b/deps/npm/docs/output/commands/npm-ls.html @@ -141,9 +141,9 @@
    -

    +

    npm-ls - @11.0.0 + @11.1.0

    List installed packages
    @@ -168,7 +168,7 @@

    Description

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

    -
    npm@11.0.0 /path/to/npm
    +
    npm@11.1.0 /path/to/npm
     └─┬ init-package-json@0.0.4
       └── promzard@0.1.5
     
    @@ -228,7 +228,7 @@

    global

depth

    -
  • Default: Infinity if --all is set, otherwise 1
  • +
  • Default: Infinity if --all is set, otherwise 0
  • Type: null or Number

The depth to go when recursing packages for npm ls.

diff --git a/deps/npm/docs/output/commands/npm-org.html b/deps/npm/docs/output/commands/npm-org.html index ccc310efdb16..bd23376c48d5 100644 --- a/deps/npm/docs/output/commands/npm-org.html +++ b/deps/npm/docs/output/commands/npm-org.html @@ -141,9 +141,9 @@
-

+

npm-org - @11.0.0 + @11.1.0

Manage orgs
diff --git a/deps/npm/docs/output/commands/npm-outdated.html b/deps/npm/docs/output/commands/npm-outdated.html index 1875a6f204f7..3445a283f61e 100644 --- a/deps/npm/docs/output/commands/npm-outdated.html +++ b/deps/npm/docs/output/commands/npm-outdated.html @@ -141,9 +141,9 @@
-

+

npm-outdated - @11.0.0 + @11.1.0

Check for outdated packages
diff --git a/deps/npm/docs/output/commands/npm-owner.html b/deps/npm/docs/output/commands/npm-owner.html index 5bf138010b18..1c6159f6e4f6 100644 --- a/deps/npm/docs/output/commands/npm-owner.html +++ b/deps/npm/docs/output/commands/npm-owner.html @@ -141,9 +141,9 @@
-

+

npm-owner - @11.0.0 + @11.1.0

Manage package owners
diff --git a/deps/npm/docs/output/commands/npm-pack.html b/deps/npm/docs/output/commands/npm-pack.html index acc909f46c70..810b344b4669 100644 --- a/deps/npm/docs/output/commands/npm-pack.html +++ b/deps/npm/docs/output/commands/npm-pack.html @@ -141,9 +141,9 @@
-

+

npm-pack - @11.0.0 + @11.1.0

Create a tarball from a package
diff --git a/deps/npm/docs/output/commands/npm-ping.html b/deps/npm/docs/output/commands/npm-ping.html index ca4f2cabf332..5b53c9c4eb2b 100644 --- a/deps/npm/docs/output/commands/npm-ping.html +++ b/deps/npm/docs/output/commands/npm-ping.html @@ -141,9 +141,9 @@
-

+

npm-ping - @11.0.0 + @11.1.0

Ping npm registry
diff --git a/deps/npm/docs/output/commands/npm-pkg.html b/deps/npm/docs/output/commands/npm-pkg.html index 6ff0880e37ac..56a49e456c8b 100644 --- a/deps/npm/docs/output/commands/npm-pkg.html +++ b/deps/npm/docs/output/commands/npm-pkg.html @@ -141,9 +141,9 @@
-

+

npm-pkg - @11.0.0 + @11.1.0

Manages your package.json
diff --git a/deps/npm/docs/output/commands/npm-prefix.html b/deps/npm/docs/output/commands/npm-prefix.html index c72108668925..11bcf4499ea8 100644 --- a/deps/npm/docs/output/commands/npm-prefix.html +++ b/deps/npm/docs/output/commands/npm-prefix.html @@ -141,9 +141,9 @@
-

+

npm-prefix - @11.0.0 + @11.1.0

Display prefix
diff --git a/deps/npm/docs/output/commands/npm-profile.html b/deps/npm/docs/output/commands/npm-profile.html index 86705775e1c8..5ef47cb6f54c 100644 --- a/deps/npm/docs/output/commands/npm-profile.html +++ b/deps/npm/docs/output/commands/npm-profile.html @@ -141,9 +141,9 @@
-

+

npm-profile - @11.0.0 + @11.1.0

Change settings on your registry profile
diff --git a/deps/npm/docs/output/commands/npm-prune.html b/deps/npm/docs/output/commands/npm-prune.html index da263ef7fc83..b293a9afee8c 100644 --- a/deps/npm/docs/output/commands/npm-prune.html +++ b/deps/npm/docs/output/commands/npm-prune.html @@ -141,9 +141,9 @@
-

+

npm-prune - @11.0.0 + @11.1.0

Remove extraneous packages
diff --git a/deps/npm/docs/output/commands/npm-publish.html b/deps/npm/docs/output/commands/npm-publish.html index 55b32480044e..072de8db1b81 100644 --- a/deps/npm/docs/output/commands/npm-publish.html +++ b/deps/npm/docs/output/commands/npm-publish.html @@ -141,9 +141,9 @@
-

+

npm-publish - @11.0.0 + @11.1.0

Publish a package
diff --git a/deps/npm/docs/output/commands/npm-query.html b/deps/npm/docs/output/commands/npm-query.html index 7c9819a59dfc..bbf8e3757291 100644 --- a/deps/npm/docs/output/commands/npm-query.html +++ b/deps/npm/docs/output/commands/npm-query.html @@ -141,9 +141,9 @@
-

+

npm-query - @11.0.0 + @11.1.0

Dependency selector query
diff --git a/deps/npm/docs/output/commands/npm-rebuild.html b/deps/npm/docs/output/commands/npm-rebuild.html index 541163fe4546..e9f18ad34917 100644 --- a/deps/npm/docs/output/commands/npm-rebuild.html +++ b/deps/npm/docs/output/commands/npm-rebuild.html @@ -141,9 +141,9 @@
-

+

npm-rebuild - @11.0.0 + @11.1.0

Rebuild a package
diff --git a/deps/npm/docs/output/commands/npm-repo.html b/deps/npm/docs/output/commands/npm-repo.html index cf5ad3216123..371720e49d3e 100644 --- a/deps/npm/docs/output/commands/npm-repo.html +++ b/deps/npm/docs/output/commands/npm-repo.html @@ -141,9 +141,9 @@
-

+

npm-repo - @11.0.0 + @11.1.0

Open package repository page in the browser
diff --git a/deps/npm/docs/output/commands/npm-restart.html b/deps/npm/docs/output/commands/npm-restart.html index ac1ee9710a9a..4e9ae5b9c190 100644 --- a/deps/npm/docs/output/commands/npm-restart.html +++ b/deps/npm/docs/output/commands/npm-restart.html @@ -141,9 +141,9 @@
-

+

npm-restart - @11.0.0 + @11.1.0

Restart a package
diff --git a/deps/npm/docs/output/commands/npm-root.html b/deps/npm/docs/output/commands/npm-root.html index 5e51f975dd70..82a80daeea25 100644 --- a/deps/npm/docs/output/commands/npm-root.html +++ b/deps/npm/docs/output/commands/npm-root.html @@ -141,9 +141,9 @@
-

+

npm-root - @11.0.0 + @11.1.0

Display npm root
diff --git a/deps/npm/docs/output/commands/npm-run-script.html b/deps/npm/docs/output/commands/npm-run-script.html index 5d4fd8a4e632..358d05de63e8 100644 --- a/deps/npm/docs/output/commands/npm-run-script.html +++ b/deps/npm/docs/output/commands/npm-run-script.html @@ -141,9 +141,9 @@
-

+

npm-run-script - @11.0.0 + @11.1.0

Run arbitrary package scripts
diff --git a/deps/npm/docs/output/commands/npm-sbom.html b/deps/npm/docs/output/commands/npm-sbom.html index 7d57f380eb19..8539a60d11bc 100644 --- a/deps/npm/docs/output/commands/npm-sbom.html +++ b/deps/npm/docs/output/commands/npm-sbom.html @@ -141,9 +141,9 @@
-

+

npm-sbom - @11.0.0 + @11.1.0

Generate a Software Bill of Materials (SBOM)
diff --git a/deps/npm/docs/output/commands/npm-search.html b/deps/npm/docs/output/commands/npm-search.html index b109ce855945..156b625d78f6 100644 --- a/deps/npm/docs/output/commands/npm-search.html +++ b/deps/npm/docs/output/commands/npm-search.html @@ -141,9 +141,9 @@
-

+

npm-search - @11.0.0 + @11.1.0

Search for packages
diff --git a/deps/npm/docs/output/commands/npm-shrinkwrap.html b/deps/npm/docs/output/commands/npm-shrinkwrap.html index 023f5fefc3f7..a192b67b2263 100644 --- a/deps/npm/docs/output/commands/npm-shrinkwrap.html +++ b/deps/npm/docs/output/commands/npm-shrinkwrap.html @@ -141,9 +141,9 @@
-

+

npm-shrinkwrap - @11.0.0 + @11.1.0

Lock down dependency versions for publication
diff --git a/deps/npm/docs/output/commands/npm-star.html b/deps/npm/docs/output/commands/npm-star.html index 2bd9e65a79f5..e0d7524f1960 100644 --- a/deps/npm/docs/output/commands/npm-star.html +++ b/deps/npm/docs/output/commands/npm-star.html @@ -141,9 +141,9 @@
-

+

npm-star - @11.0.0 + @11.1.0

Mark your favorite packages
diff --git a/deps/npm/docs/output/commands/npm-stars.html b/deps/npm/docs/output/commands/npm-stars.html index 8ddaec6f6d3b..9151a43fdf67 100644 --- a/deps/npm/docs/output/commands/npm-stars.html +++ b/deps/npm/docs/output/commands/npm-stars.html @@ -141,9 +141,9 @@
-

+

npm-stars - @11.0.0 + @11.1.0

View packages marked as favorites
diff --git a/deps/npm/docs/output/commands/npm-start.html b/deps/npm/docs/output/commands/npm-start.html index 1b761fe4d940..4f90b59e76af 100644 --- a/deps/npm/docs/output/commands/npm-start.html +++ b/deps/npm/docs/output/commands/npm-start.html @@ -141,9 +141,9 @@
-

+

npm-start - @11.0.0 + @11.1.0

Start a package
diff --git a/deps/npm/docs/output/commands/npm-stop.html b/deps/npm/docs/output/commands/npm-stop.html index 645e4336830c..33828a29e1d5 100644 --- a/deps/npm/docs/output/commands/npm-stop.html +++ b/deps/npm/docs/output/commands/npm-stop.html @@ -141,9 +141,9 @@
-

+

npm-stop - @11.0.0 + @11.1.0

Stop a package
diff --git a/deps/npm/docs/output/commands/npm-team.html b/deps/npm/docs/output/commands/npm-team.html index 8abe275d4fbb..25263f98e440 100644 --- a/deps/npm/docs/output/commands/npm-team.html +++ b/deps/npm/docs/output/commands/npm-team.html @@ -141,9 +141,9 @@
-

+

npm-team - @11.0.0 + @11.1.0

Manage organization teams and team memberships
diff --git a/deps/npm/docs/output/commands/npm-test.html b/deps/npm/docs/output/commands/npm-test.html index f82bb32675ce..11003d317160 100644 --- a/deps/npm/docs/output/commands/npm-test.html +++ b/deps/npm/docs/output/commands/npm-test.html @@ -141,9 +141,9 @@
-

+

npm-test - @11.0.0 + @11.1.0

Test a package
diff --git a/deps/npm/docs/output/commands/npm-token.html b/deps/npm/docs/output/commands/npm-token.html index 8df68fc4426e..8623e38d30f9 100644 --- a/deps/npm/docs/output/commands/npm-token.html +++ b/deps/npm/docs/output/commands/npm-token.html @@ -141,9 +141,9 @@
-

+

npm-token - @11.0.0 + @11.1.0

Manage your authentication tokens
diff --git a/deps/npm/docs/output/commands/npm-undeprecate.html b/deps/npm/docs/output/commands/npm-undeprecate.html new file mode 100644 index 000000000000..2c90d8bd469e --- /dev/null +++ b/deps/npm/docs/output/commands/npm-undeprecate.html @@ -0,0 +1,209 @@ + + +npm-undeprecate + + + + + +
+
+

+ npm-undeprecate + @11.1.0 +

+Undeprecate a version of a package +
+ +
+

Table of contents

+ +
+ +

Synopsis

+
npm undeprecate <package-spec>
+
+

Note: This command is unaware of workspaces.

+

Description

+

This command will update the npm registry entry for a package, removing any +deprecation warnings that currently exist.

+

It works in the same way as npm deprecate, except +that this command removes deprecation warnings instead of adding them.

+

Configuration

+

registry

+ +

The base URL of the npm registry.

+

otp

+
    +
  • Default: null
  • +
  • Type: null or String
  • +
+

This is a one-time password from a two-factor authenticator. It's needed +when publishing or changing package permissions with npm access.

+

If not set, and a registry response fails with a challenge for a one-time +password, npm will prompt on the command line for one.

+

dry-run

+
    +
  • Default: false
  • +
  • Type: Boolean
  • +
+

Indicates that you don't want npm to make any changes and that it should +only report what it would have done. This can be passed into any of the +commands that modify your local installation, eg, install, update, +dedupe, uninstall, as well as pack and publish.

+

Note: This is NOT honored by other network related commands, eg dist-tags, +owner, etc.

+

See Also

+
+ + +
+ + + + \ No newline at end of file diff --git a/deps/npm/docs/output/commands/npm-uninstall.html b/deps/npm/docs/output/commands/npm-uninstall.html index e1f43ac059c8..b93a38240465 100644 --- a/deps/npm/docs/output/commands/npm-uninstall.html +++ b/deps/npm/docs/output/commands/npm-uninstall.html @@ -141,9 +141,9 @@
-

+

npm-uninstall - @11.0.0 + @11.1.0

Remove a package
diff --git a/deps/npm/docs/output/commands/npm-unpublish.html b/deps/npm/docs/output/commands/npm-unpublish.html index 4456a22d1be3..003809d7c80f 100644 --- a/deps/npm/docs/output/commands/npm-unpublish.html +++ b/deps/npm/docs/output/commands/npm-unpublish.html @@ -141,9 +141,9 @@
-

+

npm-unpublish - @11.0.0 + @11.1.0

Remove a package from the registry
diff --git a/deps/npm/docs/output/commands/npm-unstar.html b/deps/npm/docs/output/commands/npm-unstar.html index 082be228f202..1880eacf6917 100644 --- a/deps/npm/docs/output/commands/npm-unstar.html +++ b/deps/npm/docs/output/commands/npm-unstar.html @@ -141,9 +141,9 @@
-

+

npm-unstar - @11.0.0 + @11.1.0

Remove an item from your favorite packages
diff --git a/deps/npm/docs/output/commands/npm-update.html b/deps/npm/docs/output/commands/npm-update.html index 0bd67db45ba3..565078ef6192 100644 --- a/deps/npm/docs/output/commands/npm-update.html +++ b/deps/npm/docs/output/commands/npm-update.html @@ -141,9 +141,9 @@
-

+

npm-update - @11.0.0 + @11.1.0

Update packages
diff --git a/deps/npm/docs/output/commands/npm-version.html b/deps/npm/docs/output/commands/npm-version.html index e7679c65f407..3e397adbcde6 100644 --- a/deps/npm/docs/output/commands/npm-version.html +++ b/deps/npm/docs/output/commands/npm-version.html @@ -141,9 +141,9 @@
-

+

npm-version - @11.0.0 + @11.1.0

Bump a package version
diff --git a/deps/npm/docs/output/commands/npm-view.html b/deps/npm/docs/output/commands/npm-view.html index c8d4fdd52cd8..878260eab54e 100644 --- a/deps/npm/docs/output/commands/npm-view.html +++ b/deps/npm/docs/output/commands/npm-view.html @@ -141,9 +141,9 @@
-

+

npm-view - @11.0.0 + @11.1.0

View registry info
diff --git a/deps/npm/docs/output/commands/npm-whoami.html b/deps/npm/docs/output/commands/npm-whoami.html index ab9c86004719..64a60c0db822 100644 --- a/deps/npm/docs/output/commands/npm-whoami.html +++ b/deps/npm/docs/output/commands/npm-whoami.html @@ -141,9 +141,9 @@
-

+

npm-whoami - @11.0.0 + @11.1.0

Display npm username
diff --git a/deps/npm/docs/output/commands/npm.html b/deps/npm/docs/output/commands/npm.html index d3641aebcd13..c4f6974a44a7 100644 --- a/deps/npm/docs/output/commands/npm.html +++ b/deps/npm/docs/output/commands/npm.html @@ -141,9 +141,9 @@
-

+

npm - @11.0.0 + @11.1.0

javascript package manager
@@ -158,7 +158,7 @@

Table of contents

Note: This command is unaware of workspaces.

Version

-

11.0.0

+

11.1.0

Description

npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency diff --git a/deps/npm/docs/output/commands/npx.html b/deps/npm/docs/output/commands/npx.html index 39ef19db4f5c..b5d74b9ee776 100644 --- a/deps/npm/docs/output/commands/npx.html +++ b/deps/npm/docs/output/commands/npx.html @@ -141,9 +141,9 @@

-

+

npx - @11.0.0 + @11.1.0

Run a command from a local or remote npm package
diff --git a/deps/npm/docs/output/configuring-npm/folders.html b/deps/npm/docs/output/configuring-npm/folders.html index 8c5d99c58d11..d64148aaac1f 100644 --- a/deps/npm/docs/output/configuring-npm/folders.html +++ b/deps/npm/docs/output/configuring-npm/folders.html @@ -141,9 +141,9 @@
-

+

folders - @11.0.0 + @11.1.0

Folder Structures Used by npm
diff --git a/deps/npm/docs/output/configuring-npm/install.html b/deps/npm/docs/output/configuring-npm/install.html index a563910ccac7..8233ac9ff5fa 100644 --- a/deps/npm/docs/output/configuring-npm/install.html +++ b/deps/npm/docs/output/configuring-npm/install.html @@ -141,9 +141,9 @@
-

+

install - @11.0.0 + @11.1.0

Download and install node and npm
diff --git a/deps/npm/docs/output/configuring-npm/npm-global.html b/deps/npm/docs/output/configuring-npm/npm-global.html index 8c5d99c58d11..d64148aaac1f 100644 --- a/deps/npm/docs/output/configuring-npm/npm-global.html +++ b/deps/npm/docs/output/configuring-npm/npm-global.html @@ -141,9 +141,9 @@
-

+

folders - @11.0.0 + @11.1.0

Folder Structures Used by npm
diff --git a/deps/npm/docs/output/configuring-npm/npm-json.html b/deps/npm/docs/output/configuring-npm/npm-json.html index b8b847d60bac..492bbc66909f 100644 --- a/deps/npm/docs/output/configuring-npm/npm-json.html +++ b/deps/npm/docs/output/configuring-npm/npm-json.html @@ -141,9 +141,9 @@
-

+

package.json - @11.0.0 + @11.1.0

Specifics of npm's package.json handling
@@ -190,7 +190,7 @@

name

that name already, before you get too attached to it. https://www.npmjs.com/ -

A name can be optionally prefixed by a scope, e.g. @myorg/mypackage. See +

A name can be optionally prefixed by a scope, e.g. @npm/example. See scope for more detail.

version

If you plan to publish your package, the most important things in your @@ -211,7 +211,7 @@

keywords

homepage

The URL to the project homepage.

Example:

-
"homepage": "https://github.com/owner/project#readme"
+
"homepage": "https://github.com/npm/example#readme"
 

bugs

The URL to your project's issue tracker and / or the email address to which @@ -220,8 +220,8 @@

bugs

It should look like this:

{
   "bugs": {
-    "url": "https://github.com/owner/project/issues",
-    "email": "project@hostname.com"
+    "url": "https://github.com/npm/example/issues",
+    "email": "example@npmjs.com"
   }
 }
 
@@ -239,7 +239,7 @@

license

}

You can check the full list of SPDX license -IDs. Ideally you should pick one that is +IDs. Ideally, you should pick one that is OSI approved.

If your package is licensed under multiple common licenses, use an SPDX license expression syntax version 2.0 @@ -301,14 +301,14 @@

people fields: author, contributors
{
   "name" : "Barney Rubble",
-  "email" : "b@rubble.com",
-  "url" : "http://barnyrubble.tumblr.com/"
+  "email" : "barney@npmjs.com",
+  "url" : "http://barnyrubble.npmjs.com/"
 }
 

Or you can shorten that all into a single string, and npm will parse it for you:

{
-  "author": "Barney Rubble <b@rubble.com> (http://barnyrubble.tumblr.com/)"
+  "author": "Barney Rubble <barney@npmjs.com> (http://barnyrubble.npmjs.com/)"
 }
 

Both email and url are optional either way.

@@ -320,31 +320,31 @@

funding

{
   "funding": {
     "type" : "individual",
-    "url" : "http://example.com/donate"
+    "url" : "http://npmjs.com/donate"
   }
 }
 
{
   "funding": {
     "type" : "patreon",
-    "url" : "https://www.patreon.com/my-account"
+    "url" : "https://www.patreon.com/user"
   }
 }
 
{
-  "funding": "http://example.com/donate"
+  "funding": "http://npmjs.com/donate"
 }
 
{
   "funding": [
     {
       "type" : "individual",
-      "url" : "http://example.com/donate"
+      "url" : "http://npmjs.com/donate"
     },
-    "http://example.com/donateAlso",
+    "http://npmjs.com/donate-also",
     {
       "type" : "patreon",
-      "url" : "https://www.patreon.com/my-account"
+      "url" : "https://www.patreon.com/user"
     }
   ]
 }
@@ -556,9 +556,9 @@ 

repository

For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same shortcut syntax you use for npm install:

{
-  "repository": "npm/npm",
+  "repository": "npm/example",
 
-  "repository": "github:user/repo",
+  "repository": "github:npm/example",
 
   "repository": "gist:11081aaa281",
 
@@ -624,7 +624,7 @@ 

dependencies

  • user/repo See 'GitHub URLs' below
  • tag A specific version tagged and published as tag See npm dist-tag
  • path/path/path See Local Paths below
  • -
  • npm:@scope/pkg@version Custom alias for a pacakge See package-spec
  • +
  • npm:@scope/pkg@version Custom alias for a package See package-spec
  • For example, these are all valid:

    {
    @@ -634,7 +634,7 @@ 

    dependencies

    "baz": ">1.0.2 <=2.3.4", "boo": "2.0.1", "qux": "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0", - "asd": "http://asdf.com/asdf.tar.gz", + "asd": "http://npmjs.com/example.tar.gz", "til": "~1.2", "elf": "~1.2.3", "two": "2.x", @@ -695,7 +695,7 @@

    GitHub URLs

    "dependencies": { "express": "expressjs/express", "mocha": "mochajs/mocha#4727d357ea", - "module": "user/repo#feature\/branch" + "module": "npm/example-github-repo#feature\/branch" } }
    @@ -736,7 +736,7 @@

    devDependencies

    do this, and make the required package a devDependency.

    For example:

    {
    -  "name": "ethopia-waza",
    +  "name": "@npm/ethopia-waza",
       "description": "a delightfully fruity coffee varietal",
       "version": "1.2.3",
       "devDependencies": {
    @@ -760,17 +760,17 @@ 

    peerDependencies

    documentation.

    For example:

    {
    -  "name": "tea-latte",
    +  "name": "@npm/tea-latte",
       "version": "1.3.5",
       "peerDependencies": {
    -    "tea": "2.x"
    +    "@npm/tea": "2.x"
       }
     }
     
    -

    This ensures your package tea-latte can be installed along with the -second major version of the host package tea only. npm install tea-latte could possibly yield the following dependency graph:

    -
    ├── tea-latte@1.3.5
    -└── tea@2.2.0
    +

    This ensures your package @npm/tea-latte can be installed along with the +second major version of the host package @npm/tea only. npm install tea-latte could possibly yield the following dependency graph:

    +
    ├── @npm/tea-latte@1.3.5
    +└── @npm/tea@2.2.0
     

    In npm versions 3 through 6, peerDependencies were not automatically installed, and would raise a warning if an invalid version of the peer @@ -794,14 +794,14 @@

    peerDependenciesMeta

    all of them to be installed.

    For example:

    {
    -  "name": "tea-latte",
    +  "name": "@npm/tea-latte",
       "version": "1.3.5",
       "peerDependencies": {
    -    "tea": "2.x",
    -    "soy-milk": "1.2"
    +    "@npm/tea": "2.x",
    +    "@npm/soy-milk": "1.2"
       },
       "peerDependenciesMeta": {
    -    "soy-milk": {
    +    "@npm/soy-milk": {
           "optional": true
         }
       }
    @@ -817,16 +817,16 @@ 

    bundleDependencies

    For example:

    If we define a package.json like this:

    {
    -  "name": "awesome-web-framework",
    +  "name": "@npm/awesome-web-framework",
       "version": "1.0.0",
       "bundleDependencies": [
    -    "renderized",
    -    "super-streams"
    +    "@npm/renderized",
    +    "@npm/super-streams"
       ]
     }
     
    -

    we can obtain awesome-web-framework-1.0.0.tgz file by running npm pack. -This file contains the dependencies renderized and super-streams which +

    we can obtain @npm/awesome-web-framework-1.0.0.tgz file by running npm pack. +This file contains the dependencies @npm/renderized and @npm/super-streams which can be installed in a new project by executing npm install awesome-web-framework-1.0.0.tgz. Note that the package names do not include any versions, as that information is specified in dependencies.

    If this is spelled "bundledDependencies", then that is also honored.

    @@ -842,8 +842,8 @@

    optionalDependencies

    It is still your program's responsibility to handle the lack of the dependency. For example, something like this:

    try {
    -  var foo = require('foo')
    -  var fooVersion = require('foo/package.json').version
    +  var foo = require('@npm/foo')
    +  var fooVersion = require('@npm/foo/package.json').version
     } catch (er) {
       foo = null
     }
    @@ -877,51 +877,51 @@ 

    overrides

    what version your dependencies rely on:

    {
       "overrides": {
    -    "foo": "1.0.0"
    +    "@npm/foo": "1.0.0"
       }
     }
     

    The above is a short hand notation, the full object form can be used to allow overriding a package itself as well as a child of the package. This will cause -foo to always be 1.0.0 while also making bar at any depth beyond foo +@npm/foo to always be 1.0.0 while also making @npm/bar at any depth beyond @npm/foo also 1.0.0:

    {
       "overrides": {
    -    "foo": {
    +    "@npm/foo": {
           ".": "1.0.0",
    -      "bar": "1.0.0"
    +      "@npm/bar": "1.0.0"
         }
       }
     }
     
    -

    To only override foo to be 1.0.0 when it's a child (or grandchild, or great +

    To only override @npm/foo to be 1.0.0 when it's a child (or grandchild, or great grandchild, etc) of the package bar:

    {
       "overrides": {
    -    "bar": {
    -      "foo": "1.0.0"
    +    "@npm/bar": {
    +      "@npm/foo": "1.0.0"
         }
       }
     }
     
    -

    Keys can be nested to any arbitrary length. To override foo only when it's a -child of bar and only when bar is a child of baz:

    +

    Keys can be nested to any arbitrary length. To override @npm/foo only when it's a +child of @npm/bar and only when @npm/bar is a child of @npm/baz:

    {
       "overrides": {
    -    "baz": {
    -      "bar": {
    -        "foo": "1.0.0"
    +    "@npm/baz": {
    +      "@npm/bar": {
    +        "@npm/foo": "1.0.0"
           }
         }
       }
     }
     

    The key of an override can also include a version, or range of versions. -To override foo to 1.0.0, but only when it's a child of bar@2.0.0:

    +To override @npm/foo to 1.0.0, but only when it's a child of @npm/bar@2.0.0:

    {
       "overrides": {
    -    "bar@2.0.0": {
    -      "foo": "1.0.0"
    +    "@npm/bar@2.0.0": {
    +      "@npm/foo": "1.0.0"
         }
       }
     }
    @@ -933,7 +933,7 @@ 

    overrides

    package you wish the version to match with a $.

    {
       "dependencies": {
    -    "foo": "^1.0.0"
    +    "@npm/foo": "^1.0.0"
       },
       "overrides": {
         // BAD, will throw an EOVERRIDE error
    @@ -941,9 +941,9 @@ 

    overrides

    // GOOD, specs match so override is allowed // "foo": "^1.0.0" // BEST, the override is defined as a reference to the dependency - "foo": "$foo", + "@npm/foo": "$foo", // the referenced package does not need to match the overridden one - "bar": "$foo" + "@npm/bar": "$foo" } }
    diff --git a/deps/npm/docs/output/configuring-npm/npm-shrinkwrap-json.html b/deps/npm/docs/output/configuring-npm/npm-shrinkwrap-json.html index 25af90bd1bdd..bfb2af36b3fc 100644 --- a/deps/npm/docs/output/configuring-npm/npm-shrinkwrap-json.html +++ b/deps/npm/docs/output/configuring-npm/npm-shrinkwrap-json.html @@ -141,9 +141,9 @@
    -

    +

    npm-shrinkwrap.json - @11.0.0 + @11.1.0

    A publishable lockfile
    diff --git a/deps/npm/docs/output/configuring-npm/npmrc.html b/deps/npm/docs/output/configuring-npm/npmrc.html index 04cea4c5fb66..47235d09e675 100644 --- a/deps/npm/docs/output/configuring-npm/npmrc.html +++ b/deps/npm/docs/output/configuring-npm/npmrc.html @@ -141,9 +141,9 @@
    -

    +

    npmrc - @11.0.0 + @11.1.0

    The npm config files
    diff --git a/deps/npm/docs/output/configuring-npm/package-json.html b/deps/npm/docs/output/configuring-npm/package-json.html index b8b847d60bac..492bbc66909f 100644 --- a/deps/npm/docs/output/configuring-npm/package-json.html +++ b/deps/npm/docs/output/configuring-npm/package-json.html @@ -141,9 +141,9 @@
    -

    +

    package.json - @11.0.0 + @11.1.0

    Specifics of npm's package.json handling
    @@ -190,7 +190,7 @@

    name

    that name already, before you get too attached to it. https://www.npmjs.com/ -

    A name can be optionally prefixed by a scope, e.g. @myorg/mypackage. See +

    A name can be optionally prefixed by a scope, e.g. @npm/example. See scope for more detail.

    version

    If you plan to publish your package, the most important things in your @@ -211,7 +211,7 @@

    keywords

    homepage

    The URL to the project homepage.

    Example:

    -
    "homepage": "https://github.com/owner/project#readme"
    +
    "homepage": "https://github.com/npm/example#readme"
     

    bugs

    The URL to your project's issue tracker and / or the email address to which @@ -220,8 +220,8 @@

    bugs

    It should look like this:

    {
       "bugs": {
    -    "url": "https://github.com/owner/project/issues",
    -    "email": "project@hostname.com"
    +    "url": "https://github.com/npm/example/issues",
    +    "email": "example@npmjs.com"
       }
     }
     
    @@ -239,7 +239,7 @@

    license

    }

    You can check the full list of SPDX license -IDs. Ideally you should pick one that is +IDs. Ideally, you should pick one that is OSI approved.

    If your package is licensed under multiple common licenses, use an SPDX license expression syntax version 2.0 @@ -301,14 +301,14 @@

    people fields: author, contributors
    {
       "name" : "Barney Rubble",
    -  "email" : "b@rubble.com",
    -  "url" : "http://barnyrubble.tumblr.com/"
    +  "email" : "barney@npmjs.com",
    +  "url" : "http://barnyrubble.npmjs.com/"
     }
     

    Or you can shorten that all into a single string, and npm will parse it for you:

    {
    -  "author": "Barney Rubble <b@rubble.com> (http://barnyrubble.tumblr.com/)"
    +  "author": "Barney Rubble <barney@npmjs.com> (http://barnyrubble.npmjs.com/)"
     }
     

    Both email and url are optional either way.

    @@ -320,31 +320,31 @@

    funding

    {
       "funding": {
         "type" : "individual",
    -    "url" : "http://example.com/donate"
    +    "url" : "http://npmjs.com/donate"
       }
     }
     
    {
       "funding": {
         "type" : "patreon",
    -    "url" : "https://www.patreon.com/my-account"
    +    "url" : "https://www.patreon.com/user"
       }
     }
     
    {
    -  "funding": "http://example.com/donate"
    +  "funding": "http://npmjs.com/donate"
     }
     
    {
       "funding": [
         {
           "type" : "individual",
    -      "url" : "http://example.com/donate"
    +      "url" : "http://npmjs.com/donate"
         },
    -    "http://example.com/donateAlso",
    +    "http://npmjs.com/donate-also",
         {
           "type" : "patreon",
    -      "url" : "https://www.patreon.com/my-account"
    +      "url" : "https://www.patreon.com/user"
         }
       ]
     }
    @@ -556,9 +556,9 @@ 

    repository

    For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same shortcut syntax you use for npm install:

    {
    -  "repository": "npm/npm",
    +  "repository": "npm/example",
     
    -  "repository": "github:user/repo",
    +  "repository": "github:npm/example",
     
       "repository": "gist:11081aaa281",
     
    @@ -624,7 +624,7 @@ 

    dependencies

  • user/repo See 'GitHub URLs' below
  • tag A specific version tagged and published as tag See npm dist-tag
  • path/path/path See Local Paths below
  • -
  • npm:@scope/pkg@version Custom alias for a pacakge See package-spec
  • +
  • npm:@scope/pkg@version Custom alias for a package See package-spec
  • For example, these are all valid:

    {
    @@ -634,7 +634,7 @@ 

    dependencies

    "baz": ">1.0.2 <=2.3.4", "boo": "2.0.1", "qux": "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0", - "asd": "http://asdf.com/asdf.tar.gz", + "asd": "http://npmjs.com/example.tar.gz", "til": "~1.2", "elf": "~1.2.3", "two": "2.x", @@ -695,7 +695,7 @@

    GitHub URLs

    "dependencies": { "express": "expressjs/express", "mocha": "mochajs/mocha#4727d357ea", - "module": "user/repo#feature\/branch" + "module": "npm/example-github-repo#feature\/branch" } }
    @@ -736,7 +736,7 @@

    devDependencies

    do this, and make the required package a devDependency.

    For example:

    {
    -  "name": "ethopia-waza",
    +  "name": "@npm/ethopia-waza",
       "description": "a delightfully fruity coffee varietal",
       "version": "1.2.3",
       "devDependencies": {
    @@ -760,17 +760,17 @@ 

    peerDependencies

    documentation.

    For example:

    {
    -  "name": "tea-latte",
    +  "name": "@npm/tea-latte",
       "version": "1.3.5",
       "peerDependencies": {
    -    "tea": "2.x"
    +    "@npm/tea": "2.x"
       }
     }
     
    -

    This ensures your package tea-latte can be installed along with the -second major version of the host package tea only. npm install tea-latte could possibly yield the following dependency graph:

    -
    ├── tea-latte@1.3.5
    -└── tea@2.2.0
    +

    This ensures your package @npm/tea-latte can be installed along with the +second major version of the host package @npm/tea only. npm install tea-latte could possibly yield the following dependency graph:

    +
    ├── @npm/tea-latte@1.3.5
    +└── @npm/tea@2.2.0
     

    In npm versions 3 through 6, peerDependencies were not automatically installed, and would raise a warning if an invalid version of the peer @@ -794,14 +794,14 @@

    peerDependenciesMeta

    all of them to be installed.

    For example:

    {
    -  "name": "tea-latte",
    +  "name": "@npm/tea-latte",
       "version": "1.3.5",
       "peerDependencies": {
    -    "tea": "2.x",
    -    "soy-milk": "1.2"
    +    "@npm/tea": "2.x",
    +    "@npm/soy-milk": "1.2"
       },
       "peerDependenciesMeta": {
    -    "soy-milk": {
    +    "@npm/soy-milk": {
           "optional": true
         }
       }
    @@ -817,16 +817,16 @@ 

    bundleDependencies

    For example:

    If we define a package.json like this:

    {
    -  "name": "awesome-web-framework",
    +  "name": "@npm/awesome-web-framework",
       "version": "1.0.0",
       "bundleDependencies": [
    -    "renderized",
    -    "super-streams"
    +    "@npm/renderized",
    +    "@npm/super-streams"
       ]
     }
     
    -

    we can obtain awesome-web-framework-1.0.0.tgz file by running npm pack. -This file contains the dependencies renderized and super-streams which +

    we can obtain @npm/awesome-web-framework-1.0.0.tgz file by running npm pack. +This file contains the dependencies @npm/renderized and @npm/super-streams which can be installed in a new project by executing npm install awesome-web-framework-1.0.0.tgz. Note that the package names do not include any versions, as that information is specified in dependencies.

    If this is spelled "bundledDependencies", then that is also honored.

    @@ -842,8 +842,8 @@

    optionalDependencies

    It is still your program's responsibility to handle the lack of the dependency. For example, something like this:

    try {
    -  var foo = require('foo')
    -  var fooVersion = require('foo/package.json').version
    +  var foo = require('@npm/foo')
    +  var fooVersion = require('@npm/foo/package.json').version
     } catch (er) {
       foo = null
     }
    @@ -877,51 +877,51 @@ 

    overrides

    what version your dependencies rely on:

    {
       "overrides": {
    -    "foo": "1.0.0"
    +    "@npm/foo": "1.0.0"
       }
     }
     

    The above is a short hand notation, the full object form can be used to allow overriding a package itself as well as a child of the package. This will cause -foo to always be 1.0.0 while also making bar at any depth beyond foo +@npm/foo to always be 1.0.0 while also making @npm/bar at any depth beyond @npm/foo also 1.0.0:

    {
       "overrides": {
    -    "foo": {
    +    "@npm/foo": {
           ".": "1.0.0",
    -      "bar": "1.0.0"
    +      "@npm/bar": "1.0.0"
         }
       }
     }
     
    -

    To only override foo to be 1.0.0 when it's a child (or grandchild, or great +

    To only override @npm/foo to be 1.0.0 when it's a child (or grandchild, or great grandchild, etc) of the package bar:

    {
       "overrides": {
    -    "bar": {
    -      "foo": "1.0.0"
    +    "@npm/bar": {
    +      "@npm/foo": "1.0.0"
         }
       }
     }
     
    -

    Keys can be nested to any arbitrary length. To override foo only when it's a -child of bar and only when bar is a child of baz:

    +

    Keys can be nested to any arbitrary length. To override @npm/foo only when it's a +child of @npm/bar and only when @npm/bar is a child of @npm/baz:

    {
       "overrides": {
    -    "baz": {
    -      "bar": {
    -        "foo": "1.0.0"
    +    "@npm/baz": {
    +      "@npm/bar": {
    +        "@npm/foo": "1.0.0"
           }
         }
       }
     }
     

    The key of an override can also include a version, or range of versions. -To override foo to 1.0.0, but only when it's a child of bar@2.0.0:

    +To override @npm/foo to 1.0.0, but only when it's a child of @npm/bar@2.0.0:

    {
       "overrides": {
    -    "bar@2.0.0": {
    -      "foo": "1.0.0"
    +    "@npm/bar@2.0.0": {
    +      "@npm/foo": "1.0.0"
         }
       }
     }
    @@ -933,7 +933,7 @@ 

    overrides

    package you wish the version to match with a $.

    {
       "dependencies": {
    -    "foo": "^1.0.0"
    +    "@npm/foo": "^1.0.0"
       },
       "overrides": {
         // BAD, will throw an EOVERRIDE error
    @@ -941,9 +941,9 @@ 

    overrides

    // GOOD, specs match so override is allowed // "foo": "^1.0.0" // BEST, the override is defined as a reference to the dependency - "foo": "$foo", + "@npm/foo": "$foo", // the referenced package does not need to match the overridden one - "bar": "$foo" + "@npm/bar": "$foo" } }
    diff --git a/deps/npm/docs/output/configuring-npm/package-lock-json.html b/deps/npm/docs/output/configuring-npm/package-lock-json.html index 8017f0332b70..7f9499ad8a33 100644 --- a/deps/npm/docs/output/configuring-npm/package-lock-json.html +++ b/deps/npm/docs/output/configuring-npm/package-lock-json.html @@ -141,9 +141,9 @@
    -

    +

    package-lock.json - @11.0.0 + @11.1.0

    A manifestation of the manifest
    diff --git a/deps/npm/docs/output/using-npm/config.html b/deps/npm/docs/output/using-npm/config.html index 942077743374..1bf8079a0d87 100644 --- a/deps/npm/docs/output/using-npm/config.html +++ b/deps/npm/docs/output/using-npm/config.html @@ -141,9 +141,9 @@
    -

    +

    config - @11.0.0 + @11.1.0

    More than you probably want to know about npm configuration
    @@ -417,7 +417,7 @@

    cpu

    are same as cpu field of package.json, which comes from process.arch.

    depth

      -
    • Default: Infinity if --all is set, otherwise 1
    • +
    • Default: Infinity if --all is set, otherwise 0
    • Type: null or Number

    The depth to go when recursing packages for npm ls.

    diff --git a/deps/npm/docs/output/using-npm/dependency-selectors.html b/deps/npm/docs/output/using-npm/dependency-selectors.html index db54f7a6e397..45262830219e 100644 --- a/deps/npm/docs/output/using-npm/dependency-selectors.html +++ b/deps/npm/docs/output/using-npm/dependency-selectors.html @@ -141,9 +141,9 @@
    -

    +

    Dependency Selector Syntax & Querying - @11.0.0 + @11.1.0

    Dependency Selector Syntax & Querying
    diff --git a/deps/npm/docs/output/using-npm/developers.html b/deps/npm/docs/output/using-npm/developers.html index bc1479514c2e..59d26b8d7490 100644 --- a/deps/npm/docs/output/using-npm/developers.html +++ b/deps/npm/docs/output/using-npm/developers.html @@ -141,9 +141,9 @@
    -

    +

    developers - @11.0.0 + @11.1.0

    Developer Guide
    diff --git a/deps/npm/docs/output/using-npm/logging.html b/deps/npm/docs/output/using-npm/logging.html index 4760437326d3..be1ba729fe7f 100644 --- a/deps/npm/docs/output/using-npm/logging.html +++ b/deps/npm/docs/output/using-npm/logging.html @@ -141,9 +141,9 @@
    -

    +

    Logging - @11.0.0 + @11.1.0

    Why, What & How We Log
    diff --git a/deps/npm/docs/output/using-npm/orgs.html b/deps/npm/docs/output/using-npm/orgs.html index 68264d661a8b..27973694d39f 100644 --- a/deps/npm/docs/output/using-npm/orgs.html +++ b/deps/npm/docs/output/using-npm/orgs.html @@ -141,9 +141,9 @@
    -

    +

    orgs - @11.0.0 + @11.1.0

    Working with Teams & Orgs
    diff --git a/deps/npm/docs/output/using-npm/package-spec.html b/deps/npm/docs/output/using-npm/package-spec.html index b23958ad734f..b228b96c7878 100644 --- a/deps/npm/docs/output/using-npm/package-spec.html +++ b/deps/npm/docs/output/using-npm/package-spec.html @@ -141,9 +141,9 @@
    -

    +

    package-spec - @11.0.0 + @11.1.0

    Package name specifier
    diff --git a/deps/npm/docs/output/using-npm/registry.html b/deps/npm/docs/output/using-npm/registry.html index 1ab0e032dc1e..809ed4eb11e9 100644 --- a/deps/npm/docs/output/using-npm/registry.html +++ b/deps/npm/docs/output/using-npm/registry.html @@ -141,9 +141,9 @@
    -

    +

    registry - @11.0.0 + @11.1.0

    The JavaScript Package Registry
    diff --git a/deps/npm/docs/output/using-npm/removal.html b/deps/npm/docs/output/using-npm/removal.html index 8645555c8eb4..a2aa9d804e06 100644 --- a/deps/npm/docs/output/using-npm/removal.html +++ b/deps/npm/docs/output/using-npm/removal.html @@ -141,9 +141,9 @@
    -

    +

    removal - @11.0.0 + @11.1.0

    Cleaning the Slate
    diff --git a/deps/npm/docs/output/using-npm/scope.html b/deps/npm/docs/output/using-npm/scope.html index ff18511303a3..4cc380f33d17 100644 --- a/deps/npm/docs/output/using-npm/scope.html +++ b/deps/npm/docs/output/using-npm/scope.html @@ -141,9 +141,9 @@
    -

    +

    scope - @11.0.0 + @11.1.0

    Scoped packages
    diff --git a/deps/npm/docs/output/using-npm/scripts.html b/deps/npm/docs/output/using-npm/scripts.html index 33067cbd524e..f5ad43cf55c6 100644 --- a/deps/npm/docs/output/using-npm/scripts.html +++ b/deps/npm/docs/output/using-npm/scripts.html @@ -141,9 +141,9 @@
    -

    +

    scripts - @11.0.0 + @11.1.0

    How npm handles the "scripts" field
    diff --git a/deps/npm/docs/output/using-npm/workspaces.html b/deps/npm/docs/output/using-npm/workspaces.html index ebdbb7622856..631be4072c03 100644 --- a/deps/npm/docs/output/using-npm/workspaces.html +++ b/deps/npm/docs/output/using-npm/workspaces.html @@ -141,9 +141,9 @@
    -

    +

    workspaces - @11.0.0 + @11.1.0

    Working with workspaces
    diff --git a/deps/npm/lib/base-cmd.js b/deps/npm/lib/base-cmd.js index 941ffefad2ef..dcbad88a8b35 100644 --- a/deps/npm/lib/base-cmd.js +++ b/deps/npm/lib/base-cmd.js @@ -124,7 +124,6 @@ class BaseCommand { } else if (!this.npm.config.isDefault('expect-result-count')) { const expected = this.npm.config.get('expect-result-count') if (expected !== entries) { - /* eslint-disable-next-line max-len */ log.warn(this.name, `Expected ${expected} result${expected === 1 ? '' : 's'}, got ${entries}`) process.exitCode = 1 } diff --git a/deps/npm/lib/cli/entry.js b/deps/npm/lib/cli/entry.js index f36bc59feaec..dd9b39973f8a 100644 --- a/deps/npm/lib/cli/entry.js +++ b/deps/npm/lib/cli/entry.js @@ -1,5 +1,3 @@ -/* eslint-disable max-len */ - // Separated out for easier unit testing module.exports = async (process, validateEngines) => { // set it here so that regardless of what happens later, we don't diff --git a/deps/npm/lib/cli/validate-engines.js b/deps/npm/lib/cli/validate-engines.js index cf5315a25dce..971cc6bb5186 100644 --- a/deps/npm/lib/cli/validate-engines.js +++ b/deps/npm/lib/cli/validate-engines.js @@ -11,10 +11,8 @@ const npm = `v${version}` module.exports = (process, getCli) => { const node = process.version - /* eslint-disable-next-line max-len */ const unsupportedMessage = `npm ${npm} does not support Node.js ${node}. This version of npm supports the following node versions: \`${engines}\`. You can find the latest version at https://nodejs.org/.` - /* eslint-disable-next-line max-len */ const brokenMessage = `ERROR: npm ${npm} is known not to run on Node.js ${node}. This version of npm supports the following node versions: \`${engines}\`. You can find the latest version at https://nodejs.org/.` // coverage ignored because this is only hit in very unsupported node versions diff --git a/deps/npm/lib/commands/cache.js b/deps/npm/lib/commands/cache.js index 45d308a57d0c..ddfeeb818a81 100644 --- a/deps/npm/lib/commands/cache.js +++ b/deps/npm/lib/commands/cache.js @@ -10,7 +10,6 @@ const localeCompare = require('@isaacs/string-locale-compare')('en') const { log, output } = require('proc-log') const searchCachePackage = async (path, parsed, cacheKeys) => { - /* eslint-disable-next-line max-len */ const searchMFH = new RegExp(`^make-fetch-happen:request-cache:.*(? semver.satisfies(v, spec, { includePrerelease: true })) + const dryRun = this.npm.config.get('dry-run') + if (versions.length) { for (const v of versions) { packument.versions[v].deprecated = msg + if (msg) { + log.notice(`deprecating ${packument.name}@${v} with message "${msg}"`) + } else { + log.notice(`undeprecating ${packument.name}@${v}`) + } + } + if (!dryRun) { + return otplease(this.npm, this.npm.flatOptions, opts => npmFetch(uri, { + ...opts, + spec: p, + method: 'PUT', + body: packument, + ignoreBody: true, + })) } - return otplease(this.npm, this.npm.flatOptions, opts => npmFetch(uri, { - ...opts, - spec: p, - method: 'PUT', - body: packument, - ignoreBody: true, - })) } else { log.warn('deprecate', 'No version found for', p.rawSpec) } diff --git a/deps/npm/lib/commands/doctor.js b/deps/npm/lib/commands/doctor.js index 8f87fdc17891..a537478bee3f 100644 --- a/deps/npm/lib/commands/doctor.js +++ b/deps/npm/lib/commands/doctor.js @@ -128,7 +128,6 @@ class Doctor extends BaseCommand { if (!allOk) { if (this.npm.silent) { - /* eslint-disable-next-line max-len */ throw new Error('Some problems found. Check logs or disable silent mode for recommendations.') } else { throw new Error('Some problems found. See above for recommendations.') diff --git a/deps/npm/lib/commands/install.js b/deps/npm/lib/commands/install.js index 71f4229bb256..e573cb8e4911 100644 --- a/deps/npm/lib/commands/install.js +++ b/deps/npm/lib/commands/install.js @@ -115,7 +115,6 @@ class Install extends ArboristWorkspaceCmd { if (forced) { log.warn( 'install', - /* eslint-disable-next-line max-len */ `Forcing global npm install with incompatible version ${npmManifest.version} into node ${process.version}` ) } else { diff --git a/deps/npm/lib/commands/org.js b/deps/npm/lib/commands/org.js index 613498056f55..3daf9e550fb7 100644 --- a/deps/npm/lib/commands/org.js +++ b/deps/npm/lib/commands/org.js @@ -61,7 +61,6 @@ class Org extends BaseCommand { if (!['owner', 'admin', 'developer'].find(x => x === role)) { throw new Error( - /* eslint-disable-next-line max-len */ 'Third argument `role` must be one of `owner`, `admin`, or `developer`, with `developer` being the default value if omitted.' ) } diff --git a/deps/npm/lib/commands/publish.js b/deps/npm/lib/commands/publish.js index c59588fefb24..1967e05a2353 100644 --- a/deps/npm/lib/commands/publish.js +++ b/deps/npm/lib/commands/publish.js @@ -61,7 +61,6 @@ class Publish extends BaseCommand { if (err.code !== 'EPRIVATE') { throw err } - // eslint-disable-next-line max-len log.warn('publish', `Skipping workspace ${this.npm.chalk.cyan(name)}, marked as ${this.npm.chalk.bold('private')}`) } } @@ -115,12 +114,14 @@ class Publish extends BaseCommand { // so that we send the latest and greatest thing to the registry // note that publishConfig might have changed as well! manifest = await this.#getManifest(spec, opts, true) + const force = this.npm.config.get('force') + const isDefaultTag = this.npm.config.isDefault('tag') && !manifest.publishConfig?.tag - const isPreRelease = Boolean(semver.parse(manifest.version).prerelease.length) - const isDefaultTag = this.npm.config.isDefault('tag') - - if (isPreRelease && isDefaultTag) { - throw new Error('You must specify a tag using --tag when publishing a prerelease version.') + if (!force) { + const isPreRelease = Boolean(semver.parse(manifest.version).prerelease.length) + if (isPreRelease && isDefaultTag) { + throw new Error('You must specify a tag using --tag when publishing a prerelease version.') + } } // If we are not in JSON mode then we show the user the contents of the tarball @@ -157,12 +158,18 @@ class Publish extends BaseCommand { } } - const latestVersion = await this.#latestPublishedVersion(resolved, registry) - const latestSemverIsGreater = !!latestVersion && semver.gte(latestVersion, manifest.version) - - if (latestSemverIsGreater && isDefaultTag) { + if (!force) { + const { highestVersion, versions } = await this.#registryVersions(resolved, registry) /* eslint-disable-next-line max-len */ - throw new Error(`Cannot implicitly apply the "latest" tag because published version ${latestVersion} is higher than the new version ${manifest.version}. You must specify a tag using --tag.`) + const highestVersionIsGreater = !!highestVersion && semver.gte(highestVersion, manifest.version) + + if (versions.includes(manifest.version)) { + throw new Error(`You cannot publish over the previously published versions: ${manifest.version}.`) + } + + if (highestVersionIsGreater && isDefaultTag) { + throw new Error(`Cannot implicitly apply the "latest" tag because previously published version ${highestVersion} is higher than the new version ${manifest.version}. You must specify a tag using --tag.`) + } } const access = opts.access === null ? 'default' : opts.access @@ -204,7 +211,7 @@ class Publish extends BaseCommand { } } - async #latestPublishedVersion (spec, registry) { + async #registryVersions (spec, registry) { try { const packument = await pacote.packument(spec, { ...this.npm.flatOptions, @@ -212,17 +219,22 @@ class Publish extends BaseCommand { registry, }) if (typeof packument?.versions === 'undefined') { - return null + return { versions: [], highestVersion: null } } const ordered = Object.keys(packument?.versions) .flatMap(v => { const s = new semver.SemVer(v) - return s.prerelease.length > 0 ? [] : s + if ((s.prerelease.length > 0) || packument.versions[v].deprecated) { + return [] + } + return s }) .sort((a, b) => b.compare(a)) - return ordered.length >= 1 ? ordered[0].version : null + const highestVersion = ordered.length >= 1 ? ordered[0].version : null + const versions = ordered.map(v => v.version) + return { versions, highestVersion } } catch (e) { - return null + return { versions: [], highestVersion: null } } } @@ -235,7 +247,6 @@ class Publish extends BaseCommand { const changes = [] const pkg = await pkgJson.fix(spec.fetchSpec, { changes }) if (changes.length && logWarnings) { - /* eslint-disable-next-line max-len */ log.warn('publish', 'npm auto-corrected some errors in your package.json when publishing. Please run "npm pkg fix" to address these errors.') log.warn('publish', `errors corrected:\n${changes.join('\n')}`) } diff --git a/deps/npm/lib/commands/sbom.js b/deps/npm/lib/commands/sbom.js index 278c6d506b42..9b06af4e0d3f 100644 --- a/deps/npm/lib/commands/sbom.js +++ b/deps/npm/lib/commands/sbom.js @@ -27,7 +27,6 @@ class SBOM extends BaseCommand { const packageLockOnly = this.npm.config.get('package-lock-only') if (!sbomFormat) { - /* eslint-disable-next-line max-len */ throw this.usageError(`Must specify --sbom-format flag with one of: ${SBOM_FORMATS.join(', ')}.`) } @@ -40,7 +39,6 @@ class SBOM extends BaseCommand { const arb = new Arborist(opts) const tree = packageLockOnly ? await arb.loadVirtual(opts).catch(() => { - /* eslint-disable-next-line max-len */ throw this.usageError('A package lock or shrinkwrap file is required in package-lock-only mode') }) : await arb.loadActual(opts) diff --git a/deps/npm/lib/commands/token.js b/deps/npm/lib/commands/token.js index d2e85ffe5a54..fac55d46e0c3 100644 --- a/deps/npm/lib/commands/token.js +++ b/deps/npm/lib/commands/token.js @@ -73,7 +73,6 @@ class Token extends BaseCommand { for (const token of tokens) { const level = token.readonly ? 'Read only token' : 'Publish token' const created = String(token.created).slice(0, 10) - /* eslint-disable-next-line max-len */ output.standard(`${chalk.blue(level)} ${token.token}… with id ${chalk.cyan(token.id)} created ${created}`) if (token.cidr_whitelist) { output.standard(`with IP whitelist: ${chalk.green(token.cidr_whitelist.join(','))}`) @@ -99,7 +98,6 @@ class Token extends BaseCommand { toRemove.push(matches[0].key) } else if (matches.length > 1) { throw new Error( - /* eslint-disable-next-line max-len */ `Token ID "${id}" was ambiguous, a new token may have been created since you last ran \`npm token list\`.` ) } else { diff --git a/deps/npm/lib/commands/undeprecate.js b/deps/npm/lib/commands/undeprecate.js new file mode 100644 index 000000000000..79ce66bbe560 --- /dev/null +++ b/deps/npm/lib/commands/undeprecate.js @@ -0,0 +1,13 @@ +const Deprecate = require('./deprecate.js') + +class Undeprecate extends Deprecate { + static description = 'Undeprecate a version of a package' + static name = 'undeprecate' + static usage = [''] + + async exec ([pkg]) { + return super.exec([pkg, '']) + } +} + +module.exports = Undeprecate diff --git a/deps/npm/lib/commands/version.js b/deps/npm/lib/commands/version.js index d6c2dd4caed7..1d1a6753c70d 100644 --- a/deps/npm/lib/commands/version.js +++ b/deps/npm/lib/commands/version.js @@ -22,7 +22,6 @@ class Version extends BaseCommand { static workspaces = true static ignoreImplicitWorkspace = false - /* eslint-disable-next-line max-len */ static usage = ['[ | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git]'] static async completion (opts) { diff --git a/deps/npm/lib/utils/cmd-list.js b/deps/npm/lib/utils/cmd-list.js index 039d6ffddeb1..96eb0974a2ed 100644 --- a/deps/npm/lib/utils/cmd-list.js +++ b/deps/npm/lib/utils/cmd-list.js @@ -62,6 +62,7 @@ const commands = [ 'team', 'test', 'token', + 'undeprecate', 'uninstall', 'unpublish', 'unstar', diff --git a/deps/npm/lib/utils/did-you-mean.js b/deps/npm/lib/utils/did-you-mean.js index 7428ed5df85e..deec803c9b71 100644 --- a/deps/npm/lib/utils/did-you-mean.js +++ b/deps/npm/lib/utils/did-you-mean.js @@ -19,7 +19,6 @@ const didYouMean = (pkg, scmd) => { .map(str => [`run ${str}`, `run the "${str}" package script`]), ...Object.keys(bin) .filter(cmd => isClose(scmd, cmd)) - /* eslint-disable-next-line max-len */ .map(str => [`exec ${str}`, `run the "${str}" command from either this or a remote npm package`]), ] diff --git a/deps/npm/lib/utils/format-search-stream.js b/deps/npm/lib/utils/format-search-stream.js index b70bd915123d..6d4e20a2d634 100644 --- a/deps/npm/lib/utils/format-search-stream.js +++ b/deps/npm/lib/utils/format-search-stream.js @@ -1,4 +1,3 @@ -/* eslint-disable max-len */ const { stripVTControlCharacters: strip } = require('node:util') const { Minipass } = require('minipass') @@ -82,7 +81,11 @@ class TextOutputStream extends Minipass { constructor (opts) { super() - this.#args = opts.args.map(s => s.toLowerCase()).filter(Boolean) + // Consider a search for "cowboys" and "boy". If we highlight "boys" first the "cowboys" string will no longer string match because of the ansi highlighting added to "boys". If we highlight "boy" second then the ansi reset at the end will make the highlighting only on "cowboy" with a normal "s". Neither is perfect but at least the first option doesn't do partial highlighting. So, we sort strings smaller to larger + this.#args = opts.args + .map(s => s.toLowerCase()) + .filter(Boolean) + .sort((a, b) => a.length - b.length) this.#chalk = opts.npm.chalk this.#exclude = opts.exclude this.#parseable = opts.parseable @@ -124,38 +127,17 @@ class TextOutputStream extends Minipass { } }).join(' ') - let description = [] - for (const arg of this.#args) { - const finder = pkg.description.toLowerCase().split(arg.toLowerCase()) - let p = 0 - for (const f of finder) { - description.push(pkg.description.slice(p, p + f.length)) - const word = pkg.description.slice(p + f.length, p + f.length + arg.length) - description.push(this.#chalk.cyan(word)) - p += f.length + arg.length - } - } - description = description.filter(Boolean) - let name = pkg.name + const description = this.#highlight(pkg.description) + let name if (this.#args.includes(pkg.name)) { name = this.#chalk.cyan(pkg.name) } else { - name = [] - for (const arg of this.#args) { - const finder = pkg.name.toLowerCase().split(arg.toLowerCase()) - let p = 0 - for (const f of finder) { - name.push(pkg.name.slice(p, p + f.length)) - const word = pkg.name.slice(p + f.length, p + f.length + arg.length) - name.push(this.#chalk.cyan(word)) - p += f.length + arg.length - } - } - name = this.#chalk.blue(name.join('')) + name = this.#highlight(pkg.name) + name = this.#chalk.blue(name) } if (description.length) { - output = `${name}\n${description.join('')}\n` + output = `${name}\n${description}\n` } else { output = `${name}\n` } @@ -171,4 +153,21 @@ class TextOutputStream extends Minipass { output += `${this.#chalk.blue(`https://npm.im/${pkg.name}`)}\n` return super.write(output) } + + #highlight (input) { + let output = input + for (const arg of this.#args) { + let i = output.toLowerCase().indexOf(arg) + while (i > -1) { + const highlit = this.#chalk.cyan(output.slice(i, i + arg.length)) + output = [ + output.slice(0, i), + highlit, + output.slice(i + arg.length), + ].join('') + i = output.toLowerCase().indexOf(arg, i + highlit.length) + } + } + return output + } } diff --git a/deps/npm/lib/utils/reify-output.js b/deps/npm/lib/utils/reify-output.js index 025479f0c8e6..109196d4c069 100644 --- a/deps/npm/lib/utils/reify-output.js +++ b/deps/npm/lib/utils/reify-output.js @@ -50,7 +50,6 @@ const reifyOutput = (npm, arb) => { switch (d.action) { case 'REMOVE': if (showDiff) { - /* eslint-disable-next-line max-len */ output.standard(`${chalk.blue('remove')} ${d.actual.name} ${d.actual.package.version}`) } summary.removed++ @@ -63,7 +62,6 @@ const reifyOutput = (npm, arb) => { break case 'CHANGE': if (showDiff) { - /* eslint-disable-next-line max-len */ output.standard(`${chalk.cyan('change')} ${d.actual.name} ${d.actual.package.version} => ${d.ideal.package.version}`) } summary.changed++ diff --git a/deps/npm/lib/utils/sbom-cyclonedx.js b/deps/npm/lib/utils/sbom-cyclonedx.js index f3bab2800095..e09d2486e21c 100644 --- a/deps/npm/lib/utils/sbom-cyclonedx.js +++ b/deps/npm/lib/utils/sbom-cyclonedx.js @@ -8,7 +8,6 @@ const CYCLONEDX_SCHEMA = 'http://cyclonedx.org/schema/bom-1.5.schema.json' const CYCLONEDX_FORMAT = 'CycloneDX' const CYCLONEDX_SCHEMA_VERSION = '1.5' -const PROP_PATH = 'cdx:npm:package:path' const PROP_BUNDLED = 'cdx:npm:package:bundled' const PROP_DEVELOPMENT = 'cdx:npm:package:development' const PROP_EXTRANEOUS = 'cdx:npm:package:extraneous' @@ -31,19 +30,18 @@ const cyclonedxOutput = ({ npm, nodes, packageType, packageLockOnly }) => { const childNodes = nodes.filter(node => !node.isRoot && !node.isLink) const uuid = crypto.randomUUID() - const deps = [] - const seen = new Set() - for (let node of nodes) { - if (node.isLink) { - node = node.target + // Create list of child nodes w/ unique IDs + const childNodeMap = new Map() + for (const item of childNodes) { + const id = toCyclonedxID(item) + if (!childNodeMap.has(id)) { + childNodeMap.set(id, item) } - - if (seen.has(node)) { - continue - } - seen.add(node) - deps.push(toCyclonedxDependency(node, nodes)) } + const uniqueChildNodes = Array.from(childNodeMap.values()) + + const deps = [rootNode, ...uniqueChildNodes] + .map(node => toCyclonedxDependency(node, nodes)) const bom = { $schema: CYCLONEDX_SCHEMA, @@ -65,7 +63,7 @@ const cyclonedxOutput = ({ npm, nodes, packageType, packageLockOnly }) => { ], component: toCyclonedxItem(rootNode, { packageType }), }, - components: childNodes.map(toCyclonedxItem), + components: uniqueChildNodes.map(toCyclonedxItem), dependencies: deps, } @@ -109,10 +107,7 @@ const toCyclonedxItem = (node, { packageType }) => { : (node.package?.author || undefined), description: node.package?.description || undefined, purl: purl, - properties: [{ - name: PROP_PATH, - value: node.location, - }], + properties: [], externalReferences: [], } diff --git a/deps/npm/lib/utils/sbom-spdx.js b/deps/npm/lib/utils/sbom-spdx.js index 16aed1865676..7f6ce0580ed4 100644 --- a/deps/npm/lib/utils/sbom-spdx.js +++ b/deps/npm/lib/utils/sbom-spdx.js @@ -26,6 +26,16 @@ const spdxOutput = ({ npm, nodes, packageType }) => { const uuid = crypto.randomUUID() const ns = `http://spdx.org/spdxdocs/${npa(rootID).escapedName}-${rootNode.version}-${uuid}` + // Create list of child nodes w/ unique IDs + const childNodeMap = new Map() + for (const item of childNodes) { + const id = toSpdxID(item) + if (!childNodeMap.has(id)) { + childNodeMap.set(id, item) + } + } + const uniqueChildNodes = Array.from(childNodeMap.values()) + const relationships = [] const seen = new Set() for (let node of nodes) { @@ -65,7 +75,7 @@ const spdxOutput = ({ npm, nodes, packageType }) => { ], }, documentDescribes: [toSpdxID(rootNode)], - packages: [toSpdxItem(rootNode, { packageType }), ...childNodes.map(toSpdxItem)], + packages: [toSpdxItem(rootNode, { packageType }), ...uniqueChildNodes.map(toSpdxItem)], relationships: [ { spdxElementId: SPDX_IDENTIFER, diff --git a/deps/npm/lib/utils/tar.js b/deps/npm/lib/utils/tar.js index 63ef6067acb9..a744dca31325 100644 --- a/deps/npm/lib/utils/tar.js +++ b/deps/npm/lib/utils/tar.js @@ -36,7 +36,6 @@ const logTar = (tarball, { unicode = false, json, key } = {}) => { log.notice('', `package size: ${formatBytes(tarball.size)}`) log.notice('', `unpacked size: ${formatBytes(tarball.unpackedSize)}`) log.notice('', `shasum: ${tarball.shasum}`) - /* eslint-disable-next-line max-len */ log.notice('', `integrity: ${tarball.integrity.toString().slice(0, 20)}[...]${tarball.integrity.toString().slice(80)}`) if (tarball.bundled.length) { log.notice('', `bundled deps: ${tarball.bundled.length}`) diff --git a/deps/npm/lib/utils/verify-signatures.js b/deps/npm/lib/utils/verify-signatures.js index 0a32742b5ee2..73a96cfe1648 100644 --- a/deps/npm/lib/utils/verify-signatures.js +++ b/deps/npm/lib/utils/verify-signatures.js @@ -75,10 +75,8 @@ class VerifySignatures { const verifiedBold = this.npm.chalk.bold('verified') if (this.verifiedSignatureCount) { if (this.verifiedSignatureCount === 1) { - /* eslint-disable-next-line max-len */ output.standard(`${this.verifiedSignatureCount} package has a ${verifiedBold} registry signature`) } else { - /* eslint-disable-next-line max-len */ output.standard(`${this.verifiedSignatureCount} packages have ${verifiedBold} registry signatures`) } output.standard('') @@ -86,10 +84,8 @@ class VerifySignatures { if (this.verifiedAttestationCount) { if (this.verifiedAttestationCount === 1) { - /* eslint-disable-next-line max-len */ output.standard(`${this.verifiedAttestationCount} package has a ${verifiedBold} attestation`) } else { - /* eslint-disable-next-line max-len */ output.standard(`${this.verifiedAttestationCount} packages have ${verifiedBold} attestations`) } output.standard('') @@ -98,10 +94,8 @@ class VerifySignatures { if (missing.length) { const missingClr = this.npm.chalk.redBright('missing') if (missing.length === 1) { - /* eslint-disable-next-line max-len */ output.standard(`1 package has a ${missingClr} registry signature but the registry is providing signing keys:`) } else { - /* eslint-disable-next-line max-len */ output.standard(`${missing.length} packages have ${missingClr} registry signatures but the registry is providing signing keys:`) } output.standard('') @@ -121,7 +115,6 @@ class VerifySignatures { if (invalidSignatures.length === 1) { output.standard(`1 package has an ${invalidClr} registry signature:`) } else { - /* eslint-disable-next-line max-len */ output.standard(`${invalidSignatures.length} packages have ${invalidClr} registry signatures:`) } output.standard('') @@ -136,7 +129,6 @@ class VerifySignatures { if (invalidAttestations.length === 1) { output.standard(`1 package has an ${invalidClr} attestation:`) } else { - /* eslint-disable-next-line max-len */ output.standard(`${invalidAttestations.length} packages have ${invalidClr} attestations:`) } output.standard('') @@ -147,10 +139,8 @@ class VerifySignatures { } if (invalid.length === 1) { - /* eslint-disable-next-line max-len */ output.standard(`Someone might have tampered with this package since it was published on the registry!`) } else { - /* eslint-disable-next-line max-len */ output.standard(`Someone might have tampered with these packages since they were published on the registry!`) } output.standard('') diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1 index 7352f7065abb..7b38ff1c849c 100644 --- a/deps/npm/man/man1/npm-access.1 +++ b/deps/npm/man/man1/npm-access.1 @@ -1,4 +1,4 @@ -.TH "NPM-ACCESS" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-ACCESS" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-access\fR - Set access level on published packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1 index 283274b7b9b0..50edafaf08d1 100644 --- a/deps/npm/man/man1/npm-adduser.1 +++ b/deps/npm/man/man1/npm-adduser.1 @@ -1,4 +1,4 @@ -.TH "NPM-ADDUSER" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-ADDUSER" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-adduser\fR - Add a registry user account .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-audit.1 b/deps/npm/man/man1/npm-audit.1 index 39236214f2dc..1134cd3f1f6c 100644 --- a/deps/npm/man/man1/npm-audit.1 +++ b/deps/npm/man/man1/npm-audit.1 @@ -1,4 +1,4 @@ -.TH "NPM-AUDIT" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-AUDIT" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-audit\fR - Run a security audit .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1 index a4cccc82794e..b0ead3745765 100644 --- a/deps/npm/man/man1/npm-bugs.1 +++ b/deps/npm/man/man1/npm-bugs.1 @@ -1,4 +1,4 @@ -.TH "NPM-BUGS" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-BUGS" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-bugs\fR - Report bugs for a package in a web browser .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1 index c1d5a37fdc8f..942fd3050cb8 100644 --- a/deps/npm/man/man1/npm-cache.1 +++ b/deps/npm/man/man1/npm-cache.1 @@ -1,4 +1,4 @@ -.TH "NPM-CACHE" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-CACHE" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-cache\fR - Manipulates packages cache .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-ci.1 b/deps/npm/man/man1/npm-ci.1 index 5eb18d43735f..c06d8bd5fcc8 100644 --- a/deps/npm/man/man1/npm-ci.1 +++ b/deps/npm/man/man1/npm-ci.1 @@ -1,4 +1,4 @@ -.TH "NPM-CI" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-CI" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-ci\fR - Clean install a project .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1 index 260445e84df4..f60b14f3e615 100644 --- a/deps/npm/man/man1/npm-completion.1 +++ b/deps/npm/man/man1/npm-completion.1 @@ -1,4 +1,4 @@ -.TH "NPM-COMPLETION" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-COMPLETION" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-completion\fR - Tab Completion for npm .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1 index 11461b0eedb8..00dbde65a8ab 100644 --- a/deps/npm/man/man1/npm-config.1 +++ b/deps/npm/man/man1/npm-config.1 @@ -1,4 +1,4 @@ -.TH "NPM-CONFIG" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-CONFIG" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-config\fR - Manage the npm configuration files .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1 index 4753980016b3..3431b75f8dae 100644 --- a/deps/npm/man/man1/npm-dedupe.1 +++ b/deps/npm/man/man1/npm-dedupe.1 @@ -1,4 +1,4 @@ -.TH "NPM-DEDUPE" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-DEDUPE" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-dedupe\fR - Reduce duplication in the package tree .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1 index 80ff50236102..8f540f533745 100644 --- a/deps/npm/man/man1/npm-deprecate.1 +++ b/deps/npm/man/man1/npm-deprecate.1 @@ -1,4 +1,4 @@ -.TH "NPM-DEPRECATE" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-DEPRECATE" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-deprecate\fR - Deprecate a version of a package .SS "Synopsis" @@ -58,6 +58,18 @@ Type: null or String This is a one-time password from a two-factor authenticator. It's needed when publishing or changing package permissions with \fBnpm access\fR. .P If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one. +.SS "\fBdry-run\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, \fBinstall\fR, \fBupdate\fR, \fBdedupe\fR, \fBuninstall\fR, as well as \fBpack\fR and \fBpublish\fR. +.P +Note: This is NOT honored by other network related commands, eg \fBdist-tags\fR, \fBowner\fR, etc. .SS "See Also" .RS 0 .IP \(bu 4 diff --git a/deps/npm/man/man1/npm-diff.1 b/deps/npm/man/man1/npm-diff.1 index 442ea98f4823..e6e4acd100a2 100644 --- a/deps/npm/man/man1/npm-diff.1 +++ b/deps/npm/man/man1/npm-diff.1 @@ -1,4 +1,4 @@ -.TH "NPM-DIFF" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-DIFF" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-diff\fR - The registry diff command .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1 index 839891720c68..e8b3b13c36f6 100644 --- a/deps/npm/man/man1/npm-dist-tag.1 +++ b/deps/npm/man/man1/npm-dist-tag.1 @@ -1,4 +1,4 @@ -.TH "NPM-DIST-TAG" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-DIST-TAG" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-dist-tag\fR - Modify package distribution tags .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1 index fa1ecaa6cd7e..b3e87a00445a 100644 --- a/deps/npm/man/man1/npm-docs.1 +++ b/deps/npm/man/man1/npm-docs.1 @@ -1,4 +1,4 @@ -.TH "NPM-DOCS" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-DOCS" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-docs\fR - Open documentation for a package in a web browser .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-doctor.1 b/deps/npm/man/man1/npm-doctor.1 index 8924a8158fa7..7d6592112262 100644 --- a/deps/npm/man/man1/npm-doctor.1 +++ b/deps/npm/man/man1/npm-doctor.1 @@ -1,4 +1,4 @@ -.TH "NPM-DOCTOR" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-DOCTOR" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-doctor\fR - Check the health of your npm environment .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1 index dc41757464b8..7bb62811bdd7 100644 --- a/deps/npm/man/man1/npm-edit.1 +++ b/deps/npm/man/man1/npm-edit.1 @@ -1,4 +1,4 @@ -.TH "NPM-EDIT" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-EDIT" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-edit\fR - Edit an installed package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-exec.1 b/deps/npm/man/man1/npm-exec.1 index a959ff3e72e4..90f755098dc7 100644 --- a/deps/npm/man/man1/npm-exec.1 +++ b/deps/npm/man/man1/npm-exec.1 @@ -1,4 +1,4 @@ -.TH "NPM-EXEC" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-EXEC" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-exec\fR - Run a command from a local or remote npm package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-explain.1 b/deps/npm/man/man1/npm-explain.1 index efef3975aa28..d504596badf1 100644 --- a/deps/npm/man/man1/npm-explain.1 +++ b/deps/npm/man/man1/npm-explain.1 @@ -1,4 +1,4 @@ -.TH "NPM-EXPLAIN" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-EXPLAIN" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-explain\fR - Explain installed packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1 index 47b672d843ff..b53b2d1fa232 100644 --- a/deps/npm/man/man1/npm-explore.1 +++ b/deps/npm/man/man1/npm-explore.1 @@ -1,4 +1,4 @@ -.TH "NPM-EXPLORE" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-EXPLORE" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-explore\fR - Browse an installed package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-find-dupes.1 b/deps/npm/man/man1/npm-find-dupes.1 index bc302ea52551..b73f941530a0 100644 --- a/deps/npm/man/man1/npm-find-dupes.1 +++ b/deps/npm/man/man1/npm-find-dupes.1 @@ -1,4 +1,4 @@ -.TH "NPM-FIND-DUPES" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-FIND-DUPES" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-find-dupes\fR - Find duplication in the package tree .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-fund.1 b/deps/npm/man/man1/npm-fund.1 index 86b8034a0747..a518906b34a1 100644 --- a/deps/npm/man/man1/npm-fund.1 +++ b/deps/npm/man/man1/npm-fund.1 @@ -1,4 +1,4 @@ -.TH "NPM-FUND" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-FUND" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-fund\fR - Retrieve funding information .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1 index 7178197085b9..343fa1da2d31 100644 --- a/deps/npm/man/man1/npm-help-search.1 +++ b/deps/npm/man/man1/npm-help-search.1 @@ -1,4 +1,4 @@ -.TH "NPM-HELP-SEARCH" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-HELP-SEARCH" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-help-search\fR - Search npm help documentation .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1 index 09e59985599d..953c83975ec0 100644 --- a/deps/npm/man/man1/npm-help.1 +++ b/deps/npm/man/man1/npm-help.1 @@ -1,4 +1,4 @@ -.TH "NPM-HELP" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-HELP" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-help\fR - Get help on npm .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1 index ace9295a8a95..81b6da737c93 100644 --- a/deps/npm/man/man1/npm-init.1 +++ b/deps/npm/man/man1/npm-init.1 @@ -1,4 +1,4 @@ -.TH "NPM-INIT" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-INIT" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-init\fR - Create a package.json file .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-install-ci-test.1 b/deps/npm/man/man1/npm-install-ci-test.1 index 72fc3a8595d2..d15833cf2e5f 100644 --- a/deps/npm/man/man1/npm-install-ci-test.1 +++ b/deps/npm/man/man1/npm-install-ci-test.1 @@ -1,4 +1,4 @@ -.TH "NPM-INSTALL-CI-TEST" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-INSTALL-CI-TEST" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-install-ci-test\fR - Install a project with a clean slate and run tests .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1 index 20320bba890e..c417669d643c 100644 --- a/deps/npm/man/man1/npm-install-test.1 +++ b/deps/npm/man/man1/npm-install-test.1 @@ -1,4 +1,4 @@ -.TH "NPM-INSTALL-TEST" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-INSTALL-TEST" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-install-test\fR - Install package(s) and run tests .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1 index 3b32711397ba..aed560e29998 100644 --- a/deps/npm/man/man1/npm-install.1 +++ b/deps/npm/man/man1/npm-install.1 @@ -1,4 +1,4 @@ -.TH "NPM-INSTALL" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-INSTALL" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-install\fR - Install a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1 index 0ed6887d3c0d..f77a5d0a7fb2 100644 --- a/deps/npm/man/man1/npm-link.1 +++ b/deps/npm/man/man1/npm-link.1 @@ -1,4 +1,4 @@ -.TH "NPM-LINK" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-LINK" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-link\fR - Symlink a package folder .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-login.1 b/deps/npm/man/man1/npm-login.1 index e7e7cc4cd88b..70363b90ff00 100644 --- a/deps/npm/man/man1/npm-login.1 +++ b/deps/npm/man/man1/npm-login.1 @@ -1,4 +1,4 @@ -.TH "NPM-LOGIN" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-LOGIN" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-login\fR - Login to a registry user account .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1 index 97d75001502a..0eb823691ad0 100644 --- a/deps/npm/man/man1/npm-logout.1 +++ b/deps/npm/man/man1/npm-logout.1 @@ -1,4 +1,4 @@ -.TH "NPM-LOGOUT" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-LOGOUT" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-logout\fR - Log out of the registry .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index 15e44a19c676..9ab042a29a34 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -1,4 +1,4 @@ -.TH "NPM-LS" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-LS" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-ls\fR - List installed packages .SS "Synopsis" @@ -20,7 +20,7 @@ Positional arguments are \fBname@version-range\fR identifiers, which will limit .P .RS 2 .nf -npm@11.0.0 /path/to/npm +npm@11.1.0 /path/to/npm └─┬ init-package-json@0.0.4 └── promzard@0.1.5 .fi @@ -103,7 +103,7 @@ man pages are linked to \fB{prefix}/share/man\fR .SS "\fBdepth\fR" .RS 0 .IP \(bu 4 -Default: \fBInfinity\fR if \fB--all\fR is set, otherwise \fB1\fR +Default: \fBInfinity\fR if \fB--all\fR is set, otherwise \fB0\fR .IP \(bu 4 Type: null or Number .RE 0 diff --git a/deps/npm/man/man1/npm-org.1 b/deps/npm/man/man1/npm-org.1 index daca78255f42..d7f7d94741eb 100644 --- a/deps/npm/man/man1/npm-org.1 +++ b/deps/npm/man/man1/npm-org.1 @@ -1,4 +1,4 @@ -.TH "NPM-ORG" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-ORG" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-org\fR - Manage orgs .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1 index aab4bdff5e94..5d9268fbdcc8 100644 --- a/deps/npm/man/man1/npm-outdated.1 +++ b/deps/npm/man/man1/npm-outdated.1 @@ -1,4 +1,4 @@ -.TH "NPM-OUTDATED" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-OUTDATED" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-outdated\fR - Check for outdated packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1 index 6cf50562ce25..2b341b941653 100644 --- a/deps/npm/man/man1/npm-owner.1 +++ b/deps/npm/man/man1/npm-owner.1 @@ -1,4 +1,4 @@ -.TH "NPM-OWNER" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-OWNER" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-owner\fR - Manage package owners .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1 index a6aa420eb402..584561a11e9f 100644 --- a/deps/npm/man/man1/npm-pack.1 +++ b/deps/npm/man/man1/npm-pack.1 @@ -1,4 +1,4 @@ -.TH "NPM-PACK" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-PACK" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-pack\fR - Create a tarball from a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-ping.1 b/deps/npm/man/man1/npm-ping.1 index 0f15acec8c41..32e0abf18c53 100644 --- a/deps/npm/man/man1/npm-ping.1 +++ b/deps/npm/man/man1/npm-ping.1 @@ -1,4 +1,4 @@ -.TH "NPM-PING" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-PING" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-ping\fR - Ping npm registry .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-pkg.1 b/deps/npm/man/man1/npm-pkg.1 index cfab22912461..fc7aeb424af3 100644 --- a/deps/npm/man/man1/npm-pkg.1 +++ b/deps/npm/man/man1/npm-pkg.1 @@ -1,4 +1,4 @@ -.TH "NPM-PKG" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-PKG" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-pkg\fR - Manages your package.json .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1 index cac17c68b279..b93189158d84 100644 --- a/deps/npm/man/man1/npm-prefix.1 +++ b/deps/npm/man/man1/npm-prefix.1 @@ -1,4 +1,4 @@ -.TH "NPM-PREFIX" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-PREFIX" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-prefix\fR - Display prefix .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-profile.1 b/deps/npm/man/man1/npm-profile.1 index 0eed37569a2c..25ec636d23d6 100644 --- a/deps/npm/man/man1/npm-profile.1 +++ b/deps/npm/man/man1/npm-profile.1 @@ -1,4 +1,4 @@ -.TH "NPM-PROFILE" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-PROFILE" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-profile\fR - Change settings on your registry profile .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1 index e01d867a0326..b60f49ca61d7 100644 --- a/deps/npm/man/man1/npm-prune.1 +++ b/deps/npm/man/man1/npm-prune.1 @@ -1,4 +1,4 @@ -.TH "NPM-PRUNE" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-PRUNE" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-prune\fR - Remove extraneous packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1 index f584ca319bd3..c00b64448f07 100644 --- a/deps/npm/man/man1/npm-publish.1 +++ b/deps/npm/man/man1/npm-publish.1 @@ -1,4 +1,4 @@ -.TH "NPM-PUBLISH" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-PUBLISH" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-publish\fR - Publish a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-query.1 b/deps/npm/man/man1/npm-query.1 index 83f5eb489e7c..5f1aad64ceeb 100644 --- a/deps/npm/man/man1/npm-query.1 +++ b/deps/npm/man/man1/npm-query.1 @@ -1,4 +1,4 @@ -.TH "NPM-QUERY" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-QUERY" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-query\fR - Dependency selector query .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1 index 904ec74ac6ac..da4a8b11663d 100644 --- a/deps/npm/man/man1/npm-rebuild.1 +++ b/deps/npm/man/man1/npm-rebuild.1 @@ -1,4 +1,4 @@ -.TH "NPM-REBUILD" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-REBUILD" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-rebuild\fR - Rebuild a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1 index 1536ae5d38ac..4224bc84a4e7 100644 --- a/deps/npm/man/man1/npm-repo.1 +++ b/deps/npm/man/man1/npm-repo.1 @@ -1,4 +1,4 @@ -.TH "NPM-REPO" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-REPO" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-repo\fR - Open package repository page in the browser .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1 index c1f7d129365c..6984127b0958 100644 --- a/deps/npm/man/man1/npm-restart.1 +++ b/deps/npm/man/man1/npm-restart.1 @@ -1,4 +1,4 @@ -.TH "NPM-RESTART" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-RESTART" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-restart\fR - Restart a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1 index 4f222a697a59..07b35eb775c5 100644 --- a/deps/npm/man/man1/npm-root.1 +++ b/deps/npm/man/man1/npm-root.1 @@ -1,4 +1,4 @@ -.TH "NPM-ROOT" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-ROOT" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-root\fR - Display npm root .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1 index 303dd432acf3..3d35cd41ee87 100644 --- a/deps/npm/man/man1/npm-run-script.1 +++ b/deps/npm/man/man1/npm-run-script.1 @@ -1,4 +1,4 @@ -.TH "NPM-RUN-SCRIPT" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-RUN-SCRIPT" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-run-script\fR - Run arbitrary package scripts .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-sbom.1 b/deps/npm/man/man1/npm-sbom.1 index 9e33d7f257d4..8ddaaa982684 100644 --- a/deps/npm/man/man1/npm-sbom.1 +++ b/deps/npm/man/man1/npm-sbom.1 @@ -1,4 +1,4 @@ -.TH "NPM-SBOM" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-SBOM" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-sbom\fR - Generate a Software Bill of Materials (SBOM) .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1 index b4bd3edf3534..c1499659fca7 100644 --- a/deps/npm/man/man1/npm-search.1 +++ b/deps/npm/man/man1/npm-search.1 @@ -1,4 +1,4 @@ -.TH "NPM-SEARCH" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-SEARCH" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-search\fR - Search for packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1 index f4003d1eb258..2772e9c3f574 100644 --- a/deps/npm/man/man1/npm-shrinkwrap.1 +++ b/deps/npm/man/man1/npm-shrinkwrap.1 @@ -1,4 +1,4 @@ -.TH "NPM-SHRINKWRAP" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-SHRINKWRAP" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-shrinkwrap\fR - Lock down dependency versions for publication .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1 index 9965ec8c5211..01151cd6fd6e 100644 --- a/deps/npm/man/man1/npm-star.1 +++ b/deps/npm/man/man1/npm-star.1 @@ -1,4 +1,4 @@ -.TH "NPM-STAR" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-STAR" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-star\fR - Mark your favorite packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1 index a45038b761b4..b4a5895d62c7 100644 --- a/deps/npm/man/man1/npm-stars.1 +++ b/deps/npm/man/man1/npm-stars.1 @@ -1,4 +1,4 @@ -.TH "NPM-STARS" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-STARS" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-stars\fR - View packages marked as favorites .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1 index 89ee167e22fc..0019462ff8fb 100644 --- a/deps/npm/man/man1/npm-start.1 +++ b/deps/npm/man/man1/npm-start.1 @@ -1,4 +1,4 @@ -.TH "NPM-START" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-START" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-start\fR - Start a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1 index 05cc8f8abcaf..6d9c1b86cd89 100644 --- a/deps/npm/man/man1/npm-stop.1 +++ b/deps/npm/man/man1/npm-stop.1 @@ -1,4 +1,4 @@ -.TH "NPM-STOP" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-STOP" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-stop\fR - Stop a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-team.1 b/deps/npm/man/man1/npm-team.1 index 96351687e77b..bdadd11dfd75 100644 --- a/deps/npm/man/man1/npm-team.1 +++ b/deps/npm/man/man1/npm-team.1 @@ -1,4 +1,4 @@ -.TH "NPM-TEAM" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-TEAM" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-team\fR - Manage organization teams and team memberships .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1 index 7aff8375de68..4e69059f63a8 100644 --- a/deps/npm/man/man1/npm-test.1 +++ b/deps/npm/man/man1/npm-test.1 @@ -1,4 +1,4 @@ -.TH "NPM-TEST" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-TEST" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-test\fR - Test a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-token.1 b/deps/npm/man/man1/npm-token.1 index 139a61c56663..bfc6f4e5c928 100644 --- a/deps/npm/man/man1/npm-token.1 +++ b/deps/npm/man/man1/npm-token.1 @@ -1,4 +1,4 @@ -.TH "NPM-TOKEN" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-TOKEN" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-token\fR - Manage your authentication tokens .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-undeprecate.1 b/deps/npm/man/man1/npm-undeprecate.1 new file mode 100644 index 000000000000..92841612d23e --- /dev/null +++ b/deps/npm/man/man1/npm-undeprecate.1 @@ -0,0 +1,57 @@ +.TH "NPM-UNDEPRECATE" "1" "January 2025" "NPM@11.1.0" "" +.SH "NAME" +\fBnpm-undeprecate\fR - Undeprecate a version of a package +.SS "Synopsis" +.P +.RS 2 +.nf +npm undeprecate +.fi +.RE +.P +Note: This command is unaware of workspaces. +.SS "Description" +.P +This command will update the npm registry entry for a package, removing any deprecation warnings that currently exist. +.P +It works in the same way as npm help deprecate, except that this command removes deprecation warnings instead of adding them. +.SS "Configuration" +.SS "\fBregistry\fR" +.RS 0 +.IP \(bu 4 +Default: "https://registry.npmjs.org/" +.IP \(bu 4 +Type: URL +.RE 0 + +.P +The base URL of the npm registry. +.SS "\fBotp\fR" +.RS 0 +.IP \(bu 4 +Default: null +.IP \(bu 4 +Type: null or String +.RE 0 + +.P +This is a one-time password from a two-factor authenticator. It's needed when publishing or changing package permissions with \fBnpm access\fR. +.P +If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one. +.SS "\fBdry-run\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, \fBinstall\fR, \fBupdate\fR, \fBdedupe\fR, \fBuninstall\fR, as well as \fBpack\fR and \fBpublish\fR. +.P +Note: This is NOT honored by other network related commands, eg \fBdist-tags\fR, \fBowner\fR, etc. +.SS "See Also" +.RS 0 +.IP \(bu 4 +npm help deprecate +.RE 0 diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1 index 5c1ec68079d4..4ea0ee9bc105 100644 --- a/deps/npm/man/man1/npm-uninstall.1 +++ b/deps/npm/man/man1/npm-uninstall.1 @@ -1,4 +1,4 @@ -.TH "NPM-UNINSTALL" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-UNINSTALL" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-uninstall\fR - Remove a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1 index b7d070c4b765..3b8583d2337b 100644 --- a/deps/npm/man/man1/npm-unpublish.1 +++ b/deps/npm/man/man1/npm-unpublish.1 @@ -1,4 +1,4 @@ -.TH "NPM-UNPUBLISH" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-UNPUBLISH" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-unpublish\fR - Remove a package from the registry .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-unstar.1 b/deps/npm/man/man1/npm-unstar.1 index 8c91421ba211..b86ae34c44cf 100644 --- a/deps/npm/man/man1/npm-unstar.1 +++ b/deps/npm/man/man1/npm-unstar.1 @@ -1,4 +1,4 @@ -.TH "NPM-UNSTAR" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-UNSTAR" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-unstar\fR - Remove an item from your favorite packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1 index cfac4fa43990..380cc280805c 100644 --- a/deps/npm/man/man1/npm-update.1 +++ b/deps/npm/man/man1/npm-update.1 @@ -1,4 +1,4 @@ -.TH "NPM-UPDATE" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-UPDATE" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-update\fR - Update packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1 index fef0dc3ceb37..69b08437484f 100644 --- a/deps/npm/man/man1/npm-version.1 +++ b/deps/npm/man/man1/npm-version.1 @@ -1,4 +1,4 @@ -.TH "NPM-VERSION" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-VERSION" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-version\fR - Bump a package version .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1 index db2487155a2d..c60aa77791a4 100644 --- a/deps/npm/man/man1/npm-view.1 +++ b/deps/npm/man/man1/npm-view.1 @@ -1,4 +1,4 @@ -.TH "NPM-VIEW" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-VIEW" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-view\fR - View registry info .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1 index 4202647f6c69..001b58e55726 100644 --- a/deps/npm/man/man1/npm-whoami.1 +++ b/deps/npm/man/man1/npm-whoami.1 @@ -1,4 +1,4 @@ -.TH "NPM-WHOAMI" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM-WHOAMI" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-whoami\fR - Display npm username .SS "Synopsis" diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index ffcdbf0f7bd4..bc7b26c7219c 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPM" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm\fR - javascript package manager .SS "Synopsis" @@ -12,7 +12,7 @@ npm Note: This command is unaware of workspaces. .SS "Version" .P -11.0.0 +11.1.0 .SS "Description" .P npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency conflicts intelligently. diff --git a/deps/npm/man/man1/npx.1 b/deps/npm/man/man1/npx.1 index 3e25d37e42fd..9ce3467e8801 100644 --- a/deps/npm/man/man1/npx.1 +++ b/deps/npm/man/man1/npx.1 @@ -1,4 +1,4 @@ -.TH "NPX" "1" "December 2024" "NPM@11.0.0" "" +.TH "NPX" "1" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpx\fR - Run a command from a local or remote npm package .SS "Synopsis" diff --git a/deps/npm/man/man5/folders.5 b/deps/npm/man/man5/folders.5 index 8348e518a170..684b0a2f5480 100644 --- a/deps/npm/man/man5/folders.5 +++ b/deps/npm/man/man5/folders.5 @@ -1,4 +1,4 @@ -.TH "FOLDERS" "5" "December 2024" "NPM@11.0.0" "" +.TH "FOLDERS" "5" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBfolders\fR - Folder Structures Used by npm .SS "Description" diff --git a/deps/npm/man/man5/install.5 b/deps/npm/man/man5/install.5 index b49be9e98c7c..d116d83e40ef 100644 --- a/deps/npm/man/man5/install.5 +++ b/deps/npm/man/man5/install.5 @@ -1,4 +1,4 @@ -.TH "INSTALL" "5" "December 2024" "NPM@11.0.0" "" +.TH "INSTALL" "5" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBinstall\fR - Download and install node and npm .SS "Description" diff --git a/deps/npm/man/man5/npm-global.5 b/deps/npm/man/man5/npm-global.5 index 8348e518a170..684b0a2f5480 100644 --- a/deps/npm/man/man5/npm-global.5 +++ b/deps/npm/man/man5/npm-global.5 @@ -1,4 +1,4 @@ -.TH "FOLDERS" "5" "December 2024" "NPM@11.0.0" "" +.TH "FOLDERS" "5" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBfolders\fR - Folder Structures Used by npm .SS "Description" diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5 index 4b807fbf00e9..dd7d5de64fc0 100644 --- a/deps/npm/man/man5/npm-json.5 +++ b/deps/npm/man/man5/npm-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE.JSON" "5" "December 2024" "NPM@11.0.0" "" +.TH "PACKAGE.JSON" "5" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBpackage.json\fR - Specifics of npm's package.json handling .SS "Description" @@ -38,7 +38,7 @@ You may want to check the npm registry to see if there's something by that name .RE 0 .P -A name can be optionally prefixed by a scope, e.g. \fB@myorg/mypackage\fR. See npm help scope for more detail. +A name can be optionally prefixed by a scope, e.g. \fB@npm/example\fR. See npm help scope for more detail. .SS "version" .P If you plan to publish your package, the \fImost\fR important things in your package.json are the name and version fields as they will be required. The name and version together form an identifier that is assumed to be completely unique. Changes to the package should come along with changes to the version. If you don't plan to publish your package, the name and version fields are optional. @@ -58,7 +58,7 @@ Example: .P .RS 2 .nf -"homepage": "https://github.com/owner/project#readme" +"homepage": "https://github.com/npm/example#readme" .fi .RE .SS "bugs" @@ -71,8 +71,8 @@ It should look like this: .nf { "bugs": { - "url": "https://github.com/owner/project/issues", - "email": "project@hostname.com" + "url": "https://github.com/npm/example/issues", + "email": "example@npmjs.com" } } .fi @@ -95,7 +95,7 @@ If you're using a common license such as BSD-2-Clause or MIT, add a current SPDX .fi .RE .P -You can check \fBthe full list of SPDX license IDs\fR \fI\(lahttps://spdx.org/licenses/\(ra\fR. Ideally you should pick one that is \fBOSI\fR \fI\(lahttps://opensource.org/licenses/\(ra\fR approved. +You can check \fBthe full list of SPDX license IDs\fR \fI\(lahttps://spdx.org/licenses/\(ra\fR. Ideally, you should pick one that is \fBOSI\fR \fI\(lahttps://opensource.org/licenses/\(ra\fR approved. .P If your package is licensed under multiple common licenses, use an \fBSPDX license expression syntax version 2.0 string\fR \fI\(lahttps://spdx.dev/specifications/\(ra\fR, like this: .P @@ -184,8 +184,8 @@ The "author" is one person. "contributors" is an array of people. A "person" is .nf { "name" : "Barney Rubble", - "email" : "b@rubble.com", - "url" : "http://barnyrubble.tumblr.com/" + "email" : "barney@npmjs.com", + "url" : "http://barnyrubble.npmjs.com/" } .fi .RE @@ -195,7 +195,7 @@ Or you can shorten that all into a single string, and npm will parse it for you: .RS 2 .nf { - "author": "Barney Rubble (http://barnyrubble.tumblr.com/)" + "author": "Barney Rubble (http://barnyrubble.npmjs.com/)" } .fi .RE @@ -212,7 +212,7 @@ You can specify an object containing a URL that provides up-to-date information { "funding": { "type" : "individual", - "url" : "http://example.com/donate" + "url" : "http://npmjs.com/donate" } } .fi @@ -223,7 +223,7 @@ You can specify an object containing a URL that provides up-to-date information { "funding": { "type" : "patreon", - "url" : "https://www.patreon.com/my-account" + "url" : "https://www.patreon.com/user" } } .fi @@ -232,7 +232,7 @@ You can specify an object containing a URL that provides up-to-date information .RS 2 .nf { - "funding": "http://example.com/donate" + "funding": "http://npmjs.com/donate" } .fi .RE @@ -243,12 +243,12 @@ You can specify an object containing a URL that provides up-to-date information "funding": \[lB] { "type" : "individual", - "url" : "http://example.com/donate" + "url" : "http://npmjs.com/donate" }, - "http://example.com/donateAlso", + "http://npmjs.com/donate-also", { "type" : "patreon", - "url" : "https://www.patreon.com/my-account" + "url" : "https://www.patreon.com/user" } \[rB] } @@ -503,9 +503,9 @@ For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same .RS 2 .nf { - "repository": "npm/npm", + "repository": "npm/example", - "repository": "github:user/repo", + "repository": "github:npm/example", "repository": "gist:11081aaa281", @@ -593,7 +593,7 @@ See \fBsemver\fR \fI\(lahttps://github.com/npm/node-semver#versions\(ra\fR for m .IP \(bu 4 \fBpath/path/path\fR See \fBLocal Paths\fR \fI(Local Paths)\fR below .IP \(bu 4 -\fBnpm:@scope/pkg@version\fR Custom alias for a pacakge See \fB\fBpackage-spec\fR\fR \fI\(la/using-npm/package-spec#aliases\(ra\fR +\fBnpm:@scope/pkg@version\fR Custom alias for a package See \fB\fBpackage-spec\fR\fR \fI\(la/using-npm/package-spec#aliases\(ra\fR .RE 0 .P @@ -608,7 +608,7 @@ For example, these are all valid: "baz": ">1.0.2 <=2.3.4", "boo": "2.0.1", "qux": "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0", - "asd": "http://asdf.com/asdf.tar.gz", + "asd": "http://npmjs.com/example.tar.gz", "til": "~1.2", "elf": "~1.2.3", "two": "2.x", @@ -682,7 +682,7 @@ As of version 1.1.65, you can refer to GitHub URLs as just "foo": "user/foo-proj "dependencies": { "express": "expressjs/express", "mocha": "mochajs/mocha#4727d357ea", - "module": "user/repo#feature\[rs]/branch" + "module": "npm/example-github-repo#feature\[rs]/branch" } } .fi @@ -732,7 +732,7 @@ For example: .RS 2 .nf { - "name": "ethopia-waza", + "name": "@npm/ethopia-waza", "description": "a delightfully fruity coffee varietal", "version": "1.2.3", "devDependencies": { @@ -756,22 +756,22 @@ For example: .RS 2 .nf { - "name": "tea-latte", + "name": "@npm/tea-latte", "version": "1.3.5", "peerDependencies": { - "tea": "2.x" + "@npm/tea": "2.x" } } .fi .RE .P -This ensures your package \fBtea-latte\fR can be installed \fIalong\fR with the second major version of the host package \fBtea\fR only. \fBnpm install +This ensures your package \fB@npm/tea-latte\fR can be installed \fIalong\fR with the second major version of the host package \fB@npm/tea\fR only. \fBnpm install tea-latte\fR could possibly yield the following dependency graph: .P .RS 2 .nf -├── tea-latte@1.3.5 -└── tea@2.2.0 +├── @npm/tea-latte@1.3.5 +└── @npm/tea@2.2.0 .fi .RE .P @@ -789,14 +789,14 @@ For example: .RS 2 .nf { - "name": "tea-latte", + "name": "@npm/tea-latte", "version": "1.3.5", "peerDependencies": { - "tea": "2.x", - "soy-milk": "1.2" + "@npm/tea": "2.x", + "@npm/soy-milk": "1.2" }, "peerDependenciesMeta": { - "soy-milk": { + "@npm/soy-milk": { "optional": true } } @@ -816,17 +816,17 @@ If we define a package.json like this: .RS 2 .nf { - "name": "awesome-web-framework", + "name": "@npm/awesome-web-framework", "version": "1.0.0", "bundleDependencies": \[lB] - "renderized", - "super-streams" + "@npm/renderized", + "@npm/super-streams" \[rB] } .fi .RE .P -we can obtain \fBawesome-web-framework-1.0.0.tgz\fR file by running \fBnpm pack\fR. This file contains the dependencies \fBrenderized\fR and \fBsuper-streams\fR which can be installed in a new project by executing \fBnpm install +we can obtain \fB@npm/awesome-web-framework-1.0.0.tgz\fR file by running \fBnpm pack\fR. This file contains the dependencies \fB@npm/renderized\fR and \fB@npm/super-streams\fR which can be installed in a new project by executing \fBnpm install awesome-web-framework-1.0.0.tgz\fR. Note that the package names do not include any versions, as that information is specified in \fBdependencies\fR. .P If this is spelled \fB"bundledDependencies"\fR, then that is also honored. @@ -842,8 +842,8 @@ It is still your program's responsibility to handle the lack of the dependency. .RS 2 .nf try { - var foo = require('foo') - var fooVersion = require('foo/package.json').version + var foo = require('@npm/foo') + var fooVersion = require('@npm/foo/package.json').version } catch (er) { foo = null } @@ -874,50 +874,50 @@ To make sure the package \fBfoo\fR is always installed as version \fB1.0.0\fR no .nf { "overrides": { - "foo": "1.0.0" + "@npm/foo": "1.0.0" } } .fi .RE .P -The above is a short hand notation, the full object form can be used to allow overriding a package itself as well as a child of the package. This will cause \fBfoo\fR to always be \fB1.0.0\fR while also making \fBbar\fR at any depth beyond \fBfoo\fR also \fB1.0.0\fR: +The above is a short hand notation, the full object form can be used to allow overriding a package itself as well as a child of the package. This will cause \fB@npm/foo\fR to always be \fB1.0.0\fR while also making \fB@npm/bar\fR at any depth beyond \fB@npm/foo\fR also \fB1.0.0\fR: .P .RS 2 .nf { "overrides": { - "foo": { + "@npm/foo": { ".": "1.0.0", - "bar": "1.0.0" + "@npm/bar": "1.0.0" } } } .fi .RE .P -To only override \fBfoo\fR to be \fB1.0.0\fR when it's a child (or grandchild, or great grandchild, etc) of the package \fBbar\fR: +To only override \fB@npm/foo\fR to be \fB1.0.0\fR when it's a child (or grandchild, or great grandchild, etc) of the package \fBbar\fR: .P .RS 2 .nf { "overrides": { - "bar": { - "foo": "1.0.0" + "@npm/bar": { + "@npm/foo": "1.0.0" } } } .fi .RE .P -Keys can be nested to any arbitrary length. To override \fBfoo\fR only when it's a child of \fBbar\fR and only when \fBbar\fR is a child of \fBbaz\fR: +Keys can be nested to any arbitrary length. To override \fB@npm/foo\fR only when it's a child of \fB@npm/bar\fR and only when \fB@npm/bar\fR is a child of \fB@npm/baz\fR: .P .RS 2 .nf { "overrides": { - "baz": { - "bar": { - "foo": "1.0.0" + "@npm/baz": { + "@npm/bar": { + "@npm/foo": "1.0.0" } } } @@ -925,14 +925,14 @@ Keys can be nested to any arbitrary length. To override \fBfoo\fR only when it's .fi .RE .P -The key of an override can also include a version, or range of versions. To override \fBfoo\fR to \fB1.0.0\fR, but only when it's a child of \fBbar@2.0.0\fR: +The key of an override can also include a version, or range of versions. To override \fB@npm/foo\fR to \fB1.0.0\fR, but only when it's a child of \fB@npm/bar@2.0.0\fR: .P .RS 2 .nf { "overrides": { - "bar@2.0.0": { - "foo": "1.0.0" + "@npm/bar@2.0.0": { + "@npm/foo": "1.0.0" } } } @@ -945,7 +945,7 @@ You may not set an override for a package that you directly depend on unless bot .nf { "dependencies": { - "foo": "^1.0.0" + "@npm/foo": "^1.0.0" }, "overrides": { // BAD, will throw an EOVERRIDE error @@ -953,9 +953,9 @@ You may not set an override for a package that you directly depend on unless bot // GOOD, specs match so override is allowed // "foo": "^1.0.0" // BEST, the override is defined as a reference to the dependency - "foo": "$foo", + "@npm/foo": "$foo", // the referenced package does not need to match the overridden one - "bar": "$foo" + "@npm/bar": "$foo" } } .fi diff --git a/deps/npm/man/man5/npm-shrinkwrap-json.5 b/deps/npm/man/man5/npm-shrinkwrap-json.5 index 0600f5d61aa9..574a9b0e2b22 100644 --- a/deps/npm/man/man5/npm-shrinkwrap-json.5 +++ b/deps/npm/man/man5/npm-shrinkwrap-json.5 @@ -1,4 +1,4 @@ -.TH "NPM-SHRINKWRAP.JSON" "5" "December 2024" "NPM@11.0.0" "" +.TH "NPM-SHRINKWRAP.JSON" "5" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpm-shrinkwrap.json\fR - A publishable lockfile .SS "Description" diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5 index 098793f1a970..8b4f651107d0 100644 --- a/deps/npm/man/man5/npmrc.5 +++ b/deps/npm/man/man5/npmrc.5 @@ -1,4 +1,4 @@ -.TH "NPMRC" "5" "December 2024" "NPM@11.0.0" "" +.TH "NPMRC" "5" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBnpmrc\fR - The npm config files .SS "Description" diff --git a/deps/npm/man/man5/package-json.5 b/deps/npm/man/man5/package-json.5 index 4b807fbf00e9..dd7d5de64fc0 100644 --- a/deps/npm/man/man5/package-json.5 +++ b/deps/npm/man/man5/package-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE.JSON" "5" "December 2024" "NPM@11.0.0" "" +.TH "PACKAGE.JSON" "5" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBpackage.json\fR - Specifics of npm's package.json handling .SS "Description" @@ -38,7 +38,7 @@ You may want to check the npm registry to see if there's something by that name .RE 0 .P -A name can be optionally prefixed by a scope, e.g. \fB@myorg/mypackage\fR. See npm help scope for more detail. +A name can be optionally prefixed by a scope, e.g. \fB@npm/example\fR. See npm help scope for more detail. .SS "version" .P If you plan to publish your package, the \fImost\fR important things in your package.json are the name and version fields as they will be required. The name and version together form an identifier that is assumed to be completely unique. Changes to the package should come along with changes to the version. If you don't plan to publish your package, the name and version fields are optional. @@ -58,7 +58,7 @@ Example: .P .RS 2 .nf -"homepage": "https://github.com/owner/project#readme" +"homepage": "https://github.com/npm/example#readme" .fi .RE .SS "bugs" @@ -71,8 +71,8 @@ It should look like this: .nf { "bugs": { - "url": "https://github.com/owner/project/issues", - "email": "project@hostname.com" + "url": "https://github.com/npm/example/issues", + "email": "example@npmjs.com" } } .fi @@ -95,7 +95,7 @@ If you're using a common license such as BSD-2-Clause or MIT, add a current SPDX .fi .RE .P -You can check \fBthe full list of SPDX license IDs\fR \fI\(lahttps://spdx.org/licenses/\(ra\fR. Ideally you should pick one that is \fBOSI\fR \fI\(lahttps://opensource.org/licenses/\(ra\fR approved. +You can check \fBthe full list of SPDX license IDs\fR \fI\(lahttps://spdx.org/licenses/\(ra\fR. Ideally, you should pick one that is \fBOSI\fR \fI\(lahttps://opensource.org/licenses/\(ra\fR approved. .P If your package is licensed under multiple common licenses, use an \fBSPDX license expression syntax version 2.0 string\fR \fI\(lahttps://spdx.dev/specifications/\(ra\fR, like this: .P @@ -184,8 +184,8 @@ The "author" is one person. "contributors" is an array of people. A "person" is .nf { "name" : "Barney Rubble", - "email" : "b@rubble.com", - "url" : "http://barnyrubble.tumblr.com/" + "email" : "barney@npmjs.com", + "url" : "http://barnyrubble.npmjs.com/" } .fi .RE @@ -195,7 +195,7 @@ Or you can shorten that all into a single string, and npm will parse it for you: .RS 2 .nf { - "author": "Barney Rubble (http://barnyrubble.tumblr.com/)" + "author": "Barney Rubble (http://barnyrubble.npmjs.com/)" } .fi .RE @@ -212,7 +212,7 @@ You can specify an object containing a URL that provides up-to-date information { "funding": { "type" : "individual", - "url" : "http://example.com/donate" + "url" : "http://npmjs.com/donate" } } .fi @@ -223,7 +223,7 @@ You can specify an object containing a URL that provides up-to-date information { "funding": { "type" : "patreon", - "url" : "https://www.patreon.com/my-account" + "url" : "https://www.patreon.com/user" } } .fi @@ -232,7 +232,7 @@ You can specify an object containing a URL that provides up-to-date information .RS 2 .nf { - "funding": "http://example.com/donate" + "funding": "http://npmjs.com/donate" } .fi .RE @@ -243,12 +243,12 @@ You can specify an object containing a URL that provides up-to-date information "funding": \[lB] { "type" : "individual", - "url" : "http://example.com/donate" + "url" : "http://npmjs.com/donate" }, - "http://example.com/donateAlso", + "http://npmjs.com/donate-also", { "type" : "patreon", - "url" : "https://www.patreon.com/my-account" + "url" : "https://www.patreon.com/user" } \[rB] } @@ -503,9 +503,9 @@ For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same .RS 2 .nf { - "repository": "npm/npm", + "repository": "npm/example", - "repository": "github:user/repo", + "repository": "github:npm/example", "repository": "gist:11081aaa281", @@ -593,7 +593,7 @@ See \fBsemver\fR \fI\(lahttps://github.com/npm/node-semver#versions\(ra\fR for m .IP \(bu 4 \fBpath/path/path\fR See \fBLocal Paths\fR \fI(Local Paths)\fR below .IP \(bu 4 -\fBnpm:@scope/pkg@version\fR Custom alias for a pacakge See \fB\fBpackage-spec\fR\fR \fI\(la/using-npm/package-spec#aliases\(ra\fR +\fBnpm:@scope/pkg@version\fR Custom alias for a package See \fB\fBpackage-spec\fR\fR \fI\(la/using-npm/package-spec#aliases\(ra\fR .RE 0 .P @@ -608,7 +608,7 @@ For example, these are all valid: "baz": ">1.0.2 <=2.3.4", "boo": "2.0.1", "qux": "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0", - "asd": "http://asdf.com/asdf.tar.gz", + "asd": "http://npmjs.com/example.tar.gz", "til": "~1.2", "elf": "~1.2.3", "two": "2.x", @@ -682,7 +682,7 @@ As of version 1.1.65, you can refer to GitHub URLs as just "foo": "user/foo-proj "dependencies": { "express": "expressjs/express", "mocha": "mochajs/mocha#4727d357ea", - "module": "user/repo#feature\[rs]/branch" + "module": "npm/example-github-repo#feature\[rs]/branch" } } .fi @@ -732,7 +732,7 @@ For example: .RS 2 .nf { - "name": "ethopia-waza", + "name": "@npm/ethopia-waza", "description": "a delightfully fruity coffee varietal", "version": "1.2.3", "devDependencies": { @@ -756,22 +756,22 @@ For example: .RS 2 .nf { - "name": "tea-latte", + "name": "@npm/tea-latte", "version": "1.3.5", "peerDependencies": { - "tea": "2.x" + "@npm/tea": "2.x" } } .fi .RE .P -This ensures your package \fBtea-latte\fR can be installed \fIalong\fR with the second major version of the host package \fBtea\fR only. \fBnpm install +This ensures your package \fB@npm/tea-latte\fR can be installed \fIalong\fR with the second major version of the host package \fB@npm/tea\fR only. \fBnpm install tea-latte\fR could possibly yield the following dependency graph: .P .RS 2 .nf -├── tea-latte@1.3.5 -└── tea@2.2.0 +├── @npm/tea-latte@1.3.5 +└── @npm/tea@2.2.0 .fi .RE .P @@ -789,14 +789,14 @@ For example: .RS 2 .nf { - "name": "tea-latte", + "name": "@npm/tea-latte", "version": "1.3.5", "peerDependencies": { - "tea": "2.x", - "soy-milk": "1.2" + "@npm/tea": "2.x", + "@npm/soy-milk": "1.2" }, "peerDependenciesMeta": { - "soy-milk": { + "@npm/soy-milk": { "optional": true } } @@ -816,17 +816,17 @@ If we define a package.json like this: .RS 2 .nf { - "name": "awesome-web-framework", + "name": "@npm/awesome-web-framework", "version": "1.0.0", "bundleDependencies": \[lB] - "renderized", - "super-streams" + "@npm/renderized", + "@npm/super-streams" \[rB] } .fi .RE .P -we can obtain \fBawesome-web-framework-1.0.0.tgz\fR file by running \fBnpm pack\fR. This file contains the dependencies \fBrenderized\fR and \fBsuper-streams\fR which can be installed in a new project by executing \fBnpm install +we can obtain \fB@npm/awesome-web-framework-1.0.0.tgz\fR file by running \fBnpm pack\fR. This file contains the dependencies \fB@npm/renderized\fR and \fB@npm/super-streams\fR which can be installed in a new project by executing \fBnpm install awesome-web-framework-1.0.0.tgz\fR. Note that the package names do not include any versions, as that information is specified in \fBdependencies\fR. .P If this is spelled \fB"bundledDependencies"\fR, then that is also honored. @@ -842,8 +842,8 @@ It is still your program's responsibility to handle the lack of the dependency. .RS 2 .nf try { - var foo = require('foo') - var fooVersion = require('foo/package.json').version + var foo = require('@npm/foo') + var fooVersion = require('@npm/foo/package.json').version } catch (er) { foo = null } @@ -874,50 +874,50 @@ To make sure the package \fBfoo\fR is always installed as version \fB1.0.0\fR no .nf { "overrides": { - "foo": "1.0.0" + "@npm/foo": "1.0.0" } } .fi .RE .P -The above is a short hand notation, the full object form can be used to allow overriding a package itself as well as a child of the package. This will cause \fBfoo\fR to always be \fB1.0.0\fR while also making \fBbar\fR at any depth beyond \fBfoo\fR also \fB1.0.0\fR: +The above is a short hand notation, the full object form can be used to allow overriding a package itself as well as a child of the package. This will cause \fB@npm/foo\fR to always be \fB1.0.0\fR while also making \fB@npm/bar\fR at any depth beyond \fB@npm/foo\fR also \fB1.0.0\fR: .P .RS 2 .nf { "overrides": { - "foo": { + "@npm/foo": { ".": "1.0.0", - "bar": "1.0.0" + "@npm/bar": "1.0.0" } } } .fi .RE .P -To only override \fBfoo\fR to be \fB1.0.0\fR when it's a child (or grandchild, or great grandchild, etc) of the package \fBbar\fR: +To only override \fB@npm/foo\fR to be \fB1.0.0\fR when it's a child (or grandchild, or great grandchild, etc) of the package \fBbar\fR: .P .RS 2 .nf { "overrides": { - "bar": { - "foo": "1.0.0" + "@npm/bar": { + "@npm/foo": "1.0.0" } } } .fi .RE .P -Keys can be nested to any arbitrary length. To override \fBfoo\fR only when it's a child of \fBbar\fR and only when \fBbar\fR is a child of \fBbaz\fR: +Keys can be nested to any arbitrary length. To override \fB@npm/foo\fR only when it's a child of \fB@npm/bar\fR and only when \fB@npm/bar\fR is a child of \fB@npm/baz\fR: .P .RS 2 .nf { "overrides": { - "baz": { - "bar": { - "foo": "1.0.0" + "@npm/baz": { + "@npm/bar": { + "@npm/foo": "1.0.0" } } } @@ -925,14 +925,14 @@ Keys can be nested to any arbitrary length. To override \fBfoo\fR only when it's .fi .RE .P -The key of an override can also include a version, or range of versions. To override \fBfoo\fR to \fB1.0.0\fR, but only when it's a child of \fBbar@2.0.0\fR: +The key of an override can also include a version, or range of versions. To override \fB@npm/foo\fR to \fB1.0.0\fR, but only when it's a child of \fB@npm/bar@2.0.0\fR: .P .RS 2 .nf { "overrides": { - "bar@2.0.0": { - "foo": "1.0.0" + "@npm/bar@2.0.0": { + "@npm/foo": "1.0.0" } } } @@ -945,7 +945,7 @@ You may not set an override for a package that you directly depend on unless bot .nf { "dependencies": { - "foo": "^1.0.0" + "@npm/foo": "^1.0.0" }, "overrides": { // BAD, will throw an EOVERRIDE error @@ -953,9 +953,9 @@ You may not set an override for a package that you directly depend on unless bot // GOOD, specs match so override is allowed // "foo": "^1.0.0" // BEST, the override is defined as a reference to the dependency - "foo": "$foo", + "@npm/foo": "$foo", // the referenced package does not need to match the overridden one - "bar": "$foo" + "@npm/bar": "$foo" } } .fi diff --git a/deps/npm/man/man5/package-lock-json.5 b/deps/npm/man/man5/package-lock-json.5 index 0fe3cf892041..80f5cb3cc4a3 100644 --- a/deps/npm/man/man5/package-lock-json.5 +++ b/deps/npm/man/man5/package-lock-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE-LOCK.JSON" "5" "December 2024" "NPM@11.0.0" "" +.TH "PACKAGE-LOCK.JSON" "5" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBpackage-lock.json\fR - A manifestation of the manifest .SS "Description" diff --git a/deps/npm/man/man7/config.7 b/deps/npm/man/man7/config.7 index c9bfc8f9cf23..2383b048cc5f 100644 --- a/deps/npm/man/man7/config.7 +++ b/deps/npm/man/man7/config.7 @@ -1,4 +1,4 @@ -.TH "CONFIG" "7" "December 2024" "NPM@11.0.0" "" +.TH "CONFIG" "7" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBconfig\fR - More than you probably want to know about npm configuration .SS "Description" @@ -365,7 +365,7 @@ Override CPU architecture of native modules to install. Acceptable values are sa .SS "\fBdepth\fR" .RS 0 .IP \(bu 4 -Default: \fBInfinity\fR if \fB--all\fR is set, otherwise \fB1\fR +Default: \fBInfinity\fR if \fB--all\fR is set, otherwise \fB0\fR .IP \(bu 4 Type: null or Number .RE 0 diff --git a/deps/npm/man/man7/dependency-selectors.7 b/deps/npm/man/man7/dependency-selectors.7 index 7331ef393a6a..9e171f59ae63 100644 --- a/deps/npm/man/man7/dependency-selectors.7 +++ b/deps/npm/man/man7/dependency-selectors.7 @@ -1,4 +1,4 @@ -.TH "QUERYING" "7" "December 2024" "NPM@11.0.0" "" +.TH "QUERYING" "7" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBQuerying\fR - Dependency Selector Syntax & Querying .SS "Description" diff --git a/deps/npm/man/man7/developers.7 b/deps/npm/man/man7/developers.7 index b6fc11026bff..3c07981d08cd 100644 --- a/deps/npm/man/man7/developers.7 +++ b/deps/npm/man/man7/developers.7 @@ -1,4 +1,4 @@ -.TH "DEVELOPERS" "7" "December 2024" "NPM@11.0.0" "" +.TH "DEVELOPERS" "7" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBdevelopers\fR - Developer Guide .SS "Description" diff --git a/deps/npm/man/man7/logging.7 b/deps/npm/man/man7/logging.7 index 4b1bd5a17fd2..48f6ac36d7eb 100644 --- a/deps/npm/man/man7/logging.7 +++ b/deps/npm/man/man7/logging.7 @@ -1,4 +1,4 @@ -.TH "LOGGING" "7" "December 2024" "NPM@11.0.0" "" +.TH "LOGGING" "7" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBLogging\fR - Why, What & How We Log .SS "Description" diff --git a/deps/npm/man/man7/orgs.7 b/deps/npm/man/man7/orgs.7 index 4f61c68e1a70..8d991eb9295c 100644 --- a/deps/npm/man/man7/orgs.7 +++ b/deps/npm/man/man7/orgs.7 @@ -1,4 +1,4 @@ -.TH "ORGS" "7" "December 2024" "NPM@11.0.0" "" +.TH "ORGS" "7" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBorgs\fR - Working with Teams & Orgs .SS "Description" diff --git a/deps/npm/man/man7/package-spec.7 b/deps/npm/man/man7/package-spec.7 index 0d68ede45511..506e49624c0b 100644 --- a/deps/npm/man/man7/package-spec.7 +++ b/deps/npm/man/man7/package-spec.7 @@ -1,4 +1,4 @@ -.TH "PACKAGE-SPEC" "7" "December 2024" "NPM@11.0.0" "" +.TH "PACKAGE-SPEC" "7" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBpackage-spec\fR - Package name specifier .SS "Description" diff --git a/deps/npm/man/man7/registry.7 b/deps/npm/man/man7/registry.7 index 82e7b3c722ee..6d5752a2b131 100644 --- a/deps/npm/man/man7/registry.7 +++ b/deps/npm/man/man7/registry.7 @@ -1,4 +1,4 @@ -.TH "REGISTRY" "7" "December 2024" "NPM@11.0.0" "" +.TH "REGISTRY" "7" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBregistry\fR - The JavaScript Package Registry .SS "Description" diff --git a/deps/npm/man/man7/removal.7 b/deps/npm/man/man7/removal.7 index f571d2a6f3be..391fe1bad61a 100644 --- a/deps/npm/man/man7/removal.7 +++ b/deps/npm/man/man7/removal.7 @@ -1,4 +1,4 @@ -.TH "REMOVAL" "7" "December 2024" "NPM@11.0.0" "" +.TH "REMOVAL" "7" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBremoval\fR - Cleaning the Slate .SS "Synopsis" diff --git a/deps/npm/man/man7/scope.7 b/deps/npm/man/man7/scope.7 index f665aafe4ab5..6ae28c17caeb 100644 --- a/deps/npm/man/man7/scope.7 +++ b/deps/npm/man/man7/scope.7 @@ -1,4 +1,4 @@ -.TH "SCOPE" "7" "December 2024" "NPM@11.0.0" "" +.TH "SCOPE" "7" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBscope\fR - Scoped packages .SS "Description" diff --git a/deps/npm/man/man7/scripts.7 b/deps/npm/man/man7/scripts.7 index e28461883c1f..3a1c600edf4c 100644 --- a/deps/npm/man/man7/scripts.7 +++ b/deps/npm/man/man7/scripts.7 @@ -1,4 +1,4 @@ -.TH "SCRIPTS" "7" "December 2024" "NPM@11.0.0" "" +.TH "SCRIPTS" "7" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBscripts\fR - How npm handles the "scripts" field .SS "Description" diff --git a/deps/npm/man/man7/workspaces.7 b/deps/npm/man/man7/workspaces.7 index c3cdec351169..942752445d1d 100644 --- a/deps/npm/man/man7/workspaces.7 +++ b/deps/npm/man/man7/workspaces.7 @@ -1,4 +1,4 @@ -.TH "WORKSPACES" "7" "December 2024" "NPM@11.0.0" "" +.TH "WORKSPACES" "7" "January 2025" "NPM@11.1.0" "" .SH "NAME" \fBworkspaces\fR - Working with workspaces .SS "Description" diff --git a/deps/npm/node_modules/@npmcli/config/lib/definitions/definitions.js b/deps/npm/node_modules/@npmcli/config/lib/definitions/definitions.js index 8a84abd50ff6..00081ef98ddf 100644 --- a/deps/npm/node_modules/@npmcli/config/lib/definitions/definitions.js +++ b/deps/npm/node_modules/@npmcli/config/lib/definitions/definitions.js @@ -461,7 +461,7 @@ const definitions = { depth: new Definition('depth', { default: null, defaultDescription: ` - \`Infinity\` if \`--all\` is set, otherwise \`1\` + \`Infinity\` if \`--all\` is set, otherwise \`0\` `, type: [null, Number], description: ` diff --git a/deps/npm/node_modules/@npmcli/config/package.json b/deps/npm/node_modules/@npmcli/config/package.json index eb89879ffe52..e8c5dc135ecc 100644 --- a/deps/npm/node_modules/@npmcli/config/package.json +++ b/deps/npm/node_modules/@npmcli/config/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/config", - "version": "10.0.0", + "version": "10.0.1", "files": [ "bin/", "lib/" diff --git a/deps/npm/node_modules/@npmcli/package-json/lib/index.js b/deps/npm/node_modules/@npmcli/package-json/lib/index.js index 23f326dd5935..828b8991bb7c 100644 --- a/deps/npm/node_modules/@npmcli/package-json/lib/index.js +++ b/deps/npm/node_modules/@npmcli/package-json/lib/index.js @@ -252,7 +252,9 @@ class PackageJson { .replace(/\n/g, eol) if (fileContent.trim() !== this.#readFileContent.trim()) { - return await writeFile(this.filename, fileContent) + const written = await writeFile(this.filename, fileContent) + this.#readFileContent = fileContent + return written } } diff --git a/deps/npm/node_modules/@npmcli/package-json/lib/normalize-data.js b/deps/npm/node_modules/@npmcli/package-json/lib/normalize-data.js new file mode 100644 index 000000000000..79b0bafbcd3a --- /dev/null +++ b/deps/npm/node_modules/@npmcli/package-json/lib/normalize-data.js @@ -0,0 +1,257 @@ +// Originally normalize-package-data + +const url = require('node:url') +const hostedGitInfo = require('hosted-git-info') +const validateLicense = require('validate-npm-package-license') + +const typos = { + 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', +} + +const isEmail = str => str.includes('@') && (str.indexOf('@') < str.lastIndexOf('.')) + +// Extracts description from contents of a readme file in markdown format +function extractDescription (description) { + // the first block of text before the first heading that isn't the first line heading + const lines = description.trim().split('\n') + let start = 0 + // skip initial empty lines and lines that start with # + while (lines[start]?.trim().match(/^(#|$)/)) { + start++ + } + let end = start + 1 + // keep going till we get to the end or an empty line + while (end < lines.length && lines[end].trim()) { + end++ + } + return lines.slice(start, end).join(' ').trim() +} + +function stringifyPerson (person) { + if (typeof person !== 'string') { + const name = person.name || '' + const u = person.url || person.web + const wrappedUrl = u ? (' (' + u + ')') : '' + const e = person.email || person.mail + const wrappedEmail = e ? (' <' + e + '>') : '' + person = name + wrappedEmail + wrappedUrl + } + const matchedName = person.match(/^([^(<]+)/) + const matchedUrl = person.match(/\(([^()]+)\)/) + const matchedEmail = person.match(/<([^<>]+)>/) + const parsed = {} + if (matchedName?.[0].trim()) { + parsed.name = matchedName[0].trim() + } + if (matchedEmail) { + parsed.email = matchedEmail[1] + } + if (matchedUrl) { + parsed.url = matchedUrl[1] + } + return parsed +} + +function normalizeData (data, changes) { + // fixDescriptionField + if (data.description && typeof data.description !== 'string') { + changes?.push(`'description' field should be a string`) + delete data.description + } + if (data.readme && !data.description && data.readme !== 'ERROR: No README data found!') { + data.description = extractDescription(data.readme) + } + if (data.description === undefined) { + delete data.description + } + if (!data.description) { + changes?.push('No description') + } + + // fixModulesField + if (data.modules) { + changes?.push(`modules field is deprecated`) + delete data.modules + } + + // fixFilesField + const files = data.files + if (files && !Array.isArray(files)) { + changes?.push(`Invalid 'files' member`) + delete data.files + } else if (data.files) { + data.files = data.files.filter(function (file) { + if (!file || typeof file !== 'string') { + changes?.push(`Invalid filename in 'files' list: ${file}`) + return false + } else { + return true + } + }) + } + + // fixManField + if (data.man && typeof data.man === 'string') { + data.man = [data.man] + } + + // fixBugsField + if (!data.bugs && data.repository?.url) { + const hosted = hostedGitInfo.fromUrl(data.repository.url) + if (hosted && hosted.bugs()) { + data.bugs = { url: hosted.bugs() } + } + } else if (data.bugs) { + if (typeof data.bugs === 'string') { + if (isEmail(data.bugs)) { + data.bugs = { email: data.bugs } + /* eslint-disable-next-line node/no-deprecated-api */ + } else if (url.parse(data.bugs).protocol) { + data.bugs = { url: data.bugs } + } else { + changes?.push(`Bug string field must be url, email, or {email,url}`) + } + } else { + for (const k in data.bugs) { + if (['web', 'name'].includes(k)) { + changes?.push(`bugs['${k}'] should probably be bugs['url'].`) + data.bugs.url = data.bugs[k] + delete data.bugs[k] + } + } + const oldBugs = data.bugs + data.bugs = {} + if (oldBugs.url) { + /* eslint-disable-next-line node/no-deprecated-api */ + if (typeof (oldBugs.url) === 'string' && url.parse(oldBugs.url).protocol) { + data.bugs.url = oldBugs.url + } else { + changes?.push('bugs.url field must be a string url. Deleted.') + } + } + if (oldBugs.email) { + if (typeof (oldBugs.email) === 'string' && isEmail(oldBugs.email)) { + data.bugs.email = oldBugs.email + } else { + changes?.push('bugs.email field must be a string email. Deleted.') + } + } + } + if (!data.bugs.email && !data.bugs.url) { + delete data.bugs + changes?.push('Normalized value of bugs field is an empty object. Deleted.') + } + } + // fixKeywordsField + if (typeof data.keywords === 'string') { + data.keywords = data.keywords.split(/,\s+/) + } + if (data.keywords && !Array.isArray(data.keywords)) { + delete data.keywords + changes?.push(`keywords should be an array of strings`) + } else if (data.keywords) { + data.keywords = data.keywords.filter(function (kw) { + if (typeof kw !== 'string' || !kw) { + changes?.push(`keywords should be an array of strings`) + return false + } else { + return true + } + }) + } + // fixBundleDependenciesField + const bdd = 'bundledDependencies' + const bd = 'bundleDependencies' + if (data[bdd] && !data[bd]) { + data[bd] = data[bdd] + delete data[bdd] + } + if (data[bd] && !Array.isArray(data[bd])) { + changes?.push(`Invalid 'bundleDependencies' list. Must be array of package names`) + delete data[bd] + } else if (data[bd]) { + data[bd] = data[bd].filter(function (filtered) { + if (!filtered || typeof filtered !== 'string') { + changes?.push(`Invalid bundleDependencies member: ${filtered}`) + return false + } else { + if (!data.dependencies) { + data.dependencies = {} + } + if (!Object.prototype.hasOwnProperty.call(data.dependencies, filtered)) { + changes?.push(`Non-dependency in bundleDependencies: ${filtered}`) + data.dependencies[filtered] = '*' + } + return true + } + }) + } + // fixHomepageField + if (!data.homepage && data.repository && data.repository.url) { + const hosted = hostedGitInfo.fromUrl(data.repository.url) + if (hosted) { + data.homepage = hosted.docs() + } + } + if (data.homepage) { + if (typeof data.homepage !== 'string') { + changes?.push('homepage field must be a string url. Deleted.') + delete data.homepage + } else { + /* eslint-disable-next-line node/no-deprecated-api */ + if (!url.parse(data.homepage).protocol) { + data.homepage = 'http://' + data.homepage + } + } + } + // fixReadmeField + if (!data.readme) { + changes?.push('No README data') + data.readme = 'ERROR: No README data found!' + } + // fixLicenseField + const license = data.license || data.licence + if (!license) { + changes?.push('No license field.') + } else if (typeof (license) !== 'string' || license.length < 1 || license.trim() === '') { + changes?.push('license should be a valid SPDX license expression') + } else if (!validateLicense(license).validForNewPackages) { + changes?.push('license should be a valid SPDX license expression') + } + // fixPeople + if (data.author) { + data.author = stringifyPerson(data.author) + } + ['maintainers', 'contributors'].forEach(function (set) { + if (!Array.isArray(data[set])) { + return + } + data[set] = data[set].map(stringifyPerson) + }) + // fixTypos + for (const d in typos) { + if (Object.prototype.hasOwnProperty.call(data, d)) { + changes?.push(`${d} should probably be ${typos[d]}.`) + } + } +} + +module.exports = { normalizeData } diff --git a/deps/npm/node_modules/@npmcli/package-json/lib/normalize.js b/deps/npm/node_modules/@npmcli/package-json/lib/normalize.js index 3adec0143f44..711539010b8e 100644 --- a/deps/npm/node_modules/@npmcli/package-json/lib/normalize.js +++ b/deps/npm/node_modules/@npmcli/package-json/lib/normalize.js @@ -348,7 +348,6 @@ const normalize = async (pkg, { strict, steps, root, changes, allowLegacyCase }) changes?.push(`"readmeFilename" was set to ${readmeFile}`) } if (!data.readme) { - // this.warn('missingReadme') data.readme = 'ERROR: No README data found!' } } @@ -488,7 +487,6 @@ const normalize = async (pkg, { strict, steps, root, changes, allowLegacyCase }) // Some steps are isolated so we can do a limited subset of these in `fix` if (steps.includes('fixRepositoryField') || steps.includes('normalizeData')) { if (data.repositories) { - /* eslint-disable-next-line max-len */ changes?.push(`"repository" was set to the first entry in "repositories" (${data.repository})`) data.repository = data.repositories[0] } @@ -572,30 +570,10 @@ const normalize = async (pkg, { strict, steps, root, changes, allowLegacyCase }) } } + // TODO some of this is duplicated in other steps here, a future breaking change may be able to remove the duplicates involved in this step if (steps.includes('normalizeData')) { - const legacyFixer = require('normalize-package-data/lib/fixer.js') - const legacyMakeWarning = require('normalize-package-data/lib/make_warning.js') - legacyFixer.warn = function () { - changes?.push(legacyMakeWarning.apply(null, arguments)) - } - - const legacySteps = [ - 'fixDescriptionField', - 'fixModulesField', - 'fixFilesField', - 'fixManField', - 'fixBugsField', - 'fixKeywordsField', - 'fixBundleDependenciesField', - 'fixHomepageField', - 'fixReadmeField', - 'fixLicenseField', - 'fixPeople', - 'fixTypos', - ] - for (const legacyStep of legacySteps) { - legacyFixer[legacyStep](data) - } + const { normalizeData } = require('./normalize-data.js') + normalizeData(data, changes) } // Warn if the bin references don't point to anything. This might be better diff --git a/deps/npm/node_modules/@npmcli/package-json/package.json b/deps/npm/node_modules/@npmcli/package-json/package.json index 97070e27d0d2..542187829c95 100644 --- a/deps/npm/node_modules/@npmcli/package-json/package.json +++ b/deps/npm/node_modules/@npmcli/package-json/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/package-json", - "version": "6.1.0", + "version": "6.1.1", "description": "Programmatic API to update package.json", "keywords": [ "npm", @@ -33,13 +33,13 @@ "glob": "^10.2.2", "hosted-git-info": "^8.0.0", "json-parse-even-better-errors": "^4.0.0", - "normalize-package-data": "^7.0.0", "proc-log": "^5.0.0", - "semver": "^7.5.3" + "semver": "^7.5.3", + "validate-npm-package-license": "^3.0.4" }, "devDependencies": { - "@npmcli/eslint-config": "^5.0.0", - "@npmcli/template-oss": "4.23.5", + "@npmcli/eslint-config": "^5.1.0", + "@npmcli/template-oss": "4.23.6", "read-package-json": "^7.0.0", "read-package-json-fast": "^4.0.0", "tap": "^16.0.1" @@ -49,7 +49,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.23.5", + "version": "4.23.6", "publish": "true" }, "tap": { diff --git a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/events.js b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/events.js index 073093b8371a..b93ff74471bd 100644 --- a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/events.js +++ b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/events.js @@ -162,8 +162,8 @@ function base64FromBytes(arr) { } } function fromTimestamp(t) { - let millis = Number(t.seconds) * 1000; - millis += t.nanos / 1000000; + let millis = Number(t.seconds) * 1_000; + millis += t.nanos / 1_000_000; return new Date(millis); } function fromJsonTimestamp(o) { diff --git a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/api/field_behavior.js b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/api/field_behavior.js index da627499ad76..a7008ddb9da8 100644 --- a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/api/field_behavior.js +++ b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/api/field_behavior.js @@ -1,7 +1,9 @@ "use strict"; /* eslint-disable */ Object.defineProperty(exports, "__esModule", { value: true }); -exports.fieldBehaviorToJSON = exports.fieldBehaviorFromJSON = exports.FieldBehavior = void 0; +exports.FieldBehavior = void 0; +exports.fieldBehaviorFromJSON = fieldBehaviorFromJSON; +exports.fieldBehaviorToJSON = fieldBehaviorToJSON; /** * An indicator of the behavior of a given field (for example, that a field * is required in requests, or given as output but ignored as input). @@ -52,7 +54,7 @@ var FieldBehavior; * provided. Additionally, the list's order may or may not be stable. */ FieldBehavior[FieldBehavior["UNORDERED_LIST"] = 6] = "UNORDERED_LIST"; -})(FieldBehavior = exports.FieldBehavior || (exports.FieldBehavior = {})); +})(FieldBehavior || (exports.FieldBehavior = FieldBehavior = {})); function fieldBehaviorFromJSON(object) { switch (object) { case 0: @@ -80,7 +82,6 @@ function fieldBehaviorFromJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldBehavior"); } } -exports.fieldBehaviorFromJSON = fieldBehaviorFromJSON; function fieldBehaviorToJSON(object) { switch (object) { case FieldBehavior.FIELD_BEHAVIOR_UNSPECIFIED: @@ -101,7 +102,6 @@ function fieldBehaviorToJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldBehavior"); } } -exports.fieldBehaviorToJSON = fieldBehaviorToJSON; var tsProtoGlobalThis = (() => { if (typeof globalThis !== "undefined") { return globalThis; diff --git a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/descriptor.js b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/descriptor.js index d429aac84604..24074b87d5d9 100644 --- a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/descriptor.js +++ b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/descriptor.js @@ -1,7 +1,19 @@ "use strict"; /* eslint-disable */ Object.defineProperty(exports, "__esModule", { value: true }); -exports.GeneratedCodeInfo_Annotation = exports.GeneratedCodeInfo = exports.SourceCodeInfo_Location = exports.SourceCodeInfo = exports.UninterpretedOption_NamePart = exports.UninterpretedOption = exports.MethodOptions = exports.ServiceOptions = exports.EnumValueOptions = exports.EnumOptions = exports.OneofOptions = exports.FieldOptions = exports.MessageOptions = exports.FileOptions = exports.MethodDescriptorProto = exports.ServiceDescriptorProto = exports.EnumValueDescriptorProto = exports.EnumDescriptorProto_EnumReservedRange = exports.EnumDescriptorProto = exports.OneofDescriptorProto = exports.FieldDescriptorProto = exports.ExtensionRangeOptions = exports.DescriptorProto_ReservedRange = exports.DescriptorProto_ExtensionRange = exports.DescriptorProto = exports.FileDescriptorProto = exports.FileDescriptorSet = exports.methodOptions_IdempotencyLevelToJSON = exports.methodOptions_IdempotencyLevelFromJSON = exports.MethodOptions_IdempotencyLevel = exports.fieldOptions_JSTypeToJSON = exports.fieldOptions_JSTypeFromJSON = exports.FieldOptions_JSType = exports.fieldOptions_CTypeToJSON = exports.fieldOptions_CTypeFromJSON = exports.FieldOptions_CType = exports.fileOptions_OptimizeModeToJSON = exports.fileOptions_OptimizeModeFromJSON = exports.FileOptions_OptimizeMode = exports.fieldDescriptorProto_LabelToJSON = exports.fieldDescriptorProto_LabelFromJSON = exports.FieldDescriptorProto_Label = exports.fieldDescriptorProto_TypeToJSON = exports.fieldDescriptorProto_TypeFromJSON = exports.FieldDescriptorProto_Type = void 0; +exports.GeneratedCodeInfo_Annotation = exports.GeneratedCodeInfo = exports.SourceCodeInfo_Location = exports.SourceCodeInfo = exports.UninterpretedOption_NamePart = exports.UninterpretedOption = exports.MethodOptions = exports.ServiceOptions = exports.EnumValueOptions = exports.EnumOptions = exports.OneofOptions = exports.FieldOptions = exports.MessageOptions = exports.FileOptions = exports.MethodDescriptorProto = exports.ServiceDescriptorProto = exports.EnumValueDescriptorProto = exports.EnumDescriptorProto_EnumReservedRange = exports.EnumDescriptorProto = exports.OneofDescriptorProto = exports.FieldDescriptorProto = exports.ExtensionRangeOptions = exports.DescriptorProto_ReservedRange = exports.DescriptorProto_ExtensionRange = exports.DescriptorProto = exports.FileDescriptorProto = exports.FileDescriptorSet = exports.MethodOptions_IdempotencyLevel = exports.FieldOptions_JSType = exports.FieldOptions_CType = exports.FileOptions_OptimizeMode = exports.FieldDescriptorProto_Label = exports.FieldDescriptorProto_Type = void 0; +exports.fieldDescriptorProto_TypeFromJSON = fieldDescriptorProto_TypeFromJSON; +exports.fieldDescriptorProto_TypeToJSON = fieldDescriptorProto_TypeToJSON; +exports.fieldDescriptorProto_LabelFromJSON = fieldDescriptorProto_LabelFromJSON; +exports.fieldDescriptorProto_LabelToJSON = fieldDescriptorProto_LabelToJSON; +exports.fileOptions_OptimizeModeFromJSON = fileOptions_OptimizeModeFromJSON; +exports.fileOptions_OptimizeModeToJSON = fileOptions_OptimizeModeToJSON; +exports.fieldOptions_CTypeFromJSON = fieldOptions_CTypeFromJSON; +exports.fieldOptions_CTypeToJSON = fieldOptions_CTypeToJSON; +exports.fieldOptions_JSTypeFromJSON = fieldOptions_JSTypeFromJSON; +exports.fieldOptions_JSTypeToJSON = fieldOptions_JSTypeToJSON; +exports.methodOptions_IdempotencyLevelFromJSON = methodOptions_IdempotencyLevelFromJSON; +exports.methodOptions_IdempotencyLevelToJSON = methodOptions_IdempotencyLevelToJSON; var FieldDescriptorProto_Type; (function (FieldDescriptorProto_Type) { /** @@ -44,7 +56,7 @@ var FieldDescriptorProto_Type; FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; /** TYPE_SINT64 - Uses ZigZag encoding. */ FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; -})(FieldDescriptorProto_Type = exports.FieldDescriptorProto_Type || (exports.FieldDescriptorProto_Type = {})); +})(FieldDescriptorProto_Type || (exports.FieldDescriptorProto_Type = FieldDescriptorProto_Type = {})); function fieldDescriptorProto_TypeFromJSON(object) { switch (object) { case 1: @@ -105,7 +117,6 @@ function fieldDescriptorProto_TypeFromJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldDescriptorProto_Type"); } } -exports.fieldDescriptorProto_TypeFromJSON = fieldDescriptorProto_TypeFromJSON; function fieldDescriptorProto_TypeToJSON(object) { switch (object) { case FieldDescriptorProto_Type.TYPE_DOUBLE: @@ -148,14 +159,13 @@ function fieldDescriptorProto_TypeToJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldDescriptorProto_Type"); } } -exports.fieldDescriptorProto_TypeToJSON = fieldDescriptorProto_TypeToJSON; var FieldDescriptorProto_Label; (function (FieldDescriptorProto_Label) { /** LABEL_OPTIONAL - 0 is reserved for errors */ FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; -})(FieldDescriptorProto_Label = exports.FieldDescriptorProto_Label || (exports.FieldDescriptorProto_Label = {})); +})(FieldDescriptorProto_Label || (exports.FieldDescriptorProto_Label = FieldDescriptorProto_Label = {})); function fieldDescriptorProto_LabelFromJSON(object) { switch (object) { case 1: @@ -171,7 +181,6 @@ function fieldDescriptorProto_LabelFromJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldDescriptorProto_Label"); } } -exports.fieldDescriptorProto_LabelFromJSON = fieldDescriptorProto_LabelFromJSON; function fieldDescriptorProto_LabelToJSON(object) { switch (object) { case FieldDescriptorProto_Label.LABEL_OPTIONAL: @@ -184,7 +193,6 @@ function fieldDescriptorProto_LabelToJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldDescriptorProto_Label"); } } -exports.fieldDescriptorProto_LabelToJSON = fieldDescriptorProto_LabelToJSON; /** Generated classes can be optimized for speed or code size. */ var FileOptions_OptimizeMode; (function (FileOptions_OptimizeMode) { @@ -194,7 +202,7 @@ var FileOptions_OptimizeMode; FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; -})(FileOptions_OptimizeMode = exports.FileOptions_OptimizeMode || (exports.FileOptions_OptimizeMode = {})); +})(FileOptions_OptimizeMode || (exports.FileOptions_OptimizeMode = FileOptions_OptimizeMode = {})); function fileOptions_OptimizeModeFromJSON(object) { switch (object) { case 1: @@ -210,7 +218,6 @@ function fileOptions_OptimizeModeFromJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FileOptions_OptimizeMode"); } } -exports.fileOptions_OptimizeModeFromJSON = fileOptions_OptimizeModeFromJSON; function fileOptions_OptimizeModeToJSON(object) { switch (object) { case FileOptions_OptimizeMode.SPEED: @@ -223,14 +230,13 @@ function fileOptions_OptimizeModeToJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FileOptions_OptimizeMode"); } } -exports.fileOptions_OptimizeModeToJSON = fileOptions_OptimizeModeToJSON; var FieldOptions_CType; (function (FieldOptions_CType) { /** STRING - Default mode. */ FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; -})(FieldOptions_CType = exports.FieldOptions_CType || (exports.FieldOptions_CType = {})); +})(FieldOptions_CType || (exports.FieldOptions_CType = FieldOptions_CType = {})); function fieldOptions_CTypeFromJSON(object) { switch (object) { case 0: @@ -246,7 +252,6 @@ function fieldOptions_CTypeFromJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_CType"); } } -exports.fieldOptions_CTypeFromJSON = fieldOptions_CTypeFromJSON; function fieldOptions_CTypeToJSON(object) { switch (object) { case FieldOptions_CType.STRING: @@ -259,7 +264,6 @@ function fieldOptions_CTypeToJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_CType"); } } -exports.fieldOptions_CTypeToJSON = fieldOptions_CTypeToJSON; var FieldOptions_JSType; (function (FieldOptions_JSType) { /** JS_NORMAL - Use the default type. */ @@ -268,7 +272,7 @@ var FieldOptions_JSType; FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; /** JS_NUMBER - Use JavaScript numbers. */ FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; -})(FieldOptions_JSType = exports.FieldOptions_JSType || (exports.FieldOptions_JSType = {})); +})(FieldOptions_JSType || (exports.FieldOptions_JSType = FieldOptions_JSType = {})); function fieldOptions_JSTypeFromJSON(object) { switch (object) { case 0: @@ -284,7 +288,6 @@ function fieldOptions_JSTypeFromJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_JSType"); } } -exports.fieldOptions_JSTypeFromJSON = fieldOptions_JSTypeFromJSON; function fieldOptions_JSTypeToJSON(object) { switch (object) { case FieldOptions_JSType.JS_NORMAL: @@ -297,7 +300,6 @@ function fieldOptions_JSTypeToJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_JSType"); } } -exports.fieldOptions_JSTypeToJSON = fieldOptions_JSTypeToJSON; /** * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, * or neither? HTTP based RPC implementation may choose GET verb for safe @@ -310,7 +312,7 @@ var MethodOptions_IdempotencyLevel; MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; /** IDEMPOTENT - idempotent, but may have side effects */ MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; -})(MethodOptions_IdempotencyLevel = exports.MethodOptions_IdempotencyLevel || (exports.MethodOptions_IdempotencyLevel = {})); +})(MethodOptions_IdempotencyLevel || (exports.MethodOptions_IdempotencyLevel = MethodOptions_IdempotencyLevel = {})); function methodOptions_IdempotencyLevelFromJSON(object) { switch (object) { case 0: @@ -326,7 +328,6 @@ function methodOptions_IdempotencyLevelFromJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum MethodOptions_IdempotencyLevel"); } } -exports.methodOptions_IdempotencyLevelFromJSON = methodOptions_IdempotencyLevelFromJSON; function methodOptions_IdempotencyLevelToJSON(object) { switch (object) { case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: @@ -339,7 +340,6 @@ function methodOptions_IdempotencyLevelToJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum MethodOptions_IdempotencyLevel"); } } -exports.methodOptions_IdempotencyLevelToJSON = methodOptions_IdempotencyLevelToJSON; function createBaseFileDescriptorSet() { return { file: [] }; } diff --git a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_common.js b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_common.js index c6f9baa91fff..05697541c119 100644 --- a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_common.js +++ b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_common.js @@ -1,6 +1,12 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.TimeRange = exports.X509CertificateChain = exports.SubjectAlternativeName = exports.X509Certificate = exports.DistinguishedName = exports.ObjectIdentifierValuePair = exports.ObjectIdentifier = exports.PublicKeyIdentifier = exports.PublicKey = exports.RFC3161SignedTimestamp = exports.LogId = exports.MessageSignature = exports.HashOutput = exports.subjectAlternativeNameTypeToJSON = exports.subjectAlternativeNameTypeFromJSON = exports.SubjectAlternativeNameType = exports.publicKeyDetailsToJSON = exports.publicKeyDetailsFromJSON = exports.PublicKeyDetails = exports.hashAlgorithmToJSON = exports.hashAlgorithmFromJSON = exports.HashAlgorithm = void 0; +exports.TimeRange = exports.X509CertificateChain = exports.SubjectAlternativeName = exports.X509Certificate = exports.DistinguishedName = exports.ObjectIdentifierValuePair = exports.ObjectIdentifier = exports.PublicKeyIdentifier = exports.PublicKey = exports.RFC3161SignedTimestamp = exports.LogId = exports.MessageSignature = exports.HashOutput = exports.SubjectAlternativeNameType = exports.PublicKeyDetails = exports.HashAlgorithm = void 0; +exports.hashAlgorithmFromJSON = hashAlgorithmFromJSON; +exports.hashAlgorithmToJSON = hashAlgorithmToJSON; +exports.publicKeyDetailsFromJSON = publicKeyDetailsFromJSON; +exports.publicKeyDetailsToJSON = publicKeyDetailsToJSON; +exports.subjectAlternativeNameTypeFromJSON = subjectAlternativeNameTypeFromJSON; +exports.subjectAlternativeNameTypeToJSON = subjectAlternativeNameTypeToJSON; /* eslint-disable */ const timestamp_1 = require("./google/protobuf/timestamp"); /** @@ -20,7 +26,7 @@ var HashAlgorithm; HashAlgorithm[HashAlgorithm["SHA2_512"] = 3] = "SHA2_512"; HashAlgorithm[HashAlgorithm["SHA3_256"] = 4] = "SHA3_256"; HashAlgorithm[HashAlgorithm["SHA3_384"] = 5] = "SHA3_384"; -})(HashAlgorithm = exports.HashAlgorithm || (exports.HashAlgorithm = {})); +})(HashAlgorithm || (exports.HashAlgorithm = HashAlgorithm = {})); function hashAlgorithmFromJSON(object) { switch (object) { case 0: @@ -45,7 +51,6 @@ function hashAlgorithmFromJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum HashAlgorithm"); } } -exports.hashAlgorithmFromJSON = hashAlgorithmFromJSON; function hashAlgorithmToJSON(object) { switch (object) { case HashAlgorithm.HASH_ALGORITHM_UNSPECIFIED: @@ -64,7 +69,6 @@ function hashAlgorithmToJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum HashAlgorithm"); } } -exports.hashAlgorithmToJSON = hashAlgorithmToJSON; /** * Details of a specific public key, capturing the the key encoding method, * and signature algorithm. @@ -140,7 +144,7 @@ var PublicKeyDetails; */ PublicKeyDetails[PublicKeyDetails["LMS_SHA256"] = 14] = "LMS_SHA256"; PublicKeyDetails[PublicKeyDetails["LMOTS_SHA256"] = 15] = "LMOTS_SHA256"; -})(PublicKeyDetails = exports.PublicKeyDetails || (exports.PublicKeyDetails = {})); +})(PublicKeyDetails || (exports.PublicKeyDetails = PublicKeyDetails = {})); function publicKeyDetailsFromJSON(object) { switch (object) { case 0: @@ -204,7 +208,6 @@ function publicKeyDetailsFromJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum PublicKeyDetails"); } } -exports.publicKeyDetailsFromJSON = publicKeyDetailsFromJSON; function publicKeyDetailsToJSON(object) { switch (object) { case PublicKeyDetails.PUBLIC_KEY_DETAILS_UNSPECIFIED: @@ -249,7 +252,6 @@ function publicKeyDetailsToJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum PublicKeyDetails"); } } -exports.publicKeyDetailsToJSON = publicKeyDetailsToJSON; var SubjectAlternativeNameType; (function (SubjectAlternativeNameType) { SubjectAlternativeNameType[SubjectAlternativeNameType["SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED"] = 0] = "SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED"; @@ -261,7 +263,7 @@ var SubjectAlternativeNameType; * for more details. */ SubjectAlternativeNameType[SubjectAlternativeNameType["OTHER_NAME"] = 3] = "OTHER_NAME"; -})(SubjectAlternativeNameType = exports.SubjectAlternativeNameType || (exports.SubjectAlternativeNameType = {})); +})(SubjectAlternativeNameType || (exports.SubjectAlternativeNameType = SubjectAlternativeNameType = {})); function subjectAlternativeNameTypeFromJSON(object) { switch (object) { case 0: @@ -280,7 +282,6 @@ function subjectAlternativeNameTypeFromJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum SubjectAlternativeNameType"); } } -exports.subjectAlternativeNameTypeFromJSON = subjectAlternativeNameTypeFromJSON; function subjectAlternativeNameTypeToJSON(object) { switch (object) { case SubjectAlternativeNameType.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED: @@ -295,7 +296,6 @@ function subjectAlternativeNameTypeToJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum SubjectAlternativeNameType"); } } -exports.subjectAlternativeNameTypeToJSON = subjectAlternativeNameTypeToJSON; function createBaseHashOutput() { return { algorithm: 0, digest: Buffer.alloc(0) }; } @@ -568,8 +568,8 @@ function base64FromBytes(arr) { } } function fromTimestamp(t) { - let millis = Number(t.seconds) * 1000; - millis += t.nanos / 1000000; + let millis = Number(t.seconds) * 1_000; + millis += t.nanos / 1_000_000; return new Date(millis); } function fromJsonTimestamp(o) { diff --git a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_trustroot.js b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_trustroot.js index 8791aba27044..a507d4dba590 100644 --- a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_trustroot.js +++ b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_trustroot.js @@ -102,11 +102,12 @@ exports.TrustedRoot = { }, }; function createBaseSigningConfig() { - return { caUrl: "", oidcUrl: "", tlogUrls: [], tsaUrls: [] }; + return { mediaType: "", caUrl: "", oidcUrl: "", tlogUrls: [], tsaUrls: [] }; } exports.SigningConfig = { fromJSON(object) { return { + mediaType: isSet(object.mediaType) ? String(object.mediaType) : "", caUrl: isSet(object.caUrl) ? String(object.caUrl) : "", oidcUrl: isSet(object.oidcUrl) ? String(object.oidcUrl) : "", tlogUrls: Array.isArray(object?.tlogUrls) ? object.tlogUrls.map((e) => String(e)) : [], @@ -115,6 +116,7 @@ exports.SigningConfig = { }, toJSON(message) { const obj = {}; + message.mediaType !== undefined && (obj.mediaType = message.mediaType); message.caUrl !== undefined && (obj.caUrl = message.caUrl); message.oidcUrl !== undefined && (obj.oidcUrl = message.oidcUrl); if (message.tlogUrls) { diff --git a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_verification.js b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_verification.js index 4af83c5a5466..222686bbf304 100644 --- a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_verification.js +++ b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_verification.js @@ -236,7 +236,9 @@ exports.Artifact = { ? { $case: "artifactUri", artifactUri: String(object.artifactUri) } : isSet(object.artifact) ? { $case: "artifact", artifact: Buffer.from(bytesFromBase64(object.artifact)) } - : undefined, + : isSet(object.artifactDigest) + ? { $case: "artifactDigest", artifactDigest: sigstore_common_1.HashOutput.fromJSON(object.artifactDigest) } + : undefined, }; }, toJSON(message) { @@ -244,6 +246,8 @@ exports.Artifact = { message.data?.$case === "artifactUri" && (obj.artifactUri = message.data?.artifactUri); message.data?.$case === "artifact" && (obj.artifact = message.data?.artifact !== undefined ? base64FromBytes(message.data?.artifact) : undefined); + message.data?.$case === "artifactDigest" && + (obj.artifactDigest = message.data?.artifactDigest ? sigstore_common_1.HashOutput.toJSON(message.data?.artifactDigest) : undefined); return obj; }, }; diff --git a/deps/npm/node_modules/@sigstore/protobuf-specs/package.json b/deps/npm/node_modules/@sigstore/protobuf-specs/package.json index 92ae4acbd00e..c81cfc681f14 100644 --- a/deps/npm/node_modules/@sigstore/protobuf-specs/package.json +++ b/deps/npm/node_modules/@sigstore/protobuf-specs/package.json @@ -1,6 +1,6 @@ { "name": "@sigstore/protobuf-specs", - "version": "0.3.2", + "version": "0.3.3", "description": "code-signing for npm packages", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -21,11 +21,11 @@ }, "homepage": "https://github.com/sigstore/protobuf-specs#readme", "devDependencies": { - "@tsconfig/node16": "^16.1.1", + "@tsconfig/node18": "^18.2.4", "@types/node": "^18.14.0", - "typescript": "^4.9.5" + "typescript": "^5.7.2" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } } diff --git a/deps/npm/node_modules/chalk/package.json b/deps/npm/node_modules/chalk/package.json index 3c500105bcbf..23b4ce33dc66 100644 --- a/deps/npm/node_modules/chalk/package.json +++ b/deps/npm/node_modules/chalk/package.json @@ -1,6 +1,6 @@ { "name": "chalk", - "version": "5.3.0", + "version": "5.4.1", "description": "Terminal string styling done right", "license": "MIT", "repository": "chalk/chalk", @@ -16,6 +16,7 @@ } }, "types": "./source/index.d.ts", + "sideEffects": false, "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" }, @@ -58,10 +59,9 @@ "log-update": "^5.0.0", "matcha": "^0.7.0", "tsd": "^0.19.0", - "xo": "^0.53.0", + "xo": "^0.57.0", "yoctodelay": "^2.0.0" }, - "sideEffects": false, "xo": { "rules": { "unicorn/prefer-string-slice": "off", diff --git a/deps/npm/node_modules/chalk/source/vendor/supports-color/browser.js b/deps/npm/node_modules/chalk/source/vendor/supports-color/browser.js index 9fa6888f1028..fbb6ce0fc9ab 100644 --- a/deps/npm/node_modules/chalk/source/vendor/supports-color/browser.js +++ b/deps/npm/node_modules/chalk/source/vendor/supports-color/browser.js @@ -1,14 +1,18 @@ /* eslint-env browser */ const level = (() => { - if (navigator.userAgentData) { + if (!('navigator' in globalThis)) { + return 0; + } + + if (globalThis.navigator.userAgentData) { const brand = navigator.userAgentData.brands.find(({brand}) => brand === 'Chromium'); if (brand && brand.version > 93) { return 3; } } - if (/\b(Chrome|Chromium)\//.test(navigator.userAgent)) { + if (/\b(Chrome|Chromium)\//.test(globalThis.navigator.userAgent)) { return 1; } diff --git a/deps/npm/node_modules/chalk/source/vendor/supports-color/index.js b/deps/npm/node_modules/chalk/source/vendor/supports-color/index.js index 4ce0a2da8d22..1388372674d4 100644 --- a/deps/npm/node_modules/chalk/source/vendor/supports-color/index.js +++ b/deps/npm/node_modules/chalk/source/vendor/supports-color/index.js @@ -112,11 +112,11 @@ function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) { } if ('CI' in env) { - if ('GITHUB_ACTIONS' in env || 'GITEA_ACTIONS' in env) { + if (['GITHUB_ACTIONS', 'GITEA_ACTIONS', 'CIRCLECI'].some(key => key in env)) { return 3; } - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') { + if (['TRAVIS', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') { return 1; } diff --git a/deps/npm/node_modules/spdx-license-ids/index.json b/deps/npm/node_modules/spdx-license-ids/index.json index f43d5016bd95..c1ae5520b18a 100644 --- a/deps/npm/node_modules/spdx-license-ids/index.json +++ b/deps/npm/node_modules/spdx-license-ids/index.json @@ -89,6 +89,7 @@ "Bitstream-Vera", "BlueOak-1.0.0", "Boehm-GC", + "Boehm-GC-without-fee", "Borceux", "Brian-Gladman-2-Clause", "Brian-Gladman-3-Clause", @@ -148,6 +149,8 @@ "CC-BY-SA-3.0-IGO", "CC-BY-SA-4.0", "CC-PDDC", + "CC-PDM-1.0", + "CC-SA-1.0", "CC0-1.0", "CDDL-1.0", "CDDL-1.1", @@ -198,6 +201,7 @@ "DRL-1.1", "DSDP", "DocBook-Schema", + "DocBook-Stylesheet", "DocBook-XML", "Dotseqn", "ECL-1.0", @@ -305,6 +309,7 @@ "Imlib2", "Info-ZIP", "Inner-Net-2.0", + "InnoSetup", "Intel", "Intel-ACPI", "Interbase-1.0", @@ -349,9 +354,11 @@ "Linux-man-pages-copyleft-2-para", "Linux-man-pages-copyleft-var", "Lucida-Bitmap-Fonts", + "MIPS", "MIT", "MIT-0", "MIT-CMU", + "MIT-Click", "MIT-Festival", "MIT-Khronos-old", "MIT-Modern-Variant", @@ -502,6 +509,7 @@ "SISSL", "SISSL-1.2", "SL", + "SMAIL-GPL", "SMLNJ", "SMPPL", "SNIA", @@ -515,6 +523,7 @@ "SchemeReport", "Sendmail", "Sendmail-8.23", + "Sendmail-Open-Source-1.1", "SimPL-2.0", "Sleepycat", "Soundex", @@ -540,6 +549,8 @@ "TU-Berlin-1.0", "TU-Berlin-2.0", "TermReadKey", + "ThirdEye", + "TrustedQSL", "UCAR", "UCL-1.0", "UMich-Merit", @@ -583,6 +594,7 @@ "Zimbra-1.4", "Zlib", "any-OSI", + "any-OSI-perl-modules", "bcrypt-Solar-Designer", "blessing", "bzip2-1.0.6", @@ -599,6 +611,7 @@ "etalab-2.0", "fwlw", "gSOAP-1.3b", + "generic-xts", "gnuplot", "gtkbook", "hdparm", @@ -627,6 +640,7 @@ "threeparttable", "ulem", "w3m", + "wwl", "xinetd", "xkeyboard-config-Zinoviev", "xlock", diff --git a/deps/npm/node_modules/spdx-license-ids/package.json b/deps/npm/node_modules/spdx-license-ids/package.json index 7ab34aab6b8b..9b02c2676045 100644 --- a/deps/npm/node_modules/spdx-license-ids/package.json +++ b/deps/npm/node_modules/spdx-license-ids/package.json @@ -1,14 +1,14 @@ { "name": "spdx-license-ids", - "version": "3.0.20", + "version": "3.0.21", "description": "A list of SPDX license identifiers", "repository": "jslicense/spdx-license-ids", "author": "Shinnosuke Watanabe (https://github.com/shinnn)", "license": "CC0-1.0", "scripts": { "build": "node build.js", - "pretest": "eslint .", "latest": "node latest.js", + "pretest": "npm run build", "test": "node test.js" }, "files": [ @@ -25,15 +25,5 @@ "json", "array", "oss" - ], - "devDependencies": { - "@shinnn/eslint-config": "^7.0.0", - "eslint": "^8.49.0", - "eslint-formatter-codeframe": "^7.32.1", - "rmfr": "^2.0.0", - "tape": "^5.6.6" - }, - "eslintConfig": { - "extends": "@shinnn" - } + ] } diff --git a/deps/npm/package.json b/deps/npm/package.json index 82c5a193b88c..2494292ec55c 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "11.0.0", + "version": "11.1.0", "name": "npm", "description": "a package manager for JavaScript", "workspaces": [ @@ -53,10 +53,10 @@ "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/arborist": "^9.0.0", - "@npmcli/config": "^10.0.0", + "@npmcli/config": "^10.0.1", "@npmcli/fs": "^4.0.0", "@npmcli/map-workspaces": "^4.0.2", - "@npmcli/package-json": "^6.1.0", + "@npmcli/package-json": "^6.1.1", "@npmcli/promise-spawn": "^8.0.2", "@npmcli/redact": "^3.0.0", "@npmcli/run-script": "^9.0.1", @@ -64,7 +64,7 @@ "abbrev": "^3.0.0", "archy": "~1.0.0", "cacache": "^19.0.1", - "chalk": "^5.3.0", + "chalk": "^5.4.1", "ci-info": "^4.1.0", "cli-columns": "^4.0.0", "fastest-levenshtein": "^1.0.16", @@ -188,7 +188,7 @@ ], "devDependencies": { "@npmcli/docs": "^1.0.0", - "@npmcli/eslint-config": "^5.0.1", + "@npmcli/eslint-config": "^5.1.0", "@npmcli/git": "^6.0.1", "@npmcli/mock-globals": "^1.0.0", "@npmcli/mock-registry": "^1.0.0", diff --git a/deps/npm/tap-snapshots/test/lib/commands/completion.js.test.cjs b/deps/npm/tap-snapshots/test/lib/commands/completion.js.test.cjs index 9b6f1ba51c78..a281883539f6 100644 --- a/deps/npm/tap-snapshots/test/lib/commands/completion.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/commands/completion.js.test.cjs @@ -100,6 +100,7 @@ Array [ team test token + undeprecate uninstall unpublish unstar diff --git a/deps/npm/tap-snapshots/test/lib/commands/install.js.test.cjs b/deps/npm/tap-snapshots/test/lib/commands/install.js.test.cjs index 8f426ec3103a..c36e9c190483 100644 --- a/deps/npm/tap-snapshots/test/lib/commands/install.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/commands/install.js.test.cjs @@ -134,7 +134,7 @@ silly logfile done cleaning log files verbose stack Error: The developer of this package has specified the following through devEngines verbose stack Invalid engine "runtime" verbose stack Invalid name "nondescript" does not match "node" for "runtime" -verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:182:27) +verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:181:27) verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:251:7) verbose stack at MockNpm.exec ({CWD}/lib/npm.js:207:9) error code EBADDEVENGINES @@ -199,7 +199,7 @@ warn EBADDEVENGINES } verbose stack Error: The developer of this package has specified the following through devEngines verbose stack Invalid engine "runtime" verbose stack Invalid name "nondescript" does not match "node" for "runtime" -verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:182:27) +verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:181:27) verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:251:7) verbose stack at MockNpm.exec ({CWD}/lib/npm.js:207:9) error code EBADDEVENGINES @@ -225,7 +225,7 @@ silly logfile done cleaning log files verbose stack Error: The developer of this package has specified the following through devEngines verbose stack Invalid engine "runtime" verbose stack Invalid name "nondescript" does not match "node" for "runtime" -verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:182:27) +verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:181:27) verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:251:7) verbose stack at MockNpm.exec ({CWD}/lib/npm.js:207:9) error code EBADDEVENGINES diff --git a/deps/npm/tap-snapshots/test/lib/commands/publish.js.test.cjs b/deps/npm/tap-snapshots/test/lib/commands/publish.js.test.cjs index c0dc06b56818..81c7dbe908d2 100644 --- a/deps/npm/tap-snapshots/test/lib/commands/publish.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/commands/publish.js.test.cjs @@ -6,7 +6,7 @@ */ 'use strict' exports[`test/lib/commands/publish.js TAP _auth config default registry > new package version 1`] = ` -+ test-package@1.0.0 ++ @npmcli/test-package@1.0.0 ` exports[`test/lib/commands/publish.js TAP bare _auth and registry config > new package version 1`] = ` @@ -15,15 +15,15 @@ exports[`test/lib/commands/publish.js TAP bare _auth and registry config > new p exports[`test/lib/commands/publish.js TAP dry-run > must match snapshot 1`] = ` Array [ - "package: test-package@1.0.0", + "package: @npmcli/test-package@1.0.0", "Tarball Contents", - "87B package.json", + "95B package.json", "Tarball Details", - "name: test-package", + "name: @npmcli/test-package", "version: 1.0.0", - "filename: test-package-1.0.0.tgz", + "filename: npmcli-test-package-1.0.0.tgz", "package size: {size}", - "unpacked size: 87 B", + "unpacked size: 95 B", "shasum: {sha}", "integrity: {integrity} "total files: 1", @@ -76,7 +76,7 @@ exports[`test/lib/commands/publish.js TAP has token auth for scope configured re ` exports[`test/lib/commands/publish.js TAP ignore-scripts > new package version 1`] = ` -+ test-package@1.0.0 ++ @npmcli/test-package@1.0.0 ` exports[`test/lib/commands/publish.js TAP json > must match snapshot 1`] = ` @@ -87,14 +87,14 @@ Array [ exports[`test/lib/commands/publish.js TAP json > new package json 1`] = ` { - "id": "test-package@1.0.0", - "name": "test-package", + "id": "@npmcli/test-package@1.0.0", + "name": "@npmcli/test-package", "version": "1.0.0", "size": "{size}", - "unpackedSize": 87, + "unpackedSize": 95, "shasum": "{sha}", "integrity": "{integrity}", - "filename": "test-package-1.0.0.tgz", + "filename": "npmcli-test-package-1.0.0.tgz", "files": [ { "path": "package.json", @@ -208,6 +208,7 @@ Object { "man/man1/npm-team.1", "man/man1/npm-test.1", "man/man1/npm-token.1", + "man/man1/npm-undeprecate.1", "man/man1/npm-uninstall.1", "man/man1/npm-unpublish.1", "man/man1/npm-unstar.1", @@ -248,7 +249,7 @@ Object { ` exports[`test/lib/commands/publish.js TAP no auth dry-run > must match snapshot 1`] = ` -+ test-package@1.0.0 ++ @npmcli/test-package@1.0.0 ` exports[`test/lib/commands/publish.js TAP no auth dry-run > warns about auth being needed 1`] = ` @@ -258,7 +259,7 @@ Array [ ` exports[`test/lib/commands/publish.js TAP prioritize CLI flags over publishConfig > new package version 1`] = ` -+ test-package@1.0.0 ++ @npmcli/test-package@1.0.0 ` exports[`test/lib/commands/publish.js TAP public access > must match snapshot 1`] = ` @@ -284,7 +285,7 @@ exports[`test/lib/commands/publish.js TAP public access > new package version 1` ` exports[`test/lib/commands/publish.js TAP re-loads publishConfig.registry if added during script process > new package version 1`] = ` -+ test-package@1.0.0 ++ @npmcli/test-package@1.0.0 ` exports[`test/lib/commands/publish.js TAP respects publishConfig.registry, runs appropriate scripts > new package version 1`] = ` diff --git a/deps/npm/tap-snapshots/test/lib/commands/sbom.js.test.cjs b/deps/npm/tap-snapshots/test/lib/commands/sbom.js.test.cjs index 826cf074e603..5b2e93a3df6d 100644 --- a/deps/npm/tap-snapshots/test/lib/commands/sbom.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/commands/sbom.js.test.cjs @@ -259,12 +259,7 @@ exports[`test/lib/commands/sbom.js TAP sbom basic sbom - cyclonedx > must match "version": "1.0.0", "scope": "required", "purl": "pkg:npm/test-npm-sbom@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [] } }, @@ -276,12 +271,7 @@ exports[`test/lib/commands/sbom.js TAP sbom basic sbom - cyclonedx > must match "version": "1.0.0", "scope": "required", "purl": "pkg:npm/chai@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "node_modules/chai" - } - ], + "properties": [], "externalReferences": [] }, { @@ -291,12 +281,7 @@ exports[`test/lib/commands/sbom.js TAP sbom basic sbom - cyclonedx > must match "version": "1.0.0", "scope": "required", "purl": "pkg:npm/foo@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "node_modules/foo" - } - ], + "properties": [], "externalReferences": [] }, { @@ -306,12 +291,7 @@ exports[`test/lib/commands/sbom.js TAP sbom basic sbom - cyclonedx > must match "version": "1.0.0", "scope": "required", "purl": "pkg:npm/dog@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "node_modules/foo/node_modules/dog" - } - ], + "properties": [], "externalReferences": [] } ], @@ -453,6 +433,252 @@ exports[`test/lib/commands/sbom.js TAP sbom basic sbom - spdx > must match snaps } ` +exports[`test/lib/commands/sbom.js TAP sbom duplicate deps - cyclonedx > must match snapshot 1`] = ` +{ + "$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json", + "bomFormat": "CycloneDX", + "specVersion": "1.5", + "serialNumber": "urn:uuid:00000000-0000-0000-0000-000000000000", + "version": 1, + "metadata": { + "timestamp": "2020-01-01T00:00:00.000Z", + "lifecycles": [ + { + "phase": "build" + } + ], + "tools": [ + { + "vendor": "npm", + "name": "cli", + "version": "10.0.0" + } + ], + "component": { + "bom-ref": "test-npm-sbom@1.0.0", + "type": "library", + "name": "prefix", + "version": "1.0.0", + "scope": "required", + "purl": "pkg:npm/test-npm-sbom@1.0.0", + "properties": [], + "externalReferences": [] + } + }, + "components": [ + { + "bom-ref": "bar@1.0.0", + "type": "library", + "name": "bar", + "version": "1.0.0", + "scope": "required", + "purl": "pkg:npm/bar@1.0.0", + "properties": [], + "externalReferences": [] + }, + { + "bom-ref": "chai@1.0.0", + "type": "library", + "name": "chai", + "version": "1.0.0", + "scope": "required", + "purl": "pkg:npm/chai@1.0.0", + "properties": [], + "externalReferences": [] + }, + { + "bom-ref": "chai@2.0.0", + "type": "library", + "name": "chai", + "version": "2.0.0", + "scope": "required", + "purl": "pkg:npm/chai@2.0.0", + "properties": [], + "externalReferences": [] + }, + { + "bom-ref": "foo@1.0.0", + "type": "library", + "name": "foo", + "version": "1.0.0", + "scope": "required", + "purl": "pkg:npm/foo@1.0.0", + "properties": [], + "externalReferences": [] + } + ], + "dependencies": [ + { + "ref": "test-npm-sbom@1.0.0", + "dependsOn": [ + "foo@1.0.0", + "bar@1.0.0", + "chai@2.0.0" + ] + }, + { + "ref": "bar@1.0.0", + "dependsOn": [ + "chai@1.0.0" + ] + }, + { + "ref": "chai@1.0.0", + "dependsOn": [] + }, + { + "ref": "chai@2.0.0", + "dependsOn": [] + }, + { + "ref": "foo@1.0.0", + "dependsOn": [ + "chai@1.0.0" + ] + } + ] +} +` + +exports[`test/lib/commands/sbom.js TAP sbom duplicate deps - spdx > must match snapshot 1`] = ` +{ + "spdxVersion": "SPDX-2.3", + "dataLicense": "CC0-1.0", + "SPDXID": "SPDXRef-DOCUMENT", + "name": "test-npm-sbom@1.0.0", + "documentNamespace": "http://spdx.org/spdxdocs/test-npm-sbom-1.0.0-00000000-0000-0000-0000-000000000000", + "creationInfo": { + "created": "2020-01-01T00:00:00.000Z", + "creators": [ + "Tool: npm/cli-10.0.0" + ] + }, + "documentDescribes": [ + "SPDXRef-Package-test-npm-sbom-1.0.0" + ], + "packages": [ + { + "name": "test-npm-sbom", + "SPDXID": "SPDXRef-Package-test-npm-sbom-1.0.0", + "versionInfo": "1.0.0", + "packageFileName": "", + "primaryPackagePurpose": "LIBRARY", + "downloadLocation": "NOASSERTION", + "filesAnalyzed": false, + "homepage": "NOASSERTION", + "licenseDeclared": "NOASSERTION", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceType": "purl", + "referenceLocator": "pkg:npm/test-npm-sbom@1.0.0" + } + ] + }, + { + "name": "bar", + "SPDXID": "SPDXRef-Package-bar-1.0.0", + "versionInfo": "1.0.0", + "packageFileName": "node_modules/bar", + "downloadLocation": "NOASSERTION", + "filesAnalyzed": false, + "homepage": "NOASSERTION", + "licenseDeclared": "NOASSERTION", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceType": "purl", + "referenceLocator": "pkg:npm/bar@1.0.0" + } + ] + }, + { + "name": "chai", + "SPDXID": "SPDXRef-Package-chai-1.0.0", + "versionInfo": "1.0.0", + "packageFileName": "node_modules/bar/node_modules/chai", + "downloadLocation": "NOASSERTION", + "filesAnalyzed": false, + "homepage": "NOASSERTION", + "licenseDeclared": "NOASSERTION", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceType": "purl", + "referenceLocator": "pkg:npm/chai@1.0.0" + } + ] + }, + { + "name": "chai", + "SPDXID": "SPDXRef-Package-chai-2.0.0", + "versionInfo": "2.0.0", + "packageFileName": "node_modules/chai", + "downloadLocation": "NOASSERTION", + "filesAnalyzed": false, + "homepage": "NOASSERTION", + "licenseDeclared": "NOASSERTION", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceType": "purl", + "referenceLocator": "pkg:npm/chai@2.0.0" + } + ] + }, + { + "name": "foo", + "SPDXID": "SPDXRef-Package-foo-1.0.0", + "versionInfo": "1.0.0", + "packageFileName": "node_modules/foo", + "downloadLocation": "NOASSERTION", + "filesAnalyzed": false, + "homepage": "NOASSERTION", + "licenseDeclared": "NOASSERTION", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceType": "purl", + "referenceLocator": "pkg:npm/foo@1.0.0" + } + ] + } + ], + "relationships": [ + { + "spdxElementId": "SPDXRef-DOCUMENT", + "relatedSpdxElement": "SPDXRef-Package-test-npm-sbom-1.0.0", + "relationshipType": "DESCRIBES" + }, + { + "spdxElementId": "SPDXRef-Package-foo-1.0.0", + "relatedSpdxElement": "SPDXRef-Package-test-npm-sbom-1.0.0", + "relationshipType": "DEPENDENCY_OF" + }, + { + "spdxElementId": "SPDXRef-Package-bar-1.0.0", + "relatedSpdxElement": "SPDXRef-Package-test-npm-sbom-1.0.0", + "relationshipType": "DEPENDENCY_OF" + }, + { + "spdxElementId": "SPDXRef-Package-chai-2.0.0", + "relatedSpdxElement": "SPDXRef-Package-test-npm-sbom-1.0.0", + "relationshipType": "DEPENDENCY_OF" + }, + { + "spdxElementId": "SPDXRef-Package-chai-1.0.0", + "relatedSpdxElement": "SPDXRef-Package-bar-1.0.0", + "relationshipType": "DEPENDENCY_OF" + }, + { + "spdxElementId": "SPDXRef-Package-chai-1.0.0", + "relatedSpdxElement": "SPDXRef-Package-foo-1.0.0", + "relationshipType": "DEPENDENCY_OF" + } + ] +} +` + exports[`test/lib/commands/sbom.js TAP sbom extraneous dep > must match snapshot 1`] = ` { "spdxVersion": "SPDX-2.3", diff --git a/deps/npm/tap-snapshots/test/lib/commands/search.js.test.cjs b/deps/npm/tap-snapshots/test/lib/commands/search.js.test.cjs index eb2bf419dd21..ad215df73826 100644 --- a/deps/npm/tap-snapshots/test/lib/commands/search.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/commands/search.js.test.cjs @@ -932,6 +932,152 @@ Maintainers: lukekarrys https://npm.im/pkg-no-desc ` +exports[`test/lib/commands/search.js TAP search multiple terms --color > should have expected search results with color 1`] = ` +libnpm +Collection of programmatic APIs for the npm CLI +Version 3.0.1 published 2019-07-16 by isaacs +Maintainers: nlf ruyadorno darcyclarke isaacs +Keywords: npm api package manager lib +https://npm.im/libnpm +libnpmaccess +programmatic library for \`npm access\` commands +Version 4.0.1 published 2020-11-03 by nlf +Maintainers: nlf ruyadorno darcyclarke isaacs +Keywords: libnpmaccess +https://npm.im/libnpmaccess +@evocateur/libnpmaccess +programmatic library for \`npm access\` commands +Version 3.1.2 published 2019-07-16 by evocateur +Maintainers: evocateur +https://npm.im/@evocateur/libnpmaccess +@evocateur/libnpmpublish +Programmatic API for the bits behind npm publish and unpublish +Version 1.2.2 published 2019-07-16 by evocateur +Maintainers: evocateur +https://npm.im/@evocateur/libnpmpublish +libnpmorg +Programmatic api for \`npm org\` commands +Version 2.0.1 published 2020-11-03 by nlf +Maintainers: nlf ruyadorno darcyclarke isaacs +Keywords: libnpm npm package manager api orgs teams +https://npm.im/libnpmorg +libnpmsearch +Programmatic API for searching in npm and compatible registries. +Version 3.1.0 published 2020-12-08 by isaacs +Maintainers: nlf ruyadorno darcyclarke isaacs +Keywords: npm search api libnpm +https://npm.im/libnpmsearch +libnpmteam +npm Team management APIs +Version 2.0.2 published 2020-11-03 by nlf +Maintainers: nlf ruyadorno darcyclarke isaacs +https://npm.im/libnpmteam +libnpmpublish +Programmatic API for the bits behind npm publish and unpublish +Version 4.0.0 published 2020-11-03 by nlf +Maintainers: nlf ruyadorno darcyclarke isaacs +https://npm.im/libnpmpublish +libnpmfund +Programmatic API for npm fund +Version 1.0.2 published 2020-12-08 by isaacs +Maintainers: nlf ruyadorno darcyclarke isaacs +Keywords: npm npmcli libnpm cli git fund gitfund +https://npm.im/libnpmfund +@npmcli/map-workspaces +Retrieves a name:pathname Map for a given workspaces config +Version 1.0.1 published 2020-09-30 by ruyadorno +Maintainers: nlf ruyadorno darcyclarke isaacs +Keywords: npm bad map npmcli libnpm cli workspaces map-workspaces +https://npm.im/@npmcli/map-workspaces +libnpmversion +library to do the things that 'npm version' does +Version 1.0.7 published 2020-11-04 by isaacs +Maintainers: nlf ruyadorno darcyclarke isaacs +https://npm.im/libnpmversion +@types/libnpmsearch +TypeScript definitions for libnpmsearch +Version 2.0.1 published 2019-09-26 by types +Maintainers: types +https://npm.im/@types/libnpmsearch +pkg-no-desc +Version 1.0.0 published 2019-09-26 by lukekarrys +Maintainers: lukekarrys +https://npm.im/pkg-no-desc +` + +exports[`test/lib/commands/search.js TAP search multiple terms text > should have expected search results 1`] = ` +libnpm +Collection of programmatic APIs for the npm CLI +Version 3.0.1 published 2019-07-16 by isaacs +Maintainers: nlf ruyadorno darcyclarke isaacs +Keywords: npm api package manager lib +https://npm.im/libnpm +libnpmaccess +programmatic library for \`npm access\` commands +Version 4.0.1 published 2020-11-03 by nlf +Maintainers: nlf ruyadorno darcyclarke isaacs +Keywords: libnpmaccess +https://npm.im/libnpmaccess +@evocateur/libnpmaccess +programmatic library for \`npm access\` commands +Version 3.1.2 published 2019-07-16 by evocateur +Maintainers: evocateur +https://npm.im/@evocateur/libnpmaccess +@evocateur/libnpmpublish +Programmatic API for the bits behind npm publish and unpublish +Version 1.2.2 published 2019-07-16 by evocateur +Maintainers: evocateur +https://npm.im/@evocateur/libnpmpublish +libnpmorg +Programmatic api for \`npm org\` commands +Version 2.0.1 published 2020-11-03 by nlf +Maintainers: nlf ruyadorno darcyclarke isaacs +Keywords: libnpm npm package manager api orgs teams +https://npm.im/libnpmorg +libnpmsearch +Programmatic API for searching in npm and compatible registries. +Version 3.1.0 published 2020-12-08 by isaacs +Maintainers: nlf ruyadorno darcyclarke isaacs +Keywords: npm search api libnpm +https://npm.im/libnpmsearch +libnpmteam +npm Team management APIs +Version 2.0.2 published 2020-11-03 by nlf +Maintainers: nlf ruyadorno darcyclarke isaacs +https://npm.im/libnpmteam +libnpmpublish +Programmatic API for the bits behind npm publish and unpublish +Version 4.0.0 published 2020-11-03 by nlf +Maintainers: nlf ruyadorno darcyclarke isaacs +https://npm.im/libnpmpublish +libnpmfund +Programmatic API for npm fund +Version 1.0.2 published 2020-12-08 by isaacs +Maintainers: nlf ruyadorno darcyclarke isaacs +Keywords: npm npmcli libnpm cli git fund gitfund +https://npm.im/libnpmfund +@npmcli/map-workspaces +Retrieves a name:pathname Map for a given workspaces config +Version 1.0.1 published 2020-09-30 by ruyadorno +Maintainers: nlf ruyadorno darcyclarke isaacs +Keywords: npm bad map npmcli libnpm cli workspaces map-workspaces +https://npm.im/@npmcli/map-workspaces +libnpmversion +library to do the things that 'npm version' does +Version 1.0.7 published 2020-11-04 by isaacs +Maintainers: nlf ruyadorno darcyclarke isaacs +https://npm.im/libnpmversion +@types/libnpmsearch +TypeScript definitions for libnpmsearch +Version 2.0.1 published 2019-09-26 by types +Maintainers: types +https://npm.im/@types/libnpmsearch +pkg-no-desc +Version 1.0.0 published 2019-09-26 by lukekarrys +Maintainers: lukekarrys +https://npm.im/pkg-no-desc +` + exports[`test/lib/commands/search.js TAP search no publisher > should have filtered expected search results 1`] = ` custom-registry Version 1.0.0 published prehistoric by ??? diff --git a/deps/npm/tap-snapshots/test/lib/docs.js.test.cjs b/deps/npm/tap-snapshots/test/lib/docs.js.test.cjs index 8e8d9a9ba4b8..6064ed581c1f 100644 --- a/deps/npm/tap-snapshots/test/lib/docs.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/docs.js.test.cjs @@ -155,6 +155,7 @@ Array [ "team", "test", "token", + "undeprecate", "uninstall", "unpublish", "unstar", @@ -404,7 +405,7 @@ are same as \`cpu\` field of package.json, which comes from \`process.arch\`. #### \`depth\` -* Default: \`Infinity\` if \`--all\` is set, otherwise \`1\` +* Default: \`Infinity\` if \`--all\` is set, otherwise \`0\` * Type: null or Number The depth to go when recursing packages for \`npm ls\`. @@ -2850,7 +2851,7 @@ Usage: npm deprecate Options: -[--registry ] [--otp ] +[--registry ] [--otp ] [--dry-run] Run "npm help deprecate" for more info @@ -2862,6 +2863,7 @@ Note: This command is unaware of workspaces. #### \`registry\` #### \`otp\` +#### \`dry-run\` ` exports[`test/lib/docs.js TAP usage diff > must match snapshot 1`] = ` @@ -4274,6 +4276,28 @@ Note: This command is unaware of workspaces. #### \`otp\` ` +exports[`test/lib/docs.js TAP usage undeprecate > must match snapshot 1`] = ` +Undeprecate a version of a package + +Usage: +npm undeprecate + +Options: +[--registry ] [--otp ] [--dry-run] + +Run "npm help undeprecate" for more info + +\`\`\`bash +npm undeprecate +\`\`\` + +Note: This command is unaware of workspaces. + +#### \`registry\` +#### \`otp\` +#### \`dry-run\` +` + exports[`test/lib/docs.js TAP usage uninstall > must match snapshot 1`] = ` Remove a package diff --git a/deps/npm/tap-snapshots/test/lib/npm.js.test.cjs b/deps/npm/tap-snapshots/test/lib/npm.js.test.cjs index 0864ffe37d29..88597c2fd15f 100644 --- a/deps/npm/tap-snapshots/test/lib/npm.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/npm.js.test.cjs @@ -39,7 +39,8 @@ All commands: ping, pkg, prefix, profile, prune, publish, query, rebuild, repo, restart, root, run-script, sbom, search, set, shrinkwrap, star, stars, start, stop, team, test, token, - uninstall, unpublish, unstar, update, version, view, whoami + undeprecate, uninstall, unpublish, unstar, update, version, + view, whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -89,9 +90,10 @@ All commands: search, set, shrinkwrap, star, stars, start, stop, team, test, token, - uninstall, unpublish, - unstar, update, version, - view, whoami + undeprecate, uninstall, + unpublish, unstar, + update, version, view, + whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -141,9 +143,10 @@ All commands: search, set, shrinkwrap, star, stars, start, stop, team, test, token, - uninstall, unpublish, - unstar, update, version, - view, whoami + undeprecate, uninstall, + unpublish, unstar, + update, version, view, + whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -179,7 +182,8 @@ All commands: ping, pkg, prefix, profile, prune, publish, query, rebuild, repo, restart, root, run-script, sbom, search, set, shrinkwrap, star, stars, start, stop, team, test, token, - uninstall, unpublish, unstar, update, version, view, whoami + undeprecate, uninstall, unpublish, unstar, update, version, + view, whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -229,9 +233,10 @@ All commands: search, set, shrinkwrap, star, stars, start, stop, team, test, token, - uninstall, unpublish, - unstar, update, version, - view, whoami + undeprecate, uninstall, + unpublish, unstar, + update, version, view, + whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -281,9 +286,10 @@ All commands: search, set, shrinkwrap, star, stars, start, stop, team, test, token, - uninstall, unpublish, - unstar, update, version, - view, whoami + undeprecate, uninstall, + unpublish, unstar, + update, version, view, + whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -331,10 +337,10 @@ All commands: run-script, sbom, search, set, shrinkwrap, star, stars, start, stop, team, - test, token, uninstall, - unpublish, unstar, - update, version, view, - whoami + test, token, undeprecate, + uninstall, unpublish, + unstar, update, version, + view, whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -370,8 +376,8 @@ All commands: ping, pkg, prefix, profile, prune, publish, query, rebuild, repo, restart, root, run-script, sbom, search, set, shrinkwrap, star, stars, start, stop, team, test, token, - uninstall, unpublish, unstar, update, version, view, - whoami + undeprecate, uninstall, unpublish, unstar, update, version, + view, whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -407,7 +413,8 @@ All commands: ping, pkg, prefix, profile, prune, publish, query, rebuild, repo, restart, root, run-script, sbom, search, set, shrinkwrap, star, stars, start, stop, team, test, token, - uninstall, unpublish, unstar, update, version, view, whoami + undeprecate, uninstall, unpublish, unstar, update, version, + view, whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -443,7 +450,8 @@ All commands: ping, pkg, prefix, profile, prune, publish, query, rebuild, repo, restart, root, run-script, sbom, search, set, shrinkwrap, star, stars, start, stop, team, test, token, - uninstall, unpublish, unstar, update, version, view, whoami + undeprecate, uninstall, unpublish, unstar, update, version, + view, whoami Specify configs in the ini-formatted file: {USERCONFIG} diff --git a/deps/npm/tap-snapshots/test/lib/utils/sbom-cyclonedx.js.test.cjs b/deps/npm/tap-snapshots/test/lib/utils/sbom-cyclonedx.js.test.cjs index 7a8d79017f36..2f0af32f7f50 100644 --- a/deps/npm/tap-snapshots/test/lib/utils/sbom-cyclonedx.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/utils/sbom-cyclonedx.js.test.cjs @@ -34,12 +34,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP node - with deps > must match snap "scope": "required", "author": "Author", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [] } }, @@ -51,12 +46,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP node - with deps > must match snap "version": "0.0.1", "scope": "required", "purl": "pkg:npm/dep1@0.0.1", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "node_modules/dep1" - } - ], + "properties": [], "externalReferences": [] }, { @@ -66,12 +56,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP node - with deps > must match snap "version": "0.0.2", "scope": "required", "purl": "pkg:npm/dep2@0.0.2", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "node_modules/dep2" - } - ], + "properties": [], "externalReferences": [] } ], @@ -97,6 +82,66 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP node - with deps > must match snap } ` +exports[`test/lib/utils/sbom-cyclonedx.js TAP node - with duplicate deps > must match snapshot 1`] = ` +{ + "$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json", + "bomFormat": "CycloneDX", + "specVersion": "1.5", + "serialNumber": "urn:uuid:00000000-0000-0000-0000-000000000000", + "version": 1, + "metadata": { + "timestamp": "2020-01-01T00:00:00.000Z", + "lifecycles": [ + { + "phase": "build" + } + ], + "tools": [ + { + "vendor": "npm", + "name": "cli", + "version": "10.0.0 " + } + ], + "component": { + "bom-ref": "root@1.0.0", + "type": "library", + "name": "root", + "version": "1.0.0", + "scope": "required", + "author": "Author", + "purl": "pkg:npm/root@1.0.0", + "properties": [], + "externalReferences": [] + } + }, + "components": [ + { + "bom-ref": "dep1@0.0.1", + "type": "library", + "name": "dep1", + "version": "0.0.1", + "scope": "required", + "purl": "pkg:npm/dep1@0.0.1", + "properties": [], + "externalReferences": [] + } + ], + "dependencies": [ + { + "ref": "root@1.0.0", + "dependsOn": [ + "dep1@0.0.1" + ] + }, + { + "ref": "dep1@0.0.1", + "dependsOn": [] + } + ] +} +` + exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - application package type > must match snapshot 1`] = ` { "$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json", @@ -126,12 +171,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - application package "scope": "required", "author": "Author", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [] } }, @@ -175,10 +215,6 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - bundled > must match "author": "Author", "purl": "pkg:npm/root@1.0.0", "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - }, { "name": "cdx:npm:package:bundled", "value": "true" @@ -227,10 +263,6 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - development > must m "author": "Author", "purl": "pkg:npm/root@1.0.0", "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - }, { "name": "cdx:npm:package:development", "value": "true" @@ -279,10 +311,6 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - extraneous > must ma "author": "Author", "purl": "pkg:npm/root@1.0.0", "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - }, { "name": "cdx:npm:package:extraneous", "value": "true" @@ -330,12 +358,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - from git url > must "scope": "required", "author": "Author", "purl": "pkg:npm/root@1.0.0?vcs_url=https://github.com/foo/bar#1234", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [ { "type": "distribution", @@ -382,12 +405,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - no package info > mu "version": "1.0.0", "scope": "required", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [] } }, @@ -430,12 +448,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - optional > must matc "scope": "optional", "author": "Author", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [] } }, @@ -478,12 +491,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - package lock only > "scope": "required", "author": "Author", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [] } }, @@ -527,10 +535,6 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - private > must match "author": "Author", "purl": "pkg:npm/root@1.0.0", "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - }, { "name": "cdx:npm:package:private", "value": "true" @@ -578,12 +582,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - with author object > "scope": "required", "author": "Arthur", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [] } }, @@ -627,12 +626,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - with description > m "author": "Author", "description": "Package description", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [] } }, @@ -675,12 +669,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - with distribution ur "scope": "required", "author": "Author", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [ { "type": "distribution", @@ -728,12 +717,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - with homepage > must "scope": "required", "author": "Author", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [ { "type": "website", @@ -781,12 +765,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - with integrity > mus "scope": "required", "author": "Author", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [], "hashes": [ { @@ -835,12 +814,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - with issue tracker > "scope": "required", "author": "Author", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [ { "type": "issue-tracker", @@ -888,12 +862,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - with license express "scope": "required", "author": "Author", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [], "licenses": [ { @@ -941,12 +910,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - with license object "scope": "required", "author": "Author", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [], "licenses": [ { @@ -996,12 +960,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - with repository url "scope": "required", "author": "Author", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [ { "type": "vcs", @@ -1049,12 +1008,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - with single license "scope": "required", "author": "Author", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [], "licenses": [ { diff --git a/deps/npm/tap-snapshots/test/lib/utils/sbom-spdx.js.test.cjs b/deps/npm/tap-snapshots/test/lib/utils/sbom-spdx.js.test.cjs index b887e13ca7dc..3583c0bc8357 100644 --- a/deps/npm/tap-snapshots/test/lib/utils/sbom-spdx.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/utils/sbom-spdx.js.test.cjs @@ -182,6 +182,95 @@ exports[`test/lib/utils/sbom-spdx.js TAP node - with deps > must match snapshot } ` +exports[`test/lib/utils/sbom-spdx.js TAP node - with duplicate deps > must match snapshot 1`] = ` +{ + "spdxVersion": "SPDX-2.3", + "dataLicense": "CC0-1.0", + "SPDXID": "SPDXRef-DOCUMENT", + "name": "root@1.0.0", + "documentNamespace": "docns", + "creationInfo": { + "created": "2020-01-01T00:00:00.000Z", + "creators": [ + "Tool: npm/cli-10.0.0 " + ] + }, + "documentDescribes": [ + "SPDXRef-Package-root-1.0.0" + ], + "packages": [ + { + "name": "root", + "SPDXID": "SPDXRef-Package-root-1.0.0", + "versionInfo": "1.0.0", + "packageFileName": "", + "downloadLocation": "NOASSERTION", + "filesAnalyzed": false, + "homepage": "NOASSERTION", + "licenseDeclared": "NOASSERTION", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceType": "purl", + "referenceLocator": "pkg:npm/root@1.0.0" + } + ] + }, + { + "name": "dep1", + "SPDXID": "SPDXRef-Package-dep1-0.0.1", + "versionInfo": "0.0.1", + "packageFileName": "node_modules/dep1", + "downloadLocation": "NOASSERTION", + "filesAnalyzed": false, + "homepage": "NOASSERTION", + "licenseDeclared": "NOASSERTION", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceType": "purl", + "referenceLocator": "pkg:npm/dep1@0.0.1" + } + ] + }, + { + "name": "dep2", + "SPDXID": "SPDXRef-Package-dep2-0.0.2", + "versionInfo": "0.0.2", + "packageFileName": "node_modules/dep2", + "downloadLocation": "NOASSERTION", + "filesAnalyzed": false, + "homepage": "NOASSERTION", + "licenseDeclared": "NOASSERTION", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceType": "purl", + "referenceLocator": "pkg:npm/dep2@0.0.2" + } + ] + } + ], + "relationships": [ + { + "spdxElementId": "SPDXRef-DOCUMENT", + "relatedSpdxElement": "SPDXRef-Package-root-1.0.0", + "relationshipType": "DESCRIBES" + }, + { + "spdxElementId": "SPDXRef-Package-dep1-0.0.1", + "relatedSpdxElement": "SPDXRef-Package-root-1.0.0", + "relationshipType": "DEPENDENCY_OF" + }, + { + "spdxElementId": "SPDXRef-Package-dep2-0.0.2", + "relatedSpdxElement": "SPDXRef-Package-root-1.0.0", + "relationshipType": "DEPENDENCY_OF" + } + ] +} +` + exports[`test/lib/utils/sbom-spdx.js TAP single node - application package type > must match snapshot 1`] = ` { "spdxVersion": "SPDX-2.3", diff --git a/deps/npm/test/lib/cli/exit-handler.js b/deps/npm/test/lib/cli/exit-handler.js index 939c9617aff5..484704c73527 100644 --- a/deps/npm/test/lib/cli/exit-handler.js +++ b/deps/npm/test/lib/cli/exit-handler.js @@ -46,7 +46,6 @@ t.cleanSnapshot = (path) => cleanDate(cleanCwd(path)) mockGlobals(t, { process: Object.assign(new EventEmitter(), { // these are process properties that are needed in the running code and tests - // eslint-disable-next-line max-len ...pick(process, 'version', 'execPath', 'stdout', 'stderr', 'stdin', 'cwd', 'chdir', 'env', 'umask'), pid: 123456, argv: ['/node', ...process.argv.slice(1)], diff --git a/deps/npm/test/lib/cli/validate-engines.js b/deps/npm/test/lib/cli/validate-engines.js index 1c0b59700a77..980b508f02d9 100644 --- a/deps/npm/test/lib/cli/validate-engines.js +++ b/deps/npm/test/lib/cli/validate-engines.js @@ -23,7 +23,6 @@ t.test('validate engines', async t => { node: 'v4.5.6', npm: 'v1.2.3', engines: '>=0', - /* eslint-disable-next-line max-len */ unsupportedMessage: 'npm v1.2.3 does not support Node.js v4.5.6. This version of npm supports the following node versions: `>=0`. You can find the latest version at https://nodejs.org/.', }) diff --git a/deps/npm/test/lib/commands/audit.js b/deps/npm/test/lib/commands/audit.js index e3bf40ee6137..bf0a055d13c7 100644 --- a/deps/npm/test/lib/commands/audit.js +++ b/deps/npm/test/lib/commands/audit.js @@ -825,12 +825,9 @@ t.test('audit signatures', async t => { packuments: [{ version: '1.0.0', dist: { - // eslint-disable-next-line max-len integrity: 'sha512-e+qfbn/zf1+rCza/BhIA//Awmf0v1pa5HQS8Xk8iXrn9bgytytVLqYD0P7NSqZ6IELTgq+tcDvLPkQjNHyWLNg==', tarball: 'https://registry.npmjs.org/sigstore/-/sigstore-1.0.0.tgz', - // eslint-disable-next-line max-len attestations: { url: 'https://registry.npmjs.org/-/npm/v1/attestations/sigstore@1.0.0', provenance: { predicateType: 'https://slsa.dev/provenance/v0.2' } }, - // eslint-disable-next-line max-len signatures: [{ keyid: 'SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA', sig: 'MEQCIBlpcHT68iWOpx8pJr3WUzD1EqQ7tb0CmY36ebbceR6IAiAVGRaxrFoyh0/5B7H1o4VFhfsHw9F8G+AxOZQq87q+lg==' }], }, }], @@ -844,12 +841,9 @@ t.test('audit signatures', async t => { packuments: [{ version: '1.0.0', dist: { - // eslint-disable-next-line max-len integrity: 'sha512-1dxsQwESDzACJjTdYHQ4wJ1f/of7jALWKfJEHSBWUQB/5UTJUx9SW6GHXp4mZ1KvdBRJCpGjssoPFGi4hvw8/A==', tarball: 'https://registry.npmjs.org/tuf-js/-/tuf-js-1.0.0.tgz', - // eslint-disable-next-line max-len attestations: { url: 'https://registry.npmjs.org/-/npm/v1/attestations/tuf-js@1.0.0', provenance: { predicateType: 'https://slsa.dev/provenance/v0.2' } }, - // eslint-disable-next-line max-len signatures: [{ keyid: 'SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA', sig: 'MEYCIQDgGQeY2QLkLuoO9YxOqFZ+a6zYuaZpXhc77kUfdCUXDQIhAJp/vV+9Xg1bfM5YlTvKIH9agUEOu5T76+tQaHY2vZyO' }], }, }], diff --git a/deps/npm/test/lib/commands/cache.js b/deps/npm/test/lib/commands/cache.js index 538a8c761a2d..a1f2a8fbfda0 100644 --- a/deps/npm/test/lib/commands/cache.js +++ b/deps/npm/test/lib/commands/cache.js @@ -78,9 +78,7 @@ t.test('cache add single pkg', async t => { }) await npm.exec('cache', ['add', pkg]) t.equal(joinedOutput(), '') - // eslint-disable-next-line max-len t.resolves(cacache.get(cache, 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package/-/test-package-1.0.0.tgz')) - // eslint-disable-next-line max-len t.resolves(cacache.get(cache, 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package')) }) @@ -113,20 +111,15 @@ t.test('cache add multiple pkgs', async t => { }) await npm.exec('cache', ['add', pkg, pkg2]) t.equal(joinedOutput(), '') - // eslint-disable-next-line max-len t.resolves(cacache.get(cache, 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package/-/test-package-1.0.0.tgz')) - // eslint-disable-next-line max-len t.resolves(cacache.get(cache, 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package')) - // eslint-disable-next-line max-len t.resolves(cacache.get(cache, 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package-two/-/test-package-two-1.0.0.tgz')) - // eslint-disable-next-line max-len t.resolves(cacache.get(cache, 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package-two')) }) t.test('cache ls', async t => { const keys = [ 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package', - // eslint-disable-next-line max-len 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package/-/test-package-1.0.0.tgz', ] const { npm, joinedOutput } = await loadMockNpm(t) @@ -204,10 +197,8 @@ t.test('cache ls tagged', async t => { t.test('cache ls scoped and scoped slash', async t => { const keys = [ - // eslint-disable-next-line max-len 'make-fetch-happen:request-cache:https://registry.npmjs.org/@fritzy/staydown/-/@fritzy/staydown-3.1.1.tgz', 'make-fetch-happen:request-cache:https://registry.npmjs.org/@fritzy%2fstaydown', - // eslint-disable-next-line max-len 'make-fetch-happen:request-cache:https://registry.npmjs.org/@gar/npm-expansion/-/@gar/npm-expansion-2.1.0.tgz', 'make-fetch-happen:request-cache:https://registry.npmjs.org/@gar%2fnpm-expansion', ] @@ -248,16 +239,11 @@ t.test('cache ls missing packument version not an object', async t => { t.test('cache rm', async t => { const { npm, joinedOutput } = await loadMockNpm(t) const cache = path.join(npm.cache, '_cacache') - // eslint-disable-next-line max-len await cacache.put(cache, 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package', '{}') - // eslint-disable-next-line max-len await cacache.put(cache, 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package/-/test-package-1.0.0.tgz', 'test data') - // eslint-disable-next-line max-len await npm.exec('cache', ['rm', 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package/-/test-package-1.0.0.tgz']) t.matchSnapshot(joinedOutput(), 'logs deleting single entry') - // eslint-disable-next-line max-len t.resolves(cacache.get(cache, 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package')) - // eslint-disable-next-line max-len t.rejects(cacache.get(cache, 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package/-/test-package-1.0.0.tgz')) }) diff --git a/deps/npm/test/lib/commands/deprecate.js b/deps/npm/test/lib/commands/deprecate.js index 09aaeacfe856..eda51bfef289 100644 --- a/deps/npm/test/lib/commands/deprecate.js +++ b/deps/npm/test/lib/commands/deprecate.js @@ -129,7 +129,7 @@ t.test('deprecates given range', async t => { }) t.test('deprecates all versions when no range is specified', async t => { - const { npm, joinedOutput } = await loadMockNpm(t, { config: { ...auth } }) + const { npm, logs, joinedOutput } = await loadMockNpm(t, { config: { ...auth } }) const registry = new MockRegistry({ tap: t, registry: npm.config.get('registry'), @@ -151,6 +151,37 @@ t.test('deprecates all versions when no range is specified', async t => { }).reply(200, {}) await npm.exec('deprecate', ['foo', message]) + t.match(logs.notice, [ + `deprecating foo@1.0.0 with message "${message}"`, + `deprecating foo@1.0.1 with message "${message}"`, + `deprecating foo@1.0.1-pre with message "${message}"`, + ]) + t.match(joinedOutput(), '') +}) + +t.test('dry-run', async t => { + const { npm, logs, joinedOutput } = await loadMockNpm(t, { config: { + 'dry-run': true, + ...auth, + } }) + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: token, + }) + const manifest = registry.manifest({ + name: 'foo', + versions, + }) + await registry.package({ manifest, query: { write: true } }) + const message = 'test deprecation message' + + await npm.exec('deprecate', ['foo', message]) + t.match(logs.notice, [ + `deprecating foo@1.0.0 with message "${message}"`, + `deprecating foo@1.0.1 with message "${message}"`, + `deprecating foo@1.0.1-pre with message "${message}"`, + ]) t.match(joinedOutput(), '') }) diff --git a/deps/npm/test/lib/commands/help-search.js b/deps/npm/test/lib/commands/help-search.js index 354fb0291eb2..d7f85355a719 100644 --- a/deps/npm/test/lib/commands/help-search.js +++ b/deps/npm/test/lib/commands/help-search.js @@ -1,7 +1,6 @@ const t = require('tap') const { load: loadMockNpm } = require('../../fixtures/mock-npm.js') -/* eslint-disable max-len */ const docsFixtures = { dir1: { 'npm-exec.md': 'the exec command\nhelp has multiple lines of exec help\none of them references exec', @@ -19,7 +18,6 @@ const docsFixtures = { 'npm-extra-useless.md': 'exec\nexec\nexec', }, } -/* eslint-enable max-len */ const execHelpSearch = async (t, exec = [], opts) => { const { npm, ...rest } = await loadMockNpm(t, { diff --git a/deps/npm/test/lib/commands/ls.js b/deps/npm/test/lib/commands/ls.js index 2147b3f036d7..cf96452d6cb5 100644 --- a/deps/npm/test/lib/commands/ls.js +++ b/deps/npm/test/lib/commands/ls.js @@ -408,7 +408,6 @@ t.test('ls', async t => { await ls.exec(['dog@*', 'chai@1.0.0']) t.matchSnapshot( cleanCwd(result()), - /* eslint-disable-next-line max-len */ 'should output tree contaning only occurrences of multiple filtered packages and their ancestors' ) }) @@ -1314,7 +1313,6 @@ t.test('ls', async t => { name: 'abbrev', version: '1.1.1', from: 'git+https://github.com/isaacs/abbrev-js.git', - /* eslint-disable-next-line max-len */ resolved: 'git+https://github.com/isaacs/abbrev-js.git#b8f3a2fc0c3bb8ffd8b0d0072cc6b5a3667e963c', }, }, @@ -1325,7 +1323,6 @@ t.test('ls', async t => { version: '1.1.1', _id: 'abbrev@1.1.1', _from: 'git+https://github.com/isaacs/abbrev-js.git', - /* eslint-disable-next-line max-len */ _resolved: 'git+https://github.com/isaacs/abbrev-js.git#b8f3a2fc0c3bb8ffd8b0d0072cc6b5a3667e963c', _requested: { type: 'git', @@ -1372,7 +1369,6 @@ t.test('ls', async t => { a: { version: '1.0.1', resolved: 'foo@dog://b8f3a2fc0c3bb8ffd8b0d0072cc6b5a3667e963c', - /* eslint-disable-next-line max-len */ integrity: 'sha512-8AN9lNCcBt5Xeje7fMEEpp5K3rgcAzIpTtAjYb/YMUYu8SbIVF6wz0WqACDVKvpQOUcSfNHZQNLNmue0QSwXOQ==', }, }, @@ -1901,7 +1897,6 @@ t.test('ls --parseable', async t => { await ls.exec(['dog@*', 'chai@1.0.0']) t.matchSnapshot( cleanCwd(result()), - /* eslint-disable-next-line max-len */ 'should output parseable contaning only occurrences of multiple filtered packages and their ancestors' ) }) @@ -2465,7 +2460,6 @@ t.test('ls --parseable', async t => { 'node_modules/abbrev': { name: 'abbrev', version: '1.1.1', - /* eslint-disable-next-line max-len */ resolved: 'git+https://github.com/isaacs/abbrev-js.git#b8f3a2fc0c3bb8ffd8b0d0072cc6b5a3667e963c', }, }, @@ -2476,7 +2470,6 @@ t.test('ls --parseable', async t => { version: '1.1.1', _id: 'abbrev@1.1.1', _from: 'git+https://github.com/isaacs/abbrev-js.git', - /* eslint-disable-next-line max-len */ _resolved: 'git+https://github.com/isaacs/abbrev-js.git#b8f3a2fc0c3bb8ffd8b0d0072cc6b5a3667e963c', _requested: { type: 'git', @@ -3043,7 +3036,6 @@ t.test('ls --json', async t => { }, }, }, - /* eslint-disable-next-line max-len */ 'should output json contaning only occurrences of multiple filtered packages and their ancestors' ) }) @@ -3489,9 +3481,7 @@ t.test('ls --json', async t => { 'node_modules/@isaacs/dedupe-tests-a': { name: '@isaacs/dedupe-tests-a', version: '1.0.1', - /* eslint-disable-next-line max-len */ resolved: 'https://registry.npmjs.org/@isaacs/dedupe-tests-a/-/dedupe-tests-a-1.0.1.tgz', - /* eslint-disable-next-line max-len */ integrity: 'sha512-8AN9lNCcBt5Xeje7fMEEpp5K3rgcAzIpTtAjYb/YMUYu8SbIVF6wz0WqACDVKvpQOUcSfNHZQNLNmue0QSwXOQ==', dependencies: { '@isaacs/dedupe-tests-b': '1', @@ -3500,26 +3490,20 @@ t.test('ls --json', async t => { 'node_modules/@isaacs/dedupe-tests-a/node_modules/@isaacs/dedupe-tests-b': { name: '@isaacs/dedupe-tests-b', version: '1.0.0', - /* eslint-disable-next-line max-len */ resolved: 'https://registry.npmjs.org/@isaacs/dedupe-tests-b/-/dedupe-tests-b-1.0.0.tgz', - /* eslint-disable-next-line max-len */ integrity: 'sha512-3nmvzIb8QL8OXODzipwoV3U8h9OQD9g9RwOPuSBQqjqSg9JZR1CCFOWNsDUtOfmwY8HFUJV9EAZ124uhqVxq+w==', }, 'node_modules/@isaacs/dedupe-tests-b': { name: '@isaacs/dedupe-tests-b', version: '2.0.0', - /* eslint-disable-next-line max-len */ resolved: 'https://registry.npmjs.org/@isaacs/dedupe-tests-b/-/dedupe-tests-b-2.0.0.tgz', - /* eslint-disable-next-line max-len */ integrity: 'sha512-KTYkpRv9EzlmCg4Gsm/jpclWmRYFCXow8GZKJXjK08sIZBlElTZEa5Bw/UQxIvEfcKmWXczSqItD49Kr8Ax4UA==', }, }, dependencies: { '@isaacs/dedupe-tests-a': { version: '1.0.1', - /* eslint-disable-next-line max-len */ resolved: 'https://registry.npmjs.org/@isaacs/dedupe-tests-a/-/dedupe-tests-a-1.0.1.tgz', - /* eslint-disable-next-line max-len */ integrity: 'sha512-8AN9lNCcBt5Xeje7fMEEpp5K3rgcAzIpTtAjYb/YMUYu8SbIVF6wz0WqACDVKvpQOUcSfNHZQNLNmue0QSwXOQ==', requires: { '@isaacs/dedupe-tests-b': '1', @@ -3527,18 +3511,14 @@ t.test('ls --json', async t => { dependencies: { '@isaacs/dedupe-tests-b': { version: '1.0.0', - /* eslint-disable-next-line max-len */ resolved: 'https://registry.npmjs.org/@isaacs/dedupe-tests-b/-/dedupe-tests-b-1.0.0.tgz', - /* eslint-disable-next-line max-len */ integrity: 'sha512-3nmvzIb8QL8OXODzipwoV3U8h9OQD9g9RwOPuSBQqjqSg9JZR1CCFOWNsDUtOfmwY8HFUJV9EAZ124uhqVxq+w==', }, }, }, '@isaacs/dedupe-tests-b': { version: '2.0.0', - /* eslint-disable-next-line max-len */ resolved: 'https://registry.npmjs.org/@isaacs/dedupe-tests-b/-/dedupe-tests-b-2.0.0.tgz', - /* eslint-disable-next-line max-len */ integrity: 'sha512-KTYkpRv9EzlmCg4Gsm/jpclWmRYFCXow8GZKJXjK08sIZBlElTZEa5Bw/UQxIvEfcKmWXczSqItD49Kr8Ax4UA==', }, }, @@ -3572,7 +3552,6 @@ t.test('ls --json', async t => { extraneous: true, overridden: false, problems: [ - /* eslint-disable-next-line max-len */ 'extraneous: @isaacs/dedupe-tests-b@ {CWD}/prefix/node_modules/@isaacs/dedupe-tests-a/node_modules/@isaacs/dedupe-tests-b', ], }, @@ -3586,7 +3565,6 @@ t.test('ls --json', async t => { }, }, problems: [ - /* eslint-disable-next-line max-len */ 'extraneous: @isaacs/dedupe-tests-b@ {CWD}/prefix/node_modules/@isaacs/dedupe-tests-a/node_modules/@isaacs/dedupe-tests-b', ], }, @@ -4212,7 +4190,6 @@ t.test('ls --json', async t => { version: '1.1.1', id: 'abbrev@1.1.1', from: 'git+https://github.com/isaacs/abbrev-js.git', - /* eslint-disable-next-line max-len */ resolved: 'git+https://github.com/isaacs/abbrev-js.git#b8f3a2fc0c3bb8ffd8b0d0072cc6b5a3667e963c', }, }, @@ -4223,7 +4200,6 @@ t.test('ls --json', async t => { version: '1.1.1', _id: 'abbrev@1.1.1', _from: 'git+https://github.com/isaacs/abbrev-js.git', - /* eslint-disable-next-line max-len */ _resolved: 'git+https://github.com/isaacs/abbrev-js.git#b8f3a2fc0c3bb8ffd8b0d0072cc6b5a3667e963c', _requested: { type: 'git', @@ -4249,7 +4225,6 @@ t.test('ls --json', async t => { abbrev: { version: '1.1.1', overridden: false, - /* eslint-disable-next-line max-len */ resolved: 'git+ssh://git@github.com/isaacs/abbrev-js.git#b8f3a2fc0c3bb8ffd8b0d0072cc6b5a3667e963c', }, }, @@ -4813,7 +4788,6 @@ t.test('ls --package-lock-only', async t => { }, }, }, - /* eslint-disable-next-line max-len */ 'should output json contaning only occurrences of multiple filtered packages and their ancestors' ) }) @@ -5137,9 +5111,7 @@ t.test('ls --package-lock-only', async t => { 'node_modules/@isaacs/dedupe-tests-a': { name: '@isaacs/dedupe-tests-a', version: '1.0.1', - /* eslint-disable-next-line max-len */ resolved: 'https://registry.npmjs.org/@isaacs/dedupe-tests-a/-/dedupe-tests-a-1.0.1.tgz', - /* eslint-disable-next-line max-len */ integrity: 'sha512-8AN9lNCcBt5Xeje7fMEEpp5K3rgcAzIpTtAjYb/YMUYu8SbIVF6wz0WqACDVKvpQOUcSfNHZQNLNmue0QSwXOQ==', dependencies: { '@isaacs/dedupe-tests-b': '1', @@ -5148,26 +5120,20 @@ t.test('ls --package-lock-only', async t => { 'node_modules/@isaacs/dedupe-tests-a/node_modules/@isaacs/dedupe-tests-b': { name: '@isaacs/dedupe-tests-b', version: '1.0.0', - /* eslint-disable-next-line max-len */ resolved: 'https://registry.npmjs.org/@isaacs/dedupe-tests-b/-/dedupe-tests-b-1.0.0.tgz', - /* eslint-disable-next-line max-len */ integrity: 'sha512-3nmvzIb8QL8OXODzipwoV3U8h9OQD9g9RwOPuSBQqjqSg9JZR1CCFOWNsDUtOfmwY8HFUJV9EAZ124uhqVxq+w==', }, 'node_modules/@isaacs/dedupe-tests-b': { name: '@isaacs/dedupe-tests-b', version: '2.0.0', - /* eslint-disable-next-line max-len */ resolved: 'https://registry.npmjs.org/@isaacs/dedupe-tests-b/-/dedupe-tests-b-2.0.0.tgz', - /* eslint-disable-next-line max-len */ integrity: 'sha512-KTYkpRv9EzlmCg4Gsm/jpclWmRYFCXow8GZKJXjK08sIZBlElTZEa5Bw/UQxIvEfcKmWXczSqItD49Kr8Ax4UA==', }, }, dependencies: { '@isaacs/dedupe-tests-a': { version: '1.0.1', - /* eslint-disable-next-line max-len */ resolved: 'https://registry.npmjs.org/@isaacs/dedupe-tests-a/-/dedupe-tests-a-1.0.1.tgz', - /* eslint-disable-next-line max-len */ integrity: 'sha512-8AN9lNCcBt5Xeje7fMEEpp5K3rgcAzIpTtAjYb/YMUYu8SbIVF6wz0WqACDVKvpQOUcSfNHZQNLNmue0QSwXOQ==', requires: { '@isaacs/dedupe-tests-b': '1', @@ -5175,18 +5141,14 @@ t.test('ls --package-lock-only', async t => { dependencies: { '@isaacs/dedupe-tests-b': { version: '1.0.0', - /* eslint-disable-next-line max-len */ resolved: 'https://registry.npmjs.org/@isaacs/dedupe-tests-b/-/dedupe-tests-b-1.0.0.tgz', - /* eslint-disable-next-line max-len */ integrity: 'sha512-3nmvzIb8QL8OXODzipwoV3U8h9OQD9g9RwOPuSBQqjqSg9JZR1CCFOWNsDUtOfmwY8HFUJV9EAZ124uhqVxq+w==', }, }, }, '@isaacs/dedupe-tests-b': { version: '2.0.0', - /* eslint-disable-next-line max-len */ resolved: 'https://registry.npmjs.org/@isaacs/dedupe-tests-b/-/dedupe-tests-b-2.0.0.tgz', - /* eslint-disable-next-line max-len */ integrity: 'sha512-KTYkpRv9EzlmCg4Gsm/jpclWmRYFCXow8GZKJXjK08sIZBlElTZEa5Bw/UQxIvEfcKmWXczSqItD49Kr8Ax4UA==', }, }, @@ -5298,7 +5260,6 @@ t.test('ls --package-lock-only', async t => { requires: true, dependencies: { abbrev: { - /* eslint-disable-next-line max-len */ version: 'git+ssh://git@github.com/isaacs/abbrev-js.git#b8f3a2fc0c3bb8ffd8b0d0072cc6b5a3667e963c', from: 'abbrev@git+https://github.com/isaacs/abbrev-js.git', }, @@ -5314,7 +5275,6 @@ t.test('ls --package-lock-only', async t => { version: '1.0.0', dependencies: { abbrev: { - /* eslint-disable-next-line max-len */ resolved: 'git+ssh://git@github.com/isaacs/abbrev-js.git#b8f3a2fc0c3bb8ffd8b0d0072cc6b5a3667e963c', overridden: false, }, diff --git a/deps/npm/test/lib/commands/publish.js b/deps/npm/test/lib/commands/publish.js index 10dc9b33deda..f310587418b1 100644 --- a/deps/npm/test/lib/commands/publish.js +++ b/deps/npm/test/lib/commands/publish.js @@ -6,7 +6,7 @@ const Arborist = require('@npmcli/arborist') const path = require('node:path') const fs = require('node:fs') -const pkg = 'test-package' +const pkg = '@npmcli/test-package' const token = 'test-auth-token' const auth = { '//registry.npmjs.org/:_authToken': token } const alternateRegistry = 'https://other.registry.npmjs.org' @@ -238,8 +238,7 @@ t.test('throws when invalid tag when not url encodable', async t => { await t.rejects( npm.exec('publish', []), { - /* eslint-disable-next-line max-len */ - message: 'Invalid tag name "@test" of package "test-package@@test": Tags may not have any characters that encodeURIComponent encodes.', + message: `Invalid tag name "@test" of package "${pkg}@@test": Tags may not have any characters that encodeURIComponent encodes.`, } ) }) @@ -854,11 +853,33 @@ t.test('prerelease dist tag', (t) => { await npm.exec('publish', []) }) + t.test('does not abort when prerelease and force', async t => { + const packageJson = { + ...pkgJson, + version: '1.0.0-0', + publishConfig: { registry: alternateRegistry }, + } + const { npm, registry } = await loadNpmWithRegistry(t, { + config: { + loglevel: 'silent', + force: true, + [`${alternateRegistry.slice(6)}/:_authToken`]: 'test-other-token', + }, + prefixDir: { + 'package.json': JSON.stringify(packageJson, null, 2), + }, + registry: alternateRegistry, + authorization: 'test-other-token', + }) + registry.publish(pkg, { noGet: true, packageJson }) + await npm.exec('publish', []) + }) + t.end() }) -t.test('latest dist tag', (t) => { - const init = (version) => ({ +t.test('semver highest dist tag', async t => { + const init = ({ version, pkgExtra = {} }) => ({ config: { loglevel: 'silent', ...auth, @@ -866,6 +887,7 @@ t.test('latest dist tag', (t) => { prefixDir: { 'package.json': JSON.stringify({ ...pkgJson, + ...pkgExtra, version, }, null, 2), }, @@ -876,49 +898,89 @@ t.test('latest dist tag', (t) => { // this needs more than one item in it to cover the sort logic { version: '50.0.0' }, { version: '100.0.0' }, + { version: '102.0.0', deprecated: 'oops' }, { version: '105.0.0-pre' }, ] - t.test('PREVENTS publish when latest version is HIGHER than publishing version', async t => { + await t.test('PREVENTS publish when highest version is HIGHER than publishing version', async t => { const version = '99.0.0' - const { npm, registry } = await loadNpmWithRegistry(t, init(version)) + const { npm, registry } = await loadNpmWithRegistry(t, init({ version })) registry.publish(pkg, { noPut: true, packuments }) await t.rejects(async () => { await npm.exec('publish', []) - /* eslint-disable-next-line max-len */ - }, new Error('Cannot implicitly apply the "latest" tag because published version 100.0.0 is higher than the new version 99.0.0. You must specify a tag using --tag.')) + }, new Error('Cannot implicitly apply the "latest" tag because previously published version 100.0.0 is higher than the new version 99.0.0. You must specify a tag using --tag.')) }) - t.test('ALLOWS publish when latest is HIGHER than publishing version and flag', async t => { + await t.test('ALLOWS publish when highest is HIGHER than publishing version and flag', async t => { const version = '99.0.0' const { npm, registry } = await loadNpmWithRegistry(t, { - ...init(version), + ...init({ version }), argv: ['--tag', 'latest'], }) registry.publish(pkg, { packuments }) await npm.exec('publish', []) }) - t.test('ALLOWS publish when latest versions are LOWER than publishing version', async t => { + await t.test('ALLOWS publish when highest versions are LOWER than publishing version', async t => { const version = '101.0.0' - const { npm, registry } = await loadNpmWithRegistry(t, init(version)) + const { npm, registry } = await loadNpmWithRegistry(t, init({ version })) registry.publish(pkg, { packuments }) await npm.exec('publish', []) }) - t.test('ALLOWS publish when packument has empty versions (for coverage)', async t => { + await t.test('ALLOWS publish when packument has empty versions (for coverage)', async t => { const version = '1.0.0' - const { npm, registry } = await loadNpmWithRegistry(t, init(version)) + const { npm, registry } = await loadNpmWithRegistry(t, init({ version })) registry.publish(pkg, { manifest: { versions: { } } }) await npm.exec('publish', []) }) - t.test('ALLOWS publish when packument has empty manifest (for coverage)', async t => { + await t.test('ALLOWS publish when packument has empty manifest (for coverage)', async t => { const version = '1.0.0' - const { npm, registry } = await loadNpmWithRegistry(t, init(version)) + const { npm, registry } = await loadNpmWithRegistry(t, init({ version })) registry.publish(pkg, { manifest: {} }) await npm.exec('publish', []) }) - t.end() + await t.test('ALLOWS publish when highest version is HIGHER than publishing version with publishConfig', async t => { + const version = '99.0.0' + const { npm, registry } = await loadNpmWithRegistry(t, init({ + version, + pkgExtra: { + publishConfig: { + tag: 'next', + }, + }, + })) + registry.publish(pkg, { packuments }) + await npm.exec('publish', []) + }) + + await t.test('PREVENTS publish when latest version is SAME AS publishing version', async t => { + const version = '100.0.0' + const { npm, registry } = await loadNpmWithRegistry(t, init({ version })) + registry.publish(pkg, { noPut: true, packuments }) + await t.rejects(async () => { + await npm.exec('publish', []) + }, new Error('You cannot publish over the previously published versions: 100.0.0.')) + }) + + await t.test('PREVENTS publish when publishing version EXISTS ALREADY in the registry', async t => { + const version = '50.0.0' + const { npm, registry } = await loadNpmWithRegistry(t, init({ version })) + registry.publish(pkg, { noPut: true, packuments }) + await t.rejects(async () => { + await npm.exec('publish', []) + }, new Error('You cannot publish over the previously published versions: 50.0.0.')) + }) + + await t.test('ALLOWS publish when latest is HIGHER than publishing version and flag --force', async t => { + const version = '99.0.0' + const { npm, registry } = await loadNpmWithRegistry(t, { + ...init({ version }), + argv: ['--force'], + }) + registry.publish(pkg, { noGet: true, packuments }) + await npm.exec('publish', []) + }) }) diff --git a/deps/npm/test/lib/commands/sbom.js b/deps/npm/test/lib/commands/sbom.js index 25f6135ef8a1..c08756414d25 100644 --- a/deps/npm/test/lib/commands/sbom.js +++ b/deps/npm/test/lib/commands/sbom.js @@ -205,6 +205,97 @@ t.test('sbom', async t => { t.matchSnapshot(result()) }) + const dupDepsNmFixture = { + node_modules: { + foo: { + 'package.json': JSON.stringify({ + name: 'foo', + version: '1.0.0', + dependencies: { + chai: '^1.0.0', + }, + }), + node_modules: { + chai: { + 'package.json': JSON.stringify({ + name: 'chai', + version: '1.0.0', + }), + }, + }, + }, + bar: { + 'package.json': JSON.stringify({ + name: 'bar', + version: '1.0.0', + dependencies: { + chai: '^1.0.0', + }, + }), + node_modules: { + chai: { + 'package.json': JSON.stringify({ + name: 'chai', + version: '1.0.0', + }), + }, + }, + }, + chai: { + 'package.json': JSON.stringify({ + name: 'chai', + version: '2.0.0', + }), + }, + }, + } + + t.test('duplicate deps - spdx', async t => { + const config = { + 'sbom-format': 'spdx', + } + const { result, sbom } = await mockSbom(t, { + config, + prefixDir: { + 'package.json': JSON.stringify({ + name: 'test-npm-sbom', + version: '1.0.0', + dependencies: { + foo: '^1.0.0', + bar: '^1.0.0', + chai: '^2.0.0', + }, + }), + ...dupDepsNmFixture, + }, + }) + await sbom.exec([]) + t.matchSnapshot(result()) + }) + + t.test('duplicate deps - cyclonedx', async t => { + const config = { + 'sbom-format': 'cyclonedx', + } + const { result, sbom } = await mockSbom(t, { + config, + prefixDir: { + 'package.json': JSON.stringify({ + name: 'test-npm-sbom', + version: '1.0.0', + dependencies: { + foo: '^1.0.0', + bar: '^1.0.0', + chai: '^2.0.0', + }, + }), + ...dupDepsNmFixture, + }, + }) + await sbom.exec([]) + t.matchSnapshot(result()) + }) + t.test('missing format', async t => { const config = {} const { result, sbom } = await mockSbom(t, { diff --git a/deps/npm/test/lib/commands/search.js b/deps/npm/test/lib/commands/search.js index de4a58ca78a8..97adffd8e143 100644 --- a/deps/npm/test/lib/commands/search.js +++ b/deps/npm/test/lib/commands/search.js @@ -26,6 +26,18 @@ t.test('search', t => { t.matchSnapshot(joinedOutput(), 'should have expected search results') }) + t.test('multiple terms text', async t => { + const { npm, joinedOutput } = await loadMockNpm(t) + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + }) + + registry.search({ results: libnpmsearchResultFixture }) + await npm.exec('search', ['libnpm', 'publish']) + t.matchSnapshot(joinedOutput(), 'should have expected search results') + }) + t.test(' --json', async t => { const { npm, joinedOutput } = await loadMockNpm(t, { config: { json: true } }) const registry = new MockRegistry({ @@ -68,6 +80,18 @@ t.test('search', t => { t.matchSnapshot(joinedOutput(), 'should have expected search results with color') }) + t.test('multiple terms --color', async t => { + const { npm, joinedOutput } = await loadMockNpm(t, { config: { color: 'always' } }) + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + }) + + registry.search({ results: libnpmsearchResultFixture }) + await npm.exec('search', ['libnpm', 'publish']) + t.matchSnapshot(joinedOutput(), 'should have expected search results with color') + }) + t.test('//--color', async t => { const { npm, joinedOutput } = await loadMockNpm(t, { config: { color: 'always' } }) const registry = new MockRegistry({ diff --git a/deps/npm/test/lib/commands/undeprecate.js b/deps/npm/test/lib/commands/undeprecate.js new file mode 100644 index 000000000000..775a2183a129 --- /dev/null +++ b/deps/npm/test/lib/commands/undeprecate.js @@ -0,0 +1,72 @@ +const t = require('tap') +const { load: loadMockNpm } = require('../../fixtures/mock-npm') + +const MockRegistry = require('@npmcli/mock-registry') + +const token = 'test-auth-token' +const auth = { '//registry.npmjs.org/:_authToken': token } +const versions = ['1.0.0', '1.0.1', '1.0.1-pre'] + +t.test('no args', async t => { + const { npm } = await loadMockNpm(t) + await t.rejects( + npm.exec('undeprecate', []), + { code: 'EUSAGE' }, + 'logs usage' + ) +}) + +t.test('undeprecate', async t => { + const { npm, logs, joinedOutput } = await loadMockNpm(t, { config: { ...auth } }) + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: token, + }) + const manifest = registry.manifest({ + name: 'foo', + versions, + }) + await registry.package({ manifest, query: { write: true } }) + registry.nock.put('/foo', body => { + for (const version of versions) { + if (body.versions[version].deprecated !== '') { + return false + } + } + return true + }).reply(200, {}) + + await npm.exec('undeprecate', ['foo']) + t.match(logs.notice, [ + 'undeprecating foo@1.0.0', + 'undeprecating foo@1.0.1', + 'undeprecating foo@1.0.1-pre', + ]) + t.match(joinedOutput(), '') +}) + +t.test('dry-run', async t => { + const { npm, logs, joinedOutput } = await loadMockNpm(t, { config: { + 'dry-run': true, + ...auth, + } }) + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: token, + }) + const manifest = registry.manifest({ + name: 'foo', + versions, + }) + await registry.package({ manifest, query: { write: true } }) + + await npm.exec('undeprecate', ['foo']) + t.match(logs.notice, [ + 'undeprecating foo@1.0.0', + 'undeprecating foo@1.0.1', + 'undeprecating foo@1.0.1-pre', + ]) + t.match(joinedOutput(), '') +}) diff --git a/deps/npm/test/lib/utils/sbom-cyclonedx.js b/deps/npm/test/lib/utils/sbom-cyclonedx.js index da9b3f757988..a40831c9fa05 100644 --- a/deps/npm/test/lib/utils/sbom-cyclonedx.js +++ b/deps/npm/test/lib/utils/sbom-cyclonedx.js @@ -107,7 +107,6 @@ t.test('single node - with author object', t => { }) t.test('single node - with integrity', t => { - /* eslint-disable-next-line max-len */ const node = { ...root, integrity: 'sha512-1RkbFGUKex4lvsB9yhIfWltJM5cZKUftB2eNajaDv3dCMEp49iBG0K14uH8NnX9IPux2+mK7JGEOB0jn48/J6w==' } const res = cyclonedxOutput({ npm, nodes: [node] }) t.matchSnapshot(JSON.stringify(res)) @@ -233,6 +232,18 @@ t.test('node - with deps', t => { t.end() }) +t.test('node - with duplicate deps', t => { + const node = { + ...root, + edgesOut: [ + { to: dep1 }, + ], + } + const res = cyclonedxOutput({ npm, nodes: [node, dep1, dep1] }) + t.matchSnapshot(JSON.stringify(res)) + t.end() +}) + // Check that all of the generated test snapshots validate against the CycloneDX schema t.test('schema validation', t => { // Load schemas diff --git a/deps/npm/test/lib/utils/sbom-spdx.js b/deps/npm/test/lib/utils/sbom-spdx.js index d69e85667dc8..68b102854315 100644 --- a/deps/npm/test/lib/utils/sbom-spdx.js +++ b/deps/npm/test/lib/utils/sbom-spdx.js @@ -163,7 +163,6 @@ t.test('single node - with homepage', t => { }) t.test('single node - with integrity', t => { - /* eslint-disable-next-line max-len */ const node = { ...root, integrity: 'sha512-1RkbFGUKex4lvsB9yhIfWltJM5cZKUftB2eNajaDv3dCMEp49iBG0K14uH8NnX9IPux2+mK7JGEOB0jn48/J6w==' } const res = spdxOutput({ npm, nodes: [node] }) t.matchSnapshot(JSON.stringify(res)) @@ -199,6 +198,17 @@ t.test('node - with deps', t => { t.end() }) +t.test('node - with duplicate deps', t => { + const node = { ...root, + edgesOut: [ + { to: dep1 }, + { to: dep2 }, + ] } + const res = spdxOutput({ npm, nodes: [node, dep1, dep2, dep1, dep2] }) + t.matchSnapshot(JSON.stringify(res)) + t.end() +}) + // Check that all of the generated test snapshots validate against the SPDX schema t.test('schema validation', t => { const ajv = new Ajv()