Live data from Hacker News

pnpm: Fast, disk space efficient package manager for JavaScript

pnpm.io

21–30 of 173 posts

Re: pnpm: Fast, disk space efficient package manager for JavaScript

#21

Earlier quoted context omitted.

Were you coming from yarn or npm? I guess their benchmarks cover both [0]. But I'm also curious about independent figures. [0] https://pnpm.io/benchmarks

used to use npm, less often with yarn, now it's all pnpm

Gotcha. Yeah yarn has always been way faster to me than npm. And indeed in these benchmarks pnpm is much faster than npm and only slightly faster than yarn.

Re: pnpm: Fast, disk space efficient package manager for JavaScript

#25

I recently migrated a large project from yarn to pnpm and the speed difference is insane. Everything related to dependencies runs must faster during local development AND CI. T The only tricky thing is that we had some issues with some dependencies that could not work properly. But using the “—-shamefully-hoist” flag did the trick. Everything works.

You can potentially solve this more narrowly with hoist-pattern[1] so you’ll still benefit from the stricter structure overall. Or possibly even overrides[2] depending on the issue.

1: https://pnpm.io/npmrc#hoist-pattern

2: https://pnpm.io/package_json#pnpmoverrides

Re: pnpm: Fast, disk space efficient package manager for JavaScript

#26

Earlier quoted context omitted.

Pnpm doesn't auto install peer dependencies, which is annoying and forces you to unnecessary add them to package.json. Npm@7 (and newer) with auto install of peer deps is much easier to use in this regard.

Isn't that exactly how it's supposed to be? If you're installing a package that has peer dependencies, you should already depend on them. Otherwise they are not "peer dependencies" anymore, just a normal dependency with a version range. The whole peer dependencies story is another clusterfuck. Everyone simply ignored the invalid peer dependency warnings, and now npm itself will just install all of them in 'whatever w…

I want to specify only those deps that I use directly. Imagine a `foobar` package, that has `babel` peer dependency because it does some transpiling or whatever. For me as a user of `foobar`, that Babel requirement could have been regular dependency instead of peer. I don't care, I don't use Babel. In another words - if a package manager has all the information necessary to install all dependencies, why should I add another, redundant information to my package.json?

Re: pnpm: Fast, disk space efficient package manager for JavaScript

#27
post #15

Earlier quoted context omitted.

Isn't that exactly how it's supposed to be? If you're installing a package that has peer dependencies, you should already depend on them. Otherwise they are not "peer dependencies" anymore, just a normal dependency with a version range. The whole peer dependencies story is another clusterfuck. Everyone simply ignored the invalid peer dependency warnings, and now npm itself will just install all of them in 'whatever w…

Yeah - this peer dependency thing always makes issues, when I try to upgrade a big Ionic project... Peer dependencies added more problems than they solved in my eyes... Most peer dependencies warnings come because some maintainer forgot to update the package.json and not really because two packages don't work with each other...

The point of peer dependencies is to allow users more flexibility in choosing the specific version of the dependency. It’s not intended to specify any kind of conflict between the packages, it’s effectively BYO sub-dependency.

Re: pnpm: Fast, disk space efficient package manager for JavaScript

#28
we're part way through switching all our monorepos from lerna to pnpm & simply could not be happier & more excited.

lerna has soo many issues, is slow & cumbersome. #2142, no way to update dependecies in monorepo subprojects? how is there a monorepo tool where projects cant update their deps? everything on pnpm's built-in monorepo support just works, nice & easy & fast.

Re: pnpm: Fast, disk space efficient package manager for JavaScript

#29

Please note that pnpm is currently blocking all traffic from Russia and Belarus https://twitter.com/pnpmjs/status/1498306992577957890

"We will unblock it when you stop the war and de-occupy all the Ukrainian territory."

There's what, maybe a handful of people who can make that happen?

Re: pnpm: Fast, disk space efficient package manager for JavaScript

#30
I’m using PNPM in a side project to try it out. Overall, I like it. Yes, it does feel faster than Yarn (1, I gave up on Yarn 2 pretty quickly when it wouldn’t let me install a TypeScript beta even with PnP disabled). I’ve found its commands a little fussier to use than Yarn however.

If I were to pick for a new project today, I’d probably go back to Yarn. But I’m glad there’s PNPM as an option.

Post reply on HN