Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build "Semantic Version" via Stringly.Typed #1

Open
robcthegeek opened this issue Oct 20, 2016 · 0 comments
Open

Build "Semantic Version" via Stringly.Typed #1

robcthegeek opened this issue Oct 20, 2016 · 0 comments

Comments

@robcthegeek
Copy link
Member

robcthegeek commented Oct 20, 2016

So, I built Stringly.Typed to make "building things from strings" easier, seems this project (and another at a current client) could really use a "Semantic Version Number".

So, let's make it happen!

🏁

  • Parse a SemVer number from a string.
  • Implement operators for "equality", "less than" and "greater than".
  • Ensure we can capture the "pre-release" and "metadata" tags as well, super-useful!
  • Create separate package for this - SemVer.Stringly.Typed? (a la Definitely.Typed)

NOTES

Pay particular attention to the section on metadata precedence:

Precedence for two pre-release versions with the same major, minor, and patch version MUST be determined by comparing each dot separated identifier from left to right until a difference is found as follows: identifiers consisting of only digits are compared numerically and identifiers with letters or hyphens are compared lexically in ASCII sort order. Numeric identifiers always have lower precedence than non-numeric identifiers. A larger set of pre-release fields has a higher precedence than a smaller set, if all of the preceding identifiers are equal. Example: 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant