fix(core): match forceRerunTriggers across dot directories - #11065
fix(core): match forceRerunTriggers across dot directories#11065lx3133584 wants to merge 1 commit into
Conversation
Fixes vitest-dev#11054 Signed-off-by: Liang Xu <lx3133584@users.noreply.github.com>
|
Hello @lx3133584. Your PR has been labeled To keep your PR open, please follow these steps:
Please, do not generate or format the response with AI. If you do not speak English, reply in your native language or use translation software like Google Translate or Deepl. If the response is generated, the PR will be closed automatically. These measures help us reduce maintenance burden and keep the team's work efficient. See our AI contributions policy for more context. |
1 similar comment
|
Hello @lx3133584. Your PR has been labeled To keep your PR open, please follow these steps:
Please, do not generate or format the response with AI. If you do not speak English, reply in your native language or use translation software like Google Translate or Deepl. If the response is generated, the PR will be closed automatically. These measures help us reduce maintenance burden and keep the team's work efficient. See our AI contributions policy for more context. |
✅ Deploy Preview for vitest-dev ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Problem
When running with
--changedor in watch mode,forceRerunTriggersfails to match file paths when the path contains a dot-prefixed directory segment (e.g. project cloned under.app/,~/.local/src/..., or subdirectories starting with a dot).Root Cause
picomatchis invoked without{ dot: true }infilterTestsBySource(specifications.ts) andhandleFileChanged(watcher.ts). By default (dot: false), picomatch globstars (**) do not match dot-leading path segments, preventing triggers such as**/package.jsonfrom matching absolute file paths containing dot directories.Fix
Pass
{ dot: true }topicomatchwhen constructing matchers inspecifications.tsand when evaluatingpm.isMatchinwatcher.ts.Testing
test/e2e/test/git-changed.test.tsassertingforceRerunTriggersmatching with dot directory paths.pnpm typecheckandpnpm lintpass cleanly.