| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
@vsafonkin, - Use `-dev` instead of a patch number (e.g., `3.11-dev`) to install the latest release of a patch version, *alpha and beta releases included if no stable version exists* |
Sorry, something went wrong.
|
@mayeut, I mean to install the latest release of a minor version -> to install the latest release of a patch version replacing |
Sorry, something went wrong.
|
It was clear for me with minor, I find it unclear with your proposal. How about: If what the patch is doing is unclear using 3.10-dev as an example: import * as semver from 'semver';
function check(version: string, range: string) {
const statified = semver.satisfies(version, range);
const expected = semver.satisfies(version, "~3.10.0-0", {includePrerelease: true});
if (expected !== statified) {
console.error(`FAIL: ${version} statifies ${range} returned ${statified}, expected ${expected}`)
}
else {
console.log(`PASS: ${version} statifies ${range} returned ${statified}, expected ${expected}`)
}
}
for (const range of [">= 3.10.0-a0", "~3.10.0-0"]) {
for (const version of ["3.9.9", "3.10.0-alpha.1", "3.10.0", "3.10.1-alpha.1", "3.10.1", "3.11.0-alpha.1", "3.11.0"]) {
check(version, range);
}
}before PR (>= 3.10.0-a0): PASS: 3.9.9 statifies >= 3.10.0-a0 returned false, expected false PASS: 3.10.0-alpha.1 statifies >= 3.10.0-a0 returned true, expected true PASS: 3.10.0 statifies >= 3.10.0-a0 returned true, expected true FAIL: 3.10.1-alpha.1 statifies >= 3.10.0-a0 returned false, expected true PASS: 3.10.1 statifies >= 3.10.0-a0 returned true, expected true PASS: 3.11.0-alpha.1 statifies >= 3.10.0-a0 returned false, expected false FAIL: 3.11.0 statifies >= 3.10.0-a0 returned true, expected false with the PR (~3.10.0-0): PASS: 3.9.9 statifies ~3.10.0-0 returned false, expected false PASS: 3.10.0-alpha.1 statifies ~3.10.0-0 returned true, expected true PASS: 3.10.0 statifies ~3.10.0-0 returned true, expected true FAIL: 3.10.1-alpha.1 statifies ~3.10.0-0 returned false, expected true PASS: 3.10.1 statifies ~3.10.0-0 returned true, expected true PASS: 3.11.0-alpha.1 statifies ~3.10.0-0 returned false, expected false PASS: 3.11.0 statifies ~3.10.0-0 returned false, expected false |
Sorry, something went wrong.
* fix: 3.x-dev can install a 3.y version * Update README section for `-dev`
| Back | FazBrowse Home | New Git URL |
Description:
Rework desugarDevVersion so that 3.x-dev cannot end up with 3.y/4.x installed.
It still does not do what one would expect (include pre-release even if there's a stable release - would require actions/toolkit#709 to be fixed) but it was already the case & python-versions does not build pre-releases for minor versions once a stable release exists, so it does not matter much (but going with mitigates rather than fix below).
Related issue:
mitigates #416
Check list: