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

[WIP] Use babel 7 #475

Closed
wants to merge 2 commits into from
Closed

[WIP] Use babel 7 #475

wants to merge 2 commits into from

Conversation

xtuc
Copy link

@xtuc xtuc commented Jan 2, 2018

I also removed matchesPattern which is now in @babel/types.

Edit:
I managed to break most of your tests:

bundler(file, opts).bundle();

returns undefined now. Do you have any idea why?

I work continue to work on this tomorrow.

@@ -17,7 +17,8 @@ module.exports = async function(asset) {
config.plugins = [require('@babel/plugin-transform-modules-commonjs')];
}

let res = babel.transformFromAst(asset.ast, asset.contents, config);
let res = babel.transformFromAstSync(asset.ast, asset.contents, config);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe u could use the async one and convert it into a promise and use await babel.transformAst?
As the function this is called in is asynchronous anyway.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, do you have a preferred way for promisifing (like a helper) or can I create a Promise here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devongovett
Copy link
Member

Cool, thanks for working on this! 👍

I'm not sure we should upgrade yet until Babel 7 final is released. Probably shouldn't depend on the alpha.

Question: is Babel 7 backward compatibile with Babel 6 plugins? Is the .babelrc format the same as in Babel 6? If either of those is no, we will need to talk about how we can support both versions depending on which one the project has installed.

@xtuc
Copy link
Author

xtuc commented Jan 2, 2018

@devongovett

Some API have been changed between these two versions and we have a few incompatibility issues.

The Babel configuration stays the same apart from the addition of .babelrc.js.

@jamiebuilds
Copy link
Member

I don't think we should use Babel 7 yet, I've been using it a lot at work and it's not been very stable

@DeMoorJasper DeMoorJasper changed the title Use babel 7 [WIP] Use babel 7 Jan 3, 2018
@pravdomil pravdomil mentioned this pull request Apr 23, 2018
@babakness
Copy link

Would be nice to have this. At least in Beta. Babel 7 has been working well for me.

@dburles
Copy link

dburles commented Apr 26, 2018

Just thought I'd mention, Meteor has been using babel 7.0.0 beta since January. It would definitely make sense for Parcel to support it.

@pmurias
Copy link

pmurias commented Jun 1, 2018

Any updates on the upgrade? I want to use the new bigints syntax: 100n and that needs the new babel.

@DeMoorJasper
Copy link
Member

Gonna close this due to it becoming more and more conflicted with current branch and will eventually take longer to update than re-implement

@xtuc
Copy link
Author

xtuc commented Aug 9, 2018

FYI the first rc release has been published a couple of minutes ago.

@DeMoorJasper
Copy link
Member

@xtuc Thanks for the heads up. We should probably start figuring out how to support both 6 and 7 soonish.

Discussion for that goes here: #868

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

7 participants