mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-19 09:55:53 +00:00
fix(kit)!: handle prerelease constraint (#7116)
This commit is contained in:
parent
612580d633
commit
0339a23372
@ -11,8 +11,9 @@ export async function checkNuxtCompatibility (constraints: NuxtCompatibility, nu
|
|||||||
// Nuxt version check
|
// Nuxt version check
|
||||||
if (constraints.nuxt) {
|
if (constraints.nuxt) {
|
||||||
const nuxtVersion = getNuxtVersion(nuxt)
|
const nuxtVersion = getNuxtVersion(nuxt)
|
||||||
const nuxtSemanticVersion = nuxtVersion.split('-').shift()
|
const nuxtSemanticVersion = nuxtVersion
|
||||||
if (!satisfies(nuxtSemanticVersion, constraints.nuxt)) {
|
.replace(/-[0-9]+\.[0-9a-f]{7}/, '') // Remove edge prefix
|
||||||
|
if (!satisfies(nuxtSemanticVersion, constraints.nuxt, { includePrerelease: true })) {
|
||||||
issues.push({
|
issues.push({
|
||||||
name: 'nuxt',
|
name: 'nuxt',
|
||||||
message: `Nuxt version \`${constraints.nuxt}\` is required but currently using \`${nuxtVersion}\``
|
message: `Nuxt version \`${constraints.nuxt}\` is required but currently using \`${nuxtVersion}\``
|
||||||
|
Loading…
Reference in New Issue
Block a user