tree-wide: fix version comparison

We were using satisfies in a few places where we should have just been
using a comparison operator.
This commit is contained in:
David Lechner
2022-12-20 15:39:26 -06:00
parent 25231012f6
commit b366f777ca
3 changed files with 16 additions and 10 deletions
+1 -6
View File
@@ -193,12 +193,7 @@ const preferredFileFormat: Reducer<FileFormat | null> = (state = null, action) =
if (blePybricksServiceDidNotReceiveHubCapabilities.matches(action)) {
// HACK: there is not a good way to get the supported MPY ABI version
// from a running hub, so we use heuristics on the firmware version.
if (
semver.satisfies(
pythonVersionToSemver(action.firmwareVersion),
'>=3.2.0-beta.2',
)
) {
if (semver.lte(pythonVersionToSemver(action.firmwareVersion), '3.2.0-beta.2')) {
return FileFormat.Mpy6;
}