Skip to content

Commit

Permalink
fix: fix semver dynamic import
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jul 20, 2021
1 parent 82992ed commit 2feb6ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/installation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ async function getServeDVersion(file: string) {

/** Check if the given serve-d is up to date against the target version */
async function isServeDUpToDate(givenFile: string, targetFile: string) {
const semverCompare = (await import("semver/functions/compare")).default
// @ts-ignore
const semverCompare = (await import("semver/functions/compare")) as typeof import("semver/functions/compare")
const [givenVersion, targetVersion] = await Promise.all([getServeDVersion(givenFile), getServeDVersion(targetFile)])
if (
typeof givenVersion === "string" &&
Expand Down

0 comments on commit 2feb6ee

Please sign in to comment.