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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy