lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Jan 18, 2012 at 8:47 AM, Enrique Garcia Cota <kikito@gmail.com> wrote:
>> if you intend it to parse version strings of existing packages that use
>> 3-part version numbers, I don't think it will.
> My intention with semver was implementing what the semver.org page says;
> hence its name.
>
> Since semver.org doesn't contemplate anything before the version numbers, so
> the lib doesn't implement that.

semver doesn't say anything about encoding and storage of the version
of a module, that is obviously language and environment specific.

language bindings, like https://github.com/jeluard/semantic-versioning
for java, do implement semver by providing useful tools to enforce
rules, integrate into maven, pull version out of a jar file, etc.

> There is also an interface problem. The lib accepts two kinds of parameters
> - either you pass in a string for it to "parse", or you pass every number
> separatedly:
>
>   v(1,2,3,'-alpha')
>   v('1.2.3-alpha')
>
> Right now both versions of the constructor are aligned - they throw errors
> on the same kind of things. I think it would be weird to accept an "extra"
> string bit on the string-only constructor.

Use a different method name...

Cheers,
Sam