fix(reporters): handle concurrent createReport calls - #11278
Merged
hi-ogawa merged 1 commit intoSep 17, 2026
Merged
Conversation
✅ Deploy Preview for vitest-dev ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
hi-ogawa
approved these changes
Sep 16, 2026
createReport calls
dadezzz
pushed a commit
to dadezzz/forgejo-agent
that referenced
this pull request
Sep 30, 2026
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [vitest](https://vitest.dev) ([source](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | [`5.0.1` → `5.0.2`](https://renovatebot.com/diffs/npm/vitest/5.0.1/5.0.2) |  |  | --- ### Release Notes <details> <summary>vitest-dev/vitest (vitest)</summary> ### [`v5.0.2`](https://github.com/vitest-dev/vitest/releases/tag/v5.0.2) [Compare Source](vitest-dev/vitest@v5.0.1...v5.0.2) ##### 🐞 Bug Fixes - Bind `process` in case global is overwritten - by [@​AriPerkkio](https://github.com/AriPerkkio) in [#​11343](vitest-dev/vitest#11343) [<samp>(0b792)</samp>](vitest-dev/vitest@0b79231ad) - **detect-async-leaks**: - Ignore `process.stdio` handles - by [@​AriPerkkio](https://github.com/AriPerkkio) in [#​11333](vitest-dev/vitest#11333) [<samp>(0fd6b)</samp>](vitest-dev/vitest@0fd6b9790) - **expect**: - Fix `toMatchObject` with asymmetric matchers - by [@​ShreeBohara](https://github.com/ShreeBohara), **Claude Opus 5**, [@​hi-ogawa](https://github.com/hi-ogawa), **Hiroshi Ogawa** and **Codex (GPT-5)** in [#​11100](vitest-dev/vitest#11100) [<samp>(42523)</samp>](vitest-dev/vitest@42523289e) - **jsdom**: - Fix `Request` with `Blob` body on jsdom 28+ - by [@​harshit-d3v](https://github.com/harshit-d3v) in [#​11295](vitest-dev/vitest#11295) [<samp>(d1c3e)</samp>](vitest-dev/vitest@d1c3ecc93) - **reporter**: - `agent` to respect `--silent` - by [@​Raj4478](https://github.com/Raj4478) and [@​AriPerkkio](https://github.com/AriPerkkio) in [#​11271](vitest-dev/vitest#11271) [<samp>(5b95e)</samp>](vitest-dev/vitest@5b95efb6d) - **reporters**: - Handle concurrent `createReport` calls - by [@​7rulnik](https://github.com/7rulnik) in [#​11278](vitest-dev/vitest#11278) [<samp>(e8e55)</samp>](vitest-dev/vitest@e8e556ff7) - `hanging-process` to use ESM entrypoint - by [@​AriPerkkio](https://github.com/AriPerkkio) in [#​11316](vitest-dev/vitest#11316) [<samp>(4e91e)</samp>](vitest-dev/vitest@4e91e5668) - **spy**: - Fix stack overflow when spying `Set.prototype.add` - by [@​fengmk2](https://github.com/fengmk2) in [#​11299](vitest-dev/vitest#11299) [<samp>(a0a93)</samp>](vitest-dev/vitest@a0a939653) - **ui**: - Persist authentication cookie beyond current browser session - by [@​hi-ogawa](https://github.com/hi-ogawa), **Hiroshi Ogawa** and **OpenCode (gpt-5.6-sol)** in [#​11066](vitest-dev/vitest#11066) [<samp>(f8819)</samp>](vitest-dev/vitest@f88195e16) ##### [View changes on GitHub](vitest-dev/vitest@v5.0.1...v5.0.2) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMTUuMTMiLCJ1cGRhdGVkSW5WZXIiOiI0NC4xMTUuMTMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->
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.
Description
Concurrent Vitest processes sharing a fresh report directory can both pass the
existsSync()check increateReport(). One then fails withEEXISTwhen creating.vitestor its scoped directory. With the default blob reporter, this can leave a shard without a report even when its tests passed. The blob reporter started using this helper in #10232.This PR replaces the separate existence checks and directory creation calls with
mkdirSync(reportDir, { recursive: true }), which creates the parent directory and tolerates directories created by another process.Basically it's a rare race condition.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
pnpm-lock.yamlunless you introduce a new test example.Tests
pnpm test:ci.Documentation
pnpm run docscommand.Changesets
feat:,fix:,perf:,docs:, orchore:.