Skip to content

refactor: deduplicate run-level option propagation and document the resolution model - #10823

Merged
sheremet-va merged 4 commits into
mainfrom
refactor/config-propagation
Jul 24, 2026
Merged

sheremet-va merged 4 commits into
mainfrom
refactor/config-propagation

Conversation

@sheremet-va

@sheremet-va sheremet-va commented Jul 23, 2026

Copy link
Copy Markdown
Member

Description

coverage, attachmentsDir, and mergeReportsLabel were copied from the root config to projects in three different places: resolveTestConfig (coverage), the vitest:project plugin's configResolved hook (coverage again, plus attachmentsDir), and a one-off mergeReportsLabel assignment in resolveSingleProjectEntry. The copies now live in resolveTestConfig only: coverage keeps its existing early assignment (it is shared by reference so projects append to the shared coverage.exclude), and attachmentsDir/mergeReportsLabel are assigned at the end of the resolution. The configResolved copies were redundant: nothing reads the Vite-level test values between the project's Vite resolution and resolveTestConfig.

The advanced guide gains a "Project Configuration Resolution" section documenting how startVitest/createVitest arguments interact with projects: what extends does and does not carry (the config file only, not viteOverrides or CLI options), which option groups reach every project regardless of extends, and why plugins only transfer through a config file.

@netlify

netlify Bot commented Jul 23, 2026

Copy link
Copy Markdown

Deploy Preview for vitest-dev ready!

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

Comment thread packages/vitest/src/node/config/propagation.ts Outdated
@sheremet-va sheremet-va changed the title refactor: declare root-to-project config propagation in one module refactor: deduplicate run-level option propagation and document the resolution model Jul 23, 2026
@sheremet-va
sheremet-va merged commit 1ffafc0 into main Jul 24, 2026
41 of 48 checks passed
@sheremet-va
sheremet-va deleted the refactor/config-propagation branch July 24, 2026 11:47
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 8, 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.

2 participants