refactor: revert #4173 (#4252)

This commit is contained in:
Caleb Cartwright
2019-10-26 17:58:05 -05:00
committed by repo-ranger[bot]
parent 5f3a893eb4
commit 3e0defb246
2 changed files with 2 additions and 5 deletions

View File

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