CLI documentation update from CI
npm CLI robot committed
Jun 7, 2023 at 15:41 UTC
6dc4c18a85b1873669d25eaaa21aecab94e178d2
64 files changed
+920
-26
content/cli/v9/commands/npm-access.md
+6
@@ -121,6 +121,8 @@ Whether or not to output JSON data, rather than the normal output.
121
122
Not supported by all npm commands.
123
124
+
125
+
126
#### `otp`
127
128
* Default: null
@@ -132,6 +134,8 @@ when publishing or changing package permissions with `npm access`.
134
If not set, and a registry response fails with a challenge for a one-time
135
password, npm will prompt on the command line for one.
136
137
+
138
+
139
#### `registry`
140
141
* Default: "https://registry.npmjs.org/"
@@ -139,6 +143,8 @@ password, npm will prompt on the command line for one.
143
144
The base URL of the npm registry.
145
146
+
147
+
148
### See Also
149
150
* [`libnpmaccess`](https://npm.im/libnpmaccess)
content/cli/v9/commands/npm-adduser.md
+5
@@ -63,6 +63,8 @@ email are read in from prompts.
63
64
The base URL of the npm registry.
65
66
+
67
+
68
#### `scope`
69
70
* Default: the scope of the current project, if any, or ""
@@ -93,6 +95,7 @@ npm init --scope=@foo --yes
95
```
96
97
98
+
99
#### `auth-type`
100
101
* Default: "web"
@@ -101,6 +104,8 @@ npm init --scope=@foo --yes
104
What authentication strategy to use with `login`. Note that if an `otp`
105
config is given, this value will always be set to `legacy`.
106
107
+
108
+
109
### See Also
110
111
* [npm registry](/cli/v9/using-npm/registry)
content/cli/v9/commands/npm-audit.md
+18
@@ -277,6 +277,8 @@ $ npm audit --audit-level=moderate
277
The minimum level of vulnerability for `npm audit` to exit with a non-zero
278
exit code.
279
280
+
281
+
282
#### `dry-run`
283
284
* Default: false
@@ -290,6 +292,8 @@ commands that modify your local installation, eg, `install`, `update`,
292
Note: This is NOT honored by other network related commands, eg `dist-tags`,
293
`owner`, etc.
294
295
+
296
+
297
#### `force`
298
299
* Default: false
@@ -316,6 +320,8 @@ mistakes, unnecessary performance degradation, and malicious input.
320
If you don't have a clear idea of what you want to do, it is strongly
321
recommended that you do not use this option!
322
323
+
324
+
325
#### `json`
326
327
* Default: false
@@ -328,6 +334,8 @@ Whether or not to output JSON data, rather than the normal output.
334
335
Not supported by all npm commands.
336
337
+
338
+
339
#### `package-lock-only`
340
341
* Default: false
@@ -342,6 +350,8 @@ instead of checking `node_modules` and downloading dependencies.
350
For `list` this means the output will be based on the tree described by the
351
`package-lock.json`, rather than the contents of `node_modules`.
352
353
+
354
+
355
#### `omit`
356
357
* Default: 'dev' if the `NODE_ENV` environment variable is set to
@@ -360,6 +370,8 @@ it will be included.
370
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment
371
variable will be set to `'production'` for all lifecycle scripts.
372
373
+
374
+
375
#### `foreground-scripts`
376
377
* Default: false
@@ -372,6 +384,8 @@ input, output, and error with the main npm process.
384
Note that this will generally make installs run slower, and be much noisier,
385
but can be useful for debugging.
386
387
+
388
+
389
#### `ignore-scripts`
390
391
* Default: false
@@ -384,6 +398,8 @@ Note that commands explicitly intended to run a particular script, such as
398
will still run their intended script if `ignore-scripts` is set, but they
399
will *not* run any pre- or post-scripts.
400
401
+
402
+
403
#### `workspace`
404
405
* Default:
@@ -446,6 +462,8 @@ When set file: protocol dependencies will be packed and installed as regular
462
dependencies instead of creating a symlink. This option has no effect on
463
workspaces.
464
465
+
466
+
467
### See Also
468
469
* [npm install](/cli/v9/commands/npm-install)
content/cli/v9/commands/npm-bugs.md
+4
@@ -65,6 +65,8 @@ terminal.
65
66
Set to `true` to use default system URL opener.
67
68
+
69
+
70
#### `registry`
71
72
* Default: "https://registry.npmjs.org/"
@@ -72,6 +74,8 @@ Set to `true` to use default system URL opener.
74
75
The base URL of the npm registry.
76
77
+
78
+
79
#### `workspace`
80
81
* Default:
content/cli/v9/commands/npm-cache.md
+2
@@ -108,6 +108,8 @@ verify`.
108
109
The location of npm's cache directory.
110
111
+
112
+
113
### See Also
114
115
* [package spec](/cli/v9/using-npm/package-spec)
content/cli/v9/commands/npm-ci.md
+22
-8
@@ -115,6 +115,8 @@ place, no hoisting. shallow (formerly --global-style) only install direct
115
deps at top-level. linked: (experimental) install in node_modules/.store,
116
link in place, unhoisted.
117
118
+
119
+
120
#### `legacy-bundling`
121
122
* Default: false
@@ -127,6 +129,8 @@ the same manner that they are depended on. This may cause very deep
129
directory structures and duplicate package installs as there is no
130
de-duplicating. Sets `--install-strategy=nested`.
131
132
+
133
+
134
#### `global-style`
135
136
* Default: false
@@ -137,6 +141,8 @@ de-duplicating. Sets `--install-strategy=nested`.
141
Only install direct dependencies in the top level `node_modules`, but hoist
142
on deeper dependencies. Sets `--install-strategy=shallow`.
143
144
+
145
+
146
#### `omit`
147
148
* Default: 'dev' if the `NODE_ENV` environment variable is set to
@@ -155,6 +161,8 @@ it will be included.
161
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment
162
variable will be set to `'production'` for all lifecycle scripts.
163
164
+
165
+
166
#### `strict-peer-deps`
167
168
* Default: false
@@ -174,15 +182,7 @@ When such an override is performed, a warning is printed, explaining the
182
conflict and the packages involved. If `--strict-peer-deps` is set, then
183
this warning is treated as a failure.
184
177
-#### `package-lock`
178
-
179
-* Default: true
180
-* Type: Boolean
181
-
182
-If set to false, then ignore `package-lock.json` files when installing. This
183
-will also prevent _writing_ `package-lock.json` if `save` is true.
185
185
-This configuration does not affect `npm ci`.
186
187
#### `foreground-scripts`
188
@@ -196,6 +196,8 @@ input, output, and error with the main npm process.
196
Note that this will generally make installs run slower, and be much noisier,
197
but can be useful for debugging.
198
199
+
200
+
201
#### `ignore-scripts`
202
203
* Default: false
@@ -208,6 +210,8 @@ Note that commands explicitly intended to run a particular script, such as
210
will still run their intended script if `ignore-scripts` is set, but they
211
will *not* run any pre- or post-scripts.
212
213
+
214
+
215
#### `audit`
216
217
* Default: true
@@ -218,6 +222,8 @@ default registry and all registries configured for scopes. See the
222
documentation for [`npm audit`](/cli/v9/commands/npm-audit) for details on what is
223
submitted.
224
225
+
226
+
227
#### `bin-links`
228
229
* Default: true
@@ -230,6 +236,8 @@ Set to false to have it not do this. This can be used to work around the
236
fact that some file systems don't support symlinks, even on ostensibly Unix
237
systems.
238
239
+
240
+
241
#### `fund`
242
243
* Default: true
@@ -239,6 +247,8 @@ When "true" displays the message at the end of each `npm install`
247
acknowledging the number of dependencies looking for funding. See [`npm
248
fund`](/cli/v9/commands/npm-fund) for details.
249
250
+
251
+
252
#### `dry-run`
253
254
* Default: false
@@ -252,6 +262,8 @@ commands that modify your local installation, eg, `install`, `update`,
262
Note: This is NOT honored by other network related commands, eg `dist-tags`,
263
`owner`, etc.
264
265
+
266
+
267
#### `workspace`
268
269
* Default:
@@ -314,6 +326,8 @@ When set file: protocol dependencies will be packed and installed as regular
326
dependencies instead of creating a symlink. This option has no effect on
327
workspaces.
328
329
+
330
+
331
### See Also
332
333
* [npm install](/cli/v9/commands/npm-install)
content/cli/v9/commands/npm-config.md
+10
@@ -147,6 +147,8 @@ Whether or not to output JSON data, rather than the normal output.
147
148
Not supported by all npm commands.
149
150
+
151
+
152
#### `global`
153
154
* Default: false
@@ -161,6 +163,8 @@ folder instead of the current working directory. See
163
* bin files are linked to `{prefix}/bin`
164
* man pages are linked to `{prefix}/share/man`
165
166
+
167
+
168
#### `editor`
169
170
* Default: The EDITOR or VISUAL environment variables, or
@@ -169,6 +173,8 @@ folder instead of the current working directory. See
173
174
The command to run for `npm edit` and `npm config edit`.
175
176
+
177
+
178
#### `location`
179
180
* Default: "user" unless `--global` is passed, which will also set this value
@@ -186,6 +192,8 @@ instead of the current working directory. See
192
* bin files are linked to `{prefix}/bin`
193
* man pages are linked to `{prefix}/share/man`
194
195
+
196
+
197
#### `long`
198
199
* Default: false
@@ -193,6 +201,8 @@ instead of the current working directory. See
201
202
Show extended information in `ls`, `search`, and `help-search`.
203
204
+
205
+
206
### See Also
207
208
* [npm folders](/cli/v9/configuring-npm/folders)
content/cli/v9/commands/npm-dedupe.md
+23
-1
@@ -120,6 +120,8 @@ place, no hoisting. shallow (formerly --global-style) only install direct
120
deps at top-level. linked: (experimental) install in node_modules/.store,
121
link in place, unhoisted.
122
123
+
124
+
125
#### `legacy-bundling`
126
127
* Default: false
@@ -132,6 +134,8 @@ the same manner that they are depended on. This may cause very deep
134
directory structures and duplicate package installs as there is no
135
de-duplicating. Sets `--install-strategy=nested`.
136
137
+
138
+
139
#### `global-style`
140
141
* Default: false
@@ -142,6 +146,8 @@ de-duplicating. Sets `--install-strategy=nested`.
146
Only install direct dependencies in the top level `node_modules`, but hoist
147
on deeper dependencies. Sets `--install-strategy=shallow`.
148
149
+
150
+
151
#### `strict-peer-deps`
152
153
* Default: false
@@ -161,6 +167,8 @@ When such an override is performed, a warning is printed, explaining the
167
conflict and the packages involved. If `--strict-peer-deps` is set, then
168
this warning is treated as a failure.
169
170
+
171
+
172
#### `package-lock`
173
174
* Default: true
@@ -169,7 +177,7 @@ this warning is treated as a failure.
177
If set to false, then ignore `package-lock.json` files when installing. This
178
will also prevent _writing_ `package-lock.json` if `save` is true.
179
172
-This configuration does not affect `npm ci`.
180
+
181
182
#### `omit`
183
@@ -189,6 +197,8 @@ it will be included.
197
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment
198
variable will be set to `'production'` for all lifecycle scripts.
199
200
+
201
+
202
#### `ignore-scripts`
203
204
* Default: false
@@ -201,6 +211,8 @@ Note that commands explicitly intended to run a particular script, such as
211
will still run their intended script if `ignore-scripts` is set, but they
212
will *not* run any pre- or post-scripts.
213
214
+
215
+
216
#### `audit`
217
218
* Default: true
@@ -211,6 +223,8 @@ default registry and all registries configured for scopes. See the
223
documentation for [`npm audit`](/cli/v9/commands/npm-audit) for details on what is
224
submitted.
225
226
+
227
+
228
#### `bin-links`
229
230
* Default: true
@@ -223,6 +237,8 @@ Set to false to have it not do this. This can be used to work around the
237
fact that some file systems don't support symlinks, even on ostensibly Unix
238
systems.
239
240
+
241
+
242
#### `fund`
243
244
* Default: true
@@ -232,6 +248,8 @@ When "true" displays the message at the end of each `npm install`
248
acknowledging the number of dependencies looking for funding. See [`npm
249
fund`](/cli/v9/commands/npm-fund) for details.
250
251
+
252
+
253
#### `dry-run`
254
255
* Default: false
@@ -245,6 +263,8 @@ commands that modify your local installation, eg, `install`, `update`,
263
Note: This is NOT honored by other network related commands, eg `dist-tags`,
264
`owner`, etc.
265
266
+
267
+
268
#### `workspace`
269
270
* Default:
@@ -307,6 +327,8 @@ When set file: protocol dependencies will be packed and installed as regular
327
dependencies instead of creating a symlink. This option has no effect on
328
workspaces.
329
330
+
331
+
332
### See Also
333
334
* [npm find-dupes](/cli/v9/commands/npm-find-dupes)
content/cli/v9/commands/npm-deprecate.md
+4
@@ -80,6 +80,8 @@ format an empty string.
80
81
The base URL of the npm registry.
82
83
+
84
+
85
#### `otp`
86
87
* Default: null
@@ -91,6 +93,8 @@ when publishing or changing package permissions with `npm access`.
93
If not set, and a registry response fails with a challenge for a one-time
94
password, npm will prompt on the command line for one.
95
96
+
97
+
98
### See Also
99
100
* [package spec](/cli/v9/using-npm/package-spec)
content/cli/v9/commands/npm-diff.md
+20
@@ -187,6 +187,8 @@ located within the folder `./lib/` and changed lines of code within the
187
188
Define arguments to compare in `npm diff`.
189
190
+
191
+
192
#### `diff-name-only`
193
194
* Default: false
@@ -194,6 +196,8 @@ Define arguments to compare in `npm diff`.
196
197
Prints only filenames when using `npm diff`.
198
199
+
200
+
201
#### `diff-unified`
202
203
* Default: 3
@@ -201,6 +205,8 @@ Prints only filenames when using `npm diff`.
205
206
The number of lines of context to print in `npm diff`.
207
208
+
209
+
210
#### `diff-ignore-all-space`
211
212
* Default: false
@@ -208,6 +214,8 @@ The number of lines of context to print in `npm diff`.
214
215
Ignore whitespace when comparing lines in `npm diff`.
216
217
+
218
+
219
#### `diff-no-prefix`
220
221
* Default: false
@@ -218,6 +226,8 @@ Do not show any source or destination prefix in `npm diff` output.
226
Note: this causes `npm diff` to ignore the `--diff-src-prefix` and
227
`--diff-dst-prefix` configs.
228
229
+
230
+
231
#### `diff-src-prefix`
232
233
* Default: "a/"
@@ -225,6 +235,8 @@ Note: this causes `npm diff` to ignore the `--diff-src-prefix` and
235
236
Source prefix to be used in `npm diff` output.
237
238
+
239
+
240
#### `diff-dst-prefix`
241
242
* Default: "b/"
@@ -232,6 +244,8 @@ Source prefix to be used in `npm diff` output.
244
245
Destination prefix to be used in `npm diff` output.
246
247
+
248
+
249
#### `diff-text`
250
251
* Default: false
@@ -239,6 +253,8 @@ Destination prefix to be used in `npm diff` output.
253
254
Treat all files as text in `npm diff`.
255
256
+
257
+
258
#### `global`
259
260
* Default: false
@@ -253,6 +269,8 @@ folder instead of the current working directory. See
269
* bin files are linked to `{prefix}/bin`
270
* man pages are linked to `{prefix}/share/man`
271
272
+
273
+
274
#### `tag`
275
276
* Default: "latest"
@@ -267,6 +285,8 @@ command, if no explicit tag is given.
285
When used by the `npm diff` command, this is the tag used to fetch the
286
tarball that will be compared with the local files by default.
287
288
+
289
+
290
#### `workspace`
291
292
* Default:
content/cli/v9/commands/npm-docs.md
+4
@@ -65,6 +65,8 @@ terminal.
65
66
Set to `true` to use default system URL opener.
67
68
+
69
+
70
#### `registry`
71
72
* Default: "https://registry.npmjs.org/"
@@ -72,6 +74,8 @@ Set to `true` to use default system URL opener.
74
75
The base URL of the npm registry.
76
77
+
78
+
79
#### `workspace`
80
81
* Default:
content/cli/v9/commands/npm-doctor.md
+2
@@ -144,6 +144,8 @@ reset the cache.
144
145
The base URL of the npm registry.
146
147
+
148
+
149
### See Also
150
151
* [npm bugs](/cli/v9/commands/npm-bugs)
content/cli/v9/commands/npm-edit.md
+2
@@ -66,6 +66,8 @@ changes to your locally installed copy.
66
67
The command to run for `npm edit` and `npm config edit`.
68
69
+
70
+
71
### See Also
72
73
* [npm folders](/cli/v9/configuring-npm/folders)
content/cli/v9/commands/npm-exec.md
+3
@@ -149,6 +149,8 @@ $ npm exec -- foo@latest bar --package=@npmcli/foo
149
150
The package or packages to install for [`npm exec`](/cli/v9/commands/npm-exec)
151
152
+
153
+
154
#### `call`
155
156
* Default: ""
@@ -162,6 +164,7 @@ npm exec --package yo --package generator-node --call "yo node"
164
```
165
166
167
+
168
#### `workspace`
169
170
* Default:
content/cli/v9/commands/npm-explain.md
+2
@@ -98,6 +98,8 @@ Whether or not to output JSON data, rather than the normal output.
98
99
Not supported by all npm commands.
100
101
+
102
+
103
#### `workspace`
104
105
* Default:
content/cli/v9/commands/npm-explore.md
+2
@@ -70,6 +70,8 @@ sure to use `npm rebuild <pkg>` if you make any changes.
70
71
The shell to run for the `npm explore` command.
72
73
+
74
+
75
### See Also
76
77
* [npm folders](/cli/v9/configuring-npm/folders)
content/cli/v9/commands/npm-find-dupes.md
+21
-1
@@ -60,6 +60,8 @@ place, no hoisting. shallow (formerly --global-style) only install direct
60
deps at top-level. linked: (experimental) install in node_modules/.store,
61
link in place, unhoisted.
62
63
+
64
+
65
#### `legacy-bundling`
66
67
* Default: false
@@ -72,6 +74,8 @@ the same manner that they are depended on. This may cause very deep
74
directory structures and duplicate package installs as there is no
75
de-duplicating. Sets `--install-strategy=nested`.
76
77
+
78
+
79
#### `global-style`
80
81
* Default: false
@@ -82,6 +86,8 @@ de-duplicating. Sets `--install-strategy=nested`.
86
Only install direct dependencies in the top level `node_modules`, but hoist
87
on deeper dependencies. Sets `--install-strategy=shallow`.
88
89
+
90
+
91
#### `strict-peer-deps`
92
93
* Default: false
@@ -101,6 +107,8 @@ When such an override is performed, a warning is printed, explaining the
107
conflict and the packages involved. If `--strict-peer-deps` is set, then
108
this warning is treated as a failure.
109
110
+
111
+
112
#### `package-lock`
113
114
* Default: true
@@ -109,7 +117,7 @@ this warning is treated as a failure.
117
If set to false, then ignore `package-lock.json` files when installing. This
118
will also prevent _writing_ `package-lock.json` if `save` is true.
119
112
-This configuration does not affect `npm ci`.
120
+
121
122
#### `omit`
123
@@ -129,6 +137,8 @@ it will be included.
137
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment
138
variable will be set to `'production'` for all lifecycle scripts.
139
140
+
141
+
142
#### `ignore-scripts`
143
144
* Default: false
@@ -141,6 +151,8 @@ Note that commands explicitly intended to run a particular script, such as
151
will still run their intended script if `ignore-scripts` is set, but they
152
will *not* run any pre- or post-scripts.
153
154
+
155
+
156
#### `audit`
157
158
* Default: true
@@ -151,6 +163,8 @@ default registry and all registries configured for scopes. See the
163
documentation for [`npm audit`](/cli/v9/commands/npm-audit) for details on what is
164
submitted.
165
166
+
167
+
168
#### `bin-links`
169
170
* Default: true
@@ -163,6 +177,8 @@ Set to false to have it not do this. This can be used to work around the
177
fact that some file systems don't support symlinks, even on ostensibly Unix
178
systems.
179
180
+
181
+
182
#### `fund`
183
184
* Default: true
@@ -172,6 +188,8 @@ When "true" displays the message at the end of each `npm install`
188
acknowledging the number of dependencies looking for funding. See [`npm
189
fund`](/cli/v9/commands/npm-fund) for details.
190
191
+
192
+
193
#### `workspace`
194
195
* Default:
@@ -234,6 +252,8 @@ When set file: protocol dependencies will be packed and installed as regular
252
dependencies instead of creating a symlink. This option has no effect on
253
workspaces.
254
255
+
256
+
257
### See Also
258
259
* [npm dedupe](/cli/v9/commands/npm-dedupe)
content/cli/v9/commands/npm-fund.md
+8
@@ -108,6 +108,8 @@ Whether or not to output JSON data, rather than the normal output.
108
109
Not supported by all npm commands.
110
111
+
112
+
113
#### `browser`
114
115
* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
@@ -120,6 +122,8 @@ terminal.
122
123
Set to `true` to use default system URL opener.
124
125
+
126
+
127
#### `unicode`
128
129
* Default: false on windows, true on mac/unix systems with a unicode locale,
@@ -129,6 +133,8 @@ Set to `true` to use default system URL opener.
133
When set to true, npm uses unicode characters in the tree output. When
134
false, it uses ascii characters instead of unicode glyphs.
135
136
+
137
+
138
#### `workspace`
139
140
* Default:
@@ -158,6 +164,8 @@ This value is not exported to the environment for child processes.
164
165
If there are multiple funding sources, which 1-indexed source URL to open.
166
167
+
168
+
169
## See Also
170
171
* [package spec](/cli/v9/using-npm/package-spec)
content/cli/v9/commands/npm-help-search.md
+2
@@ -63,6 +63,8 @@ directly.
63
64
Show extended information in `ls`, `search`, and `help-search`.
65
66
+
67
+
68
### See Also
69
70
* [npm](/cli/v9/commands/npm)
content/cli/v9/commands/npm-help.md
+2
@@ -65,6 +65,8 @@ The program to use to view help content.
65
66
Set to `"browser"` to view html help content in the default web browser.
67
68
+
69
+
70
### See Also
71
72
* [npm](/cli/v9/commands/npm)
content/cli/v9/commands/npm-hook.md
+4
@@ -123,6 +123,8 @@ $ npm hook rm id-deadbeef
123
124
The base URL of the npm registry.
125
126
+
127
+
128
#### `otp`
129
130
* Default: null
@@ -134,6 +136,8 @@ when publishing or changing package permissions with `npm access`.
136
If not set, and a registry response fails with a challenge for a one-time
137
password, npm will prompt on the command line for one.
138
139
+
140
+
141
### See Also
142
143
* ["Introducing Hooks" blog post](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm)
content/cli/v9/commands/npm-init.md
+7
@@ -195,6 +195,8 @@ dot to represent the current directory in that context, e.g: `react-app .`:
195
Automatically answer "yes" to any prompts that npm might print on the
196
command line.
197
198
+
199
+
200
#### `force`
201
202
* Default: false
@@ -221,6 +223,8 @@ mistakes, unnecessary performance degradation, and malicious input.
223
If you don't have a clear idea of what you want to do, it is strongly
224
recommended that you do not use this option!
225
226
+
227
+
228
#### `scope`
229
230
* Default: the scope of the current project, if any, or ""
@@ -251,6 +255,7 @@ npm init --scope=@foo --yes
255
```
256
257
258
+
259
#### `workspace`
260
261
* Default:
@@ -299,6 +304,8 @@ This value is not exported to the environment for child processes.
304
If set to true, the npm cli will run an update after operations that may
305
possibly change the workspaces installed to the `node_modules` folder.
306
307
+
308
+
309
#### `include-workspace-root`
310
311
* Default: false
content/cli/v9/commands/npm-install-ci-test.md
+22
-8
@@ -61,6 +61,8 @@ place, no hoisting. shallow (formerly --global-style) only install direct
61
deps at top-level. linked: (experimental) install in node_modules/.store,
62
link in place, unhoisted.
63
64
+
65
+
66
#### `legacy-bundling`
67
68
* Default: false
@@ -73,6 +75,8 @@ the same manner that they are depended on. This may cause very deep
75
directory structures and duplicate package installs as there is no
76
de-duplicating. Sets `--install-strategy=nested`.
77
78
+
79
+
80
#### `global-style`
81
82
* Default: false
@@ -83,6 +87,8 @@ de-duplicating. Sets `--install-strategy=nested`.
87
Only install direct dependencies in the top level `node_modules`, but hoist
88
on deeper dependencies. Sets `--install-strategy=shallow`.
89
90
+
91
+
92
#### `omit`
93
94
* Default: 'dev' if the `NODE_ENV` environment variable is set to
@@ -101,6 +107,8 @@ it will be included.
107
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment
108
variable will be set to `'production'` for all lifecycle scripts.
109
110
+
111
+
112
#### `strict-peer-deps`
113
114
* Default: false
@@ -120,15 +128,7 @@ When such an override is performed, a warning is printed, explaining the
128
conflict and the packages involved. If `--strict-peer-deps` is set, then
129
this warning is treated as a failure.
130
123
-#### `package-lock`
124
-
125
-* Default: true
126
-* Type: Boolean
127
-
128
-If set to false, then ignore `package-lock.json` files when installing. This
129
-will also prevent _writing_ `package-lock.json` if `save` is true.
131
131
-This configuration does not affect `npm ci`.
132
133
#### `foreground-scripts`
134
@@ -142,6 +142,8 @@ input, output, and error with the main npm process.
142
Note that this will generally make installs run slower, and be much noisier,
143
but can be useful for debugging.
144
145
+
146
+
147
#### `ignore-scripts`
148
149
* Default: false
@@ -154,6 +156,8 @@ Note that commands explicitly intended to run a particular script, such as
156
will still run their intended script if `ignore-scripts` is set, but they
157
will *not* run any pre- or post-scripts.
158
159
+
160
+
161
#### `audit`
162
163
* Default: true
@@ -164,6 +168,8 @@ default registry and all registries configured for scopes. See the
168
documentation for [`npm audit`](/cli/v9/commands/npm-audit) for details on what is
169
submitted.
170
171
+
172
+
173
#### `bin-links`
174
175
* Default: true
@@ -176,6 +182,8 @@ Set to false to have it not do this. This can be used to work around the
182
fact that some file systems don't support symlinks, even on ostensibly Unix
183
systems.
184
185
+
186
+
187
#### `fund`
188
189
* Default: true
@@ -185,6 +193,8 @@ When "true" displays the message at the end of each `npm install`
193
acknowledging the number of dependencies looking for funding. See [`npm
194
fund`](/cli/v9/commands/npm-fund) for details.
195
196
+
197
+
198
#### `dry-run`
199
200
* Default: false
@@ -198,6 +208,8 @@ commands that modify your local installation, eg, `install`, `update`,
208
Note: This is NOT honored by other network related commands, eg `dist-tags`,
209
`owner`, etc.
210
211
+
212
+
213
#### `workspace`
214
215
* Default:
@@ -260,6 +272,8 @@ When set file: protocol dependencies will be packed and installed as regular
272
dependencies instead of creating a symlink. This option has no effect on
273
workspaces.
274
275
+
276
+
277
### See Also
278
279
* [npm install-test](/cli/v9/commands/npm-install-test)
content/cli/v9/commands/npm-install-test.md
+41
-1
@@ -62,6 +62,8 @@ When used with the `npm rm` command, removes the dependency from
62
63
Will also prevent writing to `package-lock.json` if set to `false`.
64
65
+
66
+
67
#### `save-exact`
68
69
* Default: false
@@ -70,6 +72,8 @@ Will also prevent writing to `package-lock.json` if set to `false`.
72
Dependencies saved to package.json will be configured with an exact version
73
rather than using npm's default semver range operator.
74
75
+
76
+
77
#### `global`
78
79
* Default: false
@@ -84,6 +88,8 @@ folder instead of the current working directory. See
88
* bin files are linked to `{prefix}/bin`
89
* man pages are linked to `{prefix}/share/man`
90
91
+
92
+
93
#### `install-strategy`
94
95
* Default: "hoisted"
@@ -96,6 +102,8 @@ place, no hoisting. shallow (formerly --global-style) only install direct
102
deps at top-level. linked: (experimental) install in node_modules/.store,
103
link in place, unhoisted.
104
105
+
106
+
107
#### `legacy-bundling`
108
109
* Default: false
@@ -108,6 +116,8 @@ the same manner that they are depended on. This may cause very deep
116
directory structures and duplicate package installs as there is no
117
de-duplicating. Sets `--install-strategy=nested`.
118
119
+
120
+
121
#### `global-style`
122
123
* Default: false
@@ -118,6 +128,8 @@ de-duplicating. Sets `--install-strategy=nested`.
128
Only install direct dependencies in the top level `node_modules`, but hoist
129
on deeper dependencies. Sets `--install-strategy=shallow`.
130
131
+
132
+
133
#### `omit`
134
135
* Default: 'dev' if the `NODE_ENV` environment variable is set to
@@ -136,6 +148,8 @@ it will be included.
148
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment
149
variable will be set to `'production'` for all lifecycle scripts.
150
151
+
152
+
153
#### `strict-peer-deps`
154
155
* Default: false
@@ -155,6 +169,18 @@ When such an override is performed, a warning is printed, explaining the
169
conflict and the packages involved. If `--strict-peer-deps` is set, then
170
this warning is treated as a failure.
171
172
+
173
+
174
+#### `prefer-dedupe`
175
+
176
+* Default: false
177
+* Type: Boolean
178
+
179
+Prefer to deduplicate packages if possible, rather than choosing a newer
180
+version of a dependency.
181
+
182
+
183
+
184
#### `package-lock`
185
186
* Default: true
@@ -163,7 +189,7 @@ this warning is treated as a failure.
189
If set to false, then ignore `package-lock.json` files when installing. This
190
will also prevent _writing_ `package-lock.json` if `save` is true.
191
166
-This configuration does not affect `npm ci`.
192
+
193
194
#### `foreground-scripts`
195
@@ -177,6 +203,8 @@ input, output, and error with the main npm process.
203
Note that this will generally make installs run slower, and be much noisier,
204
but can be useful for debugging.
205
206
+
207
+
208
#### `ignore-scripts`
209
210
* Default: false
@@ -189,6 +217,8 @@ Note that commands explicitly intended to run a particular script, such as
217
will still run their intended script if `ignore-scripts` is set, but they
218
will *not* run any pre- or post-scripts.
219
220
+
221
+
222
#### `audit`
223
224
* Default: true
@@ -199,6 +229,8 @@ default registry and all registries configured for scopes. See the
229
documentation for [`npm audit`](/cli/v9/commands/npm-audit) for details on what is
230
submitted.
231
232
+
233
+
234
#### `bin-links`
235
236
* Default: true
@@ -211,6 +243,8 @@ Set to false to have it not do this. This can be used to work around the
243
fact that some file systems don't support symlinks, even on ostensibly Unix
244
systems.
245
246
+
247
+
248
#### `fund`
249
250
* Default: true
@@ -220,6 +254,8 @@ When "true" displays the message at the end of each `npm install`
254
acknowledging the number of dependencies looking for funding. See [`npm
255
fund`](/cli/v9/commands/npm-fund) for details.
256
257
+
258
+
259
#### `dry-run`
260
261
* Default: false
@@ -233,6 +269,8 @@ commands that modify your local installation, eg, `install`, `update`,
269
Note: This is NOT honored by other network related commands, eg `dist-tags`,
270
`owner`, etc.
271
272
+
273
+
274
#### `workspace`
275
276
* Default:
@@ -295,6 +333,8 @@ When set file: protocol dependencies will be packed and installed as regular
333
dependencies instead of creating a symlink. This option has no effect on
334
workspaces.
335
336
+
337
+
338
### See Also
339
340
* [npm install](/cli/v9/commands/npm-install)
content/cli/v9/commands/npm-install.md
+41
-1
@@ -452,6 +452,8 @@ When used with the `npm rm` command, removes the dependency from
452
453
Will also prevent writing to `package-lock.json` if set to `false`.
454
455
+
456
+
457
#### `save-exact`
458
459
* Default: false
@@ -460,6 +462,8 @@ Will also prevent writing to `package-lock.json` if set to `false`.
462
Dependencies saved to package.json will be configured with an exact version
463
rather than using npm's default semver range operator.
464
465
+
466
+
467
#### `global`
468
469
* Default: false
@@ -474,6 +478,8 @@ folder instead of the current working directory. See
478
* bin files are linked to `{prefix}/bin`
479
* man pages are linked to `{prefix}/share/man`
480
481
+
482
+
483
#### `install-strategy`
484
485
* Default: "hoisted"
@@ -486,6 +492,8 @@ place, no hoisting. shallow (formerly --global-style) only install direct
492
deps at top-level. linked: (experimental) install in node_modules/.store,
493
link in place, unhoisted.
494
495
+
496
+
497
#### `legacy-bundling`
498
499
* Default: false
@@ -498,6 +506,8 @@ the same manner that they are depended on. This may cause very deep
506
directory structures and duplicate package installs as there is no
507
de-duplicating. Sets `--install-strategy=nested`.
508
509
+
510
+
511
#### `global-style`
512
513
* Default: false
@@ -508,6 +518,8 @@ de-duplicating. Sets `--install-strategy=nested`.
518
Only install direct dependencies in the top level `node_modules`, but hoist
519
on deeper dependencies. Sets `--install-strategy=shallow`.
520
521
+
522
+
523
#### `omit`
524
525
* Default: 'dev' if the `NODE_ENV` environment variable is set to
@@ -526,6 +538,8 @@ it will be included.
538
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment
539
variable will be set to `'production'` for all lifecycle scripts.
540
541
+
542
+
543
#### `strict-peer-deps`
544
545
* Default: false
@@ -545,6 +559,18 @@ When such an override is performed, a warning is printed, explaining the
559
conflict and the packages involved. If `--strict-peer-deps` is set, then
560
this warning is treated as a failure.
561
562
+
563
+
564
+#### `prefer-dedupe`
565
+
566
+* Default: false
567
+* Type: Boolean
568
+
569
+Prefer to deduplicate packages if possible, rather than choosing a newer
570
+version of a dependency.
571
+
572
+
573
+
574
#### `package-lock`
575
576
* Default: true
@@ -553,7 +579,7 @@ this warning is treated as a failure.
579
If set to false, then ignore `package-lock.json` files when installing. This
580
will also prevent _writing_ `package-lock.json` if `save` is true.
581
556
-This configuration does not affect `npm ci`.
582
+
583
584
#### `foreground-scripts`
585
@@ -567,6 +593,8 @@ input, output, and error with the main npm process.
593
Note that this will generally make installs run slower, and be much noisier,
594
but can be useful for debugging.
595
596
+
597
+
598
#### `ignore-scripts`
599
600
* Default: false
@@ -579,6 +607,8 @@ Note that commands explicitly intended to run a particular script, such as
607
will still run their intended script if `ignore-scripts` is set, but they
608
will *not* run any pre- or post-scripts.
609
610
+
611
+
612
#### `audit`
613
614
* Default: true
@@ -589,6 +619,8 @@ default registry and all registries configured for scopes. See the
619
documentation for [`npm audit`](/cli/v9/commands/npm-audit) for details on what is
620
submitted.
621
622
+
623
+
624
#### `bin-links`
625
626
* Default: true
@@ -601,6 +633,8 @@ Set to false to have it not do this. This can be used to work around the
633
fact that some file systems don't support symlinks, even on ostensibly Unix
634
systems.
635
636
+
637
+
638
#### `fund`
639
640
* Default: true
@@ -610,6 +644,8 @@ When "true" displays the message at the end of each `npm install`
644
acknowledging the number of dependencies looking for funding. See [`npm
645
fund`](/cli/v9/commands/npm-fund) for details.
646
647
+
648
+
649
#### `dry-run`
650
651
* Default: false
@@ -623,6 +659,8 @@ commands that modify your local installation, eg, `install`, `update`,
659
Note: This is NOT honored by other network related commands, eg `dist-tags`,
660
`owner`, etc.
661
662
+
663
+
664
#### `workspace`
665
666
* Default:
@@ -685,6 +723,8 @@ When set file: protocol dependencies will be packed and installed as regular
723
dependencies instead of creating a symlink. This option has no effect on
724
workspaces.
725
726
+
727
+
728
### Algorithm
729
730
Given a `package{dep}` structure: `A{B,C}, B{C}, C{D}`,
content/cli/v9/commands/npm-link.md
+29
-1
@@ -153,6 +153,8 @@ When used with the `npm rm` command, removes the dependency from
153
154
Will also prevent writing to `package-lock.json` if set to `false`.
155
156
+
157
+
158
#### `save-exact`
159
160
* Default: false
@@ -161,6 +163,8 @@ Will also prevent writing to `package-lock.json` if set to `false`.
163
Dependencies saved to package.json will be configured with an exact version
164
rather than using npm's default semver range operator.
165
166
+
167
+
168
#### `global`
169
170
* Default: false
@@ -175,6 +179,8 @@ folder instead of the current working directory. See
179
* bin files are linked to `{prefix}/bin`
180
* man pages are linked to `{prefix}/share/man`
181
182
+
183
+
184
#### `install-strategy`
185
186
* Default: "hoisted"
@@ -187,6 +193,8 @@ place, no hoisting. shallow (formerly --global-style) only install direct
193
deps at top-level. linked: (experimental) install in node_modules/.store,
194
link in place, unhoisted.
195
196
+
197
+
198
#### `legacy-bundling`
199
200
* Default: false
@@ -199,6 +207,8 @@ the same manner that they are depended on. This may cause very deep
207
directory structures and duplicate package installs as there is no
208
de-duplicating. Sets `--install-strategy=nested`.
209
210
+
211
+
212
#### `global-style`
213
214
* Default: false
@@ -209,6 +219,8 @@ de-duplicating. Sets `--install-strategy=nested`.
219
Only install direct dependencies in the top level `node_modules`, but hoist
220
on deeper dependencies. Sets `--install-strategy=shallow`.
221
222
+
223
+
224
#### `strict-peer-deps`
225
226
* Default: false
@@ -228,6 +240,8 @@ When such an override is performed, a warning is printed, explaining the
240
conflict and the packages involved. If `--strict-peer-deps` is set, then
241
this warning is treated as a failure.
242
243
+
244
+
245
#### `package-lock`
246
247
* Default: true
@@ -236,7 +250,7 @@ this warning is treated as a failure.
250
If set to false, then ignore `package-lock.json` files when installing. This
251
will also prevent _writing_ `package-lock.json` if `save` is true.
252
239
-This configuration does not affect `npm ci`.
253
+
254
255
#### `omit`
256
@@ -256,6 +270,8 @@ it will be included.
270
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment
271
variable will be set to `'production'` for all lifecycle scripts.
272
273
+
274
+
275
#### `ignore-scripts`
276
277
* Default: false
@@ -268,6 +284,8 @@ Note that commands explicitly intended to run a particular script, such as
284
will still run their intended script if `ignore-scripts` is set, but they
285
will *not* run any pre- or post-scripts.
286
287
+
288
+
289
#### `audit`
290
291
* Default: true
@@ -278,6 +296,8 @@ default registry and all registries configured for scopes. See the
296
documentation for [`npm audit`](/cli/v9/commands/npm-audit) for details on what is
297
submitted.
298
299
+
300
+
301
#### `bin-links`
302
303
* Default: true
@@ -290,6 +310,8 @@ Set to false to have it not do this. This can be used to work around the
310
fact that some file systems don't support symlinks, even on ostensibly Unix
311
systems.
312
313
+
314
+
315
#### `fund`
316
317
* Default: true
@@ -299,6 +321,8 @@ When "true" displays the message at the end of each `npm install`
321
acknowledging the number of dependencies looking for funding. See [`npm
322
fund`](/cli/v9/commands/npm-fund) for details.
323
324
+
325
+
326
#### `dry-run`
327
328
* Default: false
@@ -312,6 +336,8 @@ commands that modify your local installation, eg, `install`, `update`,
336
Note: This is NOT honored by other network related commands, eg `dist-tags`,
337
`owner`, etc.
338
339
+
340
+
341
#### `workspace`
342
343
* Default:
@@ -374,6 +400,8 @@ When set file: protocol dependencies will be packed and installed as regular
400
dependencies instead of creating a symlink. This option has no effect on
401
workspaces.
402
403
+
404
+
405
### See Also
406
407
* [package spec](/cli/v9/using-npm/package-spec)
content/cli/v9/commands/npm-login.md
+5
@@ -70,6 +70,8 @@ your existing record.
70
71
The base URL of the npm registry.
72
73
+
74
+
75
#### `scope`
76
77
* Default: the scope of the current project, if any, or ""
@@ -100,6 +102,7 @@ npm init --scope=@foo --yes
102
```
103
104
105
+
106
#### `auth-type`
107
108
* Default: "web"
@@ -108,6 +111,8 @@ npm init --scope=@foo --yes
111
What authentication strategy to use with `login`. Note that if an `otp`
112
config is given, this value will always be set to `legacy`.
113
114
+
115
+
116
### See Also
117
118
* [npm registry](/cli/v9/using-npm/registry)
content/cli/v9/commands/npm-logout.md
+3
@@ -65,6 +65,8 @@ connected to that scope, if set.
65
66
The base URL of the npm registry.
67
68
+
69
+
70
#### `scope`
71
72
* Default: the scope of the current project, if any, or ""
@@ -95,6 +97,7 @@ npm init --scope=@foo --yes
97
```
98
99
100
+
101
### See Also
102
103
* [npm adduser](/cli/v9/commands/npm-adduser)
content/cli/v9/commands/npm-ls.md
+23
-1
@@ -58,7 +58,7 @@ packages will *also* show the paths to the specified packages. For
58
example, running `npm ls promzard` in npm's source tree will show:
59
60
```bash
61
-npm@9.6.7 /path/to/npm
61
+npm@9.7.1 /path/to/npm
62
└─┬ init-package-json@0.0.4
63
└── promzard@0.1.5
64
```
@@ -113,6 +113,8 @@ When running `npm outdated` and `npm ls`, setting `--all` will show all
113
outdated or installed packages, rather than only those directly depended
114
upon by the current project.
115
116
+
117
+
118
#### `json`
119
120
* Default: false
@@ -125,6 +127,8 @@ Whether or not to output JSON data, rather than the normal output.
127
128
Not supported by all npm commands.
129
130
+
131
+
132
#### `long`
133
134
* Default: false
@@ -132,6 +136,8 @@ Not supported by all npm commands.
136
137
Show extended information in `ls`, `search`, and `help-search`.
138
139
+
140
+
141
#### `parseable`
142
143
* Default: false
@@ -140,6 +146,8 @@ Show extended information in `ls`, `search`, and `help-search`.
146
Output parseable results from commands that write to standard output. For
147
`npm search`, this will be tab-separated table format.
148
149
+
150
+
151
#### `global`
152
153
* Default: false
@@ -154,6 +162,8 @@ folder instead of the current working directory. See
162
* bin files are linked to `{prefix}/bin`
163
* man pages are linked to `{prefix}/share/man`
164
165
+
166
+
167
#### `depth`
168
169
* Default: `Infinity` if `--all` is set, otherwise `1`
@@ -164,6 +174,8 @@ The depth to go when recursing packages for `npm ls`.
174
If not set, `npm ls` will show only the immediate dependencies of the root
175
project. If `--all` is set, then npm will show all dependencies by default.
176
177
+
178
+
179
#### `omit`
180
181
* Default: 'dev' if the `NODE_ENV` environment variable is set to
@@ -182,6 +194,8 @@ it will be included.
194
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment
195
variable will be set to `'production'` for all lifecycle scripts.
196
197
+
198
+
199
#### `link`
200
201
* Default: false
@@ -189,6 +203,8 @@ variable will be set to `'production'` for all lifecycle scripts.
203
204
Used with `npm ls`, limiting output to only those packages that are linked.
205
206
+
207
+
208
#### `package-lock-only`
209
210
* Default: false
@@ -203,6 +219,8 @@ instead of checking `node_modules` and downloading dependencies.
219
For `list` this means the output will be based on the tree described by the
220
`package-lock.json`, rather than the contents of `node_modules`.
221
222
+
223
+
224
#### `unicode`
225
226
* Default: false on windows, true on mac/unix systems with a unicode locale,
@@ -212,6 +230,8 @@ For `list` this means the output will be based on the tree described by the
230
When set to true, npm uses unicode characters in the tree output. When
231
false, it uses ascii characters instead of unicode glyphs.
232
233
+
234
+
235
#### `workspace`
236
237
* Default:
@@ -274,6 +294,8 @@ When set file: protocol dependencies will be packed and installed as regular
294
dependencies instead of creating a symlink. This option has no effect on
295
workspaces.
296
297
+
298
+
299
### See Also
300
301
* [package spec](/cli/v9/using-npm/package-spec)
content/cli/v9/commands/npm-org.md
+8
@@ -100,6 +100,8 @@ listing them, and finding specific ones and their roles.
100
101
The base URL of the npm registry.
102
103
+
104
+
105
#### `otp`
106
107
* Default: null
@@ -111,6 +113,8 @@ when publishing or changing package permissions with `npm access`.
113
If not set, and a registry response fails with a challenge for a one-time
114
password, npm will prompt on the command line for one.
115
116
+
117
+
118
#### `json`
119
120
* Default: false
@@ -123,6 +127,8 @@ Whether or not to output JSON data, rather than the normal output.
127
128
Not supported by all npm commands.
129
130
+
131
+
132
#### `parseable`
133
134
* Default: false
@@ -131,6 +137,8 @@ Not supported by all npm commands.
137
Output parseable results from commands that write to standard output. For
138
`npm search`, this will be tab-separated table format.
139
140
+
141
+
142
### See Also
143
144
* [using orgs](/cli/v9/using-npm/orgs)
content/cli/v9/commands/npm-outdated.md
+10
@@ -126,6 +126,8 @@ When running `npm outdated` and `npm ls`, setting `--all` will show all
126
outdated or installed packages, rather than only those directly depended
127
upon by the current project.
128
129
+
130
+
131
#### `json`
132
133
* Default: false
@@ -138,6 +140,8 @@ Whether or not to output JSON data, rather than the normal output.
140
141
Not supported by all npm commands.
142
143
+
144
+
145
#### `long`
146
147
* Default: false
@@ -145,6 +149,8 @@ Not supported by all npm commands.
149
150
Show extended information in `ls`, `search`, and `help-search`.
151
152
+
153
+
154
#### `parseable`
155
156
* Default: false
@@ -153,6 +159,8 @@ Show extended information in `ls`, `search`, and `help-search`.
159
Output parseable results from commands that write to standard output. For
160
`npm search`, this will be tab-separated table format.
161
162
+
163
+
164
#### `global`
165
166
* Default: false
@@ -167,6 +175,8 @@ folder instead of the current working directory. See
175
* bin files are linked to `{prefix}/bin`
176
* man pages are linked to `{prefix}/share/man`
177
178
+
179
+
180
#### `workspace`
181
182
* Default:
content/cli/v9/commands/npm-owner.md
+4
@@ -73,6 +73,8 @@ flow when changing ownership or include an otp on the command line with `--otp`.
73
74
The base URL of the npm registry.
75
76
+
77
+
78
#### `otp`
79
80
* Default: null
@@ -84,6 +86,8 @@ when publishing or changing package permissions with `npm access`.
86
If not set, and a registry response fails with a challenge for a one-time
87
password, npm will prompt on the command line for one.
88
89
+
90
+
91
#### `workspace`
92
93
* Default:
content/cli/v9/commands/npm-pack.md
+6
@@ -56,6 +56,8 @@ commands that modify your local installation, eg, `install`, `update`,
56
Note: This is NOT honored by other network related commands, eg `dist-tags`,
57
`owner`, etc.
58
59
+
60
+
61
#### `json`
62
63
* Default: false
@@ -68,6 +70,8 @@ Whether or not to output JSON data, rather than the normal output.
70
71
Not supported by all npm commands.
72
73
+
74
+
75
#### `pack-destination`
76
77
* Default: "."
@@ -75,6 +79,8 @@ Not supported by all npm commands.
79
80
Directory in which `npm pack` will save tarballs.
81
82
+
83
+
84
#### `workspace`
85
86
* Default:
content/cli/v9/commands/npm-ping.md
+2
@@ -68,6 +68,8 @@ npm ERR! 404 Not Found - GET http://www.foo.com/-/ping?write=true
68
69
The base URL of the npm registry.
70
71
+
72
+
73
### See Also
74
75
* [npm doctor](/cli/v9/commands/npm-doctor)
content/cli/v9/commands/npm-pkg.md
+4
@@ -232,6 +232,8 @@ mistakes, unnecessary performance degradation, and malicious input.
232
If you don't have a clear idea of what you want to do, it is strongly
233
recommended that you do not use this option!
234
235
+
236
+
237
#### `json`
238
239
* Default: false
@@ -244,6 +246,8 @@ Whether or not to output JSON data, rather than the normal output.
246
247
Not supported by all npm commands.
248
249
+
250
+
251
#### `workspace`
252
253
* Default:
content/cli/v9/commands/npm-prefix.md
+2
@@ -80,6 +80,8 @@ folder instead of the current working directory. See
80
* bin files are linked to `{prefix}/bin`
81
* man pages are linked to `{prefix}/share/man`
82
83
+
84
+
85
### See Also
86
87
* [npm root](/cli/v9/commands/npm-root)
content/cli/v9/commands/npm-profile.md
+8
@@ -112,6 +112,8 @@ Some of these commands may not be available on non npmjs.com registries.
112
113
The base URL of the npm registry.
114
115
+
116
+
117
#### `json`
118
119
* Default: false
@@ -124,6 +126,8 @@ Whether or not to output JSON data, rather than the normal output.
126
127
Not supported by all npm commands.
128
129
+
130
+
131
#### `parseable`
132
133
* Default: false
@@ -132,6 +136,8 @@ Not supported by all npm commands.
136
Output parseable results from commands that write to standard output. For
137
`npm search`, this will be tab-separated table format.
138
139
+
140
+
141
#### `otp`
142
143
* Default: null
@@ -143,6 +149,8 @@ when publishing or changing package permissions with `npm access`.
149
If not set, and a registry response fails with a challenge for a one-time
150
password, npm will prompt on the command line for one.
151
152
+
153
+
154
### See Also
155
156
* [npm adduser](/cli/v9/commands/npm-adduser)
content/cli/v9/commands/npm-prune.md
+12
@@ -84,6 +84,8 @@ it will be included.
84
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment
85
variable will be set to `'production'` for all lifecycle scripts.
86
87
+
88
+
89
#### `dry-run`
90
91
* Default: false
@@ -97,6 +99,8 @@ commands that modify your local installation, eg, `install`, `update`,
99
Note: This is NOT honored by other network related commands, eg `dist-tags`,
100
`owner`, etc.
101
102
+
103
+
104
#### `json`
105
106
* Default: false
@@ -109,6 +113,8 @@ Whether or not to output JSON data, rather than the normal output.
113
114
Not supported by all npm commands.
115
116
+
117
+
118
#### `foreground-scripts`
119
120
* Default: false
@@ -121,6 +127,8 @@ input, output, and error with the main npm process.
127
Note that this will generally make installs run slower, and be much noisier,
128
but can be useful for debugging.
129
130
+
131
+
132
#### `ignore-scripts`
133
134
* Default: false
@@ -133,6 +141,8 @@ Note that commands explicitly intended to run a particular script, such as
141
will still run their intended script if `ignore-scripts` is set, but they
142
will *not* run any pre- or post-scripts.
143
144
+
145
+
146
#### `workspace`
147
148
* Default:
@@ -195,6 +205,8 @@ When set file: protocol dependencies will be packed and installed as regular
205
dependencies instead of creating a symlink. This option has no effect on
206
workspaces.
207
208
+
209
+
210
### See Also
211
212
* [npm uninstall](/cli/v9/commands/npm-uninstall)
content/cli/v9/commands/npm-publish.md
+19
@@ -132,6 +132,8 @@ command, if no explicit tag is given.
132
When used by the `npm diff` command, this is the tag used to fetch the
133
tarball that will be compared with the local files by default.
134
135
+
136
+
137
#### `access`
138
139
* Default: 'public' for new packages, existing packages it will not change the
@@ -148,6 +150,8 @@ packages. Specifying a value of `restricted` or `public` during publish will
150
change the access for an existing package the same way that `npm access set
151
status` would.
152
153
+
154
+
155
#### `dry-run`
156
157
* Default: false
@@ -161,6 +165,8 @@ commands that modify your local installation, eg, `install`, `update`,
165
Note: This is NOT honored by other network related commands, eg `dist-tags`,
166
`owner`, etc.
167
168
+
169
+
170
#### `otp`
171
172
* Default: null
@@ -172,6 +178,8 @@ when publishing or changing package permissions with `npm access`.
178
If not set, and a registry response fails with a challenge for a one-time
179
password, npm will prompt on the command line for one.
180
181
+
182
+
183
#### `workspace`
184
185
* Default:
@@ -233,6 +241,17 @@ This value is not exported to the environment for child processes.
241
When publishing from a supported cloud CI/CD system, the package will be
242
publicly linked to where it was built and published from.
243
244
+This config can not be used with: `provenance-file`
245
+
246
+#### `provenance-file`
247
+
248
+* Default: null
249
+* Type: Path
250
+
251
+When publishing, the provenance bundle at the given path will be used.
252
+
253
+This config can not be used with: `provenance`
254
+
255
### See Also
256
257
* [package spec](/cli/v9/using-npm/package-spec)
content/cli/v9/commands/npm-query.md
+2
@@ -183,6 +183,8 @@ folder instead of the current working directory. See
183
* bin files are linked to `{prefix}/bin`
184
* man pages are linked to `{prefix}/share/man`
185
186
+
187
+
188
#### `workspace`
189
190
* Default:
content/cli/v9/commands/npm-rebuild.md
+10
@@ -70,6 +70,8 @@ folder instead of the current working directory. See
70
* bin files are linked to `{prefix}/bin`
71
* man pages are linked to `{prefix}/share/man`
72
73
+
74
+
75
#### `bin-links`
76
77
* Default: true
@@ -82,6 +84,8 @@ Set to false to have it not do this. This can be used to work around the
84
fact that some file systems don't support symlinks, even on ostensibly Unix
85
systems.
86
87
+
88
+
89
#### `foreground-scripts`
90
91
* Default: false
@@ -94,6 +98,8 @@ input, output, and error with the main npm process.
98
Note that this will generally make installs run slower, and be much noisier,
99
but can be useful for debugging.
100
101
+
102
+
103
#### `ignore-scripts`
104
105
* Default: false
@@ -106,6 +112,8 @@ Note that commands explicitly intended to run a particular script, such as
112
will still run their intended script if `ignore-scripts` is set, but they
113
will *not* run any pre- or post-scripts.
114
115
+
116
+
117
#### `workspace`
118
119
* Default:
@@ -168,6 +176,8 @@ When set file: protocol dependencies will be packed and installed as regular
176
dependencies instead of creating a symlink. This option has no effect on
177
workspaces.
178
179
+
180
+
181
### See Also
182
183
* [package spec](/cli/v9/using-npm/package-spec)
content/cli/v9/commands/npm-repo.md
+4
@@ -63,6 +63,8 @@ terminal.
63
64
Set to `true` to use default system URL opener.
65
66
+
67
+
68
#### `registry`
69
70
* Default: "https://registry.npmjs.org/"
@@ -70,6 +72,8 @@ Set to `true` to use default system URL opener.
72
73
The base URL of the npm registry.
74
75
+
76
+
77
#### `workspace`
78
79
* Default:
content/cli/v9/commands/npm-restart.md
+4
@@ -79,6 +79,8 @@ Note that commands explicitly intended to run a particular script, such as
79
will still run their intended script if `ignore-scripts` is set, but they
80
will *not* run any pre- or post-scripts.
81
82
+
83
+
84
#### `script-shell`
85
86
* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
@@ -87,6 +89,8 @@ will *not* run any pre- or post-scripts.
89
The shell to use for scripts run with the `npm exec`, `npm run` and `npm
90
init <package-spec>` commands.
91
92
+
93
+
94
### See Also
95
96
* [npm run-script](/cli/v9/commands/npm-run-script)
content/cli/v9/commands/npm-root.md
+2
@@ -72,6 +72,8 @@ folder instead of the current working directory. See
72
* bin files are linked to `{prefix}/bin`
73
* man pages are linked to `{prefix}/share/man`
74
75
+
76
+
77
### See Also
78
79
* [npm prefix](/cli/v9/commands/npm-prefix)
content/cli/v9/commands/npm-run-script.md
+6
@@ -247,6 +247,8 @@ Note that commands explicitly intended to run a particular script, such as
247
will still run their intended script if `ignore-scripts` is set, but they
248
will *not* run any pre- or post-scripts.
249
250
+
251
+
252
#### `foreground-scripts`
253
254
* Default: false
@@ -259,6 +261,8 @@ input, output, and error with the main npm process.
261
Note that this will generally make installs run slower, and be much noisier,
262
but can be useful for debugging.
263
264
+
265
+
266
#### `script-shell`
267
268
* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
@@ -267,6 +271,8 @@ but can be useful for debugging.
271
The shell to use for scripts run with the `npm exec`, `npm run` and `npm
272
init <package-spec>` commands.
273
274
+
275
+
276
### See Also
277
278
* [npm scripts](/cli/v9/using-npm/scripts)
content/cli/v9/commands/npm-search.md
+22
@@ -77,6 +77,8 @@ expression characters in most shells.)
77
78
Show extended information in `ls`, `search`, and `help-search`.
79
80
+
81
+
82
#### `json`
83
84
* Default: false
@@ -89,6 +91,8 @@ Whether or not to output JSON data, rather than the normal output.
91
92
Not supported by all npm commands.
93
94
+
95
+
96
#### `color`
97
98
* Default: true unless the NO_COLOR environ is set to something other than '0'
@@ -97,6 +101,8 @@ Not supported by all npm commands.
101
If false, never shows colors. If `"always"` then always shows colors. If
102
true, then only prints color codes for tty file descriptors.
103
104
+
105
+
106
#### `parseable`
107
108
* Default: false
@@ -105,6 +111,8 @@ true, then only prints color codes for tty file descriptors.
111
Output parseable results from commands that write to standard output. For
112
`npm search`, this will be tab-separated table format.
113
114
+
115
+
116
#### `description`
117
118
* Default: true
@@ -112,6 +120,8 @@ Output parseable results from commands that write to standard output. For
120
121
Show the description in `npm search`
122
123
+
124
+
125
#### `searchopts`
126
127
* Default: ""
@@ -119,6 +129,8 @@ Show the description in `npm search`
129
130
Space-separated options that are always passed to search.
131
132
+
133
+
134
#### `searchexclude`
135
136
* Default: ""
@@ -126,6 +138,8 @@ Space-separated options that are always passed to search.
138
139
Space-separated options that limit the results from search.
140
141
+
142
+
143
#### `registry`
144
145
* Default: "https://registry.npmjs.org/"
@@ -133,6 +147,8 @@ Space-separated options that limit the results from search.
147
148
The base URL of the npm registry.
149
150
+
151
+
152
#### `prefer-online`
153
154
* Default: false
@@ -141,6 +157,8 @@ The base URL of the npm registry.
157
If true, staleness checks for cached data will be forced, making the CLI
158
look for updates immediately even for fresh package data.
159
160
+
161
+
162
#### `prefer-offline`
163
164
* Default: false
@@ -150,6 +168,8 @@ If true, staleness checks for cached data will be bypassed, but missing data
168
will be requested from the server. To force full offline mode, use
169
`--offline`.
170
171
+
172
+
173
#### `offline`
174
175
* Default: false
@@ -158,6 +178,8 @@ will be requested from the server. To force full offline mode, use
178
Force offline mode: no network requests will be done during install. To
179
allow the CLI to fill in missing cache data, see `--prefer-offline`.
180
181
+
182
+
183
### See Also
184
185
* [npm registry](/cli/v9/using-npm/registry)
content/cli/v9/commands/npm-star.md
+6
@@ -73,6 +73,8 @@ You can see all your starred packages using [`npm stars`](/cli/v9/commands/npm-s
73
74
The base URL of the npm registry.
75
76
+
77
+
78
#### `unicode`
79
80
* Default: false on windows, true on mac/unix systems with a unicode locale,
@@ -82,6 +84,8 @@ The base URL of the npm registry.
84
When set to true, npm uses unicode characters in the tree output. When
85
false, it uses ascii characters instead of unicode glyphs.
86
87
+
88
+
89
#### `otp`
90
91
* Default: null
@@ -93,6 +97,8 @@ when publishing or changing package permissions with `npm access`.
97
If not set, and a registry response fails with a challenge for a one-time
98
password, npm will prompt on the command line for one.
99
100
+
101
+
102
### See Also
103
104
* [package spec](/cli/v9/using-npm/package-spec)
content/cli/v9/commands/npm-stars.md
+2
@@ -60,6 +60,8 @@ you will most certainly enjoy this command.
60
61
The base URL of the npm registry.
62
63
+
64
+
65
### See Also
66
67
* [npm star](/cli/v9/commands/npm-star)
content/cli/v9/commands/npm-start.md
+4
@@ -90,6 +90,8 @@ Note that commands explicitly intended to run a particular script, such as
90
will still run their intended script if `ignore-scripts` is set, but they
91
will *not* run any pre- or post-scripts.
92
93
+
94
+
95
#### `script-shell`
96
97
* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
@@ -98,6 +100,8 @@ will *not* run any pre- or post-scripts.
100
The shell to use for scripts run with the `npm exec`, `npm run` and `npm
101
init <package-spec>` commands.
102
103
+
104
+
105
### See Also
106
107
* [npm run-script](/cli/v9/commands/npm-run-script)
content/cli/v9/commands/npm-stop.md
+4
@@ -83,6 +83,8 @@ Note that commands explicitly intended to run a particular script, such as
83
will still run their intended script if `ignore-scripts` is set, but they
84
will *not* run any pre- or post-scripts.
85
86
+
87
+
88
#### `script-shell`
89
90
* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
@@ -91,6 +93,8 @@ will *not* run any pre- or post-scripts.
93
The shell to use for scripts run with the `npm exec`, `npm run` and `npm
94
init <package-spec>` commands.
95
96
+
97
+
98
### See Also
99
100
* [npm run-script](/cli/v9/commands/npm-run-script)
content/cli/v9/commands/npm-team.md
+8
@@ -140,6 +140,8 @@ use the `npm access` command to grant or revoke the appropriate permissions.
140
141
The base URL of the npm registry.
142
143
+
144
+
145
#### `otp`
146
147
* Default: null
@@ -151,6 +153,8 @@ when publishing or changing package permissions with `npm access`.
153
If not set, and a registry response fails with a challenge for a one-time
154
password, npm will prompt on the command line for one.
155
156
+
157
+
158
#### `parseable`
159
160
* Default: false
@@ -159,6 +163,8 @@ password, npm will prompt on the command line for one.
163
Output parseable results from commands that write to standard output. For
164
`npm search`, this will be tab-separated table format.
165
166
+
167
+
168
#### `json`
169
170
* Default: false
@@ -171,6 +177,8 @@ Whether or not to output JSON data, rather than the normal output.
177
178
Not supported by all npm commands.
179
180
+
181
+
182
### See Also
183
184
* [npm access](/cli/v9/commands/npm-access)
content/cli/v9/commands/npm-test.md
+4
@@ -80,6 +80,8 @@ Note that commands explicitly intended to run a particular script, such as
80
will still run their intended script if `ignore-scripts` is set, but they
81
will *not* run any pre- or post-scripts.
82
83
+
84
+
85
#### `script-shell`
86
87
* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
@@ -88,6 +90,8 @@ will *not* run any pre- or post-scripts.
90
The shell to use for scripts run with the `npm exec`, `npm run` and `npm
91
init <package-spec>` commands.
92
93
+
94
+
95
### See Also
96
97
* [npm run-script](/cli/v9/commands/npm-run-script)
content/cli/v9/commands/npm-token.md
+8
@@ -116,6 +116,8 @@ This lets you list, create and revoke authentication tokens.
116
This is used to mark a token as unable to publish when configuring limited
117
access tokens with the `npm token create` command.
118
119
+
120
+
121
#### `cidr`
122
123
* Default: null
@@ -124,6 +126,8 @@ access tokens with the `npm token create` command.
126
This is a list of CIDR address to be used when configuring limited access
127
tokens with the `npm token create` command.
128
129
+
130
+
131
#### `registry`
132
133
* Default: "https://registry.npmjs.org/"
@@ -131,6 +135,8 @@ tokens with the `npm token create` command.
135
136
The base URL of the npm registry.
137
138
+
139
+
140
#### `otp`
141
142
* Default: null
@@ -142,6 +148,8 @@ when publishing or changing package permissions with `npm access`.
148
If not set, and a registry response fails with a challenge for a one-time
149
password, npm will prompt on the command line for one.
150
151
+
152
+
153
### See Also
154
155
* [npm adduser](/cli/v9/commands/npm-adduser)
content/cli/v9/commands/npm-uninstall.md
+20
@@ -99,6 +99,24 @@ When used with the `npm rm` command, removes the dependency from
99
100
Will also prevent writing to `package-lock.json` if set to `false`.
101
102
+
103
+
104
+#### `global`
105
+
106
+* Default: false
107
+* Type: Boolean
108
+
109
+Operates in "global" mode, so that packages are installed into the `prefix`
110
+folder instead of the current working directory. See
111
+[folders](/cli/v9/configuring-npm/folders) for more on the differences in behavior.
112
+
113
+* packages are installed into the `{prefix}/lib/node_modules` folder, instead
114
+ of the current working directory.
115
+* bin files are linked to `{prefix}/bin`
116
+* man pages are linked to `{prefix}/share/man`
117
+
118
+
119
+
120
#### `workspace`
121
122
* Default:
@@ -161,6 +179,8 @@ When set file: protocol dependencies will be packed and installed as regular
179
dependencies instead of creating a symlink. This option has no effect on
180
workspaces.
181
182
+
183
+
184
### See Also
185
186
* [npm prune](/cli/v9/commands/npm-prune)
content/cli/v9/commands/npm-unpublish.md
+4
@@ -83,6 +83,8 @@ commands that modify your local installation, eg, `install`, `update`,
83
Note: This is NOT honored by other network related commands, eg `dist-tags`,
84
`owner`, etc.
85
86
+
87
+
88
#### `force`
89
90
* Default: false
@@ -109,6 +111,8 @@ mistakes, unnecessary performance degradation, and malicious input.
111
If you don't have a clear idea of what you want to do, it is strongly
112
recommended that you do not use this option!
113
114
+
115
+
116
#### `workspace`
117
118
* Default:
content/cli/v9/commands/npm-unstar.md
+6
@@ -69,6 +69,8 @@ You can see all your starred packages using [`npm stars`](/cli/v9/commands/npm-s
69
70
The base URL of the npm registry.
71
72
+
73
+
74
#### `unicode`
75
76
* Default: false on windows, true on mac/unix systems with a unicode locale,
@@ -78,6 +80,8 @@ The base URL of the npm registry.
80
When set to true, npm uses unicode characters in the tree output. When
81
false, it uses ascii characters instead of unicode glyphs.
82
83
+
84
+
85
#### `otp`
86
87
* Default: null
@@ -89,6 +93,8 @@ when publishing or changing package permissions with `npm access`.
93
If not set, and a registry response fails with a challenge for a one-time
94
password, npm will prompt on the command line for one.
95
96
+
97
+
98
### See Also
99
100
* [npm star](/cli/v9/commands/npm-star)
content/cli/v9/commands/npm-update.md
+29
-1
@@ -200,6 +200,8 @@ When used with the `npm rm` command, removes the dependency from
200
201
Will also prevent writing to `package-lock.json` if set to `false`.
202
203
+
204
+
205
#### `global`
206
207
* Default: false
@@ -214,6 +216,8 @@ folder instead of the current working directory. See
216
* bin files are linked to `{prefix}/bin`
217
* man pages are linked to `{prefix}/share/man`
218
219
+
220
+
221
#### `install-strategy`
222
223
* Default: "hoisted"
@@ -226,6 +230,8 @@ place, no hoisting. shallow (formerly --global-style) only install direct
230
deps at top-level. linked: (experimental) install in node_modules/.store,
231
link in place, unhoisted.
232
233
+
234
+
235
#### `legacy-bundling`
236
237
* Default: false
@@ -238,6 +244,8 @@ the same manner that they are depended on. This may cause very deep
244
directory structures and duplicate package installs as there is no
245
de-duplicating. Sets `--install-strategy=nested`.
246
247
+
248
+
249
#### `global-style`
250
251
* Default: false
@@ -248,6 +256,8 @@ de-duplicating. Sets `--install-strategy=nested`.
256
Only install direct dependencies in the top level `node_modules`, but hoist
257
on deeper dependencies. Sets `--install-strategy=shallow`.
258
259
+
260
+
261
#### `omit`
262
263
* Default: 'dev' if the `NODE_ENV` environment variable is set to
@@ -266,6 +276,8 @@ it will be included.
276
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment
277
variable will be set to `'production'` for all lifecycle scripts.
278
279
+
280
+
281
#### `strict-peer-deps`
282
283
* Default: false
@@ -285,6 +297,8 @@ When such an override is performed, a warning is printed, explaining the
297
conflict and the packages involved. If `--strict-peer-deps` is set, then
298
this warning is treated as a failure.
299
300
+
301
+
302
#### `package-lock`
303
304
* Default: true
@@ -293,7 +307,7 @@ this warning is treated as a failure.
307
If set to false, then ignore `package-lock.json` files when installing. This
308
will also prevent _writing_ `package-lock.json` if `save` is true.
309
296
-This configuration does not affect `npm ci`.
310
+
311
312
#### `foreground-scripts`
313
@@ -307,6 +321,8 @@ input, output, and error with the main npm process.
321
Note that this will generally make installs run slower, and be much noisier,
322
but can be useful for debugging.
323
324
+
325
+
326
#### `ignore-scripts`
327
328
* Default: false
@@ -319,6 +335,8 @@ Note that commands explicitly intended to run a particular script, such as
335
will still run their intended script if `ignore-scripts` is set, but they
336
will *not* run any pre- or post-scripts.
337
338
+
339
+
340
#### `audit`
341
342
* Default: true
@@ -329,6 +347,8 @@ default registry and all registries configured for scopes. See the
347
documentation for [`npm audit`](/cli/v9/commands/npm-audit) for details on what is
348
submitted.
349
350
+
351
+
352
#### `bin-links`
353
354
* Default: true
@@ -341,6 +361,8 @@ Set to false to have it not do this. This can be used to work around the
361
fact that some file systems don't support symlinks, even on ostensibly Unix
362
systems.
363
364
+
365
+
366
#### `fund`
367
368
* Default: true
@@ -350,6 +372,8 @@ When "true" displays the message at the end of each `npm install`
372
acknowledging the number of dependencies looking for funding. See [`npm
373
fund`](/cli/v9/commands/npm-fund) for details.
374
375
+
376
+
377
#### `dry-run`
378
379
* Default: false
@@ -363,6 +387,8 @@ commands that modify your local installation, eg, `install`, `update`,
387
Note: This is NOT honored by other network related commands, eg `dist-tags`,
388
`owner`, etc.
389
390
+
391
+
392
#### `workspace`
393
394
* Default:
@@ -425,6 +451,8 @@ When set file: protocol dependencies will be packed and installed as regular
451
dependencies instead of creating a symlink. This option has no effect on
452
workspaces.
453
454
+
455
+
456
### See Also
457
458
* [npm install](/cli/v9/commands/npm-install)
content/cli/v9/commands/npm-version.md
+14
@@ -53,6 +53,8 @@ alias: verison
53
Prevents throwing an error when `npm version` is used to set the new version
54
to the same value as the current version.
55
56
+
57
+
58
#### `commit-hooks`
59
60
* Default: true
@@ -60,6 +62,8 @@ to the same value as the current version.
62
63
Run git commit hooks when using the `npm version` command.
64
65
+
66
+
67
#### `git-tag-version`
68
69
* Default: true
@@ -68,6 +72,8 @@ Run git commit hooks when using the `npm version` command.
72
Tag the commit when using the `npm version` command. Setting this to false
73
results in no commit being made at all.
74
75
+
76
+
77
#### `json`
78
79
* Default: false
@@ -80,6 +86,8 @@ Whether or not to output JSON data, rather than the normal output.
86
87
Not supported by all npm commands.
88
89
+
90
+
91
#### `preid`
92
93
* Default: ""
@@ -88,6 +96,8 @@ Not supported by all npm commands.
96
The "prerelease identifier" to use as a prefix for the "prerelease" part of
97
a semver. Like the `rc` in `1.2.0-rc.8`.
98
99
+
100
+
101
#### `sign-git-tag`
102
103
* Default: false
@@ -99,6 +109,8 @@ If set to true, then the `npm version` command will tag the version using
109
Note that git requires you to have set up GPG keys in your git configs for
110
this to work properly.
111
112
+
113
+
114
#### `workspace`
115
116
* Default:
@@ -147,6 +159,8 @@ This value is not exported to the environment for child processes.
159
If set to true, the npm cli will run an update after operations that may
160
possibly change the workspaces installed to the `node_modules` folder.
161
162
+
163
+
164
#### `include-workspace-root`
165
166
* Default: false
content/cli/v9/commands/npm-view.md
+2
@@ -145,6 +145,8 @@ Whether or not to output JSON data, rather than the normal output.
145
146
Not supported by all npm commands.
147
148
+
149
+
150
#### `workspace`
151
152
* Default:
content/cli/v9/commands/npm-whoami.md
+2
@@ -63,6 +63,8 @@ If logged into a registry that uses Basic Auth, then simply print the
63
64
The base URL of the npm registry.
65
66
+
67
+
68
### See Also
69
70
* [npm config](/cli/v9/commands/npm-config)
content/cli/v9/commands/npm.md
+1
-1
@@ -31,7 +31,7 @@ Note: This command is unaware of workspaces.
31
32
### Version
33
34
-9.6.7
34
+9.7.1
35
36
### Description
37
content/cli/v9/using-npm/changelog.md
+39
@@ -17,6 +17,45 @@ redirect_from:
17
18
# Changelog
19
20
+## [9.7.1](https://github.com/npm/cli/compare/v9.7.0...v9.7.1) (2023-06-06)
21
+
22
+### Dependencies
23
+
24
+* [`7467ff6`](https://github.com/npm/cli/commit/7467ff680a3fffbf6b974c5779229c2e54e8515f) [#6518](https://github.com/npm/cli/pull/6518) `@npmcli/package-json@3.1.1`, `@npmcli/git@4.1.0`
25
+
26
+## [9.7.0](https://github.com/npm/cli/compare/v9.6.7...v9.7.0) (2023-05-31)
27
+
28
+### Features
29
+
30
+* [`a63a6d8`](https://github.com/npm/cli/commit/a63a6d8d6fd339d504ab94c0364ce7ee3d4e3775) [#6490](https://github.com/npm/cli/pull/6490) add provenanceFile option for libnpmpublish (@bdehamer)
31
+* [`2a8f4f2`](https://github.com/npm/cli/commit/2a8f4f203a47f60cc96312934927419a7d83c2f1) [#6490](https://github.com/npm/cli/pull/6490) add new exclusive config item publish-file (@wraithgar)
32
+* [`361e194`](https://github.com/npm/cli/commit/361e1945b5a34230690ccf37a14687d021e1dbce) [#6483](https://github.com/npm/cli/pull/6483) implement flag --prefer-dedupe for `npm install` (#6483) (@m4rch3n1ng)
33
+
34
+### Bug Fixes
35
+
36
+* [`38eb39b`](https://github.com/npm/cli/commit/38eb39b8068ab4e3b0a544234ac5df804469e3d8) [#6514](https://github.com/npm/cli/pull/6514) strip ansi characters from search results (#6514) (@wraithgar)
37
+* [`4b5ccfc`](https://github.com/npm/cli/commit/4b5ccfce376378521cb743bfbd32a724340e75b8) [#6477](https://github.com/npm/cli/pull/6477) make usage and completion static functions (#6477) (@lukekarrys)
38
+* [`4f39e8c`](https://github.com/npm/cli/commit/4f39e8c983e652b66f9c342b93694a29dc5a0b92) [#6479](https://github.com/npm/cli/pull/6479) refactor engines validation to lint syntax (#6479) (@lukekarrys)
39
+* [`f3cfe12`](https://github.com/npm/cli/commit/f3cfe129b2602e8f454acac572a51d8adc6c1111) [#6482](https://github.com/npm/cli/pull/6482) remove unused lib/npm relics (#6482) (@lukekarrys)
40
+* [`87de0c7`](https://github.com/npm/cli/commit/87de0c79cca0788d728095cfb537447745bada13) [#6472](https://github.com/npm/cli/pull/6472) move explore command to @npmcli/package-json (@wraithgar)
41
+* [`636e29e`](https://github.com/npm/cli/commit/636e29e2c887e7f197977e3215642b6778eb59de) [#6472](https://github.com/npm/cli/pull/6472) move to @npmcli/package-json where possible (@wraithgar)
42
+* [`37cc797`](https://github.com/npm/cli/commit/37cc797341100cd0a8371e80b25b938f166c9d71) [#6418](https://github.com/npm/cli/pull/6418) retrieve registry keys via TUF (#6418) (@bdehamer)
43
+
44
+### Documentation
45
+
46
+* [`83cd5bd`](https://github.com/npm/cli/commit/83cd5bd68aa6255c598b8dd3a544f16129885aee) [#6480](https://github.com/npm/cli/pull/6480) add global option for uninstall (#6480) (@m4rch3n1ng)
47
+* [`0400ce3`](https://github.com/npm/cli/commit/0400ce3c9d7af792c9931f1ba365e25b899833b6) [#6481](https://github.com/npm/cli/pull/6481) add cli params to `npm set`, `npm get` (#6481) (@m4rch3n1ng)
48
+* [`c3638ce`](https://github.com/npm/cli/commit/c3638ce613364aff50fedb493a97f1ee60211158) [#6468](https://github.com/npm/cli/pull/6468) remove `package-lock` option for `npm ci` (#6468) (@m4rch3n1ng)
49
+
50
+### Dependencies
51
+
52
+* [`060d587`](https://github.com/npm/cli/commit/060d587f6f5a60db0c02c319c1df1a11c146442f) `chalk@5.2.0`, `npm-audit-report@5.0.0`
53
+* [`fc52ca8`](https://github.com/npm/cli/commit/fc52ca8c0bd2aeb4e3885e5395ec647628bdd87c) [#6472](https://github.com/npm/cli/pull/6472) remove read-package-json-fast
54
+* [`3238aa7`](https://github.com/npm/cli/commit/3238aa78905bc90b404dc3075ec810884f8fd1c8) [#6472](https://github.com/npm/cli/pull/6472) remove read-package-json
55
+* [Workspace](https://github.com/npm/cli/releases/tag/config-v6.2.0): `@npmcli/config@6.2.0`
56
+* [Workspace](https://github.com/npm/cli/releases/tag/libnpmexec-v6.0.0): `libnpmexec@6.0.0`
57
+* [Workspace](https://github.com/npm/cli/releases/tag/libnpmpublish-v7.3.0): `libnpmpublish@7.3.0`
58
+
59
## [9.6.7](https://github.com/npm/cli/compare/v9.6.6...v9.6.7) (2023-05-17)
60
61
### Bug Fixes
content/cli/v9/using-npm/config.md
+304
-1
@@ -149,6 +149,8 @@ Warning: This should generally not be set via a command-line option. It is
149
safer to use a registry-provided authentication bearer token stored in the
150
~/.npmrc file by running `npm login`.
151
152
+
153
+
154
#### `access`
155
156
* Default: 'public' for new packages, existing packages it will not change the
@@ -165,6 +167,8 @@ packages. Specifying a value of `restricted` or `public` during publish will
167
change the access for an existing package the same way that `npm access set
168
status` would.
169
170
+
171
+
172
#### `all`
173
174
* Default: false
@@ -174,6 +178,8 @@ When running `npm outdated` and `npm ls`, setting `--all` will show all
178
outdated or installed packages, rather than only those directly depended
179
upon by the current project.
180
181
+
182
+
183
#### `allow-same-version`
184
185
* Default: false
@@ -182,6 +188,8 @@ upon by the current project.
188
Prevents throwing an error when `npm version` is used to set the new version
189
to the same value as the current version.
190
191
+
192
+
193
#### `audit`
194
195
* Default: true
@@ -192,6 +200,8 @@ default registry and all registries configured for scopes. See the
200
documentation for [`npm audit`](/cli/v9/commands/npm-audit) for details on what is
201
submitted.
202
203
+
204
+
205
#### `audit-level`
206
207
* Default: null
@@ -200,6 +210,8 @@ submitted.
210
The minimum level of vulnerability for `npm audit` to exit with a non-zero
211
exit code.
212
213
+
214
+
215
#### `auth-type`
216
217
* Default: "web"
@@ -208,6 +220,8 @@ exit code.
220
What authentication strategy to use with `login`. Note that if an `otp`
221
config is given, this value will always be set to `legacy`.
222
223
+
224
+
225
#### `before`
226
227
* Default: null
@@ -223,6 +237,8 @@ If the requested version is a `dist-tag` and the given tag does not pass the
237
will be used. For example, `foo@latest` might install `foo@1.2` even though
238
`latest` is `2.0`.
239
240
+
241
+
242
#### `bin-links`
243
244
* Default: true
@@ -235,6 +251,8 @@ Set to false to have it not do this. This can be used to work around the
251
fact that some file systems don't support symlinks, even on ostensibly Unix
252
systems.
253
254
+
255
+
256
#### `browser`
257
258
* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
@@ -247,6 +265,8 @@ terminal.
265
266
Set to `true` to use default system URL opener.
267
268
+
269
+
270
#### `ca`
271
272
* Default: null
@@ -273,6 +293,8 @@ ca[]="..."
293
294
See also the `strict-ssl` config.
295
296
+
297
+
298
#### `cache`
299
300
* Default: Windows: `%LocalAppData%\npm-cache`, Posix: `~/.npm`
@@ -280,6 +302,8 @@ See also the `strict-ssl` config.
302
303
The location of npm's cache directory.
304
305
+
306
+
307
#### `cafile`
308
309
* Default: null
@@ -289,6 +313,8 @@ A path to a file containing one or multiple Certificate Authority signing
313
certificates. Similar to the `ca` setting, but allows for multiple CA's, as
314
well as for the CA information to be stored in a file on disk.
315
316
+
317
+
318
#### `call`
319
320
* Default: ""
@@ -302,6 +328,7 @@ npm exec --package yo --package generator-node --call "yo node"
328
```
329
330
331
+
332
#### `cidr`
333
334
* Default: null
@@ -310,6 +337,8 @@ npm exec --package yo --package generator-node --call "yo node"
337
This is a list of CIDR address to be used when configuring limited access
338
tokens with the `npm token create` command.
339
340
+
341
+
342
#### `color`
343
344
* Default: true unless the NO_COLOR environ is set to something other than '0'
@@ -318,6 +347,8 @@ tokens with the `npm token create` command.
347
If false, never shows colors. If `"always"` then always shows colors. If
348
true, then only prints color codes for tty file descriptors.
349
350
+
351
+
352
#### `commit-hooks`
353
354
* Default: true
@@ -325,6 +356,8 @@ true, then only prints color codes for tty file descriptors.
356
357
Run git commit hooks when using the `npm version` command.
358
359
+
360
+
361
#### `depth`
362
363
* Default: `Infinity` if `--all` is set, otherwise `1`
@@ -335,6 +368,8 @@ The depth to go when recursing packages for `npm ls`.
368
If not set, `npm ls` will show only the immediate dependencies of the root
369
project. If `--all` is set, then npm will show all dependencies by default.
370
371
+
372
+
373
#### `description`
374
375
* Default: true
@@ -342,6 +377,8 @@ project. If `--all` is set, then npm will show all dependencies by default.
377
378
Show the description in `npm search`
379
380
+
381
+
382
#### `diff`
383
384
* Default:
@@ -349,6 +386,8 @@ Show the description in `npm search`
386
387
Define arguments to compare in `npm diff`.
388
389
+
390
+
391
#### `diff-dst-prefix`
392
393
* Default: "b/"
@@ -356,6 +395,8 @@ Define arguments to compare in `npm diff`.
395
396
Destination prefix to be used in `npm diff` output.
397
398
+
399
+
400
#### `diff-ignore-all-space`
401
402
* Default: false
@@ -363,6 +404,8 @@ Destination prefix to be used in `npm diff` output.
404
405
Ignore whitespace when comparing lines in `npm diff`.
406
407
+
408
+
409
#### `diff-name-only`
410
411
* Default: false
@@ -370,6 +413,8 @@ Ignore whitespace when comparing lines in `npm diff`.
413
414
Prints only filenames when using `npm diff`.
415
416
+
417
+
418
#### `diff-no-prefix`
419
420
* Default: false
@@ -380,6 +425,8 @@ Do not show any source or destination prefix in `npm diff` output.
425
Note: this causes `npm diff` to ignore the `--diff-src-prefix` and
426
`--diff-dst-prefix` configs.
427
428
+
429
+
430
#### `diff-src-prefix`
431
432
* Default: "a/"
@@ -387,6 +434,8 @@ Note: this causes `npm diff` to ignore the `--diff-src-prefix` and
434
435
Source prefix to be used in `npm diff` output.
436
437
+
438
+
439
#### `diff-text`
440
441
* Default: false
@@ -394,6 +443,8 @@ Source prefix to be used in `npm diff` output.
443
444
Treat all files as text in `npm diff`.
445
446
+
447
+
448
#### `diff-unified`
449
450
* Default: 3
@@ -401,6 +452,8 @@ Treat all files as text in `npm diff`.
452
453
The number of lines of context to print in `npm diff`.
454
455
+
456
+
457
#### `dry-run`
458
459
* Default: false
@@ -414,6 +467,8 @@ commands that modify your local installation, eg, `install`, `update`,
467
Note: This is NOT honored by other network related commands, eg `dist-tags`,
468
`owner`, etc.
469
470
+
471
+
472
#### `editor`
473
474
* Default: The EDITOR or VISUAL environment variables, or
@@ -422,6 +477,8 @@ Note: This is NOT honored by other network related commands, eg `dist-tags`,
477
478
The command to run for `npm edit` and `npm config edit`.
479
480
+
481
+
482
#### `engine-strict`
483
484
* Default: false
@@ -433,6 +490,8 @@ Node.js version.
490
491
This can be overridden by setting the `--force` flag.
492
493
+
494
+
495
#### `fetch-retries`
496
497
* Default: 2
@@ -444,6 +503,8 @@ from the registry.
503
npm will retry idempotent read requests to the registry in the case of
504
network failures or 5xx HTTP errors.
505
506
+
507
+
508
#### `fetch-retry-factor`
509
510
* Default: 10
@@ -451,6 +512,8 @@ network failures or 5xx HTTP errors.
512
513
The "factor" config for the `retry` module to use when fetching packages.
514
515
+
516
+
517
#### `fetch-retry-maxtimeout`
518
519
* Default: 60000 (1 minute)
@@ -459,6 +522,8 @@ The "factor" config for the `retry` module to use when fetching packages.
522
The "maxTimeout" config for the `retry` module to use when fetching
523
packages.
524
525
+
526
+
527
#### `fetch-retry-mintimeout`
528
529
* Default: 10000 (10 seconds)
@@ -467,6 +532,8 @@ packages.
532
The "minTimeout" config for the `retry` module to use when fetching
533
packages.
534
535
+
536
+
537
#### `fetch-timeout`
538
539
* Default: 300000 (5 minutes)
@@ -474,6 +541,8 @@ packages.
541
542
The maximum amount of time to wait for HTTP requests to complete.
543
544
+
545
+
546
#### `force`
547
548
* Default: false
@@ -500,6 +569,8 @@ mistakes, unnecessary performance degradation, and malicious input.
569
If you don't have a clear idea of what you want to do, it is strongly
570
recommended that you do not use this option!
571
572
+
573
+
574
#### `foreground-scripts`
575
576
* Default: false
@@ -512,6 +583,8 @@ input, output, and error with the main npm process.
583
Note that this will generally make installs run slower, and be much noisier,
584
but can be useful for debugging.
585
586
+
587
+
588
#### `format-package-lock`
589
590
* Default: true
@@ -520,6 +593,8 @@ but can be useful for debugging.
593
Format `package-lock.json` or `npm-shrinkwrap.json` as a human readable
594
file.
595
596
+
597
+
598
#### `fund`
599
600
* Default: true
@@ -529,6 +604,8 @@ When "true" displays the message at the end of each `npm install`
604
acknowledging the number of dependencies looking for funding. See [`npm
605
fund`](/cli/v9/commands/npm-fund) for details.
606
607
+
608
+
609
#### `git`
610
611
* Default: "git"
@@ -537,6 +614,8 @@ fund`](/cli/v9/commands/npm-fund) for details.
614
The command to use for git commands. If git is installed on the computer,
615
but is not in the `PATH`, then set this to the full path to the git binary.
616
617
+
618
+
619
#### `git-tag-version`
620
621
* Default: true
@@ -545,6 +624,8 @@ but is not in the `PATH`, then set this to the full path to the git binary.
624
Tag the commit when using the `npm version` command. Setting this to false
625
results in no commit being made at all.
626
627
+
628
+
629
#### `global`
630
631
* Default: false
@@ -559,6 +640,8 @@ folder instead of the current working directory. See
640
* bin files are linked to `{prefix}/bin`
641
* man pages are linked to `{prefix}/share/man`
642
643
+
644
+
645
#### `globalconfig`
646
647
* Default: The global --prefix setting plus 'etc/npmrc'. For example,
@@ -567,6 +650,8 @@ folder instead of the current working directory. See
650
651
The config file to read for global config options.
652
653
+
654
+
655
#### `heading`
656
657
* Default: "npm"
@@ -574,6 +659,8 @@ The config file to read for global config options.
659
660
The string that starts all the debugging log output.
661
662
+
663
+
664
#### `https-proxy`
665
666
* Default: null
@@ -584,6 +671,8 @@ A proxy to use for outgoing https requests. If the `HTTPS_PROXY` or
671
proxy settings will be honored by the underlying `make-fetch-happen`
672
library.
673
674
+
675
+
676
#### `if-present`
677
678
* Default: false
@@ -610,6 +699,8 @@ Note that commands explicitly intended to run a particular script, such as
699
will still run their intended script if `ignore-scripts` is set, but they
700
will *not* run any pre- or post-scripts.
701
702
+
703
+
704
#### `include`
705
706
* Default:
@@ -622,6 +713,8 @@ This is the inverse of `--omit=<type>`.
713
Dependency types specified in `--include` will not be omitted, regardless of
714
the order in which omit/include are specified on the command-line.
715
716
+
717
+
718
#### `include-staged`
719
720
* Default: false
@@ -632,6 +725,8 @@ Allow installing "staged" published packages, as defined by [npm RFC PR
725
726
This is experimental, and not implemented by the npm public registry.
727
728
+
729
+
730
#### `include-workspace-root`
731
732
* Default: false
@@ -652,6 +747,8 @@ This value is not exported to the environment for child processes.
747
748
The value `npm init` should use by default for the package author's email.
749
750
+
751
+
752
#### `init-author-name`
753
754
* Default: ""
@@ -659,6 +756,8 @@ The value `npm init` should use by default for the package author's email.
756
757
The value `npm init` should use by default for the package author's name.
758
759
+
760
+
761
#### `init-author-url`
762
763
* Default: ""
@@ -667,6 +766,8 @@ The value `npm init` should use by default for the package author's name.
766
The value `npm init` should use by default for the package author's
767
homepage.
768
769
+
770
+
771
#### `init-license`
772
773
* Default: "ISC"
@@ -674,6 +775,8 @@ homepage.
775
776
The value `npm init` should use by default for the package license.
777
778
+
779
+
780
#### `init-module`
781
782
* Default: "~/.npm-init.js"
@@ -684,6 +787,8 @@ documentation for the
787
[init-package-json](https://github.com/npm/init-package-json) module for
788
more information, or [npm init](/cli/v9/commands/npm-init).
789
790
+
791
+
792
#### `init-version`
793
794
* Default: "1.0.0"
@@ -692,6 +797,8 @@ more information, or [npm init](/cli/v9/commands/npm-init).
797
The value that `npm init` should use by default for the package version
798
number, if not already set in package.json.
799
800
+
801
+
802
#### `install-links`
803
804
* Default: false
@@ -701,6 +808,8 @@ When set file: protocol dependencies will be packed and installed as regular
808
dependencies instead of creating a symlink. This option has no effect on
809
workspaces.
810
811
+
812
+
813
#### `install-strategy`
814
815
* Default: "hoisted"
@@ -713,6 +822,8 @@ place, no hoisting. shallow (formerly --global-style) only install direct
822
deps at top-level. linked: (experimental) install in node_modules/.store,
823
link in place, unhoisted.
824
825
+
826
+
827
#### `json`
828
829
* Default: false
@@ -725,6 +836,8 @@ Whether or not to output JSON data, rather than the normal output.
836
837
Not supported by all npm commands.
838
839
+
840
+
841
#### `legacy-peer-deps`
842
843
* Default: false
@@ -743,6 +856,8 @@ This differs from `--omit=peer`, in that `--omit=peer` will avoid unpacking
856
Use of `legacy-peer-deps` is not recommended, as it will not enforce the
857
`peerDependencies` contract that meta-dependencies may rely on.
858
859
+
860
+
861
#### `link`
862
863
* Default: false
@@ -750,6 +865,8 @@ Use of `legacy-peer-deps` is not recommended, as it will not enforce the
865
866
Used with `npm ls`, limiting output to only those packages that are linked.
867
868
+
869
+
870
#### `local-address`
871
872
* Default: null
@@ -758,6 +875,8 @@ Used with `npm ls`, limiting output to only those packages that are linked.
875
The IP address of the local interface to use when making connections to the
876
npm registry. Must be IPv4 in versions of Node prior to 0.12.
877
878
+
879
+
880
#### `location`
881
882
* Default: "user" unless `--global` is passed, which will also set this value
@@ -775,6 +894,8 @@ instead of the current working directory. See
894
* bin files are linked to `{prefix}/bin`
895
* man pages are linked to `{prefix}/share/man`
896
897
+
898
+
899
#### `lockfile-version`
900
901
* Default: Version 3 if no lockfile, auto-converting v1 lockfiles to v3,
@@ -797,6 +918,8 @@ determinism and interoperability, at the expense of more bytes on disk.
918
disk than lockfile version 2, but not interoperable with older npm versions.
919
Ideal if all users are on npm version 7 and higher.
920
921
+
922
+
923
#### `loglevel`
924
925
* Default: "notice"
@@ -811,6 +934,8 @@ Any logs of a higher level than the setting are shown. The default is
934
935
See also the `foreground-scripts` config.
936
937
+
938
+
939
#### `logs-dir`
940
941
* Default: A directory named `_logs` inside the cache
@@ -819,6 +944,8 @@ See also the `foreground-scripts` config.
944
The location of npm's log directory. See [`npm logging`](/cli/v9/using-npm/logging)
945
for more information.
946
947
+
948
+
949
#### `logs-max`
950
951
* Default: 10
@@ -828,6 +955,8 @@ The maximum number of log files to store.
955
956
If set to 0, no log files will be written for the current run.
957
958
+
959
+
960
#### `long`
961
962
* Default: false
@@ -835,6 +964,8 @@ If set to 0, no log files will be written for the current run.
964
965
Show extended information in `ls`, `search`, and `help-search`.
966
967
+
968
+
969
#### `maxsockets`
970
971
* Default: 15
@@ -843,6 +974,8 @@ Show extended information in `ls`, `search`, and `help-search`.
974
The maximum number of connections to use per origin (protocol/host/port
975
combination).
976
977
+
978
+
979
#### `message`
980
981
* Default: "%s"
@@ -852,6 +985,8 @@ Commit message which is used by `npm version` when creating version commit.
985
986
Any "%s" in the message will be replaced with the version number.
987
988
+
989
+
990
#### `node-options`
991
992
* Default: null
@@ -861,6 +996,8 @@ Options to pass through to Node.js via the `NODE_OPTIONS` environment
996
variable. This does not impact how npm itself is executed but it does impact
997
how lifecycle scripts are called.
998
999
+
1000
+
1001
#### `noproxy`
1002
1003
* Default: The value of the NO_PROXY environment variable
@@ -870,6 +1007,8 @@ Domain extensions that should bypass any proxies.
1007
1008
Also accepts a comma-delimited string.
1009
1010
+
1011
+
1012
#### `offline`
1013
1014
* Default: false
@@ -878,6 +1017,8 @@ Also accepts a comma-delimited string.
1017
Force offline mode: no network requests will be done during install. To
1018
allow the CLI to fill in missing cache data, see `--prefer-offline`.
1019
1020
+
1021
+
1022
#### `omit`
1023
1024
* Default: 'dev' if the `NODE_ENV` environment variable is set to
@@ -896,6 +1037,8 @@ it will be included.
1037
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment
1038
variable will be set to `'production'` for all lifecycle scripts.
1039
1040
+
1041
+
1042
#### `omit-lockfile-registry-resolved`
1043
1044
* Default: false
@@ -906,6 +1049,8 @@ registry dependencies. Subsequent installs will need to resolve tarball
1049
endpoints with the configured registry, likely resulting in a longer install
1050
time.
1051
1052
+
1053
+
1054
#### `otp`
1055
1056
* Default: null
@@ -917,6 +1062,8 @@ when publishing or changing package permissions with `npm access`.
1062
If not set, and a registry response fails with a challenge for a one-time
1063
password, npm will prompt on the command line for one.
1064
1065
+
1066
+
1067
#### `pack-destination`
1068
1069
* Default: "."
@@ -924,6 +1071,8 @@ password, npm will prompt on the command line for one.
1071
1072
Directory in which `npm pack` will save tarballs.
1073
1074
+
1075
+
1076
#### `package`
1077
1078
* Default:
@@ -931,6 +1080,8 @@ Directory in which `npm pack` will save tarballs.
1080
1081
The package or packages to install for [`npm exec`](/cli/v9/commands/npm-exec)
1082
1083
+
1084
+
1085
#### `package-lock`
1086
1087
* Default: true
@@ -939,7 +1090,7 @@ The package or packages to install for [`npm exec`](/cli/v9/commands/npm-exec)
1090
If set to false, then ignore `package-lock.json` files when installing. This
1091
will also prevent _writing_ `package-lock.json` if `save` is true.
1092
942
-This configuration does not affect `npm ci`.
1093
+
1094
1095
#### `package-lock-only`
1096
@@ -955,6 +1106,8 @@ instead of checking `node_modules` and downloading dependencies.
1106
For `list` this means the output will be based on the tree described by the
1107
`package-lock.json`, rather than the contents of `node_modules`.
1108
1109
+
1110
+
1111
#### `parseable`
1112
1113
* Default: false
@@ -963,6 +1116,18 @@ For `list` this means the output will be based on the tree described by the
1116
Output parseable results from commands that write to standard output. For
1117
`npm search`, this will be tab-separated table format.
1118
1119
+
1120
+
1121
+#### `prefer-dedupe`
1122
+
1123
+* Default: false
1124
+* Type: Boolean
1125
+
1126
+Prefer to deduplicate packages if possible, rather than choosing a newer
1127
+version of a dependency.
1128
+
1129
+
1130
+
1131
#### `prefer-offline`
1132
1133
* Default: false
@@ -972,6 +1137,8 @@ If true, staleness checks for cached data will be bypassed, but missing data
1137
will be requested from the server. To force full offline mode, use
1138
`--offline`.
1139
1140
+
1141
+
1142
#### `prefer-online`
1143
1144
* Default: false
@@ -980,6 +1147,8 @@ will be requested from the server. To force full offline mode, use
1147
If true, staleness checks for cached data will be forced, making the CLI
1148
look for updates immediately even for fresh package data.
1149
1150
+
1151
+
1152
#### `prefix`
1153
1154
* Default: In global mode, the folder where the node executable is installed.
@@ -990,6 +1159,8 @@ look for updates immediately even for fresh package data.
1159
The location to install global items. If set on the command line, then it
1160
forces non-global commands to run in the specified folder.
1161
1162
+
1163
+
1164
#### `preid`
1165
1166
* Default: ""
@@ -998,6 +1169,8 @@ forces non-global commands to run in the specified folder.
1169
The "prerelease identifier" to use as a prefix for the "prerelease" part of
1170
a semver. Like the `rc` in `1.2.0-rc.8`.
1171
1172
+
1173
+
1174
#### `progress`
1175
1176
* Default: `true` unless running in a known CI system
@@ -1008,6 +1181,8 @@ operations, if `process.stderr` is a TTY.
1181
1182
Set to `false` to suppress the progress bar.
1183
1184
+
1185
+
1186
#### `provenance`
1187
1188
* Default: false
@@ -1016,6 +1191,17 @@ Set to `false` to suppress the progress bar.
1191
When publishing from a supported cloud CI/CD system, the package will be
1192
publicly linked to where it was built and published from.
1193
1194
+This config can not be used with: `provenance-file`
1195
+
1196
+#### `provenance-file`
1197
+
1198
+* Default: null
1199
+* Type: Path
1200
+
1201
+When publishing, the provenance bundle at the given path will be used.
1202
+
1203
+This config can not be used with: `provenance`
1204
+
1205
#### `proxy`
1206
1207
* Default: null
@@ -1025,6 +1211,8 @@ A proxy to use for outgoing http requests. If the `HTTP_PROXY` or
1211
`http_proxy` environment variables are set, proxy settings will be honored
1212
by the underlying `request` library.
1213
1214
+
1215
+
1216
#### `read-only`
1217
1218
* Default: false
@@ -1033,6 +1221,8 @@ by the underlying `request` library.
1221
This is used to mark a token as unable to publish when configuring limited
1222
access tokens with the `npm token create` command.
1223
1224
+
1225
+
1226
#### `rebuild-bundle`
1227
1228
* Default: true
@@ -1040,6 +1230,8 @@ access tokens with the `npm token create` command.
1230
1231
Rebuild bundled dependencies after installation.
1232
1233
+
1234
+
1235
#### `registry`
1236
1237
* Default: "https://registry.npmjs.org/"
@@ -1047,6 +1239,8 @@ Rebuild bundled dependencies after installation.
1239
1240
The base URL of the npm registry.
1241
1242
+
1243
+
1244
#### `replace-registry-host`
1245
1246
* Default: "npmjs"
@@ -1062,6 +1256,8 @@ registry host with the configured host every time.
1256
1257
You may also specify a bare hostname (e.g., "registry.npmjs.org").
1258
1259
+
1260
+
1261
#### `save`
1262
1263
* Default: `true` unless when using `npm update` where it defaults to `false`
@@ -1074,6 +1270,8 @@ When used with the `npm rm` command, removes the dependency from
1270
1271
Will also prevent writing to `package-lock.json` if set to `false`.
1272
1273
+
1274
+
1275
#### `save-bundle`
1276
1277
* Default: false
@@ -1085,6 +1283,8 @@ If a package would be saved at install time by the use of `--save`,
1283
1284
Ignored if `--save-peer` is set, since peerDependencies cannot be bundled.
1285
1286
+
1287
+
1288
#### `save-dev`
1289
1290
* Default: false
@@ -1092,6 +1292,8 @@ Ignored if `--save-peer` is set, since peerDependencies cannot be bundled.
1292
1293
Save installed packages to a package.json file as `devDependencies`.
1294
1295
+
1296
+
1297
#### `save-exact`
1298
1299
* Default: false
@@ -1100,6 +1302,8 @@ Save installed packages to a package.json file as `devDependencies`.
1302
Dependencies saved to package.json will be configured with an exact version
1303
rather than using npm's default semver range operator.
1304
1305
+
1306
+
1307
#### `save-optional`
1308
1309
* Default: false
@@ -1107,6 +1311,8 @@ rather than using npm's default semver range operator.
1311
1312
Save installed packages to a package.json file as `optionalDependencies`.
1313
1314
+
1315
+
1316
#### `save-peer`
1317
1318
* Default: false
@@ -1114,6 +1320,8 @@ Save installed packages to a package.json file as `optionalDependencies`.
1320
1321
Save installed packages to a package.json file as `peerDependencies`
1322
1323
+
1324
+
1325
#### `save-prefix`
1326
1327
* Default: "^"
@@ -1127,6 +1335,8 @@ to `^1.2.3` which allows minor upgrades for that package, but after `npm
1335
config set save-prefix='~'` it would be set to `~1.2.3` which only allows
1336
patch upgrades.
1337
1338
+
1339
+
1340
#### `save-prod`
1341
1342
* Default: false
@@ -1139,6 +1349,8 @@ you want to move it to be a non-optional production dependency.
1349
This is the default behavior if `--save` is true, and neither `--save-dev`
1350
or `--save-optional` are true.
1351
1352
+
1353
+
1354
#### `scope`
1355
1356
* Default: the scope of the current project, if any, or ""
@@ -1169,6 +1381,7 @@ npm init --scope=@foo --yes
1381
```
1382
1383
1384
+
1385
#### `script-shell`
1386
1387
* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
@@ -1177,6 +1390,8 @@ npm init --scope=@foo --yes
1390
The shell to use for scripts run with the `npm exec`, `npm run` and `npm
1391
init <package-spec>` commands.
1392
1393
+
1394
+
1395
#### `searchexclude`
1396
1397
* Default: ""
@@ -1184,6 +1399,8 @@ init <package-spec>` commands.
1399
1400
Space-separated options that limit the results from search.
1401
1402
+
1403
+
1404
#### `searchlimit`
1405
1406
* Default: 20
@@ -1192,6 +1409,8 @@ Space-separated options that limit the results from search.
1409
Number of items to limit search results to. Will not apply at all to legacy
1410
searches.
1411
1412
+
1413
+
1414
#### `searchopts`
1415
1416
* Default: ""
@@ -1199,6 +1418,8 @@ searches.
1418
1419
Space-separated options that are always passed to search.
1420
1421
+
1422
+
1423
#### `searchstaleness`
1424
1425
* Default: 900
@@ -1207,6 +1428,8 @@ Space-separated options that are always passed to search.
1428
The age of the cache, in seconds, before another registry request is made if
1429
using legacy search endpoint.
1430
1431
+
1432
+
1433
#### `shell`
1434
1435
* Default: SHELL environment variable, or "bash" on Posix, or "cmd.exe" on
@@ -1215,6 +1438,8 @@ using legacy search endpoint.
1438
1439
The shell to run for the `npm explore` command.
1440
1441
+
1442
+
1443
#### `sign-git-commit`
1444
1445
* Default: false
@@ -1226,6 +1451,8 @@ version using `-S` to add a signature.
1451
Note that git requires you to have set up GPG keys in your git configs for
1452
this to work properly.
1453
1454
+
1455
+
1456
#### `sign-git-tag`
1457
1458
* Default: false
@@ -1237,6 +1464,8 @@ If set to true, then the `npm version` command will tag the version using
1464
Note that git requires you to have set up GPG keys in your git configs for
1465
this to work properly.
1466
1467
+
1468
+
1469
#### `strict-peer-deps`
1470
1471
* Default: false
@@ -1256,6 +1485,8 @@ When such an override is performed, a warning is printed, explaining the
1485
conflict and the packages involved. If `--strict-peer-deps` is set, then
1486
this warning is treated as a failure.
1487
1488
+
1489
+
1490
#### `strict-ssl`
1491
1492
* Default: true
@@ -1266,6 +1497,8 @@ via https.
1497
1498
See also the `ca` config.
1499
1500
+
1501
+
1502
#### `tag`
1503
1504
* Default: "latest"
@@ -1280,6 +1513,8 @@ command, if no explicit tag is given.
1513
When used by the `npm diff` command, this is the tag used to fetch the
1514
tarball that will be compared with the local files by default.
1515
1516
+
1517
+
1518
#### `tag-version-prefix`
1519
1520
* Default: "v"
@@ -1293,6 +1528,8 @@ Because other tools may rely on the convention that npm version tags look
1528
like `v1.0.0`, _only use this property if it is absolutely necessary_. In
1529
particular, use care when overriding this setting for public packages.
1530
1531
+
1532
+
1533
#### `timing`
1534
1535
* Default: false
@@ -1307,6 +1544,8 @@ You can quickly view it with this [json](https://npm.im/json) command line:
1544
Timing information will also be reported in the terminal. To suppress this
1545
while still writing the timing file, use `--silent`.
1546
1547
+
1548
+
1549
#### `umask`
1550
1551
* Default: 0
@@ -1327,6 +1566,8 @@ Thus, the effective default umask value on most POSIX systems is 0o22,
1566
meaning that folders and executables are created with a mode of 0o755 and
1567
other files are created with a mode of 0o644.
1568
1569
+
1570
+
1571
#### `unicode`
1572
1573
* Default: false on windows, true on mac/unix systems with a unicode locale,
@@ -1336,6 +1577,8 @@ other files are created with a mode of 0o644.
1577
When set to true, npm uses unicode characters in the tree output. When
1578
false, it uses ascii characters instead of unicode glyphs.
1579
1580
+
1581
+
1582
#### `update-notifier`
1583
1584
* Default: true
@@ -1344,6 +1587,8 @@ false, it uses ascii characters instead of unicode glyphs.
1587
Set to false to suppress the update notification when using an older version
1588
of npm than the latest.
1589
1590
+
1591
+
1592
#### `usage`
1593
1594
* Default: false
@@ -1351,6 +1596,8 @@ of npm than the latest.
1596
1597
Show short usage output about the command specified.
1598
1599
+
1600
+
1601
#### `user-agent`
1602
1603
* Default: "npm/{npm-version} node/{node-version} {platform} {arch}
@@ -1369,6 +1616,8 @@ their actual counterparts:
1616
* `{ci}` - The value of the `ci-name` config, if set, prefixed with `ci/`, or
1617
an empty string if `ci-name` is empty.
1618
1619
+
1620
+
1621
#### `userconfig`
1622
1623
* Default: "~/.npmrc"
@@ -1380,6 +1629,8 @@ This may be overridden by the `npm_config_userconfig` environment variable
1629
or the `--userconfig` command line option, but may _not_ be overridden by
1630
settings in the `globalconfig` file.
1631
1632
+
1633
+
1634
#### `version`
1635
1636
* Default: false
@@ -1389,6 +1640,8 @@ If true, output the npm version and exit successfully.
1640
1641
Only relevant when specified explicitly on the command line.
1642
1643
+
1644
+
1645
#### `versions`
1646
1647
* Default: false
@@ -1400,6 +1653,8 @@ exists, and exit successfully.
1653
1654
Only relevant when specified explicitly on the command line.
1655
1656
+
1657
+
1658
#### `viewer`
1659
1660
* Default: "man" on Posix, "browser" on Windows
@@ -1409,6 +1664,8 @@ The program to use to view help content.
1664
1665
Set to `"browser"` to view html help content in the default web browser.
1666
1667
+
1668
+
1669
#### `which`
1670
1671
* Default: null
@@ -1416,6 +1673,8 @@ Set to `"browser"` to view html help content in the default web browser.
1673
1674
If there are multiple funding sources, which 1-indexed source URL to open.
1675
1676
+
1677
+
1678
#### `workspace`
1679
1680
* Default:
@@ -1464,6 +1723,8 @@ This value is not exported to the environment for child processes.
1723
If set to true, the npm cli will run an update after operations that may
1724
possibly change the workspaces installed to the `node_modules` folder.
1725
1726
+
1727
+
1728
#### `yes`
1729
1730
* Default: null
@@ -1472,6 +1733,8 @@ possibly change the workspaces installed to the `node_modules` folder.
1733
Automatically answer "yes" to any prompts that npm might print on the
1734
command line.
1735
1736
+
1737
+
1738
#### `also`
1739
1740
* Default: null
@@ -1480,6 +1743,8 @@ command line.
1743
1744
When set to `dev` or `development`, this is an alias for `--include=dev`.
1745
1746
+
1747
+
1748
#### `cache-max`
1749
1750
* Default: Infinity
@@ -1488,6 +1753,8 @@ When set to `dev` or `development`, this is an alias for `--include=dev`.
1753
1754
`--cache-max=0` is an alias for `--prefer-online`
1755
1756
+
1757
+
1758
#### `cache-min`
1759
1760
* Default: 0
@@ -1496,6 +1763,8 @@ When set to `dev` or `development`, this is an alias for `--include=dev`.
1763
1764
`--cache-min=9999 (or bigger)` is an alias for `--prefer-offline`.
1765
1766
+
1767
+
1768
#### `cert`
1769
1770
* Default: null
@@ -1517,6 +1786,8 @@ It is _not_ the path to a certificate file, though you can set a
1786
registry-scoped "certfile" path like
1787
"//other-registry.tld/:certfile=/path/to/cert.pem".
1788
1789
+
1790
+
1791
#### `ci-name`
1792
1793
* Default: The name of the current CI system, or `null` when not on a known CI
@@ -1529,6 +1800,8 @@ The name of a continuous integration system. If not set explicitly, npm will
1800
detect the current CI environment using the
1801
[`ci-info`](http://npm.im/ci-info) module.
1802
1803
+
1804
+
1805
#### `dev`
1806
1807
* Default: false
@@ -1537,6 +1810,8 @@ detect the current CI environment using the
1810
1811
Alias for `--include=dev`.
1812
1813
+
1814
+
1815
#### `global-style`
1816
1817
* Default: false
@@ -1547,6 +1822,8 @@ Alias for `--include=dev`.
1822
Only install direct dependencies in the top level `node_modules`, but hoist
1823
on deeper dependencies. Sets `--install-strategy=shallow`.
1824
1825
+
1826
+
1827
#### `init.author.email`
1828
1829
* Default: ""
@@ -1555,6 +1832,8 @@ on deeper dependencies. Sets `--install-strategy=shallow`.
1832
1833
Alias for `--init-author-email`
1834
1835
+
1836
+
1837
#### `init.author.name`
1838
1839
* Default: ""
@@ -1563,6 +1842,8 @@ Alias for `--init-author-email`
1842
1843
Alias for `--init-author-name`
1844
1845
+
1846
+
1847
#### `init.author.url`
1848
1849
* Default: ""
@@ -1571,6 +1852,8 @@ Alias for `--init-author-name`
1852
1853
Alias for `--init-author-url`
1854
1855
+
1856
+
1857
#### `init.license`
1858
1859
* Default: "ISC"
@@ -1579,6 +1862,8 @@ Alias for `--init-author-url`
1862
1863
Alias for `--init-license`
1864
1865
+
1866
+
1867
#### `init.module`
1868
1869
* Default: "~/.npm-init.js"
@@ -1587,6 +1872,8 @@ Alias for `--init-license`
1872
1873
Alias for `--init-module`
1874
1875
+
1876
+
1877
#### `init.version`
1878
1879
* Default: "1.0.0"
@@ -1595,6 +1882,8 @@ Alias for `--init-module`
1882
1883
Alias for `--init-version`
1884
1885
+
1886
+
1887
#### `key`
1888
1889
* Default: null
@@ -1614,6 +1903,8 @@ key="-----BEGIN PRIVATE KEY-----\nXXXX\nXXXX\n-----END PRIVATE KEY-----"
1903
It is _not_ the path to a key file, though you can set a registry-scoped
1904
"keyfile" path like "//other-registry.tld/:keyfile=/path/to/key.pem".
1905
1906
+
1907
+
1908
#### `legacy-bundling`
1909
1910
* Default: false
@@ -1626,6 +1917,8 @@ the same manner that they are depended on. This may cause very deep
1917
directory structures and duplicate package installs as there is no
1918
de-duplicating. Sets `--install-strategy=nested`.
1919
1920
+
1921
+
1922
#### `only`
1923
1924
* Default: null
@@ -1634,6 +1927,8 @@ de-duplicating. Sets `--install-strategy=nested`.
1927
1928
When set to `prod` or `production`, this is an alias for `--omit=dev`.
1929
1930
+
1931
+
1932
#### `optional`
1933
1934
* Default: null
@@ -1645,6 +1940,8 @@ Default value does install optional deps unless otherwise omitted.
1940
1941
Alias for --include=optional or --omit=optional
1942
1943
+
1944
+
1945
#### `production`
1946
1947
* Default: null
@@ -1653,6 +1950,8 @@ Alias for --include=optional or --omit=optional
1950
1951
Alias for `--omit=dev`
1952
1953
+
1954
+
1955
#### `shrinkwrap`
1956
1957
* Default: true
@@ -1661,6 +1960,8 @@ Alias for `--omit=dev`
1960
1961
Alias for --package-lock
1962
1963
+
1964
+
1965
#### `tmp`
1966
1967
* Default: The value returned by the Node.js `os.tmpdir()` method
@@ -1673,6 +1974,8 @@ Alias for --package-lock
1974
Historically, the location where temporary files were stored. No longer
1975
relevant.
1976
1977
+
1978
+
1979
### See also
1980
1981
* [npm config](/cli/v9/commands/npm-config)
src/theme/nav.yml
+1
-1
@@ -1055,7 +1055,7 @@
1055
- title: Changelog
1056
url: /cli/v8/using-npm/changelog
1057
description: Changelog notes for each version
1058
- - title: Version 9.6.7 (Latest Release)
1058
+ - title: Version 9.7.1 (Latest Release)
1059
shortName: v9
1060
url: /cli/v9
1061
default: true