You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a CLI Docs Problem, not another kind of Docs Problem.
This is a CLI Docs Problem.
Description of Problem
When using npm ls, with no depth option specified, the output is the same as when npm ls --depth=0 is specified. The documentation npm ls --depth however states that the default depth is 1, not 0:
depth
Default: Infinity if --all is set, otherwise 1
Type: null or Number
The depth to go when recursing packages for npm ls.
If not set, npm ls will show only the immediate dependencies of the root project. If --all is set, then npm will show all dependencies by default.
Is there an existing issue for this?
This is a CLI Docs Problem, not another kind of Docs Problem.
Description of Problem
When using
npm ls
, with nodepth
option specified, the output is the same as whennpm ls --depth=0
is specified. The documentation npm ls --depth however states that the default depth is1
, not0
:Steps to reproduce
Ubuntu
24.04.1
LTS, Node.jsv22.12.0
LTSnpm
v10.9.2
Results
Line count resulting from running
npm ls --depth=n
against https://github.com/npm/cli tagv10.9.2
npm ls --depth=n
0
1
2
Potential Solution
Change the documented default depth for
npm ls --depth
from1
to0
Affected URL
https://docs.npmjs.com/cli/v10/commands/npm-ls#depth
The text was updated successfully, but these errors were encountered: