Closed fernandocanizo closed 9 months ago
Thanks @fernandocanizo for raising this and adding all of the benchmarks, that was very helpful.
While I'm not opposed to pnpm
in general, for me this is a bit of a "if it ain't broke don't fix it" situation. While faster installations might be slightly nice the first time you clone the repo and for our deploy script, to me it's not worth switching package managers over. The main reason being that we know npm
works consistently in this repo and have yet to have someone run into a problem. With pnpm
that's less proven, and so while it may work on yours and my machine, it easily could break on someone else's, or when we add some library.
I think going with the standard of npm
for a repo setup as simple as this is the safe bet for now. Again, thank you for writing up this issue!
Is there a serious showstopper reason to not be using
pnpm
yet? (jump to the end to see about the bug from the title of this issue)$ rm -rf node_modules/
has been run prior to the timed command.f54dbcd
npm
First run: ~55 seconds
Second run: ~20 seconds
pnpm
First run: ~40 seconds
Second run: ~3 seconds
yarn
First run: ~113 seconds
Second run: ~7 seconds
Other considerations
npm requires
audit
npm
shows "10 vulnerabilities (9 moderate, 1 high)". After runningnpm audit fix
we are left still with "9 moderate severity vulnerabilities". Finallynpm audit fix --force
gets ride of all the warnings, however it requires further analysis as some packages needed a SemVer major change.pnpm
produces a clean installation without warnings. However after installing I runpnpm audit
just in case, and it found only one vulnerability:yarn leave us with "unmet peer dependencies"
both yarn and npm let us use undeclared dependencies Whether we install and run with yarn or npm, the server starts and runs ok. However, if we install our dependencies with pnpm, and run the server, we encounter this bug:
This happens because the way both yarn and npm resolve peer dependencies, which is wrong, as it let us use packages that we haven't explicitly declared in our
package.json
.I vote we jump head first to start using
pnpm
. If no arguments against are given, I'll do the PR.