Extra Credit

npm

Official docs outline

18 sections
  1. About npm

    Registry, CLI and website; packages and modules, scopes at a glance.

  2. package.json

    name, version, main, exports, dependencies, devDependencies, peerDependencies, optionalDependencies, engines, files, bin, type.

  3. Semantic versioning

    MAJOR.MINOR.PATCH, caret and tilde ranges, prerelease tags, version range resolution.

  4. npm install

    Installing dependencies, save flags, node_modules tree, dedupe, flat dependency resolution.

  5. package-lock.json

    Lockfile contents, deterministic installs, integrity hashes, resolved versions.

  6. npm ci

    Clean reproducible installs from lockfile for CI.

  7. Scripts

    Lifecycle scripts (preinstall, postinstall, prepare, prepublish), npm run, pre/post hooks, env variables.

  8. Workspaces

    Monorepo support with workspaces field, running commands across workspaces, linking local packages.

  9. Overrides

    Overriding transitive dependency versions.

  10. Config and .npmrc

    Config settings, registry, auth tokens, npmrc file locations and precedence.

  11. Registry

    The npm registry, scoped registries, mirrors.

  12. Scopes

    Scoped packages (@org/name), public vs private publishing.

  13. Publishing packages

    npm publish, files included, access, dist-tags, versioning on release.

  14. Dist-tags

    latest/next tags, tag management.

  15. npm audit

    Vulnerability reports, audit fix, supply chain risks.

  16. Provenance and trusted publishing

    Trusted publishing via OIDC from CI, provenance attestations, avoiding long-lived tokens.

  17. Access tokens

    Granular access tokens, scopes and expiry, publish authentication.

  18. 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.

All 41