Skip to content
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

Dependency range workspace:^ isn't treated as semver range, bumping dependent packages #1290

Open
Pike opened this issue Jan 12, 2024 · 1 comment · May be fixed by #1291
Open

Dependency range workspace:^ isn't treated as semver range, bumping dependent packages #1290

Pike opened this issue Jan 12, 2024 · 1 comment · May be fixed by #1291

Comments

@Pike
Copy link

Pike commented Jan 12, 2024

Affected Packages

  • assemble-release-plan

Problem

Dependents that are specifying their dependency as workspace:^ get their version bumped regardless of the versions.

This is due to workspace:^ being mapped to the dependency range ^ in

: versionRange.replace(/^workspace:/, ""),

and that's not a valid Range in semver land. And then the check in

!semverSatisfies(
incrementVersion(nextRelease, preInfo),
versionRange
))

fails to detect that the semver satisfies.

Proposed solution

Probably better to replace workspace:^ with "^" + dependencyRelease.oldVersion

@Rugvip
Copy link
Contributor

Rugvip commented Jan 13, 2024

Wanna chime in that this has been a pain point for us in the Backstage repo, with releases causing a lot of unnecessary version bumps. Painful enough to be annoying, but harmless enough that we haven't prioritized digging into what's going on 😅

Would be awesome to see a fix for this 👍, would help both us and likely a lot of other people publishing releases from workspace monorepos. Also @Pike is a ⭐ from the Backstage community so expecting a quality fix 😁

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 a pull request may close this issue.

2 participants