Skip to content
This repository has been archived by the owner on Jun 29, 2018. It is now read-only.

Update Babel presets #42

Merged
merged 1 commit into from
Aug 2, 2016
Merged

Update Babel presets #42

merged 1 commit into from
Aug 2, 2016

Conversation

taion
Copy link
Contributor

@taion taion commented Jul 31, 2016

  • Explicitly bump versions in package.json
  • Add back CJS module transform to es2015-loose
  • Sync up es2015-loose with es2015

cc @hzoo – right now the es2015-loose setting on the Babel REPL page doesn't transpile ES modules at all, which doesn't match the actual behavior of babel-preset-es2015-loose. That's the only material change here; the rest is just a bit of housekeeping.

- Explicitly bump versions in package.json
- Add back CJS module transform to es2015-loose
- Sync up es2015-loose with es2015
@Daniel15
Copy link
Member

I want to keep a preset that does not do any compilation of CommonJS
modules. Maybe I should give that a different name?

Sent from my phone.

On Jul 31, 2016 4:21 PM, "Jimmy Jia" [email protected] wrote:

  • Explicitly bump versions in package.json
  • Add back CJS module transform to es2015-loose
  • Sync up es2015-loose with es2015

cc @hzoo https://github.com/hzoo – right now the es2015-loose setting
on the Babel REPL page doesn't transpile ES modules at all, which doesn't
match the actual behavior of babel-preset-es2015-loose. That's the only

material change here; the rest is just a bit of housekeeping.

You can view, comment on, or merge this pull request online at:

#42
Commit Summary

  • Update Babel presets

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#42, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAFnHZKXKgh496jB_vVi8Q-mocMHpWkgks5qbS3mgaJpZM4JZJWJ
.

@taion
Copy link
Contributor Author

taion commented Jul 31, 2016

You have one, I think – es2015-no-commonjs: https://github.com/Daniel15/babel-standalone/blob/release-6.10.3/src/index.js#L145.

Though the npm equivalents would be either es2015-native-modules or es2015-webpack, and es2015-loose-native-modules for the loose version.

@Daniel15
Copy link
Member

Daniel15 commented Aug 2, 2016

I think what I actually want is es2015-loose-no-commonjs, but I can add that separately 😛

I'm surprised npm-check-updates did not bump the Babel version... I run it quite frequently. Need to figure out why it's not working.

@Daniel15 Daniel15 merged commit 0940a70 into babel:master Aug 2, 2016
@taion
Copy link
Contributor Author

taion commented Aug 2, 2016

The npm package with that preset has the unfortunate name of babel-preset-es2015-loose-native-modules. Or worse, babel-preset-es2015-webpack-loose.

@taion taion deleted the update-babel branch August 2, 2016 05:42
@Daniel15
Copy link
Member

Daniel15 commented Aug 2, 2016

babel-preset-es2015-webpack-loose.

ಠ_ಠ

@taion
Copy link
Contributor Author

taion commented Aug 2, 2016

Yup. And for the non-loose one, you have your choice of babel-preset-es2015-native-modules and babel-preset-es2015-webpack. And the latter is over 3x as popular on npm. ¯_(ツ)_/¯

Also note that the loose versions don't even consistently put the "loose" modifier in the same place in the package name.

@hzoo
Copy link
Member

hzoo commented Aug 2, 2016

Unfortunate and probably why we need an "official" loose preset, etc. babel/babel#3331 should solve most of the issues

@hzoo
Copy link
Member

hzoo commented Aug 5, 2016

@taion
Copy link
Contributor Author

taion commented Aug 5, 2016

The 6.13.x API actually moots es2015-loose, es2015-no-commonjs, &c. – might be worth cutting a breaking release that just drops those and has just es2015? That'd take the major version out of sync with Babel itself, though.

@Daniel15
Copy link
Member

Daniel15 commented Aug 5, 2016

Cool, I'll check it out! How are the options specified - Are they just passed to the Babel.transform call?

@Daniel15
Copy link
Member

Daniel15 commented Aug 5, 2016

Let's move the discussion to #46 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants