workspace typecheck: tsconfig.vitest-temp.json
is overridden if more workspace target the same folder with a different tsconfigs
#7107
Labels
Describe the bug
Using
vitest.workspace.ts
, I cycle through all the folders in thetests
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 temporarytsconfig.vitest-temp
files.Currently, only one is present.
Note
It looks like that the
tsconfig.vitest-temp.json
name 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-1
workspace, no errors are produced.However when running
case-1-noStrict
workspace alone results in an error.Running all workspaces produces inconsistent results:
tsconfig
files is written in the temp filetsconfig.vitest-temp.json
fileSystem Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: