vlt / docs

  • PricingBenchmarks (opens in new window)Community (opens in new window)Feedback
  • Overview
  • Attribute Selectors
  • Combinators
  • ID Selectors
  • Security Insights
    • Overview
    • :attr()
    • :has()
    • :dist()
    • :host()
    • :is()
    • :not()
    • :outdated()
    • :published()
    • :semver()
    • :spec()
    • :path()
    • :type()
    • :diff()
    • :hostname()
    • :registry()
  • Syntax
  • Examples
  • Exact date match
  • After a date
  • Before a date
  • What gets selected
  • Finding old packages
  • Combining with other selectors
  • See also
  1. Client
  2. /
  3. Selectors
  4. /
  5. Pseudo-classes
  6. /
  7. :published()

:published()

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

Syntax

Text
: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:

Text
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:

Text
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

  • :outdated() — find packages with newer versions
  • :unmaintained — packages not updated in 5+ years

Previous:outdated()Next:semver()

On this page

  • Syntax
  • Examples
  • Exact date match
  • After a date
  • Before a date
  • What gets selected
  • Finding old packages
  • Combining with other selectors
  • See also
Edit this page

Deploy your package on vlt.io

Publish scoped and private packages, manage organizations and access, and give every developer and CI environment a consistent source for public and private JavaScript dependencies.

Publish now