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

Upgrade to Yarn 2 #2326

Closed
peterbe opened this issue Jan 4, 2021 · 9 comments
Closed

Upgrade to Yarn 2 #2326

peterbe opened this issue Jan 4, 2021 · 9 comments
Labels
dependencies Pull requests that update a dependency file 🐌 idle Issues and PRs without recent activity. Flagged for maintainer follow-up. p3 We don't have visibility when this will be addressed. 🚉 platform keeping the platform healthy

Comments

@peterbe
Copy link
Contributor

peterbe commented Jan 4, 2021

There's no denying, Yarn 1 is slowly losing momentum compared to Yarn 2 (and npm ~6).
https://yarnpkg.com/getting-started/qa#why-should-you-upgrade-to-yarn-modern

I actually don't think it would be that hard to upgrade Yari to it but for the mdn/content we want to keep things as simple as possible because we expect a LOT of content contributors to check it out and run yarn/node to do previewing. For that, it would most convenient if we did NOT rely on bleeding edge versions.

This issue should first be about documenting the impact of "requiring" Yarn 2. And secondly, about implementing the switch to it.

@peterbe
Copy link
Contributor Author

peterbe commented Jan 5, 2021

One of the nasty bugs we encountered when using workspaces just got "ignored" with this comment:
yarnpkg/yarn#4098 (comment)
More fuel for moving to Yarn 2.

@bershanskiy
Copy link
Contributor

Great to hear this!

This issue should first be about documenting the impact of "requiring" Yarn 2.

This official document goes into great detail about migration footguns. Have you had a chance to review this doc?

@peterbe
Copy link
Contributor Author

peterbe commented Jan 11, 2021

@bershanskiy What worries me the most is that a lot of people will have Node and Yarn 1 installed on their machines. If they now can't start Yari because they have to figure out how to get apt-get or brew to work for Yarn 2, that would lead to unhappiness.
To me, it's a bit like "Shall we require that everything has Node 15 and Python 3.9 installed?"

No, I haven't yet had a chance to read that whole document. I haven't even had a chance to install it myself for my own projects. Does it say anything useful/interesting to calm my keep-it-simple-for-most-people nerves?

@peterbe
Copy link
Contributor Author

peterbe commented Jan 11, 2021

PS. There are some cool features in Node >10 but we deliberately kept the minimum to Node >=10 just to keep things are easy and pain-free as possible for most contributors.

However, for the Yari project, I think we can be a bit more "aggressive". Only a handful of coders will work on mdn/yari. But 10x will be expected to work on mdn/content. And the "audience" is different (aka skill levels).
Considering that all the fancy TypeScript and stuff in Yari gets transpiled down to ES5 code that we package via NPM, perhaps there's a way to leave the mdn/content use Yarn1 and the mdn/yari project start requiring Yarn2.

@bershanskiy
Copy link
Contributor

Does it say anything useful/interesting to calm my keep-it-simple-for-most-people nerves?

Luckily, that doc is very anti-climactic: it basically urges people to migrate away from old config files, old package versions, old ways to call things. After light searching through yari's code, I couldn't find a single incompatibility. However, I didn't test anything yet.

I'll try yarn 2 over the weekend and report back the results. :)

@Ryuno-Ki
Copy link

@bershanskiy Any updates?

@schalkneethling schalkneethling added the 🚉 platform keeping the platform healthy label Nov 3, 2021
@github-actions github-actions bot added the 🐌 idle Issues and PRs without recent activity. Flagged for maintainer follow-up. label Dec 10, 2021
@caugner
Copy link
Contributor

caugner commented Nov 30, 2022

FWIW @queengooborg tried to update us to the latest yarn version in #6271. And even though we want to migrate to npm eventually, migrating to yarn v2/v3 first is still an option.

@caugner caugner added dependencies Pull requests that update a dependency file p3 We don't have visibility when this will be addressed. labels Nov 30, 2022
@github-actions github-actions bot added the idle label Dec 30, 2022
@fwqaaq
Copy link
Contributor

fwqaaq commented Apr 2, 2023

FWIW @queengooborg tried to update us to the latest yarn version in #6271. And even though we want to migrate to npm eventually, migrating to yarn v2/v3 first is still an option.

Why not migrate to pnpm, which has faster speed (because it can download packages in parcallel)

@github-actions github-actions bot removed the idle label Apr 2, 2023
@caugner
Copy link
Contributor

caugner commented Apr 3, 2023

We will switch to npm in #6322 by May 2023, and no longer plan upgrading to Yarn 2.

@caugner caugner closed this as not planned Won't fix, can't repro, duplicate, stale Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file 🐌 idle Issues and PRs without recent activity. Flagged for maintainer follow-up. p3 We don't have visibility when this will be addressed. 🚉 platform keeping the platform healthy
Projects
Development

No branches or pull requests

6 participants