Skip to content

feat: adding gh changelog/releases to npmx#1233

Draft
WilcoSp wants to merge 96 commits intonpmx-dev:mainfrom
WilcoSp:feat/changelog-1
Draft

feat: adding gh changelog/releases to npmx#1233
WilcoSp wants to merge 96 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)
npmx.dev Ready Ready Preview, Comment Mar 13, 2026 8:34pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Mar 13, 2026 8:34pm
npmx-lunaria Ignored Ignored Mar 13, 2026 8:34pm

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 62.50000% with 18 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

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

📢 Thoughts on this report? Let us know!

@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

@WilcoSp
Copy link
Contributor Author

WilcoSp commented Mar 13, 2026

I've updated this pr to integrate with the new PackageHeader component, it does also make the top ui for mobile better in my opinion.
afbeelding
afbeelding

I've also taken the time to add skeleton loaders and an error message if getting the release or changelog.md failed (for example due to ungh.cc's api key being expired)

afbeelding

@WilcoSp
Copy link
Contributor Author

WilcoSp commented Mar 13, 2026

because of the update there is an issue when not giving a version, I'll fix this tomorrow.

also suggested from discord, I'll also going to change that the sticky header will also be one with toc, not the one with github

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