MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / packageVersion

Method packageVersion

src/telemetry/index.ts:601–609  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

599 }
600
601 private packageVersion(): string {
602 try {
603 // dist/telemetry/index.js → ../../package.json (same layout in src/ for tests via tsx)
604 const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, '..', '..', 'package.json'), 'utf8')) as { version?: string };
605 return pkg.version ?? '0.0.0';
606 } catch {
607 return '0.0.0';
608 }
609 }
610
611 private ensureExitHook(): void {
612 if (this.exitHookInstalled || !this.installExitHook) return;

Callers 1

sendMethod · 0.95

Calls 2

parseMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected