library for comparing semver versions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

library for comparing semver versions

Peter Uhnak
Hi,

is there any library available that can compare versions according to
SemVer? http://semver.org/

Thanks,
Peter

Reply | Threaded
Open this post in threaded view
|

Re: library for comparing semver versions

demarey
Hi Peter,

> Le 27 mai 2016 à 14:21, Peter Uhnak <[hidden email]> a écrit :
>
> Hi,
>
> is there any library available that can compare versions according to
> SemVer? http://semver.org/

You can check the SemanticVersion class from CargoPackageManager-Minimal at http://smalltalkhub.com/#!/~demarey/CargoPackageManager.

The comparison is not fully complete for the suffix part but can be added

Christophe
Reply | Threaded
Open this post in threaded view
|

Re: library for comparing semver versions

Dale Henrichs-3
In reply to this post by Peter Uhnak
The class MetacelloSemanticVersionNumber can be used to compare Semantic
version numbers ... Note that there is an outstanding bug that
MetacelloSemanticVersionNumber will read improperly formatted version
numbers (fix is in the works), so it's not quite as good for validation
(at the moment), but it should work for properly formed semantic version
numbers ...

Dale


[1] https://github.com/dalehenrich/metacello-work/issues/392


On 5/27/16 5:21 AM, Peter Uhnak wrote:
> Hi,
>
> is there any library available that can compare versions according to
> SemVer? http://semver.org/
>
> Thanks,
> Peter
>