Skip to content

Commit 0454f95

Browse files
committed
doc: clarify caret requirements
1 parent d5336f8 commit 0454f95

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/doc/src/reference/specifying-dependencies.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,17 @@ using special operators, though it shouldn't be necessary most of the time.
5757

5858
### Caret requirements
5959

60-
**Caret requirements** are an alternative syntax for the default strategy,
61-
`^1.2.3` is exactly equivalent to `1.2.3`.
60+
**Caret requirements** are the default version requirement strategy.
61+
This version strategy allows [SemVer] compatible updates.
62+
They are specified as version requirements with a leading caret (`^`).
63+
64+
`^1.2.3` is an example of a caret requirement.
65+
66+
Leaving off the caret is a simplified equivalent syntax to using caret requirements.
67+
While caret requirements are the default, it is recommended to use the
68+
simplified syntax when possible.
69+
70+
`log = "^1.2.3"` is exactly equivalent to `log = "1.2.3"`.
6271

6372
### Tilde requirements
6473

0 commit comments

Comments
 (0)