Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Artur-
Copy link

@Artur- Artur- commented Oct 21, 2025

The override conflict detection added in b9225e5 is overly conservative and produces false positives for reference overrides ($syntax): Different override sets using references (e.g., $@vaadin/react-components vs $@vaadin/react-components-pro) are structurally different but functionally equivalent when they resolve to the same versions.

Fixes: #8688

The override conflict detection added in b9225e5 is overly
conservative and produces false positives in two scenarios:

1. Peer dependencies: These resolve to nodes in different parts
   of the tree with legitimately different override contexts.

2. Reference overrides ($syntax): Different override sets using
   references (e.g., $@vaadin/react-components vs
   $@vaadin/react-components-pro) are structurally different but
   functionally equivalent when they resolve to the same versions.

This fix removes the override conflict check entirely from edge
validation. The check was redundant because:
- Version satisfaction is already validated by satisfiedBy()
- Any actual version conflicts in dependencies are caught during
  normal dependency resolution in the build/reify phase
- The check caused false positives that prevented valid
  dependency configurations from working

Fixes: npm#8688
@Artur- Artur- requested a review from a team as a code owner October 21, 2025 15:32
…ation

because it caused false positives with reference overrides ($syntax) that
resolve to functionally equivalent versions. Real conflicts are caught during
the build/reify phase. See issue npm#8688 and the fix in edge.js
Replace the test 'should find inconsistency between the edge's override set
and the target's override set' which was testing the override conflict
detection code that was intentionally removed.

The new test 'edges with different override contexts to same node should be
valid' is a regression test for issue npm#8688. It verifies that edges remain
valid when the edge and target node have different override contexts, as long
as the version requirements are satisfied.

The override conflict check (from b9225e5) was causing false positives,
especially with reference overrides ($syntax) that resolve to functionally
equivalent versions despite being structurally different.

The fix removes this check because:
1. satisfiedBy() already validates version requirements
2. Real conflicts are caught during build/reify phase
3. The check compared override sets structurally, not functionally
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] ERESOLVE overriding peer dependency in 11.2.0 and newer

1 participant