Repository navigation
fix(version): report the real package version - #88
Merged
Merged
Conversation
src/version.ts hard-coded VERSION = '0.0.0' and no release step rewrites it. Every published CLI therefore reported 0.0.0 and a false version mismatch against the daemon. VERSION now reads the version from package.json, the same way bin/run.js already does. A new test asserts getVersion() equals package.json's version. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This was referenced Oct 19, 2026
Merged
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.
Bug
src/version.tshard-codesexport const VERSION = '0.0.0'. No script or release step rewrites that file.release-itonly bumpspackage.json, and the git history shows the placeholder was never synced.Every published release (0.8.1 to 0.8.4) ships
0.0.0. As a result:centy versionprintsCLI: 0.0.0.Fix
VERSIONnow reads theversionfield from the package's ownpackage.json. It usescreateRequire, the same patternbin/run.jsalready uses. The path../package.jsonresolves from bothsrc/(tests) anddist/(built CLI).No new dependency. No release-step change is needed, because the value now follows
package.jsonat run time.Test
src/version.spec.tsgets a new case,should equal the version in package.json. It assertsgetVersion()equalspackage.json's version. This test fails onmain(expected '0.0.0' to be '0.8.4') and passes with this change.Verification
pnpm lint,pnpm format:check,pnpm spell,pnpm knip,tsc --noEmit: passpnpm test:coverage --run: 229 files, 1116 tests passpnpm build: passnode bin/run.js version, before: publishedcenty@0.8.4printedCLI: 0.0.0. After:CLI: 0.8.4, with the real daemon at0.15.1. The mismatch shown now is a real one.🤖 Generated with Claude Code