Dependency.versionSpec

Sets/gets the matching version range as a specification string.

The acceptable forms for this string are as follows:

  • "1.0.0" - a single version in SemVer format
  • "==1.0.0" - alternative single version notation
  • ">1.0.0" - version range with a single bound
  • ">1.0.0 <2.0.0" - version range with two bounds
  • "~>1.0.0" - a fuzzy version range
  • "~>1.0" - a fuzzy version range with partial version
  • "^1.0.0" - semver compatible version range (same version if 0.x.y, ==major >=minor.patch if x.y.z)
  • "^1.0" - same as ^1.0.0
  • "~master" - a branch name
  • "*" - match any version (see also any`)

Apart from "<" and ">", ">=" and "<=" are also valid comparators.

  1. string versionSpec [@property setter]
  2. string versionSpec [@property getter]
    struct Dependency
    @safe @property const
    string
    versionSpec
    ()

Meta