-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Upgrade to Babel 6 #333
Upgrade to Babel 6 #333
Conversation
"babel-plugin-transform-runtime": "^6.3.13", | ||
"babel-preset-es2015": "^6.3.13", | ||
"babel-preset-stage-2": "^6.3.13", | ||
"babel-preset-stage-3": "^6.3.13", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
babel-preset-stage-2
includes babel-preset-stage-3
so you only need stage-2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point.
When I started, I thought I only needed stage-3. I was unaware Object Rest/Spread arguments were stage-2.
I don't know how that plugin works now, but we need to polyfill generator support on Node.js 0.10. I don't really have a strong opinion of how that's solved though. |
301132c
to
8440c43
Compare
I read it wrong. We were dynamically blacklisting |
@jamestalmage We only want to include |
OK,
Do we have good data on that? (I believe it, just curious). |
Hmm - I'm seeing a |
@@ -3,5 +3,7 @@ node_js: | |||
- 'stable' | |||
- '0.12' | |||
- '0.10' | |||
before_install: | |||
- 'npm i -g npm@3' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 'npm i -g npm@latest'
There's something mentioning blacklist here: https://github.com/babel/babel/blob/59f5e7f218ffa788e6e3f320a3e7e0cbe6d50894/packages/babel-plugin-transform-runtime/src/index.js#L14-L22 Or maybe we could just do a PR to I would prefer we didn't have to maintain our own preset. |
var x = new Promise(...)
// =>
var runtime = require('runtime');
var x = new runtime.Promise(...); I think it would need to be an config param to
Yeah - that was my feeling. |
I read somewhere on the Babel issue tracker they would be open to that. |
A lot of stuff are blocked by Babel 6 support. I'm trying to think what's the minimum we can do to land this? Maybe we can just have |
👍 |
Done: #348 @jamestalmage Anything else before we can merge this? |
Any feedback when this feature might be finished? Any points we could help? |
45d2ebf
to
459b362
Compare
459b362
to
d361b01
Compare
That depends on our priorities. It breaks Babel 5 support (You can't use Perhaps we could simply detect which Babel version resolves for a given test file, and then conditionally provide a Babel6 or Babel5 config based on what we find. Or we just rip off the band-aid and go for Babel 6. |
👍 I'm not too concerned with that as Babel 5 is not supported anymore and people will have to upgrade sooner than later and they can just stay on AVA 0.8.0 in the meantime. |
Landed. Yay! :) |
#221 Was so outdated it was easier just to start fresh than rebase.
There is one remaining issue from the comments on that PR. This PR still does not intelligently drop
babel-plugin-transform-async-to-generator
. That plugin is now buried in thestage-3
preset, and I'm not sure if there is a way to still use that preset, but tell it to exclude that particular plugin. Recreating that preset would be fairly trivial (it aggregates only two plugins). I am not sure that is a good plan though. By definition, thestage-3
preset is subject to change over time, and it seems to me that we want to automatically stay up to date. We already track this with #148. Is there something special aboutasync-to-generator
that we feel we must handle it specially now before we "do it right" with #148?