0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-24 03:07:54 +01:00
nodejs/lib
Joyee Cheung 7cb3a662da
module: allow ESM that failed to be required to be re-imported
When a ESM module cannot be loaded by require due to the presence
of TLA, its module status would be stopped at kInstantiated. In
this case, when it's imported again, we should allow it to be
evaluated asynchronously, as it's also a common pattern for users
to retry with dynamic import when require fails.

PR-URL: https://github.com/nodejs/node/pull/55502
Fixes: https://github.com/nodejs/node/issues/55500
Refs: https://github.com/nodejs/node/issues/52697
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-10-28 12:21:22 +00:00
..
assert
dns
fs
inspector
internal module: allow ESM that failed to be required to be re-imported 2024-10-28 12:21:22 +00:00
path
readline
stream
test
timers
util
_http_agent.js
_http_client.js
_http_common.js
_http_incoming.js
_http_outgoing.js
_http_server.js
_stream_duplex.js
_stream_passthrough.js
_stream_readable.js
_stream_transform.js
_stream_wrap.js
_stream_writable.js
_tls_common.js
_tls_wrap.js
assert.js
async_hooks.js
buffer.js
child_process.js
cluster.js
console.js
constants.js
crypto.js
dgram.js
diagnostics_channel.js
dns.js
domain.js
eslint.config_partial.mjs
events.js
fs.js
http2.js
http.js
https.js
inspector.js
module.js
net.js
os.js
path.js
perf_hooks.js
process.js
punycode.js
querystring.js
readline.js
repl.js
sea.js
sqlite.js
stream.js
string_decoder.js
sys.js
test.js
timers.js
tls.js
trace_events.js
tty.js
url.js
util.js
v8.js
vm.js
wasi.js
worker_threads.js
zlib.js