Repository navigation
Conversation
`vp run --filter "[<since>]"` now selects the packages with a file changed
since a git revision, as pnpm does, and combines with the rest of the
selector: `...[<since>]`, `[<since>]...`, the `^` forms, `name[<since>]`,
`{dir}[<since>]` and `!...[<since>]`. Before, `[<since>]` was parsed as a
glob character class, matched nothing and exited 0.
Detection follows pnpm's get_changed_projects: git diff --name-only against
the merge base of <since> and HEAD, so uncommitted changes to tracked files
count and untracked files don't; each file belongs to the deepest package
that contains it, the root package for files outside every other one. When
pnpm-workspace.yaml changed, the packages that take a changed catalog entry
count as changed too.
An unknown revision, a workspace outside a git repository, or no merge base
(as in a shallow clone) is an error instead of an empty match.
A trailing `[...]` group is now always the revision, as in pnpm's selector
regex, so `foo[ab]` is no longer a glob; `foo[ab]*` still is.
Refs voidzero-dev/vite-plus#2903.
ReemX
force-pushed
the
feat/filter-changed-since
branch
from
November 21, 2026 11:20
a6ed26e to
8526ac3
Compare
3 tasks done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
vp run --filter "...[<ref>]"is how teams coming from pnpm or Turborepo run CI for the changed packages only. Today[<ref>]is parsed as a glob character class, matches nothing, and the run exits 0, so a migrated pipeline builds nothing and passes. Closes voidzero-dev/vite-plus#2903, with the shape proposed there: pnpm parity on--filter,--affectedleft for later.Change
--filteraccepts pnpm's[<since>]group:[<since>],...[<since>],[<since>]..., the^forms,name[<since>],{dir}[<since>]and!...[<since>]. As in pnpm's selector regex, a trailing[...]is the revision, sofoo[ab]is no longer a glob (foo[ab]*still is).get_changed_projects:git diff --name-onlyagainst the merge base of<since>andHEAD, so uncommitted changes to tracked files count and untracked files don't. A file belongs to the deepest package containing it, or to the root package. Whenpnpm-workspace.yamlchanged, its catalogs at the merge base are compared with the ones on disk, and packages taking a changed entry throughcatalog:count as changed (thecatalogMode: prefercase from the issue).--unshallowhint) is an error, not an empty match. pnpm compares against<since>directly when the merge base is missing; I went with the error, as discussed in the issue.{dir}[<since>]narrows the usual{dir}match to changed packages. pnpm instead uses the dir as the diff pathspec; the result is the same for its documented forms such as{packages/**}[ref].testPattern,changedFilesIgnorePattern, catalogoverrides/includes,--affected.[[git.commits]]option so fixtures can have a git history. New unit tests run against real repositories made in temp dirs, and there are new plan and e2e fixtures (a leaf change where...[HEAD~1]buildsutils→lib→app, an uncommitted change, a catalog-only change, and the error cases).If this lands, I'll send the matching note for the run guide's Filter section in vite-plus.