mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
deps: upgrade npm to 11.15.0
PR-URL: https://github.com/nodejs/node/pull/63463 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jordan Harband <ljharb@gmail.com>
This commit is contained in:
1 parent
69dfadf785
commit
e286fa170d
311 files changed
+9995
-1231
No files matched your search
+57
-2
@@ -189,6 +189,42 @@ run any pre- or post-scripts.
|
||||
|
||||
|
||||
|
||||
#### `allow-directory`
|
||||
|
||||
* Default: "all"
|
||||
* Type: "all", "none", or "root"
|
||||
|
||||
Limits the ability for npm to install dependencies from directories. That
|
||||
is, dependencies that point to a directory instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any directories to be installed. `none` prevents any
|
||||
directories from being installed. `root` only allows directories defined in
|
||||
your project's package.json to be installed. Also allows directory
|
||||
dependencies to be used for other commands like `npm view`
|
||||
|
||||
|
||||
|
||||
#### `allow-file`
|
||||
|
||||
* Default: "all"
|
||||
* Type: "all", "none", or "root"
|
||||
|
||||
Limits the ability for npm to install dependencies from tarball files. That
|
||||
is, dependencies that point to a local tarball file instead of a version or
|
||||
semver range. Please note that this could leave your tree incomplete and
|
||||
some packages may not function as intended or designed. Changing this
|
||||
setting will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any tarball file to be installed. `none` prevents any tarball
|
||||
file from being installed. `root` only allows tarball files defined in your
|
||||
project's package.json to be installed. Also allows tarball file
|
||||
dependencies to be used for other commands like `npm view`
|
||||
|
||||
|
||||
|
||||
#### `allow-git`
|
||||
|
||||
* Default: "all"
|
||||
@@ -197,12 +233,31 @@ run any pre- or post-scripts.
|
||||
Limits the ability for npm to fetch dependencies from git references. That
|
||||
is, dependencies that point to a git repo instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed.
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any git dependencies to be fetched and installed. `none`
|
||||
prevents any git dependencies from being fetched and installed. `root` only
|
||||
allows git dependencies defined in your project's package.json to be fetched
|
||||
installed. Also allows git dependencies to be fetched for other commands
|
||||
and installed. Also allows git dependencies to be fetched for other commands
|
||||
like `npm view`
|
||||
|
||||
|
||||
|
||||
#### `allow-remote`
|
||||
|
||||
* Default: "all"
|
||||
* Type: "all", "none", or "root"
|
||||
|
||||
Limits the ability for npm to fetch dependencies from urls. That is,
|
||||
dependencies that point to a tarball url instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any url to be installed. `none` prevents any url from being
|
||||
installed. `root` only allows urls defined in your project's package.json to
|
||||
be installed. Also allows url dependencies to be used for other commands
|
||||
like `npm view`
|
||||
|
||||
|
||||
|
||||
+57
-2
@@ -184,6 +184,42 @@ run any pre- or post-scripts.
|
||||
|
||||
|
||||
|
||||
#### `allow-directory`
|
||||
|
||||
* Default: "all"
|
||||
* Type: "all", "none", or "root"
|
||||
|
||||
Limits the ability for npm to install dependencies from directories. That
|
||||
is, dependencies that point to a directory instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any directories to be installed. `none` prevents any
|
||||
directories from being installed. `root` only allows directories defined in
|
||||
your project's package.json to be installed. Also allows directory
|
||||
dependencies to be used for other commands like `npm view`
|
||||
|
||||
|
||||
|
||||
#### `allow-file`
|
||||
|
||||
* Default: "all"
|
||||
* Type: "all", "none", or "root"
|
||||
|
||||
Limits the ability for npm to install dependencies from tarball files. That
|
||||
is, dependencies that point to a local tarball file instead of a version or
|
||||
semver range. Please note that this could leave your tree incomplete and
|
||||
some packages may not function as intended or designed. Changing this
|
||||
setting will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any tarball file to be installed. `none` prevents any tarball
|
||||
file from being installed. `root` only allows tarball files defined in your
|
||||
project's package.json to be installed. Also allows tarball file
|
||||
dependencies to be used for other commands like `npm view`
|
||||
|
||||
|
||||
|
||||
#### `allow-git`
|
||||
|
||||
* Default: "all"
|
||||
@@ -192,12 +228,31 @@ run any pre- or post-scripts.
|
||||
Limits the ability for npm to fetch dependencies from git references. That
|
||||
is, dependencies that point to a git repo instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed.
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any git dependencies to be fetched and installed. `none`
|
||||
prevents any git dependencies from being fetched and installed. `root` only
|
||||
allows git dependencies defined in your project's package.json to be fetched
|
||||
installed. Also allows git dependencies to be fetched for other commands
|
||||
and installed. Also allows git dependencies to be fetched for other commands
|
||||
like `npm view`
|
||||
|
||||
|
||||
|
||||
#### `allow-remote`
|
||||
|
||||
* Default: "all"
|
||||
* Type: "all", "none", or "root"
|
||||
|
||||
Limits the ability for npm to fetch dependencies from urls. That is,
|
||||
dependencies that point to a tarball url instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any url to be installed. `none` prevents any url from being
|
||||
installed. `root` only allows urls defined in your project's package.json to
|
||||
be installed. Also allows url dependencies to be used for other commands
|
||||
like `npm view`
|
||||
|
||||
|
||||
|
||||
+57
-2
@@ -142,6 +142,42 @@ run any pre- or post-scripts.
|
||||
|
||||
|
||||
|
||||
#### `allow-directory`
|
||||
|
||||
* Default: "all"
|
||||
* Type: "all", "none", or "root"
|
||||
|
||||
Limits the ability for npm to install dependencies from directories. That
|
||||
is, dependencies that point to a directory instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any directories to be installed. `none` prevents any
|
||||
directories from being installed. `root` only allows directories defined in
|
||||
your project's package.json to be installed. Also allows directory
|
||||
dependencies to be used for other commands like `npm view`
|
||||
|
||||
|
||||
|
||||
#### `allow-file`
|
||||
|
||||
* Default: "all"
|
||||
* Type: "all", "none", or "root"
|
||||
|
||||
Limits the ability for npm to install dependencies from tarball files. That
|
||||
is, dependencies that point to a local tarball file instead of a version or
|
||||
semver range. Please note that this could leave your tree incomplete and
|
||||
some packages may not function as intended or designed. Changing this
|
||||
setting will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any tarball file to be installed. `none` prevents any tarball
|
||||
file from being installed. `root` only allows tarball files defined in your
|
||||
project's package.json to be installed. Also allows tarball file
|
||||
dependencies to be used for other commands like `npm view`
|
||||
|
||||
|
||||
|
||||
#### `allow-git`
|
||||
|
||||
* Default: "all"
|
||||
@@ -150,12 +186,31 @@ run any pre- or post-scripts.
|
||||
Limits the ability for npm to fetch dependencies from git references. That
|
||||
is, dependencies that point to a git repo instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed.
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any git dependencies to be fetched and installed. `none`
|
||||
prevents any git dependencies from being fetched and installed. `root` only
|
||||
allows git dependencies defined in your project's package.json to be fetched
|
||||
installed. Also allows git dependencies to be fetched for other commands
|
||||
and installed. Also allows git dependencies to be fetched for other commands
|
||||
like `npm view`
|
||||
|
||||
|
||||
|
||||
#### `allow-remote`
|
||||
|
||||
* Default: "all"
|
||||
* Type: "all", "none", or "root"
|
||||
|
||||
Limits the ability for npm to fetch dependencies from urls. That is,
|
||||
dependencies that point to a tarball url instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any url to be installed. `none` prevents any url from being
|
||||
installed. `root` only allows urls defined in your project's package.json to
|
||||
be installed. Also allows url dependencies to be used for other commands
|
||||
like `npm view`
|
||||
|
||||
|
||||
|
||||
+69
-6
@@ -219,6 +219,42 @@ run any pre- or post-scripts.
|
||||
|
||||
|
||||
|
||||
#### `allow-directory`
|
||||
|
||||
* Default: "all"
|
||||
* Type: "all", "none", or "root"
|
||||
|
||||
Limits the ability for npm to install dependencies from directories. That
|
||||
is, dependencies that point to a directory instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any directories to be installed. `none` prevents any
|
||||
directories from being installed. `root` only allows directories defined in
|
||||
your project's package.json to be installed. Also allows directory
|
||||
dependencies to be used for other commands like `npm view`
|
||||
|
||||
|
||||
|
||||
#### `allow-file`
|
||||
|
||||
* Default: "all"
|
||||
* Type: "all", "none", or "root"
|
||||
|
||||
Limits the ability for npm to install dependencies from tarball files. That
|
||||
is, dependencies that point to a local tarball file instead of a version or
|
||||
semver range. Please note that this could leave your tree incomplete and
|
||||
some packages may not function as intended or designed. Changing this
|
||||
setting will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any tarball file to be installed. `none` prevents any tarball
|
||||
file from being installed. `root` only allows tarball files defined in your
|
||||
project's package.json to be installed. Also allows tarball file
|
||||
dependencies to be used for other commands like `npm view`
|
||||
|
||||
|
||||
|
||||
#### `allow-git`
|
||||
|
||||
* Default: "all"
|
||||
@@ -227,12 +263,31 @@ run any pre- or post-scripts.
|
||||
Limits the ability for npm to fetch dependencies from git references. That
|
||||
is, dependencies that point to a git repo instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed.
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any git dependencies to be fetched and installed. `none`
|
||||
prevents any git dependencies from being fetched and installed. `root` only
|
||||
allows git dependencies defined in your project's package.json to be fetched
|
||||
installed. Also allows git dependencies to be fetched for other commands
|
||||
and installed. Also allows git dependencies to be fetched for other commands
|
||||
like `npm view`
|
||||
|
||||
|
||||
|
||||
#### `allow-remote`
|
||||
|
||||
* Default: "all"
|
||||
* Type: "all", "none", or "root"
|
||||
|
||||
Limits the ability for npm to fetch dependencies from urls. That is,
|
||||
dependencies that point to a tarball url instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any url to be installed. `none` prevents any url from being
|
||||
installed. `root` only allows urls defined in your project's package.json to
|
||||
be installed. Also allows url dependencies to be used for other commands
|
||||
like `npm view`
|
||||
|
||||
|
||||
@@ -264,7 +319,13 @@ If the requested version is a `dist-tag` and the given tag does not pass the
|
||||
will be used. For example, `foo@latest` might install `foo@1.2` even though
|
||||
`latest` is `2.0`.
|
||||
|
||||
This config cannot be used with: `min-release-age`
|
||||
If `before` and `min-release-age` are both set in the same source, `before`
|
||||
wins (an explicit absolute date overrides a relative window). Across
|
||||
sources, the standard precedence applies (cli > env > project > user >
|
||||
global), so a higher-priority source can always relax or override a
|
||||
lower-priority one.
|
||||
|
||||
|
||||
|
||||
#### `min-release-age`
|
||||
|
||||
@@ -277,9 +338,11 @@ are no versions available for the current set of dependencies, the command
|
||||
will error.
|
||||
|
||||
This flag is a complement to `before`, which accepts an exact date instead
|
||||
of a relative number of days.
|
||||
|
||||
This config cannot be used with: `before`
|
||||
of a relative number of days. The two may coexist (e.g. `min-release-age` in
|
||||
your `.npmrc` is preserved when npm internally spawns a sub-process with
|
||||
`--before` while preparing a `git:` or `github:` dependency); when both
|
||||
apply, `before` wins within a single source and across sources the standard
|
||||
precedence rules apply.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
|
||||
+69
-6
@@ -561,6 +561,42 @@ run any pre- or post-scripts.
|
||||
|
||||
|
||||
|
||||
#### `allow-directory`
|
||||
|
||||
* Default: "all"
|
||||
* Type: "all", "none", or "root"
|
||||
|
||||
Limits the ability for npm to install dependencies from directories. That
|
||||
is, dependencies that point to a directory instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any directories to be installed. `none` prevents any
|
||||
directories from being installed. `root` only allows directories defined in
|
||||
your project's package.json to be installed. Also allows directory
|
||||
dependencies to be used for other commands like `npm view`
|
||||
|
||||
|
||||
|
||||
#### `allow-file`
|
||||
|
||||
* Default: "all"
|
||||
* Type: "all", "none", or "root"
|
||||
|
||||
Limits the ability for npm to install dependencies from tarball files. That
|
||||
is, dependencies that point to a local tarball file instead of a version or
|
||||
semver range. Please note that this could leave your tree incomplete and
|
||||
some packages may not function as intended or designed. Changing this
|
||||
setting will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any tarball file to be installed. `none` prevents any tarball
|
||||
file from being installed. `root` only allows tarball files defined in your
|
||||
project's package.json to be installed. Also allows tarball file
|
||||
dependencies to be used for other commands like `npm view`
|
||||
|
||||
|
||||
|
||||
#### `allow-git`
|
||||
|
||||
* Default: "all"
|
||||
@@ -569,12 +605,31 @@ run any pre- or post-scripts.
|
||||
Limits the ability for npm to fetch dependencies from git references. That
|
||||
is, dependencies that point to a git repo instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed.
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any git dependencies to be fetched and installed. `none`
|
||||
prevents any git dependencies from being fetched and installed. `root` only
|
||||
allows git dependencies defined in your project's package.json to be fetched
|
||||
installed. Also allows git dependencies to be fetched for other commands
|
||||
and installed. Also allows git dependencies to be fetched for other commands
|
||||
like `npm view`
|
||||
|
||||
|
||||
|
||||
#### `allow-remote`
|
||||
|
||||
* Default: "all"
|
||||
* Type: "all", "none", or "root"
|
||||
|
||||
Limits the ability for npm to fetch dependencies from urls. That is,
|
||||
dependencies that point to a tarball url instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any url to be installed. `none` prevents any url from being
|
||||
installed. `root` only allows urls defined in your project's package.json to
|
||||
be installed. Also allows url dependencies to be used for other commands
|
||||
like `npm view`
|
||||
|
||||
|
||||
@@ -606,7 +661,13 @@ If the requested version is a `dist-tag` and the given tag does not pass the
|
||||
will be used. For example, `foo@latest` might install `foo@1.2` even though
|
||||
`latest` is `2.0`.
|
||||
|
||||
This config cannot be used with: `min-release-age`
|
||||
If `before` and `min-release-age` are both set in the same source, `before`
|
||||
wins (an explicit absolute date overrides a relative window). Across
|
||||
sources, the standard precedence applies (cli > env > project > user >
|
||||
global), so a higher-priority source can always relax or override a
|
||||
lower-priority one.
|
||||
|
||||
|
||||
|
||||
#### `min-release-age`
|
||||
|
||||
@@ -619,9 +680,11 @@ are no versions available for the current set of dependencies, the command
|
||||
will error.
|
||||
|
||||
This flag is a complement to `before`, which accepts an exact date instead
|
||||
of a relative number of days.
|
||||
|
||||
This config cannot be used with: `before`
|
||||
of a relative number of days. The two may coexist (e.g. `min-release-age` in
|
||||
your `.npmrc` is preserved when npm internally spawns a sub-process with
|
||||
`--before` while preparing a `git:` or `github:` dependency); when both
|
||||
apply, `before` wins within a single source and across sources the standard
|
||||
precedence rules apply.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
|
||||
+57
-2
@@ -248,6 +248,42 @@ run any pre- or post-scripts.
|
||||
|
||||
|
||||
|
||||
#### `allow-directory`
|
||||
|
||||
* Default: "all"
|
||||
* Type: "all", "none", or "root"
|
||||
|
||||
Limits the ability for npm to install dependencies from directories. That
|
||||
is, dependencies that point to a directory instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any directories to be installed. `none` prevents any
|
||||
directories from being installed. `root` only allows directories defined in
|
||||
your project's package.json to be installed. Also allows directory
|
||||
dependencies to be used for other commands like `npm view`
|
||||
|
||||
|
||||
|
||||
#### `allow-file`
|
||||
|
||||
* Default: "all"
|
||||
* Type: "all", "none", or "root"
|
||||
|
||||
Limits the ability for npm to install dependencies from tarball files. That
|
||||
is, dependencies that point to a local tarball file instead of a version or
|
||||
semver range. Please note that this could leave your tree incomplete and
|
||||
some packages may not function as intended or designed. Changing this
|
||||
setting will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any tarball file to be installed. `none` prevents any tarball
|
||||
file from being installed. `root` only allows tarball files defined in your
|
||||
project's package.json to be installed. Also allows tarball file
|
||||
dependencies to be used for other commands like `npm view`
|
||||
|
||||
|
||||
|
||||
#### `allow-git`
|
||||
|
||||
* Default: "all"
|
||||
@@ -256,12 +292,31 @@ run any pre- or post-scripts.
|
||||
Limits the ability for npm to fetch dependencies from git references. That
|
||||
is, dependencies that point to a git repo instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed.
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any git dependencies to be fetched and installed. `none`
|
||||
prevents any git dependencies from being fetched and installed. `root` only
|
||||
allows git dependencies defined in your project's package.json to be fetched
|
||||
installed. Also allows git dependencies to be fetched for other commands
|
||||
and installed. Also allows git dependencies to be fetched for other commands
|
||||
like `npm view`
|
||||
|
||||
|
||||
|
||||
#### `allow-remote`
|
||||
|
||||
* Default: "all"
|
||||
* Type: "all", "none", or "root"
|
||||
|
||||
Limits the ability for npm to fetch dependencies from urls. That is,
|
||||
dependencies that point to a tarball url instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any url to be installed. `none` prevents any url from being
|
||||
installed. `root` only allows urls defined in your project's package.json to
|
||||
be installed. Also allows url dependencies to be used for other commands
|
||||
like `npm view`
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ Note that nested packages will *also* show the paths to the specified packages.
|
||||
For example, running `npm ls promzard` in npm's source tree will show:
|
||||
|
||||
```bash
|
||||
npm@11.13.0 /path/to/npm
|
||||
npm@11.15.0 /path/to/npm
|
||||
└─┬ init-package-json@0.0.4
|
||||
└── promzard@0.1.5
|
||||
```
|
||||
|
||||
+12
-4
@@ -165,7 +165,13 @@ If the requested version is a `dist-tag` and the given tag does not pass the
|
||||
will be used. For example, `foo@latest` might install `foo@1.2` even though
|
||||
`latest` is `2.0`.
|
||||
|
||||
This config cannot be used with: `min-release-age`
|
||||
If `before` and `min-release-age` are both set in the same source, `before`
|
||||
wins (an explicit absolute date overrides a relative window). Across
|
||||
sources, the standard precedence applies (cli > env > project > user >
|
||||
global), so a higher-priority source can always relax or override a
|
||||
lower-priority one.
|
||||
|
||||
|
||||
|
||||
#### `min-release-age`
|
||||
|
||||
@@ -178,9 +184,11 @@ are no versions available for the current set of dependencies, the command
|
||||
will error.
|
||||
|
||||
This flag is a complement to `before`, which accepts an exact date instead
|
||||
of a relative number of days.
|
||||
|
||||
This config cannot be used with: `before`
|
||||
of a relative number of days. The two may coexist (e.g. `min-release-age` in
|
||||
your `.npmrc` is preserved when npm internally spawns a sub-process with
|
||||
`--before` while preparing a `git:` or `github:` dependency); when both
|
||||
apply, `before` wins within a single source and across sources the standard
|
||||
precedence rules apply.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
|
||||
+255
@@ -0,0 +1,255 @@
|
||||
---
|
||||
title: npm-stage
|
||||
section: 1
|
||||
description: Stage packages for publishing
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm stage
|
||||
```
|
||||
|
||||
Note: This command is unaware of workspaces.
|
||||
|
||||
### Description
|
||||
|
||||
Staged publishing allows package maintainers to require proof-of-presence
|
||||
for all publishes. Proof-of-presence is where a human is involved,
|
||||
interjects, and provides authentication (2FA) during an action — in this
|
||||
case, publishing an npm package.
|
||||
|
||||
Typically when maintainers use automated workflows to publish,
|
||||
proof-of-presence is lacking as there's no convenient way to interject the
|
||||
process and provide 2FA, as is the case for publishing with a granular
|
||||
access token with bypass and the trusted publishing flow. Staged publishing
|
||||
allows users to have their automated workflows stage a package without a 2FA
|
||||
prompt, deferring the act of 2FA, allowing the maintainer to approve the
|
||||
staged package and publish at a later point.
|
||||
|
||||
The `npm stage publish` command packs the current working directory and
|
||||
places that version of the package into the registry in a state where it's
|
||||
not available for public access, allowing maintainers to approve the package
|
||||
at a later point in time. The act of staging does not prompt for 2FA and can be done with any token
|
||||
type, the act of approving will.
|
||||
|
||||
Key behaviors:
|
||||
|
||||
* Staged packages share the same semver version unique index as published
|
||||
packages — you cannot publish a version that already exists as a staged
|
||||
version for that package.
|
||||
* You can still publish packages normally while you have staged packages
|
||||
pending.
|
||||
* You can stage multiple versions of the same package.
|
||||
* `npm stage publish` has parity with `npm publish` and will respect
|
||||
`"private": true` in `package.json`, refusing to stage the package.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Before using `npm stage` commands, ensure the following requirements are met:
|
||||
|
||||
* **Write permissions on the package:** You must have write access to the
|
||||
package you're configuring.
|
||||
* **Package must exist:** The package you're configuring must already exist
|
||||
on the npm registry.
|
||||
* **2FA enabled on your account:** Commands that require 2FA will prompt you
|
||||
to authenticate. If you don't already have 2FA enabled on your account,
|
||||
you must enable it before using these commands.
|
||||
|
||||
### Subcommands
|
||||
|
||||
* `npm stage publish [<package-spec>]` - Stage a package for publishing
|
||||
* `npm stage list [<package-spec>]` - List all staged package versions
|
||||
* `npm stage view <stage-id>` - View details of a specific staged package
|
||||
* `npm stage approve <stage-id>` - Approve a staged package for publishing
|
||||
* `npm stage reject <stage-id>` - Reject a staged package
|
||||
* `npm stage download <stage-id>` - Download the tarball for inspection
|
||||
|
||||
### 2FA Requirements by Subcommand
|
||||
|
||||
| Command | Requires 2FA | Notes |
|
||||
| --- | --- | --- |
|
||||
| `npm stage publish` | No | Designed for automated workflows; defers 2FA to approval |
|
||||
| `npm stage list` | No | View staged packages |
|
||||
| `npm stage view` | No | View staged package details |
|
||||
| `npm stage approve` | Yes | Prompts for 2FA to publish the staged package |
|
||||
| `npm stage reject` | Yes | Prompts for 2FA to permanently remove the staged package |
|
||||
| `npm stage download` | No | Downloads the tarball for local inspection |
|
||||
|
||||
### Tag Behavior
|
||||
|
||||
The `--tag` flag follows the same logic as `npm publish`. If no tag is
|
||||
provided, the `latest` tag is used by default. For pre-release versions
|
||||
(e.g., `1.0.0-beta.1`) and non-latest semver versions, the tag must be
|
||||
explicitly provided — otherwise the CLI will error, just as `npm publish`
|
||||
would.
|
||||
|
||||
The tag is an immutable property of the staged package. Once a package is
|
||||
staged with a given tag, the tag cannot be changed. If you need to stage the
|
||||
same version with a different tag, you must first reject the existing staged
|
||||
package using `npm stage reject` and then re-stage it with the desired tag.
|
||||
|
||||
### Token Behavior
|
||||
|
||||
The key difference with staged publishing is that `npm stage publish` never
|
||||
requires a 2FA prompt, regardless of token type. This is what makes it
|
||||
suitable for automated workflows. The goal of `npm stage publish` is
|
||||
deferring proof-of-presence to a later point in time.
|
||||
|
||||
| Token Type | `npm stage publish` | `npm publish` |
|
||||
| --- | --- | --- |
|
||||
| GAT with bypass | Can stage | Can publish (if allowed by package publishing access) |
|
||||
| GAT without bypass | Can stage | 2FA prompt (if allowed by package publishing access) |
|
||||
| Session token | Can stage | 2FA prompt |
|
||||
| Trust token (OIDC) | Can stage (if allowed) | Can publish (if allowed) |
|
||||
|
||||
### Trust Relationship Permissions
|
||||
|
||||
With staged publishing, trust relationships now support granular command
|
||||
permissions. Shortlived tokens issued through trust relationships can only be
|
||||
used with `npm stage publish` and `npm publish`. Shortlived tokens cannot run
|
||||
`npm stage` subcommands.
|
||||
|
||||
`npm trust <provider>` supports `--allow-publish` and `--allow-stage-publish`
|
||||
to control which commands are available through each trust relationship.
|
||||
|
||||
### Best Practices
|
||||
|
||||
**Note:** The addition of staged publishing does not make your account or org
|
||||
more secure. Maintainers must still use the best practices listed below.
|
||||
|
||||
1. **Delete Granular Access Tokens (GAT) with bypass 2FA enabled.**
|
||||
Now with staged publishing, we've eliminated the need for a GAT token
|
||||
that can bypass 2FA. We encourage you to delete all your tokens with
|
||||
bypass enabled and switch to using a trust relationship in your automated
|
||||
workflows, or create a GAT without bypass and use `npm stage publish`.
|
||||
|
||||
2. **Disallow tokens from publishing at the package level.**
|
||||
All packages have their own access controls under "package access"
|
||||
allowing packages to be published with bypass tokens, which is no longer
|
||||
a necessity. We encourage you to select "Require two-factor
|
||||
authentication and disallow tokens (recommended)" for all your packages
|
||||
on the package access page.
|
||||
|
||||
3. **Configure trust relationship permissions to prevent `npm publish`.**
|
||||
We encourage you to only enable `npm stage publish` on your trust
|
||||
relationships and disable `npm publish`.
|
||||
|
||||
### Configuration
|
||||
|
||||
### `npm stage publish`
|
||||
|
||||
Stage a package for publishing, deferring proof-of-presence (2FA) to a later point in time
|
||||
|
||||
#### Synopsis
|
||||
|
||||
```bash
|
||||
npm stage publish <package-spec>
|
||||
```
|
||||
|
||||
#### Flags
|
||||
|
||||
| Flag | Default | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `--tag` | "latest" | String | If you ask npm to install a package and don't tell it a specific version, then it will install the specified tag. It is the tag added to the package@version specified in the `npm dist-tag add` command, if no explicit tag is given. When used by the `npm diff` command, this is the tag used to fetch the tarball that will be compared with the local files by default. If used in the `npm publish` command, this is the tag that will be added to the package submitted to the registry. |
|
||||
| `--access` |
|
||||
'public' for new packages, existing packages it will not change the current level
|
||||
| null, "restricted", or "public" | If you do not want your scoped package to be publicly viewable (and installable) set `--access=restricted`. Unscoped packages cannot be set to `restricted`. Note: This defaults to not changing the current access level for existing packages. Specifying a value of `restricted` or `public` during publish will change the access for an existing package the same way that `npm access set status` would. |
|
||||
| `--dry-run` | false | Boolean | Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, `install`, `update`, `dedupe`, `uninstall`, as well as `pack` and `publish`. Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc. |
|
||||
| `--otp` | null | 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. |
|
||||
| `--workspace`, `-w` | | String (can be set multiple times) | Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory * Path to a parent workspace directory (will result in selecting all workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. |
|
||||
| `--workspaces` | null | null or Boolean | Set to true to run the command in the context of **all** configured workspaces. Explicitly setting this to false will cause commands like `install` to ignore workspaces altogether. When not set explicitly: - Commands that operate on the `node_modules` tree (install, update, etc.) will link workspaces into the `node_modules` folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, _unless_ one or more workspaces are specified in the `workspace` config. |
|
||||
| `--include-workspace-root` | false | Boolean | Include the workspace root when workspaces are enabled for a command. When false, specifying individual workspaces via the `workspace` config, or all workspaces via the `workspaces` flag, will cause npm to operate only on the specified workspaces, and not on the root project. |
|
||||
| `--provenance` | false | Boolean | When publishing from a supported cloud CI/CD system, the package will be publicly linked to where it was built and published from. |
|
||||
|
||||
### `npm stage list`
|
||||
|
||||
List all staged package versions
|
||||
|
||||
#### Synopsis
|
||||
|
||||
```bash
|
||||
npm stage list [<package-spec>]
|
||||
```
|
||||
|
||||
#### Flags
|
||||
|
||||
| Flag | Default | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `--json` | false | Boolean | Whether or not to output JSON data, rather than the normal output. * In `npm pkg set` it enables parsing set values with JSON.parse() before saving them to your `package.json`. Not supported by all npm commands. |
|
||||
| `--registry` | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. |
|
||||
|
||||
### `npm stage view`
|
||||
|
||||
View details of a specific staged package
|
||||
|
||||
#### Synopsis
|
||||
|
||||
```bash
|
||||
npm stage view <stage-id>
|
||||
```
|
||||
|
||||
#### Flags
|
||||
|
||||
| Flag | Default | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `--json` | false | Boolean | Whether or not to output JSON data, rather than the normal output. * In `npm pkg set` it enables parsing set values with JSON.parse() before saving them to your `package.json`. Not supported by all npm commands. |
|
||||
| `--registry` | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. |
|
||||
|
||||
### `npm stage approve`
|
||||
|
||||
Approve a staged package, publishing it to the npm registry
|
||||
|
||||
#### Synopsis
|
||||
|
||||
```bash
|
||||
npm stage approve <stage-id>
|
||||
```
|
||||
|
||||
#### Flags
|
||||
|
||||
| Flag | Default | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `--otp` | null | 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. |
|
||||
| `--registry` | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. |
|
||||
|
||||
### `npm stage reject`
|
||||
|
||||
Reject a staged package, removing it from the registry
|
||||
|
||||
#### Synopsis
|
||||
|
||||
```bash
|
||||
npm stage reject <stage-id>
|
||||
```
|
||||
|
||||
#### Flags
|
||||
|
||||
| Flag | Default | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `--otp` | null | 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. |
|
||||
| `--registry` | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. |
|
||||
|
||||
### `npm stage download`
|
||||
|
||||
Download the tarball of a staged package for inspection
|
||||
|
||||
#### Synopsis
|
||||
|
||||
```bash
|
||||
npm stage download <stage-id>
|
||||
```
|
||||
|
||||
#### Flags
|
||||
|
||||
| Flag | Default | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `--json` | false | Boolean | Whether or not to output JSON data, rather than the normal output. * In `npm pkg set` it enables parsing set values with JSON.parse() before saving them to your `package.json`. Not supported by all npm commands. |
|
||||
| `--registry` | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. |
|
||||
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm publish](/commands/npm-publish)
|
||||
* [npm unpublish](/commands/npm-unpublish)
|
||||
* [npm trust](/commands/npm-trust)
|
||||
+20
-3
@@ -28,6 +28,17 @@ The `[package]` argument specifies the package name. If omitted, npm will use th
|
||||
|
||||
Each trust relationship has its own set of configuration options and flags based on the OIDC claims provided by that provider. OIDC claims come from the CI/CD provider and include information such as repository name, workflow file, or environment. Since each provider's claims differ, the available flags and configuration keys are not universal—npm matches the claims supported by each provider's OIDC configuration. For specific details on which claims and flags are supported for a given provider, use `npm trust <provider> --help`.
|
||||
|
||||
### Permissions
|
||||
|
||||
When creating a trust relationship, you must specify at least one permission flag to indicate which operations the trusted publisher is allowed to perform:
|
||||
|
||||
* `--allow-publish`: Allows the trusted publisher to run `npm publish` for the package.
|
||||
* `--allow-stage-publish`: Allows the trusted publisher to run `npm stage` for the package. The alias `--allow-staged-publish` is also accepted.
|
||||
|
||||
At least one of these flags is required when creating a trust configuration. You can specify both to grant both permissions.
|
||||
|
||||
### Provider Options
|
||||
|
||||
The required options depend on the CI/CD provider you're configuring. Detailed information about each option is available in the [managing trusted publisher configurations](https://docs.npmjs.com/trusted-publishers#managing-trusted-publisher-configurations) section of the npm documentation. If a provider is repository-based and the option is not provided, npm will use the `repository.url` field from your `package.json`, if available.
|
||||
|
||||
Currently, the registry only supports one configuration per package. If you attempt to create a new trust relationship when one already exists, it will result in an error. To replace an existing configuration:
|
||||
@@ -53,7 +64,7 @@ Create a trusted relationship between a package and GitHub Actions
|
||||
#### Synopsis
|
||||
|
||||
```bash
|
||||
npm trust github [package] --file [--repo|--repository] [--env|--environment] [-y|--yes]
|
||||
npm trust github [package] --file [--repo|--repository] [--env|--environment] [--allow-publish] [--allow-stage-publish] [-y|--yes]
|
||||
```
|
||||
|
||||
#### Flags
|
||||
@@ -63,6 +74,8 @@ npm trust github [package] --file [--repo|--repository] [--env|--environment] [-
|
||||
| `--file` | null | String (required) | Name of workflow file within a repositories .GitHub folder (must end in yaml, yml) |
|
||||
| `--repository`, `--repo` | null | String | Name of the repository in the format owner/repo |
|
||||
| `--environment`, `--env` | null | String | CI environment name |
|
||||
| `--allow-publish` | false | Boolean | Allow npm publish for this trusted publisher configuration |
|
||||
| `--allow-stage-publish`, `--allow-staged-publish` | false | Boolean | Allow npm stage publish for this trusted publisher configuration |
|
||||
| `--dry-run` | false | Boolean | Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, `install`, `update`, `dedupe`, `uninstall`, as well as `pack` and `publish`. Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc. |
|
||||
| `--json` | false | Boolean | Whether or not to output JSON data, rather than the normal output. * In `npm pkg set` it enables parsing set values with JSON.parse() before saving them to your `package.json`. Not supported by all npm commands. |
|
||||
| `--registry` | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. |
|
||||
@@ -75,7 +88,7 @@ Create a trusted relationship between a package and GitLab CI/CD
|
||||
#### Synopsis
|
||||
|
||||
```bash
|
||||
npm trust gitlab [package] --file [--project|--repo|--repository] [--env|--environment] [-y|--yes]
|
||||
npm trust gitlab [package] --file [--project|--repo|--repository] [--env|--environment] [--allow-publish] [--allow-stage-publish] [-y|--yes]
|
||||
```
|
||||
|
||||
#### Flags
|
||||
@@ -85,6 +98,8 @@ npm trust gitlab [package] --file [--project|--repo|--repository] [--env|--envir
|
||||
| `--file` | null | String (required) | Name of pipeline file (e.g., .gitlab-ci.yml) |
|
||||
| `--project` | null | String | Name of the project in the format group/project or group/subgroup/project |
|
||||
| `--environment`, `--env` | null | String | CI environment name |
|
||||
| `--allow-publish` | false | Boolean | Allow npm publish for this trusted publisher configuration |
|
||||
| `--allow-stage-publish`, `--allow-staged-publish` | false | Boolean | Allow npm stage publish for this trusted publisher configuration |
|
||||
| `--dry-run` | false | Boolean | Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, `install`, `update`, `dedupe`, `uninstall`, as well as `pack` and `publish`. Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc. |
|
||||
| `--json` | false | Boolean | Whether or not to output JSON data, rather than the normal output. * In `npm pkg set` it enables parsing set values with JSON.parse() before saving them to your `package.json`. Not supported by all npm commands. |
|
||||
| `--registry` | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. |
|
||||
@@ -97,7 +112,7 @@ Create a trusted relationship between a package and CircleCI
|
||||
#### Synopsis
|
||||
|
||||
```bash
|
||||
npm trust circleci [package] --org-id <uuid> --project-id <uuid> --pipeline-definition-id <uuid> --vcs-origin <origin> [--context-id <uuid>...] [-y|--yes]
|
||||
npm trust circleci [package] --org-id <uuid> --project-id <uuid> --pipeline-definition-id <uuid> --vcs-origin <origin> [--context-id <uuid>...] [--allow-publish] [--allow-stage-publish] [-y|--yes]
|
||||
```
|
||||
|
||||
#### Flags
|
||||
@@ -109,6 +124,8 @@ npm trust circleci [package] --org-id <uuid> --project-id <uuid> --pipeline-defi
|
||||
| `--pipeline-definition-id` | null | String (required) | CircleCI pipeline definition UUID |
|
||||
| `--vcs-origin` | null | String (required) | CircleCI repository origin in format 'provider/owner/repo' |
|
||||
| `--context-id` | null | null or String (can be set multiple times) | CircleCI context UUID to match |
|
||||
| `--allow-publish` | false | Boolean | Allow npm publish for this trusted publisher configuration |
|
||||
| `--allow-stage-publish`, `--allow-staged-publish` | false | Boolean | Allow npm stage publish for this trusted publisher configuration |
|
||||
| `--dry-run` | false | Boolean | Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, `install`, `update`, `dedupe`, `uninstall`, as well as `pack` and `publish`. Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc. |
|
||||
| `--json` | false | Boolean | Whether or not to output JSON data, rather than the normal output. * In `npm pkg set` it enables parsing set values with JSON.parse() before saving them to your `package.json`. Not supported by all npm commands. |
|
||||
| `--registry` | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. |
|
||||
|
||||
+12
-4
@@ -330,7 +330,13 @@ If the requested version is a `dist-tag` and the given tag does not pass the
|
||||
will be used. For example, `foo@latest` might install `foo@1.2` even though
|
||||
`latest` is `2.0`.
|
||||
|
||||
This config cannot be used with: `min-release-age`
|
||||
If `before` and `min-release-age` are both set in the same source, `before`
|
||||
wins (an explicit absolute date overrides a relative window). Across
|
||||
sources, the standard precedence applies (cli > env > project > user >
|
||||
global), so a higher-priority source can always relax or override a
|
||||
lower-priority one.
|
||||
|
||||
|
||||
|
||||
#### `min-release-age`
|
||||
|
||||
@@ -343,9 +349,11 @@ are no versions available for the current set of dependencies, the command
|
||||
will error.
|
||||
|
||||
This flag is a complement to `before`, which accepts an exact date instead
|
||||
of a relative number of days.
|
||||
|
||||
This config cannot be used with: `before`
|
||||
of a relative number of days. The two may coexist (e.g. `min-release-age` in
|
||||
your `.npmrc` is preserved when npm internally spawns a sub-process with
|
||||
`--before` while preparing a `git:` or `github:` dependency); when both
|
||||
apply, `before` wins within a single source and across sources the standard
|
||||
precedence rules apply.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ Note: This command is unaware of workspaces.
|
||||
|
||||
### Version
|
||||
|
||||
11.13.0
|
||||
11.15.0
|
||||
|
||||
### Description
|
||||
|
||||
|
||||
+69
-6
@@ -165,6 +165,42 @@ upon by the current project.
|
||||
|
||||
|
||||
|
||||
#### `allow-directory`
|
||||
|
||||
* Default: "all"
|
||||
* Type: "all", "none", or "root"
|
||||
|
||||
Limits the ability for npm to install dependencies from directories. That
|
||||
is, dependencies that point to a directory instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any directories to be installed. `none` prevents any
|
||||
directories from being installed. `root` only allows directories defined in
|
||||
your project's package.json to be installed. Also allows directory
|
||||
dependencies to be used for other commands like `npm view`
|
||||
|
||||
|
||||
|
||||
#### `allow-file`
|
||||
|
||||
* Default: "all"
|
||||
* Type: "all", "none", or "root"
|
||||
|
||||
Limits the ability for npm to install dependencies from tarball files. That
|
||||
is, dependencies that point to a local tarball file instead of a version or
|
||||
semver range. Please note that this could leave your tree incomplete and
|
||||
some packages may not function as intended or designed. Changing this
|
||||
setting will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any tarball file to be installed. `none` prevents any tarball
|
||||
file from being installed. `root` only allows tarball files defined in your
|
||||
project's package.json to be installed. Also allows tarball file
|
||||
dependencies to be used for other commands like `npm view`
|
||||
|
||||
|
||||
|
||||
#### `allow-git`
|
||||
|
||||
* Default: "all"
|
||||
@@ -173,12 +209,31 @@ upon by the current project.
|
||||
Limits the ability for npm to fetch dependencies from git references. That
|
||||
is, dependencies that point to a git repo instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed.
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any git dependencies to be fetched and installed. `none`
|
||||
prevents any git dependencies from being fetched and installed. `root` only
|
||||
allows git dependencies defined in your project's package.json to be fetched
|
||||
installed. Also allows git dependencies to be fetched for other commands
|
||||
and installed. Also allows git dependencies to be fetched for other commands
|
||||
like `npm view`
|
||||
|
||||
|
||||
|
||||
#### `allow-remote`
|
||||
|
||||
* Default: "all"
|
||||
* Type: "all", "none", or "root"
|
||||
|
||||
Limits the ability for npm to fetch dependencies from urls. That is,
|
||||
dependencies that point to a tarball url instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.
|
||||
|
||||
`all` allows any url to be installed. `none` prevents any url from being
|
||||
installed. `root` only allows urls defined in your project's package.json to
|
||||
be installed. Also allows url dependencies to be used for other commands
|
||||
like `npm view`
|
||||
|
||||
|
||||
@@ -240,7 +295,13 @@ If the requested version is a `dist-tag` and the given tag does not pass the
|
||||
will be used. For example, `foo@latest` might install `foo@1.2` even though
|
||||
`latest` is `2.0`.
|
||||
|
||||
This config cannot be used with: `min-release-age`
|
||||
If `before` and `min-release-age` are both set in the same source, `before`
|
||||
wins (an explicit absolute date overrides a relative window). Across
|
||||
sources, the standard precedence applies (cli > env > project > user >
|
||||
global), so a higher-priority source can always relax or override a
|
||||
lower-priority one.
|
||||
|
||||
|
||||
|
||||
#### `bin-links`
|
||||
|
||||
@@ -1094,9 +1155,11 @@ are no versions available for the current set of dependencies, the command
|
||||
will error.
|
||||
|
||||
This flag is a complement to `before`, which accepts an exact date instead
|
||||
of a relative number of days.
|
||||
|
||||
This config cannot be used with: `before`
|
||||
of a relative number of days. The two may coexist (e.g. `min-release-age` in
|
||||
your `.npmrc` is preserved when npm internally spawns a sub-process with
|
||||
`--before` while preparing a `git:` or `github:` dependency); when both
|
||||
apply, `before` wins within a single source and across sources the standard
|
||||
precedence rules apply.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-access----11130">
|
||||
<h1 id="----npm-access----11150">
|
||||
<span>npm-access</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Set access level on published packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-adduser----11130">
|
||||
<h1 id="----npm-adduser----11150">
|
||||
<span>npm-adduser</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Add a registry user account</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-audit----11130">
|
||||
<h1 id="----npm-audit----11150">
|
||||
<span>npm-audit</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Run a security audit</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-bugs----11130">
|
||||
<h1 id="----npm-bugs----11150">
|
||||
<span>npm-bugs</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Report bugs for a package in a web browser</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-cache----11130">
|
||||
<h1 id="----npm-cache----11150">
|
||||
<span>npm-cache</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Manipulates packages cache</span>
|
||||
</header>
|
||||
|
||||
+48
-5
@@ -186,16 +186,16 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-ci----11130">
|
||||
<h1 id="----npm-ci----11150">
|
||||
<span>npm-ci</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Clean install a project</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="#install-strategy"><code>install-strategy</code></a></li><li><a href="#legacy-bundling"><code>legacy-bundling</code></a></li><li><a href="#global-style"><code>global-style</code></a></li><li><a href="#omit"><code>omit</code></a></li><li><a href="#include"><code>include</code></a></li><li><a href="#strict-peer-deps"><code>strict-peer-deps</code></a></li><li><a href="#foreground-scripts"><code>foreground-scripts</code></a></li><li><a href="#ignore-scripts"><code>ignore-scripts</code></a></li><li><a href="#allow-git"><code>allow-git</code></a></li><li><a href="#audit"><code>audit</code></a></li><li><a href="#bin-links"><code>bin-links</code></a></li><li><a href="#fund"><code>fund</code></a></li><li><a href="#dry-run"><code>dry-run</code></a></li><li><a href="#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="#example">Example</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#install-strategy"><code>install-strategy</code></a></li><li><a href="#legacy-bundling"><code>legacy-bundling</code></a></li><li><a href="#global-style"><code>global-style</code></a></li><li><a href="#omit"><code>omit</code></a></li><li><a href="#include"><code>include</code></a></li><li><a href="#strict-peer-deps"><code>strict-peer-deps</code></a></li><li><a href="#foreground-scripts"><code>foreground-scripts</code></a></li><li><a href="#ignore-scripts"><code>ignore-scripts</code></a></li><li><a href="#allow-directory"><code>allow-directory</code></a></li><li><a href="#allow-file"><code>allow-file</code></a></li><li><a href="#allow-git"><code>allow-git</code></a></li><li><a href="#allow-remote"><code>allow-remote</code></a></li><li><a href="#audit"><code>audit</code></a></li><li><a href="#bin-links"><code>bin-links</code></a></li><li><a href="#fund"><code>fund</code></a></li><li><a href="#dry-run"><code>dry-run</code></a></li><li><a href="#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>
|
||||
@@ -333,6 +333,34 @@ but can be useful for debugging.</p>
|
||||
<code>npm start</code>, <code>npm stop</code>, <code>npm restart</code>, <code>npm test</code>, and <code>npm run</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>
|
||||
<h4 id="allow-directory"><code>allow-directory</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
<li>Type: "all", "none", or "root"</li>
|
||||
</ul>
|
||||
<p>Limits the ability for npm to install dependencies from directories. That
|
||||
is, dependencies that point to a directory instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any directories to be installed. <code>none</code> prevents any
|
||||
directories from being installed. <code>root</code> only allows directories defined in
|
||||
your project's package.json to be installed. Also allows directory
|
||||
dependencies to be used for other commands like <code>npm view</code></p>
|
||||
<h4 id="allow-file"><code>allow-file</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
<li>Type: "all", "none", or "root"</li>
|
||||
</ul>
|
||||
<p>Limits the ability for npm to install dependencies from tarball files. That
|
||||
is, dependencies that point to a local tarball file instead of a version or
|
||||
semver range. Please note that this could leave your tree incomplete and
|
||||
some packages may not function as intended or designed. Changing this
|
||||
setting will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any tarball file to be installed. <code>none</code> prevents any tarball
|
||||
file from being installed. <code>root</code> only allows tarball files defined in your
|
||||
project's package.json to be installed. Also allows tarball file
|
||||
dependencies to be used for other commands like <code>npm view</code></p>
|
||||
<h4 id="allow-git"><code>allow-git</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
@@ -341,11 +369,26 @@ run any pre- or post-scripts.</p>
|
||||
<p>Limits the ability for npm to fetch dependencies from git references. That
|
||||
is, dependencies that point to a git repo instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed.</p>
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any git dependencies to be fetched and installed. <code>none</code>
|
||||
prevents any git dependencies from being fetched and installed. <code>root</code> only
|
||||
allows git dependencies defined in your project's package.json to be fetched
|
||||
installed. Also allows git dependencies to be fetched for other commands
|
||||
and installed. Also allows git dependencies to be fetched for other commands
|
||||
like <code>npm view</code></p>
|
||||
<h4 id="allow-remote"><code>allow-remote</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
<li>Type: "all", "none", or "root"</li>
|
||||
</ul>
|
||||
<p>Limits the ability for npm to fetch dependencies from urls. That is,
|
||||
dependencies that point to a tarball url instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any url to be installed. <code>none</code> prevents any url from being
|
||||
installed. <code>root</code> only allows urls defined in your project's package.json to
|
||||
be installed. Also allows url dependencies to be used for other commands
|
||||
like <code>npm view</code></p>
|
||||
<h4 id="audit"><code>audit</code></h4>
|
||||
<ul>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-completion----11130">
|
||||
<h1 id="----npm-completion----11150">
|
||||
<span>npm-completion</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Tab Completion for npm</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-config----11130">
|
||||
<h1 id="----npm-config----11150">
|
||||
<span>npm-config</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Manage the npm configuration files</span>
|
||||
</header>
|
||||
|
||||
+48
-5
@@ -186,16 +186,16 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-dedupe----11130">
|
||||
<h1 id="----npm-dedupe----11150">
|
||||
<span>npm-dedupe</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Reduce duplication in the package tree</span>
|
||||
</header>
|
||||
|
||||
<section id="table_of_contents">
|
||||
<h2 id="table-of-contents">Table of contents</h2>
|
||||
<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#description">Description</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#install-strategy"><code>install-strategy</code></a></li><li><a href="#legacy-bundling"><code>legacy-bundling</code></a></li><li><a href="#global-style"><code>global-style</code></a></li><li><a href="#strict-peer-deps"><code>strict-peer-deps</code></a></li><li><a href="#package-lock"><code>package-lock</code></a></li><li><a href="#omit"><code>omit</code></a></li><li><a href="#include"><code>include</code></a></li><li><a href="#ignore-scripts"><code>ignore-scripts</code></a></li><li><a href="#allow-git"><code>allow-git</code></a></li><li><a href="#audit"><code>audit</code></a></li><li><a href="#bin-links"><code>bin-links</code></a></li><li><a href="#fund"><code>fund</code></a></li><li><a href="#dry-run"><code>dry-run</code></a></li><li><a href="#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="#install-strategy"><code>install-strategy</code></a></li><li><a href="#legacy-bundling"><code>legacy-bundling</code></a></li><li><a href="#global-style"><code>global-style</code></a></li><li><a href="#strict-peer-deps"><code>strict-peer-deps</code></a></li><li><a href="#package-lock"><code>package-lock</code></a></li><li><a href="#omit"><code>omit</code></a></li><li><a href="#include"><code>include</code></a></li><li><a href="#ignore-scripts"><code>ignore-scripts</code></a></li><li><a href="#allow-directory"><code>allow-directory</code></a></li><li><a href="#allow-file"><code>allow-file</code></a></li><li><a href="#allow-git"><code>allow-git</code></a></li><li><a href="#allow-remote"><code>allow-remote</code></a></li><li><a href="#audit"><code>audit</code></a></li><li><a href="#bin-links"><code>bin-links</code></a></li><li><a href="#fund"><code>fund</code></a></li><li><a href="#dry-run"><code>dry-run</code></a></li><li><a href="#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>
|
||||
@@ -323,6 +323,34 @@ the order in which omit/include are specified on the command-line.</p>
|
||||
<code>npm start</code>, <code>npm stop</code>, <code>npm restart</code>, <code>npm test</code>, and <code>npm run</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>
|
||||
<h4 id="allow-directory"><code>allow-directory</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
<li>Type: "all", "none", or "root"</li>
|
||||
</ul>
|
||||
<p>Limits the ability for npm to install dependencies from directories. That
|
||||
is, dependencies that point to a directory instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any directories to be installed. <code>none</code> prevents any
|
||||
directories from being installed. <code>root</code> only allows directories defined in
|
||||
your project's package.json to be installed. Also allows directory
|
||||
dependencies to be used for other commands like <code>npm view</code></p>
|
||||
<h4 id="allow-file"><code>allow-file</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
<li>Type: "all", "none", or "root"</li>
|
||||
</ul>
|
||||
<p>Limits the ability for npm to install dependencies from tarball files. That
|
||||
is, dependencies that point to a local tarball file instead of a version or
|
||||
semver range. Please note that this could leave your tree incomplete and
|
||||
some packages may not function as intended or designed. Changing this
|
||||
setting will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any tarball file to be installed. <code>none</code> prevents any tarball
|
||||
file from being installed. <code>root</code> only allows tarball files defined in your
|
||||
project's package.json to be installed. Also allows tarball file
|
||||
dependencies to be used for other commands like <code>npm view</code></p>
|
||||
<h4 id="allow-git"><code>allow-git</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
@@ -331,11 +359,26 @@ run any pre- or post-scripts.</p>
|
||||
<p>Limits the ability for npm to fetch dependencies from git references. That
|
||||
is, dependencies that point to a git repo instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed.</p>
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any git dependencies to be fetched and installed. <code>none</code>
|
||||
prevents any git dependencies from being fetched and installed. <code>root</code> only
|
||||
allows git dependencies defined in your project's package.json to be fetched
|
||||
installed. Also allows git dependencies to be fetched for other commands
|
||||
and installed. Also allows git dependencies to be fetched for other commands
|
||||
like <code>npm view</code></p>
|
||||
<h4 id="allow-remote"><code>allow-remote</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
<li>Type: "all", "none", or "root"</li>
|
||||
</ul>
|
||||
<p>Limits the ability for npm to fetch dependencies from urls. That is,
|
||||
dependencies that point to a tarball url instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any url to be installed. <code>none</code> prevents any url from being
|
||||
installed. <code>root</code> only allows urls defined in your project's package.json to
|
||||
be installed. Also allows url dependencies to be used for other commands
|
||||
like <code>npm view</code></p>
|
||||
<h4 id="audit"><code>audit</code></h4>
|
||||
<ul>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-deprecate----11130">
|
||||
<h1 id="----npm-deprecate----11150">
|
||||
<span>npm-deprecate</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Deprecate a version of a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-diff----11130">
|
||||
<h1 id="----npm-diff----11150">
|
||||
<span>npm-diff</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">The registry diff command</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-dist-tag----11130">
|
||||
<h1 id="----npm-dist-tag----11150">
|
||||
<span>npm-dist-tag</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Modify package distribution tags</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-docs----11130">
|
||||
<h1 id="----npm-docs----11150">
|
||||
<span>npm-docs</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Open documentation for a package in a web browser</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-doctor----11130">
|
||||
<h1 id="----npm-doctor----11150">
|
||||
<span>npm-doctor</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Check the health of your npm environment</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-edit----11130">
|
||||
<h1 id="----npm-edit----11150">
|
||||
<span>npm-edit</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Edit an installed package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-exec----11130">
|
||||
<h1 id="----npm-exec----11150">
|
||||
<span>npm-exec</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Run a command from a local or remote npm package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-explain----11130">
|
||||
<h1 id="----npm-explain----11150">
|
||||
<span>npm-explain</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Explain installed packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-explore----11130">
|
||||
<h1 id="----npm-explore----11150">
|
||||
<span>npm-explore</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Browse an installed package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-find-dupes----11130">
|
||||
<h1 id="----npm-find-dupes----11150">
|
||||
<span>npm-find-dupes</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Find duplication in the package tree</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-fund----11130">
|
||||
<h1 id="----npm-fund----11150">
|
||||
<span>npm-fund</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Retrieve funding information</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-get----11130">
|
||||
<h1 id="----npm-get----11150">
|
||||
<span>npm-get</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Get a value from the npm configuration</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-help-search----11130">
|
||||
<h1 id="----npm-help-search----11150">
|
||||
<span>npm-help-search</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Search npm help documentation</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-help----11130">
|
||||
<h1 id="----npm-help----11150">
|
||||
<span>npm-help</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Get help on npm</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-init----11130">
|
||||
<h1 id="----npm-init----11150">
|
||||
<span>npm-init</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Create a package.json file</span>
|
||||
</header>
|
||||
|
||||
+48
-5
@@ -186,16 +186,16 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-install-ci-test----11130">
|
||||
<h1 id="----npm-install-ci-test----11150">
|
||||
<span>npm-install-ci-test</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Install a project with a clean slate and run tests</span>
|
||||
</header>
|
||||
|
||||
<section id="table_of_contents">
|
||||
<h2 id="table-of-contents">Table of contents</h2>
|
||||
<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#description">Description</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#install-strategy"><code>install-strategy</code></a></li><li><a href="#legacy-bundling"><code>legacy-bundling</code></a></li><li><a href="#global-style"><code>global-style</code></a></li><li><a href="#omit"><code>omit</code></a></li><li><a href="#include"><code>include</code></a></li><li><a href="#strict-peer-deps"><code>strict-peer-deps</code></a></li><li><a href="#foreground-scripts"><code>foreground-scripts</code></a></li><li><a href="#ignore-scripts"><code>ignore-scripts</code></a></li><li><a href="#allow-git"><code>allow-git</code></a></li><li><a href="#audit"><code>audit</code></a></li><li><a href="#bin-links"><code>bin-links</code></a></li><li><a href="#fund"><code>fund</code></a></li><li><a href="#dry-run"><code>dry-run</code></a></li><li><a href="#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="#install-strategy"><code>install-strategy</code></a></li><li><a href="#legacy-bundling"><code>legacy-bundling</code></a></li><li><a href="#global-style"><code>global-style</code></a></li><li><a href="#omit"><code>omit</code></a></li><li><a href="#include"><code>include</code></a></li><li><a href="#strict-peer-deps"><code>strict-peer-deps</code></a></li><li><a href="#foreground-scripts"><code>foreground-scripts</code></a></li><li><a href="#ignore-scripts"><code>ignore-scripts</code></a></li><li><a href="#allow-directory"><code>allow-directory</code></a></li><li><a href="#allow-file"><code>allow-file</code></a></li><li><a href="#allow-git"><code>allow-git</code></a></li><li><a href="#allow-remote"><code>allow-remote</code></a></li><li><a href="#audit"><code>audit</code></a></li><li><a href="#bin-links"><code>bin-links</code></a></li><li><a href="#fund"><code>fund</code></a></li><li><a href="#dry-run"><code>dry-run</code></a></li><li><a href="#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>
|
||||
@@ -297,6 +297,34 @@ but can be useful for debugging.</p>
|
||||
<code>npm start</code>, <code>npm stop</code>, <code>npm restart</code>, <code>npm test</code>, and <code>npm run</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>
|
||||
<h4 id="allow-directory"><code>allow-directory</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
<li>Type: "all", "none", or "root"</li>
|
||||
</ul>
|
||||
<p>Limits the ability for npm to install dependencies from directories. That
|
||||
is, dependencies that point to a directory instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any directories to be installed. <code>none</code> prevents any
|
||||
directories from being installed. <code>root</code> only allows directories defined in
|
||||
your project's package.json to be installed. Also allows directory
|
||||
dependencies to be used for other commands like <code>npm view</code></p>
|
||||
<h4 id="allow-file"><code>allow-file</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
<li>Type: "all", "none", or "root"</li>
|
||||
</ul>
|
||||
<p>Limits the ability for npm to install dependencies from tarball files. That
|
||||
is, dependencies that point to a local tarball file instead of a version or
|
||||
semver range. Please note that this could leave your tree incomplete and
|
||||
some packages may not function as intended or designed. Changing this
|
||||
setting will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any tarball file to be installed. <code>none</code> prevents any tarball
|
||||
file from being installed. <code>root</code> only allows tarball files defined in your
|
||||
project's package.json to be installed. Also allows tarball file
|
||||
dependencies to be used for other commands like <code>npm view</code></p>
|
||||
<h4 id="allow-git"><code>allow-git</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
@@ -305,11 +333,26 @@ run any pre- or post-scripts.</p>
|
||||
<p>Limits the ability for npm to fetch dependencies from git references. That
|
||||
is, dependencies that point to a git repo instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed.</p>
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any git dependencies to be fetched and installed. <code>none</code>
|
||||
prevents any git dependencies from being fetched and installed. <code>root</code> only
|
||||
allows git dependencies defined in your project's package.json to be fetched
|
||||
installed. Also allows git dependencies to be fetched for other commands
|
||||
and installed. Also allows git dependencies to be fetched for other commands
|
||||
like <code>npm view</code></p>
|
||||
<h4 id="allow-remote"><code>allow-remote</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
<li>Type: "all", "none", or "root"</li>
|
||||
</ul>
|
||||
<p>Limits the ability for npm to fetch dependencies from urls. That is,
|
||||
dependencies that point to a tarball url instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any url to be installed. <code>none</code> prevents any url from being
|
||||
installed. <code>root</code> only allows urls defined in your project's package.json to
|
||||
be installed. Also allows url dependencies to be used for other commands
|
||||
like <code>npm view</code></p>
|
||||
<h4 id="audit"><code>audit</code></h4>
|
||||
<ul>
|
||||
|
||||
+58
-8
@@ -186,16 +186,16 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-install-test----11130">
|
||||
<h1 id="----npm-install-test----11150">
|
||||
<span>npm-install-test</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Install package(s) and run tests</span>
|
||||
</header>
|
||||
|
||||
<section id="table_of_contents">
|
||||
<h2 id="table-of-contents">Table of contents</h2>
|
||||
<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#description">Description</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#save"><code>save</code></a></li><li><a href="#save-exact"><code>save-exact</code></a></li><li><a href="#global"><code>global</code></a></li><li><a href="#install-strategy"><code>install-strategy</code></a></li><li><a href="#legacy-bundling"><code>legacy-bundling</code></a></li><li><a href="#global-style"><code>global-style</code></a></li><li><a href="#omit"><code>omit</code></a></li><li><a href="#include"><code>include</code></a></li><li><a href="#strict-peer-deps"><code>strict-peer-deps</code></a></li><li><a href="#prefer-dedupe"><code>prefer-dedupe</code></a></li><li><a href="#package-lock"><code>package-lock</code></a></li><li><a href="#package-lock-only"><code>package-lock-only</code></a></li><li><a href="#foreground-scripts"><code>foreground-scripts</code></a></li><li><a href="#ignore-scripts"><code>ignore-scripts</code></a></li><li><a href="#allow-git"><code>allow-git</code></a></li><li><a href="#audit"><code>audit</code></a></li><li><a href="#before"><code>before</code></a></li><li><a href="#min-release-age"><code>min-release-age</code></a></li><li><a href="#bin-links"><code>bin-links</code></a></li><li><a href="#fund"><code>fund</code></a></li><li><a href="#dry-run"><code>dry-run</code></a></li><li><a href="#cpu"><code>cpu</code></a></li><li><a href="#os"><code>os</code></a></li><li><a href="#libc"><code>libc</code></a></li><li><a href="#workspace"><code>workspace</code></a></li><li><a href="#workspaces"><code>workspaces</code></a></li><li><a href="#include-workspace-root"><code>include-workspace-root</code></a></li><li><a href="#install-links"><code>install-links</code></a></li></ul><li><a href="#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="#save"><code>save</code></a></li><li><a href="#save-exact"><code>save-exact</code></a></li><li><a href="#global"><code>global</code></a></li><li><a href="#install-strategy"><code>install-strategy</code></a></li><li><a href="#legacy-bundling"><code>legacy-bundling</code></a></li><li><a href="#global-style"><code>global-style</code></a></li><li><a href="#omit"><code>omit</code></a></li><li><a href="#include"><code>include</code></a></li><li><a href="#strict-peer-deps"><code>strict-peer-deps</code></a></li><li><a href="#prefer-dedupe"><code>prefer-dedupe</code></a></li><li><a href="#package-lock"><code>package-lock</code></a></li><li><a href="#package-lock-only"><code>package-lock-only</code></a></li><li><a href="#foreground-scripts"><code>foreground-scripts</code></a></li><li><a href="#ignore-scripts"><code>ignore-scripts</code></a></li><li><a href="#allow-directory"><code>allow-directory</code></a></li><li><a href="#allow-file"><code>allow-file</code></a></li><li><a href="#allow-git"><code>allow-git</code></a></li><li><a href="#allow-remote"><code>allow-remote</code></a></li><li><a href="#audit"><code>audit</code></a></li><li><a href="#before"><code>before</code></a></li><li><a href="#min-release-age"><code>min-release-age</code></a></li><li><a href="#bin-links"><code>bin-links</code></a></li><li><a href="#fund"><code>fund</code></a></li><li><a href="#dry-run"><code>dry-run</code></a></li><li><a href="#cpu"><code>cpu</code></a></li><li><a href="#os"><code>os</code></a></li><li><a href="#libc"><code>libc</code></a></li><li><a href="#workspace"><code>workspace</code></a></li><li><a href="#workspaces"><code>workspaces</code></a></li><li><a href="#include-workspace-root"><code>include-workspace-root</code></a></li><li><a href="#install-links"><code>install-links</code></a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
|
||||
</section>
|
||||
|
||||
<div id="_content"><h3 id="synopsis">Synopsis</h3>
|
||||
@@ -353,6 +353,34 @@ but can be useful for debugging.</p>
|
||||
<code>npm start</code>, <code>npm stop</code>, <code>npm restart</code>, <code>npm test</code>, and <code>npm run</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>
|
||||
<h4 id="allow-directory"><code>allow-directory</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
<li>Type: "all", "none", or "root"</li>
|
||||
</ul>
|
||||
<p>Limits the ability for npm to install dependencies from directories. That
|
||||
is, dependencies that point to a directory instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any directories to be installed. <code>none</code> prevents any
|
||||
directories from being installed. <code>root</code> only allows directories defined in
|
||||
your project's package.json to be installed. Also allows directory
|
||||
dependencies to be used for other commands like <code>npm view</code></p>
|
||||
<h4 id="allow-file"><code>allow-file</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
<li>Type: "all", "none", or "root"</li>
|
||||
</ul>
|
||||
<p>Limits the ability for npm to install dependencies from tarball files. That
|
||||
is, dependencies that point to a local tarball file instead of a version or
|
||||
semver range. Please note that this could leave your tree incomplete and
|
||||
some packages may not function as intended or designed. Changing this
|
||||
setting will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any tarball file to be installed. <code>none</code> prevents any tarball
|
||||
file from being installed. <code>root</code> only allows tarball files defined in your
|
||||
project's package.json to be installed. Also allows tarball file
|
||||
dependencies to be used for other commands like <code>npm view</code></p>
|
||||
<h4 id="allow-git"><code>allow-git</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
@@ -361,11 +389,26 @@ run any pre- or post-scripts.</p>
|
||||
<p>Limits the ability for npm to fetch dependencies from git references. That
|
||||
is, dependencies that point to a git repo instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed.</p>
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any git dependencies to be fetched and installed. <code>none</code>
|
||||
prevents any git dependencies from being fetched and installed. <code>root</code> only
|
||||
allows git dependencies defined in your project's package.json to be fetched
|
||||
installed. Also allows git dependencies to be fetched for other commands
|
||||
and installed. Also allows git dependencies to be fetched for other commands
|
||||
like <code>npm view</code></p>
|
||||
<h4 id="allow-remote"><code>allow-remote</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
<li>Type: "all", "none", or "root"</li>
|
||||
</ul>
|
||||
<p>Limits the ability for npm to fetch dependencies from urls. That is,
|
||||
dependencies that point to a tarball url instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any url to be installed. <code>none</code> prevents any url from being
|
||||
installed. <code>root</code> only allows urls defined in your project's package.json to
|
||||
be installed. Also allows url dependencies to be used for other commands
|
||||
like <code>npm view</code></p>
|
||||
<h4 id="audit"><code>audit</code></h4>
|
||||
<ul>
|
||||
@@ -389,7 +432,11 @@ command will error.</p>
|
||||
<code>--before</code> filter, the most recent version less than or equal to that tag
|
||||
will be used. For example, <code>foo@latest</code> might install <code>foo@1.2</code> even though
|
||||
<code>latest</code> is <code>2.0</code>.</p>
|
||||
<p>This config cannot be used with: <code>min-release-age</code></p>
|
||||
<p>If <code>before</code> and <code>min-release-age</code> are both set in the same source, <code>before</code>
|
||||
wins (an explicit absolute date overrides a relative window). Across
|
||||
sources, the standard precedence applies (cli > env > project > user >
|
||||
global), so a higher-priority source can always relax or override a
|
||||
lower-priority one.</p>
|
||||
<h4 id="min-release-age"><code>min-release-age</code></h4>
|
||||
<ul>
|
||||
<li>Default: null</li>
|
||||
@@ -400,8 +447,11 @@ available more than the given number of days ago will be installed. If there
|
||||
are no versions available for the current set of dependencies, the command
|
||||
will error.</p>
|
||||
<p>This flag is a complement to <code>before</code>, which accepts an exact date instead
|
||||
of a relative number of days.</p>
|
||||
<p>This config cannot be used with: <code>before</code></p>
|
||||
of a relative number of days. The two may coexist (e.g. <code>min-release-age</code> in
|
||||
your <code>.npmrc</code> is preserved when npm internally spawns a sub-process with
|
||||
<code>--before</code> while preparing a <code>git:</code> or <code>github:</code> dependency); when both
|
||||
apply, <code>before</code> wins within a single source and across sources the standard
|
||||
precedence rules apply.</p>
|
||||
<p>This value is not exported to the environment for child processes.</p>
|
||||
<h4 id="bin-links"><code>bin-links</code></h4>
|
||||
<ul>
|
||||
|
||||
+58
-8
@@ -186,16 +186,16 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-install----11130">
|
||||
<h1 id="----npm-install----11150">
|
||||
<span>npm-install</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Install a package</span>
|
||||
</header>
|
||||
|
||||
<section id="table_of_contents">
|
||||
<h2 id="table-of-contents">Table of contents</h2>
|
||||
<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#description">Description</a></li><ul><li><a href="#how-npm-install-uses-package-lockjson">How <code>npm install</code> uses <code>package-lock.json</code></a></li></ul><li><a href="#configuration">Configuration</a></li><ul><li><a href="#save"><code>save</code></a></li><li><a href="#save-exact"><code>save-exact</code></a></li><li><a href="#global"><code>global</code></a></li><li><a href="#install-strategy"><code>install-strategy</code></a></li><li><a href="#legacy-bundling"><code>legacy-bundling</code></a></li><li><a href="#global-style"><code>global-style</code></a></li><li><a href="#omit"><code>omit</code></a></li><li><a href="#include"><code>include</code></a></li><li><a href="#strict-peer-deps"><code>strict-peer-deps</code></a></li><li><a href="#prefer-dedupe"><code>prefer-dedupe</code></a></li><li><a href="#package-lock"><code>package-lock</code></a></li><li><a href="#package-lock-only"><code>package-lock-only</code></a></li><li><a href="#foreground-scripts"><code>foreground-scripts</code></a></li><li><a href="#ignore-scripts"><code>ignore-scripts</code></a></li><li><a href="#allow-git"><code>allow-git</code></a></li><li><a href="#audit"><code>audit</code></a></li><li><a href="#before"><code>before</code></a></li><li><a href="#min-release-age"><code>min-release-age</code></a></li><li><a href="#bin-links"><code>bin-links</code></a></li><li><a href="#fund"><code>fund</code></a></li><li><a href="#dry-run"><code>dry-run</code></a></li><li><a href="#cpu"><code>cpu</code></a></li><li><a href="#os"><code>os</code></a></li><li><a href="#libc"><code>libc</code></a></li><li><a href="#workspace"><code>workspace</code></a></li><li><a href="#workspaces"><code>workspaces</code></a></li><li><a href="#include-workspace-root"><code>include-workspace-root</code></a></li><li><a href="#install-links"><code>install-links</code></a></li></ul><li><a href="#algorithm">Algorithm</a></li><li><a href="#see-also">See Also</a></li></ul></div>
|
||||
<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#description">Description</a></li><ul><li><a href="#how-npm-install-uses-package-lockjson">How <code>npm install</code> uses <code>package-lock.json</code></a></li></ul><li><a href="#configuration">Configuration</a></li><ul><li><a href="#save"><code>save</code></a></li><li><a href="#save-exact"><code>save-exact</code></a></li><li><a href="#global"><code>global</code></a></li><li><a href="#install-strategy"><code>install-strategy</code></a></li><li><a href="#legacy-bundling"><code>legacy-bundling</code></a></li><li><a href="#global-style"><code>global-style</code></a></li><li><a href="#omit"><code>omit</code></a></li><li><a href="#include"><code>include</code></a></li><li><a href="#strict-peer-deps"><code>strict-peer-deps</code></a></li><li><a href="#prefer-dedupe"><code>prefer-dedupe</code></a></li><li><a href="#package-lock"><code>package-lock</code></a></li><li><a href="#package-lock-only"><code>package-lock-only</code></a></li><li><a href="#foreground-scripts"><code>foreground-scripts</code></a></li><li><a href="#ignore-scripts"><code>ignore-scripts</code></a></li><li><a href="#allow-directory"><code>allow-directory</code></a></li><li><a href="#allow-file"><code>allow-file</code></a></li><li><a href="#allow-git"><code>allow-git</code></a></li><li><a href="#allow-remote"><code>allow-remote</code></a></li><li><a href="#audit"><code>audit</code></a></li><li><a href="#before"><code>before</code></a></li><li><a href="#min-release-age"><code>min-release-age</code></a></li><li><a href="#bin-links"><code>bin-links</code></a></li><li><a href="#fund"><code>fund</code></a></li><li><a href="#dry-run"><code>dry-run</code></a></li><li><a href="#cpu"><code>cpu</code></a></li><li><a href="#os"><code>os</code></a></li><li><a href="#libc"><code>libc</code></a></li><li><a href="#workspace"><code>workspace</code></a></li><li><a href="#workspaces"><code>workspaces</code></a></li><li><a href="#include-workspace-root"><code>include-workspace-root</code></a></li><li><a href="#install-links"><code>install-links</code></a></li></ul><li><a href="#algorithm">Algorithm</a></li><li><a href="#see-also">See Also</a></li></ul></div>
|
||||
</section>
|
||||
|
||||
<div id="_content"><h3 id="synopsis">Synopsis</h3>
|
||||
@@ -628,6 +628,34 @@ but can be useful for debugging.</p>
|
||||
<code>npm start</code>, <code>npm stop</code>, <code>npm restart</code>, <code>npm test</code>, and <code>npm run</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>
|
||||
<h4 id="allow-directory"><code>allow-directory</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
<li>Type: "all", "none", or "root"</li>
|
||||
</ul>
|
||||
<p>Limits the ability for npm to install dependencies from directories. That
|
||||
is, dependencies that point to a directory instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any directories to be installed. <code>none</code> prevents any
|
||||
directories from being installed. <code>root</code> only allows directories defined in
|
||||
your project's package.json to be installed. Also allows directory
|
||||
dependencies to be used for other commands like <code>npm view</code></p>
|
||||
<h4 id="allow-file"><code>allow-file</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
<li>Type: "all", "none", or "root"</li>
|
||||
</ul>
|
||||
<p>Limits the ability for npm to install dependencies from tarball files. That
|
||||
is, dependencies that point to a local tarball file instead of a version or
|
||||
semver range. Please note that this could leave your tree incomplete and
|
||||
some packages may not function as intended or designed. Changing this
|
||||
setting will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any tarball file to be installed. <code>none</code> prevents any tarball
|
||||
file from being installed. <code>root</code> only allows tarball files defined in your
|
||||
project's package.json to be installed. Also allows tarball file
|
||||
dependencies to be used for other commands like <code>npm view</code></p>
|
||||
<h4 id="allow-git"><code>allow-git</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
@@ -636,11 +664,26 @@ run any pre- or post-scripts.</p>
|
||||
<p>Limits the ability for npm to fetch dependencies from git references. That
|
||||
is, dependencies that point to a git repo instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed.</p>
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any git dependencies to be fetched and installed. <code>none</code>
|
||||
prevents any git dependencies from being fetched and installed. <code>root</code> only
|
||||
allows git dependencies defined in your project's package.json to be fetched
|
||||
installed. Also allows git dependencies to be fetched for other commands
|
||||
and installed. Also allows git dependencies to be fetched for other commands
|
||||
like <code>npm view</code></p>
|
||||
<h4 id="allow-remote"><code>allow-remote</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
<li>Type: "all", "none", or "root"</li>
|
||||
</ul>
|
||||
<p>Limits the ability for npm to fetch dependencies from urls. That is,
|
||||
dependencies that point to a tarball url instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any url to be installed. <code>none</code> prevents any url from being
|
||||
installed. <code>root</code> only allows urls defined in your project's package.json to
|
||||
be installed. Also allows url dependencies to be used for other commands
|
||||
like <code>npm view</code></p>
|
||||
<h4 id="audit"><code>audit</code></h4>
|
||||
<ul>
|
||||
@@ -664,7 +707,11 @@ command will error.</p>
|
||||
<code>--before</code> filter, the most recent version less than or equal to that tag
|
||||
will be used. For example, <code>foo@latest</code> might install <code>foo@1.2</code> even though
|
||||
<code>latest</code> is <code>2.0</code>.</p>
|
||||
<p>This config cannot be used with: <code>min-release-age</code></p>
|
||||
<p>If <code>before</code> and <code>min-release-age</code> are both set in the same source, <code>before</code>
|
||||
wins (an explicit absolute date overrides a relative window). Across
|
||||
sources, the standard precedence applies (cli > env > project > user >
|
||||
global), so a higher-priority source can always relax or override a
|
||||
lower-priority one.</p>
|
||||
<h4 id="min-release-age"><code>min-release-age</code></h4>
|
||||
<ul>
|
||||
<li>Default: null</li>
|
||||
@@ -675,8 +722,11 @@ available more than the given number of days ago will be installed. If there
|
||||
are no versions available for the current set of dependencies, the command
|
||||
will error.</p>
|
||||
<p>This flag is a complement to <code>before</code>, which accepts an exact date instead
|
||||
of a relative number of days.</p>
|
||||
<p>This config cannot be used with: <code>before</code></p>
|
||||
of a relative number of days. The two may coexist (e.g. <code>min-release-age</code> in
|
||||
your <code>.npmrc</code> is preserved when npm internally spawns a sub-process with
|
||||
<code>--before</code> while preparing a <code>git:</code> or <code>github:</code> dependency); when both
|
||||
apply, <code>before</code> wins within a single source and across sources the standard
|
||||
precedence rules apply.</p>
|
||||
<p>This value is not exported to the environment for child processes.</p>
|
||||
<h4 id="bin-links"><code>bin-links</code></h4>
|
||||
<ul>
|
||||
|
||||
+48
-5
@@ -186,16 +186,16 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-link----11130">
|
||||
<h1 id="----npm-link----11150">
|
||||
<span>npm-link</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Symlink a package folder</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="#caveat">Caveat</a></li><li><a href="#workspace-usage">Workspace Usage</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#save"><code>save</code></a></li><li><a href="#save-exact"><code>save-exact</code></a></li><li><a href="#global"><code>global</code></a></li><li><a href="#install-strategy"><code>install-strategy</code></a></li><li><a href="#legacy-bundling"><code>legacy-bundling</code></a></li><li><a href="#global-style"><code>global-style</code></a></li><li><a href="#strict-peer-deps"><code>strict-peer-deps</code></a></li><li><a href="#package-lock"><code>package-lock</code></a></li><li><a href="#omit"><code>omit</code></a></li><li><a href="#include"><code>include</code></a></li><li><a href="#ignore-scripts"><code>ignore-scripts</code></a></li><li><a href="#allow-git"><code>allow-git</code></a></li><li><a href="#audit"><code>audit</code></a></li><li><a href="#bin-links"><code>bin-links</code></a></li><li><a href="#fund"><code>fund</code></a></li><li><a href="#dry-run"><code>dry-run</code></a></li><li><a href="#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="#caveat">Caveat</a></li><li><a href="#workspace-usage">Workspace Usage</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#save"><code>save</code></a></li><li><a href="#save-exact"><code>save-exact</code></a></li><li><a href="#global"><code>global</code></a></li><li><a href="#install-strategy"><code>install-strategy</code></a></li><li><a href="#legacy-bundling"><code>legacy-bundling</code></a></li><li><a href="#global-style"><code>global-style</code></a></li><li><a href="#strict-peer-deps"><code>strict-peer-deps</code></a></li><li><a href="#package-lock"><code>package-lock</code></a></li><li><a href="#omit"><code>omit</code></a></li><li><a href="#include"><code>include</code></a></li><li><a href="#ignore-scripts"><code>ignore-scripts</code></a></li><li><a href="#allow-directory"><code>allow-directory</code></a></li><li><a href="#allow-file"><code>allow-file</code></a></li><li><a href="#allow-git"><code>allow-git</code></a></li><li><a href="#allow-remote"><code>allow-remote</code></a></li><li><a href="#audit"><code>audit</code></a></li><li><a href="#bin-links"><code>bin-links</code></a></li><li><a href="#fund"><code>fund</code></a></li><li><a href="#dry-run"><code>dry-run</code></a></li><li><a href="#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>
|
||||
@@ -366,6 +366,34 @@ the order in which omit/include are specified on the command-line.</p>
|
||||
<code>npm start</code>, <code>npm stop</code>, <code>npm restart</code>, <code>npm test</code>, and <code>npm run</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>
|
||||
<h4 id="allow-directory"><code>allow-directory</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
<li>Type: "all", "none", or "root"</li>
|
||||
</ul>
|
||||
<p>Limits the ability for npm to install dependencies from directories. That
|
||||
is, dependencies that point to a directory instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any directories to be installed. <code>none</code> prevents any
|
||||
directories from being installed. <code>root</code> only allows directories defined in
|
||||
your project's package.json to be installed. Also allows directory
|
||||
dependencies to be used for other commands like <code>npm view</code></p>
|
||||
<h4 id="allow-file"><code>allow-file</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
<li>Type: "all", "none", or "root"</li>
|
||||
</ul>
|
||||
<p>Limits the ability for npm to install dependencies from tarball files. That
|
||||
is, dependencies that point to a local tarball file instead of a version or
|
||||
semver range. Please note that this could leave your tree incomplete and
|
||||
some packages may not function as intended or designed. Changing this
|
||||
setting will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any tarball file to be installed. <code>none</code> prevents any tarball
|
||||
file from being installed. <code>root</code> only allows tarball files defined in your
|
||||
project's package.json to be installed. Also allows tarball file
|
||||
dependencies to be used for other commands like <code>npm view</code></p>
|
||||
<h4 id="allow-git"><code>allow-git</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
@@ -374,11 +402,26 @@ run any pre- or post-scripts.</p>
|
||||
<p>Limits the ability for npm to fetch dependencies from git references. That
|
||||
is, dependencies that point to a git repo instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed.</p>
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any git dependencies to be fetched and installed. <code>none</code>
|
||||
prevents any git dependencies from being fetched and installed. <code>root</code> only
|
||||
allows git dependencies defined in your project's package.json to be fetched
|
||||
installed. Also allows git dependencies to be fetched for other commands
|
||||
and installed. Also allows git dependencies to be fetched for other commands
|
||||
like <code>npm view</code></p>
|
||||
<h4 id="allow-remote"><code>allow-remote</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
<li>Type: "all", "none", or "root"</li>
|
||||
</ul>
|
||||
<p>Limits the ability for npm to fetch dependencies from urls. That is,
|
||||
dependencies that point to a tarball url instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any url to be installed. <code>none</code> prevents any url from being
|
||||
installed. <code>root</code> only allows urls defined in your project's package.json to
|
||||
be installed. Also allows url dependencies to be used for other commands
|
||||
like <code>npm view</code></p>
|
||||
<h4 id="audit"><code>audit</code></h4>
|
||||
<ul>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-ll----11130">
|
||||
<h1 id="----npm-ll----11150">
|
||||
<span>npm-ll</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">List installed packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-login----11130">
|
||||
<h1 id="----npm-login----11150">
|
||||
<span>npm-login</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Login to a registry user account</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-logout----11130">
|
||||
<h1 id="----npm-logout----11150">
|
||||
<span>npm-logout</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Log out of the registry</span>
|
||||
</header>
|
||||
|
||||
+3
-3
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-ls----11130">
|
||||
<h1 id="----npm-ls----11150">
|
||||
<span>npm-ls</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">List installed packages</span>
|
||||
</header>
|
||||
@@ -209,7 +209,7 @@ alias: list
|
||||
<p>Positional arguments are <code>name@version-range</code> identifiers, which will limit the results to only the paths to the packages named.
|
||||
Note that nested packages will <em>also</em> show the paths to the specified packages.
|
||||
For example, running <code>npm ls promzard</code> in npm's source tree will show:</p>
|
||||
<pre><code class="language-bash">npm@11.13.0 /path/to/npm
|
||||
<pre><code class="language-bash">npm@11.15.0 /path/to/npm
|
||||
└─┬ init-package-json@0.0.4
|
||||
└── promzard@0.1.5
|
||||
</code></pre>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-org----11130">
|
||||
<h1 id="----npm-org----11150">
|
||||
<span>npm-org</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Manage orgs</span>
|
||||
</header>
|
||||
|
||||
+12
-5
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-outdated----11130">
|
||||
<h1 id="----npm-outdated----11150">
|
||||
<span>npm-outdated</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Check for outdated packages</span>
|
||||
</header>
|
||||
@@ -328,7 +328,11 @@ command will error.</p>
|
||||
<code>--before</code> filter, the most recent version less than or equal to that tag
|
||||
will be used. For example, <code>foo@latest</code> might install <code>foo@1.2</code> even though
|
||||
<code>latest</code> is <code>2.0</code>.</p>
|
||||
<p>This config cannot be used with: <code>min-release-age</code></p>
|
||||
<p>If <code>before</code> and <code>min-release-age</code> are both set in the same source, <code>before</code>
|
||||
wins (an explicit absolute date overrides a relative window). Across
|
||||
sources, the standard precedence applies (cli > env > project > user >
|
||||
global), so a higher-priority source can always relax or override a
|
||||
lower-priority one.</p>
|
||||
<h4 id="min-release-age"><code>min-release-age</code></h4>
|
||||
<ul>
|
||||
<li>Default: null</li>
|
||||
@@ -339,8 +343,11 @@ available more than the given number of days ago will be installed. If there
|
||||
are no versions available for the current set of dependencies, the command
|
||||
will error.</p>
|
||||
<p>This flag is a complement to <code>before</code>, which accepts an exact date instead
|
||||
of a relative number of days.</p>
|
||||
<p>This config cannot be used with: <code>before</code></p>
|
||||
of a relative number of days. The two may coexist (e.g. <code>min-release-age</code> in
|
||||
your <code>.npmrc</code> is preserved when npm internally spawns a sub-process with
|
||||
<code>--before</code> while preparing a <code>git:</code> or <code>github:</code> dependency); when both
|
||||
apply, <code>before</code> wins within a single source and across sources the standard
|
||||
precedence rules apply.</p>
|
||||
<p>This value is not exported to the environment for child processes.</p>
|
||||
<h3 id="see-also">See Also</h3>
|
||||
<ul>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-owner----11130">
|
||||
<h1 id="----npm-owner----11150">
|
||||
<span>npm-owner</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Manage package owners</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-pack----11130">
|
||||
<h1 id="----npm-pack----11150">
|
||||
<span>npm-pack</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Create a tarball from a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-ping----11130">
|
||||
<h1 id="----npm-ping----11150">
|
||||
<span>npm-ping</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Ping npm registry</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-pkg----11130">
|
||||
<h1 id="----npm-pkg----11150">
|
||||
<span>npm-pkg</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Manages your package.json</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-prefix----11130">
|
||||
<h1 id="----npm-prefix----11150">
|
||||
<span>npm-prefix</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Display prefix</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-profile----11130">
|
||||
<h1 id="----npm-profile----11150">
|
||||
<span>npm-profile</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Change settings on your registry profile</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-prune----11130">
|
||||
<h1 id="----npm-prune----11150">
|
||||
<span>npm-prune</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Remove extraneous packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-publish----11130">
|
||||
<h1 id="----npm-publish----11150">
|
||||
<span>npm-publish</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Publish a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-query----11130">
|
||||
<h1 id="----npm-query----11150">
|
||||
<span>npm-query</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Dependency selector query</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-rebuild----11130">
|
||||
<h1 id="----npm-rebuild----11150">
|
||||
<span>npm-rebuild</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Rebuild a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-repo----11130">
|
||||
<h1 id="----npm-repo----11150">
|
||||
<span>npm-repo</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Open package repository page in the browser</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-restart----11130">
|
||||
<h1 id="----npm-restart----11150">
|
||||
<span>npm-restart</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Restart a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-root----11130">
|
||||
<h1 id="----npm-root----11150">
|
||||
<span>npm-root</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Display npm root</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-run----11130">
|
||||
<h1 id="----npm-run----11150">
|
||||
<span>npm-run</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Run arbitrary package scripts</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-sbom----11130">
|
||||
<h1 id="----npm-sbom----11150">
|
||||
<span>npm-sbom</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Generate a Software Bill of Materials (SBOM)</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-search----11130">
|
||||
<h1 id="----npm-search----11150">
|
||||
<span>npm-search</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Search for packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-set----11130">
|
||||
<h1 id="----npm-set----11150">
|
||||
<span>npm-set</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Set a value in the npm configuration</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-shrinkwrap----11130">
|
||||
<h1 id="----npm-shrinkwrap----11150">
|
||||
<span>npm-shrinkwrap</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Lock down dependency versions for publication</span>
|
||||
</header>
|
||||
|
||||
+582
@@ -0,0 +1,582 @@
|
||||
<!DOCTYPE html><html><head>
|
||||
<meta charset="utf-8">
|
||||
<title>npm-stage</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;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
margin: 1em 0;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #e1e4e8;
|
||||
overflow: hidden;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
table thead {
|
||||
background-color: #f6f8fa;
|
||||
}
|
||||
|
||||
table tbody {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
table th,
|
||||
table td {
|
||||
padding: 0.75em;
|
||||
text-align: left;
|
||||
border-right: 1px solid #e1e4e8;
|
||||
border-bottom: 1px solid #e1e4e8;
|
||||
}
|
||||
|
||||
table th:last-child,
|
||||
table td:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
table tbody tr:last-child td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
table th {
|
||||
font-weight: 600;
|
||||
background-color: #f6f8fa;
|
||||
}
|
||||
|
||||
table code {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
</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-stage----11150">
|
||||
<span>npm-stage</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Stage packages for publishing</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="#prerequisites">Prerequisites</a></li><li><a href="#subcommands">Subcommands</a></li><li><a href="#2fa-requirements-by-subcommand">2FA Requirements by Subcommand</a></li><li><a href="#tag-behavior">Tag Behavior</a></li><li><a href="#token-behavior">Token Behavior</a></li><li><a href="#trust-relationship-permissions">Trust Relationship Permissions</a></li><li><a href="#best-practices">Best Practices</a></li><li><a href="#configuration">Configuration</a></li><li><a href="#npm-stage-publish"><code>npm stage publish</code></a></li><ul><li><a href="#synopsis2">Synopsis</a></li><li><a href="#flags">Flags</a></li></ul><li><a href="#npm-stage-list"><code>npm stage list</code></a></li><ul><li><a href="#synopsis3">Synopsis</a></li><li><a href="#flags2">Flags</a></li></ul><li><a href="#npm-stage-view"><code>npm stage view</code></a></li><ul><li><a href="#synopsis4">Synopsis</a></li><li><a href="#flags3">Flags</a></li></ul><li><a href="#npm-stage-approve"><code>npm stage approve</code></a></li><ul><li><a href="#synopsis5">Synopsis</a></li><li><a href="#flags4">Flags</a></li></ul><li><a href="#npm-stage-reject"><code>npm stage reject</code></a></li><ul><li><a href="#synopsis6">Synopsis</a></li><li><a href="#flags5">Flags</a></li></ul><li><a href="#npm-stage-download"><code>npm stage download</code></a></li><ul><li><a href="#synopsis7">Synopsis</a></li><li><a href="#flags6">Flags</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 stage
|
||||
</code></pre>
|
||||
<p>Note: This command is unaware of workspaces.</p>
|
||||
<h3 id="description">Description</h3>
|
||||
<p>Staged publishing allows package maintainers to require proof-of-presence
|
||||
for all publishes. Proof-of-presence is where a human is involved,
|
||||
interjects, and provides authentication (2FA) during an action — in this
|
||||
case, publishing an npm package.</p>
|
||||
<p>Typically when maintainers use automated workflows to publish,
|
||||
proof-of-presence is lacking as there's no convenient way to interject the
|
||||
process and provide 2FA, as is the case for publishing with a granular
|
||||
access token with bypass and the trusted publishing flow. Staged publishing
|
||||
allows users to have their automated workflows stage a package without a 2FA
|
||||
prompt, deferring the act of 2FA, allowing the maintainer to approve the
|
||||
staged package and publish at a later point.</p>
|
||||
<p>The <code>npm stage publish</code> command packs the current working directory and
|
||||
places that version of the package into the registry in a state where it's
|
||||
not available for public access, allowing maintainers to approve the package
|
||||
at a later point in time. The act of staging does not prompt for 2FA and can be done with any token
|
||||
type, the act of approving will.</p>
|
||||
<p>Key behaviors:</p>
|
||||
<ul>
|
||||
<li>Staged packages share the same semver version unique index as published
|
||||
packages — you cannot publish a version that already exists as a staged
|
||||
version for that package.</li>
|
||||
<li>You can still publish packages normally while you have staged packages
|
||||
pending.</li>
|
||||
<li>You can stage multiple versions of the same package.</li>
|
||||
<li><code>npm stage publish</code> has parity with <code>npm publish</code> and will respect
|
||||
<code>"private": true</code> in <code>package.json</code>, refusing to stage the package.</li>
|
||||
</ul>
|
||||
<h3 id="prerequisites">Prerequisites</h3>
|
||||
<p>Before using <code>npm stage</code> commands, ensure the following requirements are met:</p>
|
||||
<ul>
|
||||
<li><strong>Write permissions on the package:</strong> You must have write access to the
|
||||
package you're configuring.</li>
|
||||
<li><strong>Package must exist:</strong> The package you're configuring must already exist
|
||||
on the npm registry.</li>
|
||||
<li><strong>2FA enabled on your account:</strong> Commands that require 2FA will prompt you
|
||||
to authenticate. If you don't already have 2FA enabled on your account,
|
||||
you must enable it before using these commands.</li>
|
||||
</ul>
|
||||
<h3 id="subcommands">Subcommands</h3>
|
||||
<ul>
|
||||
<li><code>npm stage publish [<package-spec>]</code> - Stage a package for publishing</li>
|
||||
<li><code>npm stage list [<package-spec>]</code> - List all staged package versions</li>
|
||||
<li><code>npm stage view <stage-id></code> - View details of a specific staged package</li>
|
||||
<li><code>npm stage approve <stage-id></code> - Approve a staged package for publishing</li>
|
||||
<li><code>npm stage reject <stage-id></code> - Reject a staged package</li>
|
||||
<li><code>npm stage download <stage-id></code> - Download the tarball for inspection</li>
|
||||
</ul>
|
||||
<h3 id="2fa-requirements-by-subcommand">2FA Requirements by Subcommand</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Command</th>
|
||||
<th>Requires 2FA</th>
|
||||
<th>Notes</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>npm stage publish</code></td>
|
||||
<td>No</td>
|
||||
<td>Designed for automated workflows; defers 2FA to approval</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>npm stage list</code></td>
|
||||
<td>No</td>
|
||||
<td>View staged packages</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>npm stage view</code></td>
|
||||
<td>No</td>
|
||||
<td>View staged package details</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>npm stage approve</code></td>
|
||||
<td>Yes</td>
|
||||
<td>Prompts for 2FA to publish the staged package</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>npm stage reject</code></td>
|
||||
<td>Yes</td>
|
||||
<td>Prompts for 2FA to permanently remove the staged package</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>npm stage download</code></td>
|
||||
<td>No</td>
|
||||
<td>Downloads the tarball for local inspection</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 id="tag-behavior">Tag Behavior</h3>
|
||||
<p>The <code>--tag</code> flag follows the same logic as <code>npm publish</code>. If no tag is
|
||||
provided, the <code>latest</code> tag is used by default. For pre-release versions
|
||||
(e.g., <code>1.0.0-beta.1</code>) and non-latest semver versions, the tag must be
|
||||
explicitly provided — otherwise the CLI will error, just as <code>npm publish</code>
|
||||
would.</p>
|
||||
<p>The tag is an immutable property of the staged package. Once a package is
|
||||
staged with a given tag, the tag cannot be changed. If you need to stage the
|
||||
same version with a different tag, you must first reject the existing staged
|
||||
package using <code>npm stage reject</code> and then re-stage it with the desired tag.</p>
|
||||
<h3 id="token-behavior">Token Behavior</h3>
|
||||
<p>The key difference with staged publishing is that <code>npm stage publish</code> never
|
||||
requires a 2FA prompt, regardless of token type. This is what makes it
|
||||
suitable for automated workflows. The goal of <code>npm stage publish</code> is
|
||||
deferring proof-of-presence to a later point in time.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Token Type</th>
|
||||
<th><code>npm stage publish</code></th>
|
||||
<th><code>npm publish</code></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>GAT with bypass</td>
|
||||
<td>Can stage</td>
|
||||
<td>Can publish (if allowed by package publishing access)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GAT without bypass</td>
|
||||
<td>Can stage</td>
|
||||
<td>2FA prompt (if allowed by package publishing access)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Session token</td>
|
||||
<td>Can stage</td>
|
||||
<td>2FA prompt</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Trust token (OIDC)</td>
|
||||
<td>Can stage (if allowed)</td>
|
||||
<td>Can publish (if allowed)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 id="trust-relationship-permissions">Trust Relationship Permissions</h3>
|
||||
<p>With staged publishing, trust relationships now support granular command
|
||||
permissions. Shortlived tokens issued through trust relationships can only be
|
||||
used with <code>npm stage publish</code> and <code>npm publish</code>. Shortlived tokens cannot run
|
||||
<code>npm stage</code> subcommands.</p>
|
||||
<p><code>npm trust <provider></code> supports <code>--allow-publish</code> and <code>--allow-stage-publish</code>
|
||||
to control which commands are available through each trust relationship.</p>
|
||||
<h3 id="best-practices">Best Practices</h3>
|
||||
<p><strong>Note:</strong> The addition of staged publishing does not make your account or org
|
||||
more secure. Maintainers must still use the best practices listed below.</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p><strong>Delete Granular Access Tokens (GAT) with bypass 2FA enabled.</strong>
|
||||
Now with staged publishing, we've eliminated the need for a GAT token
|
||||
that can bypass 2FA. We encourage you to delete all your tokens with
|
||||
bypass enabled and switch to using a trust relationship in your automated
|
||||
workflows, or create a GAT without bypass and use <code>npm stage publish</code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Disallow tokens from publishing at the package level.</strong>
|
||||
All packages have their own access controls under "package access"
|
||||
allowing packages to be published with bypass tokens, which is no longer
|
||||
a necessity. We encourage you to select "Require two-factor
|
||||
authentication and disallow tokens (recommended)" for all your packages
|
||||
on the package access page.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Configure trust relationship permissions to prevent <code>npm publish</code>.</strong>
|
||||
We encourage you to only enable <code>npm stage publish</code> on your trust
|
||||
relationships and disable <code>npm publish</code>.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<h3 id="configuration">Configuration</h3>
|
||||
<h3 id="npm-stage-publish"><code>npm stage publish</code></h3>
|
||||
<p>Stage a package for publishing, deferring proof-of-presence (2FA) to a later point in time</p>
|
||||
<h4 id="synopsis2">Synopsis</h4>
|
||||
<pre><code class="language-bash">npm stage publish <package-spec>
|
||||
</code></pre>
|
||||
<h4 id="flags">Flags</h4>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Flag</th>
|
||||
<th>Default</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>--tag</code></td>
|
||||
<td>"latest"</td>
|
||||
<td>String</td>
|
||||
<td>If you ask npm to install a package and don't tell it a specific version, then it will install the specified tag. It is the tag added to the package@version specified in the <code>npm dist-tag add</code> command, if no explicit tag is given. When used by the <code>npm diff</code> command, this is the tag used to fetch the tarball that will be compared with the local files by default. If used in the <code>npm publish</code> command, this is the tag that will be added to the package submitted to the registry.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--access</code></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<pre><code>'public' for new packages, existing packages it will not change the current level
|
||||
</code></pre>
|
||||
<p>| null, "restricted", or "public" | If you do not want your scoped package to be publicly viewable (and installable) set <code>--access=restricted</code>. Unscoped packages cannot be set to <code>restricted</code>. Note: This defaults to not changing the current access level for existing packages. Specifying a value of <code>restricted</code> or <code>public</code> during publish will change the access for an existing package the same way that <code>npm access set status</code> would. |
|
||||
| <code>--dry-run</code> | false | Boolean | Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, <code>install</code>, <code>update</code>, <code>dedupe</code>, <code>uninstall</code>, as well as <code>pack</code> and <code>publish</code>. Note: This is NOT honored by other network related commands, eg <code>dist-tags</code>, <code>owner</code>, etc. |
|
||||
| <code>--otp</code> | null | null or String | 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>. 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. |
|
||||
| <code>--workspace</code>, <code>-w</code> | | String (can be set multiple times) | Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. Valid values for the <code>workspace</code> config are either: * Workspace names * Path to a workspace directory * Path to a parent workspace directory (will result in selecting all workspaces within that folder) When set for the <code>npm init</code> command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. |
|
||||
| <code>--workspaces</code> | null | null or Boolean | Set to true to run the command in the context of <strong>all</strong> configured workspaces. Explicitly setting this to false will cause commands like <code>install</code> to ignore workspaces altogether. When not set explicitly: - Commands that operate on the <code>node_modules</code> tree (install, update, etc.) will link workspaces into the <code>node_modules</code> folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, <em>unless</em> one or more workspaces are specified in the <code>workspace</code> config. |
|
||||
| <code>--include-workspace-root</code> | false | Boolean | Include the workspace root when workspaces are enabled for a command. When false, specifying individual workspaces via the <code>workspace</code> config, or all workspaces via the <code>workspaces</code> flag, will cause npm to operate only on the specified workspaces, and not on the root project. |
|
||||
| <code>--provenance</code> | false | Boolean | When publishing from a supported cloud CI/CD system, the package will be publicly linked to where it was built and published from. |</p>
|
||||
<h3 id="npm-stage-list"><code>npm stage list</code></h3>
|
||||
<p>List all staged package versions</p>
|
||||
<h4 id="synopsis3">Synopsis</h4>
|
||||
<pre><code class="language-bash">npm stage list [<package-spec>]
|
||||
</code></pre>
|
||||
<h4 id="flags2">Flags</h4>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Flag</th>
|
||||
<th>Default</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>--json</code></td>
|
||||
<td>false</td>
|
||||
<td>Boolean</td>
|
||||
<td>Whether or not to output JSON data, rather than the normal output. * In <code>npm pkg set</code> it enables parsing set values with JSON.parse() before saving them to your <code>package.json</code>. Not supported by all npm commands.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--registry</code></td>
|
||||
<td>"<a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a>"</td>
|
||||
<td>URL</td>
|
||||
<td>The base URL of the npm registry.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 id="npm-stage-view"><code>npm stage view</code></h3>
|
||||
<p>View details of a specific staged package</p>
|
||||
<h4 id="synopsis4">Synopsis</h4>
|
||||
<pre><code class="language-bash">npm stage view <stage-id>
|
||||
</code></pre>
|
||||
<h4 id="flags3">Flags</h4>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Flag</th>
|
||||
<th>Default</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>--json</code></td>
|
||||
<td>false</td>
|
||||
<td>Boolean</td>
|
||||
<td>Whether or not to output JSON data, rather than the normal output. * In <code>npm pkg set</code> it enables parsing set values with JSON.parse() before saving them to your <code>package.json</code>. Not supported by all npm commands.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--registry</code></td>
|
||||
<td>"<a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a>"</td>
|
||||
<td>URL</td>
|
||||
<td>The base URL of the npm registry.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 id="npm-stage-approve"><code>npm stage approve</code></h3>
|
||||
<p>Approve a staged package, publishing it to the npm registry</p>
|
||||
<h4 id="synopsis5">Synopsis</h4>
|
||||
<pre><code class="language-bash">npm stage approve <stage-id>
|
||||
</code></pre>
|
||||
<h4 id="flags4">Flags</h4>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Flag</th>
|
||||
<th>Default</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>--otp</code></td>
|
||||
<td>null</td>
|
||||
<td>null or String</td>
|
||||
<td>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>. 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.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--registry</code></td>
|
||||
<td>"<a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a>"</td>
|
||||
<td>URL</td>
|
||||
<td>The base URL of the npm registry.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 id="npm-stage-reject"><code>npm stage reject</code></h3>
|
||||
<p>Reject a staged package, removing it from the registry</p>
|
||||
<h4 id="synopsis6">Synopsis</h4>
|
||||
<pre><code class="language-bash">npm stage reject <stage-id>
|
||||
</code></pre>
|
||||
<h4 id="flags5">Flags</h4>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Flag</th>
|
||||
<th>Default</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>--otp</code></td>
|
||||
<td>null</td>
|
||||
<td>null or String</td>
|
||||
<td>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>. 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.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--registry</code></td>
|
||||
<td>"<a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a>"</td>
|
||||
<td>URL</td>
|
||||
<td>The base URL of the npm registry.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 id="npm-stage-download"><code>npm stage download</code></h3>
|
||||
<p>Download the tarball of a staged package for inspection</p>
|
||||
<h4 id="synopsis7">Synopsis</h4>
|
||||
<pre><code class="language-bash">npm stage download <stage-id>
|
||||
</code></pre>
|
||||
<h4 id="flags6">Flags</h4>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Flag</th>
|
||||
<th>Default</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>--json</code></td>
|
||||
<td>false</td>
|
||||
<td>Boolean</td>
|
||||
<td>Whether or not to output JSON data, rather than the normal output. * In <code>npm pkg set</code> it enables parsing set values with JSON.parse() before saving them to your <code>package.json</code>. Not supported by all npm commands.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--registry</code></td>
|
||||
<td>"<a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a>"</td>
|
||||
<td>URL</td>
|
||||
<td>The base URL of the npm registry.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 id="see-also">See Also</h3>
|
||||
<ul>
|
||||
<li><a href="../commands/npm-publish.html">npm publish</a></li>
|
||||
<li><a href="../commands/npm-unpublish.html">npm unpublish</a></li>
|
||||
<li><a href="../commands/npm-trust.html">npm trust</a></li>
|
||||
</ul></div>
|
||||
|
||||
<footer id="edit">
|
||||
<a href="https://github.com/npm/cli/edit/latest/docs/lib/content/commands/npm-stage.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
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-star----11130">
|
||||
<h1 id="----npm-star----11150">
|
||||
<span>npm-star</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Mark your favorite packages</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-stars----11130">
|
||||
<h1 id="----npm-stars----11150">
|
||||
<span>npm-stars</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">View packages marked as favorites</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-start----11130">
|
||||
<h1 id="----npm-start----11150">
|
||||
<span>npm-start</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Start a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-stop----11130">
|
||||
<h1 id="----npm-stop----11150">
|
||||
<span>npm-stop</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Stop a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-team----11130">
|
||||
<h1 id="----npm-team----11150">
|
||||
<span>npm-team</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Manage organization teams and team memberships</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-test----11130">
|
||||
<h1 id="----npm-test----11150">
|
||||
<span>npm-test</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Test a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-token----11130">
|
||||
<h1 id="----npm-token----11150">
|
||||
<span>npm-token</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Manage your authentication tokens</span>
|
||||
</header>
|
||||
|
||||
+50
-6
@@ -186,16 +186,16 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-trust----11130">
|
||||
<h1 id="----npm-trust----11150">
|
||||
<span>npm-trust</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Manage trusted publishing relationships between packages and CI/CD providers</span>
|
||||
</header>
|
||||
|
||||
<section id="table_of_contents">
|
||||
<h2 id="table-of-contents">Table of contents</h2>
|
||||
<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#prerequisites">Prerequisites</a></li><li><a href="#description">Description</a></li><li><a href="#bulk-usage">Bulk Usage</a></li><li><a href="#configuration">Configuration</a></li><li><a href="#npm-trust-github"><code>npm trust github</code></a></li><ul><li><a href="#synopsis2">Synopsis</a></li><li><a href="#flags">Flags</a></li></ul><li><a href="#npm-trust-gitlab"><code>npm trust gitlab</code></a></li><ul><li><a href="#synopsis3">Synopsis</a></li><li><a href="#flags2">Flags</a></li></ul><li><a href="#npm-trust-circleci"><code>npm trust circleci</code></a></li><ul><li><a href="#synopsis4">Synopsis</a></li><li><a href="#flags3">Flags</a></li></ul><li><a href="#npm-trust-list"><code>npm trust list</code></a></li><ul><li><a href="#synopsis5">Synopsis</a></li><li><a href="#flags4">Flags</a></li></ul><li><a href="#npm-trust-revoke"><code>npm trust revoke</code></a></li><ul><li><a href="#synopsis6">Synopsis</a></li><li><a href="#flags5">Flags</a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
|
||||
<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#prerequisites">Prerequisites</a></li><li><a href="#description">Description</a></li><li><a href="#permissions">Permissions</a></li><li><a href="#provider-options">Provider Options</a></li><li><a href="#bulk-usage">Bulk Usage</a></li><li><a href="#configuration">Configuration</a></li><li><a href="#npm-trust-github"><code>npm trust github</code></a></li><ul><li><a href="#synopsis2">Synopsis</a></li><li><a href="#flags">Flags</a></li></ul><li><a href="#npm-trust-gitlab"><code>npm trust gitlab</code></a></li><ul><li><a href="#synopsis3">Synopsis</a></li><li><a href="#flags2">Flags</a></li></ul><li><a href="#npm-trust-circleci"><code>npm trust circleci</code></a></li><ul><li><a href="#synopsis4">Synopsis</a></li><li><a href="#flags3">Flags</a></li></ul><li><a href="#npm-trust-list"><code>npm trust list</code></a></li><ul><li><a href="#synopsis5">Synopsis</a></li><li><a href="#flags4">Flags</a></li></ul><li><a href="#npm-trust-revoke"><code>npm trust revoke</code></a></li><ul><li><a href="#synopsis6">Synopsis</a></li><li><a href="#flags5">Flags</a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
|
||||
</section>
|
||||
|
||||
<div id="_content"><h3 id="synopsis">Synopsis</h3>
|
||||
@@ -214,6 +214,14 @@ npm command-line interface
|
||||
<p>For a comprehensive overview of trusted publishing, see the <a href="https://docs.npmjs.com/trusted-publishers">npm trusted publishers documentation</a>.</p>
|
||||
<p>The <code>[package]</code> argument specifies the package name. If omitted, npm will use the name from the <code>package.json</code> in the current directory.</p>
|
||||
<p>Each trust relationship has its own set of configuration options and flags based on the OIDC claims provided by that provider. OIDC claims come from the CI/CD provider and include information such as repository name, workflow file, or environment. Since each provider's claims differ, the available flags and configuration keys are not universal—npm matches the claims supported by each provider's OIDC configuration. For specific details on which claims and flags are supported for a given provider, use <code>npm trust <provider> --help</code>.</p>
|
||||
<h3 id="permissions">Permissions</h3>
|
||||
<p>When creating a trust relationship, you must specify at least one permission flag to indicate which operations the trusted publisher is allowed to perform:</p>
|
||||
<ul>
|
||||
<li><code>--allow-publish</code>: Allows the trusted publisher to run <code>npm publish</code> for the package.</li>
|
||||
<li><code>--allow-stage-publish</code>: Allows the trusted publisher to run <code>npm stage</code> for the package. The alias <code>--allow-staged-publish</code> is also accepted.</li>
|
||||
</ul>
|
||||
<p>At least one of these flags is required when creating a trust configuration. You can specify both to grant both permissions.</p>
|
||||
<h3 id="provider-options">Provider Options</h3>
|
||||
<p>The required options depend on the CI/CD provider you're configuring. Detailed information about each option is available in the <a href="https://docs.npmjs.com/trusted-publishers#managing-trusted-publisher-configurations">managing trusted publisher configurations</a> section of the npm documentation. If a provider is repository-based and the option is not provided, npm will use the <code>repository.url</code> field from your <code>package.json</code>, if available.</p>
|
||||
<p>Currently, the registry only supports one configuration per package. If you attempt to create a new trust relationship when one already exists, it will result in an error. To replace an existing configuration:</p>
|
||||
<ol>
|
||||
@@ -229,7 +237,7 @@ npm command-line interface
|
||||
<h3 id="npm-trust-github"><code>npm trust github</code></h3>
|
||||
<p>Create a trusted relationship between a package and GitHub Actions</p>
|
||||
<h4 id="synopsis2">Synopsis</h4>
|
||||
<pre><code class="language-bash">npm trust github [package] --file [--repo|--repository] [--env|--environment] [-y|--yes]
|
||||
<pre><code class="language-bash">npm trust github [package] --file [--repo|--repository] [--env|--environment] [--allow-publish] [--allow-stage-publish] [-y|--yes]
|
||||
</code></pre>
|
||||
<h4 id="flags">Flags</h4>
|
||||
<table>
|
||||
@@ -261,6 +269,18 @@ npm command-line interface
|
||||
<td>CI environment name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--allow-publish</code></td>
|
||||
<td>false</td>
|
||||
<td>Boolean</td>
|
||||
<td>Allow npm publish for this trusted publisher configuration</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--allow-stage-publish</code>, <code>--allow-staged-publish</code></td>
|
||||
<td>false</td>
|
||||
<td>Boolean</td>
|
||||
<td>Allow npm stage publish for this trusted publisher configuration</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--dry-run</code></td>
|
||||
<td>false</td>
|
||||
<td>Boolean</td>
|
||||
@@ -289,7 +309,7 @@ npm command-line interface
|
||||
<h3 id="npm-trust-gitlab"><code>npm trust gitlab</code></h3>
|
||||
<p>Create a trusted relationship between a package and GitLab CI/CD</p>
|
||||
<h4 id="synopsis3">Synopsis</h4>
|
||||
<pre><code class="language-bash">npm trust gitlab [package] --file [--project|--repo|--repository] [--env|--environment] [-y|--yes]
|
||||
<pre><code class="language-bash">npm trust gitlab [package] --file [--project|--repo|--repository] [--env|--environment] [--allow-publish] [--allow-stage-publish] [-y|--yes]
|
||||
</code></pre>
|
||||
<h4 id="flags2">Flags</h4>
|
||||
<table>
|
||||
@@ -321,6 +341,18 @@ npm command-line interface
|
||||
<td>CI environment name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--allow-publish</code></td>
|
||||
<td>false</td>
|
||||
<td>Boolean</td>
|
||||
<td>Allow npm publish for this trusted publisher configuration</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--allow-stage-publish</code>, <code>--allow-staged-publish</code></td>
|
||||
<td>false</td>
|
||||
<td>Boolean</td>
|
||||
<td>Allow npm stage publish for this trusted publisher configuration</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--dry-run</code></td>
|
||||
<td>false</td>
|
||||
<td>Boolean</td>
|
||||
@@ -349,7 +381,7 @@ npm command-line interface
|
||||
<h3 id="npm-trust-circleci"><code>npm trust circleci</code></h3>
|
||||
<p>Create a trusted relationship between a package and CircleCI</p>
|
||||
<h4 id="synopsis4">Synopsis</h4>
|
||||
<pre><code class="language-bash">npm trust circleci [package] --org-id <uuid> --project-id <uuid> --pipeline-definition-id <uuid> --vcs-origin <origin> [--context-id <uuid>...] [-y|--yes]
|
||||
<pre><code class="language-bash">npm trust circleci [package] --org-id <uuid> --project-id <uuid> --pipeline-definition-id <uuid> --vcs-origin <origin> [--context-id <uuid>...] [--allow-publish] [--allow-stage-publish] [-y|--yes]
|
||||
</code></pre>
|
||||
<h4 id="flags3">Flags</h4>
|
||||
<table>
|
||||
@@ -393,6 +425,18 @@ npm command-line interface
|
||||
<td>CircleCI context UUID to match</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--allow-publish</code></td>
|
||||
<td>false</td>
|
||||
<td>Boolean</td>
|
||||
<td>Allow npm publish for this trusted publisher configuration</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--allow-stage-publish</code>, <code>--allow-staged-publish</code></td>
|
||||
<td>false</td>
|
||||
<td>Boolean</td>
|
||||
<td>Allow npm stage publish for this trusted publisher configuration</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--dry-run</code></td>
|
||||
<td>false</td>
|
||||
<td>Boolean</td>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-undeprecate----11130">
|
||||
<h1 id="----npm-undeprecate----11150">
|
||||
<span>npm-undeprecate</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Undeprecate a version of a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-uninstall----11130">
|
||||
<h1 id="----npm-uninstall----11150">
|
||||
<span>npm-uninstall</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Remove a package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-unpublish----11130">
|
||||
<h1 id="----npm-unpublish----11150">
|
||||
<span>npm-unpublish</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Remove a package from the registry</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-unstar----11130">
|
||||
<h1 id="----npm-unstar----11150">
|
||||
<span>npm-unstar</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Remove an item from your favorite packages</span>
|
||||
</header>
|
||||
|
||||
+12
-5
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-update----11130">
|
||||
<h1 id="----npm-update----11150">
|
||||
<span>npm-update</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Update packages</span>
|
||||
</header>
|
||||
@@ -429,7 +429,11 @@ command will error.</p>
|
||||
<code>--before</code> filter, the most recent version less than or equal to that tag
|
||||
will be used. For example, <code>foo@latest</code> might install <code>foo@1.2</code> even though
|
||||
<code>latest</code> is <code>2.0</code>.</p>
|
||||
<p>This config cannot be used with: <code>min-release-age</code></p>
|
||||
<p>If <code>before</code> and <code>min-release-age</code> are both set in the same source, <code>before</code>
|
||||
wins (an explicit absolute date overrides a relative window). Across
|
||||
sources, the standard precedence applies (cli > env > project > user >
|
||||
global), so a higher-priority source can always relax or override a
|
||||
lower-priority one.</p>
|
||||
<h4 id="min-release-age"><code>min-release-age</code></h4>
|
||||
<ul>
|
||||
<li>Default: null</li>
|
||||
@@ -440,8 +444,11 @@ available more than the given number of days ago will be installed. If there
|
||||
are no versions available for the current set of dependencies, the command
|
||||
will error.</p>
|
||||
<p>This flag is a complement to <code>before</code>, which accepts an exact date instead
|
||||
of a relative number of days.</p>
|
||||
<p>This config cannot be used with: <code>before</code></p>
|
||||
of a relative number of days. The two may coexist (e.g. <code>min-release-age</code> in
|
||||
your <code>.npmrc</code> is preserved when npm internally spawns a sub-process with
|
||||
<code>--before</code> while preparing a <code>git:</code> or <code>github:</code> dependency); when both
|
||||
apply, <code>before</code> wins within a single source and across sources the standard
|
||||
precedence rules apply.</p>
|
||||
<p>This value is not exported to the environment for child processes.</p>
|
||||
<h4 id="bin-links"><code>bin-links</code></h4>
|
||||
<ul>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-version----11130">
|
||||
<h1 id="----npm-version----11150">
|
||||
<span>npm-version</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Bump a package version</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-view----11130">
|
||||
<h1 id="----npm-view----11150">
|
||||
<span>npm-view</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">View registry info</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-whoami----11130">
|
||||
<h1 id="----npm-whoami----11150">
|
||||
<span>npm-whoami</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Display npm username</span>
|
||||
</header>
|
||||
|
||||
+3
-3
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm----11130">
|
||||
<h1 id="----npm----11150">
|
||||
<span>npm</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">javascript package manager</span>
|
||||
</header>
|
||||
@@ -203,7 +203,7 @@ npm command-line interface
|
||||
</code></pre>
|
||||
<p>Note: This command is unaware of workspaces.</p>
|
||||
<h3 id="version">Version</h3>
|
||||
<p>11.13.0</p>
|
||||
<p>11.15.0</p>
|
||||
<h3 id="description">Description</h3>
|
||||
<p>npm is the package manager for the Node JavaScript platform.
|
||||
It puts modules in place so that node can find them, and manages dependency conflicts intelligently.</p>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npx----11130">
|
||||
<h1 id="----npx----11150">
|
||||
<span>npx</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Run a command from a local or remote npm package</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----folders----11130">
|
||||
<h1 id="----folders----11150">
|
||||
<span>Folders</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Folder structures used by npm</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----install----11130">
|
||||
<h1 id="----install----11150">
|
||||
<span>Install</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Download and install node and npm</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----folders----11130">
|
||||
<h1 id="----folders----11150">
|
||||
<span>Folders</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Folder structures used by npm</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----packagejson----11130">
|
||||
<h1 id="----packagejson----11150">
|
||||
<span>package.json</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Specifics of npm's package.json handling</span>
|
||||
</header>
|
||||
|
||||
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npm-shrinkwrapjson----11130">
|
||||
<h1 id="----npm-shrinkwrapjson----11150">
|
||||
<span>npm-shrinkwrap.json</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">A publishable lockfile</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----npmrc----11130">
|
||||
<h1 id="----npmrc----11150">
|
||||
<span>.npmrc</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">The npm config files</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----packagejson----11130">
|
||||
<h1 id="----packagejson----11150">
|
||||
<span>package.json</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Specifics of npm's package.json handling</span>
|
||||
</header>
|
||||
|
||||
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----package-lockjson----11130">
|
||||
<h1 id="----package-lockjson----11150">
|
||||
<span>package-lock.json</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">A manifestation of the manifest</span>
|
||||
</header>
|
||||
|
||||
+58
-8
@@ -186,16 +186,16 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----config----11130">
|
||||
<h1 id="----config----11150">
|
||||
<span>Config</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">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-git"><code>allow-git</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="#bypass-2fa"><code>bypass-2fa</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="#expires"><code>expires</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-attestations"><code>include-attestations</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-private"><code>init-private</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="#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-directory"><code>allow-directory</code></a></li><li><a href="#allow-file"><code>allow-file</code></a></li><li><a href="#allow-git"><code>allow-git</code></a></li><li><a href="#allow-remote"><code>allow-remote</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="#bypass-2fa"><code>bypass-2fa</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="#expires"><code>expires</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-attestations"><code>include-attestations</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-private"><code>init-private</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>Line truncated
|
||||
</section>
|
||||
|
||||
<div id="_content"><h3 id="description">Description</h3>
|
||||
@@ -323,6 +323,34 @@ change the access for an existing package the same way that <code>npm access set
|
||||
<p>When running <code>npm outdated</code> and <code>npm ls</code>, setting <code>--all</code> will show all
|
||||
outdated or installed packages, rather than only those directly depended
|
||||
upon by the current project.</p>
|
||||
<h4 id="allow-directory"><code>allow-directory</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
<li>Type: "all", "none", or "root"</li>
|
||||
</ul>
|
||||
<p>Limits the ability for npm to install dependencies from directories. That
|
||||
is, dependencies that point to a directory instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any directories to be installed. <code>none</code> prevents any
|
||||
directories from being installed. <code>root</code> only allows directories defined in
|
||||
your project's package.json to be installed. Also allows directory
|
||||
dependencies to be used for other commands like <code>npm view</code></p>
|
||||
<h4 id="allow-file"><code>allow-file</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
<li>Type: "all", "none", or "root"</li>
|
||||
</ul>
|
||||
<p>Limits the ability for npm to install dependencies from tarball files. That
|
||||
is, dependencies that point to a local tarball file instead of a version or
|
||||
semver range. Please note that this could leave your tree incomplete and
|
||||
some packages may not function as intended or designed. Changing this
|
||||
setting will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any tarball file to be installed. <code>none</code> prevents any tarball
|
||||
file from being installed. <code>root</code> only allows tarball files defined in your
|
||||
project's package.json to be installed. Also allows tarball file
|
||||
dependencies to be used for other commands like <code>npm view</code></p>
|
||||
<h4 id="allow-git"><code>allow-git</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
@@ -331,11 +359,26 @@ upon by the current project.</p>
|
||||
<p>Limits the ability for npm to fetch dependencies from git references. That
|
||||
is, dependencies that point to a git repo instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed.</p>
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any git dependencies to be fetched and installed. <code>none</code>
|
||||
prevents any git dependencies from being fetched and installed. <code>root</code> only
|
||||
allows git dependencies defined in your project's package.json to be fetched
|
||||
installed. Also allows git dependencies to be fetched for other commands
|
||||
and installed. Also allows git dependencies to be fetched for other commands
|
||||
like <code>npm view</code></p>
|
||||
<h4 id="allow-remote"><code>allow-remote</code></h4>
|
||||
<ul>
|
||||
<li>Default: "all"</li>
|
||||
<li>Type: "all", "none", or "root"</li>
|
||||
</ul>
|
||||
<p>Limits the ability for npm to fetch dependencies from urls. That is,
|
||||
dependencies that point to a tarball url instead of a version or semver
|
||||
range. Please note that this could leave your tree incomplete and some
|
||||
packages may not function as intended or designed. Changing this setting
|
||||
will not remove dependencies that are already installed.</p>
|
||||
<p><code>all</code> allows any url to be installed. <code>none</code> prevents any url from being
|
||||
installed. <code>root</code> only allows urls defined in your project's package.json to
|
||||
be installed. Also allows url dependencies to be used for other commands
|
||||
like <code>npm view</code></p>
|
||||
<h4 id="allow-same-version"><code>allow-same-version</code></h4>
|
||||
<ul>
|
||||
@@ -380,7 +423,11 @@ command will error.</p>
|
||||
<code>--before</code> filter, the most recent version less than or equal to that tag
|
||||
will be used. For example, <code>foo@latest</code> might install <code>foo@1.2</code> even though
|
||||
<code>latest</code> is <code>2.0</code>.</p>
|
||||
<p>This config cannot be used with: <code>min-release-age</code></p>
|
||||
<p>If <code>before</code> and <code>min-release-age</code> are both set in the same source, <code>before</code>
|
||||
wins (an explicit absolute date overrides a relative window). Across
|
||||
sources, the standard precedence applies (cli > env > project > user >
|
||||
global), so a higher-priority source can always relax or override a
|
||||
lower-priority one.</p>
|
||||
<h4 id="bin-links"><code>bin-links</code></h4>
|
||||
<ul>
|
||||
<li>Default: true</li>
|
||||
@@ -990,8 +1037,11 @@ available more than the given number of days ago will be installed. If there
|
||||
are no versions available for the current set of dependencies, the command
|
||||
will error.</p>
|
||||
<p>This flag is a complement to <code>before</code>, which accepts an exact date instead
|
||||
of a relative number of days.</p>
|
||||
<p>This config cannot be used with: <code>before</code></p>
|
||||
of a relative number of days. The two may coexist (e.g. <code>min-release-age</code> in
|
||||
your <code>.npmrc</code> is preserved when npm internally spawns a sub-process with
|
||||
<code>--before</code> while preparing a <code>git:</code> or <code>github:</code> dependency); when both
|
||||
apply, <code>before</code> wins within a single source and across sources the standard
|
||||
precedence rules apply.</p>
|
||||
<p>This value is not exported to the environment for child processes.</p>
|
||||
<h4 id="name"><code>name</code></h4>
|
||||
<ul>
|
||||
|
||||
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----dependency-selectors----11130">
|
||||
<h1 id="----dependency-selectors----11150">
|
||||
<span>Dependency Selectors</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Dependency Selector Syntax & Querying</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----developers----11130">
|
||||
<h1 id="----developers----11150">
|
||||
<span>Developers</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Developer guide</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----logging----11130">
|
||||
<h1 id="----logging----11150">
|
||||
<span>Logging</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Why, What & How we Log</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----organizations----11130">
|
||||
<h1 id="----organizations----11150">
|
||||
<span>Organizations</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Working with teams & organizations</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----package-spec----11130">
|
||||
<h1 id="----package-spec----11150">
|
||||
<span>Package spec</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Package name specifier</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----registry----11130">
|
||||
<h1 id="----registry----11150">
|
||||
<span>Registry</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">The JavaScript Package Registry</span>
|
||||
</header>
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ npm command-line interface
|
||||
|
||||
<section id="content">
|
||||
<header class="title">
|
||||
<h1 id="----removal----11130">
|
||||
<h1 id="----removal----11150">
|
||||
<span>Removal</span>
|
||||
<span class="version">@11.13.0</span>
|
||||
<span class="version">@11.15.0</span>
|
||||
</h1>
|
||||
<span class="description">Cleaning the slate</span>
|
||||
</header>
|
||||
|
||||
Loaded 100 of 311 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user