Skip to content

Conversation

@antfu
Copy link
Collaborator

@antfu antfu commented Feb 11, 2026

I don't know how common the case is for everyone, but I found that one of the most played actions for me to visit a package's npm page is when I found a new major version released, and I wanted to know what has changed. So my flow would be

search for the package -> npm -> repo -> release page

As many release notes are hosted in GitHub, I think it would be very useful for npmx to offer an easy entry for accessing the release notes.

CleanShot 2026-02-11 at 14 13 14@2x

A few open questions:

  • Apparently, I use Claude Code to generate the fetchReleases for providers other than GitHub, I didn't test them, and actually don't really know how. Should we keep them as-is for future contribution to improve, or should we remove them entirely and add back one by one later?
  • For improve the above experience for developers, maybe we should have a list of package example that we can go through (that are configured with different source hosting, that contributors can check them one-by-one). And also maybe a dev-time only page (debug page) for linking them easily (out of scope of this PR)
  • At least for GitHub, we actually have the markdown and html content of the release note, should we render them in our app instead of linking them? (for future PR)
  • As we have more and more items, the UI is getting a bit crowded, to keep things scoped, I plan to tweak the UI in another PR later.

Edit: I just notice it has some conflicts to the existing work #1233 (issue #501), linking for ack

@vercel
Copy link

vercel bot commented Feb 11, 2026

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

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 11, 2026 5:47am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 11, 2026 5:47am
npmx-lunaria Ignored Ignored Feb 11, 2026 5:47am

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 11, 2026

📝 Walkthrough

Walkthrough

Adds repository release support surfaced in the package UI: a new Release type and getMatchedRelease utility; provider adapters gain fetchReleases and releases links; useRepoMeta exposes releases, pending/error state and refresh; Package Versions and package page accept and use a releases?: Release[] prop to render optional release links next to version entries; i18n keys and schemas for release-related strings added.

Suggested labels

idea

Suggested reviewers

  • danielroe
  • alexdln
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description clearly explains the motivation (reducing navigation steps to reach release notes), demonstrates the feature with a screenshot, and outlines the implementation approach for multiple package hosting providers.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/release

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Feb 11, 2026

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
lunaria/files/en-GB.json Localization changed, will be marked as complete.
lunaria/files/en-US.json Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 20.49180% with 97 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
app/composables/useRepoMeta.ts 0.00% 50 Missing and 9 partials ⚠️
app/components/Package/Versions.vue 58.97% 16 Missing ⚠️
app/pages/package/[[org]]/[name].vue 0.00% 9 Missing and 4 partials ⚠️
app/utils/releases.ts 18.18% 7 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (3)
app/pages/package/[[org]]/[name].vue (1)

764-770: Both icon syntax forms are functionally equivalent in UnoCSS preset-icons; i-carbon-catalog (dash) and i-carbon:catalog (colon) resolve to the same icon. The dash syntax is often preferred in practice due to escaping considerations in CSS tooling. If the project has established a colon-syntax convention for consistency, update accordingly; otherwise, the current dash syntax is acceptable.

app/components/Package/Versions.vue (2)

487-497: Duplicate function call for each version entry.

getMatchedRelease() is called twice per version—once for the v-if check and again for the :to binding. Consider computing the matched release once per row using a helper or inline binding to avoid redundant lookups.

Additionally, per project learnings, prefer colon-syntax for UnoCSS icons: i-carbon:catalog instead of i-carbon-catalog.

♻️ Suggested approach

Option 1: Use a v-bind with a computed release in a wrapper element or use template variables.

Option 2: Create a computed map of version→release at component level:

const versionReleaseMap = computed(() => {
  const releases = props.releases ?? []
  const map = new Map<string, Release>()
  for (const r of releases) {
    // populate based on getMatchedRelease logic
  }
  return map
})

For the icon syntax fix:

-classicon="i-carbon-catalog size-3.5"
+classicon="i-carbon:catalog size-3.5"

Based on learnings: "In Vue components that use UnoCSS with the preset-icons collection, prefer colon-syntax for icons (e.g., i-carbon:checkmark) over the dash-separated form (i-carbon-checkmark)."


681-693: Inconsistent accessibility pattern across release links.

This release link uses a manual icon span with sr-only text (Lines 691-692), whereas the earlier release links (Lines 487-497, 562-568) use the classicon prop without sr-only. This creates inconsistent screen reader experiences.

Consider standardising all release links to use either:

  • The classicon prop consistently (if it handles accessibility internally), or
  • Manual icon + sr-only span everywhere

