Expose all built-in options for `getConstructor`
Summary
This enables us to easily override getConstructor to not use global
fallback, avoiding the all-consuming try...catch.
Other Information
Here's the context:
Quoting https://github.com/reactjs/react-rails/issues/264#issuecomment-552326663
Regarding
Encountered error "#<ExecJS::ProgramError: Invariant Violation: Element type is invalid: ...:I think one of the core issues is that module lookup uses
try...catch. While the errors are logged to the console shim, that typically doesn't help as a later error (such as the invariant violation) will lead to a fatal error (triggering a 500). If that could be refactored to be a bit more intentional based on environment (instead of just reacting based on exceptions, or at the very least, throwing if the caught exception isn't very specific)
@HarrisonB can you rebase this on master?
Sure! I'll hopefully get to it in the next week or two
@justin808 updated!
@HarrisonB can you confirm that all unit tests run locally?
Currently, we don't have CI working. We need to move to GH Actions.
Having some trouble--See https://github.com/reactjs/react-rails/pull/1198#issuecomment-1229123819
@hibachrach is this ready for merge?
yes, though we should have it trigger CI to make sure it passes. is there a way to do that on your end?
@hibachrach did you rebase on master where the github actions are defined?
Tests are now passing!
@justin808 The PR is good to go if we have no review comments.
Thanks @hibachrach!