Rename canary command to prerelease; simplify ChangeType#1224
Draft
Rename canary command to prerelease; simplify ChangeType#1224
canary command to prerelease; simplify ChangeType#1224Conversation
Agent-Logs-Url: https://github.com/microsoft/beachball/sessions/dd2b3791-2992-450d-9f89-6b00c7ef6c81 Co-authored-by: ecraig12345 <5864305+ecraig12345@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
ecraig12345
April 29, 2026 10:39
View session
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.
Reworks prerelease publishing per the revised plan: renames the
canarycommand, removes overlapping options, and shrinks theChangeTypeunion.Command and option changes
beachball canary→beachball prerelease(no alias).canaryNameremoved;prereleasePrefixis now the suffix used bybeachball prerelease(e.g."beta","pr30") and defaults to"prerelease".prereleasePrefixno longer affectsbump/publish.ChangeTypeshrunk to'patch' | 'minor' | 'major' | 'none'premajor/preminor/prepatchare auto-coerced tomajor/minor/patchwith a warning at read time.type: "prerelease"produce a hard error directing the user to recreate the file and usebeachball prerelease.--type/--dependent-change-typeCLI args.Prerelease versioning algorithm
New pure helper
bump/getPrereleaseVersion.ts:currentVersion.changeType(or pass through for'none') to get the target release.listPackageVersionsto find the highest existing${target}-${prereleasePrefix}.<n>and return<n+1>(or start fromidentifierBase:'0'default,'1', orfalsefor no counter).This replaces the old
do { semver.inc(v, 'prerelease', name) } while (versionExists)loop and fixes the0.2.0 + minor → 0.3.0-beta.0case (issue #676).Prerelease → release promotion (assumption E)
bumpPackageInfoVersionstrips any prerelease component from the current version before applyingsemver.inc, so apatchchange against1.0.0-beta.0produces1.0.1rather than another prerelease.Docs
New
docs/cli/prerelease.md; sidebar updated;--prerelease-prefixrows removed frombump.md/publish.md;prereleasePrefixrow inconfiguration.mdrewritten; "Prereleases" subsection added tochange-types.md.