fix(#155): finalize existing prerelease versions during bump planning#156
Merged
Conversation
- Update `Update-NovaModuleVersion` to finalize current prerelease versions before incrementing. - Adjust tests to reflect changes in version resolution logic.
3 tasks
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
- clarify steps for reading prompt and template files - enforce structure for PR description output - ensure creation of output folder if missing
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Gates Passed
6 Quality Gates Passed
See analysis details in CodeScene
Quality Gate Profile: Pay Down Tech Debt
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
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
Fix
nova bump --what-ifso stable bumps finalize an existing prerelease instead of advancing to the next semantic version.Before this change, a project on a prerelease like
2.0.0-preview01could incorrectly plan:2.0.0-preview01 -> 2.1.0when the inferred label was
Minor.After this change, stable bump planning now correctly finalizes the current semantic core:
2.0.0-preview01 -> 2.0.0unless the user explicitly requests prerelease continuation with
--preview.Problem
The stable bump path treated prerelease versions as if they should continue through normal semantic increment logic based on the inferred label.
That caused incorrect plans such as:
2.0.0-preview01 -> 2.1.0instead of finalizing the current prerelease line:
2.0.0-preview01 -> 2.0.0The intended rule is general: if the current version already contains a prerelease suffix such as
preview,beta, orrc, the default stable next step should be to remove that suffix and finalize the same semantic version.What changed
Release logic
Tests
nova bump --what-iffrom2.0.0-preview01to2.0.0.Documentation
README.mddocs/NovaModuleTools/en-US/Update-NovaModuleVersion.mdExample
Before
After
Validation
Ran targeted regression coverage for release planning and CLI behavior:
tests/CoverageGaps.ReleaseInternals.Tests.ps1tests/NovaCommandModel.BumpAndCli.Tests.ps1tests/NovaCommandModel.StandaloneCli.Tests.ps1Result:
Also verified:
2.0.0User impact
This makes
nova bumpalign with the documented prerelease-finalization behavior and avoids skipping over the intended stable release when a project is already on a prerelease version.