fix(kit, nuxi): semver regexp to support nuxt-edge current releases (bridge) (#7193)

This commit is contained in:
AndreyYolkin 2022-09-03 16:08:23 +03:00 committed by GitHub
parent de62520990
commit b97cc27469
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ export async function checkNuxtCompatibility (constraints: NuxtCompatibility, nu
if (constraints.nuxt) {
const nuxtVersion = getNuxtVersion(nuxt)
const nuxtSemanticVersion = nuxtVersion
.replace(/-[0-9]+\.[0-9a-f]{7}/, '') // Remove edge prefix
.replace(/-[0-9]+\.[0-9a-f]{7,8}/, '') // Remove edge prefix
if (!satisfies(nuxtSemanticVersion, constraints.nuxt, { includePrerelease: true })) {
issues.push({
name: 'nuxt',

View File

@ -29,7 +29,7 @@ export async function cleanupNuxtDirs (rootDir: string) {
export function nuxtVersionToGitIdentifier (version: string) {
// match the git identifier in the release, for example: 3.0.0-rc.8-27677607.a3a8706
const id = /\.([0-9a-f]{7})$/.exec(version)
const id = /\.([0-9a-f]{7,8})$/.exec(version)
if (id?.[1]) {
return id[1]
}