Skip to content
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

module: refator ESM loader for adding future synchronous hooks #54769

Merged
merged 1 commit into from
Sep 17, 2024

Commits on Sep 16, 2024

  1. module: refator ESM loader for adding future synchronous hooks

    This lays the foundation for supporting synchronous hooks proposed
    in nodejs/loaders#198 for ESM.
    
    - Corrects and adds several JSDoc comments for internal functions
      of the ESM loader, as well as explaining how require() for
      import CJS work in the special resolve/load paths. This doesn't
      consolidate it with import in require(esm) yet due to caching
      differences, which is left as a TODO.
    - The moduleProvider passed into ModuleJob is replaced as
      moduleOrModulePromise, we call the translators directly in the
      ESM loader and verify it right after loading for clarity.
    - Reuse a few refactored out helpers for require(esm) in
      getModuleJobForRequire().
    joyeecheung committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    5ecaf9c View commit details
    Browse the repository at this point in the history