← All cheatsheets

Node

pnpm — the package manager that does not fight you

## Install
`pnpm install` — install all deps from lockfile
`pnpm add pkg` — add a runtime dep
`pnpm add -D pkg` — add a dev dep
`pnpm add -g pkg` — global install
`pnpm remove pkg`

## Run scripts
`pnpm dev` / `pnpm build` / `pnpm start` — package.json scripts
`pnpm exec command` — run installed binary
`pnpm --filter pkg run script` — run in workspace package

## Lockfile + integrity
`pnpm install --frozen-lockfile` — CI mode
`pnpm outdated` — what's behind
`pnpm up` — update within ranges
`pnpm up --latest` — update to latest

## Workspace
`pnpm -r exec command` — run across all workspace packages
`pnpm -F web build` — build a single workspace