ci: guard against package.json / plugin.json version skew#10
Merged
walkindude merged 1 commit intomasterfrom Apr 26, 2026
Merged
ci: guard against package.json / plugin.json version skew#10walkindude merged 1 commit intomasterfrom
walkindude merged 1 commit intomasterfrom
Conversation
The plugin manifest at .claude-plugin/plugin.json was silently out of
sync with package.json between v0.1.0 and v0.1.2 (0.1.0 vs 0.1.1)
because the README's release instructions ("bump the version field
in .claude-plugin/plugin.json and package.json") relied on the
releaser remembering both files. The skew was caught by eyeballing,
which is the worst possible mechanism. This commit replaces eyeballing
with a deterministic check.
- scripts/check-versions.mjs: reads both files, asserts the version
fields match, exits 1 with a human-readable mismatch report when
they don't.
- package.json: adds the check:versions npm script.
- lefthook.yml: pre-commit hook fires when either file is staged,
blocking the commit on mismatch (joins the existing lint/typecheck/
test/format gate).
- .github/workflows/ci.yml: runs check:versions in the check job, so
the gate holds on PRs even when local hooks are bypassed with
--no-verify or unconfigured contributors push.
Verified by hand: passes against the current matched 0.1.2 / 0.1.2
state, fails with the expected mismatch report when one file is
nudged off-version.
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
The plugin manifest at `.claude-plugin/plugin.json` was silently out of sync with `package.json` between v0.1.0 and v0.1.2 (0.1.0 on the plugin side vs 0.1.1 on package). The README's release instructions ("bump the `version` field in `.claude-plugin/plugin.json` and `package.json`") rely on the releaser remembering both files. The skew was caught by eyeballing during the v0.1.2 release, which is the worst possible mechanism.
This PR replaces eyeballing with a deterministic check at two layers:
Test plan
🤖 Generated with Claude Code