Skip to content

Commit

Permalink
Merge pull request #83 from greysteil/clarify-caret-range
Browse files Browse the repository at this point in the history
Clarify caret operator range for pre-1.0.0 dependencies
  • Loading branch information
mattfarina committed Sep 5, 2019
2 parents 5bc3b91 + 5dc6477 commit 3f0da8e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -160,6 +160,7 @@ The caret (`^`) comparison operator is for major level changes. This is useful
when comparisons of API versions as a major change is API breaking. For example,

* `^1.2.3` is equivalent to `>= 1.2.3, < 2.0.0`
* `^0.0.1` is equivalent to `>= 0.0.1, < 1.0.0`
* `^1.2.x` is equivalent to `>= 1.2.0, < 2.0.0`
* `^2.3` is equivalent to `>= 2.3, < 3`
* `^2.x` is equivalent to `>= 2.0.0, < 3`
Expand Down
1 change: 1 addition & 0 deletions constraints_test.go
Expand Up @@ -406,6 +406,7 @@ func TestConstraintsValidate(t *testing.T) {
{"^1.x", "1.1.1", true},
{"^2.x", "1.1.1", false},
{"^1.x", "2.1.1", false},
{"^0.0.1", "0.1.3", true},
{"~*", "2.1.1", true},
{"~1", "2.1.1", false},
{"~1", "1.3.5", true},
Expand Down

0 comments on commit 3f0da8e

Please sign in to comment.