Go to file
Zoltan Kochan e5c15cb7fb test: retry tests on failure 2021-03-14 14:24:34 +02:00
.changeset fix(bin): don't add non-directory to NODE_PATH in command shim (#3240) 2021-03-14 03:40:24 +02:00
.github ci: add coeql analysis 2021-03-13 01:17:18 +02:00
fixtures chore: update lockfile 2021-03-12 02:18:13 +02:00
packages test: retry tests on failure 2021-03-14 14:24:34 +02:00
privatePackages chore(deps): update 2021-03-09 22:31:41 +02:00
registry-mirror fix: install a pkg hosted not under registry domain 2020-05-28 23:43:02 +03:00
typings feat: new CLI that allow to mount node_modules with FUSE 2020-12-31 12:27:35 +02:00
utils chore: remove eslint-plugin-standard from deps 2021-03-13 03:40:58 +02:00
verdaccio ci: cache the verdaccio storage 2020-05-08 21:58:36 +03:00
.editorconfig chore: add .editorconfig 2017-03-20 21:53:18 +02:00
.eslintignore style: use eslint instead of tslint 2020-08-24 02:01:25 +03:00
.gitattributes test: cache sinopia storage 2016-12-18 20:06:38 +02:00
.gitignore fix: rename .pnp.js to .pnp.cjs (#3148) 2021-02-17 00:37:17 +02:00
.npmrc chore: add path to pnpmfile 2021-02-26 03:12:46 +02:00
.pnpmfile.cjs chore: rename pnpmfile 2021-02-26 01:39:23 +02:00
CODE_OF_CONDUCT.md docs: add CODE_OF_CONDUCT.md 2017-06-25 01:11:38 +03:00
CONTRIBUTING.md chore: rename master branch to main 2020-11-24 11:54:41 +02:00
LICENSE docs(LICENSE): update years 2021-01-01 00:38:07 +02:00
README.md docs(README): remove README duplication 2020-02-27 21:34:26 +02:00
commitlint.config.js chore: configure commitlint 2020-09-24 02:42:43 +03:00
eslint.json style: use eslint instead of tslint 2020-08-24 02:01:25 +03:00
jest.config.js test: retry tests on failure 2021-03-14 14:24:34 +02:00
jest.setup.js test: retry tests on failure 2021-03-14 14:24:34 +02:00
lint-commits.sh chore: move commitlint to tools/ 2018-05-12 14:45:47 +03:00
package.json test: retry tests on failure 2021-03-14 14:24:34 +02:00
pnpm-lock.yaml test: retry tests on failure 2021-03-14 14:24:34 +02:00
pnpm-workspace.yaml chore: less gridy globs in pnpm-workspace.yaml 2020-03-27 00:50:52 +02:00
renovate.json test: finish migration to Jest 2020-12-11 00:22:17 +02:00
tsconfig.lint.json style: use eslint instead of tslint 2020-08-24 02:01:25 +03:00
verdaccio.yaml chore: update verdaccio.yaml 2020-11-25 01:50:41 +02:00

README.md

Fast, disk space efficient package manager:

  • Fast. Up to 2x faster than the alternatives (see benchmark).
  • Efficient. Files inside node_modules are linked from a single content-addressable storage.
  • Great for monorepos.
  • Strict. A package can access only dependencies that are specified in its package.json.
  • Deterministic. Has a lockfile called pnpm-lock.yaml.
  • Works everywhere. Supports Windows, Linux, and macOS.
  • Battle-tested. Used in production by teams of all sizes since 2016.

To quote the Rush team:

Microsoft uses pnpm in Rush repos with hundreds of projects and hundreds of PRs per day, and weve found it to be very fast and reliable.

npm version Join the chat at Discord OpenCollective OpenCollective Twitter Follow

Background

pnpm uses a content-addressable filesystem to store all files from all module directories on a disk. When using npm or Yarn, if you have 100 projects using lodash, you will have 100 copies of lodash on disk. With pnpm, lodash will be stored in a content-addressable storage, so:

  1. If you depend on different versions of lodash, only the files that differ are added to the store. If lodash has 100 files, and a new version has a change only in one of those files, pnpm update will only add 1 new file to the storage.
  2. All the files are saved in a single place on the disk. When packages are installed, their files are linked from that single place consuming no additional disk space. Linking is performed using either hard-links or reflinks (copy-on-write).

As a result, you save gigabytes of space on your disk and you have a lot faster installations! If you'd like more details about the unique node_modules structure that pnpm creates and why it works fine with the Node.js ecosystem, read this small article: Flat node_modules is not the only way.

Installation

npm install -g pnpm

For other installation options visit our website.

Usage

Just use pnpm in place of npm/Yarn. E.g., install dependencies via:

pnpm install

Also, pnpx instead of npx:

pnpx create-react-app my-cool-new-app

For more advanced usage, read pnpm CLI on our website, or run pnpm help.

Benchmark

pnpm is up to 2x faster than npm and Yarn classic. See all benchmarks here.

Benchmarks on an app with lots of dependencies:

Support

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

License

MIT


Like this project? Let people know with a tweet.