Official docs outline
18 sections- About npm
Registry, CLI and website; packages and modules, scopes at a glance.
- package.json
name, version, main, exports, dependencies, devDependencies, peerDependencies, optionalDependencies, engines, files, bin, type.
- Semantic versioning
MAJOR.MINOR.PATCH, caret and tilde ranges, prerelease tags, version range resolution.
- npm install
Installing dependencies, save flags, node_modules tree, dedupe, flat dependency resolution.
- package-lock.json
Lockfile contents, deterministic installs, integrity hashes, resolved versions.
- npm ci
Clean reproducible installs from lockfile for CI.
- Scripts
Lifecycle scripts (preinstall, postinstall, prepare, prepublish), npm run, pre/post hooks, env variables.
- Workspaces
Monorepo support with workspaces field, running commands across workspaces, linking local packages.
- Overrides
Overriding transitive dependency versions.
- Config and .npmrc
Config settings, registry, auth tokens, npmrc file locations and precedence.
- Registry
The npm registry, scoped registries, mirrors.
- Scopes
Scoped packages (@org/name), public vs private publishing.
- Publishing packages
npm publish, files included, access, dist-tags, versioning on release.
- Dist-tags
latest/next tags, tag management.
- npm audit
Vulnerability reports, audit fix, supply chain risks.
- Provenance and trusted publishing
Trusted publishing via OIDC from CI, provenance attestations, avoiding long-lived tokens.
- Access tokens
Granular access tokens, scopes and expiry, publish authentication.
- npx and npm exec
Running package binaries without global install.
Each section links to the official page. Titles and summaries by Extra Credit; the docs belong to their authors.