fix(nuxi): satisfies isn't always default export (#1643)

This commit is contained in:
Daniel Roe 2021-11-02 15:56:12 +00:00 committed by GitHub
parent 0dd86de586
commit 37f86a06c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,8 @@
import { engines } from '../../package.json'
export async function checkEngines () {
const satisfies = await import('semver/functions/satisfies.js').then(r => r.default) // npm/node-semver#381
const satisfies = await import('semver/functions/satisfies.js')
.then(r => r.default || r as any as typeof import('semver/functions/satisfies.js')) // npm/node-semver#381
const currentNode = process.versions.node
const nodeRange = engines.node