Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: filter projects eagerly during config resolution #7313

Merged
merged 24 commits into from
Jan 23, 2025
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
bd8a7df
fix: filter projects eagerly during config resolution
sheremet-va Jan 20, 2025
570e403
chore: cleanup
sheremet-va Jan 20, 2025
48209a6
chore: cleanup
sheremet-va Jan 20, 2025
a9dd4d7
chore: cleanup
sheremet-va Jan 21, 2025
8c28185
chore: improve error message
sheremet-va Jan 21, 2025
79b6d78
chore: fix glob
sheremet-va Jan 21, 2025
bad745f
fix: restart server on project name change
sheremet-va Jan 21, 2025
96a609f
fix: correctly set the name for browser instances
sheremet-va Jan 21, 2025
0fdaf8f
fix: correctly inject name
sheremet-va Jan 21, 2025
4eea6be
test: cleanup
sheremet-va Jan 21, 2025
e8f2251
chore: cleanup
sheremet-va Jan 21, 2025
dde22a6
chore: add comment
sheremet-va Jan 21, 2025
d0581fd
Merge branch 'main' of github.com:vitest-dev/vitest into fix/project-…
sheremet-va Jan 21, 2025
a30a5d4
chore: cleanup error msg
sheremet-va Jan 21, 2025
e5de674
test: oops
sheremet-va Jan 21, 2025
59e0b04
Merge branch 'main' of github.com:vitest-dev/vitest into fix/project-…
sheremet-va Jan 22, 2025
64b039d
refactor: keep project filter in a hidden vitest field
sheremet-va Jan 22, 2025
dfab725
chore: fix check
sheremet-va Jan 22, 2025
eeac4bd
test: cleanup
sheremet-va Jan 22, 2025
572a9d8
test: add workspace test for filtering
sheremet-va Jan 22, 2025
07331ba
fix: don't resolve `node:` and `internal:` in the error stack
sheremet-va Jan 22, 2025
4457ad0
test: add test for project change
sheremet-va Jan 22, 2025
86f9758
chore: cleanup
sheremet-va Jan 22, 2025
85dd916
Merge branch 'main' into fix/project-filter-eager
AriPerkkio Jan 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: cleanup
sheremet-va committed Jan 22, 2025
commit 86f9758ec1a772cdf3f2a432414a2c88ef32e0aa
4 changes: 2 additions & 2 deletions packages/vitest/src/node/plugins/workspace.ts
Original file line number Diff line number Diff line change
@@ -84,10 +84,10 @@ export function WorkspaceVitestPlugin(
// if projects don't match, we ignore the test project altogether
// if some of them match, they will later be filtered again by `resolveWorkspace`
if (filters.length) {
const filteredNames = workspaceNames.filter((name) => {
const hasProject = workspaceNames.some((name) => {
return project.vitest._matchesProjectFilter(name)
})
if (!filteredNames.length) {
if (!hasProject) {
throw new VitestFilteredOutProjectError()
}
}