Skip to content

The :path() pseudo-class matches workspace and file packages based on their file path relative to the project root. Patterns use glob syntax and must be quoted strings.

Syntax

:path("<glob>")

Examples

Match all workspace packages

Terminal
$ vlt query ':path("*")'

Match a specific path

Terminal
$ vlt query ':path("./packages/foo")'

Match with glob patterns

Terminal
$ vlt query ':path("packages/**")'

What gets selected

Given a monorepo:

my-monorepo/
├── packages/
│ ├── core/ ← workspace
│ ├── utils/ ← workspace
│ └── cli/ ← workspace
└── apps/
└── web/ ← workspace
QuerySelected
:path("*")core, utils, cli, web
:path("packages/**")core, utils, cli
:path("apps/**")web
:path("./packages/core")core

Combining with other selectors

Find workspaces in packages/ that have changed since main:

Terminal
$ vlt query ':path("packages/**"):diff(main)'

See also