pnpm version 1 is out!
Today we’re excited to announce the release of pnpm 1!
Unlike Yarn, which has decided to use the same node_modules structure that npm creates, pnpm uses a completely new approach (about which you can read more in this article). It was really hard to make a symlinked node_modules structure work with most of the existing npm packages! All the different problems that we have encountered and the dozens of breaking changes we had to make, deserves a post of its own. Finally, almost 2 years since the idea of a symlinked node_modules structure has born, we can tell with confidence: it is possible and it does work.
So what does version 1 mean?
Version 1 means that:
- The store structure that pnpm uses since version 0.70 is reliable enough and we are confident that there will be no need in breaking changes in its structure.
- The node_modules layout that pnpm creates works with most of the ecosystem.
pnpm@1 also ships with an experimental node_modules layout that can be turned on with the independent-leaves config. The experimental layout boosts installation speed by 8% and works almost with all projects. However, we were not confident enough to make it the default yet.
- The format of the shrinkwrap.yaml file, which is pnpm’s lockfile, is good enough for being committed to VCS.
- When possible, pnpm@1 works the way npm@5 does.
You can rely on these things and they won’t get breaking changes in version 1.
Even faster! The goal is to make installations subsecond fast. So fast that it would run on every Git operation. Maybe one day it would be even integrated to Git?!
As of now, pnpm is faster than Yarn when installing with cold cache but may be a bit slower in different scenarios. For a detailed comparison of npm/pnpm/Yarn speed, see “Why I still don’t use Yarn”. However, there is no reason for pnpm to be slower than Yarn or npm. So we’ll have to find the issues and make pnpm faster.
Simpler codebase. pnpm is currently very hard to contribute to, so it will have to be split into separate packages. The first step will probably be separation of the installation engine.
PR. Although pnpm is public for a longer period of time than Yarn, it is far less popular. So more articles, more documentation, and more interesting tools will be created to promote pnpm. Let’s make our awesome list huge!