-
Notifications
You must be signed in to change notification settings - Fork 550
feat(build-cli): New vnext generate:changelog command #24899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(build-cli): New vnext generate:changelog command #24899
Conversation
build-tools/packages/build-cli/src/commands/vnext/generate/changelog.ts
Outdated
Show resolved
Hide resolved
build-tools/packages/build-cli/src/commands/vnext/generate/changelog.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing that I found obviously concerning but I can't quite "run this in my head" to consider edge cases or other possible problems. Since it's a vnext command I think it's fine to merge and iterate if necessary, but maybe you want another reviewer.
@@ -55,8 +55,8 @@ export const releaseGroupFlag = Flags.custom<ReleaseGroup>({ | |||
* A re-usable CLI flag to parse release group names. | |||
*/ | |||
export const releaseGroupNameFlag = Flags.custom<ReleaseGroupName>({ | |||
required: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is default so redundant?
Adds a replacement vnext command for
generate:changelog
. The new command is based on the BuildProject infrastructure as all vnext commands are.The primary change in this command is that git is no longer used to revert changes. All changes are just made locally and must be committed manually. The main thing we were reverting was a version bump, which is trivial to reset using the
setVersion
function in build-infra.I also moved the
canonicalizeChangeset
function to a shared location and call it from both the old and new commands.Once we feel good about the new command, we can remove the old one, replace it with the one in vnext, and add a deprecated alias for the now-removed vnext command.
A lot of the approach here is informed by changesets/changesets#595, which is basically what we'd like. Ideally we could ask changesets to generate changelogs for a version that we provide (without also bumping versions), but that doesn't exist at the moment.