🚀Semantic Versioning (SemVer)
Also known as SemVer, MAJOR.MINOR.PATCH, Version Number
Version numbers in three parts. They say how big a change is.
Think of it like
Think of it like a traffic light for updates. The number tells you if it is safe to go.
Example
Jack's library is at 1.2.3. He adds a new option, so it becomes 1.3.0. Later he removes an old function, so it becomes 2.0.0.
Why it matters
Tools read these numbers to decide which updates are safe to install by themselves.
Definition
Example code
console
$ npm version minor
v1.3.0
$ npm version patch
v1.3.1
$ npm version major
v2.0.0Common mistake
Key takeaways
- 1Patch. A fix, nothing else.
- 2Minor. New, but old code still works.
- 3Major. Something old breaks.