mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
deps: upgrade npm to 11.11.0
PR-URL: https://github.com/nodejs/node/pull/61994 Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jordan Harband <ljharb@gmail.com>
This commit is contained in:
1 parent
35d3bc8fe8
commit
c5b3f60986
257 files changed
+4086
-2382
No files matched your search
+1
-1
@@ -23,7 +23,7 @@ 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:
|
||||
|
||||
```bash
|
||||
npm@11.10.1 /path/to/npm
|
||||
npm@11.11.0 /path/to/npm
|
||||
└─┬ init-package-json@0.0.4
|
||||
└── promzard@0.1.5
|
||||
```
|
||||
|
||||
+24
@@ -94,6 +94,30 @@ npm trust gitlab [package] --file [--project|--repo|--repository] [--env|--envir
|
||||
| `--registry` | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. |
|
||||
| `--yes`, `-y` | null | null or Boolean | Automatically answer "yes" to any prompts that npm might print on the command line. |
|
||||
|
||||
### `npm trust circleci`
|
||||
|
||||
Create a trusted relationship between a package and CircleCI
|
||||
|
||||
#### Synopsis
|
||||
|
||||
```bash
|
||||
npm trust circleci [package] --org-id <uuid> --project-id <uuid> --pipeline-definition-id <uuid> --vcs-origin <origin> [--context-id <uuid>...] [-y|--yes]
|
||||
```
|
||||
|
||||
#### Flags
|
||||
|
||||
| Flag | Default | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `--org-id` | null | String (required) | CircleCI organization UUID |
|
||||
| `--project-id` | null | String (required) | CircleCI project UUID |
|
||||
| `--pipeline-definition-id` | null | String (required) | CircleCI pipeline definition UUID |
|
||||
| `--vcs-origin` | null | String (required) | CircleCI repository origin in format 'provider/owner/repo' |
|
||||
| `--context-id` | null | null or String (can be set multiple times) | CircleCI context UUID to match |
|
||||
| `--dry-run` | false | 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. |
|
||||
| `--json` | false | Boolean | Whether or not to output JSON data, rather than the normal output. * In `npm pkg set` it enables parsing set values with JSON.parse() before saving them to your `package.json`. Not supported by all npm commands. |
|
||||
| `--registry` | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. |
|
||||
| `--yes`, `-y` | null | null or Boolean | Automatically answer "yes" to any prompts that npm might print on the command line. |
|
||||
|
||||
### `npm trust list`
|
||||
|
||||
List trusted relationships for a package
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ Note: This command is unaware of workspaces.
|
||||
|
||||
### Version
|
||||
|
||||
11.10.1
|
||||
11.11.0
|
||||
|
||||
### Description
|
||||
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ The [`npm query`](/commands/npm-query) command exposes a new dependency selector
|
||||
- `:missing` when a dependency is not found on disk
|
||||
- `:semver(<spec>, [selector], [function])` match a valid [`node-semver`](https://github.com/npm/node-semver) version or range to a selector
|
||||
- `:path(<path>)` [glob](https://www.npmjs.com/package/glob) matching based on dependencies path relative to the project
|
||||
- `:type(<type>)` [based on currently recognized types](https://github.com/npm/npm-package-arg#result-object)
|
||||
- `:type(<type>)` [based on currently recognized types](https://github.com/npm/npm-package-arg#result-object). You can also use the aggregate type of `registry` for any registry dependency (e.g. tag, version, range, alias)
|
||||
- `:outdated(<type>)` when a dependency is outdated
|
||||
- `:vuln(<selector>)` when a dependency has a known vulnerability
|
||||
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-access----11101">
|
||||
<h1 id="----npm-access----11110">
|
||||
<span>npm-access</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Set access level on published packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-adduser----11101">
|
||||
<h1 id="----npm-adduser----11110">
|
||||
<span>npm-adduser</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Add a registry user account</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-audit----11101">
|
||||
<h1 id="----npm-audit----11110">
|
||||
<span>npm-audit</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Run a security audit</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-bugs----11101">
|
||||
<h1 id="----npm-bugs----11110">
|
||||
<span>npm-bugs</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Report bugs for a package in a web browser</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-cache----11101">
|
||||
<h1 id="----npm-cache----11110">
|
||||
<span>npm-cache</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Manipulates packages cache</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-ci----11101">
|
||||
<h1 id="----npm-ci----11110">
|
||||
<span>npm-ci</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Clean install a project</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-completion----11101">
|
||||
<h1 id="----npm-completion----11110">
|
||||
<span>npm-completion</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Tab Completion for npm</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-config----11101">
|
||||
<h1 id="----npm-config----11110">
|
||||
<span>npm-config</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Manage the npm configuration files</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-dedupe----11101">
|
||||
<h1 id="----npm-dedupe----11110">
|
||||
<span>npm-dedupe</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Reduce duplication in the package tree</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-deprecate----11101">
|
||||
<h1 id="----npm-deprecate----11110">
|
||||
<span>npm-deprecate</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Deprecate a version of a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-diff----11101">
|
||||
<h1 id="----npm-diff----11110">
|
||||
<span>npm-diff</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">The registry diff command</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-dist-tag----11101">
|
||||
<h1 id="----npm-dist-tag----11110">
|
||||
<span>npm-dist-tag</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Modify package distribution tags</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-docs----11101">
|
||||
<h1 id="----npm-docs----11110">
|
||||
<span>npm-docs</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Open documentation for a package in a web browser</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-doctor----11101">
|
||||
<h1 id="----npm-doctor----11110">
|
||||
<span>npm-doctor</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Check the health of your npm environment</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-edit----11101">
|
||||
<h1 id="----npm-edit----11110">
|
||||
<span>npm-edit</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Edit an installed package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-exec----11101">
|
||||
<h1 id="----npm-exec----11110">
|
||||
<span>npm-exec</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Run a command from a local or remote npm package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-explain----11101">
|
||||
<h1 id="----npm-explain----11110">
|
||||
<span>npm-explain</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Explain installed packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-explore----11101">
|
||||
<h1 id="----npm-explore----11110">
|
||||
<span>npm-explore</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Browse an installed package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-find-dupes----11101">
|
||||
<h1 id="----npm-find-dupes----11110">
|
||||
<span>npm-find-dupes</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Find duplication in the package tree</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-fund----11101">
|
||||
<h1 id="----npm-fund----11110">
|
||||
<span>npm-fund</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Retrieve funding information</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-get----11101">
|
||||
<h1 id="----npm-get----11110">
|
||||
<span>npm-get</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Get a value from the npm configuration</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-help-search----11101">
|
||||
<h1 id="----npm-help-search----11110">
|
||||
<span>npm-help-search</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Search npm help documentation</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-help----11101">
|
||||
<h1 id="----npm-help----11110">
|
||||
<span>npm-help</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Get help on npm</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-init----11101">
|
||||
<h1 id="----npm-init----11110">
|
||||
<span>npm-init</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Create a package.json file</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-install-ci-test----11101">
|
||||
<h1 id="----npm-install-ci-test----11110">
|
||||
<span>npm-install-ci-test</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Install a project with a clean slate and run tests</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-install-test----11101">
|
||||
<h1 id="----npm-install-test----11110">
|
||||
<span>npm-install-test</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Install package(s) and run tests</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-install----11101">
|
||||
<h1 id="----npm-install----11110">
|
||||
<span>npm-install</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Install a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-link----11101">
|
||||
<h1 id="----npm-link----11110">
|
||||
<span>npm-link</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Symlink a package folder</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-ll----11101">
|
||||
<h1 id="----npm-ll----11110">
|
||||
<span>npm-ll</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">List installed packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-login----11101">
|
||||
<h1 id="----npm-login----11110">
|
||||
<span>npm-login</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Login to a registry user account</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-logout----11101">
|
||||
<h1 id="----npm-logout----11110">
|
||||
<span>npm-logout</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Log out of the registry</span>
|
||||
</header>
|
||||
|
||||
+3
-3
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-ls----11101">
|
||||
<h1 id="----npm-ls----11110">
|
||||
<span>npm-ls</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">List installed packages</span>
|
||||
</header>
|
||||
@@ -209,7 +209,7 @@ alias: list
|
||||
<p>Positional arguments are <code>name@version-range</code> identifiers, which will limit the results to only the paths to the packages named.
|
||||
Note that nested packages will <em>also</em> show the paths to the specified packages.
|
||||
For example, running <code>npm ls promzard</code> in npm's source tree will show:</p>
|
||||
<pre><code class="language-bash">npm@11.10.1 /path/to/npm
|
||||
<pre><code class="language-bash">npm@11.11.0 /path/to/npm
|
||||
└─┬ init-package-json@0.0.4
|
||||
└── promzard@0.1.5
|
||||
</code></pre>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-org----11101">
|
||||
<h1 id="----npm-org----11110">
|
||||
<span>npm-org</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Manage orgs</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-outdated----11101">
|
||||
<h1 id="----npm-outdated----11110">
|
||||
<span>npm-outdated</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Check for outdated packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-owner----11101">
|
||||
<h1 id="----npm-owner----11110">
|
||||
<span>npm-owner</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Manage package owners</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-pack----11101">
|
||||
<h1 id="----npm-pack----11110">
|
||||
<span>npm-pack</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Create a tarball from a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-ping----11101">
|
||||
<h1 id="----npm-ping----11110">
|
||||
<span>npm-ping</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Ping npm registry</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-pkg----11101">
|
||||
<h1 id="----npm-pkg----11110">
|
||||
<span>npm-pkg</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Manages your package.json</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-prefix----11101">
|
||||
<h1 id="----npm-prefix----11110">
|
||||
<span>npm-prefix</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Display prefix</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-profile----11101">
|
||||
<h1 id="----npm-profile----11110">
|
||||
<span>npm-profile</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Change settings on your registry profile</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-prune----11101">
|
||||
<h1 id="----npm-prune----11110">
|
||||
<span>npm-prune</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Remove extraneous packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-publish----11101">
|
||||
<h1 id="----npm-publish----11110">
|
||||
<span>npm-publish</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Publish a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-query----11101">
|
||||
<h1 id="----npm-query----11110">
|
||||
<span>npm-query</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Dependency selector query</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-rebuild----11101">
|
||||
<h1 id="----npm-rebuild----11110">
|
||||
<span>npm-rebuild</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Rebuild a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-repo----11101">
|
||||
<h1 id="----npm-repo----11110">
|
||||
<span>npm-repo</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Open package repository page in the browser</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-restart----11101">
|
||||
<h1 id="----npm-restart----11110">
|
||||
<span>npm-restart</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Restart a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-root----11101">
|
||||
<h1 id="----npm-root----11110">
|
||||
<span>npm-root</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Display npm root</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-run----11101">
|
||||
<h1 id="----npm-run----11110">
|
||||
<span>npm-run</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Run arbitrary package scripts</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-sbom----11101">
|
||||
<h1 id="----npm-sbom----11110">
|
||||
<span>npm-sbom</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Generate a Software Bill of Materials (SBOM)</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-search----11101">
|
||||
<h1 id="----npm-search----11110">
|
||||
<span>npm-search</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Search for packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-set----11101">
|
||||
<h1 id="----npm-set----11110">
|
||||
<span>npm-set</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Set a value in the npm configuration</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-shrinkwrap----11101">
|
||||
<h1 id="----npm-shrinkwrap----11110">
|
||||
<span>npm-shrinkwrap</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Lock down dependency versions for publication</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-star----11101">
|
||||
<h1 id="----npm-star----11110">
|
||||
<span>npm-star</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Mark your favorite packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-stars----11101">
|
||||
<h1 id="----npm-stars----11110">
|
||||
<span>npm-stars</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">View packages marked as favorites</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-start----11101">
|
||||
<h1 id="----npm-start----11110">
|
||||
<span>npm-start</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Start a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-stop----11101">
|
||||
<h1 id="----npm-stop----11110">
|
||||
<span>npm-stop</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Stop a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-team----11101">
|
||||
<h1 id="----npm-team----11110">
|
||||
<span>npm-team</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Manage organization teams and team memberships</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-test----11101">
|
||||
<h1 id="----npm-test----11110">
|
||||
<span>npm-test</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Test a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-token----11101">
|
||||
<h1 id="----npm-token----11110">
|
||||
<span>npm-token</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Manage your authentication tokens</span>
|
||||
</header>
|
||||
|
||||
+80
-8
@@ -186,16 +186,16 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-trust----11101">
|
||||
<h1 id="----npm-trust----11110">
|
||||
<span>npm-trust</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Manage trusted publishing relationships between packages and CI/CD providers</span>
|
||||
</header>
|
||||
|
||||
<section id="table_of_contents">
|
||||
<h2 id="table-of-contents">Table of contents</h2>
|
||||
<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#prerequisites">Prerequisites</a></li><li><a href="#description">Description</a></li><li><a href="#bulk-usage">Bulk Usage</a></li><li><a href="#configuration">Configuration</a></li><li><a href="#npm-trust-github"><code>npm trust github</code></a></li><ul><li><a href="#synopsis2">Synopsis</a></li><li><a href="#flags">Flags</a></li></ul><li><a href="#npm-trust-gitlab"><code>npm trust gitlab</code></a></li><ul><li><a href="#synopsis3">Synopsis</a></li><li><a href="#flags2">Flags</a></li></ul><li><a href="#npm-trust-list"><code>npm trust list</code></a></li><ul><li><a href="#synopsis4">Synopsis</a></li><li><a href="#flags3">Flags</a></li></ul><li><a href="#npm-trust-revoke"><code>npm trust revoke</code></a></li><ul><li><a href="#synopsis5">Synopsis</a></li><li><a href="#flags4">Flags</a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
|
||||
<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#prerequisites">Prerequisites</a></li><li><a href="#description">Description</a></li><li><a href="#bulk-usage">Bulk Usage</a></li><li><a href="#configuration">Configuration</a></li><li><a href="#npm-trust-github"><code>npm trust github</code></a></li><ul><li><a href="#synopsis2">Synopsis</a></li><li><a href="#flags">Flags</a></li></ul><li><a href="#npm-trust-gitlab"><code>npm trust gitlab</code></a></li><ul><li><a href="#synopsis3">Synopsis</a></li><li><a href="#flags2">Flags</a></li></ul><li><a href="#npm-trust-circleci"><code>npm trust circleci</code></a></li><ul><li><a href="#synopsis4">Synopsis</a></li><li><a href="#flags3">Flags</a></li></ul><li><a href="#npm-trust-list"><code>npm trust list</code></a></li><ul><li><a href="#synopsis5">Synopsis</a></li><li><a href="#flags4">Flags</a></li></ul><li><a href="#npm-trust-revoke"><code>npm trust revoke</code></a></li><ul><li><a href="#synopsis6">Synopsis</a></li><li><a href="#flags5">Flags</a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
|
||||
</section>
|
||||
|
||||
<div id="_content"><h3 id="synopsis">Synopsis</h3>
|
||||
@@ -348,10 +348,10 @@ npm command-line interface
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 id="npm-trust-list"><code>npm trust list</code></h3>
|
||||
<p>List trusted relationships for a package</p>
|
||||
<h3 id="npm-trust-circleci"><code>npm trust circleci</code></h3>
|
||||
<p>Create a trusted relationship between a package and CircleCI</p>
|
||||
<h4 id="synopsis4">Synopsis</h4>
|
||||
<pre><code class="language-bash">npm trust list [package]
|
||||
<pre><code class="language-bash">npm trust circleci [package] --org-id <uuid> --project-id <uuid> --pipeline-definition-id <uuid> --vcs-origin <origin> [--context-id <uuid>...] [-y|--yes]
|
||||
</code></pre>
|
||||
<h4 id="flags3">Flags</h4>
|
||||
<table>
|
||||
@@ -365,6 +365,78 @@ npm command-line interface
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>--org-id</code></td>
|
||||
<td>null</td>
|
||||
<td>String (required)</td>
|
||||
<td>CircleCI organization UUID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--project-id</code></td>
|
||||
<td>null</td>
|
||||
<td>String (required)</td>
|
||||
<td>CircleCI project UUID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--pipeline-definition-id</code></td>
|
||||
<td>null</td>
|
||||
<td>String (required)</td>
|
||||
<td>CircleCI pipeline definition UUID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--vcs-origin</code></td>
|
||||
<td>null</td>
|
||||
<td>String (required)</td>
|
||||
<td>CircleCI repository origin in format 'provider/owner/repo'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--context-id</code></td>
|
||||
<td>null</td>
|
||||
<td>null or String (can be set multiple times)</td>
|
||||
<td>CircleCI context UUID to match</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--dry-run</code></td>
|
||||
<td>false</td>
|
||||
<td>Boolean</td>
|
||||
<td>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, <code>install</code>, <code>update</code>, <code>dedupe</code>, <code>uninstall</code>, as well as <code>pack</code> and <code>publish</code>. Note: This is NOT honored by other network related commands, eg <code>dist-tags</code>, <code>owner</code>, etc.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--json</code></td>
|
||||
<td>false</td>
|
||||
<td>Boolean</td>
|
||||
<td>Whether or not to output JSON data, rather than the normal output. * In <code>npm pkg set</code> it enables parsing set values with JSON.parse() before saving them to your <code>package.json</code>. Not supported by all npm commands.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--registry</code></td>
|
||||
<td>"<a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a>"</td>
|
||||
<td>URL</td>
|
||||
<td>The base URL of the npm registry.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--yes</code>, <code>-y</code></td>
|
||||
<td>null</td>
|
||||
<td>null or Boolean</td>
|
||||
<td>Automatically answer "yes" to any prompts that npm might print on the command line.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 id="npm-trust-list"><code>npm trust list</code></h3>
|
||||
<p>List trusted relationships for a package</p>
|
||||
<h4 id="synopsis5">Synopsis</h4>
|
||||
<pre><code class="language-bash">npm trust list [package]
|
||||
</code></pre>
|
||||
<h4 id="flags4">Flags</h4>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Flag</th>
|
||||
<th>Default</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>--json</code></td>
|
||||
<td>false</td>
|
||||
<td>Boolean</td>
|
||||
@@ -380,10 +452,10 @@ npm command-line interface
|
||||
</table>
|
||||
<h3 id="npm-trust-revoke"><code>npm trust revoke</code></h3>
|
||||
<p>Revoke a trusted relationship for a package</p>
|
||||
<h4 id="synopsis5">Synopsis</h4>
|
||||
<h4 id="synopsis6">Synopsis</h4>
|
||||
<pre><code class="language-bash">npm trust revoke [package] --id=<trust-id>
|
||||
</code></pre>
|
||||
<h4 id="flags4">Flags</h4>
|
||||
<h4 id="flags5">Flags</h4>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-undeprecate----11101">
|
||||
<h1 id="----npm-undeprecate----11110">
|
||||
<span>npm-undeprecate</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Undeprecate a version of a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-uninstall----11101">
|
||||
<h1 id="----npm-uninstall----11110">
|
||||
<span>npm-uninstall</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Remove a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-unpublish----11101">
|
||||
<h1 id="----npm-unpublish----11110">
|
||||
<span>npm-unpublish</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Remove a package from the registry</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-unstar----11101">
|
||||
<h1 id="----npm-unstar----11110">
|
||||
<span>npm-unstar</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Remove an item from your favorite packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-update----11101">
|
||||
<h1 id="----npm-update----11110">
|
||||
<span>npm-update</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Update packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-version----11101">
|
||||
<h1 id="----npm-version----11110">
|
||||
<span>npm-version</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Bump a package version</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-view----11101">
|
||||
<h1 id="----npm-view----11110">
|
||||
<span>npm-view</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">View registry info</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-whoami----11101">
|
||||
<h1 id="----npm-whoami----11110">
|
||||
<span>npm-whoami</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Display npm username</span>
|
||||
</header>
|
||||
|
||||
+3
-3
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm----11101">
|
||||
<h1 id="----npm----11110">
|
||||
<span>npm</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">javascript package manager</span>
|
||||
</header>
|
||||
@@ -203,7 +203,7 @@ npm command-line interface
|
||||
</code></pre>
|
||||
<p>Note: This command is unaware of workspaces.</p>
|
||||
<h3 id="version">Version</h3>
|
||||
<p>11.10.1</p>
|
||||
<p>11.11.0</p>
|
||||
<h3 id="description">Description</h3>
|
||||
<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.</p>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npx----11101">
|
||||
<h1 id="----npx----11110">
|
||||
<span>npx</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Run a command from a local or remote npm package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----folders----11101">
|
||||
<h1 id="----folders----11110">
|
||||
<span>Folders</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Folder structures used by npm</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----install----11101">
|
||||
<h1 id="----install----11110">
|
||||
<span>Install</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Download and install node and npm</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----folders----11101">
|
||||
<h1 id="----folders----11110">
|
||||
<span>Folders</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Folder structures used by npm</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----packagejson----11101">
|
||||
<h1 id="----packagejson----11110">
|
||||
<span>package.json</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Specifics of npm's package.json handling</span>
|
||||
</header>
|
||||
|
||||
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-shrinkwrapjson----11101">
|
||||
<h1 id="----npm-shrinkwrapjson----11110">
|
||||
<span>npm-shrinkwrap.json</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">A publishable lockfile</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npmrc----11101">
|
||||
<h1 id="----npmrc----11110">
|
||||
<span>.npmrc</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">The npm config files</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----packagejson----11101">
|
||||
<h1 id="----packagejson----11110">
|
||||
<span>package.json</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Specifics of npm's package.json handling</span>
|
||||
</header>
|
||||
|
||||
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----package-lockjson----11101">
|
||||
<h1 id="----package-lockjson----11110">
|
||||
<span>package-lock.json</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">A manifestation of the manifest</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----config----11101">
|
||||
<h1 id="----config----11110">
|
||||
<span>Config</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">About npm configuration</span>
|
||||
</header>
|
||||
|
||||
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----dependency-selectors----11101">
|
||||
<h1 id="----dependency-selectors----11110">
|
||||
<span>Dependency Selectors</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Dependency Selector Syntax & Querying</span>
|
||||
</header>
|
||||
@@ -255,7 +255,7 @@ npm command-line interface
|
||||
<li><code>:missing</code> when a dependency is not found on disk</li>
|
||||
<li><code>:semver(<spec>, [selector], [function])</code> match a valid <a href="https://github.com/npm/node-semver"><code>node-semver</code></a> version or range to a selector</li>
|
||||
<li><code>:path(<path>)</code> <a href="https://www.npmjs.com/package/glob">glob</a> matching based on dependencies path relative to the project</li>
|
||||
<li><code>:type(<type>)</code> <a href="https://github.com/npm/npm-package-arg#result-object">based on currently recognized types</a></li>
|
||||
<li><code>:type(<type>)</code> <a href="https://github.com/npm/npm-package-arg#result-object">based on currently recognized types</a>. You can also use the aggregate type of <code>registry</code> for any registry dependency (e.g. tag, version, range, alias)</li>
|
||||
<li><code>:outdated(<type>)</code> when a dependency is outdated</li>
|
||||
<li><code>:vuln(<selector>)</code> when a dependency has a known vulnerability</li>
|
||||
</ul>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----developers----11101">
|
||||
<h1 id="----developers----11110">
|
||||
<span>Developers</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Developer guide</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----logging----11101">
|
||||
<h1 id="----logging----11110">
|
||||
<span>Logging</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Why, What & How we Log</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----organizations----11101">
|
||||
<h1 id="----organizations----11110">
|
||||
<span>Organizations</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Working with teams & organizations</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----package-spec----11101">
|
||||
<h1 id="----package-spec----11110">
|
||||
<span>Package spec</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Package name specifier</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----registry----11101">
|
||||
<h1 id="----registry----11110">
|
||||
<span>Registry</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">The JavaScript Package Registry</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----removal----11101">
|
||||
<h1 id="----removal----11110">
|
||||
<span>Removal</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Cleaning the slate</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----scope----11101">
|
||||
<h1 id="----scope----11110">
|
||||
<span>Scope</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Scoped packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----scripts----11101">
|
||||
<h1 id="----scripts----11110">
|
||||
<span>Scripts</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">How npm handles the "scripts" field</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----workspaces----11101">
|
||||
<h1 id="----workspaces----11110">
|
||||
<span>Workspaces</span>
|
||||
<span class="version">@11.10.1</span>
|
||||
<span class="version">@11.11.0</span>
|
||||
</h1>
|
||||
<span class="description">Working with workspaces</span>
|
||||
</header>
|
||||
|
||||
+179
@@ -0,0 +1,179 @@
|
||||
const Definition = require('@npmcli/config/lib/definitions/definition.js')
|
||||
const globalDefinitions = require('@npmcli/config/lib/definitions/definitions.js')
|
||||
const TrustCommand = require('../../trust-cmd.js')
|
||||
|
||||
// UUID validation regex
|
||||
const UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i
|
||||
|
||||
class TrustCircleCI extends TrustCommand {
|
||||
static description = 'Create a trusted relationship between a package and CircleCI'
|
||||
static name = 'circleci'
|
||||
static positionals = 1 // expects at most 1 positional (package name)
|
||||
static providerName = 'CircleCI'
|
||||
static providerEntity = 'CircleCI pipeline'
|
||||
|
||||
static usage = [
|
||||
'[package] --org-id <uuid> --project-id <uuid> --pipeline-definition-id <uuid> --vcs-origin <origin> [--context-id <uuid>...] [-y|--yes]',
|
||||
]
|
||||
|
||||
static definitions = [
|
||||
new Definition('org-id', {
|
||||
default: null,
|
||||
type: String,
|
||||
required: true,
|
||||
description: 'CircleCI organization UUID',
|
||||
}),
|
||||
new Definition('project-id', {
|
||||
default: null,
|
||||
type: String,
|
||||
required: true,
|
||||
description: 'CircleCI project UUID',
|
||||
}),
|
||||
new Definition('pipeline-definition-id', {
|
||||
default: null,
|
||||
type: String,
|
||||
required: true,
|
||||
description: 'CircleCI pipeline definition UUID',
|
||||
}),
|
||||
new Definition('vcs-origin', {
|
||||
default: null,
|
||||
type: String,
|
||||
required: true,
|
||||
description: "CircleCI repository origin in format 'provider/owner/repo'",
|
||||
}),
|
||||
new Definition('context-id', {
|
||||
default: null,
|
||||
type: [null, String, Array],
|
||||
description: 'CircleCI context UUID to match',
|
||||
}),
|
||||
// globals are alphabetical
|
||||
globalDefinitions['dry-run'],
|
||||
globalDefinitions.json,
|
||||
globalDefinitions.registry,
|
||||
globalDefinitions.yes,
|
||||
]
|
||||
|
||||
validateUuid (value, fieldName) {
|
||||
if (!UUID_REGEX.test(value)) {
|
||||
throw new Error(`${fieldName} must be a valid UUID`)
|
||||
}
|
||||
}
|
||||
|
||||
validateVcsOrigin (value) {
|
||||
// Expected format: provider/owner/repo (e.g., github.com/owner/repo, bitbucket.org/owner/repo)
|
||||
if (value.includes('://')) {
|
||||
throw new Error("vcs-origin must not include a scheme (e.g., use 'github.com/owner/repo' not 'https://github.com/owner/repo')")
|
||||
}
|
||||
const parts = value.split('/')
|
||||
if (parts.length < 3) {
|
||||
throw new Error("vcs-origin must be in format 'provider/owner/repo'")
|
||||
}
|
||||
}
|
||||
|
||||
// Generate a URL from vcs-origin (e.g., github.com/npm/repo -> https://github.com/npm/repo)
|
||||
getVcsOriginUrl (vcsOrigin) {
|
||||
if (!vcsOrigin) {
|
||||
return null
|
||||
}
|
||||
// vcs-origin format: github.com/owner/repo or bitbucket.org/owner/repo
|
||||
return `https://${vcsOrigin}`
|
||||
}
|
||||
|
||||
static optionsToBody (options) {
|
||||
const { orgId, projectId, pipelineDefinitionId, vcsOrigin, contextIds } = options
|
||||
const trustConfig = {
|
||||
type: 'circleci',
|
||||
claims: {
|
||||
'oidc.circleci.com/org-id': orgId,
|
||||
'oidc.circleci.com/project-id': projectId,
|
||||
'oidc.circleci.com/pipeline-definition-id': pipelineDefinitionId,
|
||||
'oidc.circleci.com/vcs-origin': vcsOrigin,
|
||||
},
|
||||
}
|
||||
if (contextIds && contextIds.length > 0) {
|
||||
trustConfig.claims['oidc.circleci.com/context-ids'] = contextIds
|
||||
}
|
||||
return trustConfig
|
||||
}
|
||||
|
||||
static bodyToOptions (body) {
|
||||
return {
|
||||
...(body.id) && { id: body.id },
|
||||
...(body.type) && { type: body.type },
|
||||
...(body.claims?.['oidc.circleci.com/org-id']) && { orgId: body.claims['oidc.circleci.com/org-id'] },
|
||||
...(body.claims?.['oidc.circleci.com/project-id']) && { projectId: body.claims['oidc.circleci.com/project-id'] },
|
||||
...(body.claims?.['oidc.circleci.com/pipeline-definition-id']) && {
|
||||
pipelineDefinitionId: body.claims['oidc.circleci.com/pipeline-definition-id'],
|
||||
},
|
||||
...(body.claims?.['oidc.circleci.com/vcs-origin']) && { vcsOrigin: body.claims['oidc.circleci.com/vcs-origin'] },
|
||||
...(body.claims?.['oidc.circleci.com/context-ids']) && { contextIds: body.claims['oidc.circleci.com/context-ids'] },
|
||||
}
|
||||
}
|
||||
|
||||
// Override flagsToOptions since CircleCI doesn't use file/entity pattern
|
||||
async flagsToOptions ({ positionalArgs, flags }) {
|
||||
const content = await this.optionalPkgJson()
|
||||
const pkgName = positionalArgs[0] || content.name
|
||||
|
||||
if (!pkgName) {
|
||||
throw new Error('Package name must be specified either as an argument or in package.json file')
|
||||
}
|
||||
|
||||
const orgId = flags['org-id']
|
||||
const projectId = flags['project-id']
|
||||
const pipelineDefinitionId = flags['pipeline-definition-id']
|
||||
const vcsOrigin = flags['vcs-origin']
|
||||
const contextIds = flags['context-id']
|
||||
|
||||
// Validate required flags
|
||||
if (!orgId) {
|
||||
throw new Error('org-id is required')
|
||||
}
|
||||
if (!projectId) {
|
||||
throw new Error('project-id is required')
|
||||
}
|
||||
if (!pipelineDefinitionId) {
|
||||
throw new Error('pipeline-definition-id is required')
|
||||
}
|
||||
if (!vcsOrigin) {
|
||||
throw new Error('vcs-origin is required')
|
||||
}
|
||||
|
||||
// Validate formats
|
||||
this.validateUuid(orgId, 'org-id')
|
||||
this.validateUuid(projectId, 'project-id')
|
||||
this.validateUuid(pipelineDefinitionId, 'pipeline-definition-id')
|
||||
this.validateVcsOrigin(vcsOrigin)
|
||||
if (contextIds?.length > 0) {
|
||||
for (const contextId of contextIds) {
|
||||
this.validateUuid(contextId, 'context-id')
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
values: {
|
||||
package: pkgName,
|
||||
orgId,
|
||||
projectId,
|
||||
pipelineDefinitionId,
|
||||
vcsOrigin,
|
||||
...(contextIds?.length > 0 && { contextIds }),
|
||||
},
|
||||
fromPackageJson: {},
|
||||
warnings: [],
|
||||
urls: {
|
||||
package: this.getFrontendUrl({ pkgName }),
|
||||
vcsOrigin: this.getVcsOriginUrl(vcsOrigin),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
async exec (positionalArgs, flags) {
|
||||
await this.createConfigCommand({
|
||||
positionalArgs,
|
||||
flags,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = TrustCircleCI
|
||||
Vendored
+1
@@ -7,6 +7,7 @@ class Trust extends BaseCommand {
|
||||
static subcommands = {
|
||||
github: require('./github.js'),
|
||||
gitlab: require('./gitlab.js'),
|
||||
circleci: require('./circleci.js'),
|
||||
list: require('./list.js'),
|
||||
revoke: require('./revoke.js'),
|
||||
}
|
||||
|
||||
Vendored
+4
-1
@@ -1,6 +1,7 @@
|
||||
const { otplease } = require('../../utils/auth.js')
|
||||
const npmFetch = require('npm-registry-fetch')
|
||||
const npa = require('npm-package-arg')
|
||||
const TrustCircleCI = require('./circleci.js')
|
||||
const TrustGithub = require('./github.js')
|
||||
const TrustGitlab = require('./gitlab.js')
|
||||
const TrustCommand = require('../../trust-cmd.js')
|
||||
@@ -21,7 +22,9 @@ class TrustList extends TrustCommand {
|
||||
]
|
||||
|
||||
static bodyToOptions (body) {
|
||||
if (body.type === 'github') {
|
||||
if (body.type === 'circleci') {
|
||||
return TrustCircleCI.bodyToOptions(body)
|
||||
} else if (body.type === 'github') {
|
||||
return TrustGithub.bodyToOptions(body)
|
||||
} else if (body.type === 'gitlab') {
|
||||
return TrustGitlab.bodyToOptions(body)
|
||||
|
||||
Vendored
+2
-1
@@ -55,6 +55,7 @@ class TrustCommand extends BaseCommand {
|
||||
|
||||
const json = this.config.get('json')
|
||||
if (json) {
|
||||
// Disable redaction: trust config values (e.g. CircleCI UUIDs) are not secrets
|
||||
output.standard(JSON.stringify(options.values, null, 2), { [META]: true, redact: false })
|
||||
return
|
||||
}
|
||||
@@ -95,7 +96,7 @@ class TrustCommand extends BaseCommand {
|
||||
}
|
||||
if (urlLines.length > 0) {
|
||||
output.standard()
|
||||
output.standard(urlLines.join('\n'))
|
||||
output.standard(urlLines.join('\n'), { [META]: true, redact: false })
|
||||
}
|
||||
}
|
||||
if (pad) {
|
||||
|
||||
Vendored
+8
-4
@@ -8,8 +8,8 @@ const libaccess = require('libnpmaccess')
|
||||
/**
|
||||
* Handles OpenID Connect (OIDC) token retrieval and exchange for CI environments.
|
||||
*
|
||||
* This function is designed to work in Continuous Integration (CI) environments such as GitHub Actions
|
||||
* and GitLab. It retrieves an OIDC token from the CI environment, exchanges it for an npm token, and
|
||||
* This function is designed to work in Continuous Integration (CI) environments such as GitHub Actions,
|
||||
* GitLab, and CircleCI. It retrieves an OIDC token from the CI environment, exchanges it for an npm token, and
|
||||
* sets the token in the provided configuration for authentication with the npm registry.
|
||||
*
|
||||
* This function is intended to never throw, as it mutates the state of the `opts` and `config` objects on success.
|
||||
@@ -17,6 +17,7 @@ const libaccess = require('libnpmaccess')
|
||||
*
|
||||
* @see https://github.com/watson/ci-info for CI environment detection.
|
||||
* @see https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect for GitHub Actions OIDC.
|
||||
* @see https://circleci.com/docs/openid-connect-tokens/ for CircleCI OIDC.
|
||||
*/
|
||||
async function oidc ({ packageName, registry, opts, config }) {
|
||||
/*
|
||||
@@ -29,7 +30,9 @@ async function oidc ({ packageName, registry, opts, config }) {
|
||||
/** @see https://github.com/watson/ci-info/blob/v4.2.0/vendors.json#L152 */
|
||||
ciInfo.GITHUB_ACTIONS ||
|
||||
/** @see https://github.com/watson/ci-info/blob/v4.2.0/vendors.json#L161C13-L161C22 */
|
||||
ciInfo.GITLAB
|
||||
ciInfo.GITLAB ||
|
||||
/** @see https://github.com/watson/ci-info/blob/v4.2.0/vendors.json#L78 */
|
||||
ciInfo.CIRCLE
|
||||
)) {
|
||||
return undefined
|
||||
}
|
||||
@@ -143,7 +146,8 @@ async function oidc ({ packageName, registry, opts, config }) {
|
||||
|
||||
try {
|
||||
const isDefaultProvenance = config.isDefault('provenance')
|
||||
if (isDefaultProvenance) {
|
||||
// CircleCI doesn't support provenance yet, so skip the auto-enable logic
|
||||
if (isDefaultProvenance && !ciInfo.CIRCLE) {
|
||||
const [headerB64, payloadB64] = idToken.split('.')
|
||||
if (headerB64 && payloadB64) {
|
||||
const payloadJson = Buffer.from(payloadB64, 'base64').toString('utf8')
|
||||
|
||||
Vendored
+13
-8
@@ -84,15 +84,20 @@ const toCyclonedxItem = (node, { packageType }) => {
|
||||
node.package = toNormalize.content
|
||||
}
|
||||
|
||||
let license = node.package?.license
|
||||
if (license) {
|
||||
if (typeof license === 'object') {
|
||||
license = license.type
|
||||
}
|
||||
} else if (Array.isArray(node.package?.licenses)) {
|
||||
license = node.package.licenses
|
||||
.map(l => (typeof l === 'object' ? l.type : l))
|
||||
.filter(Boolean)
|
||||
.join(' OR ')
|
||||
}
|
||||
|
||||
let parsedLicense
|
||||
try {
|
||||
let license = node.package?.license
|
||||
if (license) {
|
||||
if (typeof license === 'object') {
|
||||
license = license.type
|
||||
}
|
||||
}
|
||||
|
||||
parsedLicense = parseLicense(license)
|
||||
} catch {
|
||||
parsedLicense = null
|
||||
@@ -158,7 +163,7 @@ const toCyclonedxItem = (node, { packageType }) => {
|
||||
component.licenses = [{ license: { id: parsedLicense.license } }]
|
||||
// If license is a conjunction, use the expression field
|
||||
} else if (parsedLicense?.conjunction) {
|
||||
component.licenses = [{ expression: node.package.license }]
|
||||
component.licenses = [{ expression: license }]
|
||||
}
|
||||
|
||||
return component
|
||||
|
||||
Vendored
+5
@@ -110,6 +110,11 @@ const toSpdxItem = (node, { packageType }) => {
|
||||
if (typeof license === 'object') {
|
||||
license = license.type
|
||||
}
|
||||
} else if (Array.isArray(node.package?.licenses)) {
|
||||
license = node.package.licenses
|
||||
.map(l => (typeof l === 'object' ? l.type : l))
|
||||
.filter(Boolean)
|
||||
.join(' OR ')
|
||||
}
|
||||
|
||||
const pkg = {
|
||||
|
||||
Loaded 100 of 257 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user