Repository navigation
fix(ci): bump both server.json version fields in the Bump Version workflow - #483
Merged
gaurav-singh-9227 merged 1 commit intoOct 16, 2026
Conversation
…kflow
The server.json update step replaced the first `"version": "<old>"` string it
found. Since the 2.x line, server.json carries the version in two places — the
top-level `version` and the nested `packages[].version` — and the top-level one
comes first, so the nested field was never updated. The verify step reads
`packages[0].version`, so every dispatch failed with:
package.json=X lock=X lock.root=X server.json=<old>
Version mismatch: expected X, got <old>
Parse server.json and assign both fields explicitly instead of string-replacing,
and extend the verify step to cover the top-level field so a partial update
cannot pass silently.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
gaurav-singh-9227
approved these changes
Oct 16, 2026
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.
Fixes the
Bump Versionworkflow, which fails on every dispatch. Most recent failure: run 38398516264.What happens
The "Update server.json package version" step did a textual replace of the first
"version": "<old>"occurrence, on the assumption — stated in its own comment — that only the nestedpackages[].versioncould match, because the top-levelversionwas the schema version pinned at1.0.0.That stopped being true in the 2.x line:
server.jsonnow carries the release version in both fields, and the top-level one appears first.String.prototype.replacewith a string argument replaces only the first match, so the top-level field was updated andpackages[0].versionwas left stale — which is exactly the field the verify step reads.The fix
server.jsonand assignversionandpackages[0].versionexplicitly, instead of string-replacing. No dependency on field order or on how many fields happen to match.OLD_VERSIONis no longer needed by this step and is dropped from its env.Verification
Ran the new write logic against
main'sserver.json(2.2.2 → 2.2.3): both fields update, and the output is byte-identical to the original apart from the two version strings — the file already uses 2-space indentation with a trailing newline, so the JSON round-trip preserves formatting.Ran the full verify step over the result:
This cycle's bump was done by hand in #482, since the workflow could not produce it.