fix(release): select the prerelease versioning strategy - #1202
Conversation
release-please's default versioning strategy ignores `prerelease` and `prerelease-type` entirely -- those fields are only read by the `prerelease` versioning strategy, which only activates when "versioning": "prerelease" is set. Without it, a major bump produces a plain X.0.0 tag instead of X.0.0-beta.N. PR #1201 is live proof: it computed 3.0.0, not 3.0.0-beta.1, despite the fields added in #1199. That 3.0.0 proposal is itself spurious: an earlier commit described the conventional-commits breaking-change footer in prose, and the literal text was picked up by release-please's own scan even though nothing breaking shipped. main is force-push protected, so history can't be rewritten to remove it; folding it into an ordinary patch release is the supported way to clear it. Release-As: 2.55.1
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe release configuration sets the root package versioning mode to Assessment against linked issues
Possibly related PRs
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@release-please-config.json`:
- Around line 5-7: Update the prerelease-type setting in the release
configuration from beta to beta.1, preserving the existing prerelease versioning
behavior so breaking releases generate versions such as 3.0.0-beta.1.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 5df50b2a-0bc5-4a95-aa1d-6d8b0f156a2e
📒 Files selected for processing (1)
release-please-config.json
| "versioning": "prerelease", | ||
| "prerelease": true, | ||
| "prerelease-type": "beta", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
type="$(jq -r '.packages["."].["prerelease-type"]' release-please-config.json)"
test "$type" = "beta.1"
curl -fsSL \
https://raw.githubusercontent.com/googleapis/release-please/v17.6.0/src/versioning-strategies/prerelease.ts |
rg -n 'this\.prereleaseType|nextPrerelease ='Repository: supabase/supabase-swift
Length of output: 161
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- release-please-config.json ---'
cat -n release-please-config.json
printf '%s\n' '--- release-please references ---'
rg -n --glob '!node_modules' --glob '!dist' 'release-please|prerelease-type|versioning|2\.55\.1|3\.0\.0' .github release-please-config.json package.json 2>/dev/null || true
printf '%s\n' '--- Release Please prerelease strategy source ---'
curl -fsSL https://raw.githubusercontent.com/googleapis/release-please/v17.6.0/src/versioning-strategies/prerelease.ts |
sed -n '1,260p'Repository: supabase/supabase-swift
Length of output: 8813
Set prerelease-type to beta.1
A breaking release from 2.55.1 produces 3.0.0-beta with the current value. Set it to beta.1 to produce 3.0.0-beta.1.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@release-please-config.json` around lines 5 - 7, Update the prerelease-type
setting in the release configuration from beta to beta.1, preserving the
existing prerelease versioning behavior so breaking releases generate versions
such as 3.0.0-beta.1.
|
The following capabilities are marked
These may have been renamed, removed, or never registered. Please update the capability matrix. |
Coverage Report for CI Build 31642088759Coverage increased (+0.6%) to 84.582%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions7 previously-covered lines in 1 file lost coverage.
Coverage Stats
💛 - Coveralls |
What
Adds
"versioning": "prerelease"torelease-please-config.json, and forces the next release to2.55.1via aRelease-As:trailer.Why
release-please's default versioning strategy never looks at
prerelease/prerelease-type— those are only consumed by theprereleaseversioning strategy, selected via"versioning": "prerelease". #1199 added the two fields but not the strategy selector, so they were silently no-ops.#1201 is the proof: it computed a plain
3.0.0instead of3.0.0-beta.1.#1201's
3.0.0proposal is also spurious on its own terms — an earlier commit's message described the conventional-commits breaking-change footer in prose, and release-please's scan picked up the literal text as if it were a real breaking-change note. Nothing breaking has actually shipped.maindoesn't allow force-pushes, so the commit text can't be edited out of history; theRelease-As: 2.55.1trailer here tells release-please to treat the pending commits as an ordinary patch instead, which clears them from the "unreleased" window. One side effect:CHANGELOG.mdwill carry a stray, garbled breaking-change bullet under2.55.1— harmless, just odd-looking.Once this merges, #1201 should update to (or be superseded by) a
2.55.1release PR. I'll close #1201 once that happens.Context