Learn the vocabulary of encoding compatibility risk directly into a package's major, minor, and patch numbers.
0 / 5 completed
1 / 5
At standup, a dev mentions a version-numbering scheme where a package's version is split into major, minor, and patch numbers, and incrementing the major number specifically signals that the release contains a breaking change to its public API. What is this scheme called?
Semantic versioning is exactly this: it splits a package's version into major, minor, and patch numbers, where incrementing the major number signals a breaking change to the public API, incrementing the minor number signals a backward-compatible new feature, and incrementing the patch number signals a backward-compatible bug fix. A hash collision is an unrelated hash-table concept about two keys sharing a bucket. This encode-compatibility-in-the-version-number approach is exactly why a dependency manager can decide automatically whether a given update is safe to pull in.
2 / 5
During a design review, the team adopts semantic versioning for a published library, specifically because a consumer's dependency manager can automatically accept a minor or patch update while refusing a major update without explicit review. Which capability does this provide?
Semantic versioning here provides automated, safe dependency updates based on the version number alone, since the version's major, minor, or patch position tells a dependency manager exactly how much compatibility risk an update carries without needing to read the changelog first. A version number with no meaning attached to its position at all gives a dependency manager no signal about whether an update is safe to pull in automatically. This version-number-encodes-risk behavior is exactly why semantic versioning lets automated dependency updates work safely at scale.
3 / 5
In a code review, a dev notices a published library bumps its version number arbitrarily with every release, sometimes shipping a breaking API change under what looks like a routine patch-level bump, instead of following semantic versioning's major-minor-patch convention. What does this represent?
This is a missed semantic-versioning opportunity, since bumping the major number specifically for breaking changes would let consumers' dependency managers detect the risk automatically instead of being surprised by a breaking change hidden in a patch-level bump. A cache eviction policy is an unrelated concept about discarded cache entries. This arbitrary-version-bump pattern is exactly the kind of surprise a reviewer flags once other projects depend on the library's version number to gauge risk.
4 / 5
An incident report shows a production build broke after an automated dependency update, because a library shipped a breaking API change under what looked like a routine patch-level version bump, and the dependency manager had no reason to flag it for review. What practice would prevent this?
Following semantic versioning strictly signals a breaking change through a major version bump that a dependency manager can flag for explicit review. Continuing to bump the version number arbitrarily with every release regardless of how many breaking changes end up hidden under routine-looking patch bumps is exactly what caused the build breakage described in this incident. This strict major-minor-patch discipline is the standard fix once automated dependency updates are found to trust the version number's meaning.
5 / 5
During a PR review, a teammate asks why the team enforces semantic versioning instead of simply describing every change in a human-readable changelog, given that a changelog already explains what changed in detail. What is the reasoning?
Semantic versioning lets a dependency manager decide automatically, from the version number alone, whether an update is safe to pull in without human review, while a changelog is valuable for humans to read but gives an automated tool no structured signal about compatibility risk unless someone parses its prose. This is exactly why semantic versioning underpins automated dependency-update tooling, while a changelog remains a complementary, human-facing explanation.