[GH-ISSUE #543] [PROPOSAL] : breaking change bit in the version number #3115

Closed
opened 2026-04-25 17:24:52 -05:00 by GiteaMirror · 14 comments
Owner

Originally created by @anikethsaha on GitHub (Dec 24, 2019).
Original GitHub issue: https://github.com/semver/semver/issues/543

Outline

as of v2 (not sure about v3 ), sematic versioning supports three types of versioning

  • major <vX.0.0>
  • minor <v0.X.0>
  • patch <v0.0.X>

I am proposing to have the 4th bit in the version number as breaking change bit.

Proposing Breaking change bit or flag (v0.0.0.X)

Here the 4th number will be either 0 or 1. which will specify whether the release contains any breaking change or not.

Examples

  • v4.0.0.1 - a major release contains breaking changes
  • v3.5.0.0 - a minor release contains no breaking changes
  • v3.2.2.1 - a patch release contains breaking changes

Why

A release whether it's major or minor or patch may or may not contain breaking changes but there is no way to check or know that when doing a simple version bump. having this will be a kind of notifier to users.
A simple use-case of this will be dependencies management bots eg - dependent-bot or renovate etc. I am pretty sure its kind of overwork or exhausted to feel when reviewing any PR by these bots as we need to manually look the changelog or sometimes compared commits when changelog is not present to know whether the release contains any breaking changes or not.
having this proposal supported by the bots , now our bots can have an understanding of the content better. So even we can configure the bot to auto-merge the PR if the breaking change flag (v0.0.0.X) is set to 0

I am not sure whether calling the number's position as a bit is right, please correct me if required

Thanks

Originally created by @anikethsaha on GitHub (Dec 24, 2019). Original GitHub issue: https://github.com/semver/semver/issues/543 Outline --- as of v2 (not sure about v3 ), sematic versioning supports three types of versioning - major <vX.0.0> - minor <v0.X.0> - patch <v0.0.X> I am proposing to have the 4th bit in the version number as breaking change bit. ## Proposing Breaking change bit or flag (v0.0.0.X) Here the 4th number will be either `0` or `1`. which will specify whether the release contains any breaking change or not. **Examples** - v4.0.0.1 - a major release contains breaking changes - v3.5.0.0 - a minor release contains no breaking changes - v3.2.2.1 - a patch release contains breaking changes ## Why A release whether it's major or minor or patch may or may not contain breaking changes but there is no way to check or know that when doing a simple version bump. having this will be a kind of notifier to users. A simple use-case of this will be dependencies management bots eg - `dependent-bot` or `renovate` etc. I am pretty sure its kind of overwork or exhausted to feel when reviewing any PR by these bots as we need to manually look the changelog or sometimes compared commits when changelog is not present to know whether the release contains any breaking changes or not. having this proposal supported by the bots , now our bots can have an understanding of the content better. So even we can configure the bot to auto-merge the PR if the breaking change flag (v0.0.0.X) is set to `0` _I am not sure whether calling the number's position as a `bit` is right, please correct me if required_ ## Thanks
Author
Owner

@jwdonahue commented on GitHub (Dec 24, 2019):

The standard already has breaking changes covered. You bump the major version and no minor or patch change should ever be released with a known breaking change.

For bots, take a look at VersionMeta and VersionSchema.

<!-- gh-comment-id:568664959 --> @jwdonahue commented on GitHub (Dec 24, 2019): The standard already has breaking changes covered. You bump the major version and no minor or patch change should ever be released with a known breaking change. For bots, take a look at [VersionMeta](http://versionmeta.org/) and [VersionSchema](http://versionschema.org).
Author
Owner

@anikethsaha commented on GitHub (Dec 24, 2019):

true, But there are cases when we don't have any breaking changes in the major release. My point is that having breaking changes with a release is too unpredictable. even patch release comes with breaking changes.

<!-- gh-comment-id:568665887 --> @anikethsaha commented on GitHub (Dec 24, 2019): true, But there are cases when we don't have any breaking changes in the major release. My point is that having breaking changes with a release is too unpredictable. even patch release comes with breaking changes.
Author
Owner

@ljharb commented on GitHub (Dec 24, 2019):

If there’s no breaking changes, why is it a major? That’s the sole purpose of a major version.

<!-- gh-comment-id:568666414 --> @ljharb commented on GitHub (Dec 24, 2019): If there’s no breaking changes, why is it a major? That’s the sole purpose of a major version.
Author
Owner

@anikethsaha commented on GitHub (Dec 24, 2019):

If there’s no breaking changes, why is it a major? That’s the sole purpose of a major version.

May be to land up a major feature. !!

<!-- gh-comment-id:568666699 --> @anikethsaha commented on GitHub (Dec 24, 2019): > If there’s no breaking changes, why is it a major? That’s the sole purpose of a major version. May be to land up a major feature. !!
Author
Owner

@ljharb commented on GitHub (Dec 24, 2019):

That'd be a semver-minor, regardless of the desired sentimentality of the feature.

<!-- gh-comment-id:568671599 --> @ljharb commented on GitHub (Dec 24, 2019): That'd be a semver-minor, regardless of the desired [sentimentality](http://sentimentalversioning.org) of the feature.
Author
Owner

@anikethsaha commented on GitHub (Dec 24, 2019):

Okay .
What would you consider a release of migrating the codebase to typescript?
I would consider it as major but this won't break explicitly any API so I wouldn't consider this as breaking change.

Right ?

<!-- gh-comment-id:568675263 --> @anikethsaha commented on GitHub (Dec 24, 2019): Okay . What would you consider a release of migrating the codebase to typescript? I would consider it as major but this won't break explicitly any API so I wouldn't consider this as breaking change. Right ?
Author
Owner

@sungam3r commented on GitHub (Dec 24, 2019):

Breaking for whom?

<!-- gh-comment-id:568676118 --> @sungam3r commented on GitHub (Dec 24, 2019): Breaking for whom?
Author
Owner

@anikethsaha commented on GitHub (Dec 24, 2019):

Breaking for whom?

I didnt get this !!!

<!-- gh-comment-id:568676494 --> @anikethsaha commented on GitHub (Dec 24, 2019): > Breaking for whom? I didnt get this !!!
Author
Owner

@sungam3r commented on GitHub (Dec 24, 2019):

OK. You have changed the internal mechanisms. Clients do not know anything about this and should not know.

<!-- gh-comment-id:568676679 --> @sungam3r commented on GitHub (Dec 24, 2019): OK. You have changed the internal mechanisms. Clients do not know anything about this and should not know.
Author
Owner

@anikethsaha commented on GitHub (Dec 24, 2019):

Clients do not know anything about this and should not know.

Should not know about breaking changes ?

Why not ?

<!-- gh-comment-id:568677061 --> @anikethsaha commented on GitHub (Dec 24, 2019): > Clients do not know anything about this and should not know. Should not know about breaking changes ? Why not ?
Author
Owner

@sungam3r commented on GitHub (Dec 24, 2019):

Once again.

but this won't break explicitly any API

So there are no breaking changes for clients.

Should not know about breaking changes ?

The fact is that the concept of breaking changes itself is not applicable to internal server changes.

Why not ?

And what is the use for clients from this? They are not interested. They do not work with the server implementation, but with its abstraction through the api boundary.

<!-- gh-comment-id:568678088 --> @sungam3r commented on GitHub (Dec 24, 2019): Once again. > but this won't break explicitly any API So there are no breaking changes for clients. > Should not know about breaking changes ? The fact is that the concept of _breaking_ changes itself is not applicable to internal server changes. > Why not ? And what is the use for clients from this? They are not interested. They do not work with the server implementation, but with its abstraction through the api boundary.
Author
Owner

@sungam3r commented on GitHub (Dec 24, 2019):

By the way, if you are worried about marketing goals, you can simply version the server implementation and its api separately.

<!-- gh-comment-id:568678759 --> @sungam3r commented on GitHub (Dec 24, 2019): By the way, if you are worried about marketing goals, you can simply version the server implementation and its api separately.
Author
Owner

@ljharb commented on GitHub (Dec 24, 2019):

@anikethsaha changing from JS to TypeScript - or any other language - is utterly irrelevant. If the compiled/transpiled output behaves the same, then it's a patch. If it behaves differently (including its API surface, peer deps, etc), then it's the behavior change that determines the semver, not whatever flight of fancy you happen to author it in.

<!-- gh-comment-id:568679208 --> @ljharb commented on GitHub (Dec 24, 2019): @anikethsaha changing from JS to TypeScript - or any other language - is utterly irrelevant. If the compiled/transpiled output behaves the same, then it's a patch. If it behaves differently (including its API surface, peer deps, etc), then it's the *behavior change* that determines the semver, not whatever flight of fancy you happen to author it in.
Author
Owner

@anikethsaha commented on GitHub (Dec 24, 2019):

Ohh cool 👍
thanks @ljharb @sungam3r @jwdonahue for responding

<!-- gh-comment-id:568682743 --> @anikethsaha commented on GitHub (Dec 24, 2019): Ohh cool 👍 thanks @ljharb @sungam3r @jwdonahue for responding
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/semver#3115