-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Update Babel to Current Standard "babel-preset-env" #4812
Conversation
@ajnauleau thanks! I'll take a look at this in a bit. |
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.
Two small things and can we make sure that we regenerate the package-lock.json
from npm@6 on Node 8
package.json
Outdated
@@ -54,10 +54,17 @@ | |||
"babelify", | |||
{ | |||
"presets": [ | |||
"es2015", | |||
"stage-0" | |||
["env", { |
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.
I think we might be better off removing the options here and having it default to using what's in the .babelrc
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.
Seems like Babelify doesn't recognise .babelrc anymore with babel@6, so there wouldn't actually be any need to update .babelrc, but the package.json file is still necessary. I think we still should keep .babelrc updated, incase it could have other uses in the future.
package.json
Outdated
"babel-preset-react": "^6.24.1", | ||
"babel-preset-stage-0": "^6.24.1", | ||
"babel-register": "^6.7.2", | ||
"babelify": "^8.0.0", | ||
"beefy": "^2.1.5", | ||
"brfs": "^1.6.1", | ||
"browserify": "^16.1.1", | ||
"browserify": "^16.2.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.
Can we drop the changes to non-babel packages? (We could move them to a different PR if we want to bump them independently?)
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.
See also: ganache-core
and node-sass
below
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.
@whymarrh - Solved as well, looks like the PR is good to merge.
cc4d343
to
0ce6e9c
Compare
0ce6e9c
to
671421a
Compare
Gulp build, and testing on chrome worked on my local environment, but once pushed to PR didn't pass circleCI. Removed commit regenerating |
f371585
to
671421a
Compare
…ly && npm audit fix
Bugs seems to have been fixed, worth reviewing now @whymarrh |
5b18d71
to
6009621
Compare
Circle-CI isn't running |
@ajnauleau make sure you are using node 8.11.3 and npm 6.1.0. If you are using nvm, you can type nvm use and it will switch automatically to the right version. Once you do that, nuke your node_modules folder, run npm install and commit / push the updated package-lock.json That should fix the issue. I’ll update the docs later today. |
f9ce2ca
to
18f16c9
Compare
@brunobar79 updated node and npm with nvm but I don't think that was the issue. The tests aren't running Scratching my head on this one... |
@ajnauleau npm install IS running (see here) but there's a diff generated on the package-lock.json after running npm install on the CI server that makes the build to restore the wrong cache key That's usually because the package-lock.json is not updated or the node/npm version is incorrect. I'll ping you here once that makes it to develop and you can pull develop, re-run npm i, commit and push and I'm sure the build will pass. Thanks for your PR and sorry for dealing with this! |
21cd674
to
f9ce2ca
Compare
@brunobar79 after reviewing the tests, it seems like circle-ci was reverting to a cached version on the server. Your fix in #4847 seems to resolve it-- will wait until your update, thanks. |
@ajnauleau my PR just got merged. |
9f3ed60
to
efdc869
Compare
@whymarrh - I'm unable to review the requested changes you made, would you be able to check this out? Seems all good to go. Thanks! |
Awesome, thanks @ajnauleau! This LGTM and I don't think it increases our (already slow) build time. I can confirm that the dist builds ( |
Install babel dependencies by running
updated .babelrc file inside your project and add the following code inside it:
Update package.json and add same code within, while keeping current settings.
Change the order of presets to "env", "react", "stage-0".
Build, import into extensions, and tested.
Fixed.