Commit 387fa41
committed
fix(npm): read version from package.json instead of hard-coding
The release workflow runs 'npm version $tag' to bump package.json from
the git tag, but install.js had its own hard-coded VERSION = '0.3.0'
constant that nothing was updating. So at release time the package
metadata says (e.g.) 0.4.0 while the postinstall still downloads the
0.3.0 binary archive, silently shipping an older binary to anyone
running 'npm install -g stacklit'.
Reading the version from ./package.json makes that release-time bump
the single source of truth. No new dependency, no extra release step,
and the version stays correct for pre-releases ('0.4.0-beta.1' style)
since goreleaser uses the same scheme for its archive names.1 parent 4169ebf commit 387fa41
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
| |||
0 commit comments