-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: npm ls <pkg> with depth cli config
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
- Loading branch information
Showing
5 changed files
with
114 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -373,6 +373,26 @@ [email protected] {CWD}/ls-ls-extraneous-deps | |
` | ||
|
||
exports[`test/lib/ls.js TAP ls filter pkg arg using depth option > should list a in top-level only 1`] = ` | ||
[email protected] {CWD}/ls-ls-filter-pkg-arg-using-depth-option | ||
\`-- [email protected] | ||
` | ||
|
||
exports[`test/lib/ls.js TAP ls filter pkg arg using depth option > should print empty results msg 1`] = ` | ||
[email protected] {CWD}/ls-ls-filter-pkg-arg-using-depth-option | ||
\`-- (empty) | ||
` | ||
|
||
exports[`test/lib/ls.js TAP ls filter pkg arg using depth option > should print expected result 1`] = ` | ||
[email protected] {CWD}/ls-ls-filter-pkg-arg-using-depth-option | ||
\`-- [email protected] | ||
\`-- [email protected] | ||
\`-- [email protected] | ||
` | ||
|
||
exports[`test/lib/ls.js TAP ls filtering by child of missing dep > should print tree and not duplicate child of missing items 1`] = ` | ||
[email protected] {CWD}/ls-ls-filtering-by-child-of-missing-dep | ||
+-- [email protected] extraneous | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters