-
Notifications
You must be signed in to change notification settings - Fork 778
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
Fix Node module loading #445
Fix Node module loading #445
Conversation
What are the non functions that leak through to that point? |
Considering the plans in #357 I haven't spent time in analyzing/optimizing further. This fix eliminates the unexpected throw and therefore prevents crashes in applications/libraries that depend on forge. In my case Google Cloud Node.js Client, Google APIs Node.js Client and Jest. |
I think this is fine to merge. I'm only concerned that it's covering up a problem or not fully solving it in those environments where it seems to make a difference. That being said, we're overhauling the module loading system in a new version, so I think this is a perfectly fine stop gap measure if it helps people. We should merge on those grounds, IMO. |
I've lost 2 hours looking for this. (Happened when I was trying to |
Has consensus been reached that this pull request can be merged? The current version of Forge is causing crashes in many places with corresponding upstream issue reports. Please let me know if I can do anything to help moving this forward. Your support in merging this pull request and releasing an update will be very much appreciated by anyone who (indirectly) depend on Forge. |
I merged this since it hopefully won't cause other problems. But I was unable to reproduce the issue with basic require tests. Can someone please post a test case is that fails? Also since I can't test the issue I would still like to know an answer my previous question about what non-function data is that is leaking through. If someone could console.log it that would be nice. It would be better to fix the cause of this problem rather than hack around it. EDIT: discuss in #362 |
Released as 0.6.46. |
Thanks! |
This picks up the fix for digitalbazaar/forge#445, which makes this library not throw under `jest` automocked tests.
This patch fixes module loading on Node.js.