Skip to content

fix: make attachmentsDir root only config - #10334

Merged
sheremet-va merged 2 commits into
vitest-dev:mainfrom
hi-ogawa:fix-make-attachmentsdir-root-only-config
May 13, 2026
Merged

sheremet-va merged 2 commits into
vitest-dev:mainfrom
hi-ogawa:fix-make-attachmentsdir-root-only-config

Conversation

@hi-ogawa

@hi-ogawa hi-ogawa commented May 13, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This PR fixes all projects to use the root attachmentsDir. Source paths still resolve from the owning project, but all projects now write into the shared root .vitest/attachments directory.

This is safe for UI and Browser Mode because attachments are served through the dedicated /__vitest_attachment__ middleware, not as project-local Vite static files. The default directory change is again breaking-ish change, but v5 already did that by .vitest-attachments -> .vitest/attachments, so probably fine without special treatment.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.
  • Please check Allow edits by maintainers to make review process faster. Note that this option is not available for repositories that are owned by Github organizations.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

@netlify

netlify Bot commented May 13, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 88da870
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/6a03ce2015f90b000954cf92
😎 Deploy Preview https://deploy-preview-10334--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.

Co-authored-by: Codex <noreply@openai.com>
@hi-ogawa
hi-ogawa marked this pull request as ready for review May 13, 2026 01:04

@AriPerkkio AriPerkkio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me, as attachments are more like reporter results.

@AriPerkkio
AriPerkkio requested a review from sheremet-va May 13, 2026 04:36
@sheremet-va
sheremet-va merged commit fab1b60 into vitest-dev:main May 13, 2026
14 of 16 checks passed
@hi-ogawa
hi-ogawa deleted the fix-make-attachmentsdir-root-only-config branch May 13, 2026 07:20
@github-actions github-actions Bot locked and limited conversation to collaborators May 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

each project has separate .vitest/attachments in each project root and html reporter doesn't serve them

3 participants