node/test/sea
Joyee Cheung 9ff27fdb01
sea: support code cache for ESM entrypoint in SEA
The initial support for ESM entrypoint in SEA didn't support
code cache. This patch implements that by following a path
similar to how code cache in CJS SEA entrypoint is supported:
at build time we generate the code cache from C++ and put it
into the sea blob, and at runtime we consume it via a special
case in compilation routines - for CJS this was
CompileFunctionForCJSLoader, in the case of SourceTextModule,
it's in Module::New.

PR-URL: https://github.com/nodejs/node/pull/62158
Refs: https://github.com/nodejs/node/pull/61813
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2026-03-10 22:37:10 +00:00
..
sea.status test: skip --build-sea tests on platforms where SEA is flaky 2026-01-26 13:13:57 +00:00
test-build-sea-already-exists.js sea: add --build-sea to generate SEA directly with Node.js binary 2026-01-22 23:32:50 +01:00
test-build-sea-config-not-found.js sea: add --build-sea to generate SEA directly with Node.js binary 2026-01-22 23:32:50 +01:00
test-build-sea-custom-argv0.js src: fix --build-sea default executable path 2026-02-09 23:27:02 +00:00
test-build-sea-executable-field.js sea: add --build-sea to generate SEA directly with Node.js binary 2026-01-22 23:32:50 +01:00
test-build-sea-invalid-assets.js sea: add --build-sea to generate SEA directly with Node.js binary 2026-01-22 23:32:50 +01:00
test-build-sea-invalid-boolean-fields.js sea: add --build-sea to generate SEA directly with Node.js binary 2026-01-22 23:32:50 +01:00
test-build-sea-invalid-exec-argv.js sea: add --build-sea to generate SEA directly with Node.js binary 2026-01-22 23:32:50 +01:00
test-build-sea-invalid-executable.js sea: print error information when fs operations fail 2026-02-02 12:43:45 +00:00
test-build-sea-invalid-json.js sea: add --build-sea to generate SEA directly with Node.js binary 2026-01-22 23:32:50 +01:00
test-build-sea-missing-main.js sea: add --build-sea to generate SEA directly with Node.js binary 2026-01-22 23:32:50 +01:00
test-build-sea-missing-output.js sea: add --build-sea to generate SEA directly with Node.js binary 2026-01-22 23:32:50 +01:00
test-build-sea.js sea: add --build-sea to generate SEA directly with Node.js binary 2026-01-22 23:32:50 +01:00
test-single-executable-application-asset-keys-empty.js test: migrate to --build-sea in existing SEA tests 2026-01-22 23:32:51 +01:00
test-single-executable-application-asset-keys.js test: migrate to --build-sea in existing SEA tests 2026-01-22 23:32:51 +01:00
test-single-executable-application-assets-invalid-type.js test: use fixture directories for sea tests 2026-01-22 23:32:44 +01:00
test-single-executable-application-assets-nonexistent-file.js test: use fixture directories for sea tests 2026-01-22 23:32:44 +01:00
test-single-executable-application-assets-raw.js test: migrate to --build-sea in existing SEA tests 2026-01-22 23:32:51 +01:00
test-single-executable-application-assets.js test: migrate to --build-sea in existing SEA tests 2026-01-22 23:32:51 +01:00
test-single-executable-application-disable-experimental-sea-warning.js test: migrate to --build-sea in existing SEA tests 2026-01-22 23:32:51 +01:00
test-single-executable-application-empty.js test: migrate to --build-sea in existing SEA tests 2026-01-22 23:32:51 +01:00
test-single-executable-application-esm-code-cache.js sea: support code cache for ESM entrypoint in SEA 2026-03-10 22:37:10 +00:00
test-single-executable-application-esm.js sea: support ESM entry point in SEA 2026-02-18 21:03:33 +00:00
test-single-executable-application-exec-argv-empty.js test: migrate to --build-sea in existing SEA tests 2026-01-22 23:32:51 +01:00
test-single-executable-application-exec-argv-extension-cli.js test: migrate to --build-sea in existing SEA tests 2026-01-22 23:32:51 +01:00
test-single-executable-application-exec-argv-extension-env.js test: migrate to --build-sea in existing SEA tests 2026-01-22 23:32:51 +01:00
test-single-executable-application-exec-argv-extension-none.js test: migrate to --build-sea in existing SEA tests 2026-01-22 23:32:51 +01:00
test-single-executable-application-exec-argv.js test: migrate to --build-sea in existing SEA tests 2026-01-22 23:32:51 +01:00
test-single-executable-application-inspect-in-sea-flags.js test: migrate to --build-sea in existing SEA tests 2026-01-22 23:32:51 +01:00
test-single-executable-application-inspect.js test: migrate to --build-sea in existing SEA tests 2026-01-22 23:32:51 +01:00
test-single-executable-application-snapshot-and-code-cache.js test: migrate to --build-sea in existing SEA tests 2026-01-22 23:32:51 +01:00
test-single-executable-application-snapshot-worker.js test: migrate to --build-sea in existing SEA tests 2026-01-22 23:32:51 +01:00
test-single-executable-application-snapshot.js test: migrate to --build-sea in existing SEA tests 2026-01-22 23:32:51 +01:00
test-single-executable-application-use-code-cache.js test: migrate to --build-sea in existing SEA tests 2026-01-22 23:32:51 +01:00
test-single-executable-application.js test: use fixture directories for sea tests 2026-01-22 23:32:44 +01:00
test-single-executable-blob-config-errors.js
test-single-executable-blob-config.js
testcfg.py test: fix debug test crashes caused by sea tests 2025-11-27 10:22:58 +00:00