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:
1 parent
874c38d7f8
commit
25a4b90f1f
23 files changed
+664
-95
No files matched your search
+4
-1
@@ -79,7 +79,10 @@ pub async fn fetch_fabric_versions_from(
|
||||
) -> Result<Vec<FabricLoaderVersion>, NetError> {
|
||||
let url = format!("{}/versions/loader/{}", meta_base, game_version);
|
||||
tracing::debug!("Fetching Fabric loader versions for {}", game_version);
|
||||
let versions: Vec<FabricLoaderVersion> = client.get_json(&url).await?;
|
||||
let mut versions: Vec<FabricLoaderVersion> = client.get_json(&url).await?;
|
||||
versions.sort_by(|a, b| {
|
||||
super::versions::compare_fabric_versions(&b.loader.version, &a.loader.version)
|
||||
});
|
||||
tracing::debug!(
|
||||
"Fetched {} Fabric loader version(s) for {}",
|
||||
versions.len(),
|
||||
|
||||
Reference in new issue
Block a user