node/test/fixtures
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
..
0-dns
apilinks
b
clustered-server
console lib: add diagnostics_channel events to module loading 2024-06-20 21:25:04 -03:00
copy fs: convert to u8 string for filesystem path 2024-09-21 09:13:19 -07:00
crypto
cycles
debugger
dotenv src: fix env-file flag to ignore spaces before quotes 2024-07-17 09:22:42 +00:00
errors test: make snapshot comparison more flexible 2024-08-16 14:29:22 +00:00
es-module-loaders esm: fix inconsistency with importAssertion in resolve hook 2024-10-15 21:02:07 +02:00
es-module-require-cache
es-module-shadow-realm
es-module-specifiers
es-module-url
es-modules module: allow ESM that failed to be required to be re-imported 2024-10-28 12:21:22 +00:00
GH-7131
GH-54265 lib: fix emit warning for debuglog.time when disabled 2024-08-27 16:20:35 +00:00
global
inspector-instrumentation-breakpoint test: add Debugger.setInstrumentationBreakpoint known issue 2024-05-12 22:33:07 +02:00
internal-modules
json-with-directory-name-module
keys test: fix test-tls-client-mindhsize for OpenSSL32 2024-09-11 22:19:12 -07:00
macos-app-sandbox
module-extension-over-directory
module-load-order
module-mocking test_runner: fix mocking modules with quote in their URL 2024-09-25 17:34:58 +00:00
module-require
module-require-symlink
nested-index
node_modules module: support 'module.exports' interop export in require(esm) 2024-10-01 21:13:03 -07:00
openssl3-conf
package-main-enoent
packages module: add findPackageJSON util 2024-10-25 20:40:54 +00:00
permission test: fix improper path to URL conversion 2024-08-24 20:10:11 +00:00
postject-copy
process process: port on-exit-leak-free to core 2024-07-11 17:57:20 +00:00
repl-folder-extensions/foo.js
require-bin
require-empty-main
resolve-paths
run-script cli: ensure --run has proper pwd 2024-09-18 12:18:40 +00:00
sea
self_ref_module
snapshot src: fixup Error.stackTraceLimit during snapshot building 2024-09-30 15:05:12 +00:00
source-map lib: decorate async stack trace in source maps 2024-07-18 14:45:43 +00:00
syntax
test-init-index
test-init-native
test-module-loading-globalpaths
test-repl-tab-completion
test-runner lib: ensure FORCE_COLOR forces color output in non-TTY environments 2024-10-23 06:51:50 +00:00
tools/checkimports
typescript process: fix process.features.typescript when Amaro is unavailable 2024-10-11 11:27:16 +00:00
uncaught-exceptions
v8
v8-coverage
vm
warning_node_modules src: implement IsInsideNodeModules() in C++ 2024-10-08 10:19:46 +00:00
wasi
watch-mode
workload
wpt test,crypto: update WebCryptoAPI WPT 2024-10-26 07:41:27 +00:00
x509-escaping
.empty-hidden-repl-history-file
.empty-repl-history-file
.node_repl_history
a.js
aead-vectors.js
altdocs.md
assert-first-line.js
assert-long-line.js
async-error.js
baz.js
catch-stdout-error.js
child_process_should_emit_error.js
child-process-echo-options.js
child-process-message-and-exit.js
child-process-persistent.js
child-process-spawn-node.js
child-process-stay-alive-forever.js
cjs-module-wrap.js
cjs-module-wrapper.js
cluster-preload-test.js
cluster-preload.js
compile-cache-flush.js module: implement flushCompileCache() 2024-09-20 19:05:07 +00:00
compile-cache-wrapper.js src: add JS APIs for compile cache and NODE_DISABLE_COMPILE_CACHE 2024-08-28 23:22:57 +00:00
crash.wasm
crash.wat
debugger-repeat-last.js
debugger-util-regression-fixture.js
deep-exit.js src: parse --stack-trace-limit and use it in --trace-* flags 2024-09-30 15:05:12 +00:00
define-global.js
deprecated-userland-class.js
deprecated-userland-function.js
deprecated-userland-subclass.js
deprecated.js
destroy-stdin.js
disable-warning-worker.js
disable-warning.js
doc_inc_1.md
doc_inc_2.md
doc_with_backticks_in_headings.md
doc_with_yaml.md
document_with_cjs_and_esm_code_snippet.md
document_with_esm_and_cjs_code_snippet.md
document_with_links.md
document_with_special_heading.md
echo-close-check.js
echo.js
elipses.txt
empty-with-bom.txt
empty.cjs
empty.js
empty.json
empty.txt
emptyframe.http2
exit.js
experimental.json
exports-function-with-param.js
external-repl-module.js
failcounter.js
failmustcall1.js
failmustcall2.js
file-to-read-with-bom.txt
file-to-read-without-bom.txt
fixture.ini
foo
gc.js
get-call-site.js lib: add util.getCallSite() API 2024-09-04 19:47:25 +00:00
GH-892-request.js
GH-1899-output.js
google_ssl_hello.bin
guess-hash-seed.js
inspector-global-function.mjs
inspector-open.js
intrinsic-mutation.js
invalid.json
is-object.js
ispreloading.js
klass-with-fields.js
leakedGlobal.js
linux-perf-logger.js
linux-perf.js
loop.js
mime-whatwg-generated.js
mime-whatwg.js
module-loading-error.node
monkey-patch-run-main.js
net-fd-passing-receiver.js
no-wrapper.js
not-main-module.js
old-repl-history-file-faulty.json
old-repl-history-file-obj.json
openssl_fips_disabled.cnf
openssl_fips_enabled.cnf
order_of_end_tags_5873.md
out-of-bound.wasm
out-of-bound.wat
outside.txt
overwrite-config-preload-module.js
parent-process-nonpersistent-fork.js
parent-process-nonpersistent.js
path-resolve.js
path.js
person-large.jpg
person.jpg
person.jpg.br
person.jpg.gz
pkgexports.mjs module: support 'module.exports' interop export in require(esm) 2024-10-01 21:13:03 -07:00
print A.js
print-10-lines.js
print-chars-from-buffer.js
print-chars.js
print-delayed.js
print-error-message.js
print-intrinsic-mutation-name.js
printA.js
printB.js
printC.js
pseudo-multimember-gzip.gz
pseudo-multimember-gzip.z
pss-vectors.json
readfile_pipe_test.txt
recursive-a.cjs
recursive-b.cjs
recvfd.js
registerExt2.test
registerExt.hello.world
registerExt.test
repl-load-multiline-no-trailing-newline.js
repl-load-multiline.js
repl-pretty-stack.js
repl-tab-completion-nested-repls.js
report-oom.js
require-resolve.js
rsa-oaep-test-vectors.js
sample_document.md
sample.png
sea.js src: refactor embedded entrypoint loading 2024-07-05 19:58:35 +00:00
semicolon.js
shared-memory.wasm
shared-memory.wat
should_exit.js
simple.wasm
simple.wat
spawn_closed_stdio.py
spawn-worker-with-copied-env.js test: skip --title check on IBM i 2024-07-22 11:39:04 +00:00
spawn-worker-with-trace-exit.js worker: allow copied NODE_OPTIONS in the env setting 2024-07-05 18:40:03 +00:00
test-error-first-line-offset.js
test-fs-readfile-error.js
test-fs-stat-sync-overflow.js
test-nodetiming-uvmetricsinfo.js src,lib: add performance.uvMetricsInfo 2024-08-30 14:22:28 +00:00
test-resolution-inspect-brk-main.ext
test-resolution-inspect-brk-resolver.js
test-runner-watch.mjs test_runner: add cwd option to run 2024-10-03 15:45:49 +00:00
throws_error1.js
throws_error2.js
throws_error3.js
throws_error4.js
throws_error5.js
throws_error6.js
throws_error7.js
throws_error.js
tls-connect.js Revert "util: move util._extend to eol" 2024-06-14 13:07:58 +00:00
tls-session-ticket.txt
tz-version.txt deps: update timezone to 2024b 2024-09-26 16:26:59 +00:00
url-idna.js
url-searchparams.js
url-setter-tests-additional.js
url-tests-additional.js
utf8_test_text.txt
utf8-bom-shebang-shebang.js
utf8-bom.js
utf8-bom.json
utf8-shebang-bom.js
warnings.js
wasi-preview-1.js
worker-data.cjs
worker-data.mjs
worker-from-argv.js
worker-name.js
worker-preload.js
worker-script.mjs
worker-script.ts
x1024.txt
x.txt