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
  • Available types
  • Examples
  • Find all git dependencies
  • Find all workspace dependencies
  • Find all file dependencies
  • What gets selected
  • Combining with other selectors
  • See also
  1. Client
  2. /
  3. Selectors
  4. /
  5. Pseudo-classes
  6. /
  7. :type()

:type()

The :type() pseudo-class matches packages based on their resolved type — how the package is sourced.

Syntax

Text
:type(<type>)

Available types

TypeDescription
registryPackages from npm or another registry
fileLocal file dependencies (file:../path)
gitGit repository dependencies
remoteRemote URL dependencies
workspaceWorkspace packages in your monorepo

Examples

Find all git dependencies

Terminal
$ vlt query ':type(git)'

Find all workspace dependencies

Terminal
$ vlt query ':type(workspace)'

Find all file dependencies

Terminal
$ vlt query ':type(file)'

What gets selected

Given:

Text
my-app
├── react@18.2.0             ← type: registry
├── my-utils (workspace)     ← type: workspace
├── my-fork (git)            ← type: git
└── ../shared-lib (file)     ← type: file
QuerySelected
:type(registry)react
:type(workspace)my-utils
:type(git)my-fork
:type(file)../shared-lib

Combining with other selectors

Find all non-registry dependencies:

Terminal
$ vlt query ':not(:type(registry))'

Find outdated git dependencies:

Terminal
$ vlt query ':type(git):outdated'

See also

  • :workspace — shorthand for matching workspaces
  • :spec() — match by specifier string

Previous:path()Next:diff()

On this page

  • Syntax
  • Available types
  • Examples
  • Find all git dependencies
  • Find all workspace dependencies
  • Find all file dependencies
  • What gets selected
  • 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