Skip to content

fix: show "none" if package has no license#656

Merged
danielroe merged 3 commits intonpmx-dev:mainfrom
Nadjaroemer:fix-show-license-if-package-has-no-license
Feb 1, 2026
Merged

fix: show "none" if package has no license#656
danielroe merged 3 commits intonpmx-dev:mainfrom
Nadjaroemer:fix-show-license-if-package-has-no-license

Conversation

@Nadjaroemer
Copy link
Copy Markdown
Contributor

Currently we hide the license column if there's no license. With this PR render "None" instead, similar to what npmjs.com does.

license-none

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 1, 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 1, 2026 4:46pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 1, 2026 4:46pm
npmx-lunaria Ignored Ignored Feb 1, 2026 4:46pm

Request Review

@whitep4nth3r
Copy link
Copy Markdown
Contributor

Great idea!

We'll need translations for the word "None". The files live in i18n/locales.

We may need to mobilise the i18n team in the Discord! Would be good to post in the channel: https://discord.com/channels/1464542801676206113/1465734070817259601

Comment thread app/pages/[...package].vue Outdated
<dd class="font-mono text-sm text-fg">
<LicenseDisplay :license="pkg.license" />
<LicenseDisplay v-if="pkg.license" :license="pkg.license" />
<span v-else>None</span>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additionally to what @whitep4nth3r said here #656 (comment)

You could add the variant for english in en.json, IIRC $t('package.license.none') should be according to the naming schema for language keys.

The i18n:check for the language files should then be automagically infer that the key is missing for the respective file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thank you so much @stephfh! I configured the variant in en.json, want to have a second look?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good on my machine. :D

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 1, 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-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.

@Nadjaroemer
Copy link
Copy Markdown
Contributor Author

Nadjaroemer commented Feb 1, 2026

Great idea!

We'll need translations for the word "None". The files live in i18n/locales.

We may need to mobilise the i18n team in the Discord! Would be good to post in the channel: https://discord.com/channels/1464542801676206113/1465734070817259601

Thank you so much @whitep4nth3r . I've made some changes and will reach out in the i18n channel.

@danielroe danielroe added this pull request to the merge queue Feb 1, 2026
Merged via the queue into npmx-dev:main with commit cdd8d19 Feb 1, 2026
13 checks passed
taskylizard pushed a commit to taskylizard/npmx.dev that referenced this pull request Feb 7, 2026
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
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