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 #5279

Open
rbreeze opened this issue Jan 19, 2021 · 3 comments
Open

Upgrade to Yarn 2 #5279

rbreeze opened this issue Jan 19, 2021 · 3 comments
Labels
component:ui User interfaces bugs and enhancements enhancement New feature or request hacktoberfest type:tech-debt Enhancement invisible for the end user

Comments

@rbreeze
Copy link
Member

rbreeze commented Jan 19, 2021

Summary

About a year ago, Yarn froze their 1.22.x codebase and is now only pushing patch releases to it. Yarn 2 is now where active development occurs. Given the large list of improvements I think we should migrate Argo CD to Yarn 2.

TLDR: Yarn 2 removes the mess of node_modules and replaces it with a single file called .yarnrc.yml that efficiently references a local cache.

There are 2 paths post migration: a traditional philosophy or Zero Install. node_modules directories could easily be hundreds of megabytes, if not gigabytes in size -- Argo CD's is currently ~600MB and Argo UI's is ~800MB for example. Yarn 2 brings this closer to tens of megabytes, meaning it's feasible to include them in the repo and remove the yarn install step entirely. Yarn recommends this for "professional-grade" environments.

Motivation

Will result in faster (or nonexistent) install times after clone, faster build and run times, less "works on my machine" type issues, and less headaches with peer dependencies.

Proposal

In an ideal world, I think we should aim to achieve the following:

  • Migrate to Yarn 2
  • Remove need for node_modules directory
  • Follow a Zero Install paradigm

These are listed in ascending order of difficulty / descending imperativeness. It's possible to begin using Yarn 2 without removing reliance on node_modules, and it's possible to remove node_modules without going down the zero install route.

@rbreeze rbreeze added enhancement New feature or request type:tech-debt Enhancement invisible for the end user component:ui User interfaces bugs and enhancements labels Jan 19, 2021
@rbreeze rbreeze self-assigned this Jan 20, 2021
@nsinghal12
Copy link

Can this be assigned to me.

@crenshaw-dev crenshaw-dev assigned nsinghal12 and unassigned rbreeze Oct 19, 2022
@crenshaw-dev
Copy link
Member

Someone can build on top of this: #11006

@blakepettersson
Copy link
Member

Perhaps this task can be updated to instead use pnpm? Similar to Yarn 2 with moar speed. WDYT @rbreeze?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:ui User interfaces bugs and enhancements enhancement New feature or request hacktoberfest type:tech-debt Enhancement invisible for the end user
Projects
None yet
Development

No branches or pull requests

5 participants