Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nodejs/node
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: WebReflection/node
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 6 files changed
  • 1 contributor

Commits on Oct 13, 2017

  1. Enable explicit .m.js intent for ESM

    As discussed in the [.mjs extension trade-offs](nodejs/node-eps#57 (comment)) post, it would be great if NodeJS could provide a way to explicitly opt-in as ESM, without needing to use a different extension.
    
    The purpose of this PR is to enable a universal convention for ESM that would work out of the box in both browsers and other JavaScript environment including SpiderMonkey and JSC.
    
    If the file is imported with a fully qualified path name, and such path name uses the `.m.js` convention, the format will be ESM and it will throw if such file does not respect such format.
    
    The current NodeJS diversion from the rest of the JavaScript environments is alarming for various reasons and consistency, as well as code reliability, is currently potentially compromised, as described in details in [this blog post](https://codeburst.io/the-javascript-modules-limbo-585eedbb182e).
    
    If there is anything else I could do in order to land this PR while ESM is still behind an experimental flag, please let me know, thank you.
    WebReflection committed Oct 13, 2017
    Configuration menu
    Copy the full SHA
    b8239d2 View commit details
    Browse the repository at this point in the history
Loading