fix(nuxt): exempt equality check for kit/schema version

This commit is contained in:
Daniel Roe 2024-05-21 16:55:22 +01:00
parent e5649613c7
commit a531e6f466
No known key found for this signature in database
GPG Key ID: 3714AB03996F442B
1 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ import fse from 'fs-extra'
import { withTrailingSlash, withoutLeadingSlash } from 'ufo'
import defu from 'defu'
import { gte } from 'semver'
import { gt } from 'semver'
import pagesModule from '../pages/module'
import metaModule from '../head/module'
import componentsModule from '../components/module'
@ -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 && gt(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.`)
}
}