Maintain strict tagging of GameVersion

This commit is contained in:
Cooldude2606 committed 2026-07-02 00:08:09 +01:00
1 parent 8029ad3b2d
commit 2e27c4f499
8 files changed
+37 -45

No files matched your search

+3 -5
View File
@@ -763,12 +763,10 @@ export default class Controller {
const serialized = rawJson as Static<typeof lib.ModPack.jsonSchema>[];
return serialized.map(json => {
for (const mod of json.mods) {
// Older mod packs recorded builtins with a major.minor version; pad
// those to major.minor.patch. Raw versions the game reads leniently
// (e.g. with leading zeros) are kept verbatim so they still match the
// mod's file name.
// migrate: 2.0.0-alpha.22 - old buildins used X.Y rather than X.Y.Z
// All other versions are kept verbatim so they still match the mod's file name.
if (lib.isPartialVersion(mod.version)) {
mod.version = lib.normaliseFullVersion(mod.version);
mod.version = lib.normaliseFullVersion(mod.version) as lib.GameVersion;
}
}
return json;