Skip to content

Commit

Permalink
doc: clarify caret requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
tompscanlan committed Sep 15, 2023
1 parent d5336f8 commit 0454f95
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/doc/src/reference/specifying-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,17 @@ using special operators, though it shouldn't be necessary most of the time.

### Caret requirements

**Caret requirements** are an alternative syntax for the default strategy,
`^1.2.3` is exactly equivalent to `1.2.3`.
**Caret requirements** are the default version requirement strategy.
This version strategy allows [SemVer] compatible updates.
They are specified as version requirements with a leading caret (`^`).

`^1.2.3` is an example of a caret requirement.

Leaving off the caret is a simplified equivalent syntax to using caret requirements.
While caret requirements are the default, it is recommended to use the
simplified syntax when possible.

`log = "^1.2.3"` is exactly equivalent to `log = "1.2.3"`.

### Tilde requirements

Expand Down

0 comments on commit 0454f95

Please sign in to comment.