Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix(kit)!: handle prerelease constraint (#7116)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Aug 31, 2022
1 parent 612580d commit 0339a23
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/kit/src/compatibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}\``
Expand Down

0 comments on commit 0339a23

Please sign in to comment.