Fast, disk space efficient package manager
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Go to file
btea 34bc8f48e1
fix: `licenses` output table misplaced (#8071)
4 days ago
.changeset fix: `licenses` output table misplaced (#8071) 4 days ago
.github chore(deps): bump pnpm/action-setup in the github-actions group (#8078) 6 days ago
.husky chore: update husky (#7671) 3 months ago
.meta-updater chore(release): libs 1 week ago
__fixtures__ refactor: bump lockfile version to v9 instead of v7 (#7861) 1 month ago
__patches__ fix: update js-yaml 2 months ago
__typings__ feat(completion): print completion code to stdout (#7597) 3 months ago
__utils__ fix(override): relative file in workspace (#8055) 1 week ago
cli chore(release): libs 1 week ago
completion/plugin-commands-completion chore(release): libs 1 week ago
config chore(release): libs 1 week ago
crypto/object-hasher refactor(crypto+dedupe+deps): return type (#7914) 1 month ago
dedupe chore(release): libs 1 week ago
deps chore(release): libs 1 week ago
env chore(release): libs 1 week ago
exec chore(release): libs 1 week ago
fetching chore(release): libs 1 week ago
fs chore(release): libs 1 week ago
hooks chore(release): libs 1 week ago
lockfile chore(release): libs 1 week ago
modules-mounter/daemon chore(release): libs 1 week ago
network chore(release): libs 1 week ago
packages chore(release): libs 1 week ago
patching chore(release): libs 1 week ago
pkg-manager chore(release): libs 1 week ago
pkg-manifest chore(release): libs 1 week ago
pnpm chore(release): 9.1.1 7 days ago
releasing chore(release): libs 1 week ago
resolving chore(release): libs 1 week ago
reviewing fix: `licenses` output table misplaced (#8071) 4 days ago
store chore(release): libs 1 week ago
text/comments-parser refactor(text+worker): type checking perf (#7891) 1 month ago
worker chore(release): libs 1 week ago
workspace chore(release): libs 1 week ago
.editorconfig chore: add .editorconfig 7 years ago
.eslintignore refactor: group projects in different subdirectories (#5659) 2 years ago
.eslintrc.json chore(eslint): set root (#4515) 2 years ago
.gitattributes test: cache sinopia storage 8 years ago
.gitignore chore: add .DS_Store to .gitignore 1 week ago
.npmrc chore(release): 9.0.0-alpha.5 3 months ago
.pnpmfile.cjs perf: use rclonefile to fix cloning on macOS and Windows Dev Drive (#7031) 8 months ago
CODE_OF_CONDUCT.md docs(coc): update email 2 years ago
CONTRIBUTING.md docs(CONTRIBUTING): update test scripts 10 months ago
FUNDING.json docs: create FUNDING.json 2 months ago
LICENSE docs(LICENSE): update years 5 months ago
README.md docs: add new sponsor 2 months ago
SECURITY.md docs: update SECURITY.md 3 weeks ago
commitlint.config.cjs chore: rename commitlint.config.js 3 years ago
cspell.json fix: only automatically resolve optional peers with versions that satisfy the ranges (#8028) 3 weeks ago
jest-with-registry.config.js test: change jest config worker count (#7271) 7 months ago
jest.config.js test: change jest config worker count (#7271) 7 months ago
jest.globalSetup.js test: print an error when cannot start the registry server 3 months ago
jest.globalTeardown.js test: fail if cannot run registry mock 3 months ago
jest.setup.js refactor: improve the way workers are finished (#7039) 9 months ago
lint-commits.sh chore: fix typo (#4516) 2 years ago
package.json fix(override): relative file in workspace (#8055) 1 week ago
pnpm-lock.yaml perf: improve performance of peer dependencies resolution (#8060) 1 week ago
pnpm-workspace.yaml feat(completion): print completion code to stdout (#7597) 3 months ago
renovate.json fix: `outdated` output table information is misplaced (#8037) 2 weeks ago
tsconfig.lint.json style: use eslint instead of tslint 4 years ago
verdaccio.yaml ci: update verdaccio cache 2 years ago

README.md

简体中文 | 日本語 | 한국어 | Italiano | Português Brasileiro

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 as a Node.js version manager. See pnpm env use.
  • Works everywhere. Supports Windows, Linux, and macOS.
  • Battle-tested. Used in production by teams of all sizes since 2016.
  • See the full feature comparison with npm and Yarn.

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 Stand With Ukraine

Platinum Sponsors

Gold Sponsors

Silver Sponsors

Support this project by becoming a sponsor.

Background

pnpm uses a content-addressable filesystem to store all files from all module directories on a disk. When using npm, 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.

💖 Like this project? Let people know with a tweet

Getting Started

Benchmark

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

Benchmarks on an app with lots of dependencies:

Usage Trend

Usage Trend of pnpm

image

Backers

Thank you to all our backers! Become a backer

Contributors

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

License

MIT