pnpm
is a relatively new package manager for Node. It's fully-featured and essentially a drop-in replacement for npm
or yarn
. The decision to use pnpm
over more traditional package managers came down to the following reasons:
- Performant dependency installation and efficient usage of
node_modules
disk space. A monorepo that supports a wide array of packages across an engineering organization will accumulate a lot of dependencies over time. Performance and efficiency when handling these dependencies is critical. - First class monorepo support.
pnpm workspaces
and a global--filter
CLI argument that enables running commands against a subset of packages within the monorepo. - First class Typescript monorepo support. Customizable
publishConfig
withinpackage.json
files enables all packages to use .tsmain
entrypoints. This small feature really improves the DX of maintaining a TS monorepo.
pnpm
has many more features that you will not find in npm
or yarn
. Please refer to the pnpm docs to find out more.