src: expose `LookupAndCompile` with parameters
Refs https://github.com/nodejs/node/pull/44018.
This PR exposes a version of LookupAndCompile
that takes parameters instead of detecting them based on module IDs.
Electron currently maintains a wrapper to LookupAndCompile
, which specifically requires parameters because we pass our own modules to LookupAndCompile
in several places:
shell/common/api/electron_api_asar.cc
shell/renderer/electron_sandboxed_renderer_client.cc
shell/renderer/renderer_client_base.cc
and therefore need to be able to able to expose the ability to set that.
I do, however, see that Node.js recently added back a version of CompileAndCall
which is effectively the same as our own CompileAndCall
wrapper, so if it would be better to modify that to allow parameters I would also be happy to take that path.