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
Copy file name to clipboardExpand all lines: README.md
+28-2Lines changed: 28 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,11 +17,37 @@ There are five basic comparators:
17
17
* Greater than or equal to ``>=A.B.C``
18
18
19
19
### Advanced comparators
20
-
##### Wildcard ``*````*.*````*.*.*``
20
+
21
+
##### Wildcards ``*````*.*````*.*.*``
22
+
Wildcard comparators can be satisfied by any version, even prerelease one.
23
+
24
+
Instead of ``*`` character can be used ``x`` or ``X``.
25
+
21
26
##### Wildcard ranges ``A.*.*````A.B.*``
22
-
##### Caret with ``^A.B.C````^A.B````^A``
27
+
Wildcard ranges can be satisfied when only part of version is matching. In contrast to wildcards, wildcard ranges cannot be satisfied by prerelease versions.
28
+
29
+
*``A.*.*`` is satisfied when majors are the same,
30
+
*``A.B.*`` is satisfied when majors and minors are the same.
31
+
32
+
The special character (``*``, ``x`` or ``X``) is optional.
33
+
34
+
###### Examples
35
+
*``1.2`` := ``>=1.2.0 <1.3.0``
36
+
*``5.*.*`` := ``>=5.0.0 <6.0.0``
37
+
38
+
##### Caret ranges ``^A.B.C``
39
+
Matches to compatible versions.
40
+
41
+
###### Examples
42
+
*``^1.2.3`` := ``>=1.2.3 <2.0.0``
43
+
*``^0.1.2`` := ``>=0.1.2 <0.2.0``
44
+
*``^0.0.1`` := ``>=0.0.1 <0.0.2``
45
+
23
46
##### Tilde ranges ``~A.B.C````~A.B````~A``
47
+
If patch version is specified tilde ranges matches to all greater or equal versions with the same minor version. Otherwise is equivalent of ``A.B.*`` when minor version is specified or ``A.*.*`` when not.
48
+
24
49
##### Hyphen ranges ``A.B.C - X.Y.Z``
50
+
Hyphen range ``A.B.C - X.Y.Z`` equivalent of ``>=A.B.C <=X.Y.Z``.
25
51
26
52
### Prerelease versions
27
53
Prerelease versions can satisfy comparators set only when have the same minor major and patch numbers as at least one of comparators.
0 commit comments