Skip to content

chore: source VERSION constant from package.json#64

Merged
LanNguyenSi merged 1 commit intomasterfrom
chore/version-single-source
May 5, 2026
Merged

chore: source VERSION constant from package.json#64
LanNguyenSi merged 1 commit intomasterfrom
chore/version-single-source

Conversation

@LanNguyenSi
Copy link
Copy Markdown
Owner

Summary

  • Five sites previously hard-coded "0.6.0": the Commander --version flag, the doctor banner, and three MCP clientInfo.version blocks. At the v0.5.0 cut only package.json was bumped and the others lagged at 0.4.0 until the v0.6.0 release review caught it.
  • New src/version.ts imports package.json via a JSON import attribute and re-exports VERSION. All five sites plus the --version test now read from this single import, so a package.json bump is the only edit needed for a release.
  • The published tarball includes both package.json (at the package root) and dist/version.js, so the runtime resolution ../package.json works for npm-installed consumers as well as local builds (verified via npm pack --dry-run).

Closes agent-tasks task e4a4f118.

Test plan

  • npm run typecheck clean
  • npm test: 655/655 pass, including the --version assertion against the shared import
  • npm pack --dry-run confirms dist/version.js and package.json both ship
  • Manual smoke: node -e 'import("./dist/version.js").then(m => console.log(m.VERSION))' prints the package version

Five sites previously hard-coded the harness version: the Commander
.version() flag, the doctor banner, and three MCP clientInfo blocks.
At v0.5.0 only package.json got bumped and the others lagged at 0.4.0
until the v0.6.0 release review caught it.

Introduce src/version.ts that imports package.json via a JSON
import attribute and re-exports VERSION. All five sites and the
program.test.ts --version assertion now read from this single
source, so a package.json bump is the only edit needed for a
release.

The published tarball includes both package.json (at the root) and
dist/version.js, so the runtime resolution `../package.json` works
for npm-installed consumers as well as local builds.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@LanNguyenSi LanNguyenSi merged commit a952d19 into master May 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants