Whether version satisfies range, in the restricted grammar §81 uses:
*, X.Y.Z, ^X.Y.Z, ~X.Y.Z, >=X.Y.Z.
Anything else is refused rather than approximated. Taking a semver dependency
into @fourjs/core — the package every other package depends on — to serve a
feature nothing uses yet is not a trade worth making, and silently
mis-parsing a range a user believed was supported is worse than refusing it
(RFC 0002 §5; the same stance A-23 took on limits).
^ is standard semver caret, which means it is minor-locked below 1.0.0:
^0.1.0 accepts 0.1.z and refuses 0.2.0. ~ is always minor-locked.
Parameters
version: string
range: string
Returns boolean
Throws
FourError INVALID_APPLICATION_STATE if version or range is
outside the grammar.
Whether
versionsatisfiesrange, in the restricted grammar §81 uses:*,X.Y.Z,^X.Y.Z,~X.Y.Z,>=X.Y.Z.Anything else is refused rather than approximated. Taking a semver dependency into
@fourjs/core— the package every other package depends on — to serve a feature nothing uses yet is not a trade worth making, and silently mis-parsing a range a user believed was supported is worse than refusing it (RFC 0002 §5; the same stance A-23 took on limits).^is standard semver caret, which means it is minor-locked below 1.0.0:^0.1.0accepts0.1.zand refuses0.2.0.~is always minor-locked.