Skip to content

Fix bug in 'flatten releases' function where 'none' release types don't play nicely with other release types - #693

Merged
Andarist merged 6 commits into
changesets:mainfrom
luciaquirke:fix-none-type-release-flatten
Jan 24, 2022
Merged

Andarist merged 6 commits into
changesets:mainfrom
luciaquirke:fix-none-type-release-flatten

Conversation

@luciaquirke

@luciaquirke luciaquirke commented Dec 6, 2021 •

Copy link
Copy Markdown
Contributor

Patch/minor/major releases can be overridden by none releases during the 'assemble release plan' stage of changeset version, making package versions fail to be bumped.

The fix consists of handling the 'none' release type in the flatten-releases function, and slightly simplifying the logic.

@changeset-bot

changeset-bot Bot commented Dec 6, 2021 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: debcfea

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

This PR includes changesets to release 2 packages
Name Type
@changesets/assemble-release-plan Patch
@changesets/cli 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

Comment on lines +94 to +100
setup.addChangeset({
id: "big-cats-yelp",
releases: [
{ name: "pkg-a", type: "none" },
{ name: "pkg-b", type: "none" },
{ name: "pkg-c", type: "none" }
]

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.

in a way, this part is not really required for this test, but I guess it doesn't hurt it

@@ -0,0 +1,5 @@
---
"@changesets/assemble-release-plan": patch

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.

q: is only this package affected? or is the CLI affected too? or maybe is this problem "fixed up" in some other part of the code when CLI runs end to end?

Copy link
Copy Markdown
Contributor 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 the bug is fixed up anywhere because we found some packages in production that hadn't been bumped as a result of this bug. The CLI is affected because it calls @changesets/assemble-release-plan.

@codesandbox-ci

codesandbox-ci Bot commented Jan 24, 2022 •

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit debcfea:

Sandbox Source
Vanilla Configuration

Comment thread .changeset/wild-schools-brake.md Resolved
Comment thread .changeset/wild-schools-brake.md Resolved
@Andarist
Andarist enabled auto-merge (squash) January 24, 2022 08:15
@Andarist
Andarist merged commit 1be201f into changesets:main Jan 24, 2022
@github-actions github-actions Bot mentioned this pull request Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants