Skip to content

release: a file holding two version fields gets both - #57

Merged
Jing-yilin merged 1 commit into
mainfrom
fix-bump-two-fields
Sep 9, 2026
Merged

release: a file holding two version fields gets both#57
Jing-yilin merged 1 commit into
mainfrom
fix-bump-two-fields

Conversation

@Jing-yilin

Copy link
Copy Markdown
Contributor

What this changes

scripts/bump-version.sh. Dispatching Release with 1.1.0 failed at the bump step (run), which is the one place it was cheap to find out:

error: versions disagree: 1.0.0, 1.1.0
  1.0.0  .claude-plugin/marketplace.json:metadata.version
  1.1.0  .claude-plugin/marketplace.json:plugins.0.version

Six of the seven version fields are one per file; the marketplace catalogue holds two. Since #54 the script reads every file before writing any of them, so both catalogue writes started from the same pre-write text and the second one dropped the first.

Reading first is still right — it is what stops a file listed in .version-bump.json but missing from leaving a half-versioned tree. The reads are now keyed by path instead of by field, and every field of a file is applied to one text that gets written once.

Verified

scripts/bump-version.sh 1.1.0 then --check: all seven agree, both catalogue fields moved, the file's formatting is unchanged, and a second run reports all seven already there and writes nothing. Manifests reverted to 1.0.0 in this branch — moving them is the release workflow's job.

No new test: --check right after the set is what caught this, it already runs in the release workflow and in the local gates, and it fails on exactly the state this bug produces.

Checklist

  • No ref-*.html, assets/refs/ or other third-party captures are in this PR.
  • No canvas folder changed.
  • Nothing user-visible: no release has ever been cut with the bug, so no ## Unreleased line.
  • No canvas/ change.

Dispatching Release with 1.1.0 failed at the bump, which is where it was
supposed to fail if it was going to fail at all: the marketplace catalogue
holds two of the seven fields, metadata.version and plugins.0.version, and the
script had been reading every file before writing any of them. Each write then
started from the text read before the other write, so the second one dropped
the first and metadata.version stayed at 1.0.0.

Reading first is still right — it is what keeps a missing file from leaving a
half-versioned tree — so the reads are now keyed by path rather than by field,
and every field of a file is applied to one text that is written once.

No new test. `--check` immediately after the set is what caught this, it runs
in the release workflow and in the local gates, and it fails on exactly the
state this bug produces.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying super-prototyping with  Cloudflare Pages  Cloudflare Pages

Latest commit: 06f1e54
Status: ✅  Deploy successful!
Preview URL: https://48dcc529.super-prototyping.pages.dev
Branch Preview URL: https://fix-bump-two-fields.super-prototyping.pages.dev

View logs

@Jing-yilin
Jing-yilin merged commit aa3b977 into main Sep 9, 2026
8 checks passed
@Jing-yilin
Jing-yilin deleted the fix-bump-two-fields branch September 9, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant