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

Switch package manager to pnpm #1660

Open
flevi29 opened this issue May 23, 2024 · 6 comments · May be fixed by #1863
Open

Switch package manager to pnpm #1660

flevi29 opened this issue May 23, 2024 · 6 comments · May be fixed by #1863
Assignees
Labels
maintenance Issue about maintenance (CI, tests, refacto...)

Comments

@flevi29
Copy link
Collaborator

flevi29 commented May 23, 2024

A lot of high profile repositories these days use pnpm, for instance:

I was looking into upgrading Yarn, but it looks like to make full use of the latest Yarn, we'd have to make some trade-offs and non-standard changes.

Instead I will be switching to pnpm, and I will do so for every JS/TS repository in the meilisearch org, if you'll allow me.

@flevi29 flevi29 added the enhancement New feature or request label May 23, 2024
@curquiza
Copy link
Member

Hello, I saw discussion here, but I answer in this issue for an easier traceability with community: I'm not sure this change is worth it. We would like to keep what is working and yarn is not deprecated and still widely used. We want to avoid pain and work in order to focus on the most critical things. I'm afraid of the new pains this huge change could bring.

However I agree with you @flevi29, updating yarn could be a good move

Would love to have the opinion of the community of this

@flevi29
Copy link
Collaborator Author

flevi29 commented May 29, 2024

I'm not so sure about this huge pain and work. I detailed in the PR in my last comment that this will not be the case because of how corepack works, that's literally the whole point of corepack. EDIT: Sorry if I'm being rude.

Anyhow, the way I see it, to upgrade you'll still need to change actions/setup-node@v4 to enable corepack instead of installing yarn globally.
Read on Yarn's page more: https://yarnpkg.com/getting-started/install

@flevi29
Copy link
Collaborator Author

flevi29 commented May 29, 2024

Alright fair enough, switching to pnpm might be a little much, I'll open another issue for updating yarn.

@flevi29 flevi29 closed this as not planned Won't fix, can't repro, duplicate, stale May 29, 2024
@flevi29
Copy link
Collaborator Author

flevi29 commented May 29, 2024

Closed in favour of #1664.

@flevi29 flevi29 reopened this Feb 2, 2025
@flevi29 flevi29 added maintenance Issue about maintenance (CI, tests, refacto...) and removed enhancement New feature or request labels Feb 2, 2025
@flevi29
Copy link
Collaborator Author

flevi29 commented Feb 3, 2025

Updated description.

@flevi29 flevi29 self-assigned this Feb 4, 2025
@Strift
Copy link
Collaborator

Strift commented Feb 27, 2025

I know @curquiza and @brunoocasali have some concerns, so I'll share my feedback regarding moving to PNPM here.

Why migrate from Yarn?

First of all, the yarn version we are using has entered maintenance mode. Eventually it will reach EOL and we will have to migrate to a new Yarn version. The different versions of Yarn have different ways to resolve dependencies, create different lockfiles, and don't interoperate particularly well in my experience. So a migration will be needed at some point anyway.

Why PNPM?

Generally speaking, I'm in favor of moving to PNPM because it makes the lives of maintainers easier. As Flevi pointed out, it's now a common tool for front-end libraries, and I have more experience with it than I do with Yarn.

My main selling points for PNPM are:

  • Faster installation (helps with PR reviews and speeds up CIs)
  • I often ran into issues when installing deps. It will also make it easier for external contributors to use PNPM IMO
  • Easier mono-repo handling in my experience
  • Better disk space utilization (it's a bonus, but it's enjoyable)

I'm not saying this is a priority, but it would be a welcome improvement to our workflows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Issue about maintenance (CI, tests, refacto...)
Projects
None yet
3 participants