node/lib/internal/modules
Antoine du Hamel 50f336c06f esm: fallback to getSource when load returns nullish source
When using the Modules Customization Hooks API to load CommonJS modules,
we want to support the returned value of `defaultLoad` which must be
nullish to preserve backward compatibility. This can be achieved by
fetching the source from the translator.

PR-URL: https://github.com/nodejs/node/pull/50825
Fixes: https://github.com/nodejs/node/issues/50435
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2023-11-29 09:49:48 -03:00
..
cjs esm: improve check for ESM syntax 2023-10-23 08:19:34 +02:00
esm esm: fallback to getSource when load returns nullish source 2023-11-29 09:49:48 -03:00
helpers.js esm: improve check for ESM syntax 2023-10-23 08:19:34 +02:00
package_json_reader.js module: move helpers out of cjs loader 2023-09-30 02:24:14 +00:00
run_main.js esm: detect ESM syntax in ambiguous JavaScript 2023-10-23 08:19:41 +02:00