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

bugfix: ignore ranges when snapshot versioning is performed (use exact version) #857

merged 4 commits into from Jul 4, 2022


Copy link

Related: #855

Copy link

changeset-bot bot commented Jun 29, 2022

🦋 Changeset detected

Latest commit: 0b15dd4

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

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

Copy link

codesandbox-ci bot commented Jun 29, 2022

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 0b15dd4:

Sandbox Source
Vanilla Configuration

Copy link

uow nice! I've just crossed trough this problem, good timing for me though :)

Copy link
Contributor Author

Thanks for the code review @Andarist . I pushed fixes for all notes :)

@dotansimha dotansimha requested a review from Andarist July 3, 2022 07:56
@Andarist Andarist merged commit 7febb59 into changesets:main Jul 4, 2022
@github-actions github-actions bot mentioned this pull request Jul 4, 2022
@dotansimha dotansimha deleted the snapshot-exact-fix branch July 4, 2022 12:45
changesets: ["some-id"],
name: "pkg-b",
newVersion: "1.1.0",
Copy link

Choose a reason for hiding this comment

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

While working on #1008 I've noticed that this test case doesn't reflect how the full thing works in practice. Usually the newVersion should already have the snapshot modifier here. This would be computed here when assembling the release plan:

newVersion: snapshotSuffix
? getSnapshotVersion(
: getNewVersion(incompleteRelease, preInfo),

This test case still tests that the range modifier gets dropped when snapshot is provided:

let newNewRange = snapshot
? version
: `${getVersionRangeType(depCurrentVersion)}${version}`;

However... this should, sort of, be an impossible setup. Should we validate this anyhow? Should the test case be tweaked to reflect the real usage better?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants