Skip to content

Commit 8c9313d

Browse files
committed
CLI documentation update from CI
1 parent 07c1279 commit 8c9313d

19 files changed

+664
-4
lines changed

Diff for: content/cli/v10/commands/npm-audit.md

+31
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ vulnerability is found. It may be useful in CI environments to include the
6363
will cause the command to fail. This option does not filter the report
6464
output, it simply changes the command's failure threshold.
6565

66+
### Package lock
67+
68+
By default npm requires a package-lock or shrinkwrap in order to run the
69+
audit. You can bypass the package lock with `--no-package-lock` but be
70+
aware the results may be different with every run, since npm will
71+
re-build the dependency tree each time.
72+
6673
### Audit Signatures
6774

6875
To ensure the integrity of packages you download from the public npm registry, or any registry that supports signatures, you can verify the registry signatures of downloaded packages using the npm CLI.
@@ -352,6 +359,16 @@ For `list` this means the output will be based on the tree described by the
352359

353360

354361

362+
#### `package-lock`
363+
364+
* Default: true
365+
* Type: Boolean
366+
367+
If set to false, then ignore `package-lock.json` files when installing. This
368+
will also prevent _writing_ `package-lock.json` if `save` is true.
369+
370+
371+
355372
#### `omit`
356373

357374
* Default: 'dev' if the `NODE_ENV` environment variable is set to
@@ -372,6 +389,20 @@ variable will be set to `'production'` for all lifecycle scripts.
372389

373390

374391

392+
#### `include`
393+
394+
* Default:
395+
* Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
396+
397+
Option that allows for defining which types of dependencies to install.
398+
399+
This is the inverse of `--omit=<type>`.
400+
401+
Dependency types specified in `--include` will not be omitted, regardless of
402+
the order in which omit/include are specified on the command-line.
403+
404+
405+
375406
#### `foreground-scripts`
376407

377408
* Default: false

Diff for: content/cli/v10/commands/npm-ci.md

+14
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,20 @@ variable will be set to `'production'` for all lifecycle scripts.
163163

164164

165165

166+
#### `include`
167+
168+
* Default:
169+
* Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
170+
171+
Option that allows for defining which types of dependencies to install.
172+
173+
This is the inverse of `--omit=<type>`.
174+
175+
Dependency types specified in `--include` will not be omitted, regardless of
176+
the order in which omit/include are specified on the command-line.
177+
178+
179+
166180
#### `strict-peer-deps`
167181

168182
* Default: false

Diff for: content/cli/v10/commands/npm-dedupe.md

+14
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,20 @@ variable will be set to `'production'` for all lifecycle scripts.
199199
200200
201201
202+
#### `include`
203+
204+
* Default:
205+
* Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
206+
207+
Option that allows for defining which types of dependencies to install.
208+
209+
This is the inverse of `--omit=<type>`.
210+
211+
Dependency types specified in `--include` will not be omitted, regardless of
212+
the order in which omit/include are specified on the command-line.
213+
214+
215+
202216
#### `ignore-scripts`
203217
204218
* Default: false

Diff for: content/cli/v10/commands/npm-doctor.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: npm-doctor
33
section: 1
4-
description: Check your npm environment
4+
description: Check the health of your npm environment
55
github_repo: npm/cli
66
github_branch: latest
77
github_path: docs/lib/content/commands/npm-doctor.md

Diff for: content/cli/v10/commands/npm-find-dupes.md

+14
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,20 @@ variable will be set to `'production'` for all lifecycle scripts.
139139

140140

141141

142+
#### `include`
143+
144+
* Default:
145+
* Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
146+
147+
Option that allows for defining which types of dependencies to install.
148+
149+
This is the inverse of `--omit=<type>`.
150+
151+
Dependency types specified in `--include` will not be omitted, regardless of
152+
the order in which omit/include are specified on the command-line.
153+
154+
155+
142156
#### `ignore-scripts`
143157

144158
* Default: false

Diff for: content/cli/v10/commands/npm-init.md

+50
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,56 @@ dot to represent the current directory in that context, e.g: `react-app .`:
187187

188188
### Configuration
189189

