Skip to content

feat(releases): detect prerelease-only repos and mark prereleases in the UI - #9

Merged
NewtTheWolf merged 1 commit into
mainfrom
feat/prerelease-detection-and-badges
Aug 18, 2026
Merged

feat(releases): detect prerelease-only repos and mark prereleases in the UI#9
NewtTheWolf merged 1 commit into
mainfrom
feat/prerelease-detection-and-badges

Conversation

@NewtTheWolf

Copy link
Copy Markdown
Contributor

Follow-up to #7. With the semver comparison fixed, the admin Replay webhook on the PostgreSQL plugin still returned No published release found on the upstream repo.

Why

fetchLatestRelease asked GitHub for /repos/{owner}/{repo}/releases/latest, and GitHub defines that as the newest non-prerelease, non-draft release. Every release of that plugin is flagged prerelease=true, so the endpoint answers 404 and we turned that into "no releases".

v1.0.0-beta.7   prerelease=true   draft=false
v1.0.0-beta.6   prerelease=true   draft=false
v1.0.0-beta.5   prerelease=true   draft=false

Four call sites were affected — the admin replay, the rehash, and both submit paths (preview and OAuth submit). A plugin that only ships betas could not be submitted with its manifest, could not be rehashed, and could not be replayed. Those releases only ever reached the registry because the webhook delivers the payload directly and never consults /releases/latest.

Change

Both provider paths now list releases and rank them by semver:

  • Fixes the prerelease-only case, which is the reported bug.
  • Puts this in step with persistRelease, which already ranks by semver. /releases/latest would pin a stable 1.0.0 as latest even after 1.1.0-beta.1 shipped, so the ingest and the fetch disagreed about the current version.
  • Skips drafts explicitly, which /releases/latest used to do for us.
  • GitLab gets the same ranking (it listed releases already, but took whatever came first).

UI

Prereleases stay first-class — they are shown, and now labelled. A pre-release badge sits next to the version on the plugin card, the detail header, the download section, and each prerelease row in the releases list.

Prerelease-ness is derived from the version string (isPrerelease in $lib/utils): ingest enforces strict semver, so a hyphen ahead of any +build metadata is exactly the prerelease marker. No schema change, no new API field.

Localized in all six languages.

Verification

New tests/lib/release-fetch.test.ts covers prerelease-only repos, semver ranking over provider order, stable-beats-own-prerelease, newer-prerelease-beats-older-stable, draft skipping, empty listings, 404s, and asset carry-over — 7 of the 10 fail against the old implementation. Full API suite 468 pass / 0 fail, tsc clean, svelte-check 0 errors.

…the UI

GitHub defines /releases/latest as the newest NON-prerelease, so a plugin
that only ships betas 404s there and looks like it has no releases at
all. Every fetchLatestRelease caller silently gave up on such a repo:
the admin replay returned 'No published release found on the upstream
repo', and both submit paths ingested no manifest and no release.

Both provider paths now list releases and rank them by semver instead.
That also puts this in step with persistRelease, which already ranks by
semver — /releases/latest would have pinned a stable 1.0.0 as latest even
after 1.1.0-beta.1 shipped, so the two disagreed about the current
version.

Prereleases stay first-class and are now labelled: a pre-release badge
sits next to the version on the plugin card, the detail header, the
download section, and each affected row in the releases list.
Prerelease-ness is derived from the version string — ingest already
enforces strict semver, so no schema change is needed.

Localized in all six languages.
@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
tabularium-docs Skipped Skipped Aug 18, 2026 5:18pm
tabularium-website Skipped Skipped Aug 18, 2026 5:18pm

Request Review

@NewtTheWolf
NewtTheWolf merged commit f4993fd into main Aug 18, 2026
9 checks passed
@NewtTheWolf
NewtTheWolf deleted the feat/prerelease-detection-and-badges branch August 18, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant