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

As technical lead, I want to switch from Yarn to NPM #854

Closed
5 tasks done
jorgegonzalez opened this issue Apr 15, 2021 · 4 comments · Fixed by #1538
Closed
5 tasks done

As technical lead, I want to switch from Yarn to NPM #854

jorgegonzalez opened this issue Apr 15, 2021 · 4 comments · Fixed by #1538
Assignees
Labels

Comments

@jorgegonzalez
Copy link

jorgegonzalez commented Apr 15, 2021

Description:

Our JavaScript package manager yarn@1.22.10 is practically unmaintained since the release of yarn@2.0.0. This means that yarn "v1" will never release new updates or features beyond vulnerability fixes.

The maintainers recommend users migrate to yarn "v2", which, due to technical complexities in v2, may not be feasible for our project. v2 was released with a change to the node_modules architecture that is fundamentally incompatible with our app.

This is illustrated in the below screenshot. Notice how v1 still has 1.5 million weekly downloads and v2 only averages some 600, a year after its initial release. The likely cause is still the incompatibility with many packages in the JS ecosystem like webpack, that will likely never be fixed.

Screen Shot 2021-04-15 at 3 36 33 PM

I formally recommend we migrate to npm@7.0.0.

  • It supports deterministic builds, something yarn v1 was created to solve.
  • Supports workspaces, another thing yarn was created for.
  • Is being actively developed by Microsoft themselves, and is unlikely to be abandoned like yarn v1.
  • It has improved performance and beat yarn in some benchmarks. An oft-cited reason for using yarn over npm in the past was significant speed differences that are arguably negligible now.
  • npm serves as the official JavaScript package manager, in that it is included with Node.js and doesn't require additional configuration or installations

Acceptance Criteria:

  • Remove yarn and implement npm as alternative
  • Have a new lockfile and package manager

Tasks:

  • Remove yarn and implement npm as alternative
  • Document local steps needed for switching off yarn
  • Update relevant README documents with npm instead of yarn

Notes:

@jorgegonzalez jorgegonzalez self-assigned this Apr 15, 2021
@jorgegonzalez
Copy link
Author

And a chart of npm vs yarn showing its dominance.

@amilash
Copy link

amilash commented Sep 1, 2021

tag @abottoms-coder

@valcollignon valcollignon changed the title [SPIKE] Investigate alternative to yarn Switch from Yarn to NPM Dec 7, 2021
@valcollignon
Copy link

Need to discuss audits as a part of each release. @ADPennington to try to find a relevant issue to link to. This ticket is a nice-to-have and is not necessarily a priority at this time. Per backlog refinement 12.7.21.

@andrew-jameson andrew-jameson changed the title Switch from Yarn to NPM As technical lead, I want to switch from Yarn to NPM Jan 4, 2022
@ArtemFrontendACTUM
Copy link

ArtemFrontendACTUM commented Jan 24, 2022

npm vs yarn
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants