Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[WIP] Add ability to install custom JS module loaders. #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: base/24.1.2
Choose a base branch
from

Conversation

sgammon
Copy link
Member

@sgammon sgammon commented Feb 24, 2025

  • Adds JSModuleLoaderFactory interface for ESM loader hook.
  • Adds CommonJSResolverHook interface for CJS resolver hook.
  • Adds js.module-loader-factory=handler setting to enable.
  • Adjusts JSEngine to retain the installed factory and/or resolver.
  • Adjusts JSRealm to use JSEngine to create the module loader.
  • Adjusts NpmCompatibleESModuleLoader to be extensible.
  • Adjusts CommonJSResolution to use the resolver hook if present.

Relates to oracle/graal#9177
Relates to elide-dev/elide#1227

- Adds `JSModuleLoaderFactory` interface for ESM loader hook.
- Adds `CommonJSResolverHook` interface for CJS resolver hook.
- Adds `js.module-loader-factory=handler` setting to enable.
- Adjusts `JSEngine` to retain the installed factory and/or resolver.
- Adjusts `JSRealm` to use `JSEngine` to create the module loader.
- Adjusts `NpmCompatibleESModuleLoader` to be extensible.
- Adjusts `CommonJSResolution` to use the resolver hook if present.

Relates to oracle/graal#9177

Signed-off-by: Sam Gammon <[email protected]>
@sgammon sgammon self-assigned this Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant