mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 01:53:55 +00:00
fix(kit, nuxi): semver regexp to support nuxt-edge
current releases (bridge) (#7193)
This commit is contained in:
parent
de62520990
commit
b97cc27469
@ -12,7 +12,7 @@ export async function checkNuxtCompatibility (constraints: NuxtCompatibility, nu
|
|||||||
if (constraints.nuxt) {
|
if (constraints.nuxt) {
|
||||||
const nuxtVersion = getNuxtVersion(nuxt)
|
const nuxtVersion = getNuxtVersion(nuxt)
|
||||||
const nuxtSemanticVersion = nuxtVersion
|
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 })) {
|
if (!satisfies(nuxtSemanticVersion, constraints.nuxt, { includePrerelease: true })) {
|
||||||
issues.push({
|
issues.push({
|
||||||
name: 'nuxt',
|
name: 'nuxt',
|
||||||
|
@ -29,7 +29,7 @@ export async function cleanupNuxtDirs (rootDir: string) {
|
|||||||
|
|
||||||
export function nuxtVersionToGitIdentifier (version: string) {
|
export function nuxtVersionToGitIdentifier (version: string) {
|
||||||
// match the git identifier in the release, for example: 3.0.0-rc.8-27677607.a3a8706
|
// 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]) {
|
if (id?.[1]) {
|
||||||
return id[1]
|
return id[1]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user