fix: SemverFilter must respect value2 with directional operators#77
Merged
Conversation
Filling the upper-bound field together with >=, >, <=, or < used to silently drop the upper bound, so ?comparison=>=&value=11.0.0&value2=11.2.0 returned everything >= 11.0.0 instead of [11.0.0, 11.2.0]. apply() now auto-promotes to a range whenever value2 is supplied with a directional operator. The operator carries inclusivity (>=/<= → inclusive, >/< → exclusive) and the two values are sorted numerically so the order the user typed them in doesn't matter. = and != still treat the second value as ignored (exact match semantics). Form placeholder updated to "upper bound (optional, makes it a range)" so it no longer reads as exclusive to between.
API Specification - Non-breaking changesAPI Changelog 1.0.0 vs. 1.0.0No changes detected |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #77 +/- ##
==========================================
Coverage ? 41.18%
Complexity ? 864
==========================================
Files ? 125
Lines ? 2722
Branches ? 0
==========================================
Hits ? 1121
Misses ? 1601
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Filling the upper-bound field with a directional operator silently dropped the upper bound, so e.g. `?comparison=>=&value=11.0.0&value2=11.2.0` returned everything `>= 11.0.0` (including `11.3.5`) instead of `[11.0.0, 11.2.0]`.
`apply()` now auto-promotes to a range whenever `value2` is supplied with a directional operator. `>=` / `<=` produce an inclusive range; `>` / `<` produce an exclusive one. The two values are sorted numerically so the order the user typed them in doesn't matter. `=` and `!=` still ignore `value2` (exact-match semantics).
Files Changed
Test Plan