Version Matrix



Parse SemVer, NPM-style SemVer ranges, and check whether some version matches some range.


Parsers for semver:

import semver4s._

for {
  version <- parseVersion("1.2.3")
  matcher <- parseMatcher("~1.2")
} yield matcher.matches(version)

Short unsafe versions are available too, which are convenient for for example sbt files

import semver4s.unsafe._
"1.2.3".satisfies(">=1.2 <2")

Support for literal versions and matchers with the v and m interpolator, checked at compile-time

import semver4s.Literal._


Supports all npm version ranges as matchers

Odds and end include getting upper and lower bounds for matchers and incrementing versions