fix(release): prevent calver prerelease jumps and fail on invalid semantic drift#176
Merged
fix(release): prevent calver prerelease jumps and fail on invalid semantic drift#176
Conversation
Map releasable commit types to patch cadence on main/next. Prevents prerelease train jumps to new minor from feat commits. Replace unsupported verifyRelease mutation with divergence guard against computeCalverVersion for fail-fast behavior. Add unit coverage for mapping, delegated commit analysis, and calver divergence safeguards.
Use month-rollover minor bump mapping in calver-plugin analyze step. Adopt monthly reset to patch .0 so semantic-release can model rollover. Keep verifyRelease guard to block any future version drift. Expand release tests for rollover mapping and rollover versions.
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
calver-pluginpatchminorverifyReleasecontext mutation with explicit calver divergence validation.0Root cause addressed
verifyReleasetried to mutatecontext.nextRelease.version, but semantic-release passes plugins a cloned context, so mutation never persisted. semantic-release then published the original semver-derived version (2026.5.0-next.1).Behavior after this PR
feat/fixonnextstill trigger releases with prerelease cadencenext:...-next.N+1next:YYYY.(M+1).0-next.1Validation
npm run check:cinpx tsc --noEmitnpm testnpm run buildnpx vitest run tests/unit/release/calver-plugin.test.ts tests/unit/release/calver.test.ts