Skip to content

Commit

Permalink
Merge pull request #232 from kevin-lee/prepare-to-release
Browse files Browse the repository at this point in the history
just-semver v1.0.0
  • Loading branch information
kevin-lee authored Aug 26, 2024
2 parents b62c657 + a626faf commit 5dc3adc
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions changelogs/1.0.0.md
Original file line number Diff line number Diff line change
@@ -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
```

0 comments on commit 5dc3adc

Please sign in to comment.