Skip to content
$ shellfirm

npm

The npm group (4 checks) covers unpublishing and deprecating packages with npm, yarn and pnpm.

The npm group has 4 checks. They protect the people who depend on your packages: an unpublished version disappears from the registry, and every project that installs it breaks.

Example

shellfirm check -c 'npm unpublish left-pad --force'
Output
1 risky pattern(s) matched:

  [npm:unpublish] [CRITICAL] Unpublishing a package removes it from the registry, breaking all downstream dependents.

  Shell (you, in a terminal): would challenge (Yes, escalated from Math: severity CRITICAL)
  AI agent (hooks, MCP): deny (blocked)
    why: Severity CRITICAL meets or exceeds agent auto-deny threshold HIGH

Checks

Check idSeverityWhat it catches
npm:unpublishCriticalUnpublishing a package removes it from the registry, breaking all downstream dependents.
npm:deprecateHighDeprecating a package marks it as deprecated for all users.
npm:yarn_unpublishCriticalUnpublishing a package removes it from the registry, breaking all downstream dependents.
npm:pnpm_unpublishCriticalUnpublishing a package removes it from the registry, breaking all downstream dependents.

Notes

  • Prefer npm deprecate <pkg>@<version> "<message>" for a single bad version over unpublishing, and publish a fixed version.
  • npm is also how shellfirm follows package runners: npx, pnpm dlx and bunx run the package's own command, so npx vercel@latest remove … or npx firebase-tools … get the checks of that tool. See Hosting platforms.

On this page