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

Deprecated es6 and es6-global in favor of esmodule #6709

Merged
merged 6 commits into from
Apr 12, 2024

Conversation

cometkim
Copy link
Member

@cometkim cometkim commented Apr 3, 2024

In v11.x, we only print a deprecation warning for "es6" and "es6" usage and notice to use "esmodule"

In v12

  • Remove "es6" and "es6-global" completely, and redirect related output paths (lib/js to lib/cjs, lib/es6 to lib/mjs or we can just merge it into single lib/js)
  • "esmodule", the standard format will be the default output format.
  • Additional option to emit an importmap so provide better alternative to the legacy "es6-global"

@cometkim
Copy link
Member Author

cometkim commented Apr 3, 2024

For reference

  • node: "commonjs" and "module"
  • rollup: "cjs" and "es"
  • webpack: "commonjs" and "module"
  • esbuild: "cjs" and "esm"
  • swc: "commonjs" and "es6"
  • typescript: "commonjs" and "esnext"

The most accurate term is simply “module” rather than "esmodule". Used by Webpack and Node.js. However, it might be a bit confusing due to the branding I guess

@cometkim
Copy link
Member Author

cometkim commented Apr 6, 2024

@cknitt Can this be included in v11.1 rc? if we have no more v11.x after that

@cknitt
Copy link
Member

cknitt commented Apr 6, 2024

Personally I would have preferred to not add any more new features, bigger changes or deprecations to the 11.1 rcs as we are very close to the release already.

But I understand that you want to get the deprecation in now to prepare for removal of the deprecated settings in v12.
So if it is fine with @zth it is fine with me. 🙂

@zth
Copy link
Collaborator

zth commented Apr 10, 2024

I'm a bit on the fence about this, but since we plan no more 11 releases after this then sure, let's merge it.

@zth
Copy link
Collaborator

zth commented Apr 11, 2024

@cometkim can you update the branch? Then ready to merge. Also, please update all relevant docs, so people don't get confused.

@cometkim
Copy link
Member Author

@zth done!

@zth zth self-requested a review April 12, 2024 12:46
@zth zth merged commit 6fd1e73 into rescript-lang:11.0_release Apr 12, 2024
14 checks passed
@cometkim cometkim deleted the deprecate-es6 branch April 12, 2024 12:47
cometkim added a commit to cometkim/rescript-lang.org that referenced this pull request Apr 13, 2024
@cometkim cometkim mentioned this pull request Jun 3, 2024
6 tasks
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.

None yet

3 participants