Skip to content

The :published() pseudo-class matches packages based on their publication date. Useful for auditing when dependencies were last released.

Syntax

:published(<date>)
:published("<comparator><date>")

The date parameter supports:

  • Full dates: 2024-01-01
  • Year only: 2024
  • Year-month: 2024-06

When using a comparator (>, <, >=, <=), the value must be quoted.

Examples

Exact date match

Terminal
$ vlt query ':published(2024-01-01)'

After a date

Terminal
$ vlt query ':published(">2024")'

Before a date

Terminal
$ vlt query ':published("<=2023-12-31")'

What gets selected

Given:

my-app
├── react@18.2.0 ← published: 2022-06-14
├── typescript@5.3.0 ← published: 2023-11-20
└── vite@5.0.0 ← published: 2023-11-16

The query :published(">2023") selects:

my-app
├── react@18.2.0
├── typescript@5.3.0 ✅ published after 2023
└── vite@5.0.0 ✅ published after 2023

Finding old packages

Find packages published more than 2 years ago:

Terminal
$ vlt query ':published("<2024")'

Combining with other selectors

Find outdated packages that were published before 2023:

Terminal
$ vlt query ':outdated:published("<2023")'

See also