mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +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) {
|
||||
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',
|
||||
|
@ -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]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user