Staaarter

Package Dependency Health

Dependency version tracker listing installed packages against their latest release, with an amber arrow and "Update available" badge when a package is behind, and a red "Security fix" badge on packages whose latest release patches a known vulnerability. Perfect for a project health dashboard or a release-notes companion page.

By Staaarter Team
DevTools
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its badge dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/package-dependency-health.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/devtools/devtools8.tsx instead.

Usage

The file also exports devtools8Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Devtools8, devtools8Demo } from "@/components/blocks/devtools/devtools8";

export default function Page() {
  return <Devtools8 {...devtools8Demo} />;
}

Props

PropTypeDefaultDescription
headingstring"Dependency health"Section heading.
descriptionstring"Installed versions against the latest release for every package in this project."Section intro text below the heading.
packagesPackageDependency[]noneThe packages rendered as table rows, in the order given.
classNamestringnoneExtra classes for the outer section element.

Types

type PackageDependency = {
  name: string;
  currentVersion: string;
  latestVersion: string;
  behind: boolean;
  securityFix?: boolean;
};

Behavior notes

  • behind and securityFix are plain flags you set per package; the block never compares version strings itself, so it has no opinion on semver ordering and will render whatever you pass.
  • The arrow between versions and the version text both switch from amber to emerald purely off the behind flag, independent of securityFix.
  • A row with securityFix set still needs behind set to also show the amber "Update available" badge; the two badges are independent and a row can show either, both, or neither.
  • The table has no sorting, filtering, or row links; it is a static, read-only snapshot each time it renders.