The shouldUseGitHubOverride util is called with Module._load parameters. So far, it assumed it will get a string request and a NodeModuleparent parameters. However, for ESM imports parent is actually undefined.
Account for this in code by making parent an optional argument; add a test.
The
shouldUseGitHubOverride
util is called withModule._load
parameters. So far, it assumed it will get a stringrequest
and aNodeModule
parent
parameters. However, for ESM importsparent
is actuallyundefined
.Account for this in code by making
parent
an optional argument; add a test.Fixes gh-1421
cc @fbartho