Add ~x.y.z and ^x.y.z parsing

Just confirming, the test below when `major != 0` is that `ver.minor >= minor`, this is intended to be equality?