Skip to content

Commit 2feb6ee

Browse files
committed
fix: fix semver dynamic import
1 parent 82992ed commit 2feb6ee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/installation.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ async function getServeDVersion(file: string) {
4242

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

0 commit comments

Comments
 (0)