Upgrade to Yarn 2 #5279
Labels
component:ui
User interfaces bugs and enhancements
enhancement
New feature or request
hacktoberfest
type:tech-debt
Enhancement invisible for the end user
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 theyarn 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:
node_modules
directoryThese 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 removenode_modules
without going down the zero install route.The text was updated successfully, but these errors were encountered: