fix: restore version comparison updates from #4173 (#4254)

Co-authored-by: Pierre-Yves Bigourdan <10694593+PyvesB@users.noreply.github.com>
This commit is contained in:
Caleb Cartwright
2022-03-12 04:37:07 -06:00
committed by GitHub
parent 2cea986362
commit 800a4b07ea
2 changed files with 5 additions and 2 deletions

View File

@@ -74,12 +74,12 @@ function latestMaybeSemVer(versions, pre) {
try {
// coerce to string then lowercase otherwise alpha > RC
version = versions.sort((a, b) =>
semver.rcompare(
semver.compareBuild(
`${a}`.toLowerCase(),
`${b}`.toLowerCase(),
/* loose */ true
)
)[0]
)[versions.length - 1]
} catch (e) {
version = latestDottedVersion(versions)
}