Skip to content

fix(core): let semver try to match first in satisfiesWithPrereleases #3133

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

Merged
merged 1 commit into from
Jul 26, 2021

Conversation

merceyz
Copy link
Member

@merceyz merceyz commented Jul 18, 2021

What's the problem this PR addresses?

Some of the extensions added in #3082 didn't get applied since satisfiesWithPrereleases didn't match them correctly

How did you fix it?

Let semver see if the version satisfies the range and if it doesn't run our loose check

Checklist

  • I have read the Contributing Guide.
  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@merceyz merceyz requested a review from arcanis as a code owner July 18, 2021 09:09
@@ -43,6 +43,9 @@ const SPECS: Specs = [
[`1.0.0-rc2`, `1.0.0-rc4`, false],
[`1.0.0-rc4`, `1.0.0-rc2`, false],
[`1.0.0-beta.1`, `1.0.0-beta.2`, false],

// These don't match with our patch but do without it
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand this comment 😅

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, the wording is horrible but the gist of it is that before this PR semverUtils.satisfiesWithPrereleases(version, range) didn't match while semver.satisfies(version, range, {includePrerelease: true}) does.

@arcanis arcanis merged commit 2686e46 into master Jul 26, 2021
@arcanis arcanis deleted the merceyz/fix/semver-match branch July 26, 2021 11:39
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