semver
semver copied to clipboard
isValid Check Does Not Comply To Semver Spec
The following strings should fail according to semver spec:
A normal version number MUST take the form X.Y.Z where X, Y, and Z are non-negative integers, and MUST NOT contain leading zeroes. http://semver.org/#spec-item-2
_invalidList = @[@"1", # missing minor and patch
@"1.1", # missing patch
@"1.1.0001" # must not contain leading zeroes.
];
isValid check should be made more strict to fall in line with the semver specification. Currently, each of these strings pass isValid validation.
Thanks @jonmchan. I'm happy to accept a PR for this.