fix: support legacy and beta prerelease version formats

This commit is contained in:
Peter Steinberger
2026-02-24 02:05:29 +00:00
parent 08e2aa44e7
commit 6c441ea797
8 changed files with 152 additions and 8 deletions

View File

@@ -22,7 +22,12 @@ type PackageJson = {
};
function normalizePluginSyncVersion(version: string): string {
return version.replace(/[-+].*$/, "");
const normalized = version.trim().replace(/^v/, "");
const base = /^([0-9]+\.[0-9]+\.[0-9]+)/.exec(normalized)?.[1];
if (base) {
return base;
}
return normalized.replace(/[-+].*$/, "");
}
function runPackDry(): PackResult[] {