Skip to content

The :outdated() pseudo-class matches packages that have newer versions available on the registry. An optional type parameter controls how “outdated” is defined.

Syntax

:outdated
:outdated(<type>)

Type parameter

TypeDescription
any (default)A version exists greater than the current one
in-rangeA greater version exists that satisfies the parent’s dependency range
out-of-rangeA greater version exists that does NOT satisfy the parent’s range
majorA semver major version bump is available
minorA semver minor version bump is available
patchA semver patch version bump is available

Examples

Find all outdated packages

Terminal
$ vlt query ':outdated'

Find major version bumps

Terminal
$ vlt query ':outdated(major)'

Find safe updates (in-range)

Updates that satisfy the existing dependency range:

Terminal
$ vlt query ':outdated(in-range)'

Find breaking updates (out-of-range)

Updates that would require changing the dependency range:

Terminal
$ vlt query ':outdated(out-of-range)'

What gets selected

Given:

my-app
├── react@17.0.2 ← latest: 18.2.0 (major)
├── typescript@5.2.0 ← latest: 5.3.0 (minor)
├── vite@5.0.0 ← latest: 5.0.12 (patch)
└── lodash@4.17.21 ← latest: 4.17.21 (up to date)
QuerySelected
:outdatedreact, typescript, vite
:outdated(major)react
:outdated(minor)typescript
:outdated(patch)vite

Combining with combinators

Find outdated direct dependencies only:

Terminal
$ vlt query ':root > :outdated'

Find outdated direct dependencies with major bumps:

Terminal
$ vlt query ':root > :outdated(major)'

See also