-
Notifications
You must be signed in to change notification settings - Fork 16
FIREFLY-74_upgrade_babel_and_eslint #833
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
Conversation
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've spot-checked firefly with the updates and it works fine. Go to go.
"@babel/polyfill": "^7.0.0", | ||
"@babel/register": "^7.4.4", | ||
"babel-core": "7.0.0-bridge.0", | ||
"babel-jest": "^23.4.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.
Does it has to be declared at 2 places?
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.
Yes, I think those are extra ones. I will go ahead and remove them.
Thanks!
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.
Fixed!
"@babel/plugin-proposal-json-strings": "^7.0.0", | ||
"@babel/plugin-syntax-dynamic-import": "^7.0.0", | ||
"@babel/plugin-syntax-import-meta": "^7.0.0", | ||
"@babel/plugin-transform-runtime": "^7.0.0", |
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 above plugins are needed now? Do you know what is requiring it?
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.
These plugins are used instead of stage-3 plugin. As far as I understood from:
https://github.com/babel/babel-upgrade
(it is mentioned at the end of that link).
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 don't think we are using all these. I think we where using stage-3 there before for object expanding (ie.{...x, {y:1}}
) when it is not part of the standard.
Let me look at each of these. I will update this comment.
We want:
@babel/plugin-transform-runtime
We might be using this one, if not, it is useful:
plugin-proposal-class-properties
I don't think we use:
plugin-proposal-json-strings
plugin-syntax-dynamic-import
plugin-syntax-import-meta
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.
Cool, I will take them out.
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.
Take them out and test, make sure nothing breaks.
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.
Fixed, thanks!
__jest__/jest.transform.js
Outdated
module.exports = require('babel-jest').createTransformer({ | ||
presets: ["env", "react", "stage-3"], | ||
presets: ['@babel/preset-env', '@babel/preset-react', 'stage-3'], |
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.
Do you need to fixed the stage-3 thing here as well?
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.
Fixed!
Some dependencies (babel/core, babel/preset-env, and babel-core bridge) has to be on devDependencies in order for jest to run. |
__jest__/jest.transform.js
Outdated
module.exports = require('babel-jest').createTransformer({ | ||
presets: ["env", "react", "stage-3"], | ||
presets: ['@babel/preset-env', '@babel/preset-react'] |
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.
this is not exactly what I meant. in the other webpack we now doing:
plugins: [
'@babel/plugin-transform-runtime',
'@babel/plugin-proposal-class-properties'
]
so I think it needs to be:
presets: ['@babel/preset-env',
'@babel/preset-react',
plugins: [
'@babel/plugin-transform-runtime',
'@babel/plugin-proposal-class-properties'
]]
but you should test it.
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.
Fixed, thanks!
K8s updated. |
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.
Looks good. Don't merge until you confirm @ejoliet cut the new release branch.
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.
Release branch was cut yesterday rc-2019.2
. You are good to go.
Upgrade Babel and eslint:
Jira: https://jira.ipac.caltech.edu/browse/FIREFLY-74
K8s: https://irsawebdev9.ipac.caltech.edu/firefly-74/firefly/
IFE PR: https://github.com/IPAC-SW/irsa-ife/pull/75