From 715f4954cf63e02c5836568349135982f5ce20c2 Mon Sep 17 00:00:00 2001 From: EpicPix Date: Wed, 26 Aug 2026 01:53:24 +0200 Subject: [PATCH] fix: handle minecraft version grouping for versions containing release name (#7313) fix: handle minecraft version grouping for version containing release name better --- .../components/McVersionPicker.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/frontend/src/components/ui/create-project-version/components/McVersionPicker.vue b/apps/frontend/src/components/ui/create-project-version/components/McVersionPicker.vue index aca16652ef..1584c64e26 100644 --- a/apps/frontend/src/components/ui/create-project-version/components/McVersionPicker.vue +++ b/apps/frontend/src/components/ui/create-project-version/components/McVersionPicker.vue @@ -193,7 +193,15 @@ function groupVersions(gameVersions: GameVersion[]) { if (!groups[currentGroupKey]) groups[currentGroupKey] = [] groups[currentGroupKey].push(gameVersion.version) } else { - if (!currentGroupKey) currentGroupKey = getSnapshotGroupKey(gameVersion.version) + // there are two different types of snapshot names: + // - the new YY.D-snapshot.* + // - and the old YYw.* + // for the new one (or any pre/rc release), the version that it will be released in is always included + // - we also have to check that the dot is in the first or second character, and in the other place is a number, because of `3D-Shareware-v1.34` for example + // - *and* also because of really old versions, the first character has to be a number + const containsVersionName: boolean = /^\d(\d\.|\.\d)/.test(gameVersion.version) + if (!currentGroupKey || containsVersionName) + currentGroupKey = getSnapshotGroupKey(gameVersion.version) const key = `${currentGroupKey} ${DEV_RELEASE_KEY}` if (!groups[key]) groups[key] = []