Age | Commit message (Collapse) | Author |
|
Instead of files randomly requiring the npm singleton,
we pass it where it needs to go so that tests don't need
to do so much require mocking everywhere
PR-URL: https://github.com/npm/cli/pull/2772
Credit: @wraithgar
Close: #2772
Reviewed-by: @ruyadorno
|
|
That file must be newer than the others for the code to do what we are
expecting
PR-URL: https://github.com/npm/cli/pull/2782
Credit: @isaacs
Close: #2782
Reviewed-by: @wraithgar
|
|
|
|
|
|
PR-URL: https://github.com/npm/cli/pull/2381
Credit: @XhmikosR
Close: #2381
Reviewed-by: @isaacs
|
|
We have a lot of tests that were not handling errors in callbacks, not
defining variables, defining variables that weren't used, and just
generally not formatted like the rest of npm.
Hazard of moving fast. Thankfully, machines can help.
|
|
PR-URL: https://github.com/npm/cli/pull/1986
Credit: @G-Rath
Close: #1986
Reviewed-by: @ruyadorno
|
|
npm ls was failing to properly follow symlink targets in order to find
its dependencies to get printed output.
PR-URL: https://github.com/npm/cli/pull/1871
Credit: @ruyadorno
Close: #1871
Reviewed-by: @nlf
|
|
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: https://github.com/npm/cli/pull/1862
Credit: @ruyadorno
Close: #1862
Reviewed-by: @nlf
|
|
|
|
When having nodes that are children of extraneous nodes, items were
getting printed twice using `npm ls`.
This fixes it by keeping track of seen nodes while iterating in a same
children level and effectively avoiding printing a same item twice.
fix: #1573
PR-URL: https://github.com/npm/cli/pull/1576
Credit: @ruyadorno
Close: #1576
Reviewed-by: @isaacs
|
|
PR-URL: https://github.com/npm/cli/pull/1509
Credit: @isaacs
Close: #1509
Reviewed-by: @ruyadorno
|
|
PR-URL: https://github.com/npm/cli/pull/1545
Credit: @ruyadorno
Close: #1545
Reviewed-by: @isaacs
|
|
|
|
|
|
- Only assign problems if the related node is included in output
- Avoid breaking if using dummy node on node.satisfies
- Added test case for `npm ls .` edge case
|
|
- When using args to filter out items deduped pkgs were broken
- Fixed highlight color when using filter args
- Changed default behavior to show all packages when using args filter
Paired-with: @isaacs
|
|
Paired-with: @darcyclarke
|
|
- npm ls now defaults to only printing root children
- added --all flag that is same as --depth=Infinity
- --depth now defaults to 0 and can still be used if --all is not truthy
|
|
- Rewrites lib/ls.js command to use @npmcli/arborist
- Updates unit tests
- Breaking changes:
- added error codes: ELSPROBLEMS, EJSONPARSE to callback errors
- extraneous deps depth will match current location in nm folder
- mark top-level deps as extraneous when missing root package.json
- don't mark deps as extraneous if they're valid deps of invalid deps
- peer deps are now listed as regular deps, removed oddities such as
peerinvalid label and stops labeling peer deps extraneous
- might print diff git resolved values,
see: https://github.com/npm/hosted-git-info
- Parseable (--parseable) output:
- possible order of printed elements changed
- fixed consistency problems in which it would print root folder
name if using a filter argument that could not match against
any of the deps in the current installed tree
- fixed printing non-existing paths for missing dependencies
- fixed undefined symlink output when using --long output
- JSON (--json) output:
- removed: `from` property from --json output
- removed: "[Circular]" references
- added "missing" to list of peer-dep problems listed
- added peerDependencies ref when using --long output
- removed readme properties using --long output
- Renamed error msg:
`Failed to parse json` -> `Failed to parse root package.json`
refs:
- https://github.com/npm/statusboard/issues/99
- https://github.com/npm/statusboard/issues/103
|
|
- Added test/lib/ls.js with unit tests for ls command
- Removed legacy tests:
- test/tap/ls-depth-cli.js
- test/tap/ls-depth-unmet.js
- test/tap/ls-env.js
- test/tap/ls-l-depth-0.js
- test/tap/ls-no-results.js
- test/tap/ls-peer.js
- test/tap/ls-production-and-dev.js
- test/tap/ls-top-errors.js
- test/tap/ls.js
fix #1511
PR-URL: https://github.com/npm/cli/pull/1512
Credit: @ruyadorno
Close: #1512
Reviewed-by: @isaacs
|