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
$ vlt query ':path("*")'Match a specific path
$ vlt query ':path("./packages/foo")'Match with glob patterns
$ vlt query ':path("packages/**")'What gets selected
Given a monorepo:
my-monorepo/├── packages/│ ├── core/ ← workspace│ ├── utils/ ← workspace│ └── cli/ ← workspace└── apps/ └── web/ ← workspace| Query | Selected |
|---|---|
: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:
$ vlt query ':path("packages/**"):diff(main)'See also
:workspace— match all workspace packages:type()— match by package type:diff()— match by changed files