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

npm / arborist / #49

Build:
Build:
LAST BUILD BRANCH:
DEFAULT BRANCH: master
Ran 19 May 2020 05:18AM UTC
Jobs 1
Files 29
Run time 3s
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
#49

push

isaacs
fix: Handle tarball dependencies properly

For 'file:' deps (whether directory or tarball type), Node.resolved is
always absolute.  It was initially set up to be relative to the node
path, because it had to be stashed back to package.json.  But, then we
got rid of that approach in favor of a more comprehensive lockfile, and
so the added complexity of constantly re-evaluating the resolved value
as the node moves around serves no purpose.

This relative linking also _wasn't_ being handled properly in tarball
dependencies, resulting in attempting to fetch a tarball from the wrong
location, relative to the dependent's directory in node_modules, rather
than where it should be found.  Since we never store Node.resolved
anywhere, there's no need for it to be portable, and the portability had
a bug anyway.

*Shrinkwrap* files *do* have to be portable, so the paths get
relativized (and resolved) going into and out of lockfiles.  But that's
much simpler.

Tarball dependencies are more consistently handled, and now that the
Node.resolved value is absolute and predictable, it's easier to get that
right.

Tarball dependencies are properly regarded as a valid dependency
resolution, provided that they come from the same target file.  It's
still a bit of a crapshoot when we get legacy install trees, but at
least now we're not throwing out package._resolved when we load the
manifest from pacote directly.

The added test case installs a tarball dependency which depends on two
other tarballs: 1 in its own containing folder, and another outside of
its folder.  (This exact situation was a thorn in npm's side for most of
6.x, and might still be in some cases.)

1795 of 1795 branches covered (100.0%)

Branch coverage included in aggregate %.

2686 of 2686 relevant lines covered (100.0%)

231.14 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #49.1 19 May 2020 05:18AM UTC 0
100.0
Source Files on build #49
Detailed source file information is not available for this build.
  • Back to Repo
  • 8c658709 on github
  • Prev Build on
  • Next Build on
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