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

npm / arborist / #363

Build:
Build:
LAST BUILD BRANCH:
DEFAULT BRANCH: master
Ran 21 Oct 2020 09:12PM UTC
Jobs 1
Files 33
Run time 12s
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
#363

push

isaacs
Do not conflict on meta-peers that will not be replaced

When in a situation where a project has dependencies on several members
of a peer set, it was encountering a spurious ERESOLVE error if the
entire set was being replaced, but _one_ of the members did not need to
be.

For example:

```
root -> (a@1, b@1, c@1)
a@1 -> PEER(b@1, c@1)
a@2 -> PEER(b@2, c@1)
b@1 -> PEER(c@1)
b@2 -> PEER(c@1)
```

resulting in the tree:

```
root
+-- a@1
+-- b@1
+-- c@1
```

If we try to upgrade both `a` and `b` to version 2, however, we would
check the set of peers for each dependency node being replaced, and find
that there was a `c` node with a non-peer dependency from the root node,
and treat it as a conflict, even though there was no need for `c` to be
modified at all!

Resolve this by skipping the check when not doing `canPlacePeers` (since
it's either already a conflict, or already set to be overridden by the
version from the virtualRoot), and ignoring the conflict when a
non-overridden node exists in the virtualRoot which meets the non-peer
edge keeping the current dependency node in place.  In those cases,
either we will replace or keep the current node anyway, so there's no
need to conflict on it.

Fix: npm/cli#2000

2346 of 2347 branches covered (99.96%)

Branch coverage included in aggregate %.

3347 of 3347 relevant lines covered (100.0%)

450.58 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #363.1 21 Oct 2020 09:12PM UTC 0
99.98
Source Files on build #363
Detailed source file information is not available for this build.
  • Back to Repo
  • 66f1a7f8 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