MCPcopy
hub / github.com/afar1/fieldtheory-cli / getLocalVersion

Function getLocalVersion

src/cli.ts:348–356  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

346const UPDATE_CHECK_INTERVAL_MS = 24 * 60 * 60 * 1000; // 1 day
347
348function getLocalVersion(): string {
349 try {
350 const require = createRequire(import.meta.url);
351 const pkg = require('../package.json');
352 return pkg.version;
353 } catch {
354 return '0.0.0';
355 }
356}
357
358export function compareVersions(a: string, b: string): number {
359 const pa = a.split('.').map(Number);

Callers 4

showCachedUpdateNoticeFunction · 0.85
showWhatsNewFunction · 0.85
logoFunction · 0.85
buildCliFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected