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

[BUG] npm ls doesn't support depth #1861

Closed
darcyclarke opened this issue Sep 25, 2020 · 0 comments
Closed

[BUG] npm ls doesn't support depth #1861

darcyclarke opened this issue Sep 25, 2020 · 0 comments
Assignees
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release

Comments

@darcyclarke
Copy link
Contributor

darcyclarke commented Sep 25, 2020

Current Behavior:

Running npm ls <pkg> --depth=0 doesn't produce a filtered result of deps installed on disk

Expected Behavior:

Running npm ls <pkg> --depth=0 will show me just the top-level deps installed on disk (see [email protected])

Steps To Reproduce:

  1. In any version npm@<=7.0.0-beta.12 ...
  2. Run npm ls <pkg> --depth=0 ...
  3. See same results as npm ls or even npm ls --all (there is no difference)

Environment:

  • OS: [email protected] (19G2021) - although I'm fairly positive this can be repro'd in all environments
  • Node: 14.12.0
  • npm: 7.0.0-beta.12
@darcyclarke darcyclarke added Release 7.x work is associated with a specific npm 7 release Bug thing that needs fixing Needs Triage needs review for next steps labels Sep 25, 2020
@ruyadorno ruyadorno added beta and removed Needs Triage needs review for next steps labels Sep 25, 2020
@ruyadorno ruyadorno added this to the OSS - Sprint 16 milestone Sep 25, 2020
ruyadorno added a commit to ruyadorno/cli that referenced this issue Sep 25, 2020
Using the cli option --depth is currently not resulting in the expected
behavior of filtering depth level when running npm ls <pkg> - that's due
the special behavior of printing all results when using a filter arg.

This commit fixes it by adding support to limiting depth if a config
value is set by the user.

Fixes npm#1861
ruyadorno added a commit to ruyadorno/cli that referenced this issue Sep 25, 2020
Using the cli option --depth is currently not resulting in the expected
behavior of filtering depth level when running npm ls <pkg> - that's due
the special behavior of printing all results when using a filter arg.

This commit fixes it by adding support to limiting depth if a config
value is set by the user.

Fixes npm#1861
ruyadorno added a commit to ruyadorno/cli that referenced this issue Sep 25, 2020
Using the cli option --depth is currently not resulting in the expected
behavior of filtering depth level when running npm ls <pkg> - that's due
the special behavior of printing all results when using a filter arg.

This commit fixes it by adding support to limiting depth if a config
value is set by the user.

Fixes npm#1861
nlf pushed a commit that referenced this issue Sep 29, 2020
Using the cli option --depth is currently not resulting in the expected
behavior of filtering depth level when running npm ls <pkg> - that's due
the special behavior of printing all results when using a filter arg.

This commit fixes it by adding support to limiting depth if a config
value is set by the user.

Fixes #1861

PR-URL: #1862
Credit: @ruyadorno
Close: #1862
Reviewed-by: @nlf
nlf pushed a commit that referenced this issue Sep 29, 2020
Using the cli option --depth is currently not resulting in the expected
behavior of filtering depth level when running npm ls <pkg> - that's due
the special behavior of printing all results when using a filter arg.

This commit fixes it by adding support to limiting depth if a config
value is set by the user.

Fixes #1861

PR-URL: #1862
Credit: @ruyadorno
Close: #1862
Reviewed-by: @nlf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

No branches or pull requests

2 participants