-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Passed filePath to dependencyExtractor #7362
Passed filePath to dependencyExtractor #7362
Conversation
3dfc38b
to
5e950de
Compare
5e950de
to
a5fc6e3
Compare
a5fc6e3
to
a4b1e36
Compare
const crypto = require('crypto'); | ||
|
||
module.exports = { | ||
extract(code, filePath, defaultExtract) { |
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.
Should we pass an object instead of multiple args? Or code
as first, then an object?
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 would've preferred that (I generally prefer objects than positional arguments as they're easier to extend) but I favored consistency with the rest of the Jest codebase.
Now that we're considering how the configuration should be from now on, we can reach an agreement about this.
This isn't urgent so we can discuss this in a wider scope before merging.
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.
My vote is an object :D
@rubennorte land this? 🙂 |
a4b1e36
to
efaa14f
Compare
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
The dependency extraction might depend on the filename (some Babel plugins dynamically add dependencies using the filename). This passes an additional parameter to the
extract
method (which is breaking but this hasn't been released in any stable yet).Test plan
Updated unit and e2e tests.