Skip to content

Commit

Permalink
Add Exclusive prerelease specifier scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
notatallshaw committed Apr 14, 2024
1 parent 8a92681 commit 81f2d12
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions scenarios/prereleases.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,58 @@
"explanation": "Since the user provided a prerelease specifier, the latest prerelease version should be selected."
}
},
{
"name": "package-exclusive-ordered-comparison-prerelease-specified-mixed-available",
"description": "The user requires a version of `a` with an exclusive ordered comparison prerelease specifier and both prerelease and stable releases are available.",
"root": {
"requires": [
"a>0.1.0a1"
]
},
"packages": {
"a": {
"versions": {
"0.1.0": {},
"0.2.0a1": {},
"0.3.0": {},
"1.0.0a1": {}
}
}
},
"expected": {
"satisfiable": true,
"packages": {
"a": "1.0.0a1"
},
"explanation": "Since the user provided a prerelease specifier, the latest prerelease version should be selected, even though an exclusive ordered comparison was used."
}
},
{
"name": "package-not-equal-prerelease-specified-mixed-available",
"description": "The user requires a version of `a` which is not a specific prerelease version, and both prerelease and stable releases are available.",
"root": {
"requires": [
"a!=0.2.0a1"
]
},
"packages": {
"a": {
"versions": {
"0.1.0": {},
"0.2.0a1": {},
"0.3.0": {},
"1.0.0a1": {}
}
}
},
"expected": {
"satisfiable": true,
"packages": {
"a": "0.3.0"
},
"explanation": "Even though a prerelease specifier was given, it was '!=', which does not imply prereleases should be selected, therefore the latest final release should be chosen."
}
},
{
"name": "package-multiple-prereleases-kinds",
"description": "The user requires `a` which has multiple prereleases available with different labels.",
Expand Down

0 comments on commit 81f2d12

Please sign in to comment.