-
-
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
5 builtins missing from jest-resolve
#4677
Comments
Feel free to send a PR to check for these in Jest. |
I'll give it a shot! |
We should whitelist all with an underscore here: https://github.com/nodejs/node/tree/master/lib Fix should be here: https://github.com/facebook/jest/blob/0748e6f76394b58ce24aee42e08c96fb509e8744/packages/jest-resolve/src/index.js#L199 |
Awesome! @SimenB that was the solution I was trying, but I got stuck on something. Happy to see somebody figured it out. 😄 |
BTW, requiring |
I'm going to double check that with - dang Twitter is fast, James already replied https://twitter.com/jasnell/status/923895172705824768 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Expected result: tests pass
Actual result:
These are builtin modules that are part of the undocumented "private" core API but are unfortunately shimmed in browserify, and some module authors continue to prefer them over the public builtins because using them shaves a few kb off of their bundle size:
My root problem is that the test-runner,
jest
, does not recognize_stream_transform
as a core module and breaks as a result. You can see I originally tried to submit a fix tothru
(the module that requires_stream_transform
) but as switching from_stream_transform
tostream
would have increased the bundle size, I am now looking for other solutions.builtin-modules
is philosophically opposed to adding them to it's list.is-builtin-module
is by the same author. So I've worked my way up the dependency chain tojest-resolve
. Hopefully you will see that practicality of adding these to the list of builtin modules, sincebrowserify
makes this assumption already.The text was updated successfully, but these errors were encountered: