mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-19 01:45: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
|
||||
if (constraints.nuxt) {
|
||||
const nuxtVersion = getNuxtVersion(nuxt)
|
||||
const nuxtSemanticVersion = nuxtVersion.split('-').shift()
|
||||
if (!satisfies(nuxtSemanticVersion, constraints.nuxt)) {
|
||||
const nuxtSemanticVersion = nuxtVersion
|
||||
.replace(/-[0-9]+\.[0-9a-f]{7}/, '') // Remove edge prefix
|
||||
if (!satisfies(nuxtSemanticVersion, constraints.nuxt, { includePrerelease: true })) {
|
||||
issues.push({
|
||||
name: 'nuxt',
|
||||
message: `Nuxt version \`${constraints.nuxt}\` is required but currently using \`${nuxtVersion}\``
|
||||
|
Loading…
Reference in New Issue
Block a user