diff --git a/tsconfig.json b/tsconfig.json index 0f0b74e2..18da86fb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,9 +17,6 @@ "allowSyntheticDefaultImports": true, "lib": ["esnext"], "sourceMap": true, - "typeRoots": ["./node_modules/typings"], - "paths": { - "semver": ["./node_modules/typings/semver/index.d.ts"] - } + "typeRoots": ["./node_modules/typings"] } } diff --git a/utils.ts b/utils.ts index 71e867e1..507b41b6 100644 --- a/utils.ts +++ b/utils.ts @@ -12,7 +12,8 @@ import type { } from './types.d.ts' import { detect, AGENTS, Agent, getCommand } from '@antfu/ni' import actionsCore from '@actions/core' -import * as semver from 'semver' +// @ts-expect-error TODO +const semver: typeof import('./node_modules/typings/semver/index.d.ts') = await import('semver') const isGitHubActions = !!process.env.GITHUB_ACTIONS