npm auditAudit installed dependencies for known vulnerabilities.
Security auditing, package maintenance, and npm org/team workflows.
Audit dependencies and review security information.
npm auditAudit installed dependencies for known vulnerabilities.
npm audit --jsonEmit machine-readable audit results.
Apply compatible fixes for known vulnerabilities.
npm audit fixApply compatible fixes for known vulnerabilities.
Apply broader updates that may include breaking changes.
npm audit fix --forceApply broader updates that may include breaking changes.
npm outdated --allInclude transitive packages where supported.
Commands useful for keeping a healthy package.
npm ls --depth=0Show only direct dependencies.
npm diff <package>@1.0.0 <package>@2.0.0Compare package contents between versions.
npm explain lodashInspect why one package is present.
npm rebuild <package>Re-run build scripts for one installed package.
npm star <package>Favorite a package on the registry.
npm unstar <package>Remove a favorite from your account.
Useful npm org and team commands.
npm org ls <org>List users in an npm organization.
npm org set <org>:<user> developerSet an organization role for a user.
npm team create <org>:developersCreate a team in an npm organization.
npm team add <org>:developers <user>Add a user to a team.
npm team rm <org>:developers <user>Remove a user from a team.