Skip to content

Commit 898c25c

Browse files
authored
Document version matching with multiple constraints (#6137)
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
1 parent 6c595ea commit 898c25c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/reference/stdlib-types.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -938,4 +938,6 @@ The following methods are available for a VersionNumber:
938938
}
939939
```
940940

941+
: Multiple constraints can be specified as a comma-separated list, e.g. `>=23.10, <=24.10`.
942+
941943
: Alternatively, the version can be postfixed with `+`, which is similar to `==` but also allows the last version part to be greater. For example, `23.10.1+` is satisfied by `23.10.1` and `23.10.2`, but not `23.11.x` or `23.09.x`. Additionally, `23.10.+` is equivalent to `23.10.0+`. This operator is a useful way to enforce a specific version while allowing for newer patch releases.

0 commit comments

Comments
 (0)