-
Notifications
You must be signed in to change notification settings - Fork 588
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
Fixed an issue with dependant packages not being updated to their highest bump type in pre mode #446
Conversation
…hest bump type in pre mode
🦋 Changeset is good to goLatest commit: 688e9f5 We got this. This PR includes changesets to release 2 packages
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 |
@@ -92,9 +92,10 @@ function assembleReleasePlan( | |||
snapshotSuffix = getSnapshotSuffix(snapshot); | |||
} | |||
|
|||
let packagesByName = new Map( | |||
let initialPackagesByName = new Map( |
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.
Not the best name for this, but I don't know how to name this better. In general, I've spent a surprisingly long time fixing this issue (tracking it down alone was fairly quick and easy) - there is a lot happening here and some structures are faking data from before entering pre mode which makes this fairly hard to reason about. I would say this implementation is a good candidate for a future refactoring, but would definitely have to be done with care.
@@ -886,6 +886,114 @@ describe("pre", () => { | |||
} | |||
]); | |||
}); | |||
it("should use the highest bump type between all prereleases when versioning a dependant package", async () => { |
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.
not sure if this makes it super obvious what this test is testing for - not sure how to best call a process of versioning because of a dependency upgrade. Both of those 2 newly added tests cover what got described in a changeset - a situation when we need to upgrade a dependant package only because a dependency got upgraded but when that dependant had already a non-patch bump in the current pre mode.
friendly 🏓 @mitchellhamilton @Noviny , I believe this has just caused a problem with the recent Emotion prerelease as well ( emotion-js/emotion#1982 ) |
fixes #442