Zoltan Kochan 5d04767778 fix: peers are resolved similarly during named and general install (#726)
* fix: peers are resolved similarly during named and general install

There is no need to always run a general installation for
creating a predictable `node_modules` structure. If peers are
resolved from top dependencies, the peers are not linked to
the dependent package. The dependent package can see such peers
w/o additional manipulations

Ref #724

* fix: don't print warning when peer is resolved from top dep

* test: verify the peer warning are reported correctly
2017-04-26 14:40:45 +03:00
2017-04-25 19:50:43 +03:00
2017-03-20 21:53:18 +02:00
2016-12-18 20:06:38 +02:00
2017-03-22 22:56:04 +02:00
2017-02-03 22:33:12 +02:00
2017-01-23 22:36:01 +02:00
2017-03-31 22:09:14 +03:00
2016-12-18 00:19:16 +02:00

pnpm

Status Windows build status Join the chat at https://gitter.im/pnpm/pnpm

Fast, disk space efficient npm installs

pnpm is a fast implementation of npm install.

asciicast

Read our contributing guide if you're looking to contribute.

Follow the pnpm Twitter account for updates.

Table of Contents

Background

pnpm maintains a flat storage of all your dependencies in ~/.pnpm-store. They are then linked wherever they're needed. This nets you the benefits of drastically less disk space usage, while keeping your node_modules clean. See store layout for an explanation.

=> - a link (also known as a hard link)
-> - a symlink (or junction on Windows)

~/.pnpm-store
   └─ registry.npmjs.org
      ├─ chalk/1.1.1
      |  ├─ index.js
      |  └─ package.json
      ├─ ansi-styles/2.1.0
      |  ├─ index.js
      |  └─ package.json
      └─ has-ansi/2.0.0
         ├─ index.js
         └─ package.json
.
└─ node_modules
   ├─ chalk                  -> ./.registry.npmjs.org/chalk/1.1.1/node_modules/chalk
   └─ .registry.npmjs.org
       ├─ has-ansi/2.0.0/node_modules
       |  └─ has-ansi
       |     ├─ index.js     => ~/.pnpm-store/registry.npmjs.org/has-ansi/2.0.0/index.js
       |     └─ package.js   => ~/.pnpm-store/registry.npmjs.org/has-ansi/2.0.0/package.json
       |
       ├─ ansi-styles/2.1.0/node_modules
       |  └─ ansi-styles
       |     ├─ index.js     => ~/.pnpm-store/registry.npmjs.org/ansi-styles/2.1.0/index.js
       |     └─ package.js   => ~/.pnpm-store/registry.npmjs.org/ansi-styles/2.1.0/package.json
       |
       └─ chalk/1.1.1/node_modules
          ├─ ansi-styles     -> ../../ansi-styles/2.1.0/node_modules/ansi-styles
          ├─ has-ansi        -> ../../has-ansi/2.0.0/node_modules/has-ansi
          └─ chalk
             ├─ index.js     => ~/.pnpm-store/registry.npmjs.org/chalk/1.1.1/index.js
             └─ package.json => ~/.pnpm-store/registry.npmjs.org/chalk/1.1.1/package.json

Install

Install it via npm.

npm install -g pnpm

Do you wanna use pnpm on CI servers? See: Continuous Integration.

Usage

Use pnpm in place of npm. It overrides pnpm i, pnpm install and some other command, the rest will passthru to npm.

pnpm install lodash

For using the programmatic API, see: API.

Benchmark

pnpm is usually 10 times faster than npm and 30% faster than yarn. See this benchmark which compares the three package managers on different types of applications.

time npm i babel-preset-es2015 browserify chalk debug minimist mkdirp
    66.15 real        15.60 user         3.54 sys
time pnpm i babel-preset-es2015 browserify chalk debug minimist mkdirp
    11.04 real         6.85 user         2.85 sys

Prior art

License

MIT © Rico Sta. Cruz and contributors

Description
No description provided
Readme MIT 293 MiB
Languages
TypeScript 98.8%
JavaScript 0.7%
Shell 0.5%