fix(registry): align OCI and RubyGems API behavior and improve npm search result ordering

This commit is contained in:
2026-03-24 23:23:03 +00:00
parent abf7605e14
commit 5acd1d6166
8 changed files with 58 additions and 32 deletions

View File

@@ -254,14 +254,12 @@ export function generateVersionsJson(
uploadTime?: string;
}>
): any {
return {
name: gemName,
versions: versions.map(v => ({
number: v.version,
platform: v.platform || 'ruby',
built_at: v.uploadTime,
})),
};
// RubyGems.org API returns a flat array at /api/v1/versions/{gem}.json
return versions.map(v => ({
number: v.version,
platform: v.platform || 'ruby',
built_at: v.uploadTime,
}));
}
/**