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

Commit

Permalink
fix(kit, nuxi): fix semver regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyYolkin committed Sep 3, 2022
1 parent fe3fc34 commit 01d169f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/kit/src/compatibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxi/src/utils/nuxt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
Expand Down

0 comments on commit 01d169f

Please sign in to comment.