refactor: replace bun semver with npm semver package

This commit is contained in:
Dax Raad
2026-03-09 15:29:55 -04:00
parent 2f2856e20a
commit 37ae0a4051
5 changed files with 274 additions and 37 deletions

View File

@@ -1,4 +1,4 @@
import { semver } from "bun"
import semver from "semver"
import { text } from "node:stream/consumers"
import { Log } from "../util/log"
import { Process } from "../util/process"
@@ -45,6 +45,6 @@ export namespace PackageRegistry {
const isRange = /[\s^~*xX<>|=]/.test(cachedVersion)
if (isRange) return !semver.satisfies(latestVersion, cachedVersion)
return semver.order(cachedVersion, latestVersion) === -1
return semver.lt(cachedVersion, latestVersion)
}
}