You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/10/23 12:19:33 UTC
[GitHub] [cordova-ios] raphinesse commented on issue #695: (iOS) Added
Semver to version comparison checks.
raphinesse commented on issue #695: (iOS) Added Semver to version comparison checks.
URL: https://github.com/apache/cordova-ios/pull/695#issuecomment-545416346
OK, so apparently we haven't only been passing valid semver versions into that function. Surprise! :unamused:
We use it to check requirements of native dependencies like Xcode too. But the Xcode versions we pass into that function are not valid semver (e.g. `10.1`). So we need to be a bit more forgiving.
So what I did is keep the original version if it is a valid semver and only coerce it if it isn't. That way, valid semver versions keep their pre-release identifers and we can still just use `semver.compare` later on. Of course, pre-release identifers on non-semver versions will still be discarded and thus not considered during the comparison. But I find that behavior acceptable.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org