VersionRange.difference()with a union constraint that covered the entire range would crash.
VersionUnion class public. This was previously used internally to implement
new VersionConstraint.unionOf() and
VersionConstraint.union(). Now it's public so you can use it too.
VersionConstraint.difference(). This returns a constraint matching all versions matched by one constraint but not another.
Comparable<VersionRange>. Ranges are ordered first by lower bound, then by upper bound.
VersionConstrainthaving different types for overridden methods.
>=1.2.3-dev.1 <1.2.3to match pre-release versions of
1.2.3. Previously, these didn't match, since the pre-release versions had the same major, minor, and patch numbers as the max; now an exception has been added if they also have the same major, minor, and patch numbers as the min and the min is also a pre-release version.
VersionConstraint.union() method and a
new VersionConstraint.unionOf() constructor. These each return a constraint that matches multiple existing constraints.
VersionConstraint.allowsAll() method, which returns whether one constraint is a superset of another.
VersionConstraint.allowsAny() method, which returns whether one constraint overlaps another.
Version now implements
Add support for the
^ operator for compatible versions according to pub's notion of compatibility.
^1.2.3 is equivalent to
^0.1.2 is equivalent to
Version.nextBreaking, which returns the next version that introduces breaking changes after a given version.
new VersionConstraint.compatibleWith(), which returns a range covering all versions compatible with a given version.
Add a custom
VersionRange.hashCode to make it properly hashable.