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

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

Build:
Build:
LAST BUILD BRANCH: nlf/arborist-validation
DEFAULT BRANCH: latest
Ran 24 May 2021 06:37PM UTC
Files 123
Run time 14s
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

24 May 2021 06:35PM UTC coverage: 96.87% (+0.003%) from 96.867%
#2165.1

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

Source Files on job #2165.1
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 2165
  • 83590d40 on github
  • Prev Job for on release-next (##2162.1)
  • Next Job for on release-next (##2170.1)
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