Documentation
¶
Overview ¶
Package semver implements the subset of npm's semver used by pi package management: exact versions, ranges (^ ~ x-ranges, hyphen, ||, primitives), Satisfies and MaxSatisfying with npm's prerelease-inclusion rule.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MaxSatisfying ¶
MaxSatisfying returns the highest version matching the range, or "".
func Satisfies ¶
Satisfies applies npm's rule that prerelease versions only match ranges whose comparator set names a prerelease on the same [major,minor,patch].
func ValidRange ¶
ValidRange reports whether input parses as an npm range.
Types ¶
type Range ¶
type Range struct {
// contains filtered or unexported fields
}
Range is a parsed npm range: OR of comparator sets.
func ParseRange ¶
Click to show internal directories.
Click to hide internal directories.