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

@mindfiredigital/utils

v1.0.3

Published

Shared utility functions for monodog monorepo dashboard

Readme

@mindfiredigital/utils

Shared utility functions, type definitions, and core algorithms for the MonoDog monorepo dashboard ecosystem.

npm version License: MIT

Overview

@mindfiredigital/utils is the utility library used across all MonoDog packages. It provides core type definitions, monorepo scanning algorithms, dependency graph generation, circular dependency detection, health score computation, and package size analysis.


Exported Functions

| Function | Description | | ------------------------------------------------------ | --------------------------------------------------------------------------- | | scanMonorepo(rootDir) | Discovers all packages inside packages/, apps/, and libs/ directories | | generateMonorepoStats(packages) | Computes aggregate statistics from an array of PackageInfo objects | | findCircularDependencies(packages) | Detects circular dependency chains using DFS traversal | | generateDependencyGraph(packages) | Builds a { nodes, edges } graph structure for visualization | | checkOutdatedDependencies(pkg) | Returns dependencies with range-based version specifiers | | getPackageSize(packagePath) | Calculates total disk size and file count of a package | | calculatePackageHealth(build, coverage, lint, audit) | Computes weighted health score (0-100) |


Features

  • Monorepo Scanning: Recursively discovers packages inside packages/, apps/, and libs/ directories by reading package.json files and classifying each package as app, lib, or tool.
  • Package Metadata Parsing: Extracts name, version, description, license, scripts, dependencies, devDependencies, peerDependencies, and maintainers from each discovered package.
  • Dependency Graph Generation: Builds a directed graph of internal workspace dependencies with nodes (packages) and edges (dependency links), ready for visualization.
  • Circular Dependency Detection: Uses depth-first search (DFS) with a recursion stack to detect and report all circular dependency chains across workspace packages.
  • Outdated Dependency Detection: Identifies packages with range-based version specifiers (^, ~) that may be outdated and flags them for review.
  • Package Health Score Calculation: Computes a weighted overall health score (0-100) based on four metrics:
    • Build Status (30 points): success / running / failed / unknown
    • Test Coverage (25 points): Percentage-based scoring from coverage reports
    • Lint Status (25 points): pass / fail / unknown
    • Security Audit (20 points): pass / fail / unknown
  • Monorepo Statistics: Generates aggregate statistics including total packages, app/library/tool counts, healthy/warning/error package counts, and total dependency counts.
  • Package Size Analysis: Calculates the total disk size and file count of a package directory (excluding node_modules, dist, build, and .git).

Installation

pnpm add @mindfiredigital/utils
npm install @mindfiredigital/utils

Usage

import {
  scanMonorepo,
  generateMonorepoStats,
  findCircularDependencies,
  generateDependencyGraph,
  checkOutdatedDependencies,
  getPackageSize,
  calculatePackageHealth,
} from '@mindfiredigital/utils/helpers';

// Scan all packages in a monorepo
const packages = scanMonorepo('/path/to/monorepo');
console.log(`Found ${packages.length} packages`);

// Generate aggregate statistics
const stats = generateMonorepoStats(packages);
console.log(
  `Apps: ${stats.apps}, Libraries: ${stats.libraries}, Tools: ${stats.tools}`
);

// Build dependency graph for visualization
const graph = generateDependencyGraph(packages);
console.log(`Nodes: ${graph.nodes.length}, Edges: ${graph.edges.length}`);

// Detect circular dependencies
const cycles = findCircularDependencies(packages);
if (cycles.length > 0) {
  console.warn('Circular dependencies found:', cycles);
}

// Calculate health score for a package
const health = calculatePackageHealth('success', 85, 'pass', 'pass');
console.log(`Health Score: ${health.overallScore}/100`);

// Get package disk size
const size = getPackageSize('/path/to/package');
console.log(`Size: ${size.size} bytes, Files: ${size.files}`);

// Check for outdated dependencies in a package
const outdated = checkOutdatedDependencies(packages[0]);
console.log(`Outdated dependencies: ${outdated.length}`);

Exported Types

| Type | Description | | ---------------- | --------------------------------------------------------------------------------------------------- | | PackageInfo | Complete metadata for a discovered package (name, version, type, path, dependencies, scripts, etc.) | | DependencyInfo | Information about a single dependency (name, version, type, outdated status) | | PackageHealth | Health assessment result (buildStatus, testCoverage, lintStatus, securityAudit, overallScore) | | MonorepoStats | Aggregate monorepo statistics (totalPackages, apps, libraries, tools, dependency counts) |