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
Adhere to semver rules when using workspace:^ dependencies, fixes #1290 #1291
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 9b47c69 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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 |
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. |
if (versionRange === "workspace:*") { | ||
// workspace:* actually means the current exact version, and not a wildcard similar to a reguler * range | ||
workspaceRange = dependencyRelease.oldVersion; | ||
} else if (versionRange === "workspace:^") { |
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.
Afaik we'll want to handle ~
in a similar way as well
I started to dabble into the I think the culprit here are pre-releases, which is going to limit the impact this can have for projects like backstage:
This goes back to https://github.com/npm/node-semver?tab=readme-ov-file#prerelease-tags, which reads in backstage lingo: If we bump More details on why that also then affects the non-pre releases is in Emma's comment in #382 (comment). |
We ran into an issue where we cannot use @Andarist and team, is it possible to prioritize this merge? |
Another possible workaround, until Changesets code owners review the pull request, can be to patch (via PNPM if it's your default package manager or the patch-package module) I hope this workaround can unblock projects while not rushing @Andarist and the Changesets team 👍 . |
@adbayb indeed, we'll try it out and see how it works: backstage/backstage#24614. In particular, I expect this to improve our patch release process where we currently see too many package bumps. |
This fixes #1290.
I've adjusted the tests, and also ran my local code against the backstage repository.
On my current version, the
main
version updates some 200 packages, and with my patch it goes down to some 90.CC @Rugvip , @freben from that side.
PS: I went for a major release of all affected packages, as this is breaking backwards compat.
yarn changeset status
gives me: