Semantic Versioning (SemVer) Explained
package.json: "react": "^18.2.0"
What does that caret ^ mean?
The Format: MAJOR.MINOR.PATCH
1.2.3
- MAJOR: Breaking changes. (API removed, incompatible).
- MINOR: New features, backwards compatible.
- PATCH: Bug fixes, backwards compatible.
Dependencies Symbols
~1.2.3: Allow Patch updates. (1.2.4 is ok, 1.3.0 is NOT).^1.2.3: Allow Minor updates. (1.3.0 is ok, 2.0.0 is NOT). Default.*: Anything (Dangerous).
Why it matters?
If you release a library and change a function name, you MUST bump Major version. If you fix a typo, bump Patch.
Respecting SemVer builds trust. Breaking it breaks the internet.