jquery-archive / plugins.jquery.com

The jQuery Plugins site
plugins.jquery.com
Other
1.24k stars 244 forks source link

plug-in registry incorrectly identifies a build as "pre-release" #151

Closed rnicholus closed 10 years ago

rnicholus commented 10 years ago

It seems like the following graphic appears at the top of any registry entry simply if the version number includes a build identifier. For example, in Fine Uploader 3.9.0-3:

screen shot 2013-10-07 at 3 43 56 pm

scottgonzalez commented 10 years ago

Real builds use + not -. From semver.org:

A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers immediately following the patch version.

Build metadata MAY be denoted by appending a plus sign and a series of dot separated identifiers immediately following the patch or pre-release version.

rnicholus commented 10 years ago

Hmm, right you are. Looks like grunt-version, which we are using to change version numbers, is flawed in this respect. Sorry for the bogus bug report!

kswedberg commented 10 years ago

Hi @rnicholus. Would you mind submitting a bug report at https://github.com/kswedberg/grunt-version/issues/new ?

I'd be happy to get this fixed up if you do. Thanks!

rnicholus commented 10 years ago

@kswedberg After digging even deeper, it looks like the version of grunt-version we are using depends on v1.1.3 of @isaacs node-semver module. That version allowed the "build" release keyword as an argument to the inc function which either added a "-x" to the end of the version or incremented an existing number. This was apparently valid in semver 1.x. We are looking to adhere to semver 2.0, as is jQuery's plug-in registry. I think the simplest thing for us to do would be to create our own custom grunt task that rips off the hypenated suffix from the version number as part of our release process. At least, that may be the simplest solution for now. A more complete solution would be for grunt-version to switch its dependency to a more current version of node-semver. That will likely require some refactoring/changes. The current version of node-semver does not have any support for the "build" release keyword, so if that logic is to remain, it seems like grunt-version will have to increment the build number internally (using a "+" instead of a "-") without delegating to node-semver.

When I get some free time, I may look into this further myself. We can discuss further offline or in your repo if you'd like, otherwise I'll perhaps submit a PR if/when I find the time to sort this out myself.

P.S. Thanks for popping in. It's always nice to see an open-source developer monitor his/her project like this.

rnicholus commented 10 years ago

@kswedberg Just a heads-up: I modified my post shortly after I submitted it. It's a bit too late over here and I apparently jumbled up a sentence or two.

kswedberg commented 10 years ago

@rnicholus by the way, I've updated my grunt-version plugin to use semver 2.x: https://github.com/kswedberg/grunt-version/

rnicholus commented 10 years ago

Excellent. Thank you for your work on this very useful plugin. We will probably upgrade in the near future.

On Tuesday, January 28, 2014, Karl Swedberg notifications@github.com wrote:

@rnicholus https://github.com/rnicholus by the way, I've updated my grunt-version plugin to use semver 2.x: https://github.com/kswedberg/grunt-version/

Reply to this email directly or view it on GitHubhttps://github.com/jquery/plugins.jquery.com/issues/151#issuecomment-33479603 .