Content-Length: 284425 | pFad | https://github.com/npm/cli/commit/e90c6feeacdf9ad010d4d73b65d7dd7d3b86efe2

4A docs: depth flag default value (#8051) · npm/cli@e90c6fe · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/npm/cli/commit/e90c6feeacdf9ad010d4d73b65d7dd7d3b86efe2

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy