Skip to content

Do not accumulate changesets in prerelease mode - #2109

Closed
bluwy wants to merge 3 commits into
mainfrom
pre-no-changeset
Closed

Do not accumulate changesets in prerelease mode#2109
bluwy wants to merge 3 commits into
mainfrom
pre-no-changeset

Conversation

@bluwy

@bluwy bluwy commented Jun 23, 2026

Copy link
Copy Markdown
Member

close #1688
close #240
fix #1050

No tracking of changesets in pre.json, and clear changesets during version in prerelease like normal. The final pre exit release will not contain changelog of all previous prerelease changelog.

I'm still thinking whether to handle pre.json "changesets" still (filtering) so it's more compatible, but in this PR I took the more drastic approach for now and remove it entirely, and rely on readPreState to automatically apply the migration. The migration is mainly for those migrating from v2 while still in prerelease mode.

Any calls to readPreState will delete the "changesets" property and its referenced changeset files. This may be a little surprising.

@changeset-bot

changeset-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 43dd604

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@changesets/apply-release-plan Major
@changesets/assemble-release-plan Major
@changesets/cli Major
@changesets/pre Major
@changesets/release-utils Major
@changesets/types Major
@changesets/get-release-plan Patch
@changesets/changelog-git Patch
@changesets/changelog-github Patch
@changesets/config Patch
@changesets/get-dependents-graph Patch
@changesets/git Patch
@changesets/parse Patch
@changesets/read Patch
@changesets/should-skip-package Patch
@changesets/write Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 73.91304% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.95%. Comparing base (b0fbf85) to head (43dd604).

Files with missing lines Patch % Lines
packages/pre/src/index.ts 40.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2109      +/-   ##
==========================================
- Coverage   85.11%   84.95%   -0.16%     
==========================================
  Files          66       66              
  Lines        2526     2526              
  Branches      698      696       -2     
==========================================
- Hits         2150     2146       -4     
- Misses        346      350       +4     
  Partials       30       30              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

"@changesets/types": major
---

When exiting prerelease mode, the final changelog will now not include all changesets made since `pre enter`. This change was made as often changes during prereleases are not relevant to the final release, and it's not possible to query the entire Git and GitHub metadata when the backlog of changesets become sufficiently large.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how are we going to help with changeset pre exit then?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite understand the question. You mean how should the exited/stable release changelog should be? They could add changesets that summarizes the changes if they like just before the stable is released.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Re-adding changesets will screw up commit/PR auto-references generated by our changelog generators.
  2. It feels to me that we have many more meaningful changesets aggregated during pre mode than the temporary ones. So it feels that cleaning up temporary ones is less of a chore that having to re-add what is still relevant

@beeequeue beeequeue Jun 23, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think we should remove the accumulating changesets.
while it does suck when it has been open a long time i also don't think a lot of people are prepared to re-add changesets when exiting pre-release mode, at least not now.

maybe an option for this behavior would be better?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. I don't think it matters a lot but we can probably explore/expand on "none" changeset types that are added only for adding changelog, and we'd not link the commit/PR for it. They can also write a summary that links to the right PRs.
  2. Well there's a tipping point in which adding vs removing becomes a chore or not, depending on the size, like Exiting pre mode fails with 400+ changesets #1688. But fundamentally for me, it's better to keep changesets as summaries that describes the next version. Lending it to also describe the stable version doesn't feel right by default.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while it does suck when it has been open a long time i also don't think a lot of people are prepared to re-add changesets when exiting pre-release mode, at least not now.

They don't have to add a changeset when exiting. If there's not many prereleases, users can also read through the changes that happen before instead of duplicating it. If they don't have the habit of making the changelog good anyways then it's better we don't generate potentially low quality changelogs either.

maybe an option for this behavior would be better?

I prefer to not make an option for now. It also keeps our handling simpler.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They don't have to add a changeset when exiting. If there's not many prereleases, users can also read through the changes that happen before instead of duplicating it. If they don't have the habit of making the changelog good anyways then it's better we don't generate potentially low quality changelogs either.

This strategy doesn't quite work for GitHub releases that are derived from the latest CHANGELOG.md version entry.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it doesn't work, they'd have to look for the changes themselves elsewhere from the UI and that's an ok tradeoff.

@bluwy bluwy closed this Jun 23, 2026
@bluwy
bluwy deleted the pre-no-changeset branch June 23, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants