Dependency List

Packages with their update and vulnerability state. Severity outranks staleness in the sort, because ordering by how out of date things are buries a critical advisory behind forty patch bumps.

src/components/ui/dependency-list.tsx

About

From the component's own source, where it was written.

Package dependencies with their update and vulnerability state.

Severity outranks staleness in the sort. A list ordered by how out of date things are buries a critical advisory behind forty cosmetic patch bumps, which is precisely backwards from how anyone triages this.

The update badge distinguishes major from minor, because "12 outdated" is not actionable while "1 major, 11 patch" is — one is an afternoon and the other is a sprint.

Install

npx astralyx-ui add dependency-list

Usage

import { DependencyList } from '@/components/ui/dependency-list'

<DependencyList dependencies={deps} />

Composer

Change the props and the source below follows.

6 packages14 outdated
  • semver

    high severity · GHSA-c2qf-rxjj-qqgw

    7.5.17.6.3minorhigh
  • vitedev

    7.4.18.0.1major
  • tailwindcss

    4.1.04.3.3minor
  • shiki

    1.22.01.22.4patch
  • oxlintdev

    0.9.2current
  • react

    19.2.8current
Props
tsx
<DependencyList dependencies={deps} searchable={true} />

Examples

Packages

API

Generated from the source, so it cannot fall behind the code. One table per exported component, then hooks, functions and types.

DependencyList

Extends ComponentProps<'div'>.

PropTypeDefaultDescription
dependenciesDependency[]required{ name, current, latest?, update?, dev?, vulnerability?, homepage? }.
searchablebooleantrue—
devLabelReactNode'dev'Badge on a dev-only dependency.
currentLabelReactNode'current'Marks a package already on its latest version.
filterPlaceholderstring'Filter packages'—
filterLabelstring'Filter packages'Accessible name for the filter field.
emptyMessageReactNode'No packages match.'—
homepageLabel(name: string) => stringDEFAULT_HOMEPAGE_LABELAccessible name for a package's homepage link.

Functions

FunctionSignatureDescription
updateKind(current: string, latest?: string) => 'major' | 'minor' | 'patch' | nullExported. Returns null for anything unparseable rather than guessing.

Types

Dependency

Package dependencies with their update and vulnerability state.

FieldTypeDescription
namestring—
currentstring—
latest?string—
update?'major' | 'minor' | 'patch' | nullDerived from the version pair when omitted. Major versus patch is the difference between a sprint and an afternoon, so "12 outdated" is not the useful number.
dev?boolean—
vulnerability?{ severity: 'critical' | 'high' | 'moderate' | 'low'; id?: string }—
size?number—
homepage?string—

Behaviour

TopicDetailDescription
sortseverity, then update size, then nameFixed — this is a triage order, not a preference.