-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
Remove the non-deterministic module export modification in native.ts #391
Conversation
In rare cases (notably jest), if it reloads the module cache for every test-suite, all test-suites that are run after the first one will have the `methods` dict have the values {send: undefined, received: undefined, ...}, because the ./native module itself is reloaded, however the node-gyp-build module is not (hence has the aforementioned dict keys of Socket.prototype deleted => undefined). Instead of spelunking into figuring out how to make the previous very-non-standard semantics work, this seems like a simpler and more robust solution.
Thanks @Eximius , i wasn't crazy |
I'd be happy to merge this; but there seem to be some unrelated changes included. Could you update the PR so only the relevant code bits are modified? |
I can remove the bumps, but the other changes would seemingly help in general? |
If there are any other issues you want to address feel free to open a separate pull request for them. Without any description it's not obvious why the other changes are needed. |
Hi @rolftimmermans and @Eximius, any new on this PR ? May i help to split commits? |
In rare cases (notably jest), if it reloads the module cache for every test-suite, all test-suites that are run after the first one will have the
methods
dict have the values {send: undefined, received: undefined, ...}, because the ./native module itself is reloaded, however the node-gyp-build module is not (hence has the aforementioned dict keys of Socket.prototype deleted => undefined).Instead of spelunking into figuring out how to make the previous very-non-standard semantics work, the changes I introduce seem like a simpler and more robust solution.