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

npm / arborist / #120

Build:
Build:
LAST BUILD BRANCH:
DEFAULT BRANCH: master
Ran 29 May 2020 01:37AM UTC
Jobs 1
Files 30
Run time 4s
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
#120

push

ruyadorno
add missing package.json in test fixture

This was causing a weird as hell race condition due to the prior commit
that checks if the hidden lockfile is up to date.

If the test fixture was created with a >10ms gap between the hidden
lockfile being created and the package contents being created, then the
hidden lockfile wouldn't be respected, and it'd have to load the
package.json from disk.

However, since the package.json was missing, this meant that the semver
node always had a node.package of {}.

That timing issue would only hit if the test fixture generation took
more than 10ms, AND the delay landed in just the right spot in the test.
Reproduced by adding a ton of loging, and then running the test in a
tight loop along with 6 other tests going at the same time, and even
then, it only usually triggered after 5-10 minutes.

It wasn't a problem before, because a hidden lockfile contains
everything necessary to load the tree.  So, when there was no safety
check to ensure that the hidden lock is newer than the packages it
describes, the lack of a package.json file was never a problem.

PR-URL: https://github.com/npm/arborist/pull/92
Credit: @isaacs
Close: #92
Reviewed-by: @ruyadorno

1898 of 1905 branches covered (99.63%)

Branch coverage included in aggregate %.

2833 of 2840 relevant lines covered (99.75%)

311.14 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #120.1 29 May 2020 01:37AM UTC 0
99.7
Source Files on build #120
Detailed source file information is not available for this build.
  • Back to Repo
  • a11d5da5 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