You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/cli/v11/commands/npm-ls.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ Note: to get a "bottoms up" view of why a given package is included in the tree
52
52
Positional arguments are `name@version-range` identifiers, which will limit the results to only the paths to the packages named. 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:
By default npm will publish to the public registry. This can be overridden by specifying a different default registry or using a [`scope`](/cli/v11/using-npm/scope) in the name, combined with a scope-configured registry (see [`package.json`](/cli/v11/configuring-npm/package-json)).
49
75
50
76
A `package` is interpreted the same way as other commands (like `npm install`) and can be:
@@ -73,12 +73,68 @@ Created publish token a73c9572-f1b9-8983-983d-ba3ac3cc913d
73
73
74
74
### Configuration
75
75
76
-
#### `read-only`
76
+
#### `name`
77
+
78
+
- Default: null
79
+
- Type: null or String
80
+
81
+
When creating a Granular Access Token with `npm token create`, this sets the name/description for the token.
82
+
83
+
#### `token-description`
84
+
85
+
- Default: null
86
+
- Type: null or String
87
+
88
+
Description text for the token when using `npm token create`.
89
+
90
+
#### `expires`
91
+
92
+
- Default: null
93
+
- Type: null or Number
94
+
95
+
When creating a Granular Access Token with `npm token create`, this sets the expiration in days. If not specified, the server will determine the default expiration.
96
+
97
+
#### `packages`
98
+
99
+
- Default:
100
+
- Type: null or String (can be set multiple times)
101
+
102
+
When creating a Granular Access Token with `npm token create`, this limits the token access to specific packages. Provide a comma-separated list of package names.
103
+
104
+
#### `packages-all`
77
105
78
106
- Default: false
79
107
- Type: Boolean
80
108
81
-
This is used to mark a token as unable to publish when configuring limited access tokens with the `npm token create` command.
109
+
When creating a Granular Access Token with `npm token create`, grants the token access to all packages instead of limiting to specific packages.
110
+
111
+
#### `scopes`
112
+
113
+
- Default: null
114
+
- Type: null or String (can be set multiple times)
115
+
116
+
When creating a Granular Access Token with `npm token create`, this limits the token access to specific scopes. Provide a comma-separated list of scope names (with or without @ prefix).
117
+
118
+
#### `orgs`
119
+
120
+
- Default: null
121
+
- Type: null or String (can be set multiple times)
122
+
123
+
When creating a Granular Access Token with `npm token create`, this limits the token access to specific organizations. Provide a comma-separated list of organization names.
124
+
125
+
#### `packages-and-scopes-permission`
126
+
127
+
- Default: null
128
+
- Type: null, "read-only", "read-write", or "no-access"
129
+
130
+
When creating a Granular Access Token with `npm token create`, sets the permission level for packages and scopes. Options are "read-only", "read-write", or "no-access".
131
+
132
+
#### `orgs-permission`
133
+
134
+
- Default: null
135
+
- Type: null, "read-only", "read-write", or "no-access"
136
+
137
+
When creating a Granular Access Token with `npm token create`, sets the permission level for organizations. Options are "read-only", "read-write", or "no-access".
82
138
83
139
#### `cidr`
84
140
@@ -87,6 +143,20 @@ This is used to mark a token as unable to publish when configuring limited acces
87
143
88
144
This is a list of CIDR address to be used when configuring limited access tokens with the `npm token create` command.
89
145
146
+
#### `bypass-2fa`
147
+
148
+
- Default: false
149
+
- Type: Boolean
150
+
151
+
When creating a Granular Access Token with `npm token create`, setting this to true will allow the token to bypass two-factor authentication. This is useful for automation and CI/CD workflows.
152
+
153
+
#### `password`
154
+
155
+
- Default: null
156
+
- Type: null or String
157
+
158
+
Password for authentication. Can be provided via command line when creating tokens, though it's generally safer to be prompted for it.
159
+
90
160
#### `registry`
91
161
92
162
- Default: "https://registry.npmjs.org/"
@@ -103,6 +173,13 @@ This is a one-time password from a two-factor authenticator. It's needed when pu
103
173
104
174
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.
105
175
176
+
#### `read-only`
177
+
178
+
- Default: false
179
+
- Type: Boolean
180
+
181
+
This is used to mark a token as unable to publish when configuring limited access tokens with the `npm token create` command.
Copy file name to clipboardExpand all lines: content/cli/v11/commands/npm-version.mdx
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,6 +93,17 @@ If set to true, then the `npm version` command will tag the version using `-s` t
93
93
94
94
Note that git requires you to have set up GPG keys in your git configs for this to work properly.
95
95
96
+
#### `save`
97
+
98
+
- Default: `true` unless when using `npm update` where it defaults to `false`
99
+
- Type: Boolean
100
+
101
+
Save installed packages to a `package.json` file as dependencies.
102
+
103
+
When used with the `npm rm` command, removes the dependency from `package.json`.
104
+
105
+
Will also prevent writing to `package-lock.json` if set to `false`.
106
+
96
107
#### `workspace`
97
108
98
109
- Default:
@@ -141,6 +152,15 @@ When false, specifying individual workspaces via the `workspace` config, or all
141
152
142
153
This value is not exported to the environment for child processes.
143
154
155
+
#### `ignore-scripts`
156
+
157
+
- Default: false
158
+
- Type: Boolean
159
+
160
+
If true, npm does not run scripts specified in package.json files.
161
+
162
+
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
163
+
144
164
### Description
145
165
146
166
Run this in a package directory to bump the version and write the new data back to `package.json`, `package-lock.json`, and, if present, `npm-shrinkwrap.json`.
Copy file name to clipboardExpand all lines: content/cli/v11/commands/npm.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ Note: This command is unaware of workspaces.
31
31
32
32
### Version
33
33
34
-
11.6.2
34
+
11.6.4
35
35
36
36
### Description
37
37
@@ -70,7 +70,7 @@ See [`folders`](/cli/v11/configuring-npm/folders) to learn about where npm puts
70
70
In particular, npm has two modes of operation:
71
71
72
72
- local mode: npm installs packages into the current project directory, which defaults to the current working directory. Packages install to `./node_modules`, and bins to `./node_modules/.bin`.
73
-
- global mode: npm installs packages into the install prefix at `$npm_config_prefix/lib/node_modules` and bins to `$npm_config_prefix/bin`.
73
+
- global mode: npm installs packages into the install prefix at `$NPM_CONFIG_PREFIX/lib/node_modules` and bins to `$NPM_CONFIG_PREFIX/bin`.
74
74
75
75
Local mode is the default. Use `-g` or `--global` on any command to run in global mode instead.
76
76
@@ -89,7 +89,7 @@ If you're using npm to develop and publish your code, check out the following he
89
89
npm is extremely configurable. It reads its configuration options from 5 places.
90
90
91
91
- Command line switches: Set a config with `--key val`. All keys take a value, even if they are booleans (the config parser doesn't know what the options are at the time of parsing). If you do not provide a value (`--key`) then the option is set to boolean `true`.
92
-
- Environment Variables: Set any config by prefixing the name in an environment variable with `npm_config_`. For example, `export npm_config_key=val`.
92
+
- Environment Variables: Set any config by prefixing the name in an environment variable with `NPM_CONFIG_`. For example, `export NPM_CONFIG_KEY=val`.
93
93
- User Configs: The file at `$HOME/.npmrc` is an ini-formatted list of configs. If present, it is parsed. If the `userconfig` option is set in the cli or env, that file will be used instead.
94
94
- Global Configs: The file found at `./etc/npmrc` (relative to the global prefix will be parsed if it is found. See [`npm prefix`](/cli/v11/commands/npm-prefix) for more info on the global prefix. If the `globalconfig` option is set in the cli, env, or user config, then that file is parsed instead.
95
95
- Defaults: npm's default configuration options are defined in `lib/utils/config/definitions.js`. These must not be changed.
Copy file name to clipboardExpand all lines: content/cli/v11/configuring-npm/package-lock-json.mdx
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -122,6 +122,12 @@ Package descriptors have the following fields:
122
122
123
123
- bin, license, engines, dependencies, optionalDependencies: fields from `package.json`
124
124
125
+
- os: An array of operating systems this package is compatible with, as specified in `package.json`. This field is included when the package specifies OS restrictions.
126
+
127
+
- cpu: An array of CPU architectures this package is compatible with, as specified in `package.json`. This field is included when the package specifies CPU restrictions.
128
+
129
+
- funding: Funding information for the package, as specified in `package.json`. This field contains details about how to support the package maintainers.
130
+
125
131
#### dependencies
126
132
127
133
Legacy data for supporting versions of npm that use `lockfileVersion: 1`. This is a mapping of package names to dependency objects. Because the object structure is strictly hierarchical, symbolic link dependencies are somewhat challenging to represent in some cases.
0 commit comments