fix(registry): align OCI and RubyGems API behavior and improve npm search result ordering
This commit is contained in:
@@ -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,
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user