Skip to content

feat: add version history page#2025

Draft
ShroXd wants to merge 18 commits intonpmx-dev:mainfrom
ShroXd:linkable-version-page
Draft

feat: add version history page#2025
ShroXd wants to merge 18 commits intonpmx-dev:mainfrom
ShroXd:linkable-version-page

Conversation

@ShroXd
Copy link
Contributor

@ShroXd ShroXd commented Mar 10, 2026

🔗 Linked issue

Resolves #1846

🧭 Context

📚 Description

@vercel
Copy link

vercel bot commented Mar 10, 2026

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

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Mar 13, 2026 1:18pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Mar 13, 2026 1:18pm
npmx-lunaria Ignored Ignored Mar 13, 2026 1:18pm

Request Review

Comment on lines +10 to +16
const route = useRoute()
const router = useRouter()

const packageName = computed(() => {
const { org, name } = route.params as { org?: string; name: string }
return org ? `${org}/${name}` : (name as string)
})
Copy link
Member

Choose a reason for hiding this comment

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

Since we enables the experimental typed pages (ref. Experimental Features · Nuxt Advanced v4), you can get the fully typed route with this:

Suggested change
const route = useRoute()
const router = useRouter()
const packageName = computed(() => {
const { org, name } = route.params as { org?: string; name: string }
return org ? `${org}/${name}` : (name as string)
})
const route = useRoute('package-version')
const router = useRouter()
const packageName = computed(() => {
const { org, name } = route.params
return org ? `${org}/${name}` : name
})

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since we enables the experimental typed pages (ref. Experimental Features · Nuxt Advanced v4), you can get the fully typed route with this:

Thanks for mentioning that! I will fix this before sending the request.

Because this PR is still WIP and I'm tweaking the UX details, I'm using as and other shortcuts to cheat the type system for now — saves tokens for both AI and my brain. 😉

Copy link
Member

Choose a reason for hiding this comment

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

I see, that makes sense. 👍🏻

@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

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

Files with missing lines Patch % Lines
app/components/Package/Versions.vue 75.00% 2 Missing ⚠️
app/pages/package/[[org]]/[name].vue 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

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.

Linkable package page to show list of versions

2 participants