190+
#### `init-author-name`
191+
192+
* Default: ""
193+
* Type: String
194+
195+
The value `npm init` should use by default for the package author's name.
196+
197+
198+
199+
#### `init-author-url`
200+
201+
* Default: ""
202+
* Type: "" or URL
203+
204+
The value `npm init` should use by default for the package author's
205+
homepage.
206+
207+
208+
209+
#### `init-license`
210+
211+
* Default: "ISC"
212+
* Type: String
213+
214+
The value `npm init` should use by default for the package license.
215+
216+
217+
218+
#### `init-module`
219+
220+
* Default: "~/.npm-init.js"
221+
* Type: Path
222+
223+
A module that will be loaded by the `npm init` command. See the
224+
documentation for the
225+
[init-package-json](https://github.com/npm/init-package-json) module for
226+
more information, or [npm init](/cli/v10/commands/npm-init).
227+
228+
229+
230+
#### `init-version`
231+
232+
* Default: "1.0.0"
233+
* Type: SemVer string
234+
235+
The value that `npm init` should use by default for the package version
236+
number, if not already set in package.json.
237+
238+
239+
190240
#### `yes`
191241

192242
* Default: null

Diff for: content/cli/v10/commands/npm-install-ci-test.md

+14
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,20 @@ variable will be set to `'production'` for all lifecycle scripts.
109109

110110

111111

112+
#### `include`
113+
114+
* Default:
115+
* Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
116+
117+
Option that allows for defining which types of dependencies to install.
118+
119+
This is the inverse of `--omit=<type>`.
120+
121+
Dependency types specified in `--include` will not be omitted, regardless of
122+
the order in which omit/include are specified on the command-line.
123+
124+
125+
112126
#### `strict-peer-deps`
113127

114128
* Default: false

Diff for: content/cli/v10/commands/npm-install-test.md

+14
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,20 @@ variable will be set to `'production'` for all lifecycle scripts.
150150

151151

152152

153+
#### `include`
154+
155+
* Default:
156+
* Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
157+
158+
Option that allows for defining which types of dependencies to install.
159+
160+
This is the inverse of `--omit=<type>`.
161+
162+
Dependency types specified in `--include` will not be omitted, regardless of
163+
the order in which omit/include are specified on the command-line.
164+
165+
166+
153167
#### `strict-peer-deps`
154168

155169
* Default: false

Diff for: content/cli/v10/commands/npm-install.md

+14
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,20 @@ variable will be set to `'production'` for all lifecycle scripts.
540540
541541
542542
543+
#### `include`
544+
545+
* Default:
546+
* Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
547+
548+
Option that allows for defining which types of dependencies to install.
549+
550+
This is the inverse of `--omit=<type>`.
551+
552+
Dependency types specified in `--include` will not be omitted, regardless of
553+
the order in which omit/include are specified on the command-line.
554+
555+
556+
543557
#### `strict-peer-deps`
544558
545559
* Default: false

Diff for: content/cli/v10/commands/npm-link.md

+14
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,20 @@ variable will be set to `'production'` for all lifecycle scripts.
272272

273273

274274

275+
#### `include`
276+
277+
* Default:
278+
* Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
279+
280+
Option that allows for defining which types of dependencies to install.
281+
282+
This is the inverse of `--omit=<type>`.
283+
284+
Dependency types specified in `--include` will not be omitted, regardless of
285+
the order in which omit/include are specified on the command-line.
286+
287+
288+
275289
#### `ignore-scripts`
276290

277291
* Default: false

Diff for: content/cli/v10/commands/npm-ls.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ packages will *also* show the paths to the specified packages. For
5858
example, running `npm ls promzard` in npm's source tree will show:
5959

6060
```bash
61-
npm@10.1.0 /path/to/npm
61+
npm@10.2.0 /path/to/npm
6262
6363
6464
```
@@ -196,6 +196,20 @@ variable will be set to `'production'` for all lifecycle scripts.
196196

197197

198198

199+
#### `include`
200+
201+
* Default:
202+
* Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
203+
204+
Option that allows for defining which types of dependencies to install.
205+
206+
This is the inverse of `--omit=<type>`.
207+
208+
Dependency types specified in `--include` will not be omitted, regardless of
209+
the order in which omit/include are specified on the command-line.
210+
211+
212+
199213
#### `link`
200214

201215
* Default: false

Diff for: content/cli/v10/commands/npm-prune.md

+14
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,20 @@ variable will be set to `'production'` for all lifecycle scripts.
8686

8787

8888

89+
#### `include`
90+
91+
* Default:
92+
* Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
93+
94+
Option that allows for defining which types of dependencies to install.
95+
96+
This is the inverse of `--omit=<type>`.
97+
98+
Dependency types specified in `--include` will not be omitted, regardless of
99+
the order in which omit/include are specified on the command-line.
100+
101+
102+
89103
#### `dry-run`
90104

91105
* Default: false

Diff for: content/cli/v10/commands/npm-query.md

+29
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,19 @@ npm query ":type(git)" | jq 'map(.name)' | xargs -I {} npm why {}
166166
},
167167
...
168168
```
169+
### Package lock only mode
170+
171+
If package-lock-only is enabled, only the information in the package
172+
lock (or shrinkwrap) is loaded. This means that information from the
173+
package.json files of your dependencies will not be included in the
174+
result set (e.g. description, homepage, engines).
175+
176+
### Package lock only mode
177+
178+
If package-lock-only is enabled, only the information in the package
179+
lock (or shrinkwrap) is loaded. This means that information from the
180+
package.json files of your dependencies will not be included in the
181+
result set (e.g. description, homepage, engines).
169182

170183
### Configuration
171184

@@ -237,6 +250,22 @@ all workspaces via the `workspaces` flag, will cause npm to operate only on
237250
the specified workspaces, and not on the root project.
238251

239252
This value is not exported to the environment for child processes.
253+
254+
#### `package-lock-only`
255+
256+
* Default: false
257+
* Type: Boolean
258+
259+
If set to true, the current operation will only use the `package-lock.json`,
260+
ignoring `node_modules`.
261+
262+
For `update` this means only the `package-lock.json` will be updated,
263+
instead of checking `node_modules` and downloading dependencies.
264+
265+
For `list` this means the output will be based on the tree described by the
266+
`package-lock.json`, rather than the contents of `node_modules`.
267+
268+
240269
## See Also
241270

242271
* [dependency selectors](/cli/v10/using-npm/dependency-selectors)

0 commit comments

Comments
 (0)