Skip to content

fix(core): match forceRerunTriggers across dot directories - #11065

Open
lx3133584 wants to merge 1 commit into
vitest-dev:mainfrom
lx3133584:fix/force-rerun-triggers-dot-directories
Open

fix(core): match forceRerunTriggers across dot directories#11065
lx3133584 wants to merge 1 commit into
vitest-dev:mainfrom
lx3133584:fix/force-rerun-triggers-dot-directories

Conversation

@lx3133584

Copy link
Copy Markdown

Problem

When running with --changed or in watch mode, forceRerunTriggers fails 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

picomatch is invoked without { dot: true } in filterTestsBySource (specifications.ts) and handleFileChanged (watcher.ts). By default (dot: false), picomatch globstars (**) do not match dot-leading path segments, preventing triggers such as **/package.json from matching absolute file paths containing dot directories.

Fix

Pass { dot: true } to picomatch when constructing matchers in specifications.ts and when evaluating pm.isMatch in watcher.ts.

Testing

  • Added e2e test case in test/e2e/test/git-changed.test.ts asserting forceRerunTriggers matching with dot directory paths.
  • Verified pnpm typecheck and pnpm lint pass cleanly.

Fixes vitest-dev#11054

Signed-off-by: Liang Xu <lx3133584@users.noreply.github.com>
@github-actions github-actions Bot added the maybe automated User is likely an AI agent, or the content was generated by an AI assistant without user control label Aug 26, 2026
@github-actions

Copy link
Copy Markdown

Hello @lx3133584. Your PR has been labeled maybe automated because it appears to have been fully generated by AI with no human involvement.

To keep your PR open, please follow these steps:

  • Confirm that you are a real human. If you are an automated agent, disclose that
  • Make sure you've read, reviewed and stand behind its content
  • Make sure you've read the full issue along with all of its comments, as well as any linked issues and their comments
  • Make sure it follows our contribution guidelines and uses the correct GitHub template
  • Disclose any AI tools you used (e.g. Claude, Copilot, Codex)

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
@github-actions

Copy link
Copy Markdown

Hello @lx3133584. Your PR has been labeled maybe automated because it appears to have been fully generated by AI with no human involvement.

To keep your PR open, please follow these steps:

  • Confirm that you are a real human. If you are an automated agent, disclose that
  • Make sure you've read, reviewed and stand behind its content
  • Make sure you've read the full issue along with all of its comments, as well as any linked issues and their comments
  • Make sure it follows our contribution guidelines and uses the correct GitHub template
  • Disclose any AI tools you used (e.g. Claude, Copilot, Codex)

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.

@netlify

netlify Bot commented Aug 26, 2026

Copy link
Copy Markdown

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 38a472e
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/6a8e652060675c00081d1c4f
😎 Deploy Preview https://deploy-preview-11065--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maybe automated User is likely an AI agent, or the content was generated by an AI assistant without user control

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant