Packages

  • package root
    Definition Classes
    root
  • package semver4s

    Semver4s provides semver versions and matchers and parsers for them.

    Semver4s provides semver versions and matchers and parsers for them.

    SemVer is a version scheme to delineate when a libraries semantics change. You can read more about it at https://semver.org/

    This library aims to provide at least all functionality the SemVer package in NPM provides, though as of now, it still falls short of that.

    It does so through the types Matcher and Version. You can parse matcher or version strings with semver4s.parseMatcher and semver4s.parseVersion.

    For supported ranges, see the NPM documentation over at https://www.npmjs.com/package/semver#ranges

    For literals, importing Literal._ brings the interpolators m and v in scope, which you can use to write, for example a literal version v"1.2.3" or literal matcher m"~1.3.2 || 2.0.x - 2.2.x", which are parsed and validated at compile time.

    Definition Classes
    root
  • package parsing
  • Bound
  • CoreVersion
  • Literal
  • Matcher
  • Partial
  • PreReleaseBehaviour
  • SemVer
  • Version
  • VersionOrder
p

semver4s

package semver4s

Semver4s provides semver versions and matchers and parsers for them.

SemVer is a version scheme to delineate when a libraries semantics change. You can read more about it at https://semver.org/

This library aims to provide at least all functionality the SemVer package in NPM provides, though as of now, it still falls short of that.

It does so through the types Matcher and Version. You can parse matcher or version strings with semver4s.parseMatcher and semver4s.parseVersion.

For supported ranges, see the NPM documentation over at https://www.npmjs.com/package/semver#ranges

For literals, importing Literal._ brings the interpolators m and v in scope, which you can use to write, for example a literal version v"1.2.3" or literal matcher m"~1.3.2 || 2.0.x - 2.2.x", which are parsed and validated at compile time.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. semver4s
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait Bound extends AnyRef
  2. sealed abstract case class CoreVersion extends Product with Serializable
  3. sealed trait Matcher extends Product with Serializable

    A matcher that can test whether a version matches the matcher.

    A matcher that can test whether a version matches the matcher.

    The NPM matchers are

    - Primitive matchers >, <, >=, <= or = with a (potentially partial) version, e.g. <1.3 or >=1.3.4-pre.1. - Hyphen ranges, e.g. 1.3 - 2 - Tilde ranges: e.g. ~1.3.2 flexible patch. - Caret ranges: e.g. ^1.3.2 flexible minor and patch. - Wildcard ranges: e.g. 1.3 / 1.3.* / 1.3.x - Conjunction (AND) ranges: e.g. >1.3 <2.3.1 - Disjunction (OR) ranges: e.g. any version in three any version in 1.2: 1.2 3 || 1.2.*

  4. sealed trait Partial extends AnyRef
  5. sealed trait PreReleaseBehaviour extends AnyRef
  6. sealed abstract case class Version extends Product with Serializable

    A semver version specification

    A semver version specification

    Consisting of a core version of major.minor.patch, potentially a pre-release suffix and potentially build metadata

Value Members

  1. val matcherParser: Parser[Matcher]

    A parser for SemVer matchers, like "~1.3.2"

  2. def parseMatcher(matcherString: String): Either[Error, Matcher]

    Parsers a string into a matcher, or an error with information where the parse failed.

    Parsers a string into a matcher, or an error with information where the parse failed.

    To match a literal string, use Literal.matcher or the m interpolator

  3. def parseVersion(versionString: String): Either[Error, Version]

    Parsers a string into a version, or an error with information where the parse failed.

    Parsers a string into a version, or an error with information where the parse failed.

    To match a literal string, use Literal.version or the v interpolator

  4. val semverParser: Parser[Version]

    A parser for SemVer versions, like "1.2.3" or "2.12.3-rc1"

  5. object Bound
  6. object CoreVersion extends Serializable
  7. object Literal
  8. object Matcher extends Serializable
  9. object Partial
  10. object PreReleaseBehaviour
  11. object SemVer
  12. object Version extends Serializable
  13. object VersionOrder

Inherited from AnyRef

Inherited from Any

Ungrouped