• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

npm / cli / #2165
97%
latest: 97%

Build:
Build:
LAST BUILD BRANCH: nlf/arborist-validation
DEFAULT BRANCH: latest
Ran 24 May 2021 06:37PM UTC
Jobs 1
Files 123
Run time 15s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
#2165

push

wraithgar
fix(ls): show relative paths from root

Change the output in `npm ls` for symlink dependencies (including
workspaces) to show the relative path from the project root, rather than
the absolute path of the link target.

This makes the output much less noisy and more ergonomic when many
workspaces and link dependencies are in use, especially when paths are
long.

It is arguable that this output might be slightly misleading, since the
_actual_ workspace symlink from `${root}/node_modules/b` to
`${root}/packages/b` has a link value of `../packages/b`, not just
`packages/b`.  (Or on Windows, always the full absolute path, because
junctions.)  Thus, `npm ls b` will not show the same output as `ls -l
node_modules/b`.

However, `npm ls` shows the logical tree, not the physical tree, so
presenting the user with a path that they can use and interpret is more
important than presenting them with the strictly accurate details of
their filesystem.

PR-URL: https://github.com/npm/cli/pull/3272
Credit: @isaacs
Close: #3272
Reviewed-by: @darcyclarke

3086 of 3193 branches covered (96.65%)

Branch coverage included in aggregate %.

5271 of 5434 relevant lines covered (97.0%)

24.18 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #2165.1 24 May 2021 06:37PM UTC 0
96.87
Source Files on build #2165
Detailed source file information is not available for this build.
  • Back to Repo
  • 83590d40 on github
  • Prev Build on release-next
  • Next Build on release-next
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc