fix(pypi): key rows on the file name and show the release version

A PyPI row keys on the file name so each file of a release keeps its own cache and storage key. A new release_version column holds the real version and the API and dashboard show it. Startup deletes old sidecar rows with their storage and fills the release version on old file rows, keeping their storage keys. Startup also drops an empty download_events_old table. This replaces the local-version suffix.
This commit is contained in:
2026-11-23 02:36:53 +00:00
parent fb25501ae4
commit 1c9b04fba4
17 changed files with 333 additions and 47 deletions
+5
View File
@@ -17,6 +17,11 @@ export function formatDate(date: string): string {
return Number.isNaN(parsed.getTime()) ? date : parsed.toLocaleString()
}
/** PyPI rows key on the file name; show the release version when the API sends one. */
export function displayVersion(pkg: { version: string; release_version?: string }): string {
return pkg.release_version || pkg.version
}
export function withVersionPrefix(version: string): string {
return version.startsWith('v') ? version : 'v' + version
}