Make it work with Babel 7#55
Conversation
Fix kentcdodds#52 by changing babel-register with @babel/register
Codecov Report
@@ Coverage Diff @@
## master #55 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 4 4
Lines 102 102
Branches 21 21
=====================================
Hits 102 102
Continue to review full report at Codecov.
|
|
I wonder if we should also explicitely add a peerDep on |
|
Thanks @tleunen! So actually, I'd prefer to go the route that babel-plugin-macros went which is that it doesn't require babel-register at all or even a specific version of babel: https://github.com/kentcdodds/babel-plugin-codegen/pull/12/files It's a little large, but it basically amounts to passing the Would you be willing to do that? |
|
Yes, it's actually a better way to solve it. I'll do that tomorrow. |
|
Super! Thank you very much :D |
|
@kentcdodds Could you take a look at why the tagged template tests fail? Looks like the tests don't use the babelrc config? |
|
I'll try to get to it as soon as I'm able. No promises I'll have time anytime soon though :-( That said, at work we're upgrading to babel 7 so I may have some worktime for this. |
|
I'm working on this now and almost finished. We're going to have a breaking change and lose support for something, but it'll be better this way. |
BREAKING CHANGE: We no longer run require('babel-register') so not all code will be transpiled with babel by preval. Some will, but it's advised to not write code that you want prevaled in a way that doesn't run in the version of node you're using
|
Alrighty, that should do it! |
|
Thank you @kentcdodds 😄 |
|
🎉 This PR is included in version 2.0.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Fix #52 by changing
babel-registerwith@babel/register