Under Semantic Versioning, you remove a public function from a library at version 2.4.1. The next version is…
Options
- 2.4.2
- 2.5.0
- 3.0.0 (Correct option)
- 2.4.1-beta
Answer
3.0.0
Why
SemVer versions are MAJOR.MINOR.PATCH.
- PATCH (2.4.2): bug fixes, nothing breaks.
- MINOR (2.5.0): new features, old code still works.
- MAJOR (3.0.0): breaking changes, old code may stop working.
Removing a public function breaks users who call it, so it is a MAJOR bump.
Remember
Breaking change → MAJOR. New feature → MINOR. Fix → PATCH.