Use semver.compare instead of semver.lt

This commit is contained in:
Michael B. Gale
2025-10-06 12:58:00 +01:00
parent 43ce7ef399
commit 1cc5eb6636
11 changed files with 674 additions and 674 deletions

View File

@@ -848,7 +848,7 @@ async function getNightlyToolsUrl(logger: Logger) {
export function getLatestToolcacheVersion(logger: Logger): string | undefined {
const allVersions = toolcache
.findAllVersions("CodeQL")
.sort((a, b) => (semver.lt(a, b) ? 1 : -1));
.sort((a, b) => semver.compare(b, a));
logger.debug(
`Found the following versions of the CodeQL tools in the toolcache: ${JSON.stringify(
allVersions,