We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 825d02b commit a3bbb41Copy full SHA for a3bbb41
lib/src/Range.purs
@@ -4,6 +4,7 @@
4
module Registry.Range
5
( Range
6
, caret
7
+ , exact
8
, codec
9
, greaterThanOrEq
10
, includes
@@ -147,6 +148,11 @@ mk lhs rhs | lhs < rhs = Just (Range { lhs, rhs })
147
148
mk _ _ = Nothing
149
150
-- | Produce a "caret range" from a version.
--- | I.e. "^0.15.6" ==> ">=0.15.6 > 0.16.0"
151
+-- | I.e. "^0.15.6" ==> ">=0.15.6 <0.16.0"
152
caret :: Version -> Range
153
caret v = Range { lhs: v, rhs: Version.bumpHighest v }
154
+
155
+-- | Produce a range that only covers an exact version.
156
+-- | I.e. "0.15.6" ==> ">=0.15.6 <0.15.7"
157
+exact :: Version -> Range
158
+exact v = Range { lhs: v, rhs: Version.bumpPatch v }
0 commit comments