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

Upgrade to Babel 7 #167

Open
tylerhou opened this issue Mar 16, 2019 · 4 comments
Open

Upgrade to Babel 7 #167

tylerhou opened this issue Mar 16, 2019 · 4 comments

Comments

@tylerhou
Copy link

tylerhou commented Mar 16, 2019

Creating this issue for discussion.

There are a few breaking changes in Babel 7 but they all have easy workarounds. I don't think this will change the interface, so we can do a minor semver upgrade (4.11).

Willing to write a PR.

@markelog
Copy link
Member

markelog commented Mar 16, 2019 via email

@tylerhou
Copy link
Author

#168

@tylerhou
Copy link
Author

tylerhou commented Mar 20, 2019

Moving the discussion from my pull request into here.

There a few issues with the migration. All of our unit tests pass, but seven Babylon 6 tests fail because Babel 7 invalidated some syntax. I tried pulling in the fixtures from @babel/parser, but they have some new experimental features and TypeScript which messes with us. There are also other non-experimental changes in Babel 7 that we don't support: for await (const x of y). 300-500 Babel 7 fixtures are broken.

Some of this we can fix by ignoring trees of tests (we probably don't care about TypeScript, right?). But experimental features are more unclear, and maybe 25% are from new JavaScript syntax. We should care about standardized JavaScript syntax, yet it's a fair bit of work to add all that extra functionality.

I'd like to get a version of CST out that uses Babel 7 because it's blocking me on upgrading my own codebase to Babel 7. We also have breaking changes in the PR I submitted (removal of SpreadProperty and RestProperty). This means that we have to make a major release. But it's probably bad to make multiple major releases in a row (one to upgrade to 7, one for any breaking changes required to fix the Babel fixtures). How do you feel about making a beta 5.0 release that has broken Babel/Babylon tests?

@markelog
Copy link
Member

I guess we can do that, it's beta anyways right?

So the plan is to land #168, release the beta version and then tackle the new syntax - if so, works for me :)

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

No branches or pull requests

2 participants