Uh oh!
There was an error while loading. Please reload this page.
feat: add a warning when the package license changes - #2188
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis change introduces a license-change detection and notification system for package versions. A new composable fetches npm registry metadata for a given package, extracts and chronologically sorts all versions, then compares licenses between consecutive versions to identify transitions. When changes are detected, they are displayed via a warning component that renders an amber alert panel with formatted change details. Supporting internationalization strings have been added to the schema and locale files in English and Turkish. Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f7c1c88e-8b86-4447-9fdb-bfbc10c1ff70
📒 Files selected for processing (6)
app/components/LicenseDisplay.vueapp/composables/useLicenseChanges.tsapp/pages/package/[[org]]/[name].vuei18n/locales/en.jsoni18n/locales/tr-TR.jsoni18n/schema.json
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
aisiklar
commented
Mar 23, 2026
hi @ghostdevv |
ghostdevv
commented
Mar 23, 2026
Awesome! I'll mark this as draft for now, and you can mark it as ready when you want me to take another look! |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…sorting versions to date of release
Hi @ghostdevv |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 274b5e5e-8053-43ca-946d-f111b04b96f3
📒 Files selected for processing (5)
app/components/LicenseDisplay.vueapp/composables/useLicenseChanges.tsi18n/locales/en.jsoni18n/locales/tr-TR.jsoni18n/schema.json
✅ Files skipped from review due to trivial changes (2)
- i18n/locales/en.json
- i18n/schema.json
🚧 Files skipped from review as they are similar to previous changes (2)
- i18n/locales/tr-TR.json
- app/composables/useLicenseChanges.ts
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| aria-hidden="true" | ||
| /> | ||
| </span> | ||
| <div |
| let prevLicense: string | undefined = undefined | ||
| // `data.versions` is an object with version keys | ||
| const versions = Object.values(data.versions) as NpmRegistryVersion[] |
There was a problem hiding this comment.
I think we should only compare to the last version, there is some logic here that could be reused (you can move it into its own utility file in shared too
npmx.dev/app/composables/useInstallSizeDiff.ts
Lines 19 to 39 in 1dd1be9
aisiklar
commented
Mar 27, 2026
Hi @ghostdevv thanks for the comments. I am working on them. |
Uh oh!
There was an error while loading. Please reload this page.
…pdated in license-change api
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Roman <dev@rman.dev>
aisiklar
commented
May 2, 2026
thanks for the fix @gameroman |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
addressed, approved by another maintainer
Uh oh!
There was an error while loading. Please reload this page.
Thanks for your first contribution, @aisiklar! 🤩 We'd love to welcome you to the npmx community. Come and say hi on Discord! And once you've joined, visit npmx.wamellow.com to claim the contributor role. |
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Willow (GHOST) <git@willow.sh> Co-authored-by: James Garbutt <43081j@users.noreply.github.com> Co-authored-by: Roman <dev@rman.dev>

🔗 Linked issue
fixes#1826
🧭 Context
added info/warning beneath the license info, "changed!" if there is a change in the license with additional tooltip which shows info about the change, similar to "from x to y at version a.b".
Also modified the Turkish language support too.
📚 Description
as mentioned in the issue, sometimes license changes and it is important to notify the potential user of the package. This pull request is done to make sure that if there is a change in the license the user will be able to see it and also will get info about the details of the change (like from x license to y license and at version a.b.c)
The following changes are done to the codebase:
modified the [name].vue file: added a new props to LicenseDisplay component.
new composable, useLicenseChanges is written.
In the LicenseDisplay component, changes were made to use this composable and add new element for displaying info about the changed license.
Additionally, en.json and tr-TR.json and schema.json files are modified, to add i18n infrastructure and add Turkish language support (for other languages, additional changes are required)
before:

after:
