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

fix(semver): correctly remove spaces between operators and versions in parseRange() #5564

Merged
merged 2 commits into from
Jul 29, 2024

Conversation

iuioiua
Copy link
Contributor

@iuioiua iuioiua commented Jul 29, 2024

Missed in #4375

@iuioiua iuioiua requested a review from kt3k as a code owner July 29, 2024 03:55
Copy link

codecov bot commented Jul 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.48%. Comparing base (72e2462) to head (061f753).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5564   +/-   ##
=======================================
  Coverage   96.48%   96.48%           
=======================================
  Files         465      465           
  Lines       37772    37772           
  Branches     5580     5580           
=======================================
  Hits        36445    36445           
  Misses       1285     1285           
  Partials       42       42           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@iuioiua iuioiua enabled auto-merge (squash) July 29, 2024 04:00
Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

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

LGTM

@iuioiua iuioiua merged commit 2b33b55 into main Jul 29, 2024
13 checks passed
@iuioiua iuioiua deleted the semver-tild-fix branch July 29, 2024 04:06
@@ -406,7 +406,7 @@ function parseOperatorRanges(string: string): Comparator[] {
export function parseRange(range: string): Range {
return range
// remove spaces between operators and versions
.replaceAll(/(?<=<|>|=) +/g, "")
.replaceAll(/(?<=<|>|=|~) +/g, "")
Copy link
Member

Choose a reason for hiding this comment

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

Do we also need to take care of ^?

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

Successfully merging this pull request may close these issues.

2 participants