node/lib/internal/main
Joe 430e66b9b8
esm: implement import.meta.main
Boolean value to check if an ES Module is the entrypoint of the
current process.

Implements: #57226

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/57804
Backport-PR-URL: https://github.com/nodejs/node/pull/58693
Fixes: https://github.com/nodejs/node/issues/57226
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-07-28 08:46:16 +02:00
..
check_syntax.js
embedding.js
eval_stdin.js
eval_string.js
inspect.js
mksnapshot.js
print_help.js
prof_process.js
repl.js
run_main_module.js
test_runner.js
watch_mode.js
worker_thread.js esm: implement import.meta.main 2025-07-28 08:46:16 +02:00