Draft: Replace yarn with pnpm
What does this MR do and why?
Yarn 1.x, our JavaScript package manager, is no longer supported and is starting to cause some issues when we update frontend dependencies (e.g, gitlab-org/frontend/renovate-gitlab-bot!733 (merged) / https://github.com/isaacs/node-glob/issues/563#issuecomment-1748292145).
This MR replaces yarn
with pnpm
. I'm trying pnpm
here because:
- it builds faster than
npm
(~8 seconds vs ~30 seconds for our project, installing without cache on my laptop) - it can be managed with
asdf
, and yarn 2.x+ cannot (https://github.com/twuni/asdf-yarn#looking-for-yarn-v2) - big projects like VueJS and Vite use it
This is still a draft, still have some testing to do. Won't work on CI yet since pnpm
is not available in our container images (that will need to happen in a separate MR that we merge first).
Closes #1703 (closed)
Screenshots, screen recordings, or links to review app
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md.
Merge request acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this merge request.