This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix additional peerOptional conflict cases
case D ``` root -> (x, z@1) x -> PEEROPTIONAL(y) y -> PEER(z@2) ``` case E ``` root -> (x, z@1) x -> PEEROPTIONAL(y) PEER(z@1) y -> PEER(z@2) ``` case F ``` root -> (x, z@1) x -> PEEROPTIONAL(y) PEER(z@1) PEER(w@1) w -> PEER(z@1) y -> PEER(z@2) ``` Case F properly reproduces the failure seen by installing [email protected] alongside typescript@4. Fix: #236 cc: @kyliau PR-URL: #237 Credit: @isaacs Close: #237 Reviewed-by: @isaacs
- Loading branch information
Showing
42 changed files
with
1,370 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# peer optional failure D | ||
|
||
``` | ||
root -> (x, z@1) | ||
x -> PEEROPTIONAL(y) | ||
y -> PEER(z@2) | ||
``` | ||
|
||
[npm/arborist#223](https://github.com/npm/arborist/issues/223) | ||
|
||
[npm/arborist#236](https://github.com/npm/arborist/issues/236) | ||
|
||
Subtly similar to case A, but note y and z swapped, so that they are | ||
resolved in the reverse order (because deps are alphabetically sorted for | ||
consistency). This is relevant, because it ensures that there's no dep | ||
present in the peerSet until _after_ the conflict is encountered, and that | ||
code path was not being hit. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "@isaacs/testing-peer-optional-conflict-d", | ||
"version": "1.0.0", | ||
"dependencies": { | ||
"@isaacs/testing-peer-optional-conflict-d-x": "1", | ||
"@isaacs/testing-peer-optional-conflict-d-z": "1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "@isaacs/testing-peer-optional-conflict-d-x", | ||
"version": "1.0.0", | ||
"peerDependencies": { | ||
"@isaacs/testing-peer-optional-conflict-d-y": "1" | ||
}, | ||
"peerDependenciesMeta": { | ||
"@isaacs/testing-peer-optional-conflict-d-y": { | ||
"optional": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "@isaacs/testing-peer-optional-conflict-d-y", | ||
"version": "1.0.0", | ||
"peerDependencies": { | ||
"@isaacs/testing-peer-optional-conflict-d-z": "2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "@isaacs/testing-peer-optional-conflict-d-z", | ||
"version": "1.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "@isaacs/testing-peer-optional-conflict-d-z", | ||
"version": "2.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# peer optional failure E | ||
|
||
``` | ||
root -> (x, z@1) | ||
x -> PEEROPTIONAL(y) PEER(z@1) | ||
y -> PEER(z@2) | ||
``` | ||
|
||
[npm/arborist#223](https://github.com/npm/arborist/issues/223) | ||
|
||
[npm/arborist#236](https://github.com/npm/arborist/issues/236) | ||
|
||
The same as case D, but with the addition of a `x->z` peerDep. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "@isaacs/testing-peer-optional-conflict-e", | ||
"version": "1.0.0", | ||
"dependencies": { | ||
"@isaacs/testing-peer-optional-conflict-e-x": "1", | ||
"@isaacs/testing-peer-optional-conflict-e-z": "1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "@isaacs/testing-peer-optional-conflict-e-x", | ||
"version": "1.0.0", | ||
"peerDependencies": { | ||
"@isaacs/testing-peer-optional-conflict-e-y": "1", | ||
"@isaacs/testing-peer-optional-conflict-e-z": "1" | ||
}, | ||
"peerDependenciesMeta": { | ||
"@isaacs/testing-peer-optional-conflict-e-y": { | ||
"optional": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "@isaacs/testing-peer-optional-conflict-e-y", | ||
"version": "1.0.0", | ||
"peerDependencies": { | ||
"@isaacs/testing-peer-optional-conflict-e-z": "2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "@isaacs/testing-peer-optional-conflict-e-z", | ||
"version": "1.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "@isaacs/testing-peer-optional-conflict-e-z", | ||
"version": "2.0.0" | ||
} |
Oops, something went wrong.