The binary tells the truth about its version#22
Merged
Conversation
The published 0.1.1 introduced itself as 0.1.0. Both the CLI's --version and the MCP server's SERVER_VERSION were hardcoded strings — changesets bumps the manifest, and a constant nobody remembers is wrong by the second release, forever. Both now read package.json at runtime via createRequire; src/ and dist/ sit at the same depth, so the one relative path holds in tests and in the published tarball alike. Drift-guard tests pin the running binary's answer and the server's constant to their manifests, so any future hardcoding fails on the first bump rather than in a user's terminal. Changesets included in the same commit as the fix this time.
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.
Found by the
0.1.1cold-install smoke test: the freshly published CLI introduced itself as0.1.0.Both
membook --versionand the MCP server'sSERVER_VERSIONwere hardcoded strings — changesets bumpspackage.json, and a constant nobody remembers is wrong by the second release, forever. Both now read the manifest at runtime (createRequire;src/anddist/sit at the same depth, so one relative path serves tests and the published tarball alike).Drift guards added: a test runs the built binary and pins
--versiontopackage.json; another pinsSERVER_VERSIONthe same way. Any future hardcoding fails on the first version bump instead of in a user's terminal.Changesets for both packages are in the PR — same commit as the fix, per the lesson from #20. Merging starts the
0.1.2train formembook+@membook/mcp; core and spec are untouched. 463 tests green; built artifact verified answering0.1.1pre-bump.