fix(nuxt): invert version check

This commit is contained in:
Daniel Roe 2024-05-21 15:06:27 +01:00
parent d35e9cd3f5
commit e5649613c7
No known key found for this signature in database
GPG Key ID: 3714AB03996F442B

View File

@ -646,7 +646,7 @@ async function checkDependencyVersion (name: string, nuxtVersion: string): Promi
if (!path) { return }
const { version } = await readPackageJSON(path)
if (version && gte(nuxtVersion, version)) {
if (version && !gte(nuxtVersion, version)) {
console.warn(`[nuxt] Expected \`${name}\` to be at least \`${nuxtVersion}\` but got \`${version}\`. This might lead to unexpected behavior. Check your package.json or refresh your lockfile.`)
}
}