-
-
Notifications
You must be signed in to change notification settings - Fork 186
fix(ui): fallback to exact package lookup for short queries #729
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
fix(ui): fallback to exact package lookup for short queries #729
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
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
|
…m/MatteoGabriele/npmx.dev into feat/invalid-query-length-message
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.
maybe instead just query to see if that specific package exists, instead of making a search?
(but still display it as though it were a search)
Would love that too, a regular list entry with the "exact" label |
…m/MatteoGabriele/npmx.dev into feat/invalid-query-length-message
|
@danielroe I made some changes. I decided to handle the exception in the search result call directly so that the UI wouldn't need any weird exception handling. Screen.Recording.2026-02-02.at.14.43.52.mov |
…m/MatteoGabriele/npmx.dev into feat/invalid-query-length-message
wojtekmaj
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.
LGTM and works
garthdw
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.
Could we avoid the api call entirely since it will always error?
Good point! I'll make a change |
This is a proposal to fix the query length issue.
NPM has a query minimum of 2 characters, so it won't return anything even if the package actually exists.
Screen.Recording.2026-02-02.at.11.55.26.mov
closes #722