Skip to content

Commit 9e60662

Browse files
authored
fix(npm): read install.js version from package.json (#37)
Single source of truth: install.js now reads VERSION from ./package.json at runtime, so the release workflow's 'npm version $tag' bump propagates correctly. Previously the constant drifted from package.json on every release, causing 'npm install -g stacklit' to silently download an older binary.
1 parent 4169ebf commit 9e60662

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

npm/install.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ const path = require('path');
44
const https = require('https');
55
const { execFileSync } = require('child_process');
66

7-
const VERSION = '0.3.0';
7+
// Read the version from package.json so the npm publish workflow's
8+
// `npm version <tag>` bump is the single source of truth. Previously this was
9+
// a hard-coded constant that drifted from package.json on every release,
10+
// causing the postinstall to pull an outdated binary archive.
11+
const VERSION = require('./package.json').version;
812
const REPO = 'glincker/stacklit';
913

1014
const PLATFORM_MAP = {

0 commit comments

Comments
 (0)