feat: release next major as beta by default - #17
Conversation
Derive a `${majorVersion + 1}.x` release branch that publishes prereleases
under the `beta` npm dist-tag, so work on the next major can ship without
moving `latest`. Downstream `releaseBranches` are merged on top, keyed by
branch name, so an entry for the next major branch replaces the default.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
📝 WalkthroughWalkthroughThe change adds automatic ChangesRelease branch generation
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant AlmaCdkConstructLibraryOptions
participant buildAwsCdkConstructLibraryOptions
participant buildReleaseBranches
participant ReleaseTasks
AlmaCdkConstructLibraryOptions->>buildAwsCdkConstructLibraryOptions: provide majorVersion and releaseBranches
buildAwsCdkConstructLibraryOptions->>buildReleaseBranches: build validated branch configuration
buildReleaseBranches-->>buildAwsCdkConstructLibraryOptions: return generated and overridden branches
buildAwsCdkConstructLibraryOptions->>ReleaseTasks: configure release task environment variables
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 `@README.md`:
- Line 95: Update the README migration note to recommend removing a manually
declared next-major branch only when it exactly matches the generated beta
configuration; otherwise, instruct users to retain it, including when its
dist-tag, prerelease, or branch options differ.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 1d624fcd-2900-441b-880a-7a15d942b187
⛔ Files ignored due to path filters (1)
test/__snapshots__/AlmaCdkConstructLibrary.test.ts.snapis excluded by!**/*.snap
📒 Files selected for processing (7)
API.mdREADME.mdsrc/AlmaCdkConstructLibrary.tssrc/releaseBranches.tssrc/schemas/almaCdkConstructLibraryOptions.tstest/AlmaCdkConstructLibrary.test.tstest/releaseBranches.test.ts
| }, | ||
| ``` | ||
|
|
||
| Note: downstream projects that previously declared the `${MAJOR_VERSION + 1}.x` branch by hand can now drop it – the generated default is identical. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Limit the migration advice to matching configurations.
A manual next-major entry is not always identical to the generated entry. It can use another dist-tag, prerelease, or branch option. Removing it can change publishing behavior or discard configuration. State that users can remove the entry only when it exactly matches the generated beta configuration.
Proposed fix
-Note: downstream projects that previously declared the `${MAJOR_VERSION + 1}.x` branch by hand can now drop it – the generated default is identical.
+Note: downstream projects can remove a manual `${MAJOR_VERSION + 1}.x` entry only when it matches the generated beta configuration and has no additional branch options.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Note: downstream projects that previously declared the `${MAJOR_VERSION + 1}.x` branch by hand can now drop it – the generated default is identical. | |
| Note: downstream projects can remove a manual `${MAJOR_VERSION + 1}.x` entry only when it matches the generated beta configuration and has no additional branch options. |
🤖 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 `@README.md` at line 95, Update the README migration note to recommend removing
a manually declared next-major branch only when it exactly matches the generated
beta configuration; otherwise, instruct users to retain it, including when its
dist-tag, prerelease, or branch options differ.
Derive a
${majorVersion + 1}.xrelease branch that publishes prereleases under thebetanpm dist-tag, so work on the next major can ship without movinglatest. DownstreamreleaseBranchesare merged on top, keyed by branch name, so an entry for the next major branch replaces the default.Summary by CodeRabbit
New Features
Documentation
Bug Fixes