-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
improve Package search sorting #860
improve Package search sorting #860
Conversation
jderochervlk
commented
May 13, 2024
•
edited
Loading
edited
- increase number of included packages from 250 to 750 (currently 512)
- filter out packages with a low maintenance score (< 0.3) and add in a filter to show "outdated" packages
- add query params to npm registry api call to adjust weights to favor maintenance and quality
- sort by weight in the UI
- filter out packages with "reason" in the title to keep the focus on ReScript specific packages
Before | After |
---|---|
@jderochervlk is attempting to deploy a commit to the ReScript Association Team on Vercel. A member of the Team first needs to authorize 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.
very nice work
src/Packages.res
Outdated
->Js.Array2.concat(parsePkgs(data2)) | ||
->Js.Array2.concat(parsePkgs(data3)) | ||
->Js.Array2.filter(pkg => { | ||
if [/* Allow list of names */]->Js.Array2.includes(pkg.name) { |
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.
You could do a
let allowList = []
somehwere at the beginning of the file already then you don't need the comment here.
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.
Done.
src/Packages.res
Outdated
|
||
Belt.Array.concat(filteredNpm, filteredUrls) | ||
Belt.Array.concat(filteredNpm, filteredUrls)->Belt.Array.concat(filteredOutdated) |
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.
there is also Belt.Array.concatMany([])
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.
Fixed.