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: unify TypeScript and .mjs handling in CommonJS #55590

Merged
merged 1 commit into from
Oct 31, 2024

Commits on Oct 29, 2024

  1. module: unify TypeScript and .mjs handling in CommonJS

    This refactors the CommonJS loading a bit to create a center point
    that handles source loading (`loadSource`) and make format detection
    more consistent to pave the way for future synchronous hooks.
    
    - Handle .mjs in the .js handler, similar to how .cjs has been handled.
    - Generate the legacy ERR_REQUIRE_ESM in a getRequireESMError() for
      both .mts and require(esm) handling (when it's disabled).
    joyeecheung committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    47244a0 View commit details
    Browse the repository at this point in the history