mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 18:25:13 +08:00
deps: upgrade npm to 11.8.0
PR-URL: https://github.com/nodejs/node/pull/61466 Reviewed-By: Jordan Harband <ljharb@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
This commit is contained in:
1 parent
01ff6ce68a
commit
44bd0303a5
321 files changed
+1961
-5185
No files matched your search
+1
-1
@@ -48,7 +48,7 @@ a
|
||||
```
|
||||
|
||||
During the installation process, the `c@1.0.3` dependency for `b` was placed in the root of the tree.
|
||||
Though `d`'s dependency on `c@1.x` could have been satisfied by `c@1.0.3`, the newer `c@1.9.0` dependency was used, because npm favors updates by default, even when doing so causes duplication.
|
||||
Though `d`'s dependency on `c@1.x` could have been satisfied by `c@1.0.3`, the newer `c@1.9.9` dependency was used, because npm favors updates by default, even when doing so causes duplication.
|
||||
|
||||
Running `npm dedupe` will cause npm to note the duplication and re-evaluate, deleting the nested `c` module, because the one in the root is sufficient.
|
||||
|
||||
|
||||
+12
@@ -23,6 +23,18 @@ If the package has a package-lock, or an npm shrinkwrap file, or a yarn lock fil
|
||||
|
||||
See [package-lock.json](/configuring-npm/package-lock-json) and [`npm shrinkwrap`](/commands/npm-shrinkwrap).
|
||||
|
||||
#### How `npm install` uses `package-lock.json`
|
||||
|
||||
When you run `npm install` without arguments, npm compares `package.json` and `package-lock.json`:
|
||||
|
||||
* **If the lockfile's resolved versions satisfy the `package.json` ranges:** npm uses the exact versions from `package-lock.json` to ensure reproducible builds across environments.
|
||||
|
||||
* **If the ranges don't match:** npm resolves new versions that satisfy the `package.json` ranges and updates `package-lock.json` accordingly. This happens when you modify version ranges in `package.json` (e.g., changing `^7.0.0` to `^8.0.0`). Note that changing a range within the same major version (e.g., `^7.0.0` to `^7.1.0`) will only update the metadata in the lockfile if the currently installed version still satisfies the new range.
|
||||
|
||||
In essence, `package-lock.json` locks your dependencies to specific versions, but `package.json` is the source of truth for acceptable version ranges. When the lockfile's versions satisfy the `package.json` ranges, the lockfile wins. When they conflict, `package.json` wins and the lockfile is updated.
|
||||
|
||||
If you want to install packages while ensuring that `package.json` is not modified and that both files are strictly in sync, use [`npm ci`](/commands/npm-ci) instead.
|
||||
|
||||
A `package` is:
|
||||
|
||||
* a) a folder containing a program described by a [`package.json`](/configuring-npm/package-json) file
|
||||
|
||||
+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.7.0 /path/to/npm
|
||||
npm@11.8.0 /path/to/npm
|
||||
└─┬ init-package-json@0.0.4
|
||||
└── promzard@0.1.5
|
||||
```
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ Note: This command is unaware of workspaces.
|
||||
|
||||
### Version
|
||||
|
||||
11.7.0
|
||||
11.8.0
|
||||
|
||||
### Description
|
||||
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-access----1170">
|
||||
<h1 id="----npm-access----1180">
|
||||
<span>npm-access</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Set access level on published packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-adduser----1170">
|
||||
<h1 id="----npm-adduser----1180">
|
||||
<span>npm-adduser</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Add a registry user account</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-audit----1170">
|
||||
<h1 id="----npm-audit----1180">
|
||||
<span>npm-audit</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Run a security audit</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-bugs----1170">
|
||||
<h1 id="----npm-bugs----1180">
|
||||
<span>npm-bugs</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Report bugs for a package in a web browser</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-cache----1170">
|
||||
<h1 id="----npm-cache----1180">
|
||||
<span>npm-cache</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Manipulates packages cache</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-ci----1170">
|
||||
<h1 id="----npm-ci----1180">
|
||||
<span>npm-ci</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Clean install a project</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-completion----1170">
|
||||
<h1 id="----npm-completion----1180">
|
||||
<span>npm-completion</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Tab Completion for npm</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-config----1170">
|
||||
<h1 id="----npm-config----1180">
|
||||
<span>npm-config</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Manage the npm configuration files</span>
|
||||
</header>
|
||||
|
||||
+3
-3
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-dedupe----1170">
|
||||
<h1 id="----npm-dedupe----1180">
|
||||
<span>npm-dedupe</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Reduce duplication in the package tree</span>
|
||||
</header>
|
||||
@@ -182,7 +182,7 @@ alias: ddp
|
||||
`-- c@1.9.9
|
||||
</code></pre>
|
||||
<p>During the installation process, the <code>c@1.0.3</code> dependency for <code>b</code> was placed in the root of the tree.
|
||||
Though <code>d</code>'s dependency on <code>c@1.x</code> could have been satisfied by <code>c@1.0.3</code>, the newer <code>c@1.9.0</code> dependency was used, because npm favors updates by default, even when doing so causes duplication.</p>
|
||||
Though <code>d</code>'s dependency on <code>c@1.x</code> could have been satisfied by <code>c@1.0.3</code>, the newer <code>c@1.9.9</code> dependency was used, because npm favors updates by default, even when doing so causes duplication.</p>
|
||||
<p>Running <code>npm dedupe</code> will cause npm to note the duplication and re-evaluate, deleting the nested <code>c</code> module, because the one in the root is sufficient.</p>
|
||||
<p>To prefer deduplication over novelty during the installation process, run <code>npm install --prefer-dedupe</code> or <code>npm config set prefer-dedupe true</code>.</p>
|
||||
<p>Arguments are ignored.
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-deprecate----1170">
|
||||
<h1 id="----npm-deprecate----1180">
|
||||
<span>npm-deprecate</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Deprecate a version of a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-diff----1170">
|
||||
<h1 id="----npm-diff----1180">
|
||||
<span>npm-diff</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">The registry diff command</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-dist-tag----1170">
|
||||
<h1 id="----npm-dist-tag----1180">
|
||||
<span>npm-dist-tag</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Modify package distribution tags</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-docs----1170">
|
||||
<h1 id="----npm-docs----1180">
|
||||
<span>npm-docs</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Open documentation for a package in a web browser</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-doctor----1170">
|
||||
<h1 id="----npm-doctor----1180">
|
||||
<span>npm-doctor</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Check the health of your npm environment</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-edit----1170">
|
||||
<h1 id="----npm-edit----1180">
|
||||
<span>npm-edit</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Edit an installed package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-exec----1170">
|
||||
<h1 id="----npm-exec----1180">
|
||||
<span>npm-exec</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Run a command from a local or remote npm package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-explain----1170">
|
||||
<h1 id="----npm-explain----1180">
|
||||
<span>npm-explain</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Explain installed packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-explore----1170">
|
||||
<h1 id="----npm-explore----1180">
|
||||
<span>npm-explore</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Browse an installed package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-find-dupes----1170">
|
||||
<h1 id="----npm-find-dupes----1180">
|
||||
<span>npm-find-dupes</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Find duplication in the package tree</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-fund----1170">
|
||||
<h1 id="----npm-fund----1180">
|
||||
<span>npm-fund</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Retrieve funding information</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-help-search----1170">
|
||||
<h1 id="----npm-help-search----1180">
|
||||
<span>npm-help-search</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Search npm help documentation</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-help----1170">
|
||||
<h1 id="----npm-help----1180">
|
||||
<span>npm-help</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Get help on npm</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-init----1170">
|
||||
<h1 id="----npm-init----1180">
|
||||
<span>npm-init</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Create a package.json file</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-install-ci-test----1170">
|
||||
<h1 id="----npm-install-ci-test----1180">
|
||||
<span>npm-install-ci-test</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Install a project with a clean slate and run tests</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-install-test----1170">
|
||||
<h1 id="----npm-install-test----1180">
|
||||
<span>npm-install-test</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Install package(s) and run tests</span>
|
||||
</header>
|
||||
|
||||
+15
-3
@@ -141,16 +141,16 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-install----1170">
|
||||
<h1 id="----npm-install----1180">
|
||||
<span>npm-install</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Install a package</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="#description">Description</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#save"><code>save</code></a></li><li><a href="#save-exact"><code>save-exact</code></a></li><li><a href="#global"><code>global</code></a></li><li><a href="#install-strategy"><code>install-strategy</code></a></li><li><a href="#legacy-bundling"><code>legacy-bundling</code></a></li><li><a href="#global-style"><code>global-style</code></a></li><li><a href="#omit"><code>omit</code></a></li><li><a href="#include"><code>include</code></a></li><li><a href="#strict-peer-deps"><code>strict-peer-deps</code></a></li><li><a href="#prefer-dedupe"><code>prefer-dedupe</code></a></li><li><a href="#package-lock"><code>package-lock</code></a></li><li><a href="#package-lock-only"><code>package-lock-only</code></a></li><li><a href="#foreground-scripts"><code>foreground-scripts</code></a></li><li><a href="#ignore-scripts"><code>ignore-scripts</code></a></li><li><a href="#audit"><code>audit</code></a></li><li><a href="#before"><code>before</code></a></li><li><a href="#bin-links"><code>bin-links</code></a></li><li><a href="#fund"><code>fund</code></a></li><li><a href="#dry-run"><code>dry-run</code></a></li><li><a href="#cpu"><code>cpu</code></a></li><li><a href="#os"><code>os</code></a></li><li><a href="#libc"><code>libc</code></a></li><li><a href="#workspace"><code>workspace</code></a></li><li><a href="#workspaces"><code>workspaces</code></a></li><li><a href="#include-workspace-root"><code>include-workspace-root</code></a></li><li><a href="#install-links"><code>install-links</code></a></li></ul><li><a href="#algorithm">Algorithm</a></li><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="#description">Description</a></li><ul><li><a href="#how-npm-install-uses-package-lockjson">How <code>npm install</code> uses <code>package-lock.json</code></a></li></ul><li><a href="#configuration">Configuration</a></li><ul><li><a href="#save"><code>save</code></a></li><li><a href="#save-exact"><code>save-exact</code></a></li><li><a href="#global"><code>global</code></a></li><li><a href="#install-strategy"><code>install-strategy</code></a></li><li><a href="#legacy-bundling"><code>legacy-bundling</code></a></li><li><a href="#global-style"><code>global-style</code></a></li><li><a href="#omit"><code>omit</code></a></li><li><a href="#include"><code>include</code></a></li><li><a href="#strict-peer-deps"><code>strict-peer-deps</code></a></li><li><a href="#prefer-dedupe"><code>prefer-dedupe</code></a></li><li><a href="#package-lock"><code>package-lock</code></a></li><li><a href="#package-lock-only"><code>package-lock-only</code></a></li><li><a href="#foreground-scripts"><code>foreground-scripts</code></a></li><li><a href="#ignore-scripts"><code>ignore-scripts</code></a></li><li><a href="#audit"><code>audit</code></a></li><li><a href="#before"><code>before</code></a></li><li><a href="#bin-links"><code>bin-links</code></a></li><li><a href="#fund"><code>fund</code></a></li><li><a href="#dry-run"><code>dry-run</code></a></li><li><a href="#cpu"><code>cpu</code></a></li><li><a href="#os"><code>os</code></a></li><li><a href="#libc"><code>libc</code></a></li><li><a href="#workspace"><code>workspace</code></a></li><li><a href="#workspaces"><code>workspaces</code></a></li><li><a href="#include-workspace-root"><code>include-workspace-root</code></a></li><li><a href="#install-links"><code>install-links</code></a></li></ul><li><a href="#algorithm">Algorithm</a></li><li><a href="#see-also">See Also</a></li></ul></div>
|
||||
</section>
|
||||
|
||||
<div id="_content"><h3 id="synopsis">Synopsis</h3>
|
||||
@@ -167,6 +167,18 @@ If the package has a package-lock, or an npm shrinkwrap file, or a yarn lock fil
|
||||
<li><code>yarn.lock</code></li>
|
||||
</ul>
|
||||
<p>See <a href="../configuring-npm/package-lock-json.html">package-lock.json</a> and <a href="../commands/npm-shrinkwrap.html"><code>npm shrinkwrap</code></a>.</p>
|
||||
<h4 id="how-npm-install-uses-package-lockjson">How <code>npm install</code> uses <code>package-lock.json</code></h4>
|
||||
<p>When you run <code>npm install</code> without arguments, npm compares <code>package.json</code> and <code>package-lock.json</code>:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><strong>If the lockfile's resolved versions satisfy the <code>package.json</code> ranges:</strong> npm uses the exact versions from <code>package-lock.json</code> to ensure reproducible builds across environments.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>If the ranges don't match:</strong> npm resolves new versions that satisfy the <code>package.json</code> ranges and updates <code>package-lock.json</code> accordingly. This happens when you modify version ranges in <code>package.json</code> (e.g., changing <code>^7.0.0</code> to <code>^8.0.0</code>). Note that changing a range within the same major version (e.g., <code>^7.0.0</code> to <code>^7.1.0</code>) will only update the metadata in the lockfile if the currently installed version still satisfies the new range.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>In essence, <code>package-lock.json</code> locks your dependencies to specific versions, but <code>package.json</code> is the source of truth for acceptable version ranges. When the lockfile's versions satisfy the <code>package.json</code> ranges, the lockfile wins. When they conflict, <code>package.json</code> wins and the lockfile is updated.</p>
|
||||
<p>If you want to install packages while ensuring that <code>package.json</code> is not modified and that both files are strictly in sync, use <a href="../commands/npm-ci.html"><code>npm ci</code></a> instead.</p>
|
||||
<p>A <code>package</code> is:</p>
|
||||
<ul>
|
||||
<li>a) a folder containing a program described by a <a href="../configuring-npm/package-json.html"><code>package.json</code></a> file</li>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-link----1170">
|
||||
<h1 id="----npm-link----1180">
|
||||
<span>npm-link</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Symlink a package folder</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-login----1170">
|
||||
<h1 id="----npm-login----1180">
|
||||
<span>npm-login</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Login to a registry user account</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-logout----1170">
|
||||
<h1 id="----npm-logout----1180">
|
||||
<span>npm-logout</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Log out of the registry</span>
|
||||
</header>
|
||||
|
||||
+3
-3
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-ls----1170">
|
||||
<h1 id="----npm-ls----1180">
|
||||
<span>npm-ls</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">List installed packages</span>
|
||||
</header>
|
||||
@@ -164,7 +164,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.7.0 /path/to/npm
|
||||
<pre><code class="language-bash">npm@11.8.0 /path/to/npm
|
||||
└─┬ init-package-json@0.0.4
|
||||
└── promzard@0.1.5
|
||||
</code></pre>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-org----1170">
|
||||
<h1 id="----npm-org----1180">
|
||||
<span>npm-org</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Manage orgs</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-outdated----1170">
|
||||
<h1 id="----npm-outdated----1180">
|
||||
<span>npm-outdated</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Check for outdated packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-owner----1170">
|
||||
<h1 id="----npm-owner----1180">
|
||||
<span>npm-owner</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Manage package owners</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-pack----1170">
|
||||
<h1 id="----npm-pack----1180">
|
||||
<span>npm-pack</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Create a tarball from a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-ping----1170">
|
||||
<h1 id="----npm-ping----1180">
|
||||
<span>npm-ping</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Ping npm registry</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-pkg----1170">
|
||||
<h1 id="----npm-pkg----1180">
|
||||
<span>npm-pkg</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Manages your package.json</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-prefix----1170">
|
||||
<h1 id="----npm-prefix----1180">
|
||||
<span>npm-prefix</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Display prefix</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-profile----1170">
|
||||
<h1 id="----npm-profile----1180">
|
||||
<span>npm-profile</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Change settings on your registry profile</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-prune----1170">
|
||||
<h1 id="----npm-prune----1180">
|
||||
<span>npm-prune</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Remove extraneous packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-publish----1170">
|
||||
<h1 id="----npm-publish----1180">
|
||||
<span>npm-publish</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Publish a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-query----1170">
|
||||
<h1 id="----npm-query----1180">
|
||||
<span>npm-query</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Dependency selector query</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-rebuild----1170">
|
||||
<h1 id="----npm-rebuild----1180">
|
||||
<span>npm-rebuild</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Rebuild a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-repo----1170">
|
||||
<h1 id="----npm-repo----1180">
|
||||
<span>npm-repo</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Open package repository page in the browser</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-restart----1170">
|
||||
<h1 id="----npm-restart----1180">
|
||||
<span>npm-restart</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Restart a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-root----1170">
|
||||
<h1 id="----npm-root----1180">
|
||||
<span>npm-root</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Display npm root</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-run----1170">
|
||||
<h1 id="----npm-run----1180">
|
||||
<span>npm-run</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Run arbitrary package scripts</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-sbom----1170">
|
||||
<h1 id="----npm-sbom----1180">
|
||||
<span>npm-sbom</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Generate a Software Bill of Materials (SBOM)</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-search----1170">
|
||||
<h1 id="----npm-search----1180">
|
||||
<span>npm-search</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Search for packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-shrinkwrap----1170">
|
||||
<h1 id="----npm-shrinkwrap----1180">
|
||||
<span>npm-shrinkwrap</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Lock down dependency versions for publication</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-star----1170">
|
||||
<h1 id="----npm-star----1180">
|
||||
<span>npm-star</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Mark your favorite packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-stars----1170">
|
||||
<h1 id="----npm-stars----1180">
|
||||
<span>npm-stars</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">View packages marked as favorites</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-start----1170">
|
||||
<h1 id="----npm-start----1180">
|
||||
<span>npm-start</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Start a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-stop----1170">
|
||||
<h1 id="----npm-stop----1180">
|
||||
<span>npm-stop</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Stop a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-team----1170">
|
||||
<h1 id="----npm-team----1180">
|
||||
<span>npm-team</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Manage organization teams and team memberships</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-test----1170">
|
||||
<h1 id="----npm-test----1180">
|
||||
<span>npm-test</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Test a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-token----1170">
|
||||
<h1 id="----npm-token----1180">
|
||||
<span>npm-token</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Manage your authentication tokens</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-undeprecate----1170">
|
||||
<h1 id="----npm-undeprecate----1180">
|
||||
<span>npm-undeprecate</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Undeprecate a version of a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-uninstall----1170">
|
||||
<h1 id="----npm-uninstall----1180">
|
||||
<span>npm-uninstall</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Remove a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-unpublish----1170">
|
||||
<h1 id="----npm-unpublish----1180">
|
||||
<span>npm-unpublish</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Remove a package from the registry</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-unstar----1170">
|
||||
<h1 id="----npm-unstar----1180">
|
||||
<span>npm-unstar</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Remove an item from your favorite packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-update----1170">
|
||||
<h1 id="----npm-update----1180">
|
||||
<span>npm-update</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Update packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-version----1170">
|
||||
<h1 id="----npm-version----1180">
|
||||
<span>npm-version</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Bump a package version</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-view----1170">
|
||||
<h1 id="----npm-view----1180">
|
||||
<span>npm-view</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">View registry info</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-whoami----1170">
|
||||
<h1 id="----npm-whoami----1180">
|
||||
<span>npm-whoami</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Display npm username</span>
|
||||
</header>
|
||||
|
||||
+3
-3
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm----1170">
|
||||
<h1 id="----npm----1180">
|
||||
<span>npm</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">javascript package manager</span>
|
||||
</header>
|
||||
@@ -158,7 +158,7 @@ npm command-line interface
|
||||
</code></pre>
|
||||
<p>Note: This command is unaware of workspaces.</p>
|
||||
<h3 id="version">Version</h3>
|
||||
<p>11.7.0</p>
|
||||
<p>11.8.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
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npx----1170">
|
||||
<h1 id="----npx----1180">
|
||||
<span>npx</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Run a command from a local or remote npm package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----folders----1170">
|
||||
<h1 id="----folders----1180">
|
||||
<span>folders</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Folder Structures Used by npm</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----install----1170">
|
||||
<h1 id="----install----1180">
|
||||
<span>install</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Download and install node and npm</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----folders----1170">
|
||||
<h1 id="----folders----1180">
|
||||
<span>folders</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Folder Structures Used by npm</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----packagejson----1170">
|
||||
<h1 id="----packagejson----1180">
|
||||
<span>package.json</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Specifics of npm's package.json handling</span>
|
||||
</header>
|
||||
|
||||
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-shrinkwrapjson----1170">
|
||||
<h1 id="----npm-shrinkwrapjson----1180">
|
||||
<span>npm-shrinkwrap.json</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">A publishable lockfile</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npmrc----1170">
|
||||
<h1 id="----npmrc----1180">
|
||||
<span>npmrc</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">The npm config files</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----packagejson----1170">
|
||||
<h1 id="----packagejson----1180">
|
||||
<span>package.json</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Specifics of npm's package.json handling</span>
|
||||
</header>
|
||||
|
||||
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----package-lockjson----1170">
|
||||
<h1 id="----package-lockjson----1180">
|
||||
<span>package-lock.json</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">A manifestation of the manifest</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----config----1170">
|
||||
<h1 id="----config----1180">
|
||||
<span>config</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">More than you probably want to know about npm configuration</span>
|
||||
</header>
|
||||
|
||||
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----dependency-selector-syntax--querying----1170">
|
||||
<h1 id="----dependency-selector-syntax--querying----1180">
|
||||
<span>Dependency Selector Syntax & Querying</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Dependency Selector Syntax & Querying</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----developers----1170">
|
||||
<h1 id="----developers----1180">
|
||||
<span>developers</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Developer Guide</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----logging----1170">
|
||||
<h1 id="----logging----1180">
|
||||
<span>Logging</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Why, What & How We Log</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----orgs----1170">
|
||||
<h1 id="----orgs----1180">
|
||||
<span>orgs</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Working with Teams & Orgs</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----package-spec----1170">
|
||||
<h1 id="----package-spec----1180">
|
||||
<span>package-spec</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Package name specifier</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----registry----1170">
|
||||
<h1 id="----registry----1180">
|
||||
<span>registry</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">The JavaScript Package Registry</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----removal----1170">
|
||||
<h1 id="----removal----1180">
|
||||
<span>removal</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Cleaning the Slate</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----scope----1170">
|
||||
<h1 id="----scope----1180">
|
||||
<span>scope</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Scoped packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----scripts----1170">
|
||||
<h1 id="----scripts----1180">
|
||||
<span>scripts</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">How npm handles the "scripts" field</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----workspaces----1170">
|
||||
<h1 id="----workspaces----1180">
|
||||
<span>workspaces</span>
|
||||
<span class="version">@11.7.0</span>
|
||||
<span class="version">@11.8.0</span>
|
||||
</h1>
|
||||
<span class="description">Working with workspaces</span>
|
||||
</header>
|
||||
|
||||
Vendored
+18
-1
@@ -4,7 +4,7 @@ const { spawn } = require('node:child_process')
|
||||
const { EOL } = require('node:os')
|
||||
const localeCompare = require('@isaacs/string-locale-compare')('en')
|
||||
const pkgJson = require('@npmcli/package-json')
|
||||
const { defaults, definitions, nerfDarts } = require('@npmcli/config/lib/definitions')
|
||||
const { defaults, definitions, nerfDarts, proxyEnv } = require('@npmcli/config/lib/definitions')
|
||||
const { log, output } = require('proc-log')
|
||||
const BaseCommand = require('../base-cmd.js')
|
||||
const { redact } = require('@npmcli/redact')
|
||||
@@ -350,6 +350,23 @@ ${defData}
|
||||
}
|
||||
|
||||
if (!long) {
|
||||
const envVars = []
|
||||
|
||||
const foundEnvVars = new Set()
|
||||
for (const key of Object.keys(process.env)) {
|
||||
const lowerKey = key.toLowerCase()
|
||||
if (proxyEnv.includes(lowerKey) && !foundEnvVars.has(lowerKey)) {
|
||||
foundEnvVars.add(lowerKey)
|
||||
envVars.push(`; ${key} = ${JSON.stringify(process.env[key])}`)
|
||||
}
|
||||
}
|
||||
|
||||
if (envVars.length > 0) {
|
||||
msg.push('; environment-related config', '')
|
||||
msg.push(...envVars)
|
||||
msg.push('')
|
||||
}
|
||||
|
||||
msg.push(
|
||||
`; node bin location = ${process.execPath}`,
|
||||
`; node version = ${process.version}`,
|
||||
|
||||
Vendored
+2
-2
@@ -1,6 +1,6 @@
|
||||
const localeCompare = require('@isaacs/string-locale-compare')('en')
|
||||
const BaseCommand = require('../base-cmd.js')
|
||||
const { log, output } = require('proc-log')
|
||||
const { log, output, META } = require('proc-log')
|
||||
const { cyclonedxOutput } = require('../utils/sbom-cyclonedx.js')
|
||||
const { spdxOutput } = require('../utils/sbom-spdx.js')
|
||||
|
||||
@@ -65,7 +65,7 @@ class SBOM extends BaseCommand {
|
||||
// TODO(BREAKING_CHANGE): all sbom output is in json mode but setting it before
|
||||
// any of the errors will cause those to be thrown in json mode.
|
||||
this.npm.config.set('json', true)
|
||||
output.buffer(this.#response)
|
||||
output.standard(JSON.stringify(this.#response, null, 2), { [META]: true, redact: false })
|
||||
}
|
||||
|
||||
async execWorkspaces (args) {
|
||||
|
||||
Vendored
+2
-2
@@ -13,12 +13,12 @@ const formatBytes = (bytes, space = true) => {
|
||||
return `${bytes}${spacer}B`
|
||||
}
|
||||
|
||||
if (bytes < 1000000) {
|
||||
if (bytes < 999950) {
|
||||
// kB
|
||||
return `${(bytes / 1000).toFixed(1)}${spacer}kB`
|
||||
}
|
||||
|
||||
if (bytes < 1000000000) {
|
||||
if (bytes < 999950000) {
|
||||
// MB
|
||||
return `${(bytes / 1000000).toFixed(1)}${spacer}MB`
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM-ACCESS" "1" "December 2025" "NPM@11.7.0" ""
|
||||
.TH "NPM-ACCESS" "1" "January 2026" "NPM@11.8.0" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-access\fR - Set access level on published packages
|
||||
.SS "Synopsis"
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM-ADDUSER" "1" "December 2025" "NPM@11.7.0" ""
|
||||
.TH "NPM-ADDUSER" "1" "January 2026" "NPM@11.8.0" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-adduser\fR - Add a registry user account
|
||||
.SS "Synopsis"
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM-AUDIT" "1" "December 2025" "NPM@11.7.0" ""
|
||||
.TH "NPM-AUDIT" "1" "January 2026" "NPM@11.8.0" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-audit\fR - Run a security audit
|
||||
.SS "Synopsis"
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM-BUGS" "1" "December 2025" "NPM@11.7.0" ""
|
||||
.TH "NPM-BUGS" "1" "January 2026" "NPM@11.8.0" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-bugs\fR - Report bugs for a package in a web browser
|
||||
.SS "Synopsis"
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM-CACHE" "1" "December 2025" "NPM@11.7.0" ""
|
||||
.TH "NPM-CACHE" "1" "January 2026" "NPM@11.8.0" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-cache\fR - Manipulates packages cache
|
||||
.SS "Synopsis"
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM-CI" "1" "December 2025" "NPM@11.7.0" ""
|
||||
.TH "NPM-CI" "1" "January 2026" "NPM@11.8.0" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-ci\fR - Clean install a project
|
||||
.SS "Synopsis"
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM-COMPLETION" "1" "December 2025" "NPM@11.7.0" ""
|
||||
.TH "NPM-COMPLETION" "1" "January 2026" "NPM@11.8.0" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-completion\fR - Tab Completion for npm
|
||||
.SS "Synopsis"
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM-CONFIG" "1" "December 2025" "NPM@11.7.0" ""
|
||||
.TH "NPM-CONFIG" "1" "January 2026" "NPM@11.8.0" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-config\fR - Manage the npm configuration files
|
||||
.SS "Synopsis"
|
||||
|
||||
Loaded 100 of 321 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user