Skip to content

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

New issue

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

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

Already on GitHub? # to your account

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 npm@6.x)

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: OSX@10.15.6 (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
# for free to join this conversation on GitHub. Already have an account? # 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