-
-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add npm user validity check #659
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
feat: add npm user validity check #659
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #659 +/- ##
==========================================
+ Coverage 99.35% 99.39% +0.03%
==========================================
Files 25 25
Lines 778 824 +46
Branches 122 127 +5
==========================================
+ Hits 773 819 +46
Misses 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
A good start! I think the core idea is solid. Requesting a bit of touching up on the error, a refactor for clarity, and some testing.
Looks like the checks are failing due to a |
Weird, looks like it was some kind of merge weirdness from #669. I fixed it on |
Thank you! I updated this branch with |
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.
Looking great, just one more refactor to talk about!
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.
This is probably the first time I've seen throw await
actually used 😄 very nice! 🔥
PR Checklist
status: accepting prs
Overview
This PR adds a user validity check if the API response from the npm registry API returns zero packages to differentiate between invalid npm users and valid users with zero packages.
How It Works
Invalid npm username.
error.No packages found for npm username: ${username}.
error.Testing
I updated the unit tests that were affected by these changes and then I ran the unit tests using
pnpm run test
.🤖