zetkin / lyra

3 stars 3 forks source link

Switch to npm #108

Closed WULCAN closed 4 months ago

WULCAN commented 4 months ago

We recently had problems with bugs in Yarn 1 regarding package aliases. See #107

The developers of Yarn 1 will not accept bug fixes for Yarn 1 anymore as they want users to upgrade to Yarn 4.

Since Yarn was created, the features that motivated its use have been added to npm. The only exception being parallel execution but npm has added other features that make it very fast anyway.

Here's some performance testing results: https://p.datadoghq.eu/sb/d2wdprp9uki7gfks-c562c42f4dfd0ade4885690fa719c818

Yarn introduced lockfiles to ensure that every install results in the exact same file structure in node_modules across all machines. This approach was quickly adopted by npm in npm 5.

Yarn introduced Workspaces as an optimization for monorepositories. After a few years, npm adopted that in npm 7.

I generated package-lock.json by just running npm install. Then I let Next and npm fight a little about it until they got exhausted and became frienemies. See commit messages for details.