MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / isNewerStableVersion

Function isNewerStableVersion

packages/core/src/version.ts:42–51  ·  view source on GitHub ↗
(latest: string, current: string)

Source from the content-addressed store, hash-verified

40}
41
42export function isNewerStableVersion(latest: string, current: string): boolean {
43 const latestVersion = parseStableVersion(latest)
44 const currentVersion = parseComparableCurrentVersion(current)
45 if (!latestVersion || !currentVersion) return false
46
47 if (latestVersion.major !== currentVersion.major) return latestVersion.major > currentVersion.major
48 if (latestVersion.minor !== currentVersion.minor) return latestVersion.minor > currentVersion.minor
49 if (latestVersion.patch !== currentVersion.patch) return latestVersion.patch > currentVersion.patch
50 return currentVersion.prerelease
51}

Callers 3

version.test.tsFile · 0.90
buildUpdateNoticeStateFunction · 0.90

Calls 2

parseStableVersionFunction · 0.85

Tested by

no test coverage detected