mikehardy / react-native-update-apk

Update apk from non-play store servers, and update ios from app store in React Native.
MIT License
195 stars 57 forks source link

Use the semverLt function of the semver library to compare versions #41

Closed gaodeng closed 3 years ago

mikehardy commented 3 years ago

If you can get this in with the breaking change in the next day or so I can include it with the v5.x major version bump I need to do for these unrelated breaking changes #42

gaodeng commented 3 years ago

If you can get this in with the breaking change in the next day or so I can include it with the v5.x major version bump I need to do for these unrelated breaking changes #42

According to your suggestion, the semverLt function of the semver library is now used to compare versions, which may be a breaking change, for example 1.0.01 is now an illegal version number

mikehardy commented 3 years ago

If you can get this in with the breaking change in the next day or so I can include it with the v5.x major version bump I need to do for these unrelated breaking changes #42

According to your suggestion, the semverLt function of the semver library is now used to compare versions, which may be a breaking change, for example 1.0.01 is now an illegal version number

Very interesting! I'm still strongly in favor of using a standard library to do the comparison, and this is the standard library for javascript, so I think it's an okay change.

I do find it ironic that your defense of the error handling change you made as non-breaking seems correct (thank you for analyzing that and responding, by the way) but then my attempt to use a standard actually is breaking (good analysis there too)

I'll re-review this but I'm sure it's fine and even with the semver compare meaning this is maybe breaking, 5.x is still queued to go, so that's fine in my opinion

Thanks!

mikehardy commented 3 years ago

v5.0.0 is out now, hopefully everything works :-)