Перейти к основному содержимому

The year 2021 for pnpm

· 3 мин. чтения

It is the end of the year and it was a good year for pnpm, so let's see how it went.

Usage

Download Stats

My goal this year was to beat Bower by the number of downloads. We were able to achieve this goal in November:

pnpm was downloaded about 3 times more in 2021 than in 2020:

примечание

These stats don't even measure all the different ways that pnpm may be installed! They only measure the downloads of the pnpm npm package. This year we also added compiled binary versions of pnpm, which are shipped differently.

Docs visits

We collect some unpersonalized stats from our docs using Google Analytics. In 2021, sometimes we had more than 2,000 unique visitors a week.

Most of our users are from the United States and China.

GitHub stars

Our main GitHub repository received +5,000 stars this year.

New users

Our biggest new user this year is Bytedance (the company behind TikTok).

Also, many great open-source projects started to use pnpm. Some switched to pnpm because of its great support of monorepos:

Some switched because they like how efficient, fast, and beautiful pnpm is:

Feature Highlights

New lockfile format (since v6.0.0)

One of the first and most important changes this year was the new pnpm-lock.yaml format. This was a breaking change, so we had to release v6. But it was a success. The old lockfile was causing Git conflicts frequently. Since the new format was introduced, we did not receive any complaints about Git conflicts.

Managing Node.js versions (since v6.12.0)

We shipped a new command (pnpm env) that allows to manage Node.js versions. So you may use pnpm instead of Node.js version managers like nvm or Volta.

Also, pnpm is shipped as a standalone executable, so you can run it even with no Node.js preinstalled on the system.

Injecting local dependencies (since v6.20.0)

You may "inject" a local dependency. By default, local dependencies are symlinked to node_modules but with this new feature you may instruct pnpm to hard link the files of the package instead.

Improved reporting of peer dependency issues (since v6.24.0)

Peer dependency issues used to be printed as plain text and it was hard to understand them. They are now all grouped and printed in a nice hierarchy structure.

The Competition

Yarn

Yarn added a pnpm linker in v3.1. So Yarn can create a similar node-modules directory structure to the one that pnpm creates.

Also, the Yarn team plans to implement a content-addressable storage to be more disk space efficient.

npm

The npm team decided to also adopt the symlinked node-modules directory structure that pnpm uses (related RFC).

Others

Bun written in Zig and Volt written in Rust both claim to be faster than npm/Yarn/pnpm. I did not benchmark these new package managers yet.

Future Plans

Faster, better, best.