Skip to content

Commit

Permalink
workaround dependency cycle in node-semver
Browse files Browse the repository at this point in the history
  • Loading branch information
bkleiner committed Jun 25, 2022
1 parent d151844 commit 50a86f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/serial/msp.ts
@@ -1,7 +1,7 @@
import { Log } from "@/log";
import { ArrayReader, ArrayWriter } from "./util";
import type { Serial } from "@/serial/serial";
import semver from "semver";
import semverSatisfies from "semver/functions/satisfies";
import { VTXType } from "./openvtx";

export enum MSPCmd {
Expand Down Expand Up @@ -228,7 +228,7 @@ export class MSPPassthrough {

const fcVersion = await this.msp.send(MSPCmd.MSP_FC_VERSION);
const fcSemVer = fcVersion.payload.map((n) => "" + n).join(".");
if (!semver.satisfies(fcSemVer, this.config.minVersion)) {
if (!semverSatisfies(fcSemVer, this.config.minVersion)) {
throw new Error("unsupported fc version " + fcSemVer);
}
Log.debug("msp", "fc version", fcSemVer);
Expand Down

0 comments on commit 50a86f5

Please sign in to comment.