You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using vitest.workspace.ts, I cycle through all the folders in the tests directory.
For each folder, I check for the existence of a file starting with tsconfig.
For each matching file, I create a workspace with test.typecheck.tsconfig referencing the corresponding config file.
Caution
When running vitest, I expect each case folder to contain two temporary tsconfig.vitest-temp files.
Currently, only one is present.
Note
It looks like that thetsconfig.vitest-temp.json name iswritten here:
Describe the bug
Using
vitest.workspace.ts, I cycle through all the folders in thetestsdirectory.For each folder, I check for the existence of a file starting with tsconfig.
For each matching file, I create a workspace with
test.typecheck.tsconfigreferencing the corresponding config file.Caution
When running
vitest, I expect each case folder to contain two temporarytsconfig.vitest-tempfiles.Currently, only one is present.
Note
It looks like that the
tsconfig.vitest-temp.jsonname iswritten here:vitest/packages/vitest/src/typecheck/parse.ts
Lines 78 to 81 in 78b62ff
Maybe the issue can be fixed by using the original filename alongside
original-name-without-extenstion.vitest-temp.json?The original issue was reported in i18next repository
Reproduction
I setup a small repository where the issue can be easily reproduced:
https://github.com/marcalexiei/vitest-typecheck-ts-config-reproduction
To show this behaviour I created a GitHub action.
An example run can be found at this page
When running the
case-1workspace, no errors are produced.However when running
case-1-noStrictworkspace alone results in an error.Running all workspaces produces inconsistent results:
tsconfigfiles is written in the temp filetsconfig.vitest-temp.jsonfileSystem Info
System: OS: macOS 15.2 CPU: (8) arm64 Apple M3 Memory: 348.19 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 22.11.0 - ~/.nvm/versions/node/v22.11.0/bin/node npm: 10.9.0 - ~/.nvm/versions/node/v22.11.0/bin/npm pnpm: 9.15.0 - ~/.nvm/versions/node/v22.11.0/bin/pnpm Browsers: Chrome: 131.0.6778.205 Safari: 18.2 npmPackages: vitest: 2.1.8 => 2.1.8Used Package Manager
pnpm
Validations