-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(vitest): Fix cacheDir
not being honored if deps.optimizer.{mode}.enabled
is true
#6902
base: main
Are you sure you want to change the base?
Conversation
…resolved ones from optimizer config generation
✅ Deploy Preview for vitest-dev ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
So I spent a while looking into the test failures and I'm not really sure what to do. The specific |
Thanks for investigating this. I took a look and indeed the current state is quite complicated. But my intuition is that we shouldn't need to change vitest/packages/vitest/src/node/plugins/optimizer.ts Lines 22 to 23 in 5e6de27
and we again deriving vitest/packages/vitest/src/node/config/resolveConfig.ts Lines 677 to 681 in 5e6de27
Note that Vite's If we have to choose one, probably |
Description
Fixes #6733
So initially it just seemed like the
viteConfig.cacheDir
set within optimizer should have been prioritizing the one defined in the config but there were other issues with the waycacheDir
was being handled within theresolveOptimizerConfig
function so I decided to remove thecacheDir
logic entirely since it seemed to be unnecessary.With this, I also fixed an issue where the
runVitest
function used within some of the tests wasn't properly passing through the options that were given to it. This uncovered the failures withincache.test.ts
that should have been happening all along.Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
pnpm-lock.yaml
unless you introduce a new test example.Tests
pnpm test:ci
.Documentation
pnpm run docs
command.Changesets
feat:
,fix:
,perf:
,docs:
, orchore:
.