npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

zombie-audit

v1.0.0

Published

Audit npm dependencies for stale maintainers, zombie packages, and maintenance risk.

Readme

dormant-maintainer-audit

Audit npm dependencies for stale maintainers, zombie packages, and maintenance risk.

A production-ready TypeScript library and CLI that analyzes your package.json dependencies and generates a Health & Risk Report. Flags dependencies based on publish recency (staleness) and maintainer concentration (bus factor).


Features

  • Stale-Maintainer Score — Days since last npm publish, classified into four risk levels
  • Bus Factor Risk — Number of npm maintainers and contributor concentration signals
  • Confidence Scoring — Transparency about data completeness for each dependency
  • Human & Machine Output — Colorized CLI table or JSON for CI pipelines
  • Configurable Thresholds — Customize staleness windows per your policy
  • Zero Heavy Dependencies — Uses native fetch, minimal runtime deps (commander + cli-table3)
  • TypeScript First — Full type declarations, dual ESM/CJS output

Installation

# Use directly via npx (no install required)
npx dormant-maintainer-audit

# Or install globally
npm install -g dormant-maintainer-audit

# Or add as a dev dependency
npm install --save-dev dormant-maintainer-audit

CLI Usage

# Analyze current project
npx dormant-maintainer-audit

# Analyze a specific package.json
npx dormant-maintainer-audit --path ./path/to/package.json

# JSON output for CI pipelines
npx dormant-maintainer-audit --json

# Ignore specific packages
npx dormant-maintainer-audit --ignore lodash,axios

# Custom staleness thresholds (m = months, y = years, d = days)
npx dormant-maintainer-audit --threshold healthy=6m,monitor=12m,stale=24m

# Write report to file
npx dormant-maintainer-audit --output report.json

# Exit non-zero if risky or zombie packages found
npx dormant-maintainer-audit --exit-on-risky

API Usage

import { analyzePackageJson } from 'dormant-maintainer-audit';

// Analyze your project's package.json
const report = await analyzePackageJson({
  path: './package.json',
  ignore: ['lodash'],
  thresholds: {
    healthyMaxDays: 90,
    monitorMaxDays: 180,
    riskyMaxDays: 365,
  },
});

console.log(`Analyzed ${report.packageCount} packages`);
console.log(`Risky: ${report.summary.risky}, Zombie: ${report.summary.zombieCandidate}`);

Programmatic API

| Function | Description | |----------|-------------| | analyzePackageJson(options?) | Reads and analyzes a project's package.json | | analyzeDependencies(deps, options?) | Analyzes a dependency map directly | | generateReport(analyses, thresholds) | Builds a Report from pre-computed analyses | | formatCliReport(report) | Returns a colorized CLI table string | | formatJsonReport(report) | Returns a JSON string | | writeJsonReport(report, path) | Returns JSON (use with fs.writeFileSync) |

Types

interface DependencyAnalysis {
  name: string;
  requestedVersion: string;
  requestedVersionPublishDate: string | null;  // When the installed version was published
  latestVersion: string | null;
  lastPublishDate: string | null;               // When the latest version was published
  daysSinceUpdate: number | null;
  stalenessScore: number;           // 0 | 25 | 50 | 75
  stalenessLevel: RiskLevel;
  stalenessExplanation: string;
  busFactorRisk: BusFactorRisk;     // 'low' | 'medium' | 'high' | 'unknown'
  busFactorScore: number;           // 0 | 35 | 50 | 75
  busFactorExplanation: string;
  maintainerCount: number | null;
  confidence: ConfidenceLevel;      // 'high' | 'medium' | 'low'
  confidenceExplanation: string;
  classification: RiskLevel;        // Final risk level
}

Scoring Model

Staleness (based on days since last npm publish)

| Range | Score | Level | |-------|-------|-------| | 0 – 180 days | 0 | Healthy | | 181 – 365 days | 25 | Monitor | | 366 – 730 days | 50 | Risky | | > 730 days | 75 | Zombie Candidate |

Bus Factor (based on npm maintainer count)

| Maintainers | Score | Risk | |-------------|-------|------| | 0 (no data) | 50 | Unknown | | 1 | 75 | High | | 2 – 3 | 35 | Medium | | 4+ | 0 | Low |

Confidence

| Data Available | Level | |----------------|-------| | Both publish date + maintainers | High | | Either publish date or maintainers | Medium | | Neither | Low |

Overall Classification

The final classification is driven by the staleness level. Bus factor is a supplementary risk indicator shown in the report.

Default Thresholds

{
  healthyMaxDays: 180,   // 0-180 days → healthy
  monitorMaxDays: 365,   // 181-365 days → monitor
  riskyMaxDays: 730,     // 366-730 days → risky
                         // >730 days → zombie-candidate
}

Project Structure

src/
├── cli/          # CLI entry point (commander)
├── config/       # Defaults and validation
├── registry/     # npm registry API fetcher
├── repository/   # GitHub metadata fetcher (optional)
├── reporting/    # CLI table + JSON output formatters
├── scoring/      # Staleness + Bus Factor computation
├── types/        # TypeScript interfaces and schemas
└── utils/        # Date helpers, logging, package.json reader

Requirements

  • Node.js 18+ (native fetch support)

License

MIT