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_modulesdisk 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 workspacesand a global--filterCLI argument that enables running commands against a subset of packages within the monorepo. - First class Typescript monorepo support. Customizable
publishConfigwithinpackage.jsonfiles enables all packages to use .tsmainentrypoints. 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.