-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Refactor and update index.js to use fdir() #5653
Conversation
A couple questions on this one
Why?
Do you know where this text originated? I've started to see it on some scripts, but I have no idea where this text comes from originally. It's… off in some ways and I'm not sure whether we should be reproducing it. |
It matches what’s in: https://www.mozilla.org/MPL/headers/#pd-c. There’s also: Line 1 in f4737ee
|
For the arrow function syntax, we’ve got a lot of functions in our code that use the arrow function syntax. I figured it makes sense to maintain function style consistency! The primary part is the inclusion of the “files” argument, however — when I first saw the function, I was quite confused about how it functioned since I didn’t see the code down below that uses the “arguments” keyword. None of the other loading functions throughout BCD use it; they all have the same “files” argument. As for the copyright notice, this is because BCD as a whole is licensed under the CC0 license! |
Co-authored-by: Philip Jägenstedt <[email protected]>
This reverts commit feef405.
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, but unless I'm mistaken the main change of this PR is to migrate to fdir()
(from fs.readdirSync()
), and this should be mirrored at least in the PR title (which is used for the squash merge commit), but ideally also in the PR description.
This pull request has merge conflicts that must be resolved before we can merge this. |
Uh oh... @foolip this apparently broke the collector because |
This PR updates index.js in a couple of ways:
arguments
keyword with a defined...files
argument (for both consistency and function legibility)fdir()
to walk the file tree