From 948f77050dae884fe88932fd88af75560aac9d78 Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Wed, 13 Apr 2022 00:26:24 -0400 Subject: [PATCH] admin: fixed update scripts to not conflict with reticulate used in v6 --- misc/admin/lib/npm.js | 6 +++++- misc/admin/src.ts/npm.ts | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) 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];