Semantic Versioning
Versions are MAJOR.MINOR.PATCH. ^1.2.3 allows minor and patch updates, ~1.2.3 allows patches only.
Example
const v = "2.4.1".split(".").map(Number);
console.log({ major: v[0], minor: v[1], patch: v[2] });
console.log("^2.4.1 allows 2.x.x, ~2.4.1 allows 2.4.x");Result
{ major: 2, minor: 4, patch: 1 }
^2.4.1 allows 2.x.x, ~2.4.1 allows 2.4.xExercise
Breaking changes bump.
The number
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.