fix --version outputting v0.0.0 and centralize VERSION as single source of truth#593
Merged
JeremyDev87 merged 2 commits intomasterfrom Feb 20, 2026
Merged
Conversation
…sion outputting v0.0.0 - Add version.ts as single source of truth with VERSION constant - Refactor version.utils.ts to import VERSION instead of readFileSync - Simplify version.utils.spec.ts: remove fs mock, add semver format validation Closes #592
….sh for version.ts - Add bump-version.sh: atomically updates VERSION in version.ts and all package.json files - Cross-platform (Node.js-based, no sed -i dependency) - Validates semver format before applying changes - Validates CWD is project root before running - Update verify-release-versions.sh: include version.ts VERSION constant in release verification
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
Fixes #592
npx codingbuddy --versionwas outputtingv0.0.0becauseversion.utils.tsattempted to resolvepackage.jsonviareadFileSync(join(__dirname, '..', '..', 'package.json')), which resolves todist/src/package.jsonat runtime — a path that does not exist. Thecatchblock silently returned'0.0.0'.Root Cause
Changes
Core Fix (
fix(version))apps/mcp-server/src/shared/version.ts— single source of truth; exportsVERSION = '4.3.0'version.utils.ts— replacereadFileSyncpath resolution withimport { VERSION }fromversion.tsversion.utils.spec.ts— removefsmock entirely; validate semver format and VERSION constant equality insteadScripts (
feat(scripts))scripts/bump-version.sh— atomically updatesversion.tsand allpackage.jsonfiles in one commandsed -idependency)^[0-9]+\.[0-9]+\.[0-9]+$) before applyingscripts/verify-release-versions.sh— includeversion.tsVERSIONconstant in release verification checksVerification
Test Plan
version.utils.spec.ts— 4 tests pass (semver format, VERSION equality, fallback export)npx codingbuddy --versionoutputscodingbuddy v4.3.0bump-version.sh— semver validation, CWD check, atomic update of 5 filesverify-release-versions.sh— validatesversion.tsalongsidepackage.jsonfiles