From a626faf2ca0f603b8e83a22205551a9a5a9559af Mon Sep 17 00:00:00 2001 From: Kevin Lee Date: Mon, 26 Aug 2024 09:30:40 +1000 Subject: [PATCH] just-semver v1.0.0 --- changelogs/1.0.0.md | 48 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 changelogs/1.0.0.md diff --git a/changelogs/1.0.0.md b/changelogs/1.0.0.md new file mode 100644 index 0000000..a07ece1 --- /dev/null +++ b/changelogs/1.0.0.md @@ -0,0 +1,48 @@ +## [1.0.0](https://github.com/Kevin-Lee/just-semver/issues?q=is%3Aissue+is%3Aclosed+milestone%3Amilestone14) - 2024-08-26 + +## New Feature + + +* Add `just-semver-decver` module (#221) + +*** +* [`just-semver-decver`] Add `DecVerExt` which is `DecVer` with pre-release and build metadata (#223) + +*** +* Add `DecVerExtMatcher`, the matcher for `DecVerExt` (#225) + + ```scala + DecVerExtMatchers.unsafeParse("1.0 - 2.0").matches(DecVerExt.unsafeParse("1.0")) // true + DecVerExtMatchers.unsafeParse("1.0 - 2.0").matches(DecVerExt.unsafeParse("0.9")) // false + DecVerExtMatchers.unsafeParse("1.0 - 2.0").matches(DecVerExt.unsafeParse("2.0")) // true + DecVerExtMatchers.unsafeParse("1.0 - 2.0").matches(DecVerExt.unsafeParse("2.1")) // false + + // and more... + ``` +*** + +* Replace `DecVer` with `DecVerExt`, and rename `DecVerExt` to `DecVer` (#230) +*** + +* Unable to parse version "25.1-jre-graal-sub-1" (#216) + + ```scala + SemVer.parse("25.1-jre-graal-sub-1") + ``` + Results in + ``` + InvalidVersionStringError(25.1-jre-graal-sub-1) + ``` + This can be handled by `DecVer` now. + ```scala + import just.decver.* + + DecVer.parse("25.1-jre-graal-sub-1") + // Either[DecVer.ParseError, DecVer] = Right(DecVer(Major(25),Minor(1),Some(PreRelease(List(Dsv(List(Alphabet(jre), Hyphen, Alphabet(graal), Hyphen, Alphabet(sub), Hyphen, Num(1)))))),None)) + + val version = DecVer.unsafeParse("25.1-jre-graal-sub-1") + // DecVer = DecVer(Major(25),Minor(1),Some(PreRelease(List(Dsv(List(Alphabet(jre), Hyphen, Alphabet(graal), Hyphen, Alphabet(sub), Hyphen, Num(1)))))),None) + + version.render + // String = 25.1-jre-graal-sub-1 + ```