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 #12548

Closed
acdlite opened this issue Apr 4, 2018 · 28 comments
Closed

Upgrade to Babel 7 #12548

acdlite opened this issue Apr 4, 2018 · 28 comments

Comments

@acdlite
Copy link
Collaborator

acdlite commented Apr 4, 2018

Babel 7 is still in beta, but presumably it will be released soon. We should get a head start on upgrading. Perhaps it's stable enough for us to upgrade even before the final release.

One benefit is we could use JSX fragment syntax in tests. Yay!

@reznord has volunteered to pick this up.

@reznord
Copy link
Contributor

reznord commented Apr 22, 2018

babel-jest latest version still doesn't support babel v7. The tests might face an issue after I update

Probably should do a beta release with babel-7 support in babel-jest

@acdlite
Copy link
Collaborator Author

acdlite commented Apr 23, 2018

Did you try the instructions here on how to use Jest with Babel 7?

https://facebook.github.io/jest/docs/en/getting-started.html#using-babel

Note: If you are using a babel version 7 then you need to install babel-jest with the following command:

yarn add --dev babel-jest 'babel-core@^7.0.0-0' @babel/core regenerator-runtime

@gaearon
Copy link
Collaborator

gaearon commented Apr 23, 2018

Babel Jest definitely supports Babel 7, we're using them together in CRA

@TrySound
Copy link
Contributor

TrySound commented Apr 23, 2018

Not sure about 7.0.0-0, but there is a special version for such cases

yarn add babel-core@bridge --dev

@SimenB
Copy link
Contributor

SimenB commented May 1, 2018

bridge is a tag for 7.0.0-0, so it's the same

@reznord
Copy link
Contributor

reznord commented May 15, 2018

Hi @acdlite @gaearon sorry for the delay on the update for this PR. Wasn't doing well recently. I will start working on this PR now.

Once again, sorry for the delay

@asiniy
Copy link

asiniy commented Jun 11, 2018

@reznord may I take this?

@code4cake
Copy link

Is anyone working on this still ? If not I would give it a try. Thanks :)

@armujahid
Copy link
Contributor

I also want to help. @dantesolis can we both work on it together? If no one else is working on it.

@code4cake
Copy link

@armujahid yes sure, we can work on this together. :)

@armujahid
Copy link
Contributor

@dantesolis I have started working on it. https://github.com/armujahid/react/tree/babel7 but its not complete yet.

@code4cake
Copy link

code4cake commented Sep 17, 2018

@armujahid, wow you move fast! I will start working on it today or tomorrow, how should we tackle it so we don’t work on the same thing at the same time? Basically what have you not done so I can table it today? :)

@armujahid
Copy link
Contributor

armujahid commented Sep 17, 2018

@dantesolis I have added you as collaborator to my repository. You can see my changes in babel7 branch
I have done the following:

  1. Use babel-upgrade tool to upgrade package.jsons
  2. Manually update references of babel packages in code.
  3. Manually update references of babel packages in .babelrc file (because babel-upgrade doesn't support monorepo yet)

Issues:
Tests are still failing with different errors e.g. "Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL) to the 'plugins' section of your Babel config to enable transformation." although its already added in .babelrc file.
We need to resolve these issues so that at least tests won't fail

@code4cake
Copy link

Let me check on that.

@code4cake
Copy link

@armujahid I'll be working on this then today and tomorrow.

@mmarkelov
Copy link
Contributor

@acdlite I just finished work on it in my Babel 7 branch. It was huge challenge. I passed all tests, but I just don't sure if I can make PR for it.

@acdlite
Copy link
Collaborator Author

acdlite commented Oct 8, 2018

@mmarkelov That’s great! Please open the PR!

@mmarkelov mmarkelov mentioned this issue Oct 8, 2018
@mmarkelov
Copy link
Contributor

@acdlite Just can't figure out what's wrong with last step - node ./scripts/tasks/danger

@lorenzorapetti
Copy link

@mmarkelov is there any updates on this? I'd like to help if you want

@mmarkelov
Copy link
Contributor

@loryman I just got some tests fails - it was a big challenge. Of cause you can help. It will be nice. You can check my actual branch also I can add you as collaborator.

@lorenzorapetti
Copy link

Thank you! I cloned your branch and i've started working on it. I can open a PR to your repo with all the changes

@victorhmp
Copy link

Hey guys! @loryman @mmarkelov still working on this one?

@pavelzubov
Copy link

@loryman @mmarkelov are you successful in working on this problem?

@lorenzorapetti
Copy link

lorenzorapetti commented Jun 1, 2019

Sorry, I haven't been able to work on this. Anyway, I think we have to wait for #15037 to get merged, then I'll try to continue from that

@epicfaace
Copy link
Contributor

Would it be better to upgrade each package, one by one, to Babel 7 in separate PRs?

@kambleaa007
Copy link

Hi, is there any small task, i would like to do

@lunaruan lunaruan mentioned this issue Aug 9, 2019
@lunaruan
Copy link
Contributor

lunaruan commented Aug 9, 2019

Thanks everyone for your work on this!

@mmarkelov @armujahid Added you two as coauthors to the PR.

@lunaruan lunaruan closed this as completed Aug 9, 2019
@epicfaace
Copy link
Contributor

Not all packages have been upgraded to babel 7 (for example, react-art), so should we reopen this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests