https://github.com/kengotoda/flix-semver2
A flix package to handle semantic versioning v2
https://github.com/kengotoda/flix-semver2
flix semver2
Last synced: 7 months ago
JSON representation
A flix package to handle semantic versioning v2
- Host: GitHub
- URL: https://github.com/kengotoda/flix-semver2
- Owner: KengoTODA
- License: agpl-3.0
- Created: 2022-03-17T00:37:01.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-06T11:08:40.000Z (over 2 years ago)
- Last Synced: 2025-02-13T05:17:20.183Z (9 months ago)
- Topics: flix, semver2
- Language: TypeScript
- Homepage:
- Size: 278 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# flix-semver2
A package handling the [semantic versioning v2](https://semver.org/spec/v2.0.0.html).
[](https://github.com/KengoTODA/flix-semver2/actions/workflows/build.yml)
[](https://github.com/semantic-release/semantic-release)
# Usage
`SemVer2` is an algebraic data type with the [`Eq` type class](https://github.com/flix/flix/blob/v0.26.0/main/src/library/Eq.flix), [`ToString` type class](https://github.com/flix/flix/blob/v0.26.0/main/src/library/ToString.flix), and [`Order` type class](https://github.com/flix/flix/blob/v0.26.0/main/src/library/Order.flix).
```flix
use SemVer2.parse;
def isVersion1(text: String): Bool = match parse(text) {
case Ok(v) => SemVer2.getMajor(v) == 1
case _ => false
}
```
You can install the fpkg file by the following command:
```console
$ java -jar flix.jar install KengoTODA/flix-semver2
$ ls lib/KengoTODA/flix-semver2/flix-semver2.fpkg
```
# Copyright
Copyright © 2022 Kengo TODA all rights reserved.