mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-15 19:16:09 +00:00
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:
+1
-6
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user