-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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 Babel6 #1123
Upgrade to Babel6 #1123
Conversation
@@ -12,7 +12,7 @@ | |||
"scripts": { | |||
"clean": "rimraf lib dist coverage", | |||
"lint": "eslint src test examples", | |||
"test": "mocha --compilers js:babel/register --recursive", | |||
"test": "mocha --compilers js:babel-core/register --recursive", |
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.
The recommended setup now: https://babeljs.io/docs/setup/#mocha
npm install --save-dev babel-register
and
"test": "mocha --compilers js:babel-register"
i'm on it |
You should update |
@just-boris, yeah I realize now. May take a little time. There is also the babel-polyfill issue |
I am not sure that this test would pass if i didn't update babel. |
So all the builds pass. it seems that the example's tests are failing. This appears to be a problem that is currently merged into master. |
Here is a build of master and it is failing: https://travis-ci.org/rackt/redux/jobs/96114270 |
is this something that I need to fix before this PR is accepted? Personally, I think that test is unnecessary since normally an application like that would be storing data on a DB that has auto-increment. |
I think the build is failing due to one of our testing dependencies. It's been reported and they are looking into it. |
This is what failing for me. |
Yep, thats the one. This should start passing again without any changes needed on our end when the dependency is fixed (which seems like it is going to be soon). |
🚀 |
would like to get this merged too: |
@gaearon Is there any reason I should hold off on this? I will have some time to test it out over the weekend. |
Proceed by all means! |
@gaearon When you get a moment... I am hoping to get Redux, React-Redux and Redux-Devtools ready to go at the same time. These PRs constitute a breaking change I think, so with regards to versioning...
|
What's a breaking change? Version of Babel we use internally shouldn't matter. |
Ah ok, I think I've got it now. I assumed from the original comment that this PR is necessary to fix the issue with React Native 0.16 (which did seem weird), but it seems like that is not the case—if we simply remove the .babelrc from the current npm package it will build with Babel 5 or 6. That has already been done and will be going out in the next release, so we won't be breaking anyone who is still using Babel 5. So everything is fine, and I can stop worrying. |
Yep! I just released |
Cool, sounds good. |
Couldn't hurt to upgrade to Babel 6 anyways yeah? |
Sure. |
} | ||
|
||
|
||
} |
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.
Can we remove the blank lines that have been introduced into the package.json files in the examples please?
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.
Please leave the extra newline at the bottom of the file. It's really helpful when cat'ing out or doing other command line things so that you don't have weird shell overlaps. Also, it's POSIX standard, believe it or not.
@pr1ntr Just went through all the examples and its mostly looking good! The Universal example is broken. Babel 5 is in the dependencies and Also, isparta needs to be upgraded to v4.0.0 in the main package.json so the test coverage still works. |
regarding the universal example. I couldn't get that to work with Babel 5 or 6. Are you sure its working on the main branch? [edit] it totally does.. I'll look into it. |
i updated isparta, and i got universal running. One thing about universal however is that the webpack config doesn't use HMR when running from the repo (../../src exists) I did my best to set it up with babel6 the same way it was with babel5. Let me know if its still not right. |
👍 for merge. |
@pr1ntr Thanks for updating. I'm super busy, so I don't have any time to look at this right now. I'll have some spare time at the start of next week, so if no-one beats me to it I'll look to get it merged then. |
no problemo! |
fixed whitespace |
} | ||
|
||
|
||
} |
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.
Missed one! Sorry for the nitpick :person_frowning:
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.
oops. fixed
Note: please don't merge this yet. We're having some problems with Babel behavior: it no longer includes ES3 transforms necessary for IE8 by default, and there seems to be a bug with those transforms which breaks them anyway. Because of this we can't ship Redux that uses Babel 6 internally until either
|
The examples still use babel5 also. I really like these as "boilerplate" but I always have to manually update babel dependencies --> Can we update the examples and leave only main redux with babel5? |
The examples were never meant as a boilerplate. They are meant as Redux usage examples. I understand people will use them as boilerplate but this is a shame because they lack important aspects such as compiling for production. Having two different Babel versions in one repo would be confusing. |
This is now in. Thanks again! |
This is my attempt to fix this issue on facebook/react-native#4674.
Upgraded to babel6 builds and tests run successfully.