Skip to content

feat: adding gh changelog/releases within npmx#1233

Open
WilcoSp wants to merge 85 commits intonpmx-dev:mainfrom
WilcoSp:feat/changelog-1
Open

feat: adding gh changelog/releases within npmx#1233
WilcoSp wants to merge 85 commits intonpmx-dev:mainfrom
WilcoSp:feat/changelog-1

Conversation

@WilcoSp
Copy link
Contributor

@WilcoSp WilcoSp commented Feb 8, 2026

This pr will add the possibility to view the changelog.md & releases from a package's github repo within npmx.
This will make it easier to see the changelogs while not needing to leave npmx and allowing quicker access.

This pr is the first pr of #501


Preview here

While I was making this PR antfu also made this pr #1368 and here my comment from his pr

@vercel
Copy link

vercel bot commented Feb 8, 2026

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

Project Deployment Actions Updated (UTC)
docs.npmx.dev Ready Ready Preview, Comment Mar 12, 2026 9:33pm
npmx.dev Ready Ready Preview, Comment Mar 12, 2026 9:33pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
npmx-lunaria Ignored Ignored Mar 12, 2026 9:33pm

Request Review

@github-actions
Copy link

github-actions bot commented Feb 8, 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
i18n/locales/en.json Source changed, localizations will be marked as outdated.
i18n/locales/kn-IN.json Localization changed, will be marked as complete. 🔄️
i18n/locales/tr-TR.json Localization changed, will be marked as complete. 🔄️
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 8, 2026

Codecov Report

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

Files with missing lines Patch % Lines
app/composables/usePackageChangelog.ts 0.00% 5 Missing and 1 partial ⚠️
app/composables/useProviderIcon.ts 16.66% 3 Missing and 2 partials ⚠️
app/components/Changelog/Card.vue 72.72% 3 Missing ⚠️
app/pages/package/[[org]]/[name].vue 0.00% 2 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@WilcoSp
Copy link
Contributor Author

WilcoSp commented Mar 3, 2026

for releases it's now also matching on the version in a release title https://npmxdev-git-fork-wilcosp-feat-changelog-1-npmx.vercel.app/package-changes/nuxt/v/3.20.0

I've also added that if there was already a route hash present that it'll navigate to it when releases have been fetched to ensure that the scrolling happens

@WilcoSp
Copy link
Contributor Author

WilcoSp commented Mar 3, 2026

@WilcoSp
Copy link
Contributor Author

WilcoSp commented Mar 3, 2026

What I've also noticed is with Vite & Pinia's sub packages the changelog.md aren't correctly fetched. for both come from the latest release.

what might be a solution is to also use the repository directory so that the changelog.md can only be either at the root or in the directory.

also for fetching without releases I'll then also expand to use the directory.

but this can be in a different pr, but I'll leave it up to you Daniel.


Also I did notice that ungh.css doesn't give all releases but a selection and it also doesn't support pagination.
either we should switch in a future pr to github's api directly or contribute to ungh.cc for the needed api's


Also for a future pr I do plan to use useRouteParams from vueuse to have the switching between versions perform better and prevent needing to refetch the releases/changelog.md again if it's the same between versions.
for this the routing needs to change from [...path] to the same as how package page is currently, but idk how

@WilcoSp
Copy link
Contributor Author

WilcoSp commented Mar 4, 2026

I've just fixed how the changelog is resolved for vite and other monorepos with changelog.md but the repository.directory does need to be defined, else it'll be the same as the already existing behavior.

@WilcoSp
Copy link
Contributor Author

WilcoSp commented Mar 5, 2026

I've also noticed with at least Turkish & Czech that "view on npm" & "view on github" can differ, so the "view on {site}" that I've made might not work.

I'll ask in the i18n channel in discord what the best solution will be as it'll also be needed for other git providers. for changelog in pr 2 but it's also needed for the package page when readme.md can't be loaded.

WilcoSp added 2 commits March 9, 2026 21:27
… back

releases title's will now use slugify instead of encodeUri to fix issues with encoding
@WilcoSp
Copy link
Contributor Author

WilcoSp commented Mar 9, 2026

I've merged the main branch and updated to use "common.view_on.*" translations.
I've also just fixed an issue that I discovered while browsing oxc's changelogs because of the space character used, I've now moved slugify function to /shared/utils/html.ts to use it also in the front for to make a slug of the release title

unless issues are found I won't add more to this PR and leave it to review & to merge into main
I'll keep the pr up to date and solve merge conflicts if they come up

@jycouet
Copy link
Contributor

jycouet commented Mar 9, 2026

I wanted to have a look, but I'm not sure in what env to check. I looked at:

I'm not sure how previews are working by PR in vercel. Maybe there is a latest link to be used?
In the 3 links, I don't see changelogs of the package

@WilcoSp
Copy link
Contributor Author

WilcoSp commented Mar 9, 2026

@jycouet I advice using https://npmxdev-git-fork-wilcosp-feat-changelog-1-npmx.vercel.app/package-changes/svelte/v/5.53.8
because it's for the pr and updates automatically when a new commit happens.
the other 2 links are for specific commits and won't update

for the changelogs not showing it might be an issue with ungh.cc which is atm the github ap that's being used
it did happen sometimes for during development

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.

4 participants