Skip to content

Yarn to npm

Change pattern proposal: Yarn to npm

Old Pattern

GitLab Front-end projects use yarn for package management.

New Pattern

GitLab Front-end projects use npm exclusively.

Advantages of switching patterns

  1. npm is more future-proof
  2. npm has matured and since npm v5 includes almost all features that yarn was used as an alternative for it in its beginnings
  3. Since Yarn v2 was released, development on Yarn V1 (used on GitLab) was stalled
  4. the upgrade effort from Yarn v1 to Yarn v2 is comparable to replacing Yarn with npm

Disadvantages of switching patterns

  1. yarn.lock's format seems better than npm's own package-lock.json
  2. Yarn supports workspaces, and npm does not

What is the impact on our existing codebase?

Yarn and npm don't seem to get along too well, and this might be a breaking change.