deps: upgrade npm to 8.5.2

PR-URL: https://github.com/nodejs/node/pull/42122
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Danielle Adams <adamzdanielle@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This commit is contained in:
npm team authored and Stewart X Addison committed 2022-03-07 17:38:13 +00:00
1 parent 3fc3f521d6
commit ccacf99e5c
421 files changed
+3975 -4914

No files matched your search

+9 -3
View File
@@ -6,21 +6,27 @@ description: Set access level on published packages
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/access.js -->
```bash
npm access public [<package>]
npm access restricted [<package>]
npm access grant <read-only|read-write> <scope:team> [<package>]
npm access revoke <scope:team> [<package>]
npm access 2fa-required [<package>]
npm access 2fa-not-required [<package>]
npm access ls-packages [<user>|<scope>|<scope:team>]
npm access ls-collaborators [<package> [<user>]]
npm access edit [<package>]
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/access.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
Used to set access controls on private packages.
+10 -1
View File
@@ -6,12 +6,21 @@ description: Add a registry user account
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/adduser.js -->
```bash
npm adduser [--registry=url] [--scope=@orgname] [--auth-type=legacy]
npm adduser
aliases: login, add-user
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/adduser.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+10 -4
View File
@@ -6,13 +6,19 @@ description: Run a security audit
### Synopsis
```bash
npm audit [--json] [--production] [--audit-level=(low|moderate|high|critical)]
npm audit fix [--force|--package-lock-only|--dry-run|--production|--only=(dev|prod)]
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/audit.js -->
common options: [--production] [--only=(dev|prod)]
```bash
npm audit [fix]
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/audit.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
The audit command submits a description of the dependencies configured in
+10 -1
View File
@@ -6,10 +6,19 @@ description: Display npm bin folder
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/bin.js -->
```bash
npm bin [-g|--global]
npm bin
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/bin.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+12 -3
View File
@@ -6,12 +6,21 @@ description: Report bugs for a package in a web browser
### Synopsis
```bash
npm bugs [<pkgname> [<pkgname> ...]]
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/bugs.js -->
aliases: issues
```bash
npm bugs [<pkgname>]
alias: issues
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/bugs.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This command tries to guess at the likely location of a package's bug
+16 -8
View File
@@ -6,18 +6,26 @@ description: Manipulates packages cache
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/cache.js -->
```bash
npm cache add <tarball file>...
npm cache add <folder>...
npm cache add <tarball url>...
npm cache add <name>@<version>...
npm cache clean
aliases: npm cache clear, npm cache rm
npm cache add <tarball file>
npm cache add <folder>
npm cache add <tarball url>
npm cache add <git url>
npm cache add <name>@<version>
npm cache clean [<key>]
npm cache ls [<name>@<version>]
npm cache verify
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/cache.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+11
View File
@@ -6,10 +6,21 @@ description: Install a project with a clean slate
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/ci.js -->
```bash
npm ci
aliases: clean-install, ic, install-clean, isntall-clean
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/ci.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This command is similar to [`npm install`](/commands/npm-install), except
+10 -1
View File
@@ -6,10 +6,19 @@ description: Tab Completion for npm
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/completion.js -->
```bash
source <(npm completion)
npm completion
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/completion.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+9 -2
View File
@@ -6,18 +6,25 @@ description: Manage the npm configuration files
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/config.js -->
```bash
npm config set <key>=<value> [<key>=<value> ...]
npm config get [<key> [<key> ...]]
npm config delete <key> [<key> ...]
npm config list [--json]
npm config edit
npm set <key>=<value> [<key>=<value> ...]
npm get [<key> [<key> ...]]
alias: c
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/config.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+28 -2
View File
@@ -6,13 +6,21 @@ description: Reduce duplication in the package tree
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/dedupe.js -->
```bash
npm dedupe
npm ddp
aliases: ddp
alias: ddp
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/dedupe.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
Searches the local package tree and attempts to simplify the overall
@@ -145,6 +153,24 @@ When package package-locks are disabled, automatic pruning of extraneous
modules will also be disabled. To remove extraneous modules with
package-locks disabled use `npm prune`.
This configuration does not affect `npm ci`.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
#### `save`
* Default: `true` unless when using `npm update` or `npm dedupe` where it
defaults to `false`
* Type: Boolean
Save installed packages to a `package.json` file as dependencies.
When used with the `npm rm` command, removes the dependency from
`package.json`.
Will also prevent writing to `package-lock.json` if set to `false`.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
+10 -1
View File
@@ -6,10 +6,19 @@ description: Deprecate a version of a package
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/deprecate.js -->
```bash
npm deprecate <pkg>[@<version range>] <message>
npm deprecate <pkg>[@<version>] <message>
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/deprecate.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+9 -4
View File
@@ -6,14 +6,19 @@ description: The registry diff command
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/diff.js -->
```bash
npm diff [...<paths>]
npm diff --diff=<pkg-name> [...<paths>]
npm diff --diff=<version-a> [--diff=<version-b>] [...<paths>]
npm diff --diff=<spec-a> [--diff=<spec-b>] [...<paths>]
npm diff [--diff-ignore-all-space] [--diff-name-only] [...<paths>]
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/diff.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
Similar to its `git diff` counterpart, this command will print diff patches
+10 -1
View File
@@ -6,14 +6,23 @@ description: Modify package distribution tags
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/dist-tag.js -->
```bash
npm dist-tag add <pkg>@<version> [<tag>]
npm dist-tag rm <pkg> <tag>
npm dist-tag ls [<pkg>]
aliases: dist-tags
alias: dist-tags
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/dist-tag.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
Add, remove, and enumerate distribution tags on a package:
+10 -1
View File
@@ -6,12 +6,21 @@ description: Open documentation for a package in a web browser
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/docs.js -->
```bash
npm docs [<pkgname> [<pkgname> ...]]
aliases: home
alias: home
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/docs.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This command tries to guess at the likely location of a package's
+9
View File
@@ -6,10 +6,19 @@ description: Check your npm environment
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/doctor.js -->
```bash
npm doctor
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/doctor.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+10 -1
View File
@@ -6,10 +6,19 @@ description: Edit an installed package
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/edit.js -->
```bash
npm edit <pkg>
npm edit <pkg>[/<subpkg>...]
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/edit.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+10 -13
View File
@@ -6,27 +6,24 @@ description: Run a command from a local or remote npm package
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/exec.js -->
```bash
npm exec -- <pkg>[@<version>] [args...]
npm exec --package=<pkg>[@<version>] -- <cmd> [args...]
npm exec -c '<cmd> [args...]'
npm exec --package=foo -c '<cmd> [args...]'
npm exec [--ws] [-w <workspace-name] [args...]
npx <pkg>[@<specifier>] [args...]
npx -p <pkg>[@<specifier>] <cmd> [args...]
npx -c '<cmd> [args...]'
npx -p <pkg>[@<specifier>] -c '<cmd> [args...]'
Run without --call or positional args to open interactive subshell
alias: npm x, npx
common options:
--package=<pkg> (may be specified multiple times)
-p is a shorthand for --package only when using npx executable
-c <cmd> --call=<cmd> (may not be mixed with positional arguments)
alias: x
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/exec.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This command allows you to run an arbitrary command from an npm package
+9
View File
@@ -6,12 +6,21 @@ description: Explain installed packages
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/explain.js -->
```bash
npm explain <folder | specifier>
alias: why
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/explain.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This command will print the chain of dependencies causing a given package
+9
View File
@@ -6,10 +6,19 @@ description: Browse an installed package
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/explore.js -->
```bash
npm explore <pkg> [ -- <command>]
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/explore.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+11
View File
@@ -6,10 +6,19 @@ description: Find duplication in the package tree
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/find-dupes.js -->
```bash
npm find-dupes
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/find-dupes.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
Runs `npm dedupe` in `--dry-run` mode, making npm only output the
@@ -82,6 +91,8 @@ When package package-locks are disabled, automatic pruning of extraneous
modules will also be disabled. To remove extraneous modules with
package-locks disabled use `npm prune`.
This configuration does not affect `npm ci`.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
+10 -2
View File
@@ -6,11 +6,19 @@ description: Retrieve funding information
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/fund.js -->
```bash
npm fund [<pkg>]
npm fund [-w <workspace-name>]
npm fund [[<@scope>/]<pkg>]
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/fund.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This command retrieves information on how to fund the dependencies of a
+9
View File
@@ -6,10 +6,19 @@ description: Search npm help documentation
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/help-search.js -->
```bash
npm help-search <text>
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/help-search.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+11
View File
@@ -6,10 +6,21 @@ description: Get help on npm
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/help.js -->
```bash
npm help <term> [<terms..>]
alias: hlep
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/help.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+11 -2
View File
@@ -6,13 +6,22 @@ description: Manage registry hooks
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/hook.js -->
```bash
npm hook add <pkg> <url> <secret> [--type=<type>]
npm hook ls [pkg]
npm hook add <entity> <url> <secret>
npm hook update <id> <url> [secret]
npm hook rm <id>
npm hook update <id> <url> <secret>
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/hook.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+23 -4
View File
@@ -6,13 +6,23 @@ description: Create a package.json file
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/init.js -->
```bash
npm init [--yes|-y|--scope]
npm init <@scope> (same as `npm exec <@scope>/create`)
npm init [<@scope>/]<name> (same as `npm exec [<@scope>/]create-<name>`)
npm init [-w <dir>] [args...]
npm init [--force|-f|--yes|-y|--scope]
npm init <@scope> (same as `npx <@scope>/create`)
npm init [<@scope>/]<name> (same as `npx [<@scope>/]create-<name>`)
aliases: create, innit
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/init.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
`npm init <initializer>` can be used to set up a new or existing npm
@@ -38,6 +48,15 @@ strictly additive, so it will keep any fields and values that were already
set. You can also use `-y`/`--yes` to skip the questionnaire altogether. If
you pass `--scope`, it will create a scoped package.
*Note:* if a user already has the `create-<initializer>` package
globally installed, that will be what `npm init` uses. If you want npm
to use the latest version, or another specific version you must specify
it:
* `npm init foo@latest` # fetches and runs the latest `create-foo` from
the registry
* `npm init foo@1.2.3` # runs `create-foo@1.2.3` specifically
#### Forwarding additional options
Any additional options will be passed directly to the command, so `npm init
+10 -1
View File
@@ -6,12 +6,21 @@ description: Install a project with a clean slate and run tests
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/install-ci-test.js -->
```bash
npm install-ci-test
alias: npm cit
alias: cit
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/install-ci-test.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This command runs `npm ci` followed immediately by `npm test`.
+26 -11
View File
@@ -6,20 +6,30 @@ description: Install package(s) and run tests
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/install-test.js -->
```bash
npm install-test (with no args, in package dir)
npm install-test [<@scope>/]<name>
npm install-test [<@scope>/]<name>@<tag>
npm install-test [<@scope>/]<name>@<version>
npm install-test [<@scope>/]<name>@<version range>
npm install-test [<@scope>/]<pkg>
npm install-test [<@scope>/]<pkg>@<tag>
npm install-test [<@scope>/]<pkg>@<version>
npm install-test [<@scope>/]<pkg>@<version range>
npm install-test <alias>@npm:<name>
npm install-test <folder>
npm install-test <tarball file>
npm install-test <tarball url>
npm install-test <folder>
npm install-test <git:// url>
npm install-test <github username>/<github project>
alias: npm it
common options: [--save|--save-dev|--save-optional] [--save-exact] [--dry-run]
alias: it
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/install-test.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This command runs an `npm install` followed immediately by an `npm test`. It
@@ -32,13 +42,16 @@ takes exactly the same arguments as `npm install`.
<!-- see lib/utils/config/definitions.js -->
#### `save`
* Default: true
* Default: `true` unless when using `npm update` or `npm dedupe` where it
defaults to `false`
* Type: Boolean
Save installed packages to a package.json file as dependencies.
Save installed packages to a `package.json` file as dependencies.
When used with the `npm rm` command, removes the dependency from
package.json.
`package.json`.
Will also prevent writing to `package-lock.json` if set to `false`.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
@@ -133,6 +146,8 @@ When package package-locks are disabled, automatic pruning of extraneous
modules will also be disabled. To remove extraneous modules with
package-locks disabled use `npm prune`.
This configuration does not affect `npm ci`.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
+25 -13
View File
@@ -6,23 +6,30 @@ description: Install a package
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/install.js -->
```bash
npm install (with no args, in package dir)
npm install [<@scope>/]<name>
npm install [<@scope>/]<name>@<tag>
npm install [<@scope>/]<name>@<version>
npm install [<@scope>/]<name>@<version range>
npm install [<@scope>/]<pkg>
npm install [<@scope>/]<pkg>@<tag>
npm install [<@scope>/]<pkg>@<version>
npm install [<@scope>/]<pkg>@<version range>
npm install <alias>@npm:<name>
npm install <git-host>:<git-user>/<repo-name>
npm install <git repo url>
npm install <folder>
npm install <tarball file>
npm install <tarball url>
npm install <folder>
npm install <git:// url>
npm install <github username>/<github project>
aliases: npm i, npm add
common options: [-P|--save-prod|-D|--save-dev|-O|--save-optional|--save-peer] [-E|--save-exact] [-B|--save-bundle] [--no-save] [--dry-run]
aliases: i, in, ins, inst, insta, instal, isnt, isnta, isntal, add
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/install.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This command installs a package and any packages that it depends on. If the
@@ -425,13 +432,16 @@ These are some of the most common options related to installation.
<!-- see lib/utils/config/definitions.js -->
#### `save`
* Default: true
* Default: `true` unless when using `npm update` or `npm dedupe` where it
defaults to `false`
* Type: Boolean
Save installed packages to a package.json file as dependencies.
Save installed packages to a `package.json` file as dependencies.
When used with the `npm rm` command, removes the dependency from
package.json.
`package.json`.
Will also prevent writing to `package-lock.json` if set to `false`.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
@@ -526,6 +536,8 @@ When package package-locks are disabled, automatic pruning of extraneous
modules will also be disabled. To remove extraneous modules with
package-locks disabled use `npm prune`.
This configuration does not affect `npm ci`.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
+18 -4
View File
@@ -6,13 +6,22 @@ description: Symlink a package folder
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/link.js -->
```bash
npm link (in package dir)
npm link [<@scope>/]<pkg>[@<version>]
alias: npm ln
alias: ln
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/link.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This is handy for installing your own stuff, so that you can work on it and
@@ -116,13 +125,16 @@ workspace(s).
<!-- see lib/utils/config/definitions.js -->
#### `save`
* Default: true
* Default: `true` unless when using `npm update` or `npm dedupe` where it
defaults to `false`
* Type: Boolean
Save installed packages to a package.json file as dependencies.
Save installed packages to a `package.json` file as dependencies.
When used with the `npm rm` command, removes the dependency from
package.json.
`package.json`.
Will also prevent writing to `package-lock.json` if set to `false`.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
@@ -217,6 +229,8 @@ When package package-locks are disabled, automatic pruning of extraneous
modules will also be disabled. To remove extraneous modules with
package-locks disabled use `npm prune`.
This configuration does not affect `npm ci`.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
+10 -1
View File
@@ -6,10 +6,19 @@ description: Log out of the registry
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/logout.js -->
```bash
npm logout [--registry=<url>] [--scope=<@scope>]
npm logout
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/logout.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+10 -1
View File
@@ -6,12 +6,21 @@ description: List installed packages
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/ls.js -->
```bash
npm ls [[<@scope>/]<pkg> ...]
aliases: list, la, ll
alias: list
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/ls.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This command will print to stdout all the versions of packages that are
+14 -3
View File
@@ -6,12 +6,23 @@ description: Manage orgs
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/org.js -->
```bash
npm org set <orgname> <username> [developer | admin | owner]
npm org rm <orgname> <username>
npm org ls <orgname> [<username>]
npm org set orgname username [developer | admin | owner]
npm org rm orgname username
npm org ls orgname [<username>]
alias: ogr
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/org.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Example
+9
View File
@@ -6,10 +6,19 @@ description: Check for outdated packages
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/outdated.js -->
```bash
npm outdated [[<@scope>/]<pkg> ...]
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/outdated.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This command will check the registry to see if any (or, specific) installed
+10 -1
View File
@@ -6,14 +6,23 @@ description: Manage package owners
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/owner.js -->
```bash
npm owner add <user> [<@scope>/]<pkg>
npm owner rm <user> [<@scope>/]<pkg>
npm owner ls [<@scope>/]<pkg>
aliases: author
alias: author
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/owner.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+10 -1
View File
@@ -6,10 +6,19 @@ description: Create a tarball from a package
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/pack.js -->
```bash
npm pack [[<@scope>/]<pkg>...] [--dry-run] [--json]
npm pack [[<@scope>/]<pkg>...]
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/pack.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Configuration
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
+10 -1
View File
@@ -6,10 +6,19 @@ description: Ping npm registry
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/ping.js -->
```bash
npm ping [--registry <registry>]
npm ping
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/ping.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+12 -3
View File
@@ -6,12 +6,21 @@ description: Manages your package.json
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/pkg.js -->
```bash
npm pkg get [<field> [.<subfield> ...]]
npm pkg set <field>=<value> [.<subfield>=<value> ...]
npm pkg delete <field> [.<subfield> ...]
npm pkg set <key>=<value> [<key>=<value> ...]
npm pkg get [<key> [<key> ...]]
npm pkg delete <key> [<key> ...]
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/pkg.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
A command that automates the management of `package.json` files.
+9
View File
@@ -6,10 +6,19 @@ description: Display prefix
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/prefix.js -->
```bash
npm prefix [-g]
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/prefix.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+12 -4
View File
@@ -6,14 +6,22 @@ description: Change settings on your registry profile
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/profile.js -->
```bash
npm profile get [--json|--parseable] [<property>]
npm profile set [--json|--parseable] <property> <value>
npm profile set password
npm profile enable-2fa [auth-and-writes|auth-only]
npm profile enable-2fa [auth-only|auth-and-writes]
npm profile disable-2fa
npm profile get [<key>]
npm profile set <key> <value>
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/profile.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+10 -1
View File
@@ -6,10 +6,19 @@ description: Remove extraneous packages
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/prune.js -->
```bash
npm prune [[<@scope>/]<pkg>...] [--production] [--dry-run] [--json]
npm prune [[<@scope>/]<pkg>...]
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/prune.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This command removes "extraneous" packages. If a package name is provided,
+10 -4
View File
@@ -6,13 +6,19 @@ description: Publish a package
### Synopsis
```bash
npm publish [<tarball>|<folder>] [--tag <tag>] [--access <public|restricted>] [--otp otpcode] [--dry-run]
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/publish.js -->
Publishes '.' if no argument supplied
Sets tag 'latest' if no --tag specified
```bash
npm publish [<folder>]
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/publish.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
Publishes a package to the registry so that it can be installed by name.
+9
View File
@@ -6,12 +6,21 @@ description: Rebuild a package
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/rebuild.js -->
```bash
npm rebuild [[<@scope>/]<name>[@<version>] ...]
alias: rb
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/rebuild.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This command runs the `npm build` command on the matched folders. This is
+9
View File
@@ -6,10 +6,19 @@ description: Open package repository page in the browser
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/repo.js -->
```bash
npm repo [<pkgname> [<pkgname> ...]]
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/repo.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This command tries to guess at the likely location of a package's
+9
View File
@@ -6,10 +6,19 @@ description: Restart a package
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/restart.js -->
```bash
npm restart [-- <args>]
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/restart.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This restarts a project. It is equivalent to running `npm run-script
+10 -1
View File
@@ -6,10 +6,19 @@ description: Display npm root
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/root.js -->
```bash
npm root [-g]
npm root
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/root.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
Print the effective `node_modules` folder to standard out.
+10 -3
View File
@@ -6,14 +6,21 @@ description: Run arbitrary package scripts
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/run-script.js -->
```bash
npm run-script <command> [--if-present] [--silent] [-- <args>]
npm run-script <command> [--workspace=<workspace-name>]
npm run-script <command> [--workspaces]
npm run-script <command> [-- <args>]
aliases: run, rum, urn
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/run-script.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This runs an arbitrary command from a package's `"scripts"` object. If no
+10 -1
View File
@@ -6,12 +6,21 @@ description: Search for packages
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/search.js -->
```bash
npm search [-l|--long] [--json] [--parseable] [--no-description] [search terms ...]
npm search [search terms ...]
aliases: s, se, find
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/search.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+9
View File
@@ -7,10 +7,19 @@ description: Set tasks in the scripts section of package.json
### Synopsis
An npm command that lets you create a task in the `scripts` section of the `package.json`.
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/set-script.js -->
```bash
npm set-script [<script>] [<command>]
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/set-script.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
**Example:**
+9
View File
@@ -6,10 +6,19 @@ description: Lock down dependency versions for publication
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/shrinkwrap.js -->
```bash
npm shrinkwrap
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/shrinkwrap.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+9
View File
@@ -6,10 +6,19 @@ description: Mark your favorite packages
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/star.js -->
```bash
npm star [<pkg>...]
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/star.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+10
View File
@@ -5,10 +5,20 @@ description: View packages marked as favorites
---
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/stars.js -->
```bash
npm stars [<user>]
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/stars.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+9
View File
@@ -6,10 +6,19 @@ description: Start a package
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/start.js -->
```bash
npm start [-- <args>]
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/start.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This runs a predefined command specified in the `"start"` property of
+9
View File
@@ -6,10 +6,19 @@ description: Stop a package
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/stop.js -->
```bash
npm stop [-- <args>]
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/stop.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This runs a predefined command specified in the "stop" property of a
+13 -6
View File
@@ -6,16 +6,23 @@ description: Manage organization teams and team memberships
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/team.js -->
```bash
npm team create <scope:team>
npm team destroy <scope:team>
npm team add <scope:team> <user>
npm team rm <scope:team> <user>
npm team create <scope:team> [--otp <otpcode>]
npm team destroy <scope:team> [--otp <otpcode>]
npm team add <scope:team> <user> [--otp <otpcode>]
npm team rm <scope:team> <user> [--otp <otpcode>]
npm team ls <scope>|<scope:team>
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/team.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+10 -1
View File
@@ -6,12 +6,21 @@ description: Test a package
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/test.js -->
```bash
npm test [-- <args>]
aliases: t, tst
aliases: tst, t
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/test.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This runs a predefined command specified in the `"test"` property of
+13 -3
View File
@@ -5,12 +5,22 @@ description: Manage your authentication tokens
---
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/token.js -->
```bash
npm token list [--json|--parseable]
npm token create [--read-only] [--cidr=1.1.1.1/24,2.2.2.2/16]
npm token revoke <id|token>
npm token list
npm token revoke <id|token>
npm token create [--read-only] [--cidr=list]
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/token.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+18 -6
View File
@@ -6,12 +6,21 @@ description: Remove a package
### Synopsis
```bash
npm uninstall [<@scope>/]<pkg>[@<version>]... [-S|--save|--no-save]
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/uninstall.js -->
aliases: remove, rm, r, un, unlink
```bash
npm uninstall [<@scope>/]<pkg>...
aliases: un, unlink, remove, rm, r
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/uninstall.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This uninstalls a package, completely removing everything npm installed
@@ -61,13 +70,16 @@ npm uninstall lodash --no-save
<!-- see lib/utils/config/definitions.js -->
#### `save`
* Default: true
* Default: `true` unless when using `npm update` or `npm dedupe` where it
defaults to `false`
* Type: Boolean
Save installed packages to a package.json file as dependencies.
Save installed packages to a `package.json` file as dependencies.
When used with the `npm rm` command, removes the dependency from
package.json.
`package.json`.
Will also prevent writing to `package-lock.json` if set to `false`.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
+9
View File
@@ -6,10 +6,19 @@ description: Remove an item from your favorite packages
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/unstar.js -->
```bash
npm unstar [<pkg>...]
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/unstar.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+30 -3
View File
@@ -6,12 +6,21 @@ description: Update packages
### Synopsis
```bash
npm update [-g] [<pkg>...]
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/update.js -->
aliases: up, upgrade
```bash
npm update [<pkg>...]
aliases: up, upgrade, udpate
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/update.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This command will update all the packages listed to the latest version
@@ -239,6 +248,24 @@ When package package-locks are disabled, automatic pruning of extraneous
modules will also be disabled. To remove extraneous modules with
package-locks disabled use `npm prune`.
This configuration does not affect `npm ci`.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
#### `save`
* Default: `true` unless when using `npm update` or `npm dedupe` where it
defaults to `false`
* Type: Boolean
Save installed packages to a `package.json` file as dependencies.
When used with the `npm rm` command, removes the dependency from
`package.json`.
Will also prevent writing to `package-lock.json` if set to `false`.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
+12 -5
View File
@@ -6,14 +6,21 @@ description: Bump a package version
### Synopsis
```bash
npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease [--preid=<prerelease-id>] | from-git]
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/version.js -->
'npm [-v | --version]' to print npm version
'npm view <pkg> version' to view a package's published version
'npm ls' to inspect current package/dependency versions
```bash
npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git]
alias: verison
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/version.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Configuration
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
+12 -3
View File
@@ -6,12 +6,21 @@ description: View registry info
### Synopsis
```bash
npm view [<@scope>/]<name>[@<version>] [<field>[.<subfield>]...]
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/view.js -->
aliases: info, show, v
```bash
npm view [<@scope>/]<pkg>[@<version>] [<field>[.subfield]...]
aliases: v, info, show
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/view.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This command shows data about a package and prints it to stdout.
+10 -1
View File
@@ -6,10 +6,19 @@ description: Display npm username
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/whoami.js -->
```bash
npm whoami [--registry <registry>]
npm whoami
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/whoami.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
+2 -3
View File
@@ -6,9 +6,8 @@ description: javascript package manager
### Synopsis
```bash
npm <command> [args]
```
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Version
+12 -14
View File
@@ -6,24 +6,22 @@ description: Run a command from a local or remote npm package
### Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/exec.js -->
```bash
npm exec -- <pkg>[@<version>] [args...]
npm exec --package=<pkg>[@<version>] -- <cmd> [args...]
npm exec -c '<cmd> [args...]'
npm exec --package=foo -c '<cmd> [args...]'
npx <pkg>[@<specifier>] [args...]
npx -p <pkg>[@<specifier>] <cmd> [args...]
npx -- <pkg>[@<version>] [args...]
npx --package=<pkg>[@<version>] -- <cmd> [args...]
npx -c '<cmd> [args...]'
npx -p <pkg>[@<specifier>] -c '<cmd> [args...]'
alias: npm x, npx
--package=<pkg> (may be specified multiple times)
-p is a shorthand for --package only when using npx executable
-c <cmd> --call=<cmd> (may not be mixed with positional arguments)
npx --package=foo -c '<cmd> [args...]'
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/exec.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This command allows you to run an arbitrary command from an npm package
+5
View File
@@ -344,6 +344,11 @@ file.
preinstall or install script. If you are doing this, please consider if
there is another option. The only valid use of `install` or `preinstall`
scripts is for compilation which must be done on the target architecture.
* Scripts are run from the root of the package folder, regardless of what the
current working directory is when `npm` is invoked. If you want your
script to use different behavior based on what subdirectory you're in, you
can use the `INIT_CWD` environment variable, which holds the full path you
were in when you ran `npm run`.
### See Also
+6 -3
View File
@@ -146,19 +146,22 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm access public [&lt;package&gt;]
npm access restricted [&lt;package&gt;]
npm access grant &lt;read-only|read-write&gt; &lt;scope:team&gt; [&lt;package&gt;]
npm access revoke &lt;scope:team&gt; [&lt;package&gt;]
npm access 2fa-required [&lt;package&gt;]
npm access 2fa-not-required [&lt;package&gt;]
npm access ls-packages [&lt;user&gt;|&lt;scope&gt;|&lt;scope:team&gt;]
npm access ls-collaborators [&lt;package&gt; [&lt;user&gt;]]
npm access edit [&lt;package&gt;]
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="description">Description</h3>
<p>Used to set access controls on private packages.</p>
<p>For all of the subcommands, <code>npm access</code> will perform actions on the packages
+7 -1
View File
@@ -146,10 +146,16 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<pre lang="bash"><code>npm adduser [--registry=url] [--scope=@orgname] [--auth-type=legacy]
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm adduser
aliases: login, add-user
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<p>Note: This command is unaware of workspaces.</p>
<h3 id="description">Description</h3>
<p>Create or verify a user named <code>&lt;username&gt;</code> in the specified registry, and
+7 -4
View File
@@ -146,11 +146,14 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<pre lang="bash"><code>npm audit [--json] [--production] [--audit-level=(low|moderate|high|critical)]
npm audit fix [--force|--package-lock-only|--dry-run|--production|--only=(dev|prod)]
common options: [--production] [--only=(dev|prod)]
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm audit [fix]
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="description">Description</h3>
<p>The audit command submits a description of the dependencies configured in
your project to your default registry and asks for a report of known
+7 -1
View File
@@ -146,8 +146,14 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<pre lang="bash"><code>npm bin [-g|--global]
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm bin
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<p>Note: This command is unaware of workspaces.</p>
<h3 id="description">Description</h3>
<p>Print the folder where npm will install executables.</p>
+8 -2
View File
@@ -146,10 +146,16 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<pre lang="bash"><code>npm bugs [&lt;pkgname&gt; [&lt;pkgname&gt; ...]]
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm bugs [&lt;pkgname&gt;]
aliases: issues
alias: issues
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="description">Description</h3>
<p>This command tries to guess at the likely location of a package's bug
tracker URL or the <code>mailto</code> URL of the support email, and then tries to
+13 -8
View File
@@ -146,16 +146,21 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<pre lang="bash"><code>npm cache add &lt;tarball file&gt;...
npm cache add &lt;folder&gt;...
npm cache add &lt;tarball url&gt;...
npm cache add &lt;name&gt;@&lt;version&gt;...
npm cache clean
aliases: npm cache clear, npm cache rm
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm cache add &lt;tarball file&gt;
npm cache add &lt;folder&gt;
npm cache add &lt;tarball url&gt;
npm cache add &lt;git url&gt;
npm cache add &lt;name&gt;@&lt;version&gt;
npm cache clean [&lt;key&gt;]
npm cache ls [&lt;name&gt;@&lt;version&gt;]
npm cache verify
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<p>Note: This command is unaware of workspaces.</p>
<h3 id="description">Description</h3>
<p>Used to add, list, or clean the npm cache folder.</p>
+8
View File
@@ -146,8 +146,16 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm ci
aliases: clean-install, ic, install-clean, isntall-clean
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="description">Description</h3>
<p>This command is similar to <a href="../commands/npm-install.html"><code>npm install</code></a>, except
it's meant to be used in automated environments such as test platforms,
+7 -1
View File
@@ -146,8 +146,14 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<pre lang="bash"><code>source &lt;(npm completion)
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm completion
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<p>Note: This command is unaware of workspaces.</p>
<h3 id="description">Description</h3>
<p>Enables tab-completion in all npm commands.</p>
+6 -2
View File
@@ -146,16 +146,20 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm config set &lt;key&gt;=&lt;value&gt; [&lt;key&gt;=&lt;value&gt; ...]
npm config get [&lt;key&gt; [&lt;key&gt; ...]]
npm config delete &lt;key&gt; [&lt;key&gt; ...]
npm config list [--json]
npm config edit
npm set &lt;key&gt;=&lt;value&gt; [&lt;key&gt;=&lt;value&gt; ...]
npm get [&lt;key&gt; [&lt;key&gt; ...]]
alias: c
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<p>Note: This command is unaware of workspaces.</p>
<h3 id="description">Description</h3>
<p>npm gets its config settings from the command line, environment
+21 -3
View File
@@ -142,15 +142,20 @@ npm command-line interface
<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="#global-style"><code>global-style</code></a></li><li><a href="#legacy-bundling"><code>legacy-bundling</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="#ignore-scripts"><code>ignore-scripts</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></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="#global-style"><code>global-style</code></a></li><li><a href="#legacy-bundling"><code>legacy-bundling</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="#save"><code>save</code></a></li><li><a href="#omit"><code>omit</code></a></li><li><a href="#ignore-scripts"><code>ignore-scripts</code></a></li><li><a href="#audit"><code>audit</code></a></li><li><a href="#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></ul><li><a href="#see-also">See Also</a></li></ul></div>
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm dedupe
npm ddp
aliases: ddp
alias: ddp
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="description">Description</h3>
<p>Searches the local package tree and attempts to simplify the overall
structure by moving dependencies further up the tree, where they can
@@ -253,6 +258,19 @@ will also prevent <em>writing</em> <code>package-lock.json</code> if <code>save<
<p>When package package-locks are disabled, automatic pruning of extraneous
modules will also be disabled. To remove extraneous modules with
package-locks disabled use <code>npm prune</code>.</p>
<p>This configuration does not affect <code>npm ci</code>.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h4 id="save"><code>save</code></h4>
<ul>
<li>Default: <code>true</code> unless when using <code>npm update</code> or <code>npm dedupe</code> where it
defaults to <code>false</code></li>
<li>Type: Boolean</li>
</ul>
<p>Save installed packages to a <code>package.json</code> file as dependencies.</p>
<p>When used with the <code>npm rm</code> command, removes the dependency from
<code>package.json</code>.</p>
<p>Will also prevent writing to <code>package-lock.json</code> if set to <code>false</code>.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h4 id="omit"><code>omit</code></h4>
+7 -1
View File
@@ -146,8 +146,14 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<pre lang="bash"><code>npm deprecate &lt;pkg&gt;[@&lt;version range&gt;] &lt;message&gt;
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm deprecate &lt;pkg&gt;[@&lt;version&gt;] &lt;message&gt;
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<p>Note: This command is unaware of workspaces.</p>
<h3 id="description">Description</h3>
<p>This command will update the npm registry entry for a package, providing a
+6 -4
View File
@@ -146,12 +146,14 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm diff [...&lt;paths&gt;]
npm diff --diff=&lt;pkg-name&gt; [...&lt;paths&gt;]
npm diff --diff=&lt;version-a&gt; [--diff=&lt;version-b&gt;] [...&lt;paths&gt;]
npm diff --diff=&lt;spec-a&gt; [--diff=&lt;spec-b&gt;] [...&lt;paths&gt;]
npm diff [--diff-ignore-all-space] [--diff-name-only] [...&lt;paths&gt;]
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="description">Description</h3>
<p>Similar to its <code>git diff</code> counterpart, this command will print diff patches
of files for packages published to the npm registry.</p>
+7 -1
View File
@@ -146,12 +146,18 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm dist-tag add &lt;pkg&gt;@&lt;version&gt; [&lt;tag&gt;]
npm dist-tag rm &lt;pkg&gt; &lt;tag&gt;
npm dist-tag ls [&lt;pkg&gt;]
aliases: dist-tags
alias: dist-tags
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="description">Description</h3>
<p>Add, remove, and enumerate distribution tags on a package:</p>
<ul>
+7 -1
View File
@@ -146,10 +146,16 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm docs [&lt;pkgname&gt; [&lt;pkgname&gt; ...]]
aliases: home
alias: home
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="description">Description</h3>
<p>This command tries to guess at the likely location of a package's
documentation URL, and then tries to open it using the <code>--browser</code> config
+6
View File
@@ -146,8 +146,14 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm doctor
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<p>Note: This command is unaware of workspaces.</p>
<h3 id="description">Description</h3>
<p><code>npm doctor</code> runs a set of checks to ensure that your npm installation has
+7 -1
View File
@@ -146,8 +146,14 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<pre lang="bash"><code>npm edit &lt;pkg&gt;
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm edit &lt;pkg&gt;[/&lt;subpkg&gt;...]
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<p>Note: This command is unaware of workspaces.</p>
<h3 id="description">Description</h3>
<p>Selects a dependency in the current project and opens the package folder in
+7 -13
View File
@@ -146,25 +146,19 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm exec -- &lt;pkg&gt;[@&lt;version&gt;] [args...]
npm exec --package=&lt;pkg&gt;[@&lt;version&gt;] -- &lt;cmd&gt; [args...]
npm exec -c '&lt;cmd&gt; [args...]'
npm exec --package=foo -c '&lt;cmd&gt; [args...]'
npm exec [--ws] [-w &lt;workspace-name] [args...]
npx &lt;pkg&gt;[@&lt;specifier&gt;] [args...]
npx -p &lt;pkg&gt;[@&lt;specifier&gt;] &lt;cmd&gt; [args...]
npx -c '&lt;cmd&gt; [args...]'
npx -p &lt;pkg&gt;[@&lt;specifier&gt;] -c '&lt;cmd&gt; [args...]'
Run without --call or positional args to open interactive subshell
alias: npm x, npx
common options:
--package=&lt;pkg&gt; (may be specified multiple times)
-p is a shorthand for --package only when using npx executable
-c &lt;cmd&gt; --call=&lt;cmd&gt; (may not be mixed with positional arguments)
alias: x
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="description">Description</h3>
<p>This command allows you to run an arbitrary command from an npm package
(either one installed locally, or fetched remotely), in a similar context
+6
View File
@@ -146,10 +146,16 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm explain &lt;folder | specifier&gt;
alias: why
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="description">Description</h3>
<p>This command will print the chain of dependencies causing a given package
to be installed in the current project.</p>
+6
View File
@@ -146,8 +146,14 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm explore &lt;pkg&gt; [ -- &lt;command&gt;]
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<p>Note: This command is unaware of workspaces.</p>
<h3 id="description">Description</h3>
<p>Spawn a subshell in the directory of the installed package specified.</p>
+7
View File
@@ -146,8 +146,14 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm find-dupes
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="description">Description</h3>
<p>Runs <code>npm dedupe</code> in <code>--dry-run</code> mode, making npm only output the
duplications, without actually changing the package tree.</p>
@@ -207,6 +213,7 @@ will also prevent <em>writing</em> <code>package-lock.json</code> if <code>save<
<p>When package package-locks are disabled, automatic pruning of extraneous
modules will also be disabled. To remove extraneous modules with
package-locks disabled use <code>npm prune</code>.</p>
<p>This configuration does not affect <code>npm ci</code>.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h4 id="omit"><code>omit</code></h4>
+7 -2
View File
@@ -146,9 +146,14 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<pre lang="bash"><code>npm fund [&lt;pkg&gt;]
npm fund [-w &lt;workspace-name&gt;]
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm fund [[&lt;@scope&gt;/]&lt;pkg&gt;]
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="description">Description</h3>
<p>This command retrieves information on how to fund the dependencies of a
given project. If no package name is provided, it will list all
+6
View File
@@ -146,8 +146,14 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm help-search &lt;text&gt;
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<p>Note: This command is unaware of workspaces.</p>
<h3 id="description">Description</h3>
<p>This command will search the npm markdown documentation files for the terms
+8
View File
@@ -146,8 +146,16 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm help &lt;term&gt; [&lt;terms..&gt;]
alias: hlep
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<p>Note: This command is unaware of workspaces.</p>
<h3 id="description">Description</h3>
<p>If supplied a topic, then show the appropriate documentation page.</p>
+9 -3
View File
@@ -146,11 +146,17 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<pre lang="bash"><code>npm hook ls [pkg]
npm hook add &lt;entity&gt; &lt;url&gt; &lt;secret&gt;
npm hook update &lt;id&gt; &lt;url&gt; [secret]
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm hook add &lt;pkg&gt; &lt;url&gt; &lt;secret&gt; [--type=&lt;type&gt;]
npm hook ls [pkg]
npm hook rm &lt;id&gt;
npm hook update &lt;id&gt; &lt;url&gt; &lt;secret&gt;
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<p>Note: This command is unaware of workspaces.</p>
<h3 id="description">Description</h3>
<p>Allows you to manage <a href="https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm">npm
+20 -4
View File
@@ -146,11 +146,18 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<pre lang="bash"><code>npm init [--yes|-y|--scope]
npm init &lt;@scope&gt; (same as `npm exec &lt;@scope&gt;/create`)
npm init [&lt;@scope&gt;/]&lt;name&gt; (same as `npm exec [&lt;@scope&gt;/]create-&lt;name&gt;`)
npm init [-w &lt;dir&gt;] [args...]
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm init [--force|-f|--yes|-y|--scope]
npm init &lt;@scope&gt; (same as `npx &lt;@scope&gt;/create`)
npm init [&lt;@scope&gt;/]&lt;name&gt; (same as `npx [&lt;@scope&gt;/]create-&lt;name&gt;`)
aliases: create, innit
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="description">Description</h3>
<p><code>npm init &lt;initializer&gt;</code> can be used to set up a new or existing npm
package.</p>
@@ -172,6 +179,15 @@ guesses based on existing fields, dependencies, and options selected. It is
strictly additive, so it will keep any fields and values that were already
set. You can also use <code>-y</code>/<code>--yes</code> to skip the questionnaire altogether. If
you pass <code>--scope</code>, it will create a scoped package.</p>
<p><em>Note:</em> if a user already has the <code>create-&lt;initializer&gt;</code> package
globally installed, that will be what <code>npm init</code> uses. If you want npm
to use the latest version, or another specific version you must specify
it:</p>
<ul>
<li><code>npm init foo@latest</code> # fetches and runs the latest <code>create-foo</code> from
the registry</li>
<li><code>npm init foo@1.2.3</code> # runs <code>create-foo@1.2.3</code> specifically</li>
</ul>
<h4 id="forwarding-additional-options">Forwarding additional options</h4>
<p>Any additional options will be passed directly to the command, so <code>npm init foo -- --hello</code> will map to <code>npm exec -- create-foo --hello</code>.</p>
<p>To better illustrate how options are forwarded, here's a more evolved
+7 -1
View File
@@ -146,10 +146,16 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm install-ci-test
alias: npm cit
alias: cit
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="description">Description</h3>
<p>This command runs <code>npm ci</code> followed immediately by <code>npm test</code>.</p>
<h3 id="configuration">Configuration</h3>
+21 -11
View File
@@ -146,18 +146,25 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<pre lang="bash"><code>npm install-test (with no args, in package dir)
npm install-test [&lt;@scope&gt;/]&lt;name&gt;
npm install-test [&lt;@scope&gt;/]&lt;name&gt;@&lt;tag&gt;
npm install-test [&lt;@scope&gt;/]&lt;name&gt;@&lt;version&gt;
npm install-test [&lt;@scope&gt;/]&lt;name&gt;@&lt;version range&gt;
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm install-test [&lt;@scope&gt;/]&lt;pkg&gt;
npm install-test [&lt;@scope&gt;/]&lt;pkg&gt;@&lt;tag&gt;
npm install-test [&lt;@scope&gt;/]&lt;pkg&gt;@&lt;version&gt;
npm install-test [&lt;@scope&gt;/]&lt;pkg&gt;@&lt;version range&gt;
npm install-test &lt;alias&gt;@npm:&lt;name&gt;
npm install-test &lt;folder&gt;
npm install-test &lt;tarball file&gt;
npm install-test &lt;tarball url&gt;
npm install-test &lt;folder&gt;
npm install-test &lt;git:// url&gt;
npm install-test &lt;github username&gt;/&lt;github project&gt;
alias: npm it
common options: [--save|--save-dev|--save-optional] [--save-exact] [--dry-run]
alias: it
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="description">Description</h3>
<p>This command runs an <code>npm install</code> followed immediately by an <code>npm test</code>. It
takes exactly the same arguments as <code>npm install</code>.</p>
@@ -167,12 +174,14 @@ takes exactly the same arguments as <code>npm install</code>.</p>
<!-- raw HTML omitted -->
<h4 id="save"><code>save</code></h4>
<ul>
<li>Default: true</li>
<li>Default: <code>true</code> unless when using <code>npm update</code> or <code>npm dedupe</code> where it
defaults to <code>false</code></li>
<li>Type: Boolean</li>
</ul>
<p>Save installed packages to a package.json file as dependencies.</p>
<p>Save installed packages to a <code>package.json</code> file as dependencies.</p>
<p>When used with the <code>npm rm</code> command, removes the dependency from
package.json.</p>
<code>package.json</code>.</p>
<p>Will also prevent writing to <code>package-lock.json</code> if set to <code>false</code>.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h4 id="save-exact"><code>save-exact</code></h4>
@@ -252,6 +261,7 @@ will also prevent <em>writing</em> <code>package-lock.json</code> if <code>save<
<p>When package package-locks are disabled, automatic pruning of extraneous
modules will also be disabled. To remove extraneous modules with
package-locks disabled use <code>npm prune</code>.</p>
<p>This configuration does not affect <code>npm ci</code>.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h4 id="omit"><code>omit</code></h4>
+20 -13
View File
@@ -146,21 +146,25 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<pre lang="bash"><code>npm install (with no args, in package dir)
npm install [&lt;@scope&gt;/]&lt;name&gt;
npm install [&lt;@scope&gt;/]&lt;name&gt;@&lt;tag&gt;
npm install [&lt;@scope&gt;/]&lt;name&gt;@&lt;version&gt;
npm install [&lt;@scope&gt;/]&lt;name&gt;@&lt;version range&gt;
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm install [&lt;@scope&gt;/]&lt;pkg&gt;
npm install [&lt;@scope&gt;/]&lt;pkg&gt;@&lt;tag&gt;
npm install [&lt;@scope&gt;/]&lt;pkg&gt;@&lt;version&gt;
npm install [&lt;@scope&gt;/]&lt;pkg&gt;@&lt;version range&gt;
npm install &lt;alias&gt;@npm:&lt;name&gt;
npm install &lt;git-host&gt;:&lt;git-user&gt;/&lt;repo-name&gt;
npm install &lt;git repo url&gt;
npm install &lt;folder&gt;
npm install &lt;tarball file&gt;
npm install &lt;tarball url&gt;
npm install &lt;folder&gt;
npm install &lt;git:// url&gt;
npm install &lt;github username&gt;/&lt;github project&gt;
aliases: npm i, npm add
common options: [-P|--save-prod|-D|--save-dev|-O|--save-optional|--save-peer] [-E|--save-exact] [-B|--save-bundle] [--no-save] [--dry-run]
aliases: i, in, ins, inst, insta, instal, isnt, isnta, isntal, add
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="description">Description</h3>
<p>This command installs a package and any packages that it depends on. If the
package has a package-lock, or an npm shrinkwrap file, or a yarn lock file,
@@ -496,12 +500,14 @@ does.</p>
<!-- raw HTML omitted -->
<h4 id="save"><code>save</code></h4>
<ul>
<li>Default: true</li>
<li>Default: <code>true</code> unless when using <code>npm update</code> or <code>npm dedupe</code> where it
defaults to <code>false</code></li>
<li>Type: Boolean</li>
</ul>
<p>Save installed packages to a package.json file as dependencies.</p>
<p>Save installed packages to a <code>package.json</code> file as dependencies.</p>
<p>When used with the <code>npm rm</code> command, removes the dependency from
package.json.</p>
<code>package.json</code>.</p>
<p>Will also prevent writing to <code>package-lock.json</code> if set to <code>false</code>.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h4 id="save-exact"><code>save-exact</code></h4>
@@ -581,6 +587,7 @@ will also prevent <em>writing</em> <code>package-lock.json</code> if <code>save<
<p>When package package-locks are disabled, automatic pruning of extraneous
modules will also be disabled. To remove extraneous modules with
package-locks disabled use <code>npm prune</code>.</p>
<p>This configuration does not affect <code>npm ci</code>.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h4 id="omit"><code>omit</code></h4>
+13 -4
View File
@@ -146,11 +146,17 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm link (in package dir)
npm link [&lt;@scope&gt;/]&lt;pkg&gt;[@&lt;version&gt;]
alias: npm ln
alias: ln
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="description">Description</h3>
<p>This is handy for installing your own stuff, so that you can work on it and
test iteratively without having to continually rebuild.</p>
@@ -223,12 +229,14 @@ workspace(s).</p>
<!-- raw HTML omitted -->
<h4 id="save"><code>save</code></h4>
<ul>
<li>Default: true</li>
<li>Default: <code>true</code> unless when using <code>npm update</code> or <code>npm dedupe</code> where it
defaults to <code>false</code></li>
<li>Type: Boolean</li>
</ul>
<p>Save installed packages to a package.json file as dependencies.</p>
<p>Save installed packages to a <code>package.json</code> file as dependencies.</p>
<p>When used with the <code>npm rm</code> command, removes the dependency from
package.json.</p>
<code>package.json</code>.</p>
<p>Will also prevent writing to <code>package-lock.json</code> if set to <code>false</code>.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h4 id="save-exact"><code>save-exact</code></h4>
@@ -308,6 +316,7 @@ will also prevent <em>writing</em> <code>package-lock.json</code> if <code>save<
<p>When package package-locks are disabled, automatic pruning of extraneous
modules will also be disabled. To remove extraneous modules with
package-locks disabled use <code>npm prune</code>.</p>
<p>This configuration does not affect <code>npm ci</code>.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h4 id="omit"><code>omit</code></h4>
+7 -1
View File
@@ -146,8 +146,14 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<pre lang="bash"><code>npm logout [--registry=&lt;url&gt;] [--scope=&lt;@scope&gt;]
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm logout
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<p>Note: This command is unaware of workspaces.</p>
<h3 id="description">Description</h3>
<p>When logged into a registry that supports token-based authentication, tell
+8 -2
View File
@@ -146,10 +146,16 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm ls [[&lt;@scope&gt;/]&lt;pkg&gt; ...]
aliases: list, la, ll
alias: list
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="description">Description</h3>
<p>This command will print to stdout all the versions of packages that are
installed, as well as their dependencies when <code>--all</code> is specified, in a
@@ -160,7 +166,7 @@ tree at all, use <a href="../commands/npm-explain.html"><code>npm explain</code>
the results to only the paths to the packages named. Note that nested
packages will <em>also</em> show the paths to the specified packages. For
example, running <code>npm ls promzard</code> in npm's source tree will show:</p>
<pre lang="bash"><code>npm@8.5.1 /path/to/npm
<pre lang="bash"><code>npm@8.5.2 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
</code></pre>
+11 -3
View File
@@ -146,10 +146,18 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<pre lang="bash"><code>npm org set &lt;orgname&gt; &lt;username&gt; [developer | admin | owner]
npm org rm &lt;orgname&gt; &lt;username&gt;
npm org ls &lt;orgname&gt; [&lt;username&gt;]
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm org set orgname username [developer | admin | owner]
npm org rm orgname username
npm org ls orgname [&lt;username&gt;]
alias: ogr
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<p>Note: This command is unaware of workspaces.</p>
<h3 id="example">Example</h3>
<p>Add a new developer to an org:</p>
+6
View File
@@ -146,8 +146,14 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm outdated [[&lt;@scope&gt;/]&lt;pkg&gt; ...]
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="description">Description</h3>
<p>This command will check the registry to see if any (or, specific) installed
packages are currently outdated.</p>
+7 -1
View File
@@ -146,12 +146,18 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm owner add &lt;user&gt; [&lt;@scope&gt;/]&lt;pkg&gt;
npm owner rm &lt;user&gt; [&lt;@scope&gt;/]&lt;pkg&gt;
npm owner ls [&lt;@scope&gt;/]&lt;pkg&gt;
aliases: author
alias: author
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<p>Note: This command is unaware of workspaces.</p>
<h3 id="description">Description</h3>
<p>Manage ownership of published packages.</p>
+7 -1
View File
@@ -146,8 +146,14 @@ npm command-line interface
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<pre lang="bash"><code>npm pack [[&lt;@scope&gt;/]&lt;pkg&gt;...] [--dry-run] [--json]
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm pack [[&lt;@scope&gt;/]&lt;pkg&gt;...]
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="configuration">Configuration</h3>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
Loaded 100 of 421 files, more files were not shown because too many files have changed in this diff. Show more