Tooling
npm & package.json cheat sheet
npm commands for installing, auditing and publishing, along with the semver range operators and the package.json fields that decide how your code is resolved.
Install
Inspect
Publish
Semver
package.json
Things worth remembering
- npm ci installs exactly what the lockfile says and is what CI should run. npm install may update it.
- ^1.2.3 allows minor updates, ~1.2.3 only patches, and 1.2.3 pins exactly.
- Anything in dependencies ships to consumers. Build tools belong in devDependencies.