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

npm / arborist / #700

Build:
Build:
LAST BUILD BRANCH:
DEFAULT BRANCH: master
Ran 04 Feb 2021 09:37PM UTC
Jobs 1
Files 39
Run time 5s
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
#700

push

isaacs
fix: package.json saving optional deps

Reify currently duplicates entries listed as optionalDependencies in the
users' package.json files. While it's working as expected this is
unexpected to a number of users and it also contradicts our own docs on
it:

    Entries in optionalDependencies will override entries of the same
    name in dependencies, so it's usually best to only put in one place.

This patches this UX problem by adding an extra check that will avoid
adding a dependency to the package.json `dependencies` object in case
that package is already listed under `optionalDependencies`.

Fixes: https://github.com/npm/cli/issues/2203
Fixes: https://github.com/npm/cli/issues/1886
Fixes: https://github.com/npm/cli/issues/724

EDIT(isaacs): Moved this into updateRootPackageJson in pairing session

2749 of 2749 branches covered (100.0%)

Branch coverage included in aggregate %.

3757 of 3757 relevant lines covered (100.0%)

560.7 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #700.1 04 Feb 2021 09:37PM UTC 0
100.0
Source Files on build #700
Detailed source file information is not available for this build.
  • Back to Repo
  • 76245288 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