Skip to content

Latest commit

 

History

History

VersionRange class

[Serializable]
[CLSCompliant(true)]
public sealed class VersionRange

Namespace: McSherry.SemanticVersioning.Ranges
Minimum Version: 1.1.0

Represents a range of acceptable versions. This class cannot be inherited.

Constructors

Instance Properties

Instance Methods

Static Methods

Remarks

A version range specifies a set of semantic versions that are acceptable, and is used to check that a given semantic version fits within this set.

Version ranges use the node-semver syntax for ranges. Specifically, ranges are based on the specification as it was written for the v6.0.0 release of node-semver.

The full basic and advanced range syntaxes are supported, but there are minor differences in how 'X-ranges' are handled. Unlike with node-semver, this class will reject ranges where the wildcard (x, X, or * character) is followed by another version component or by pre-release identifiers or metadata. As node-semver appears to ignore anything that follows a wildcard, this has no real impact on functionality.

In addition, for backwards compatibility, an empty version range will be considered invalid. node-semver treats this as equivalent to *.