-
Notifications
You must be signed in to change notification settings - Fork 23
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
⭐️ npm.packages resource #3333
⭐️ npm.packages resource #3333
Conversation
2afdf9a
to
870117b
Compare
Test Results2 790 tests +1 2 789 ✅ +1 47s ⏱️ -5s Results for commit b1387f8. ± Comparison against base commit b4b0122. This pull request removes 4 and adds 5 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
870117b
to
6992bd4
Compare
6992bd4
to
bb5e00f
Compare
bb5e00f
to
2ae6bcd
Compare
afs := &afero.Afero{Fs: conn.FileSystem()} | ||
isDir, err := afs.IsDir(path) | ||
if err != nil { | ||
return nil, nil, nil, nil, err |
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.
[nit] it might be a good time to introduce a struct to return. that's a lot of return values
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.
will do that in another round. great idea.
if err != nil { | ||
continue | ||
} | ||
for i := range files { |
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.
since we use 1.22 you can safely do for _, f := range files
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.
I still do not trust go on this 🤣 That burned me too often.
a481073
to
b1387f8
Compare
This PR adds a new
npm
resource to gather npm pacakges.It supports finding the globally installed packages via:
You can also parse individual projects: