Semantic Versioning (SemVer) Flashcards
What does the ‘MAJOR’ version number in Semantic Versioning indicate?
Incompatible API changes or breaking changes that might require users to adjust their code.
The version format in Semantic Versioning is ___.
MAJOR.MINOR.PATCH
True or False: A ‘MINOR’ version change indicates a backward-compatible bug fix.
False
How does Semantic Versioning benefit developers when updating software dependencies?
It provides clarity, compatibility, and predictability about updates, making it easier to manage dependencies and make updates confidently.
Fill in the blank: A backward-compatible bug fix would result in a change in the ______ version number.
PATCH
Compare a ‘MAJOR’ version change to a ‘MINOR’ version change in Semantic Versioning.
A ‘MAJOR’ version change involves breaking changes that may affect compatibility, while a ‘MINOR’ version change adds new features in a backward-compatible way.
What version number would come after 1.3.5 if a new feature is added without breaking compatibility?
1.4.0
True or False: The Semantic Versioning format allows for additional identifiers for pre-release versions and build metadata.
True
What is the purpose of the ‘PATCH’ version in Semantic Versioning?
To indicate backward-compatible bug fixes or minor changes that don’t impact functionality.
Provide an example of a Semantic Versioning number with build metadata.
1.0.0+20130313144700
In Semantic Versioning, what does a version change from 2.0.1 to 2.0.2 imply?
A minor bug fix or small change that is backward-compatible.
How would you label a pre-release version in Semantic Versioning? Give an example.
By adding an identifier like ‘-alpha’ or ‘-beta’; e.g., 1.0.0-alpha.
What happens when a MINOR version is updated?
A new feature is added in a backward-compatible way, meaning existing code doesn’t need to change.
Explain what the ‘2’ represents in version 2.3.4 under Semantic Versioning.
The MAJOR version, which indicates breaking changes that may require users to adjust their code.
In Semantic Versioning, what would you expect from a release labeled as 3.2.0?
New functionality added in a backward-compatible way, as it’s a MINOR update.