Hacker News new | ask | show | jobs
by specialist 2840 days ago
This is a compelling reason to switch:

From https://pnpm.js.org

"Efficient: One version of a package is saved only ever once on a disk. So you save dozens of gigabytes of disk space!"

Without digging, I imagine this will be more like Maven's cache.

NPM's design decision to flatten the version hierarchy baffled me. And has occasionally tripped me up.

1 comments

For everyone running a Docker setup, this is not an option... Docker doesn't support symlinking files outside the build context.
This is soon to be solvable by mounting the cache directory during the build, thankfully: https://github.com/moby/buildkit/pull/442 ("dockerfile: add run --mount support #442 ")
Docker also has a cache, making dependency installs not usually an issue.
Which works on a totally different level and doesn't help at all in terms of sharing dependency snapshots between different projects.
That is not something I'd want to do. Docker's solution is good enough for almost every build that happens. I can eat the time cost not covered by that solution and not have to worry about bugs stemming from improper copying of dep snapshots.