bumpIncompatibleVersion

Increments a given version number to the next incompatible version.

Prerelease and build metadata information is removed.

This implements the "^" comparison operator, which represents "nonbreaking semver compatibility." With 0.x.y releases, any release can break. With x.y.z releases, only major releases can break.

@safe pure
string
bumpIncompatibleVersion
(
string ver
)

Examples

1 assert(bumpIncompatibleVersion("0.0.0") == "0.0.1");
2 assert(bumpIncompatibleVersion("0.1.2") == "0.1.3");
3 assert(bumpIncompatibleVersion("1.0.0") == "2.0.0");
4 assert(bumpIncompatibleVersion("1.2.3") == "2.0.0");
5 assert(bumpIncompatibleVersion("1.2.3+metadata") == "2.0.0");
6 assert(bumpIncompatibleVersion("1.2.3-pre.release") == "2.0.0");
7 assert(bumpIncompatibleVersion("1.2.3-pre.release+metadata") == "2.0.0");

Meta