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

chore: replace yarn-upgrade by bump-babel-dependencies in vuejs e2e tests #11021

Merged
merged 3 commits into from Jan 17, 2020

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Jan 16, 2020

Q                       A
Fixed Issues? Fix failing vue-cli e2e tests
License MIT

@JLHwung JLHwung force-pushed the pin-yarn-version-in-vue-cli-tests branch 2 times, most recently from 4045273 to 9778007 Compare January 16, 2020 18:13
@JLHwung JLHwung force-pushed the pin-yarn-version-in-vue-cli-tests branch from 9778007 to 2490d5d Compare January 16, 2020 18:26
@JLHwung JLHwung added area: tests PR: Fixes failing main PR: Internal 🏠 A type of pull request used for our changelog categories labels Jan 16, 2020
@@ -0,0 +1,29 @@
const fs = require("fs");
Copy link
Contributor Author

@JLHwung JLHwung Jan 16, 2020

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 🤷‍♂️

@JLHwung JLHwung changed the title chore: pin yarn version in e2e vue tests chore: replace yarn-upgrade by bump-babel-dependencies in vuejs e2e tests Jan 16, 2020
function bumpBabelDependency(dependencies) {
for (const dep of Object.keys(dependencies)) {
if (dep.startsWith("@babel/")) {
dependencies[dep] = "latest";
Copy link
Contributor Author

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.

Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a 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 🤔

@JLHwung
Copy link
Contributor Author

JLHwung commented Jan 16, 2020

@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 bump-babel-dependencies.js, which is exactly what we meant to achieve.

@nicolo-ribaudo
Copy link
Member

Ok then, let's use that script everywhere

@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Apr 18, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: tests outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Fixes failing main PR: Internal 🏠 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants