mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
deps: upgrade npm to 11.0.0
PR-URL: https://github.com/nodejs/node/pull/56274 Reviewed-By: Jordan Harband <ljharb@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
This commit is contained in:
1 parent
3946f16786
commit
25b22e4754
450 files changed
+6545
-8968
No files matched your search
-112
@@ -1,112 +0,0 @@
|
||||
---
|
||||
title: npm-hook
|
||||
section: 1
|
||||
description: Manage registry hooks
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm hook add <pkg> <url> <secret> [--type=<type>]
|
||||
npm hook ls [pkg]
|
||||
npm hook rm <id>
|
||||
npm hook update <id> <url> <secret>
|
||||
```
|
||||
|
||||
Note: This command is unaware of workspaces.
|
||||
|
||||
### Description
|
||||
|
||||
Allows you to manage [npm
|
||||
hooks](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm),
|
||||
including adding, removing, listing, and updating.
|
||||
|
||||
Hooks allow you to configure URL endpoints that will be notified whenever a
|
||||
change happens to any of the supported entity types. Three different types
|
||||
of entities can be watched by hooks: packages, owners, and scopes.
|
||||
|
||||
To create a package hook, simply reference the package name.
|
||||
|
||||
To create an owner hook, prefix the owner name with `~` (as in,
|
||||
`~youruser`).
|
||||
|
||||
To create a scope hook, prefix the scope name with `@` (as in,
|
||||
`@yourscope`).
|
||||
|
||||
The hook `id` used by `update` and `rm` are the IDs listed in `npm hook ls`
|
||||
for that particular hook.
|
||||
|
||||
The shared secret will be sent along to the URL endpoint so you can verify
|
||||
the request came from your own configured hook.
|
||||
|
||||
### Example
|
||||
|
||||
Add a hook to watch a package for changes:
|
||||
|
||||
```bash
|
||||
$ npm hook add lodash https://example.com/ my-shared-secret
|
||||
```
|
||||
|
||||
Add a hook to watch packages belonging to the user `substack`:
|
||||
|
||||
```bash
|
||||
$ npm hook add ~substack https://example.com/ my-shared-secret
|
||||
```
|
||||
|
||||
Add a hook to watch packages in the scope `@npm`
|
||||
|
||||
```bash
|
||||
$ npm hook add @npm https://example.com/ my-shared-secret
|
||||
```
|
||||
|
||||
List all your active hooks:
|
||||
|
||||
```bash
|
||||
$ npm hook ls
|
||||
```
|
||||
|
||||
List your active hooks for the `lodash` package:
|
||||
|
||||
```bash
|
||||
$ npm hook ls lodash
|
||||
```
|
||||
|
||||
Update an existing hook's url:
|
||||
|
||||
```bash
|
||||
$ npm hook update id-deadbeef https://my-new-website.here/
|
||||
```
|
||||
|
||||
Remove a hook:
|
||||
|
||||
```bash
|
||||
$ npm hook rm id-deadbeef
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
#### `registry`
|
||||
|
||||
* Default: "https://registry.npmjs.org/"
|
||||
* Type: URL
|
||||
|
||||
The base URL of the npm registry.
|
||||
|
||||
|
||||
|
||||
#### `otp`
|
||||
|
||||
* Default: null
|
||||
* Type: null or String
|
||||
|
||||
This is a one-time password from a two-factor authenticator. It's needed
|
||||
when publishing or changing package permissions with `npm access`.
|
||||
|
||||
If not set, and a registry response fails with a challenge for a one-time
|
||||
password, npm will prompt on the command line for one.
|
||||
|
||||
|
||||
|
||||
### See Also
|
||||
|
||||
* ["Introducing Hooks" blog post](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm)
|
||||
+1
-29
@@ -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@10.9.2 /path/to/npm
|
||||
npm@11.0.0 /path/to/npm
|
||||
└─┬ init-package-json@0.0.4
|
||||
└── promzard@0.1.5
|
||||
```
|
||||
@@ -43,34 +43,6 @@ dependencies, not the physical layout of your `node_modules` folder.
|
||||
|
||||
When run as `ll` or `la`, it shows extended information by default.
|
||||
|
||||
### Note: Design Changes Pending
|
||||
|
||||
The `npm ls` command's output and behavior made a _ton_ of sense when npm
|
||||
created a `node_modules` folder that naively nested every dependency. In
|
||||
such a case, the logical dependency graph and physical tree of packages on
|
||||
disk would be roughly identical.
|
||||
|
||||
With the advent of automatic install-time deduplication of dependencies in
|
||||
npm v3, the `ls` output was modified to display the logical dependency
|
||||
graph as a tree structure, since this was more useful to most users.
|
||||
However, without using `npm ls -l`, it became impossible to show _where_ a
|
||||
package was actually installed much of the time!
|
||||
|
||||
With the advent of automatic installation of `peerDependencies` in npm v7,
|
||||
this gets even more curious, as `peerDependencies` are logically
|
||||
"underneath" their dependents in the dependency graph, but are always
|
||||
physically at or above their location on disk.
|
||||
|
||||
Also, in the years since npm got an `ls` command (in version 0.0.2!),
|
||||
dependency graphs have gotten much larger as a general rule. Therefore, in
|
||||
order to avoid dumping an excessive amount of content to the terminal, `npm
|
||||
ls` now only shows the _top_ level dependencies, unless `--all` is
|
||||
provided.
|
||||
|
||||
A thorough re-examination of the use cases, intention, behavior, and output
|
||||
of this command, is currently underway. Expect significant changes to at
|
||||
least the default human-readable `npm ls` output in npm v8.
|
||||
|
||||
### Configuration
|
||||
|
||||
#### `all`
|
||||
|
||||
+14
@@ -103,6 +103,20 @@ the specified workspaces, and not on the root project.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
#### `ignore-scripts`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
If true, npm does not run scripts specified in package.json files.
|
||||
|
||||
Note that commands explicitly intended to run a particular script, such as
|
||||
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
|
||||
will still run their intended script if `ignore-scripts` is set, but they
|
||||
will *not* run any pre- or post-scripts.
|
||||
|
||||
|
||||
|
||||
### Description
|
||||
|
||||
For anything that's installable (that is, a package folder, tarball,
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ description: Display prefix
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm prefix [-g]
|
||||
npm prefix
|
||||
```
|
||||
|
||||
Note: This command is unaware of workspaces.
|
||||
|
||||
@@ -85,6 +85,9 @@ See [`developers`](/using-npm/developers) for full details on what's
|
||||
included in the published package, as well as details on how the package is
|
||||
built.
|
||||
|
||||
See [`package.json`](/configuring-npm/package-json) for more info on
|
||||
what can and can't be ignored.
|
||||
|
||||
### Configuration
|
||||
|
||||
#### `tag`
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ Note: This command is unaware of workspaces.
|
||||
|
||||
### Version
|
||||
|
||||
10.9.2
|
||||
11.0.0
|
||||
|
||||
### Description
|
||||
|
||||
|
||||
+1
-1
@@ -103,7 +103,7 @@ The full list is:
|
||||
- `username`
|
||||
- `_password`
|
||||
- `email`
|
||||
- `certfile` (path to certificate file)
|
||||
- `cafile` (path to certificate authority file)
|
||||
- `keyfile` (path to key file)
|
||||
|
||||
In order to scope these values, they must be prefixed by a URI fragment.
|
||||
|
||||
@@ -324,6 +324,7 @@ Some files are always ignored by default:
|
||||
if you wish it to be published)
|
||||
* `pnpm-lock.yaml`
|
||||
* `yarn.lock`
|
||||
* `bun.lockb`
|
||||
|
||||
Most of these ignored files can be included specifically if included in
|
||||
the `files` globs. Exceptions to this are:
|
||||
@@ -334,6 +335,7 @@ the `files` globs. Exceptions to this are:
|
||||
* `package-lock.json`
|
||||
* `pnpm-lock.yaml`
|
||||
* `yarn.lock`
|
||||
* `bun.lockb`
|
||||
|
||||
These can not be included.
|
||||
|
||||
@@ -1129,6 +1131,18 @@ Like the `os` option, you can also block architectures:
|
||||
|
||||
The host architecture is determined by `process.arch`
|
||||
|
||||
### libc
|
||||
|
||||
If your code only runs or builds in certain versions of libc, you can
|
||||
specify which ones. This field only applies if `os` is `linux`.
|
||||
|
||||
```json
|
||||
{
|
||||
"os": "linux",
|
||||
"libc": "glibc"
|
||||
}
|
||||
```
|
||||
|
||||
### devEngines
|
||||
|
||||
The `devEngines` field aids engineers working on a codebase to all be using the same tooling.
|
||||
|
||||
+6
-6
@@ -1833,9 +1833,9 @@ When set to `dev` or `development`, this is an alias for `--include=dev`.
|
||||
* Default: null
|
||||
* Type: null or String
|
||||
* DEPRECATED: `key` and `cert` are no longer used for most registry
|
||||
operations. Use registry scoped `keyfile` and `certfile` instead. Example:
|
||||
operations. Use registry scoped `keyfile` and `cafile` instead. Example:
|
||||
//other-registry.tld/:keyfile=/path/to/key.pem
|
||||
//other-registry.tld/:certfile=/path/to/cert.crt
|
||||
//other-registry.tld/:cafile=/path/to/cert.crt
|
||||
|
||||
A client certificate to pass when accessing the registry. Values should be
|
||||
in PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with
|
||||
@@ -1846,8 +1846,8 @@ cert="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
|
||||
```
|
||||
|
||||
It is _not_ the path to a certificate file, though you can set a
|
||||
registry-scoped "certfile" path like
|
||||
"//other-registry.tld/:certfile=/path/to/cert.pem".
|
||||
registry-scoped "cafile" path like
|
||||
"//other-registry.tld/:cafile=/path/to/cert.pem".
|
||||
|
||||
|
||||
|
||||
@@ -1938,9 +1938,9 @@ Alias for `--init-version`
|
||||
* Default: null
|
||||
* Type: null or String
|
||||
* DEPRECATED: `key` and `cert` are no longer used for most registry
|
||||
operations. Use registry scoped `keyfile` and `certfile` instead. Example:
|
||||
operations. Use registry scoped `keyfile` and `cafile` instead. Example:
|
||||
//other-registry.tld/:keyfile=/path/to/key.pem
|
||||
//other-registry.tld/:certfile=/path/to/cert.crt
|
||||
//other-registry.tld/:cafile=/path/to/cert.crt
|
||||
|
||||
A client key to pass when accessing the registry. Values should be in PEM
|
||||
format with newlines replaced by the string "\n". For example:
|
||||
|
||||
+5
-2
@@ -112,8 +112,8 @@ as `.gitignore` files:
|
||||
* You can end patterns with a forward slash `/` to specify a directory.
|
||||
* You can negate a pattern by starting it with an exclamation point `!`.
|
||||
|
||||
By default, the following paths and files are ignored, so there's no
|
||||
need to add them to `.npmignore` explicitly:
|
||||
By default, some paths and files are ignored, so there's no
|
||||
need to add them to `.npmignore` explicitly. Some examples are:
|
||||
|
||||
* `.*.swp`
|
||||
* `._*`
|
||||
@@ -148,6 +148,9 @@ property of `package.json`, which is an array of file or directory names
|
||||
that should be included in your package. Sometimes manually picking
|
||||
which items to allow is easier to manage than building a block list.
|
||||
|
||||
See [`package.json`](/configuring-npm/package-json) for more info on
|
||||
what can and can't be ignored.
|
||||
|
||||
#### Testing whether your `.npmignore` or `files` config works
|
||||
|
||||
If you want to double check that your package will include only the files
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-access----1092">
|
||||
<h1 id="----npm-access----1100">
|
||||
<span>npm-access</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-adduser----1100">
|
||||
<span>npm-adduser</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-audit----1100">
|
||||
<span>npm-audit</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-bugs----1100">
|
||||
<span>npm-bugs</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-cache----1100">
|
||||
<span>npm-cache</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-ci----1100">
|
||||
<span>npm-ci</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-completion----1100">
|
||||
<span>npm-completion</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-config----1100">
|
||||
<span>npm-config</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.0</span>
|
||||
</h1>
|
||||
<span class="description">Manage the npm configuration files</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-dedupe----1092">
|
||||
<h1 id="----npm-dedupe----1100">
|
||||
<span>npm-dedupe</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.0</span>
|
||||
</h1>
|
||||
<span class="description">Reduce 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-deprecate----1092">
|
||||
<h1 id="----npm-deprecate----1100">
|
||||
<span>npm-deprecate</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-diff----1100">
|
||||
<span>npm-diff</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-dist-tag----1100">
|
||||
<span>npm-dist-tag</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-docs----1100">
|
||||
<span>npm-docs</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-doctor----1100">
|
||||
<span>npm-doctor</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-edit----1100">
|
||||
<span>npm-edit</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-exec----1100">
|
||||
<span>npm-exec</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-explain----1100">
|
||||
<span>npm-explain</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-explore----1100">
|
||||
<span>npm-explore</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-find-dupes----1100">
|
||||
<span>npm-find-dupes</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-fund----1100">
|
||||
<span>npm-fund</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-help-search----1100">
|
||||
<span>npm-help-search</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-help----1100">
|
||||
<span>npm-help</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.0</span>
|
||||
</h1>
|
||||
<span class="description">Get help on npm</span>
|
||||
</header>
|
||||
|
||||
-234
@@ -1,234 +0,0 @@
|
||||
<!DOCTYPE html><html><head>
|
||||
<meta charset="utf-8">
|
||||
<title>npm-hook</title>
|
||||
<style>
|
||||
body {
|
||||
background-color: #ffffff;
|
||||
color: #24292e;
|
||||
|
||||
margin: 0;
|
||||
|
||||
line-height: 1.5;
|
||||
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
|
||||
}
|
||||
#rainbar {
|
||||
height: 10px;
|
||||
background-image: linear-gradient(139deg, #fb8817, #ff4b01, #c12127, #e02aff);
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: #0366d6;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
pre {
|
||||
margin: 1em 0px;
|
||||
padding: 1em;
|
||||
border: solid 1px #e1e4e8;
|
||||
border-radius: 6px;
|
||||
|
||||
display: block;
|
||||
overflow: auto;
|
||||
|
||||
white-space: pre;
|
||||
|
||||
background-color: #f6f8fa;
|
||||
color: #393a34;
|
||||
}
|
||||
code {
|
||||
font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||
font-size: 85%;
|
||||
padding: 0.2em 0.4em;
|
||||
background-color: #f6f8fa;
|
||||
color: #393a34;
|
||||
}
|
||||
pre > code {
|
||||
padding: 0;
|
||||
background-color: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
h1, h2, h3 {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
#logobar {
|
||||
background-color: #333333;
|
||||
margin: 0 auto;
|
||||
padding: 1em 4em;
|
||||
}
|
||||
#logobar .logo {
|
||||
float: left;
|
||||
}
|
||||
#logobar .title {
|
||||
font-weight: 600;
|
||||
color: #dddddd;
|
||||
float: left;
|
||||
margin: 5px 0 0 1em;
|
||||
}
|
||||
#logobar:after {
|
||||
content: "";
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#content {
|
||||
margin: 0 auto;
|
||||
padding: 0 4em;
|
||||
}
|
||||
|
||||
#table_of_contents > h2 {
|
||||
font-size: 1.17em;
|
||||
}
|
||||
#table_of_contents ul:first-child {
|
||||
border: solid 1px #e1e4e8;
|
||||
border-radius: 6px;
|
||||
padding: 1em;
|
||||
background-color: #f6f8fa;
|
||||
color: #393a34;
|
||||
}
|
||||
#table_of_contents ul {
|
||||
list-style-type: none;
|
||||
padding-left: 1.5em;
|
||||
}
|
||||
#table_of_contents li {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
#table_of_contents li a {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
header.title {
|
||||
border-bottom: solid 1px #e1e4e8;
|
||||
}
|
||||
header.title > h1 {
|
||||
margin-bottom: 0.25em;
|
||||
}
|
||||
header.title > .description {
|
||||
display: block;
|
||||
margin-bottom: 0.5em;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
header.title .version {
|
||||
font-size: 0.8em;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
footer#edit {
|
||||
border-top: solid 1px #e1e4e8;
|
||||
margin: 3em 0 4em 0;
|
||||
padding-top: 2em;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="banner">
|
||||
<div id="rainbar"></div>
|
||||
<div id="logobar">
|
||||
<svg class="logo" role="img" height="32" width="32" viewBox="0 0 700 700">
|
||||
<polygon fill="#cb0000" points="0,700 700,700 700,0 0,0"></polygon>
|
||||
<polygon fill="#ffffff" points="150,550 350,550 350,250 450,250 450,550 550,550 550,150 150,150"></polygon>
|
||||
</svg>
|
||||
<div class="title">
|
||||
npm command-line interface
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-hook----1092">
|
||||
<span>npm-hook</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
</h1>
|
||||
<span class="description">Manage registry hooks</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="#example">Example</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#registry"><code>registry</code></a></li><li><a href="#otp"><code>otp</code></a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
|
||||
</section>
|
||||
|
||||
<div id="_content"><h3 id="synopsis">Synopsis</h3>
|
||||
<pre><code class="language-bash">npm hook add <pkg> <url> <secret> [--type=<type>]
|
||||
npm hook ls [pkg]
|
||||
npm hook rm <id>
|
||||
npm hook update <id> <url> <secret>
|
||||
</code></pre>
|
||||
<p>Note: This command is unaware of workspaces.</p>
|
||||
<h3 id="description">Description</h3>
|
||||
<p>Allows you to manage <a href="https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm">npm
|
||||
hooks</a>,
|
||||
including adding, removing, listing, and updating.</p>
|
||||
<p>Hooks allow you to configure URL endpoints that will be notified whenever a
|
||||
change happens to any of the supported entity types. Three different types
|
||||
of entities can be watched by hooks: packages, owners, and scopes.</p>
|
||||
<p>To create a package hook, simply reference the package name.</p>
|
||||
<p>To create an owner hook, prefix the owner name with <code>~</code> (as in,
|
||||
<code>~youruser</code>).</p>
|
||||
<p>To create a scope hook, prefix the scope name with <code>@</code> (as in,
|
||||
<code>@yourscope</code>).</p>
|
||||
<p>The hook <code>id</code> used by <code>update</code> and <code>rm</code> are the IDs listed in <code>npm hook ls</code>
|
||||
for that particular hook.</p>
|
||||
<p>The shared secret will be sent along to the URL endpoint so you can verify
|
||||
the request came from your own configured hook.</p>
|
||||
<h3 id="example">Example</h3>
|
||||
<p>Add a hook to watch a package for changes:</p>
|
||||
<pre><code class="language-bash">$ npm hook add lodash https://example.com/ my-shared-secret
|
||||
</code></pre>
|
||||
<p>Add a hook to watch packages belonging to the user <code>substack</code>:</p>
|
||||
<pre><code class="language-bash">$ npm hook add ~substack https://example.com/ my-shared-secret
|
||||
</code></pre>
|
||||
<p>Add a hook to watch packages in the scope <code>@npm</code></p>
|
||||
<pre><code class="language-bash">$ npm hook add @npm https://example.com/ my-shared-secret
|
||||
</code></pre>
|
||||
<p>List all your active hooks:</p>
|
||||
<pre><code class="language-bash">$ npm hook ls
|
||||
</code></pre>
|
||||
<p>List your active hooks for the <code>lodash</code> package:</p>
|
||||
<pre><code class="language-bash">$ npm hook ls lodash
|
||||
</code></pre>
|
||||
<p>Update an existing hook's url:</p>
|
||||
<pre><code class="language-bash">$ npm hook update id-deadbeef https://my-new-website.here/
|
||||
</code></pre>
|
||||
<p>Remove a hook:</p>
|
||||
<pre><code class="language-bash">$ npm hook rm id-deadbeef
|
||||
</code></pre>
|
||||
<h3 id="configuration">Configuration</h3>
|
||||
<h4 id="registry"><code>registry</code></h4>
|
||||
<ul>
|
||||
<li>Default: "<a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a>"</li>
|
||||
<li>Type: URL</li>
|
||||
</ul>
|
||||
<p>The base URL of the npm registry.</p>
|
||||
<h4 id="otp"><code>otp</code></h4>
|
||||
<ul>
|
||||
<li>Default: null</li>
|
||||
<li>Type: null or String</li>
|
||||
</ul>
|
||||
<p>This is a one-time password from a two-factor authenticator. It's needed
|
||||
when publishing or changing package permissions with <code>npm access</code>.</p>
|
||||
<p>If not set, and a registry response fails with a challenge for a one-time
|
||||
password, npm will prompt on the command line for one.</p>
|
||||
<h3 id="see-also">See Also</h3>
|
||||
<ul>
|
||||
<li><a href="https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm">"Introducing Hooks" blog post</a></li>
|
||||
</ul></div>
|
||||
|
||||
<footer id="edit">
|
||||
<a href="https://github.com/npm/cli/edit/latest/docs/content/commands/npm-hook.md">
|
||||
<svg role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentcolor" style="vertical-align: text-bottom; margin-right: 0.3em;">
|
||||
<path fill-rule="evenodd" d="M11.013 1.427a1.75 1.75 0 012.474 0l1.086 1.086a1.75 1.75 0 010 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 01-.927-.928l.929-3.25a1.75 1.75 0 01.445-.758l8.61-8.61zm1.414 1.06a.25.25 0 00-.354 0L10.811 3.75l1.439 1.44 1.263-1.263a.25.25 0 000-.354l-1.086-1.086zM11.189 6.25L9.75 4.81l-6.286 6.287a.25.25 0 00-.064.108l-.558 1.953 1.953-.558a.249.249 0 00.108-.064l6.286-6.286z"></path>
|
||||
</svg>
|
||||
Edit this page on GitHub
|
||||
</a>
|
||||
</footer>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
</body></html>
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-init----1092">
|
||||
<h1 id="----npm-init----1100">
|
||||
<span>npm-init</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-install-ci-test----1100">
|
||||
<span>npm-install-ci-test</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-install-test----1100">
|
||||
<span>npm-install-test</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.0</span>
|
||||
</h1>
|
||||
<span class="description">Install package(s) 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----1092">
|
||||
<h1 id="----npm-install----1100">
|
||||
<span>npm-install</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.0</span>
|
||||
</h1>
|
||||
<span class="description">Install a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-link----1092">
|
||||
<h1 id="----npm-link----1100">
|
||||
<span>npm-link</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-login----1100">
|
||||
<span>npm-login</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-logout----1100">
|
||||
<span>npm-logout</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.0</span>
|
||||
</h1>
|
||||
<span class="description">Log out of the registry</span>
|
||||
</header>
|
||||
|
||||
+4
-25
@@ -141,16 +141,16 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-ls----1092">
|
||||
<h1 id="----npm-ls----1100">
|
||||
<span>npm-ls</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.0</span>
|
||||
</h1>
|
||||
<span class="description">List installed packages</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="#note-design-changes-pending">Note: Design Changes Pending</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#all"><code>all</code></a></li><li><a href="#json"><code>json</code></a></li><li><a href="#long"><code>long</code></a></li><li><a href="#parseable"><code>parseable</code></a></li><li><a href="#global"><code>global</code></a></li><li><a href="#depth"><code>depth</code></a></li><li><a href="#omit"><code>omit</code></a></li><li><a href="#include"><code>include</code></a></li><li><a href="#link"><code>link</code></a></li><li><a href="#package-lock-only"><code>package-lock-only</code></a></li><li><a href="#unicode"><code>unicode</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="#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><li><a href="#configuration">Configuration</a></li><ul><li><a href="#all"><code>all</code></a></li><li><a href="#json"><code>json</code></a></li><li><a href="#long"><code>long</code></a></li><li><a href="#parseable"><code>parseable</code></a></li><li><a href="#global"><code>global</code></a></li><li><a href="#depth"><code>depth</code></a></li><li><a href="#omit"><code>omit</code></a></li><li><a href="#include"><code>include</code></a></li><li><a href="#link"><code>link</code></a></li><li><a href="#package-lock-only"><code>package-lock-only</code></a></li><li><a href="#unicode"><code>unicode</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="#see-also">See Also</a></li></ul></div>
|
||||
</section>
|
||||
|
||||
<div id="_content"><h3 id="synopsis">Synopsis</h3>
|
||||
@@ -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@10.9.2 /path/to/npm
|
||||
<pre><code class="language-bash">npm@11.0.0 /path/to/npm
|
||||
└─┬ init-package-json@0.0.4
|
||||
└── promzard@0.1.5
|
||||
</code></pre>
|
||||
@@ -179,27 +179,6 @@ recognize potential forks of a project.</p>
|
||||
<p>The tree shown is the logical dependency tree, based on package
|
||||
dependencies, not the physical layout of your <code>node_modules</code> folder.</p>
|
||||
<p>When run as <code>ll</code> or <code>la</code>, it shows extended information by default.</p>
|
||||
<h3 id="note-design-changes-pending">Note: Design Changes Pending</h3>
|
||||
<p>The <code>npm ls</code> command's output and behavior made a <em>ton</em> of sense when npm
|
||||
created a <code>node_modules</code> folder that naively nested every dependency. In
|
||||
such a case, the logical dependency graph and physical tree of packages on
|
||||
disk would be roughly identical.</p>
|
||||
<p>With the advent of automatic install-time deduplication of dependencies in
|
||||
npm v3, the <code>ls</code> output was modified to display the logical dependency
|
||||
graph as a tree structure, since this was more useful to most users.
|
||||
However, without using <code>npm ls -l</code>, it became impossible to show <em>where</em> a
|
||||
package was actually installed much of the time!</p>
|
||||
<p>With the advent of automatic installation of <code>peerDependencies</code> in npm v7,
|
||||
this gets even more curious, as <code>peerDependencies</code> are logically
|
||||
"underneath" their dependents in the dependency graph, but are always
|
||||
physically at or above their location on disk.</p>
|
||||
<p>Also, in the years since npm got an <code>ls</code> command (in version 0.0.2!),
|
||||
dependency graphs have gotten much larger as a general rule. Therefore, in
|
||||
order to avoid dumping an excessive amount of content to the terminal, <code>npm ls</code> now only shows the <em>top</em> level dependencies, unless <code>--all</code> is
|
||||
provided.</p>
|
||||
<p>A thorough re-examination of the use cases, intention, behavior, and output
|
||||
of this command, is currently underway. Expect significant changes to at
|
||||
least the default human-readable <code>npm ls</code> output in npm v8.</p>
|
||||
<h3 id="configuration">Configuration</h3>
|
||||
<h4 id="all"><code>all</code></h4>
|
||||
<ul>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-org----1092">
|
||||
<h1 id="----npm-org----1100">
|
||||
<span>npm-org</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-outdated----1100">
|
||||
<span>npm-outdated</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-owner----1100">
|
||||
<span>npm-owner</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.0</span>
|
||||
</h1>
|
||||
<span class="description">Manage package owners</span>
|
||||
</header>
|
||||
|
||||
+13
-3
@@ -141,16 +141,16 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-pack----1092">
|
||||
<h1 id="----npm-pack----1100">
|
||||
<span>npm-pack</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.0</span>
|
||||
</h1>
|
||||
<span class="description">Create a tarball from 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="#configuration">Configuration</a></li><ul><li><a href="#dry-run"><code>dry-run</code></a></li><li><a href="#json"><code>json</code></a></li><li><a href="#pack-destination"><code>pack-destination</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></ul><li><a href="#description">Description</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="#configuration">Configuration</a></li><ul><li><a href="#dry-run"><code>dry-run</code></a></li><li><a href="#json"><code>json</code></a></li><li><a href="#pack-destination"><code>pack-destination</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="#ignore-scripts"><code>ignore-scripts</code></a></li></ul><li><a href="#description">Description</a></li><li><a href="#see-also">See Also</a></li></ul></div>
|
||||
</section>
|
||||
|
||||
<div id="_content"><h3 id="synopsis">Synopsis</h3>
|
||||
@@ -230,6 +230,16 @@ other things (test, exec, publish, etc.) will operate on the root project,
|
||||
all workspaces via the <code>workspaces</code> flag, will cause npm to operate only on
|
||||
the specified workspaces, and not on the root project.</p>
|
||||
<p>This value is not exported to the environment for child processes.</p>
|
||||
<h4 id="ignore-scripts"><code>ignore-scripts</code></h4>
|
||||
<ul>
|
||||
<li>Default: false</li>
|
||||
<li>Type: Boolean</li>
|
||||
</ul>
|
||||
<p>If true, npm does not run scripts specified in package.json files.</p>
|
||||
<p>Note that commands explicitly intended to run a particular script, such as
|
||||
<code>npm start</code>, <code>npm stop</code>, <code>npm restart</code>, <code>npm test</code>, and <code>npm run-script</code>
|
||||
will still run their intended script if <code>ignore-scripts</code> is set, but they
|
||||
will <em>not</em> run any pre- or post-scripts.</p>
|
||||
<h3 id="description">Description</h3>
|
||||
<p>For anything that's installable (that is, a package folder, tarball,
|
||||
tarball url, git url, name@tag, name@version, name, or scoped name), this
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-ping----1092">
|
||||
<h1 id="----npm-ping----1100">
|
||||
<span>npm-ping</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-pkg----1100">
|
||||
<span>npm-pkg</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.0</span>
|
||||
</h1>
|
||||
<span class="description">Manages your package.json</span>
|
||||
</header>
|
||||
|
||||
+3
-3
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-prefix----1092">
|
||||
<h1 id="----npm-prefix----1100">
|
||||
<span>npm-prefix</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.0</span>
|
||||
</h1>
|
||||
<span class="description">Display prefix</span>
|
||||
</header>
|
||||
@@ -154,7 +154,7 @@ npm command-line interface
|
||||
</section>
|
||||
|
||||
<div id="_content"><h3 id="synopsis">Synopsis</h3>
|
||||
<pre><code class="language-bash">npm prefix [-g]
|
||||
<pre><code class="language-bash">npm prefix
|
||||
</code></pre>
|
||||
<p>Note: This command is unaware of workspaces.</p>
|
||||
<h3 id="description">Description</h3>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-profile----1092">
|
||||
<h1 id="----npm-profile----1100">
|
||||
<span>npm-profile</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-prune----1100">
|
||||
<span>npm-prune</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.0</span>
|
||||
</h1>
|
||||
<span class="description">Remove extraneous packages</span>
|
||||
</header>
|
||||
|
||||
+4
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-publish----1092">
|
||||
<h1 id="----npm-publish----1100">
|
||||
<span>npm-publish</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.0</span>
|
||||
</h1>
|
||||
<span class="description">Publish a package</span>
|
||||
</header>
|
||||
@@ -225,6 +225,8 @@ un-ignored with a <code>!</code> rule in a <code>.npmignore</code> or <code>.git
|
||||
<p>See <a href="../using-npm/developers.html"><code>developers</code></a> for full details on what's
|
||||
included in the published package, as well as details on how the package is
|
||||
built.</p>
|
||||
<p>See <a href="../configuring-npm/package-json.html"><code>package.json</code></a> for more info on
|
||||
what can and can't be ignored.</p>
|
||||
<h3 id="configuration">Configuration</h3>
|
||||
<h4 id="tag"><code>tag</code></h4>
|
||||
<ul>
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-query----1092">
|
||||
<h1 id="----npm-query----1100">
|
||||
<span>npm-query</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-rebuild----1100">
|
||||
<span>npm-rebuild</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-repo----1100">
|
||||
<span>npm-repo</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-restart----1100">
|
||||
<span>npm-restart</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-root----1100">
|
||||
<span>npm-root</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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-script----1092">
|
||||
<h1 id="----npm-run-script----1100">
|
||||
<span>npm-run-script</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-sbom----1100">
|
||||
<span>npm-sbom</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-search----1100">
|
||||
<span>npm-search</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-shrinkwrap----1100">
|
||||
<span>npm-shrinkwrap</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-star----1100">
|
||||
<span>npm-star</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-stars----1100">
|
||||
<span>npm-stars</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-start----1100">
|
||||
<span>npm-start</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-stop----1100">
|
||||
<span>npm-stop</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-team----1100">
|
||||
<span>npm-team</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-test----1100">
|
||||
<span>npm-test</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-token----1100">
|
||||
<span>npm-token</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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-uninstall----1092">
|
||||
<h1 id="----npm-uninstall----1100">
|
||||
<span>npm-uninstall</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-unpublish----1100">
|
||||
<span>npm-unpublish</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-unstar----1100">
|
||||
<span>npm-unstar</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-update----1100">
|
||||
<span>npm-update</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-version----1100">
|
||||
<span>npm-version</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-view----1100">
|
||||
<span>npm-view</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm-whoami----1100">
|
||||
<span>npm-whoami</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----npm----1100">
|
||||
<span>npm</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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>10.9.2</p>
|
||||
<p>11.0.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
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npx----1092">
|
||||
<h1 id="----npx----1100">
|
||||
<span>npx</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----folders----1100">
|
||||
<span>folders</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----install----1100">
|
||||
<span>install</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----folders----1100">
|
||||
<span>folders</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.0</span>
|
||||
</h1>
|
||||
<span class="description">Folder Structures Used by npm</span>
|
||||
</header>
|
||||
|
||||
+13
-3
@@ -141,16 +141,16 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----packagejson----1092">
|
||||
<h1 id="----packagejson----1100">
|
||||
<span>package.json</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.0</span>
|
||||
</h1>
|
||||
<span class="description">Specifics of npm's package.json handling</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><li><a href="#name">name</a></li><li><a href="#version">version</a></li><li><a href="#description2">description</a></li><li><a href="#keywords">keywords</a></li><li><a href="#homepage">homepage</a></li><li><a href="#bugs">bugs</a></li><li><a href="#license">license</a></li><li><a href="#people-fields-author-contributors">people fields: author, contributors</a></li><li><a href="#funding">funding</a></li><li><a href="#files">files</a></li><li><a href="#exports">exports</a></li><li><a href="#main">main</a></li><li><a href="#browser">browser</a></li><li><a href="#bin">bin</a></li><li><a href="#man">man</a></li><li><a href="#directories">directories</a></li><ul><li><a href="#directoriesbin">directories.bin</a></li><li><a href="#directoriesman">directories.man</a></li></ul><li><a href="#repository">repository</a></li><li><a href="#scripts">scripts</a></li><li><a href="#config">config</a></li><li><a href="#dependencies">dependencies</a></li><ul><li><a href="#urls-as-dependencies">URLs as Dependencies</a></li><li><a href="#git-urls-as-dependencies">Git URLs as Dependencies</a></li><li><a href="#github-urls">GitHub URLs</a></li><li><a href="#local-paths">Local Paths</a></li></ul><li><a href="#devdependencies">devDependencies</a></li><li><a href="#peerdependencies">peerDependencies</a></li><li><a href="#peerdependenciesmeta">peerDependenciesMeta</a></li><li><a href="#bundledependencies">bundleDependencies</a></li><li><a href="#optionaldependencies">optionalDependencies</a></li><li><a href="#overrides">overrides</a></li><li><a href="#engines">engines</a></li><li><a href="#os">os</a></li><li><a href="#cpu">cpu</a></li><li><a href="#devengines">devEngines</a></li><li><a href="#private">private</a></li><li><a href="#publishconfig">publishConfig</a></li><li><a href="#workspaces">workspaces</a></li><li><a href="#default-values">DEFAULT VALUES</a></li><li><a href="#see-also">SEE ALSO</a></li></ul></div>
|
||||
<div id="_table_of_contents"><ul><li><a href="#description">Description</a></li><li><a href="#name">name</a></li><li><a href="#version">version</a></li><li><a href="#description2">description</a></li><li><a href="#keywords">keywords</a></li><li><a href="#homepage">homepage</a></li><li><a href="#bugs">bugs</a></li><li><a href="#license">license</a></li><li><a href="#people-fields-author-contributors">people fields: author, contributors</a></li><li><a href="#funding">funding</a></li><li><a href="#files">files</a></li><li><a href="#exports">exports</a></li><li><a href="#main">main</a></li><li><a href="#browser">browser</a></li><li><a href="#bin">bin</a></li><li><a href="#man">man</a></li><li><a href="#directories">directories</a></li><ul><li><a href="#directoriesbin">directories.bin</a></li><li><a href="#directoriesman">directories.man</a></li></ul><li><a href="#repository">repository</a></li><li><a href="#scripts">scripts</a></li><li><a href="#config">config</a></li><li><a href="#dependencies">dependencies</a></li><ul><li><a href="#urls-as-dependencies">URLs as Dependencies</a></li><li><a href="#git-urls-as-dependencies">Git URLs as Dependencies</a></li><li><a href="#github-urls">GitHub URLs</a></li><li><a href="#local-paths">Local Paths</a></li></ul><li><a href="#devdependencies">devDependencies</a></li><li><a href="#peerdependencies">peerDependencies</a></li><li><a href="#peerdependenciesmeta">peerDependenciesMeta</a></li><li><a href="#bundledependencies">bundleDependencies</a></li><li><a href="#optionaldependencies">optionalDependencies</a></li><li><a href="#overrides">overrides</a></li><li><a href="#engines">engines</a></li><li><a href="#os">os</a></li><li><a href="#cpu">cpu</a></li><li><a href="#libc">libc</a></li><li><a href="#devengines">devEngines</a></li><li><a href="#private">private</a></li><li><a href="#publishconfig">publishConfig</a></li><li><a href="#workspaces">workspaces</a></li><li><a href="#default-values">DEFAULT VALUES</a></li><li><a href="#see-also">SEE ALSO</a></li></ul></div>
|
||||
</section>
|
||||
|
||||
<div id="_content"><h3 id="description">Description</h3>
|
||||
@@ -399,6 +399,7 @@ will be used instead.</p>
|
||||
if you wish it to be published)</li>
|
||||
<li><code>pnpm-lock.yaml</code></li>
|
||||
<li><code>yarn.lock</code></li>
|
||||
<li><code>bun.lockb</code></li>
|
||||
</ul>
|
||||
<p>Most of these ignored files can be included specifically if included in
|
||||
the <code>files</code> globs. Exceptions to this are:</p>
|
||||
@@ -409,6 +410,7 @@ the <code>files</code> globs. Exceptions to this are:</p>
|
||||
<li><code>package-lock.json</code></li>
|
||||
<li><code>pnpm-lock.yaml</code></li>
|
||||
<li><code>yarn.lock</code></li>
|
||||
<li><code>bun.lockb</code></li>
|
||||
</ul>
|
||||
<p>These can not be included.</p>
|
||||
<h3 id="exports">exports</h3>
|
||||
@@ -1007,6 +1009,14 @@ you can specify which ones.</p>
|
||||
}
|
||||
</code></pre>
|
||||
<p>The host architecture is determined by <code>process.arch</code></p>
|
||||
<h3 id="libc">libc</h3>
|
||||
<p>If your code only runs or builds in certain versions of libc, you can
|
||||
specify which ones. This field only applies if <code>os</code> is <code>linux</code>.</p>
|
||||
<pre><code class="language-json">{
|
||||
"os": "linux",
|
||||
"libc": "glibc"
|
||||
}
|
||||
</code></pre>
|
||||
<h3 id="devengines">devEngines</h3>
|
||||
<p>The <code>devEngines</code> field aids engineers working on a codebase to all be using the same tooling.</p>
|
||||
<p>You can specify a <code>devEngines</code> property in your <code>package.json</code> which will run before <code>install</code>, <code>ci</code>, and <code>run</code> commands.</p>
|
||||
|
||||
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-shrinkwrapjson----1092">
|
||||
<h1 id="----npm-shrinkwrapjson----1100">
|
||||
<span>npm-shrinkwrap.json</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.0</span>
|
||||
</h1>
|
||||
<span class="description">A publishable lockfile</span>
|
||||
</header>
|
||||
|
||||
+3
-3
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npmrc----1092">
|
||||
<h1 id="----npmrc----1100">
|
||||
<span>npmrc</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.0</span>
|
||||
</h1>
|
||||
<span class="description">The npm config files</span>
|
||||
</header>
|
||||
@@ -223,7 +223,7 @@ credentials to the wrong host.</p>
|
||||
<li><code>username</code></li>
|
||||
<li><code>_password</code></li>
|
||||
<li><code>email</code></li>
|
||||
<li><code>certfile</code> (path to certificate file)</li>
|
||||
<li><code>cafile</code> (path to certificate authority file)</li>
|
||||
<li><code>keyfile</code> (path to key file)</li>
|
||||
</ul>
|
||||
<p>In order to scope these values, they must be prefixed by a URI fragment.
|
||||
|
||||
+13
-3
@@ -141,16 +141,16 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----packagejson----1092">
|
||||
<h1 id="----packagejson----1100">
|
||||
<span>package.json</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.0</span>
|
||||
</h1>
|
||||
<span class="description">Specifics of npm's package.json handling</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><li><a href="#name">name</a></li><li><a href="#version">version</a></li><li><a href="#description2">description</a></li><li><a href="#keywords">keywords</a></li><li><a href="#homepage">homepage</a></li><li><a href="#bugs">bugs</a></li><li><a href="#license">license</a></li><li><a href="#people-fields-author-contributors">people fields: author, contributors</a></li><li><a href="#funding">funding</a></li><li><a href="#files">files</a></li><li><a href="#exports">exports</a></li><li><a href="#main">main</a></li><li><a href="#browser">browser</a></li><li><a href="#bin">bin</a></li><li><a href="#man">man</a></li><li><a href="#directories">directories</a></li><ul><li><a href="#directoriesbin">directories.bin</a></li><li><a href="#directoriesman">directories.man</a></li></ul><li><a href="#repository">repository</a></li><li><a href="#scripts">scripts</a></li><li><a href="#config">config</a></li><li><a href="#dependencies">dependencies</a></li><ul><li><a href="#urls-as-dependencies">URLs as Dependencies</a></li><li><a href="#git-urls-as-dependencies">Git URLs as Dependencies</a></li><li><a href="#github-urls">GitHub URLs</a></li><li><a href="#local-paths">Local Paths</a></li></ul><li><a href="#devdependencies">devDependencies</a></li><li><a href="#peerdependencies">peerDependencies</a></li><li><a href="#peerdependenciesmeta">peerDependenciesMeta</a></li><li><a href="#bundledependencies">bundleDependencies</a></li><li><a href="#optionaldependencies">optionalDependencies</a></li><li><a href="#overrides">overrides</a></li><li><a href="#engines">engines</a></li><li><a href="#os">os</a></li><li><a href="#cpu">cpu</a></li><li><a href="#devengines">devEngines</a></li><li><a href="#private">private</a></li><li><a href="#publishconfig">publishConfig</a></li><li><a href="#workspaces">workspaces</a></li><li><a href="#default-values">DEFAULT VALUES</a></li><li><a href="#see-also">SEE ALSO</a></li></ul></div>
|
||||
<div id="_table_of_contents"><ul><li><a href="#description">Description</a></li><li><a href="#name">name</a></li><li><a href="#version">version</a></li><li><a href="#description2">description</a></li><li><a href="#keywords">keywords</a></li><li><a href="#homepage">homepage</a></li><li><a href="#bugs">bugs</a></li><li><a href="#license">license</a></li><li><a href="#people-fields-author-contributors">people fields: author, contributors</a></li><li><a href="#funding">funding</a></li><li><a href="#files">files</a></li><li><a href="#exports">exports</a></li><li><a href="#main">main</a></li><li><a href="#browser">browser</a></li><li><a href="#bin">bin</a></li><li><a href="#man">man</a></li><li><a href="#directories">directories</a></li><ul><li><a href="#directoriesbin">directories.bin</a></li><li><a href="#directoriesman">directories.man</a></li></ul><li><a href="#repository">repository</a></li><li><a href="#scripts">scripts</a></li><li><a href="#config">config</a></li><li><a href="#dependencies">dependencies</a></li><ul><li><a href="#urls-as-dependencies">URLs as Dependencies</a></li><li><a href="#git-urls-as-dependencies">Git URLs as Dependencies</a></li><li><a href="#github-urls">GitHub URLs</a></li><li><a href="#local-paths">Local Paths</a></li></ul><li><a href="#devdependencies">devDependencies</a></li><li><a href="#peerdependencies">peerDependencies</a></li><li><a href="#peerdependenciesmeta">peerDependenciesMeta</a></li><li><a href="#bundledependencies">bundleDependencies</a></li><li><a href="#optionaldependencies">optionalDependencies</a></li><li><a href="#overrides">overrides</a></li><li><a href="#engines">engines</a></li><li><a href="#os">os</a></li><li><a href="#cpu">cpu</a></li><li><a href="#libc">libc</a></li><li><a href="#devengines">devEngines</a></li><li><a href="#private">private</a></li><li><a href="#publishconfig">publishConfig</a></li><li><a href="#workspaces">workspaces</a></li><li><a href="#default-values">DEFAULT VALUES</a></li><li><a href="#see-also">SEE ALSO</a></li></ul></div>
|
||||
</section>
|
||||
|
||||
<div id="_content"><h3 id="description">Description</h3>
|
||||
@@ -399,6 +399,7 @@ will be used instead.</p>
|
||||
if you wish it to be published)</li>
|
||||
<li><code>pnpm-lock.yaml</code></li>
|
||||
<li><code>yarn.lock</code></li>
|
||||
<li><code>bun.lockb</code></li>
|
||||
</ul>
|
||||
<p>Most of these ignored files can be included specifically if included in
|
||||
the <code>files</code> globs. Exceptions to this are:</p>
|
||||
@@ -409,6 +410,7 @@ the <code>files</code> globs. Exceptions to this are:</p>
|
||||
<li><code>package-lock.json</code></li>
|
||||
<li><code>pnpm-lock.yaml</code></li>
|
||||
<li><code>yarn.lock</code></li>
|
||||
<li><code>bun.lockb</code></li>
|
||||
</ul>
|
||||
<p>These can not be included.</p>
|
||||
<h3 id="exports">exports</h3>
|
||||
@@ -1007,6 +1009,14 @@ you can specify which ones.</p>
|
||||
}
|
||||
</code></pre>
|
||||
<p>The host architecture is determined by <code>process.arch</code></p>
|
||||
<h3 id="libc">libc</h3>
|
||||
<p>If your code only runs or builds in certain versions of libc, you can
|
||||
specify which ones. This field only applies if <code>os</code> is <code>linux</code>.</p>
|
||||
<pre><code class="language-json">{
|
||||
"os": "linux",
|
||||
"libc": "glibc"
|
||||
}
|
||||
</code></pre>
|
||||
<h3 id="devengines">devEngines</h3>
|
||||
<p>The <code>devEngines</code> field aids engineers working on a codebase to all be using the same tooling.</p>
|
||||
<p>You can specify a <code>devEngines</code> property in your <code>package.json</code> which will run before <code>install</code>, <code>ci</code>, and <code>run</code> commands.</p>
|
||||
|
||||
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----package-lockjson----1092">
|
||||
<h1 id="----package-lockjson----1100">
|
||||
<span>package-lock.json</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.0</span>
|
||||
</h1>
|
||||
<span class="description">A manifestation of the manifest</span>
|
||||
</header>
|
||||
|
||||
+8
-8
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----config----1092">
|
||||
<h1 id="----config----1100">
|
||||
<span>config</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.0</span>
|
||||
</h1>
|
||||
<span class="description">More than you probably want to know about npm configuration</span>
|
||||
</header>
|
||||
@@ -1468,9 +1468,9 @@ command line.</p>
|
||||
<li>Default: null</li>
|
||||
<li>Type: null or String</li>
|
||||
<li>DEPRECATED: <code>key</code> and <code>cert</code> are no longer used for most registry
|
||||
operations. Use registry scoped <code>keyfile</code> and <code>certfile</code> instead. Example:
|
||||
operations. Use registry scoped <code>keyfile</code> and <code>cafile</code> instead. Example:
|
||||
//other-registry.tld/:keyfile=/path/to/key.pem
|
||||
//other-registry.tld/:certfile=/path/to/cert.crt</li>
|
||||
//other-registry.tld/:cafile=/path/to/cert.crt</li>
|
||||
</ul>
|
||||
<p>A client certificate to pass when accessing the registry. Values should be
|
||||
in PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with
|
||||
@@ -1478,8 +1478,8 @@ newlines replaced by the string "\n". For example:</p>
|
||||
<pre><code class="language-ini">cert="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
|
||||
</code></pre>
|
||||
<p>It is <em>not</em> the path to a certificate file, though you can set a
|
||||
registry-scoped "certfile" path like
|
||||
"//other-registry.tld/:certfile=/path/to/cert.pem".</p>
|
||||
registry-scoped "cafile" path like
|
||||
"//other-registry.tld/:cafile=/path/to/cert.pem".</p>
|
||||
<h4 id="dev"><code>dev</code></h4>
|
||||
<ul>
|
||||
<li>Default: false</li>
|
||||
@@ -1543,9 +1543,9 @@ on deeper dependencies. Sets <code>--install-strategy=shallow</code>.</p>
|
||||
<li>Default: null</li>
|
||||
<li>Type: null or String</li>
|
||||
<li>DEPRECATED: <code>key</code> and <code>cert</code> are no longer used for most registry
|
||||
operations. Use registry scoped <code>keyfile</code> and <code>certfile</code> instead. Example:
|
||||
operations. Use registry scoped <code>keyfile</code> and <code>cafile</code> instead. Example:
|
||||
//other-registry.tld/:keyfile=/path/to/key.pem
|
||||
//other-registry.tld/:certfile=/path/to/cert.crt</li>
|
||||
//other-registry.tld/:cafile=/path/to/cert.crt</li>
|
||||
</ul>
|
||||
<p>A client key to pass when accessing the registry. Values should be in PEM
|
||||
format with newlines replaced by the string "\n". For example:</p>
|
||||
|
||||
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----dependency-selector-syntax--querying----1092">
|
||||
<h1 id="----dependency-selector-syntax--querying----1100">
|
||||
<span>Dependency Selector Syntax & Querying</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.0</span>
|
||||
</h1>
|
||||
<span class="description">Dependency Selector Syntax & Querying</span>
|
||||
</header>
|
||||
|
||||
+6
-4
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----developers----1092">
|
||||
<h1 id="----developers----1100">
|
||||
<span>developers</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.0</span>
|
||||
</h1>
|
||||
<span class="description">Developer Guide</span>
|
||||
</header>
|
||||
@@ -249,8 +249,8 @@ as <code>.gitignore</code> files:</p>
|
||||
<li>You can end patterns with a forward slash <code>/</code> to specify a directory.</li>
|
||||
<li>You can negate a pattern by starting it with an exclamation point <code>!</code>.</li>
|
||||
</ul>
|
||||
<p>By default, the following paths and files are ignored, so there's no
|
||||
need to add them to <code>.npmignore</code> explicitly:</p>
|
||||
<p>By default, some paths and files are ignored, so there's no
|
||||
need to add them to <code>.npmignore</code> explicitly. Some examples are:</p>
|
||||
<ul>
|
||||
<li><code>.*.swp</code></li>
|
||||
<li><code>._*</code></li>
|
||||
@@ -283,6 +283,8 @@ maintenance headache, you might instead try populating the <code>files</code>
|
||||
property of <code>package.json</code>, which is an array of file or directory names
|
||||
that should be included in your package. Sometimes manually picking
|
||||
which items to allow is easier to manage than building a block list.</p>
|
||||
<p>See <a href="../configuring-npm/package-json.html"><code>package.json</code></a> for more info on
|
||||
what can and can't be ignored.</p>
|
||||
<h4 id="testing-whether-your-npmignore-or-files-config-works">Testing whether your <code>.npmignore</code> or <code>files</code> config works</h4>
|
||||
<p>If you want to double check that your package will include only the files
|
||||
you intend it to when published, you can run the <code>npm pack</code> command locally
|
||||
|
||||
+2
-2
@@ -141,9 +141,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----logging----1092">
|
||||
<h1 id="----logging----1100">
|
||||
<span>Logging</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----orgs----1100">
|
||||
<span>orgs</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----package-spec----1100">
|
||||
<span>package-spec</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----registry----1100">
|
||||
<span>registry</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----removal----1100">
|
||||
<span>removal</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----scope----1100">
|
||||
<span>scope</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----scripts----1100">
|
||||
<span>scripts</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.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----1092">
|
||||
<h1 id="----workspaces----1100">
|
||||
<span>workspaces</span>
|
||||
<span class="version">@10.9.2</span>
|
||||
<span class="version">@11.0.0</span>
|
||||
</h1>
|
||||
<span class="description">Working with workspaces</span>
|
||||
</header>
|
||||
|
||||
Vendored
-5
@@ -6,11 +6,6 @@ module.exports = async (process, validateEngines) => {
|
||||
// leak any private CLI configs to other programs
|
||||
process.title = 'npm'
|
||||
|
||||
// if npm is called as "npmg" or "npm_g", then run in global mode.
|
||||
if (process.argv[1][process.argv[1].length - 1] === 'g') {
|
||||
process.argv.splice(1, 1, 'npm', '-g')
|
||||
}
|
||||
|
||||
// Patch the global fs module here at the app level
|
||||
require('graceful-fs').gracefulify(require('node:fs'))
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -38,7 +38,7 @@ const searchCachePackage = async (path, parsed, cacheKeys) => {
|
||||
try {
|
||||
details = await cacache.get(path, key)
|
||||
packument = jsonParse(details.data)
|
||||
} catch (_) {
|
||||
} catch {
|
||||
// if we couldn't parse the packument, abort
|
||||
continue
|
||||
}
|
||||
@@ -131,7 +131,7 @@ class Cache extends BaseCommand {
|
||||
let entry
|
||||
try {
|
||||
entry = await cacache.get(cachePath, key)
|
||||
} catch (err) {
|
||||
} catch {
|
||||
log.warn('cache', `Not Found: ${key}`)
|
||||
break
|
||||
}
|
||||
|
||||
Vendored
+3
-3
@@ -1,4 +1,4 @@
|
||||
const fetch = require('npm-registry-fetch')
|
||||
const npmFetch = require('npm-registry-fetch')
|
||||
const { otplease } = require('../utils/auth.js')
|
||||
const npa = require('npm-package-arg')
|
||||
const { log } = require('proc-log')
|
||||
@@ -47,7 +47,7 @@ class Deprecate extends BaseCommand {
|
||||
}
|
||||
|
||||
const uri = '/' + p.escapedName
|
||||
const packument = await fetch.json(uri, {
|
||||
const packument = await npmFetch.json(uri, {
|
||||
...this.npm.flatOptions,
|
||||
spec: p,
|
||||
query: { write: true },
|
||||
@@ -60,7 +60,7 @@ class Deprecate extends BaseCommand {
|
||||
for (const v of versions) {
|
||||
packument.versions[v].deprecated = msg
|
||||
}
|
||||
return otplease(this.npm, this.npm.flatOptions, opts => fetch(uri, {
|
||||
return otplease(this.npm, this.npm.flatOptions, opts => npmFetch(uri, {
|
||||
...opts,
|
||||
spec: p,
|
||||
method: 'PUT',
|
||||
|
||||
Vendored
+5
-5
@@ -83,7 +83,7 @@ class Diff extends BaseCommand {
|
||||
try {
|
||||
const { content: pkg } = await pkgJson.normalize(this.prefix)
|
||||
name = pkg.name
|
||||
} catch (e) {
|
||||
} catch {
|
||||
log.verbose('diff', 'could not read project dir package.json')
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ class Diff extends BaseCommand {
|
||||
try {
|
||||
const { content: pkg } = await pkgJson.normalize(this.prefix)
|
||||
pkgName = pkg.name
|
||||
} catch (e) {
|
||||
} catch {
|
||||
log.verbose('diff', 'could not read project dir package.json')
|
||||
noPackageJson = true
|
||||
}
|
||||
@@ -156,7 +156,7 @@ class Diff extends BaseCommand {
|
||||
node = actualTree &&
|
||||
actualTree.inventory.query('name', spec.name)
|
||||
.values().next().value
|
||||
} catch (e) {
|
||||
} catch {
|
||||
log.verbose('diff', 'failed to load actual install tree')
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ class Diff extends BaseCommand {
|
||||
try {
|
||||
const { content: pkg } = await pkgJson.normalize(this.prefix)
|
||||
pkgName = pkg.name
|
||||
} catch (e) {
|
||||
} catch {
|
||||
log.verbose('diff', 'could not read project dir package.json')
|
||||
}
|
||||
|
||||
@@ -265,7 +265,7 @@ class Diff extends BaseCommand {
|
||||
}
|
||||
const arb = new Arborist(opts)
|
||||
actualTree = await arb.loadActual(opts)
|
||||
} catch (e) {
|
||||
} catch {
|
||||
log.verbose('diff', 'failed to load actual install tree')
|
||||
}
|
||||
|
||||
|
||||
Vendored
+5
-5
@@ -1,5 +1,5 @@
|
||||
const npa = require('npm-package-arg')
|
||||
const regFetch = require('npm-registry-fetch')
|
||||
const npmFetch = require('npm-registry-fetch')
|
||||
const semver = require('semver')
|
||||
const { log, output } = require('proc-log')
|
||||
const { otplease } = require('../utils/auth.js')
|
||||
@@ -119,7 +119,7 @@ class DistTag extends BaseCommand {
|
||||
},
|
||||
spec,
|
||||
}
|
||||
await otplease(this.npm, reqOpts, o => regFetch(url, o))
|
||||
await otplease(this.npm, reqOpts, o => npmFetch(url, o))
|
||||
output.standard(`+${t}: ${spec.name}@${version}`)
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ class DistTag extends BaseCommand {
|
||||
method: 'DELETE',
|
||||
spec,
|
||||
}
|
||||
await otplease(this.npm, reqOpts, o => regFetch(url, o))
|
||||
await otplease(this.npm, reqOpts, o => npmFetch(url, o))
|
||||
output.standard(`-${tag}: ${spec.name}@${version}`)
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ class DistTag extends BaseCommand {
|
||||
try {
|
||||
output.standard(`${name}:`)
|
||||
await this.list(npa(name), this.npm.flatOptions)
|
||||
} catch (err) {
|
||||
} catch {
|
||||
// set the exitCode directly, but ignore the error
|
||||
// since it will have already been logged by this.list()
|
||||
process.exitCode = 1
|
||||
@@ -191,7 +191,7 @@ class DistTag extends BaseCommand {
|
||||
}
|
||||
|
||||
async fetchTags (spec, opts) {
|
||||
const data = await regFetch.json(
|
||||
const data = await npmFetch.json(
|
||||
`/-/package/${spec.escapedName}/dist-tags`,
|
||||
{ ...opts, 'prefer-online': true, spec }
|
||||
)
|
||||
|
||||
Loaded 100 of 450 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user