Repository navigation
feat(create-release-branch): apply a Changesets release - #169
Draft
GuillaumeRx wants to merge 1 commit into
Draft
GuillaumeRx wants to merge 1 commit into
GuillaumeRx wants to merge 1 commit into
Conversation
3 of 4 tasks
GuillaumeRx
force-pushed
the
gr/crb-cs-05-apply
branch
from
November 12, 2026 14:54
d57bb2a to
efa7c2c
Compare
GuillaumeRx
force-pushed
the
gr/crb-cs-05-apply
branch
2 times, most recently
from
November 12, 2026 15:41
384d067 to
a852273
Compare
GuillaumeRx
force-pushed
the
gr/crb-cs-05-apply
branch
from
November 12, 2026 16:11
a852273 to
0eb8a67
Compare
GuillaumeRx
force-pushed
the
gr/crb-cs-05-apply
branch
2 times, most recently
from
November 12, 2026 17:33
7f04499 to
2086f30
Compare
Add applyChangesetsRelease, which writes a planned Changesets release to the project. It checks the .changeset directory and the changelogs first, then runs applyReleasePlan, rewrites the changelogs of the released packages, writes the new root version, and restores the Changesets that the release only partly consumed. The messages that applyReleasePlan writes to the console when it fails are dropped, because the error that it throws already describes the failure. Changesets mode releases only the Changesets. A released package whose changelog has entries in Unreleased stops the release before any file changes. The rewrite with auto-changelog adds the link reference definition of the new release section and removes the empty Unreleased section. The root changelog does not change. @metamask/changesets-changelog now writes an entry without a pull request link if the commit subject of its changeset has no pull request number, for example a Changeset committed on the release branch. The maintainer can add the link by hand.
GuillaumeRx
force-pushed
the
gr/crb-cs-05-apply
branch
from
November 13, 2026 10:28
2086f30 to
39e4242
Compare
This branch has not been deployed
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.
Explanation
Writes a planned release to the project. Nothing in
create-release-branchuses this code yet.applyChangesetsReleasefirst checks that.changesethas no uncommitted changes. This check is also exported ascheckChangesetDirectory, so that the mode can run it earlier. It also checks that the changelog of each released package can be parsed, has no entries inUnreleased, and can take a new release section. If a check fails, it throws aChangesetsSetupErrorbefore it changes any file. Then it:applyReleasePlanto bump the versions, write the release sections, and delete the used Changesets.applyReleasePlanwrites toconsole.errorwhen it cannot generate a changelog, and then throws. The tool drops these console messages and reports the error as aChangesetsApplyError.@metamask/apply-release-plandoes not change.@metamask/auto-changelog. This adds the link of the new release section and removes the emptyUnreleasedsection.package.json.applyReleasePlanonly updates the dependency ranges of the root, not its version. The root changelog does not change.If a step fails, it throws a
ChangesetsApplyError. The error tells the user to rungit stash --include-untrackedand try again.Changesets mode releases only the Changesets. It does not move
Unreleasedentries into the release. The error forUnreleasedentries asks the user to move them into a Changeset and commit it, or to remove them.@metamask/changesets-changelogno longer fails if the subject of the commit that added a Changeset has no pull request number. It writes the entry without a link. An example is a Changeset that the maintainer commits on the release branch. The maintainer can add the link by hand. It still fails if it cannot find the commit.New dependency:
@metamask/apply-release-plan. It is not published yet. It must be published before or withcreate-release-branch.References
create-release-branchChecklist