Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: depth flag default value #8051

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

milaninfy
Copy link
Contributor

documentation of ls command specifies that depth flag if not set defaults to 1 but as per code it uses 0 as default value.

cli/lib/commands/ls.js

Lines 113 to 116 in dc31c1b

const filterDefaultDepth = depth === null ? Infinity : depth
const depthToPrint = (all || args.length)
? filterDefaultDepth
: (depth || 0)

fixes: #7979

@milaninfy milaninfy marked this pull request as ready for review January 21, 2025 15:44
@milaninfy milaninfy requested a review from a team as a code owner January 21, 2025 15:44
@wraithgar wraithgar changed the title fix: depth flag default value docs: depth flag default value Jan 21, 2025
@wraithgar wraithgar merged commit e90c6fe into npm:latest Jan 21, 2025
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DOCS] npm ls --depth default is 0 not 1
2 participants