chore: source VERSION constant from package.json#64
Merged
LanNguyenSi merged 1 commit intomasterfrom May 5, 2026
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
"0.6.0": the Commander--versionflag, the doctor banner, and three MCPclientInfo.versionblocks. At the v0.5.0 cut onlypackage.jsonwas bumped and the others lagged at 0.4.0 until the v0.6.0 release review caught it.src/version.tsimportspackage.jsonvia a JSON import attribute and re-exportsVERSION. All five sites plus the--versiontest now read from this single import, so apackage.jsonbump is the only edit needed for a release.package.json(at the package root) anddist/version.js, so the runtime resolution../package.jsonworks for npm-installed consumers as well as local builds (verified vianpm pack --dry-run).Closes agent-tasks task
e4a4f118.Test plan
npm run typecheckcleannpm test: 655/655 pass, including the--versionassertion against the shared importnpm pack --dry-runconfirmsdist/version.jsandpackage.jsonboth shipnode -e 'import("./dist/version.js").then(m => console.log(m.VERSION))'prints the package version