You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added support for range version support in semver (#18557)
* Added support for range version support in semver
Signed-off-by: Shruti Garg <[email protected]>
* Added test coverage for missing lines
Signed-off-by: Shruti Garg <[email protected]>
* Fixed for non reachable code line and tests
Signed-off-by: Shruti Garg <[email protected]>
---------
Signed-off-by: Shruti Garg <[email protected]>
Copy file name to clipboardExpand all lines: libs/core/src/main/java/org/opensearch/semver/SemverRange.java
+49-4Lines changed: 49 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -16,11 +16,15 @@
16
16
importorg.opensearch.semver.expr.Caret;
17
17
importorg.opensearch.semver.expr.Equal;
18
18
importorg.opensearch.semver.expr.Expression;
19
+
importorg.opensearch.semver.expr.Range;
19
20
importorg.opensearch.semver.expr.Tilde;
20
21
21
22
importjava.io.IOException;
23
+
importjava.util.Locale;
22
24
importjava.util.Objects;
23
25
importjava.util.Optional;
26
+
importjava.util.regex.Matcher;
27
+
importjava.util.regex.Pattern;
24
28
25
29
importstaticjava.util.Arrays.stream;
26
30
@@ -31,19 +35,24 @@
31
35
* <li>'=' Requires exact match with the range version. For example, =1.2.3 range would match only 1.2.3</li>
32
36
* <li>'~' Allows for patch version variability starting from the range version. For example, ~1.2.3 range would match versions greater than or equal to 1.2.3 but less than 1.3.0</li>
33
37
* <li>'^' Allows for patch and minor version variability starting from the range version. For example, ^1.2.3 range would match versions greater than or equal to 1.2.3 but less than 2.0.0</li>
0 commit comments