Skip to content

sea: add allowDynamicImportFromFileSystem config option#62771

Open
thisalihassan wants to merge 1 commit intonodejs:mainfrom
thisalihassan:sea-allow-dynamic-import-from-fs
Open

sea: add allowDynamicImportFromFileSystem config option#62771
thisalihassan wants to merge 1 commit intonodejs:mainfrom
thisalihassan:sea-allow-dynamic-import-from-fs

Conversation

@thisalihassan
Copy link
Copy Markdown
Contributor

Adds an explicit allowDynamicImportFromFileSystem config option for SEA. When set to true, import() from the injected main script can load modules from the file system. Default remains sealed (built-ins only), matching the current behavior.

This enables the common SEA pattern where a small bootstrap hands off to a user entrypoint on disk via dynamic import.
Refs: #62726

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/loaders
  • @nodejs/single-executable

@nodejs-github-bot nodejs-github-bot added esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run. single-executable Issues and PRs related to single-executable applications labels Apr 16, 2026
Signed-off-by: Ali Hassan <ali-hassan27@outlook.com>
@thisalihassan thisalihassan force-pushed the sea-allow-dynamic-import-from-fs branch from 86f8733 to ff08042 Compare April 16, 2026 07:58
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 16, 2026

Codecov Report

❌ Patch coverage is 97.43590% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 89.66%. Comparing base (0fea430) to head (ff08042).
⚠️ Report is 26 commits behind head on main.

Files with missing lines Patch % Lines
src/node_sea.cc 95.23% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #62771      +/-   ##
==========================================
- Coverage   89.80%   89.66%   -0.14%     
==========================================
  Files         699      706       +7     
  Lines      216363   218179    +1816     
  Branches    41370    41737     +367     
==========================================
+ Hits       194309   195637    +1328     
- Misses      14140    14450     +310     
- Partials     7914     8092     +178     
Files with missing lines Coverage Δ
lib/internal/modules/esm/utils.js 99.51% <100.00%> (+0.01%) ⬆️
src/node_sea.h 100.00% <ø> (ø)
src/node_sea.cc 89.71% <95.23%> (+0.18%) ⬆️

... and 63 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run. single-executable Issues and PRs related to single-executable applications

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants