MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / isUpdateAvailable

Function isUpdateAvailable

packages/core/api/src/update-check.ts:142–150  ·  view source on GitHub ↗
(
  currentVersion: string | undefined,
  latestVersion: string | null,
)

Source from the content-addressed store, hash-verified

140 * or no published tag for that channel.
141 */
142export const isUpdateAvailable = (
143 currentVersion: string | undefined,
144 latestVersion: string | null,
145): boolean => {
146 if (currentVersion === undefined) return false;
147 if (resolveComparisonChannel(currentVersion) === null) return false;
148 if (latestVersion === null) return false;
149 return compareVersions(currentVersion, latestVersion) === -1;
150};
151
152// ── dist-tags resolution ──────────────────────────────────────────────────
153

Callers 4

useLatestVersionFunction · 0.90
checkForUpdateFunction · 0.85

Calls 2

resolveComparisonChannelFunction · 0.85
compareVersionsFunction · 0.70

Tested by

no test coverage detected