Comment on lines +214 to +218
return releases.map(release => ({
tag: release.tag,
url: `https://github.com/${ref.owner}/${ref.repo}/releases/tag/${release.tag}`,
name: release.name,
publishedAt: release.publishedAt,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Encode tag values when building release URLs.
Tags can contain /, spaces, or other characters; interpolating them directly can break links.

🛠️ Suggested fix
-        url: `https://github.com/${ref.owner}/${ref.repo}/releases/tag/${release.tag}`,
+        url: `https://github.com/${ref.owner}/${ref.repo}/releases/tag/${encodeURIComponent(release.tag)}`,
-        url: `https://${baseHost}/${ref.owner}/${ref.repo}/-/releases/${release.tag_name}`,
+        url: `https://${baseHost}/${ref.owner}/${ref.repo}/-/releases/${encodeURIComponent(release.tag_name)}`,
-        url: `https://bitbucket.org/${ref.owner}/${ref.repo}/src/${tag.name}`,
+        url: `https://bitbucket.org/${ref.owner}/${ref.repo}/src/${encodeURIComponent(tag.name)}`,

Also applies to: 300-304, 377-380

@aditya-ai-architect
Copy link

Acknowledged, I will review this.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Comment on lines +487 to +497
<LinkBase
v-if="getMatchedRelease(row.primaryVersion.version, props.releases ?? [])"
:to="getMatchedRelease(row.primaryVersion.version, props.releases ?? [])!.url"
classicon="i-carbon-catalog size-3.5"
:title="
$t('package.releases.view_release_for_version', {
version: row.primaryVersion.version,
})
"
class="inline-flex items-center text-fg-muted hover:text-fg transition-colors shrink-0"
/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add an accessible label for icon-only release links.

These LinkBase instances render icon-only links without visible text or an explicit aria-label, which risks an unnamed control for screen readers.

🧩 Suggested change
  <LinkBase
    v-if="getMatchedRelease(row.primaryVersion.version, props.releases ?? [])"
    :to="getMatchedRelease(row.primaryVersion.version, props.releases ?? [])!.url"
    classicon="i-carbon:catalog size-3.5"
    :title="
      $t('package.releases.view_release_for_version', {
        version: row.primaryVersion.version,
      })
    "
+   :aria-label="
+     $t('package.releases.view_release_for_version', {
+       version: row.primaryVersion.version,
+     })
+   "
    class="inline-flex items-center text-fg-muted hover:text-fg transition-colors shrink-0"
  />

Also applies to: 562-568, 861-874


⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

cat -n app/components/Package/Versions.vue | sed -n '485,500p'

Repository: npmx-dev/npmx.dev

Length of output: 957


🏁 Script executed:

cat -n app/components/Package/Versions.vue | sed -n '560,570p'

Repository: npmx-dev/npmx.dev

Length of output: 733


🏁 Script executed:

cat -n app/components/Package/Versions.vue | sed -n '689,695p'

Repository: npmx-dev/npmx.dev

Length of output: 515


🏁 Script executed:

cat -n app/components/Package/Versions.vue | sed -n '790,796p'

Repository: npmx-dev/npmx.dev

Length of output: 510


🏁 Script executed:

cat -n app/components/Package/Versions.vue | sed -n '870,876p'

Repository: npmx-dev/npmx.dev

Length of output: 446


🏁 Script executed:

cat -n app/components/Package/Versions.vue | sed -n '945,951p'

Repository: npmx-dev/npmx.dev

Length of output: 557


🏁 Script executed:

rg 'i-carbon-catalog' app/components/Package/Versions.vue

Repository: npmx-dev/npmx.dev

Length of output: 474


🏁 Script executed:

rg 'classicon="i-carbon-' app/components/Package/Versions.vue

Repository: npmx-dev/npmx.dev

Length of output: 228


Use UnoCSS colon-syntax for icons (i-carbon:catalog).

All six instances of the release catalogue icon use dash-separated syntax, which should be changed to colon-syntax. This aligns with the project's icon naming conventions and improves UnoCSS resolution performance.

Suggested changes
- classicon="i-carbon-catalog size-3.5"
+ classicon="i-carbon:catalog size-3.5"

- classicon="i-carbon-catalog size-3"
+ classicon="i-carbon:catalog size-3"

- <span class="i-carbon-catalog size-3" aria-hidden="true" />
+ <span class="i-carbon:catalog size-3" aria-hidden="true" />

Affected locations: lines 490, 566, 691, 792, 872, 947

antfu and others added 3 commits February 11, 2026 14:43
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@danielroe
Copy link
Member

I love this!

I think we should have a page in npmx to show releases, if possible.

(the bar at the top: page/code/compare - I think should only link to internal pages within npmx, so maybe let's move it down to the 'repo meta' - stars, forks, etc.) --- or maybe render as a small icon button next to the 'provenance badge' next to the package name? (that way it's clear that it's about that version

can't wait to see the ui improvements you make 🙏

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.

3 participants