This code is an example:
{
"dependencies": {
"gulp": "~0.0.1",
"browser-sync": "^0.0.1"
}
}
This code is an example:
{
"dependencies": {
"gulp": "~0.0.1",
"browser-sync": "^0.0.1"
}
}
In a simplified way TIL (~) only accepts the most recent minor version (the middle number). ~ 1.2.3 will accept all 1.2.x versions but will reject 1.3.0.
CIRCUNFLEXO (^) accepts the most recent Major Version (first issue) . ^ 1.2.3 will accept any 1.x.x release including 1.3.0, but will reject the 2.0.0.
In short, the use of tilde (~) offers bug fixes and the circumflex (^) offers new functionality backwards compatible.
See this image at Semantic Versioning Cheatsheet:
Seeademointhetable:
Reference