-
-
Notifications
You must be signed in to change notification settings - Fork 189
feat: add package scores display #914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: add package scores display #914
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
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
📝 WalkthroughWalkthroughAdds package score support: a new Vue 3 component ScoreBars displays quality, popularity and maintenance as coloured progress bars; a composable usePackageScore provides lazy fetching of NPMS scores; the package page renders the component in two locations; a server API endpoint /api/registry/score/[...pkg] fetches and caches NPMS scores and exports an NpmsScore type; i18n locales (en.json, en-GB.json, en-US.json) include scores keys; accessibility tests for the component were added. Suggested labels
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)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
| import { PackageRouteParamsSchema } from '#shared/schemas/package' | ||
| import { CACHE_MAX_AGE_ONE_HOUR } from '#shared/utils/constants' | ||
|
|
||
| const NPMS_API = 'https://api.npms.io/v2/package' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the badge logic also uses the npms.io, so we should move this to the constants file and reuse it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, this is now implemented in the last commit.
43081j
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
i noticed the npms.io data is pretty outdated so i have raised that separately in discord FYI
Closes #875
Adds: