Note: Everything I’ve assumed was wrong, I am keeping track of things as I discover them via the medium post: https://medium.com/@akras14/omg-npm-clone-that-finally-makes-sense-3478588879
I’ll update this post when the dust settles ๐
Last week I came across a yet another NPM clone, called pnpm, but unlike other clones (cough Yarn) this one is actually interesting!
What so interesting about it? One word – SYMLINKS.
In few more words, instead of having to re-download libraries over and over and over (and over and over, I wonder if I made my point…) again every time you run npm install
in a new folder, pnpm will download that version of the library once in some global context and will create a symlink to this library when you run the pnpm install
command.
So your node_modules
folder will look something like this:
This way you get the benefits of only having to download the library once AND being able to freely pick what libraries/versions to use on per project basis.
Now that is really cool!
If this sounds interesting to you, please check out this post by the author explaining his take on how pnpm compare to yarn and npm.