fix: sort provider version lists newest first

Preserve Minecraft release and snapshot chronology, compare loader versions numerically with provider-specific prerelease/build handling, and order Modrinth and CurseForge versions by publication date, including cached lists.

Add regression coverage and live API ordering checks.

Fixes #45
This commit is contained in:
objz committed 2026-10-06 09:15:22 +02:00
1 parent 874c38d7f8
commit 25a4b90f1f
23 files changed
+664 -95

No files matched your search

+3 -1
View File
@@ -569,7 +569,9 @@ async fn fetch_versions_from(
break;
}
}
Ok(files.into_iter().map(version_info).collect())
let mut versions = files.into_iter().map(version_info).collect::<Vec<_>>();
crate::instance::content::provider::sort_versions_newest_first(&mut versions);
Ok(versions)
}
pub async fn fetch_file_versions(