node/test/sea
Joyee Cheung 966b700623
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-25 10:40:15 +01:00
..
sea.status test: skip --build-sea tests on platforms where SEA is flaky 2026-01-28 19:35:54 +01:00
test-build-sea-already-exists.js sea: add --build-sea to generate SEA directly with Node.js binary 2026-01-25 00:07:49 +01:00
test-build-sea-config-not-found.js sea: add --build-sea to generate SEA directly with Node.js binary 2026-01-25 00:07:49 +01:00
test-build-sea-custom-argv0.js src: fix --build-sea default executable path 2026-02-19 11:13:45 +01:00
test-build-sea-executable-field.js sea: add --build-sea to generate SEA directly with Node.js binary 2026-01-25 00:07:49 +01:00
test-build-sea-invalid-assets.js sea: add --build-sea to generate SEA directly with Node.js binary 2026-01-25 00:07:49 +01:00
test-build-sea-invalid-boolean-fields.js sea: add --build-sea to generate SEA directly with Node.js binary 2026-01-25 00:07:49 +01:00
test-build-sea-invalid-exec-argv.js sea: add --build-sea to generate SEA directly with Node.js binary 2026-01-25 00:07:49 +01:00
test-build-sea-invalid-executable.js sea: print error information when fs operations fail 2026-02-02 14:02:23 +01:00
test-build-sea-invalid-json.js sea: add --build-sea to generate SEA directly with Node.js binary 2026-01-25 00:07:49 +01:00
test-build-sea-missing-main.js sea: add --build-sea to generate SEA directly with Node.js binary 2026-01-25 00:07:49 +01:00
test-build-sea-missing-output.js sea: add --build-sea to generate SEA directly with Node.js binary 2026-01-25 00:07:49 +01:00
test-build-sea.js sea: add --build-sea to generate SEA directly with Node.js binary 2026-01-25 00:07:49 +01:00
test-single-executable-application-asset-keys-empty.js test: migrate to --build-sea in existing SEA tests 2026-01-25 00:07:49 +01:00
test-single-executable-application-asset-keys.js test: migrate to --build-sea in existing SEA tests 2026-01-25 00:07:49 +01:00
test-single-executable-application-assets-invalid-type.js test: use fixture directories for sea tests 2026-01-25 00:07:48 +01:00
test-single-executable-application-assets-nonexistent-file.js test: use fixture directories for sea tests 2026-01-25 00:07:48 +01:00
test-single-executable-application-assets-raw.js test: migrate to --build-sea in existing SEA tests 2026-01-25 00:07:49 +01:00
test-single-executable-application-assets.js test: migrate to --build-sea in existing SEA tests 2026-01-25 00:07:49 +01:00
test-single-executable-application-disable-experimental-sea-warning.js test: migrate to --build-sea in existing SEA tests 2026-01-25 00:07:49 +01:00
test-single-executable-application-empty.js test: migrate to --build-sea in existing SEA tests 2026-01-25 00:07:49 +01:00
test-single-executable-application-esm-code-cache.js sea: support code cache for ESM entrypoint in SEA 2026-03-25 10:40:15 +01:00
test-single-executable-application-esm.js sea: support ESM entry point in SEA 2026-02-19 11:14:05 +01:00
test-single-executable-application-exec-argv-empty.js test: migrate to --build-sea in existing SEA tests 2026-01-25 00:07:49 +01:00
test-single-executable-application-exec-argv-extension-cli.js test: migrate to --build-sea in existing SEA tests 2026-01-25 00:07:49 +01:00
test-single-executable-application-exec-argv-extension-env.js test: migrate to --build-sea in existing SEA tests 2026-01-25 00:07:49 +01:00
test-single-executable-application-exec-argv-extension-none.js test: migrate to --build-sea in existing SEA tests 2026-01-25 00:07:49 +01:00
test-single-executable-application-exec-argv.js test: migrate to --build-sea in existing SEA tests 2026-01-25 00:07:49 +01:00
test-single-executable-application-inspect-in-sea-flags.js test: migrate to --build-sea in existing SEA tests 2026-01-25 00:07:49 +01:00
test-single-executable-application-inspect.js test: migrate to --build-sea in existing SEA tests 2026-01-25 00:07:49 +01:00
test-single-executable-application-snapshot-and-code-cache.js test: migrate to --build-sea in existing SEA tests 2026-01-25 00:07:49 +01:00
test-single-executable-application-snapshot-worker.js test: migrate to --build-sea in existing SEA tests 2026-01-25 00:07:49 +01:00
test-single-executable-application-snapshot.js test: migrate to --build-sea in existing SEA tests 2026-01-25 00:07:49 +01:00
test-single-executable-application-use-code-cache.js test: migrate to --build-sea in existing SEA tests 2026-01-25 00:07:49 +01:00
test-single-executable-application.js test: use fixture directories for sea tests 2026-01-25 00:07:48 +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 2026-01-13 10:04:33 -03:00