Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add support for semver 2.0.0-rc.1’s build level #16

Closed
JohnAlbin opened this Issue · 16 comments

7 participants

John Albin Wilkins Brian Ford Sindre Sorhus Pascal Hartig isaacs André Cruz James M. Greene
John Albin Wilkins

The new 2.0.0-rc1 version of Semantic Versioning ( http://semver.org/ ) has a "build" part of the version number.

A build version MAY be denoted by appending a plus sign and a series of dot separated identifiers immediately following the patch version or pre-release version. Identifiers MUST be comprised of only ASCII alphanumerics and dash [0-9A-Za-z-]. Build versions satisfy and have a higher precedence than the associated normal version. Examples: 1.0.0+build.1, 1.3.7+build.11.e0f985a.

semver currently uses a minus (-) sign to delimit the build version. That's not to spec, but it would be nice if the semver package recognized the + in addition to the - for build numbers.

I currently have 2.0.1 and a 2.0.1+build.2 tags in my bower component’s repo and the 2.0.1+build.2 tag is not being recognized as 1.) valid or 2.) higher precedence then 2.0.1.

John Albin Wilkins JohnAlbin referenced this issue from a commit in JohnAlbin/node-semver
John Albin Wilkins JohnAlbin Add support for plus sign before build number. Fixes #16. 467fb6f
Brian Ford

+1

isaacs
Owner

+1000

Brian Ford

+1000

this just got real

isaacs
Owner

this just got real

+1

Brian Ford

@isaacs Seriously though, the intent was not to pester you. Just trying to express a mutual need for this so as to perhaps help you prioritize which issues to resolve when you get a chance. If there is some better way to express this in the future, please let me know.

Thanks for all your great work! :)

+$37.17

isaacs
Owner

@btford No problems, I don't feel pestered. :)

The sad fact is that really someone needs to just do this who feels it's a priority to them. "Prioritize" isn't a real thing people do. By the time you can observe what your priorities are, it's too late to change them, because it's what you're already doing. Even if the whole world were screaming for this feature, honestly, the only thing that would probably motivate me to do it would be if I was bored, and in the mood to futz around with regular expressions for a few hours. And then it wouldn't matter who had +1'ed it, and there's a good chance I'd go mess around with one of glob's bugs instead (since those are a bit juicier anyway).

André Cruz

Worth also mentioning that pre-releases are not working according to the spec:

Pre-release and build version precedence MUST be determined by comparing each dot separated identifier as follows: identifiers consisting of only digits are compared numerically and identifiers with letters or dashes are compared lexically in ASCII sort order

> semver.gt('0.1.1-rc.22', '0.1.1-rc.200');
true

Should be false because 200 > 22.

Jürg Lehni lehni referenced this issue in paperjs/paper.js
Closed

Fix tag version to work with Bower #221

isaacs
Owner

Fixed on master/2.0.0-alpha

isaacs isaacs closed this
Brian Ford

Thanks!

James M. Greene

Awwwwww yeah. :grinning: Thanks, @isaacs!

Sindre Sorhus

Yay!!!

Pascal Hartig

Fantastic! Thanks! :confetti_ball:

isaacs
Owner

I had no idea that this was opened in BountySource. Please give the $87 to the EFF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.