version

package version

Members list

Packages

package version.codecs
package version.errors
package version.sbt
package version.zio

Type members

Classlikes

Provides factory methods, instances, and operations for MajorVersion.

Provides factory methods, instances, and operations for MajorVersion.

Attributes

Source
VersionComponent.scala
Supertypes
trait OpaqueType[MajorVersion]
class Object
trait Matchable
class Any
Show all
Self type
object Metadata extends OpaqueType[Metadata]

Provides factory methods and operations for Metadata.

Provides factory methods and operations for Metadata.

Extends boilerplate.OpaqueType with build-metadata-specific validation and semantics.

Attributes

See also

Metadata opaque type for representation details.

Source
Metadata.scala
Supertypes
trait OpaqueType[Metadata]
class Object
trait Matchable
class Any
Self type
Metadata.type

Provides factory methods, instances, and operations for MinorVersion.

Provides factory methods, instances, and operations for MinorVersion.

Attributes

Source
VersionComponent.scala
Supertypes
trait OpaqueType[MinorVersion]
class Object
trait Matchable
class Any
Show all
Self type

Provides factory methods, instances, and operations for PatchNumber.

Provides factory methods, instances, and operations for PatchNumber.

Attributes

Source
VersionComponent.scala
Supertypes
trait OpaqueType[PatchNumber]
class Object
trait Matchable
class Any
Show all
Self type
final case class PreRelease

Represents structured pre-release version information.

Represents structured pre-release version information.

Instances are constructed via PreRelease companion factory methods.

Value parameters

classifier

The type of pre-release.

number

The version number associated with the classifier, if applicable.

Attributes

Companion
object
Source
VersionComponent.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object PreRelease

Provides factory methods, instances, and operations for PreRelease.

Provides factory methods, instances, and operations for PreRelease.

Attributes

See also

PreRelease case class for representation details.

Companion
class
Source
VersionComponent.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
PreRelease.type

Represents the supported pre-release classifiers in order of precedence (lowest to highest).

Represents the supported pre-release classifiers in order of precedence (lowest to highest).

This enumeration defines the constrained hierarchy used within this library. Declaration order defines precedence.

Attributes

See also

PreReleaseClassifier companion for behaviour.

Companion
object
Source
VersionComponent.scala
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Provides behaviour, instances, and utilities for PreReleaseClassifier.

Provides behaviour, instances, and utilities for PreReleaseClassifier.

Attributes

See also

PreReleaseClassifier enum for case definitions.

Companion
enum
Source
VersionComponent.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type

Provides factory methods, instances, and operations for PreReleaseNumber.

Provides factory methods, instances, and operations for PreReleaseNumber.

Attributes

Source
VersionComponent.scala
Supertypes
trait OpaqueType[PreReleaseNumber]
class Object
trait Matchable
class Any
Show all
Self type
transparent trait ResettableVersionComponent[T] extends VersionComponent[T]

Extends VersionComponent for components that have a defined reset value (typically the minimum value).

Extends VersionComponent for components that have a defined reset value (typically the minimum value).

Attributes

Source
VersionComponent.scala
Supertypes
trait VersionComponent[T]
trait OpaqueType[T]
class Object
trait Matchable
class Any
Known subtypes
final case class Version(major: MajorVersion, minor: MinorVersion, patch: PatchNumber, preRelease: Option[PreRelease], metadata: Option[Metadata]) extends Ordered[Version]

Represents a version conforming to the Semantic Versioning 2.0.0 specification.

Represents a version conforming to the Semantic Versioning 2.0.0 specification.

Format: MAJOR.MINOR.PATCH[-PRERELEASE][+BUILDMETADATA].

Instances may be constructed via Version.

Attributes

Companion
object
Source
Version.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Ordered[Version]
trait Comparable[Version]
class Object
trait Matchable
class Any
Show all
object Version

Provides factory methods, utility functions, and type class instances for Version.

Provides factory methods, utility functions, and type class instances for Version.

Attributes

Companion
class
Source
Version.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Version.type
transparent trait VersionComponent[T] extends OpaqueType[T]

Capability trait for opaque version components backed by Int.

Capability trait for opaque version components backed by Int.

Extends boilerplate.OpaqueType with version-specific semantics:

  • Minimum value validation
  • Increment operation
  • Standard ordering

Instances may be constructed via VersionComponent.

Type parameters

T

The opaque type itself.

Attributes

Source
VersionComponent.scala
Supertypes
trait OpaqueType[T]
class Object
trait Matchable
class Any
Known subtypes

Types

opaque type MajorVersion

Represents a major version number. Must be non-negative (>= 0).

Represents a major version number. Must be non-negative (>= 0).

Attributes

Source
VersionComponent.scala
opaque type Metadata

Represents build metadata as defined by the Semantic Versioning 2.0.0 specification.

Represents build metadata as defined by the Semantic Versioning 2.0.0 specification.

Identifiers must comprise only ASCII alphanumerics and hyphens [0-9A-Za-z-] and must not be empty. Build metadata does not affect version precedence.

Instances may be constructed via Metadata.

Attributes

Source
Metadata.scala
opaque type MinorVersion

Represents a minor version number. Must be non-negative (>= 0).

Represents a minor version number. Must be non-negative (>= 0).

Attributes

Source
VersionComponent.scala
opaque type PatchNumber

Represents a patch number. Must be non-negative (>= 0).

Represents a patch number. Must be non-negative (>= 0).

Attributes

Source
VersionComponent.scala
opaque type PreReleaseNumber

Represents a pre-release number. Must be positive (>= 1).

Represents a pre-release number. Must be positive (>= 1).

Attributes

Source
VersionComponent.scala

Givens

Givens

given given_Read_String: Read[String]

Default Version.Read instance for String.

Default Version.Read instance for String.

Available via import version.{given, *} or import version.given.

Parses SemVer strings using the contextual PreRelease.Resolver for mapping pre-release identifiers. Override by providing a custom given Version.Read[String] in scope.

Attributes

Source
instances.scala