Course contentsShow
← Software Engineering
Lesson 675 of 1,93321. Build Automation and Dependency ManagementFree lesson

Version Bumping Strategies

When to increment major, minor, or patch versions based on the nature of changes in your own packages.

Version Bumping Strategies

You'll learn: How to decide which part of your package's version number to increment when releasing new changes.

The Decision Framework

When you're ready to publish a new version of your package, you must choose whether to bump the major, minor, or patch version number. This decision isn't arbitrary—it communicates the nature of your changes to everyone depending on your package.

Using Semantic Versioning (MAJOR.MINOR.PATCH), here's your guide:

Patch Version (0.0.X)

Increment the patch version for bug fixes that don't change your API. These are backward-compatible corrections to incorrect behavior. Users should be able to update without changing any of their code.

Example: Fixing a calculation error, correcting a typo in output text, or patching a memory leak.

Minor Version (0.X.0)

Increment the minor version when you add new functionality in a backward-compatible way. Existing code still works, but new features are now available. Reset the patch version to 0.

Example: Adding a new optional parameter, introducing a new utility function, or exposing additional data in your API response.

Major Version (X.0.0)

Increment the major version for breaking changes—modifications that could require users to update their code. This includes removing features, changing function signatures, or altering behavior in incompatible ways. Reset both minor and patch to 0.

Example: Removing a deprecated function, renaming a required parameter, or changing the return type of a method.

Think Like Your Users

Ask yourself: "If someone updates to this version automatically, will their code still work?" If the answer is no, it's a major bump.

Key Takeaway: Patch for fixes, minor for features, major for breaking changes—your version number is a contract with your users about compatibility.