diff --git a/misc/admin/lib/npm.js b/misc/admin/lib/npm.js index 8c6e0ce7c..6efb6d7b6 100644 --- a/misc/admin/lib/npm.js +++ b/misc/admin/lib/npm.js @@ -47,7 +47,11 @@ function getPackage(name, version) { if (version == null) { const versions = Object.keys(infos.versions); versions.sort(semver_1.default.compare); - version = versions.pop(); + // HACK: So v5 continues working while v6 is managed by reticulate + version = "6.0.0"; + while (version.indexOf("beta") >= 0 || semver_1.default.gte(version, "6.0.0")) { + version = versions.pop(); + } } const info = infos.versions[version]; return { diff --git a/misc/admin/src.ts/npm.ts b/misc/admin/src.ts/npm.ts index 75c448fbe..407e5ebd9 100644 --- a/misc/admin/src.ts/npm.ts +++ b/misc/admin/src.ts/npm.ts @@ -32,7 +32,12 @@ export async function getPackage(name: string, version?: string): Promise= 0 || semver.gte(version, "6.0.0")) { + version = versions.pop(); + } } const info = infos.versions[version];