- your file lists version 1.0, and is hence not semver compliant, 1.0.0 would be.
Ha! Good one!
- there is no way to get the version of your code programmatically (you can’t use it on itself to compare semver.lua code versions)
Hmm I'm not sure about how to do that. Do you have anything in mind?
I could include a field in all the versions - the same way nextMajor/Minor/Patch are included - but that would be kind of weird, I think:
v('2.5.6-alpha.1').__version -- 1.0.0 (version of the lib, not the version itself)
Perhaps there's a standard place to put the version of a lib that I don't know about?
- it would be nice to add some utility functions to compare lua modules (based on a module table containing a _VERSION value)
Compare how? The versions are already comparable. You can do module1._VERSION < module2._VERSION and module1._VERSION ^ module2._VERSION. What else do you think is needed?
Thanks for your comments!