Skip to content

feat: allow missing patch #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

icorderi
Copy link

@icorderi icorderi commented Jul 6, 2016

According to semver 2.0.0, a normal version is defined as:

"A normal version number MUST take the form X.Y.Z where X, Y, and Z are non-negative integers, and MUST NOT contain leading zeroes. X is the major version, Y is the minor version, and Z is the patch version. Each element MUST increase numerically. For instance: 1.9.0 -> 1.10.0 -> 1.11.0."

source: spec-item-2

It is my understanding, and what seems to be common practice in industry that for fresh releases with no patches, a new release version omits the patch value. Essentially, version 1.2 implies 1.2.0, meaning there is no patch yet.

I believe the keyword on the semver spec is the use of normal. A new release is not normal, it's the first version of a new feature with no patch. Therefore an argument can be made that Z can be omitted.

There is an open issue on the matter on semver.

Wikipedia's article on software versioning also omits the 0 on new releases.
wikipedia: software-versioning

@steveklabnik
Copy link
Owner

steveklabnik commented Jul 7, 2016

For now, I would like to stick to what the spec says here. Which means that I'm not totally opposed, but would like the spec to be clear before I merge. This PR is likely to be valid for a long time though, as it's not like semver is changing much. So thanks! We'll see. 😄

@steveklabnik
Copy link
Owner

I am going to be sticking with the spec as written for this implementation. Thanks though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants