chore: fix internal plugins publish (#9897)

This commit is contained in:
patak 2022-08-29 16:09:45 +02:00 committed by GitHub
parent 90d452324b
commit 2a66f89855
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -198,7 +198,11 @@ export async function getLatestTag(pkgName: string): Promise<string> {
}
export async function getActiveVersion(pkgName: string): Promise<string> {
return (await run('npm', ['info', pkgName, 'version'], { stdio: 'pipe' }))
const npmName =
pkgName === 'vite' || pkgName === 'create-vite'
? pkgName
: `@vitejs/${pkgName}`
return (await run('npm', ['info', npmName, 'version'], { stdio: 'pipe' }))
.stdout
}