Today we’re excited to announce the release ofpnpm1!
UnlikeYarn, which has decided to use the samenode_modulesstructure that_npm_creates,_pnpm_uses a completely new approach (about which you can read more inthis article). It was_really_hard to make a symlinkednode_modulesstructure 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 symlinkednode_modulesstructure has born, we can tell with confidence: it is possible andit does work.
Version 1 means that:
that pnpm uses since
is reliable enough and we are confident that there will be no need in breaking changes in its structure.
that pnpm creates works with most of the ecosystem.
also ships with an experimental
layout that can be turned on with the
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
file, which is pnpm’s lockfile, is good enough for being committed to VCS.
- When possible,
works the way
You can rely on these things and they won’t get breaking changes in version 1.
Even faster!The goal is to make installationssubsecond 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 ourawesome listhuge!
Just install pnpm via npm:
npm install -g pnpm. And use it instead of npm whenever you want to install something:
pnpm i foo.