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
chore: replace yarn-upgrade by bump-babel-dependencies in vuejs e2e tests #11021
chore: replace yarn-upgrade by bump-babel-dependencies in vuejs e2e tests #11021
Conversation
JLHwung
commented
Jan 16, 2020
Q | A |
---|---|
Fixed Issues? | Fix failing vue-cli e2e tests |
License | MIT |
4045273
to
9778007
Compare
9778007
to
2490d5d
Compare
@@ -0,0 +1,29 @@ | |||
const fs = require("fs"); |
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.
@nicolo-ribaudo WDYT replacing yarn-upgrade
by this snippet in e2e-create-react-app
🤷♂️
function bumpBabelDependency(dependencies) { | ||
for (const dep of Object.keys(dependencies)) { | ||
if (dep.startsWith("@babel/")) { | ||
dependencies[dep] = "latest"; |
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.
Technically if a downstream project specifies latest
for @babel/
in the package.json
, this approach will not work at all because yarn
will then lock latest
to old versions. But practically this scenario should never happen.
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.
Why was yarn upgrade
failing? I didn't fully understand it from the error message 🤔
@nicolo-ribaudo The first error is due to yarnpkg/yarn#7797, instead of manually updating every babel plugins, I fall back to Yarn 1.18, but then there is a second error which never happens on Yarn >= 1.19. I'd rather not to die on this hill and come up with |
Ok then, let's use that script everywhere |