Overview

npm (Node Package Manager) is the default package manager for the nodejs ecosystem, maintained by github since its 2020 acquisition. It hosts the world’s largest open-source JavaScript registry and is foundational infrastructure for web development.

Recent Developments

npm v12 Security Model

Defaultv11 and earlierv12 (July 2026)
Install scriptsRun automaticallyBlocked unless in allowScripts allowlist
Git dependenciesResolved automaticallyRequire --allow-git
Remote URL depsResolved automaticallyRequire --allow-remote

Key commands: npm approve-scripts --allow-scripts-pending, npm approve-scripts, npm deny-scripts. Allowlist stored in package.json and should be committed to source control.

npm is the only remaining major package manager that runs dependency install scripts by default. pnpm v10+, Yarn Berry, Bun, and Deno all block them.

Sources