babel-engine-plugin icon indicating copy to clipboard operation
babel-engine-plugin copied to clipboard

Support Babel 7

Open gavinsharp opened this issue 6 years ago • 7 comments

This adds support for Babel 7 (fixes https://github.com/SamVerschueren/babel-engine-plugin/issues/16), by upgrading the two relevant packages (babel-core->@babel/core and babel-preset-env->@babel/preset-env).

This was surprisingly easier than I expected!

I ran into an issue running tests (perhaps because I'm using a newer version of ava?), so I had to add a config to ignore the fixtures/ files.

I've tested this with our internal app and it works great.

gavinsharp avatar Jun 10 '19 20:06 gavinsharp

Since this breaks compat with Babel <7, perhaps a major version bump is in order?

Not sure what is up with the Travis failures - it seems to be running off master instead of my branch.

gavinsharp avatar Jun 11 '19 02:06 gavinsharp

I misread the Travis log. Test failures actually appears to be https://github.com/avajs/eslint-plugin-ava/issues/253. It's fixed in [email protected], but that doesn't support Node < 8. I guess I will just disable it for now: https://github.com/SamVerschueren/babel-engine-plugin/pull/21/commits/5493b4a862f9cf37de943e195bd83e0d26fca945

gavinsharp avatar Jun 11 '19 02:06 gavinsharp

Ah, but latest Ava (>=2.0) drops support for Node <8 too.

@SamVerschueren does Node 6 support still matter to this project, or is it just a holdover? I am tempted to just drop support here too, which would simplify things.

gavinsharp avatar Jun 11 '19 03:06 gavinsharp

Side note: thanks to Babel 7's project-wide configuration, I believe this also kind of fixes #9 (assuming your project has a babel.config.js).

gavinsharp avatar Jun 11 '19 03:06 gavinsharp

I'd love to see these changes merged; I have a case where babel 7 isn't transpiling a few of my dependencies, and this package fixes it if I use the patched version here. 👍

mildmojo avatar Sep 10 '19 15:09 mildmojo

Looks like this is not getting merged. @gavinsharp is there a way in which I can use your version directly?

rhpijnacker avatar Dec 20 '19 08:12 rhpijnacker

@SamVerschueren Can we get this merged please? Thank you for your work on this plugin, would love to continue using it!

NBeing avatar Jan 29 '20 17:01 NBeing