deps: upgrade npm to 11.2.0

PR-URL: https://github.com/nodejs/node/pull/57334
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
npm CLI robot authored and RafaelGSS committed 2025-05-02 17:05:13 -03:00
1 parent 89be0f3694
commit c3927aa558
304 files changed
+4208 -2541

No files matched your search

+30 -32
View File
@@ -11,59 +11,56 @@ npm cache add <package-spec>
npm cache clean [<key>]
npm cache ls [<name>@<version>]
npm cache verify
npm cache npx ls
npm cache npx rm [<key>...]
npm cache npx info <key>...
```
Note: This command is unaware of workspaces.
### Description
Used to add, list, or clean the npm cache folder.
Used to add, list, or clean the `npm cache` folder.
Also used to view info about entries in the `npm exec` (aka `npx`) cache folder.
#### `npm cache`
* add:
Add the specified packages to the local cache. This command is primarily
intended to be used internally by npm, but it can provide a way to
add data to the local installation cache explicitly.
Add the specified packages to the local cache. This command is primarily intended to be used internally by npm, but it can provide a way to add data to the local installation cache explicitly.
* clean:
Delete all data out of the cache folder. Note that this is typically
unnecessary, as npm's cache is self-healing and resistant to data
corruption issues.
Delete a single entry or all entries out of the cache folder. Note that this is typically unnecessary, as npm's cache is self-healing and resistant to data corruption issues.
* ls:
List given entries or all entries in the local cache.
* verify:
Verify the contents of the cache folder, garbage collecting any unneeded
data, and verifying the integrity of the cache index and all cached data.
Verify the contents of the cache folder, garbage collecting any unneeded data, and verifying the integrity of the cache index and all cached data.
#### `npm cache npx`
* ls:
List all entries in the npx cache.
* rm:
Remove given entries or all entries from the npx cache.
* info:
Get detailed information about given entries in the npx cache.
### Details
npm stores cache data in an opaque directory within the configured `cache`,
named `_cacache`. This directory is a
[`cacache`](http://npm.im/cacache)-based content-addressable cache that
stores all http request data as well as other package-related data. This
directory is primarily accessed through `pacote`, the library responsible
for all package fetching as of npm@5.
npm stores cache data in an opaque directory within the configured `cache`, named `_cacache`. This directory is a [`cacache`](http://npm.im/cacache)-based content-addressable cache that stores all http request data as well as other package-related data. This directory is primarily accessed through `pacote`, the library responsible for all package fetching as of npm@5.
All data that passes through the cache is fully verified for integrity on
both insertion and extraction. Cache corruption will either trigger an
error, or signal to `pacote` that the data must be refetched, which it will
do automatically. For this reason, it should never be necessary to clear
the cache for any reason other than reclaiming disk space, thus why `clean`
now requires `--force` to run.
All data that passes through the cache is fully verified for integrity on both insertion and extraction. Cache corruption will either trigger an error, or signal to `pacote` that the data must be refetched, which it will do automatically. For this reason, it should never be necessary to clear the cache for any reason other than reclaiming disk space, thus why `clean` now requires `--force` to run.
There is currently no method exposed through npm to inspect or directly
manage the contents of this cache. In order to access it, `cacache` must be
used directly.
There is currently no method exposed through npm to inspect or directly manage the contents of this cache. In order to access it, `cacache` must be used directly.
npm will not remove data by itself: the cache will grow as new packages are
installed.
npm will not remove data by itself: the cache will grow as new packages are installed.
### A note about the cache's design
The npm cache is strictly a cache: it should not be relied upon as a
persistent and reliable data store for package data. npm makes no guarantee
that a previously-cached piece of data will be available later, and will
automatically delete corrupted contents. The primary guarantee that the
cache makes is that, if it does return data, that data will be exactly the
data that was inserted.
The npm cache is strictly a cache: it should not be relied upon as a persistent and reliable data store for package data. npm makes no guarantee that a previously-cached piece of data will be available later, and will automatically delete corrupted contents. The primary guarantee that the cache makes is that, if it does return data, that data will be exactly the data that was inserted.
To run an offline verification of existing cache contents, use `npm cache
verify`.
@@ -88,6 +85,7 @@ The location of npm's cache directory.
* [npm install](/commands/npm-install)
* [npm publish](/commands/npm-publish)
* [npm pack](/commands/npm-pack)
* [npm exec](/commands/npm-exec)
* https://npm.im/cacache
* https://npm.im/pacote
* https://npm.im/@npmcli/arborist
+10
View File
@@ -196,6 +196,16 @@ more information, or [npm init](/commands/npm-init).
#### `init-type`
* Default: "commonjs"
* Type: String
The value that `npm init` should use by default for the package.json type
field.
#### `init-version`
* Default: "1.0.0"
+1 -1
View File
@@ -27,7 +27,7 @@ packages will *also* show the paths to the specified packages. For
example, running `npm ls promzard` in npm's source tree will show:
```bash
npm@11.1.0 /path/to/npm
npm@11.2.0 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
```
+1 -1
View File
@@ -14,7 +14,7 @@ Note: This command is unaware of workspaces.
### Version
11.1.0
11.2.0
### Description
+10
View File
@@ -809,6 +809,16 @@ more information, or [npm init](/commands/npm-init).
#### `init-type`
* Default: "commonjs"
* Type: String
The value that `npm init` should use by default for the package.json type
field.
#### `init-version`
* Default: "1.0.0"
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-access----1110">
<h1 id="----npm-access----1120">
<span>npm-access</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Set access level on published packages</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-adduser----1110">
<h1 id="----npm-adduser----1120">
<span>npm-adduser</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Add a registry user account</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-audit----1110">
<h1 id="----npm-audit----1120">
<span>npm-audit</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Run a security audit</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-bugs----1110">
<h1 id="----npm-bugs----1120">
<span>npm-bugs</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Report bugs for a package in a web browser</span>
</header>
+37 -35
View File
@@ -141,16 +141,16 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-cache----1110">
<h1 id="----npm-cache----1120">
<span>npm-cache</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Manipulates packages cache</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="#details">Details</a></li><li><a href="#a-note-about-the-caches-design">A note about the cache's design</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#cache"><code>cache</code></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="#description">Description</a></li><ul><li><a href="#npm-cache"><code>npm cache</code></a></li><li><a href="#npm-cache-npx"><code>npm cache npx</code></a></li></ul><li><a href="#details">Details</a></li><li><a href="#a-note-about-the-caches-design">A note about the cache's design</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#cache"><code>cache</code></a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
@@ -158,54 +158,55 @@ npm command-line interface
npm cache clean [&lt;key&gt;]
npm cache ls [&lt;name&gt;@&lt;version&gt;]
npm cache verify
npm cache npx ls
npm cache npx rm [&lt;key&gt;...]
npm cache npx info &lt;key&gt;...
</code></pre>
<p>Note: This command is unaware of workspaces.</p>
<h3 id="description">Description</h3>
<p>Used to add, list, or clean the npm cache folder.</p>
<p>Used to add, list, or clean the <code>npm cache</code> folder.
Also used to view info about entries in the <code>npm exec</code> (aka <code>npx</code>) cache folder.</p>
<h4 id="npm-cache"><code>npm cache</code></h4>
<ul>
<li>
<p>add:
Add the specified packages to the local cache. This command is primarily
intended to be used internally by npm, but it can provide a way to
add data to the local installation cache explicitly.</p>
Add the specified packages to the local cache. This command is primarily intended to be used internally by npm, but it can provide a way to add data to the local installation cache explicitly.</p>
</li>
<li>
<p>clean:
Delete all data out of the cache folder. Note that this is typically
unnecessary, as npm's cache is self-healing and resistant to data
corruption issues.</p>
Delete a single entry or all entries out of the cache folder. Note that this is typically unnecessary, as npm's cache is self-healing and resistant to data corruption issues.</p>
</li>
<li>
<p>ls:
List given entries or all entries in the local cache.</p>
</li>
<li>
<p>verify:
Verify the contents of the cache folder, garbage collecting any unneeded
data, and verifying the integrity of the cache index and all cached data.</p>
Verify the contents of the cache folder, garbage collecting any unneeded data, and verifying the integrity of the cache index and all cached data.</p>
</li>
</ul>
<h4 id="npm-cache-npx"><code>npm cache npx</code></h4>
<ul>
<li>
<p>ls:
List all entries in the npx cache.</p>
</li>
<li>
<p>rm:
Remove given entries or all entries from the npx cache.</p>
</li>
<li>
<p>info:
Get detailed information about given entries in the npx cache.</p>
</li>
</ul>
<h3 id="details">Details</h3>
<p>npm stores cache data in an opaque directory within the configured <code>cache</code>,
named <code>_cacache</code>. This directory is a
<a href="http://npm.im/cacache"><code>cacache</code></a>-based content-addressable cache that
stores all http request data as well as other package-related data. This
directory is primarily accessed through <code>pacote</code>, the library responsible
for all package fetching as of npm@5.</p>
<p>All data that passes through the cache is fully verified for integrity on
both insertion and extraction. Cache corruption will either trigger an
error, or signal to <code>pacote</code> that the data must be refetched, which it will
do automatically. For this reason, it should never be necessary to clear
the cache for any reason other than reclaiming disk space, thus why <code>clean</code>
now requires <code>--force</code> to run.</p>
<p>There is currently no method exposed through npm to inspect or directly
manage the contents of this cache. In order to access it, <code>cacache</code> must be
used directly.</p>
<p>npm will not remove data by itself: the cache will grow as new packages are
installed.</p>
<p>npm stores cache data in an opaque directory within the configured <code>cache</code>, named <code>_cacache</code>. This directory is a <a href="http://npm.im/cacache"><code>cacache</code></a>-based content-addressable cache that stores all http request data as well as other package-related data. This directory is primarily accessed through <code>pacote</code>, the library responsible for all package fetching as of npm@5.</p>
<p>All data that passes through the cache is fully verified for integrity on both insertion and extraction. Cache corruption will either trigger an error, or signal to <code>pacote</code> that the data must be refetched, which it will do automatically. For this reason, it should never be necessary to clear the cache for any reason other than reclaiming disk space, thus why <code>clean</code> now requires <code>--force</code> to run.</p>
<p>There is currently no method exposed through npm to inspect or directly manage the contents of this cache. In order to access it, <code>cacache</code> must be used directly.</p>
<p>npm will not remove data by itself: the cache will grow as new packages are installed.</p>
<h3 id="a-note-about-the-caches-design">A note about the cache's design</h3>
<p>The npm cache is strictly a cache: it should not be relied upon as a
persistent and reliable data store for package data. npm makes no guarantee
that a previously-cached piece of data will be available later, and will
automatically delete corrupted contents. The primary guarantee that the
cache makes is that, if it does return data, that data will be exactly the
data that was inserted.</p>
<p>The npm cache is strictly a cache: it should not be relied upon as a persistent and reliable data store for package data. npm makes no guarantee that a previously-cached piece of data will be available later, and will automatically delete corrupted contents. The primary guarantee that the cache makes is that, if it does return data, that data will be exactly the data that was inserted.</p>
<p>To run an offline verification of existing cache contents, use <code>npm cache verify</code>.</p>
<h3 id="configuration">Configuration</h3>
<h4 id="cache"><code>cache</code></h4>
@@ -223,6 +224,7 @@ data that was inserted.</p>
<li><a href="../commands/npm-install.html">npm install</a></li>
<li><a href="../commands/npm-publish.html">npm publish</a></li>
<li><a href="../commands/npm-pack.html">npm pack</a></li>
<li><a href="../commands/npm-exec.html">npm exec</a></li>
<li><a href="https://npm.im/cacache">https://npm.im/cacache</a></li>
<li><a href="https://npm.im/pacote">https://npm.im/pacote</a></li>
<li><a href="https://npm.im/@npmcli/arborist">https://npm.im/@npmcli/arborist</a></li>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-ci----1110">
<h1 id="----npm-ci----1120">
<span>npm-ci</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Clean install a project</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-completion----1110">
<h1 id="----npm-completion----1120">
<span>npm-completion</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Tab Completion for npm</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-config----1110">
<h1 id="----npm-config----1120">
<span>npm-config</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Manage the npm configuration files</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-dedupe----1110">
<h1 id="----npm-dedupe----1120">
<span>npm-dedupe</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Reduce duplication in the package tree</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-deprecate----1110">
<h1 id="----npm-deprecate----1120">
<span>npm-deprecate</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Deprecate a version of a package</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-diff----1110">
<h1 id="----npm-diff----1120">
<span>npm-diff</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">The registry diff command</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-dist-tag----1110">
<h1 id="----npm-dist-tag----1120">
<span>npm-dist-tag</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Modify package distribution tags</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-docs----1110">
<h1 id="----npm-docs----1120">
<span>npm-docs</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Open documentation for a package in a web browser</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-doctor----1110">
<h1 id="----npm-doctor----1120">
<span>npm-doctor</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Check the health of your npm environment</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-edit----1110">
<h1 id="----npm-edit----1120">
<span>npm-edit</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Edit an installed package</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-exec----1110">
<h1 id="----npm-exec----1120">
<span>npm-exec</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Run a command from a local or remote npm package</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-explain----1110">
<h1 id="----npm-explain----1120">
<span>npm-explain</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Explain installed packages</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-explore----1110">
<h1 id="----npm-explore----1120">
<span>npm-explore</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Browse an installed package</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-find-dupes----1110">
<h1 id="----npm-find-dupes----1120">
<span>npm-find-dupes</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Find duplication in the package tree</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-fund----1110">
<h1 id="----npm-fund----1120">
<span>npm-fund</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Retrieve funding information</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-help-search----1110">
<h1 id="----npm-help-search----1120">
<span>npm-help-search</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Search npm help documentation</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-help----1110">
<h1 id="----npm-help----1120">
<span>npm-help</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Get help on npm</span>
</header>
+10 -3
View File
@@ -141,16 +141,16 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-init----1110">
<h1 id="----npm-init----1120">
<span>npm-init</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Create a package.json file</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><ul><li><a href="#forwarding-additional-options">Forwarding additional options</a></li></ul><li><a href="#examples">Examples</a></li><li><a href="#workspaces-support">Workspaces support</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#init-author-name"><code>init-author-name</code></a></li><li><a href="#init-author-url"><code>init-author-url</code></a></li><li><a href="#init-license"><code>init-license</code></a></li><li><a href="#init-module"><code>init-module</code></a></li><li><a href="#init-version"><code>init-version</code></a></li><li><a href="#yes"><code>yes</code></a></li><li><a href="#force"><code>force</code></a></li><li><a href="#scope"><code>scope</code></a></li><li><a href="#workspace"><code>workspace</code></a></li><li><a href="#workspaces"><code>workspaces</code></a></li><li><a href="#workspaces-update"><code>workspaces-update</code></a></li><li><a href="#include-workspace-root"><code>include-workspace-root</code></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="#description">Description</a></li><ul><li><a href="#forwarding-additional-options">Forwarding additional options</a></li></ul><li><a href="#examples">Examples</a></li><li><a href="#workspaces-support">Workspaces support</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#init-author-name"><code>init-author-name</code></a></li><li><a href="#init-author-url"><code>init-author-url</code></a></li><li><a href="#init-license"><code>init-license</code></a></li><li><a href="#init-module"><code>init-module</code></a></li><li><a href="#init-type"><code>init-type</code></a></li><li><a href="#init-version"><code>init-version</code></a></li><li><a href="#yes"><code>yes</code></a></li><li><a href="#force"><code>force</code></a></li><li><a href="#scope"><code>scope</code></a></li><li><a href="#workspace"><code>workspace</code></a></li><li><a href="#workspaces"><code>workspaces</code></a></li><li><a href="#workspaces-update"><code>workspaces-update</code></a></li><li><a href="#include-workspace-root"><code>include-workspace-root</code></a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
@@ -292,6 +292,13 @@ homepage.</p>
documentation for the
<a href="https://github.com/npm/init-package-json">init-package-json</a> module for
more information, or <a href="../commands/npm-init.html">npm init</a>.</p>
<h4 id="init-type"><code>init-type</code></h4>
<ul>
<li>Default: "commonjs"</li>
<li>Type: String</li>
</ul>
<p>The value that <code>npm init</code> should use by default for the package.json type
field.</p>
<h4 id="init-version"><code>init-version</code></h4>
<ul>
<li>Default: "1.0.0"</li>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-install-ci-test----1110">
<h1 id="----npm-install-ci-test----1120">
<span>npm-install-ci-test</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Install a project with a clean slate and run tests</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-install-test----1110">
<h1 id="----npm-install-test----1120">
<span>npm-install-test</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Install package(s) and run tests</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-install----1110">
<h1 id="----npm-install----1120">
<span>npm-install</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Install a package</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-link----1110">
<h1 id="----npm-link----1120">
<span>npm-link</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Symlink a package folder</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-login----1110">
<h1 id="----npm-login----1120">
<span>npm-login</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Login to a registry user account</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-logout----1110">
<h1 id="----npm-logout----1120">
<span>npm-logout</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Log out of the registry</span>
</header>
+3 -3
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-ls----1110">
<h1 id="----npm-ls----1120">
<span>npm-ls</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">List installed packages</span>
</header>
@@ -168,7 +168,7 @@ tree at all, use <a href="../commands/npm-explain.html"><code>npm explain</code>
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.1.0 /path/to/npm
<pre><code class="language-bash">npm@11.2.0 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
</code></pre>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-org----1110">
<h1 id="----npm-org----1120">
<span>npm-org</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Manage orgs</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-outdated----1110">
<h1 id="----npm-outdated----1120">
<span>npm-outdated</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Check for outdated packages</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-owner----1110">
<h1 id="----npm-owner----1120">
<span>npm-owner</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Manage package owners</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-pack----1110">
<h1 id="----npm-pack----1120">
<span>npm-pack</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Create a tarball from a package</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-ping----1110">
<h1 id="----npm-ping----1120">
<span>npm-ping</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Ping npm registry</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-pkg----1110">
<h1 id="----npm-pkg----1120">
<span>npm-pkg</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Manages your package.json</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-prefix----1110">
<h1 id="----npm-prefix----1120">
<span>npm-prefix</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Display prefix</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-profile----1110">
<h1 id="----npm-profile----1120">
<span>npm-profile</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Change settings on your registry profile</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-prune----1110">
<h1 id="----npm-prune----1120">
<span>npm-prune</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Remove extraneous packages</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-publish----1110">
<h1 id="----npm-publish----1120">
<span>npm-publish</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Publish a package</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-query----1110">
<h1 id="----npm-query----1120">
<span>npm-query</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Dependency selector query</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-rebuild----1110">
<h1 id="----npm-rebuild----1120">
<span>npm-rebuild</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Rebuild a package</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-repo----1110">
<h1 id="----npm-repo----1120">
<span>npm-repo</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Open package repository page in the browser</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-restart----1110">
<h1 id="----npm-restart----1120">
<span>npm-restart</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Restart a package</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-root----1110">
<h1 id="----npm-root----1120">
<span>npm-root</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Display npm root</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-run-script----1110">
<h1 id="----npm-run-script----1120">
<span>npm-run-script</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Run arbitrary package scripts</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-sbom----1110">
<h1 id="----npm-sbom----1120">
<span>npm-sbom</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Generate a Software Bill of Materials (SBOM)</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-search----1110">
<h1 id="----npm-search----1120">
<span>npm-search</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Search for packages</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-shrinkwrap----1110">
<h1 id="----npm-shrinkwrap----1120">
<span>npm-shrinkwrap</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Lock down dependency versions for publication</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-star----1110">
<h1 id="----npm-star----1120">
<span>npm-star</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Mark your favorite packages</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-stars----1110">
<h1 id="----npm-stars----1120">
<span>npm-stars</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">View packages marked as favorites</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-start----1110">
<h1 id="----npm-start----1120">
<span>npm-start</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Start a package</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-stop----1110">
<h1 id="----npm-stop----1120">
<span>npm-stop</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Stop a package</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-team----1110">
<h1 id="----npm-team----1120">
<span>npm-team</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Manage organization teams and team memberships</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-test----1110">
<h1 id="----npm-test----1120">
<span>npm-test</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Test a package</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-token----1110">
<h1 id="----npm-token----1120">
<span>npm-token</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Manage your authentication tokens</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-undeprecate----1110">
<h1 id="----npm-undeprecate----1120">
<span>npm-undeprecate</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Undeprecate a version of a package</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-uninstall----1110">
<h1 id="----npm-uninstall----1120">
<span>npm-uninstall</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Remove a package</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-unpublish----1110">
<h1 id="----npm-unpublish----1120">
<span>npm-unpublish</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Remove a package from the registry</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-unstar----1110">
<h1 id="----npm-unstar----1120">
<span>npm-unstar</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Remove an item from your favorite packages</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-update----1110">
<h1 id="----npm-update----1120">
<span>npm-update</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Update packages</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-version----1110">
<h1 id="----npm-version----1120">
<span>npm-version</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Bump a package version</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-view----1110">
<h1 id="----npm-view----1120">
<span>npm-view</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">View registry info</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm-whoami----1110">
<h1 id="----npm-whoami----1120">
<span>npm-whoami</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Display npm username</span>
</header>
+3 -3
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npm----1110">
<h1 id="----npm----1120">
<span>npm</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.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.1.0</p>
<p>11.2.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
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npx----1110">
<h1 id="----npx----1120">
<span>npx</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Run a command from a local or remote npm package</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----folders----1110">
<h1 id="----folders----1120">
<span>folders</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Folder Structures Used by npm</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----install----1110">
<h1 id="----install----1120">
<span>install</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Download and install node and npm</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----folders----1110">
<h1 id="----folders----1120">
<span>folders</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Folder Structures Used by npm</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----packagejson----1110">
<h1 id="----packagejson----1120">
<span>package.json</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.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----1110">
<h1 id="----npm-shrinkwrapjson----1120">
<span>npm-shrinkwrap.json</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">A publishable lockfile</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----npmrc----1110">
<h1 id="----npmrc----1120">
<span>npmrc</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">The npm config files</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----packagejson----1110">
<h1 id="----packagejson----1120">
<span>package.json</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.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----1110">
<h1 id="----package-lockjson----1120">
<span>package-lock.json</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">A manifestation of the manifest</span>
</header>
+10 -3
View File
@@ -141,16 +141,16 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----config----1110">
<h1 id="----config----1120">
<span>config</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">More than you probably want to know about npm configuration</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="#description">Description</a></li><ul><li><a href="#command-line-flags">Command Line Flags</a></li><li><a href="#environment-variables">Environment Variables</a></li><li><a href="#npmrc-files">npmrc Files</a></li><li><a href="#default-configs">Default Configs</a></li></ul><li><a href="#shorthands-and-other-cli-niceties">Shorthands and Other CLI Niceties</a></li><li><a href="#config-settings">Config Settings</a></li><ul><li><a href="#auth"><code>_auth</code></a></li><li><a href="#access"><code>access</code></a></li><li><a href="#all"><code>all</code></a></li><li><a href="#allow-same-version"><code>allow-same-version</code></a></li><li><a href="#audit"><code>audit</code></a></li><li><a href="#audit-level"><code>audit-level</code></a></li><li><a href="#auth-type"><code>auth-type</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="#browser"><code>browser</code></a></li><li><a href="#ca"><code>ca</code></a></li><li><a href="#cache"><code>cache</code></a></li><li><a href="#cafile"><code>cafile</code></a></li><li><a href="#call"><code>call</code></a></li><li><a href="#cidr"><code>cidr</code></a></li><li><a href="#color"><code>color</code></a></li><li><a href="#commit-hooks"><code>commit-hooks</code></a></li><li><a href="#cpu"><code>cpu</code></a></li><li><a href="#depth"><code>depth</code></a></li><li><a href="#description2"><code>description</code></a></li><li><a href="#diff"><code>diff</code></a></li><li><a href="#diff-dst-prefix"><code>diff-dst-prefix</code></a></li><li><a href="#diff-ignore-all-space"><code>diff-ignore-all-space</code></a></li><li><a href="#diff-name-only"><code>diff-name-only</code></a></li><li><a href="#diff-no-prefix"><code>diff-no-prefix</code></a></li><li><a href="#diff-src-prefix"><code>diff-src-prefix</code></a></li><li><a href="#diff-text"><code>diff-text</code></a></li><li><a href="#diff-unified"><code>diff-unified</code></a></li><li><a href="#dry-run"><code>dry-run</code></a></li><li><a href="#editor"><code>editor</code></a></li><li><a href="#engine-strict"><code>engine-strict</code></a></li><li><a href="#expect-result-count"><code>expect-result-count</code></a></li><li><a href="#expect-results"><code>expect-results</code></a></li><li><a href="#fetch-retries"><code>fetch-retries</code></a></li><li><a href="#fetch-retry-factor"><code>fetch-retry-factor</code></a></li><li><a href="#fetch-retry-maxtimeout"><code>fetch-retry-maxtimeout</code></a></li><li><a href="#fetch-retry-mintimeout"><code>fetch-retry-mintimeout</code></a></li><li><a href="#fetch-timeout"><code>fetch-timeout</code></a></li><li><a href="#force"><code>force</code></a></li><li><a href="#foreground-scripts"><code>foreground-scripts</code></a></li><li><a href="#format-package-lock"><code>format-package-lock</code></a></li><li><a href="#fund"><code>fund</code></a></li><li><a href="#git"><code>git</code></a></li><li><a href="#git-tag-version"><code>git-tag-version</code></a></li><li><a href="#global"><code>global</code></a></li><li><a href="#globalconfig"><code>globalconfig</code></a></li><li><a href="#heading"><code>heading</code></a></li><li><a href="#https-proxy"><code>https-proxy</code></a></li><li><a href="#if-present"><code>if-present</code></a></li><li><a href="#ignore-scripts"><code>ignore-scripts</code></a></li><li><a href="#include"><code>include</code></a></li><li><a href="#include-staged"><code>include-staged</code></a></li><li><a href="#include-workspace-root"><code>include-workspace-root</code></a></li><li><a href="#init-author-email"><code>init-author-email</code></a></li><li><a href="#init-author-name"><code>init-author-name</code></a></li><li><a href="#init-author-url"><code>init-author-url</code></a></li><li><a href="#init-license"><code>init-license</code></a></li><li><a href="#init-module"><code>init-module</code></a></li><li><a href="#init-version"><code>init-version</code></a></li><li><a href="#install-links"><code>install-links</code></a></li><li><a href="#install-strategy"><code>install-strategy</code></a></li><li><a href="#json"><code>json</code></a></li><li><a href="#legacy-peer-deps"><code>legacy-peer-deps</code></a></li><li><a href="#libc"><code>libc</code></a></li><li><a href="#link"><code>link</code></a></li><li><a href="#local-address"><code>local-address</code></a></li><li><a href="#location"><code>location</code></a></li><li><a href="#lockfile-version"><code>lockfile-version</code></a></li><li><a href="#loglevel"><code>loglevel</code></a></li><li><a href="#logs-dir"><code>logs-dir</code></a></li><li><a href="#logs-max"><code>logs-max</code></a></li><li><a href="#long"><code>long</code></a></li><li><a href="#maxsockets"><code>maxsockets</code></a></li><li><a href="#message"><code>message</code></a></li><li><a href="#node-options"><code>node-options</code></a></li><li><a href="#noproxy"><code>noproxy</code></a></li><li><a href="#offline"><code>offline</code></a></li>Line truncated
<div id="_table_of_contents"><ul><li><a href="#description">Description</a></li><ul><li><a href="#command-line-flags">Command Line Flags</a></li><li><a href="#environment-variables">Environment Variables</a></li><li><a href="#npmrc-files">npmrc Files</a></li><li><a href="#default-configs">Default Configs</a></li></ul><li><a href="#shorthands-and-other-cli-niceties">Shorthands and Other CLI Niceties</a></li><li><a href="#config-settings">Config Settings</a></li><ul><li><a href="#auth"><code>_auth</code></a></li><li><a href="#access"><code>access</code></a></li><li><a href="#all"><code>all</code></a></li><li><a href="#allow-same-version"><code>allow-same-version</code></a></li><li><a href="#audit"><code>audit</code></a></li><li><a href="#audit-level"><code>audit-level</code></a></li><li><a href="#auth-type"><code>auth-type</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="#browser"><code>browser</code></a></li><li><a href="#ca"><code>ca</code></a></li><li><a href="#cache"><code>cache</code></a></li><li><a href="#cafile"><code>cafile</code></a></li><li><a href="#call"><code>call</code></a></li><li><a href="#cidr"><code>cidr</code></a></li><li><a href="#color"><code>color</code></a></li><li><a href="#commit-hooks"><code>commit-hooks</code></a></li><li><a href="#cpu"><code>cpu</code></a></li><li><a href="#depth"><code>depth</code></a></li><li><a href="#description2"><code>description</code></a></li><li><a href="#diff"><code>diff</code></a></li><li><a href="#diff-dst-prefix"><code>diff-dst-prefix</code></a></li><li><a href="#diff-ignore-all-space"><code>diff-ignore-all-space</code></a></li><li><a href="#diff-name-only"><code>diff-name-only</code></a></li><li><a href="#diff-no-prefix"><code>diff-no-prefix</code></a></li><li><a href="#diff-src-prefix"><code>diff-src-prefix</code></a></li><li><a href="#diff-text"><code>diff-text</code></a></li><li><a href="#diff-unified"><code>diff-unified</code></a></li><li><a href="#dry-run"><code>dry-run</code></a></li><li><a href="#editor"><code>editor</code></a></li><li><a href="#engine-strict"><code>engine-strict</code></a></li><li><a href="#expect-result-count"><code>expect-result-count</code></a></li><li><a href="#expect-results"><code>expect-results</code></a></li><li><a href="#fetch-retries"><code>fetch-retries</code></a></li><li><a href="#fetch-retry-factor"><code>fetch-retry-factor</code></a></li><li><a href="#fetch-retry-maxtimeout"><code>fetch-retry-maxtimeout</code></a></li><li><a href="#fetch-retry-mintimeout"><code>fetch-retry-mintimeout</code></a></li><li><a href="#fetch-timeout"><code>fetch-timeout</code></a></li><li><a href="#force"><code>force</code></a></li><li><a href="#foreground-scripts"><code>foreground-scripts</code></a></li><li><a href="#format-package-lock"><code>format-package-lock</code></a></li><li><a href="#fund"><code>fund</code></a></li><li><a href="#git"><code>git</code></a></li><li><a href="#git-tag-version"><code>git-tag-version</code></a></li><li><a href="#global"><code>global</code></a></li><li><a href="#globalconfig"><code>globalconfig</code></a></li><li><a href="#heading"><code>heading</code></a></li><li><a href="#https-proxy"><code>https-proxy</code></a></li><li><a href="#if-present"><code>if-present</code></a></li><li><a href="#ignore-scripts"><code>ignore-scripts</code></a></li><li><a href="#include"><code>include</code></a></li><li><a href="#include-staged"><code>include-staged</code></a></li><li><a href="#include-workspace-root"><code>include-workspace-root</code></a></li><li><a href="#init-author-email"><code>init-author-email</code></a></li><li><a href="#init-author-name"><code>init-author-name</code></a></li><li><a href="#init-author-url"><code>init-author-url</code></a></li><li><a href="#init-license"><code>init-license</code></a></li><li><a href="#init-module"><code>init-module</code></a></li><li><a href="#init-type"><code>init-type</code></a></li><li><a href="#init-version"><code>init-version</code></a></li><li><a href="#install-links"><code>install-links</code></a></li><li><a href="#install-strategy"><code>install-strategy</code></a></li><li><a href="#json"><code>json</code></a></li><li><a href="#legacy-peer-deps"><code>legacy-peer-deps</code></a></li><li><a href="#libc"><code>libc</code></a></li><li><a href="#link"><code>link</code></a></li><li><a href="#local-address"><code>local-address</code></a></li><li><a href="#location"><code>location</code></a></li><li><a href="#lockfile-version"><code>lockfile-version</code></a></li><li><a href="#loglevel"><code>loglevel</code></a></li><li><a href="#logs-dir"><code>logs-dir</code></a></li><li><a href="#logs-max"><code>logs-max</code></a></li><li><a href="#long"><code>long</code></a></li><li><a href="#maxsockets"><code>maxsockets</code></a></li><li><a href="#message"><code>message</code></a></li><li><a href="#node-options"><code>node-options</code></a></li><li><a href="#noproxy"><code>noproxy</code></a><Line truncated
</section>
<div id="_content"><h3 id="description">Description</h3>
@@ -739,6 +739,13 @@ homepage.</p>
documentation for the
<a href="https://github.com/npm/init-package-json">init-package-json</a> module for
more information, or <a href="../commands/npm-init.html">npm init</a>.</p>
<h4 id="init-type"><code>init-type</code></h4>
<ul>
<li>Default: "commonjs"</li>
<li>Type: String</li>
</ul>
<p>The value that <code>npm init</code> should use by default for the package.json type
field.</p>
<h4 id="init-version"><code>init-version</code></h4>
<ul>
<li>Default: "1.0.0"</li>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----dependency-selector-syntax--querying----1110">
<h1 id="----dependency-selector-syntax--querying----1120">
<span>Dependency Selector Syntax &amp; Querying</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Dependency Selector Syntax &amp; Querying</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----developers----1110">
<h1 id="----developers----1120">
<span>developers</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Developer Guide</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----logging----1110">
<h1 id="----logging----1120">
<span>Logging</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Why, What &amp; How We Log</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----orgs----1110">
<h1 id="----orgs----1120">
<span>orgs</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Working with Teams &amp; Orgs</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----package-spec----1110">
<h1 id="----package-spec----1120">
<span>package-spec</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Package name specifier</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----registry----1110">
<h1 id="----registry----1120">
<span>registry</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">The JavaScript Package Registry</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----removal----1110">
<h1 id="----removal----1120">
<span>removal</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Cleaning the Slate</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----scope----1110">
<h1 id="----scope----1120">
<span>scope</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Scoped packages</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----scripts----1110">
<h1 id="----scripts----1120">
<span>scripts</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">How npm handles the "scripts" field</span>
</header>
+2 -2
View File
@@ -141,9 +141,9 @@ npm command-line interface
<section id="content">
<header class="title">
<h1 id="----workspaces----1110">
<h1 id="----workspaces----1120">
<span>workspaces</span>
<span class="version">@11.1.0</span>
<span class="version">@11.2.0</span>
</h1>
<span class="description">Working with workspaces</span>
</header>
+3 -3
View File
@@ -40,7 +40,7 @@ const updateCheck = async (npm, spec, version, current) => {
// and should get the updates from that release train.
// Note that this isn't another http request over the network, because
// the packument will be cached by pacote from previous request.
if (gt(version, latest) && spec === 'latest') {
if (gt(version, latest) && spec === '*') {
return updateNotifier(npm, `^${version}`)
}
@@ -71,7 +71,7 @@ const updateCheck = async (npm, spec, version, current) => {
return message
}
const updateNotifier = async (npm, spec = 'latest') => {
const updateNotifier = async (npm, spec = '*') => {
// if we're on a prerelease train, then updates are coming fast
// check for a new one daily. otherwise, weekly.
const { version } = npm
@@ -83,7 +83,7 @@ const updateNotifier = async (npm, spec = 'latest') => {
}
// while on a beta train, get updates daily
const duration = spec !== 'latest' ? DAILY : WEEKLY
const duration = current.prerelease.length ? DAILY : WEEKLY
const t = new Date(Date.now() - duration)
// if we don't have a file, then definitely check it.
+168 -14
View File
@@ -1,13 +1,15 @@
const cacache = require('cacache')
const pacote = require('pacote')
const fs = require('node:fs/promises')
const { join } = require('node:path')
const cacache = require('cacache')
const pacote = require('pacote')
const semver = require('semver')
const BaseCommand = require('../base-cmd.js')
const npa = require('npm-package-arg')
const jsonParse = require('json-parse-even-better-errors')
const localeCompare = require('@isaacs/string-locale-compare')('en')
const { log, output } = require('proc-log')
const PkgJson = require('@npmcli/package-json')
const abbrev = require('abbrev')
const BaseCommand = require('../base-cmd.js')
const searchCachePackage = async (path, parsed, cacheKeys) => {
const searchMFH = new RegExp(`^make-fetch-happen:request-cache:.*(?<!/[@a-zA-Z]+)/${parsed.name}/-/(${parsed.name}[^/]+.tgz)$`)
@@ -62,7 +64,7 @@ const searchCachePackage = async (path, parsed, cacheKeys) => {
}
class Cache extends BaseCommand {
static description = 'Manipulates packages cache'
static description = 'Manipulates packages and npx cache'
static name = 'cache'
static params = ['cache']
static usage = [
@@ -70,12 +72,15 @@ class Cache extends BaseCommand {
'clean [<key>]',
'ls [<name>@<version>]',
'verify',
'npx ls',
'npx rm [<key>...]',
'npx info <key>...',
]
static async completion (opts) {
const argv = opts.conf.argv.remain
if (argv.length === 2) {
return ['add', 'clean', 'verify', 'ls']
return ['add', 'clean', 'verify', 'ls', 'npx']
}
// TODO - eventually...
@@ -99,14 +104,31 @@ class Cache extends BaseCommand {
return await this.verify()
case 'ls':
return await this.ls(args)
case 'npx':
return await this.npx(args)
default:
throw this.usageError()
}
}
// npm cache clean [pkg]*
// npm cache npx
async npx ([cmd, ...keys]) {
switch (cmd) {
case 'ls':
return await this.npxLs(keys)
case 'rm':
return await this.npxRm(keys)
case 'info':
return await this.npxInfo(keys)
default:
throw this.usageError()
}
}
// npm cache clean [spec]*
async clean (args) {
const cachePath = join(this.npm.cache, '_cacache')
// this is a derived value
const cachePath = this.npm.flatOptions.cache
if (args.length === 0) {
if (!this.npm.config.get('force')) {
throw new Error(`As of npm@5, the npm cache self-heals from corruption issues
@@ -169,11 +191,12 @@ class Cache extends BaseCommand {
}
async verify () {
const cache = join(this.npm.cache, '_cacache')
const prefix = cache.indexOf(process.env.HOME) === 0
? `~${cache.slice(process.env.HOME.length)}`
: cache
const stats = await cacache.verify(cache)
// this is a derived value
const cachePath = this.npm.flatOptions.cache
const prefix = cachePath.indexOf(process.env.HOME) === 0
? `~${cachePath.slice(process.env.HOME.length)}`
: cachePath
const stats = await cacache.verify(cachePath)
output.standard(`Cache verified and compressed (${prefix})`)
output.standard(`Content verified: ${stats.verifiedContent} (${stats.keptSize} bytes)`)
if (stats.badContentCount) {
@@ -189,9 +212,10 @@ class Cache extends BaseCommand {
output.standard(`Finished in ${stats.runTime.total / 1000}s`)
}
// npm cache ls [--package <spec> ...]
// npm cache ls [<spec> ...]
async ls (specs) {
const cachePath = join(this.npm.cache, '_cacache')
// This is a derived value
const { cache: cachePath } = this.npm.flatOptions
const cacheKeys = Object.keys(await cacache.ls(cachePath))
if (specs.length > 0) {
// get results for each package spec specified
@@ -211,6 +235,136 @@ class Cache extends BaseCommand {
}
cacheKeys.sort(localeCompare).forEach(key => output.standard(key))
}
async #npxCache (keys = []) {
// This is a derived value
const { npxCache } = this.npm.flatOptions
let dirs
try {
dirs = await fs.readdir(npxCache, { encoding: 'utf-8' })
} catch {
output.standard('npx cache does not exist')
return
}
const cache = {}
const { default: pMap } = await import('p-map')
await pMap(dirs, async e => {
const pkgPath = join(npxCache, e)
cache[e] = {
hash: e,
path: pkgPath,
valid: false,
}
try {
const pkgJson = await PkgJson.load(pkgPath)
cache[e].package = pkgJson.content
cache[e].valid = true
} catch {
// Defaults to not valid already
}
}, { concurrency: 20 })
if (!keys.length) {
return cache
}
const result = {}
const abbrevs = abbrev(Object.keys(cache))
for (const key of keys) {
if (!abbrevs[key]) {
throw this.usageError(`Invalid npx key ${key}`)
}
result[abbrevs[key]] = cache[abbrevs[key]]
}
return result
}
async npxLs () {
const cache = await this.#npxCache()
for (const key in cache) {
const { hash, valid, package: pkg } = cache[key]
let result = `${hash}:`
if (!valid) {
result = `${result} (empty/invalid)`
} else if (pkg?._npx) {
result = `${result} ${pkg._npx.packages.join(', ')}`
} else {
result = `${result} (unknown)`
}
output.standard(result)
}
}
async npxRm (keys) {
if (!keys.length) {
if (!this.npm.config.get('force')) {
throw this.usageError('Please use --force to remove entire npx cache')
}
const { npxCache } = this.npm.flatOptions
if (!this.npm.config.get('dry-run')) {
return fs.rm(npxCache, { recursive: true, force: true })
}
}
const cache = await this.#npxCache(keys)
for (const key in cache) {
const { path: cachePath } = cache[key]
output.standard(`Removing npx key at ${cachePath}`)
if (!this.npm.config.get('dry-run')) {
await fs.rm(cachePath, { recursive: true })
}
}
}
async npxInfo (keys) {
const chalk = this.npm.chalk
if (!keys.length) {
throw this.usageError()
}
const cache = await this.#npxCache(keys)
const Arborist = require('@npmcli/arborist')
for (const key in cache) {
const { hash, path, package: pkg } = cache[key]
let valid = cache[key].valid
const results = []
try {
if (valid) {
const arb = new Arborist({ path })
const tree = await arb.loadVirtual()
if (pkg._npx) {
results.push('packages:')
for (const p of pkg._npx.packages) {
const parsed = npa(p)
if (parsed.type === 'directory') {
// in the tree the spec is relative, even if the dependency spec is absolute, so we can't find it by name or spec.
results.push(`- ${chalk.cyan(p)}`)
} else {
results.push(`- ${chalk.cyan(p)} (${chalk.blue(tree.children.get(parsed.name).pkgid)})`)
}
}
} else {
results.push('packages: (unknown)')
results.push(`dependencies:`)
for (const dep in pkg.dependencies) {
const child = tree.children.get(dep)
if (child.isLink) {
results.push(`- ${chalk.cyan(child.realpath)}`)
} else {
results.push(`- ${chalk.cyan(child.pkgid)}`)
}
}
}
}
} catch (ex) {
valid = false
}
const v = valid ? chalk.green('valid') : chalk.red('invalid')
output.standard(`${v} npx cache entry with key ${chalk.blue(hash)}`)
output.standard(`location: ${chalk.blue(path)}`)
if (valid) {
output.standard(results.join('\n'))
}
output.standard('')
}
}
}
module.exports = Cache
+5 -14
View File
@@ -4,23 +4,11 @@ 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 } = require('@npmcli/config/lib/definitions')
const { defaults, definitions, nerfDarts } = require('@npmcli/config/lib/definitions')
const { log, output } = require('proc-log')
const BaseCommand = require('../base-cmd.js')
const { redact } = require('@npmcli/redact')
// These are the configs that we can nerf-dart. Not all of them currently even
// *have* config definitions so we have to explicitly validate them here.
// This is used to validate during "npm config set"
const nerfDarts = [
'_auth',
'_authToken',
'_password',
'certfile',
'email',
'keyfile',
'username',
]
// These are the config values to swap with "protected". It does not catch
// every single sensitive thing a user may put in the npmrc file but it gets
// the common ones. This is distinct from nerfDarts because that is used to
@@ -125,7 +113,7 @@ class Config extends BaseCommand {
const action = argv[2]
switch (action) {
case 'set':
// todo: complete with valid values, if possible.
// TODO: complete with valid values, if possible.
if (argv.length > 3) {
return []
}
@@ -378,6 +366,9 @@ ${defData}
const { content } = await pkgJson.normalize(this.npm.prefix).catch(() => ({ content: {} }))
if (content.publishConfig) {
for (const key in content.publishConfig) {
this.npm.config.checkUnknown('publishConfig', key)
}
const pkgPath = resolve(this.npm.prefix, 'package.json')
msg.push(`; "publishConfig" from ${pkgPath}`)
msg.push('; This set of config values will be used at publish-time.', '')
+7 -7
View File
@@ -106,7 +106,7 @@ class Diff extends BaseCommand {
const pkgName = await this.packageName()
return [
`${pkgName}@${this.npm.config.get('tag')}`,
`file:${this.prefix.replace(/#/g, '%23')}`,
`file:${this.prefix}`,
]
}
@@ -134,7 +134,7 @@ class Diff extends BaseCommand {
}
return [
`${pkgName}@${a}`,
`file:${this.prefix.replace(/#/g, '%23')}`,
`file:${this.prefix}`,
]
}
@@ -166,7 +166,7 @@ class Diff extends BaseCommand {
}
return [
`${spec.name}@${spec.fetchSpec}`,
`file:${this.prefix.replace(/#/g, '%23')}`,
`file:${this.prefix}`,
]
}
@@ -179,7 +179,7 @@ class Diff extends BaseCommand {
}
}
const aSpec = `file:${node.realpath.replace(/#/g, '%23')}`
const aSpec = `file:${node.realpath}`
// finds what version of the package to compare against, if a exact
// version or tag was passed than it should use that, otherwise
@@ -212,8 +212,8 @@ class Diff extends BaseCommand {
]
} else if (spec.type === 'directory') {
return [
`file:${spec.fetchSpec.replace(/#/g, '%23')}`,
`file:${this.prefix.replace(/#/g, '%23')}`,
`file:${spec.fetchSpec}`,
`file:${this.prefix}`,
]
} else {
throw this.usageError(`Spec type ${spec.type} not supported.`)
@@ -281,7 +281,7 @@ class Diff extends BaseCommand {
const res = !node || !node.package || !node.package.version
? spec.fetchSpec
: `file:${node.realpath.replace(/#/g, '%23')}`
: `file:${node.realpath}`
return `${spec.name}@${res}`
})
+1
View File
@@ -19,6 +19,7 @@ class Init extends BaseCommand {
'init-author-url',
'init-license',
'init-module',
'init-type',
'init-version',
'yes',
'force',
+2 -2
View File
@@ -124,7 +124,7 @@ class Link extends ArboristWorkspaceCmd {
...this.npm.flatOptions,
prune: false,
path: this.npm.prefix,
add: names.map(l => `file:${resolve(globalTop, 'node_modules', l).replace(/#/g, '%23')}`),
add: names.map(l => `file:${resolve(globalTop, 'node_modules', l)}`),
save,
workspaces: this.workspaceNames,
})
@@ -135,7 +135,7 @@ class Link extends ArboristWorkspaceCmd {
async linkPkg () {
const wsp = this.workspacePaths
const paths = wsp && wsp.length ? wsp : [this.npm.prefix]
const add = paths.map(path => `file:${path.replace(/#/g, '%23')}`)
const add = paths.map(path => `file:${path}`)
const globalTop = resolve(this.npm.globalDir, '..')
const Arborist = require('@npmcli/arborist')
const arb = new Arborist({
+5
View File
@@ -266,6 +266,11 @@ class Publish extends BaseCommand {
// corresponding `publishConfig` settings
const filteredPublishConfig = Object.fromEntries(
Object.entries(manifest.publishConfig).filter(([key]) => !(key in cliFlags)))
if (logWarnings) {
for (const key in filteredPublishConfig) {
this.npm.config.checkUnknown('publishConfig', key)
}
}
flatten(filteredPublishConfig, opts)
}
return manifest
+3
View File
@@ -145,6 +145,9 @@ class Unpublish extends BaseCommand {
// corresponding `publishConfig` settings
const filteredPublishConfig = Object.fromEntries(
Object.entries(manifest.publishConfig).filter(([key]) => !(key in cliFlags)))
for (const key in filteredPublishConfig) {
this.npm.config.checkUnknown('publishConfig', key)
}
flatten(filteredPublishConfig, opts)
}
+2 -1
View File
@@ -2,7 +2,7 @@ const { resolve, dirname, join } = require('node:path')
const Config = require('@npmcli/config')
const which = require('which')
const fs = require('node:fs/promises')
const { definitions, flatten, shorthands } = require('@npmcli/config/lib/definitions')
const { definitions, flatten, nerfDarts, shorthands } = require('@npmcli/config/lib/definitions')
const usage = require('./utils/npm-usage.js')
const LogFile = require('./utils/log-file.js')
const Timers = require('./utils/timers.js')
@@ -68,6 +68,7 @@ class Npm {
npmPath: this.#npmRoot,
definitions,
flatten,
nerfDarts,
shorthands,
argv: [...process.argv, ...argv],
excludeNpmCwd,
+1
View File
@@ -192,6 +192,7 @@ class VerifySignatures {
// If keys not found in Sigstore TUF repo, fallback to registry keys API
if (!keys) {
log.warn(`Fetching verification keys using TUF failed. Fetching directly from ${registry}.`)
keys = await npmFetch.json('/-/npm/v1/keys', {
...this.npm.flatOptions,
registry,
Loaded 100 of 304 files, more files were not shown because too many files have changed in this diff. Show more