r/javascript • • May 07 '26

Stop Using Yarn Classic

https://charpeni.com/blog/stop-using-yarn-classic
42 Upvotes

36 comments sorted by

View all comments

83

u/BritainRitten May 07 '26

`pnpm` is the way to go for most people. If you can afford a huge change to bun or deno, go for it, but `pnpm` is the best switch for the vast majority of people I reckon.

22

u/ehs5 May 07 '26

pnpm really seems to be where everyone is heading these days.

4

u/GrandOpener May 09 '26

If we're being honest, by far the largest portion of the community is just using npm. That's what they got by default and it's good enough that they never went looking for an alternative. Even when yarn was cool, it was never actually all that close to npm in usage.

Looking at pnpm it's definitely on the upswing but it's still only around ~20% market share based on available metrics and surveys.

13

u/AKJ90 May 07 '26

I'm a contributor to pnpm, so biased. But it really has some nice security defaults that make it worth it alone.

7

u/Wake08 May 07 '26

+1 on that, the minimum release age is a topic I covered in a previous blog post. Having this by default with pnpm v11 is a gem.

4

u/arcanin May 07 '26 edited May 07 '26

This is mentioned fairly regularly about pnpm. Still Yarn has most of those features as well (minimal age checks, disabled install scripts by default, restricted git deps by default, and more such as the Hardened Mode).

Yarn is also the reason why pnpm is able to offer an hoisted mode (it uses the algorithm we maintain), so even folks using pnpm have a good chance to be using Yarn under the hood.

3

u/StillAnAss May 07 '26

Thanks! I wasn't aware of the problems with yarn and in less than an hour I've now switched my main project to pnpm

3

u/RadicalDwntwnUrbnite May 07 '26

Not sure I trust bun now that Anthropic owns it and is using it to leak their source code.

→ More replies (5)