Skip to content

Commit 80fa3d7

Browse files
fix: Read version from package.json instead of hardcoding
1 parent db4ef2f commit 80fa3d7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/cli/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,11 @@ import { loadSMSConfig } from '../hooks/sms-notify.js';
7171
import { spawn } from 'child_process';
7272
import { homedir } from 'os';
7373

74-
const VERSION = '0.5.5';
74+
// Read version from package.json
75+
import { createRequire } from 'module';
76+
const require = createRequire(import.meta.url);
77+
const pkg = require('../../package.json');
78+
const VERSION = pkg.version;
7579

7680
// Check for updates on CLI startup
7781
UpdateChecker.checkForUpdates(VERSION, true).catch(() => {

0 commit comments

Comments
 (0)