Skip to content

Commit e90c6fe

Browse files
authored
docs: depth flag default value (#8051)
documentation of `ls` command specifies that `depth` flag if not set defaults to `1` but as per code it uses 0 as default value. https://github.com/npm/cli/blob/dc31c1bdc6658ab69554adcf2988ee99a615c409/lib/commands/ls.js#L113-L116 fixes: #7979
1 parent dc31c1b commit e90c6fe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tap-snapshots/test/lib/docs.js.test.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ are same as \`cpu\` field of package.json, which comes from \`process.arch\`.
405405
406406
#### \`depth\`
407407
408-
* Default: \`Infinity\` if \`--all\` is set, otherwise \`1\`
408+
* Default: \`Infinity\` if \`--all\` is set, otherwise \`0\`
409409
* Type: null or Number
410410
411411
The depth to go when recursing packages for \`npm ls\`.

workspaces/config/lib/definitions/definitions.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ const definitions = {
461461
depth: new Definition('depth', {
462462
default: null,
463463
defaultDescription: `
464-
\`Infinity\` if \`--all\` is set, otherwise \`1\`
464+
\`Infinity\` if \`--all\` is set, otherwise \`0\`
465465
`,
466466
type: [null, Number],
467467
description: `

0 commit comments

Comments
 (0)