Javascript - pnpm

About

pnpm 1) is a Javascript package manager

node_module

pnpm differs from the other package manager via the structure of the node_modules folder where:

  • the directory structure is flat with one dependency by directory
  • and the dependency of dependency are created via symlinks and are stored in the .registry.npmjs.org

Example with one dependency foo that have bar as sub-dependency (The arrow represents a symlink)

node_modules
├─ foo -> .registry.npmjs.org/foo/1.0.0/node_modules/foo
└─ .registry.npmjs.org
   ├─ foo/1.0.0/node_modules
   |  ├─ bar -> ../../bar/2.0.0/node_modules/bar
   |  └─ foo
   |     ├─ index.js
   |     └─ package.json
   └─ bar/2.0.0/node_modules
      └─ bar
         ├─ index.js
         └─ package.json

Documentation / Reference





Discover More
Javascript - MonoRepo

in the Javascript context When starting with monorepo, integrate first the leaf projects of the dependency graph (ie project without dependency). To use the library locally without publishing to...
Javascript Package - Package Manager

This article talks package manager in Javascript. They are the first component of the web toolchain as they permit to: declare package as dependency download and update package create a package...



Share this page:
Follow us:
Task Runner