Version
29.4.1
Steps to reproduce
This commit introduced a tsconfig properties check issuing the following warning when tsconfig.compilerOptions.isolatedModules is not true and tsconfig.compilerOptions.module is node16 or nodenext.
ts-jest[ts-compiler] (WARN) Using hybrid module kind (Node16/18/Next) is only supported in "isolatedModules: true". Please set "isolatedModules: true" in your tsconfig.json.
As far as I know this is a widely common setup and it seems to be fully supported by ts-jest.
Since when the warning has been introduced, all my commonJS tests have turned into a wall of warnings.
See screenshot
I initially tried to enable isolatedModules as suggested by the warning but it turned out that isolatedModules handling is currently flawed in ts-jest and caused the library to skip type checking at test execution time:
I even tried to suppress the specific log entry but since ts-jest uses a logger library it turned out to be overkill.
I open this issue to try and find a solution to make ts-jest usable again on CommonJS project using type check at test execution time. Here are a few possible steps:
- Remove the log and the check. Why was it introduced? I couldn't find any info in the commit message
- Find a way to filter warnings output
- Do not disable type check with
isolatedModules is true (see PR)
I understand changing isolatedModules behaviour could be an effort that this library might not be able to afford short-term. What about the 2 other solutions?
Would point 1 a quick painless solution implementable short term?
Thank you for your attention, happy to land hand if the case.
Expected behavior
Actual behavior
Debug log
Additional context
Environment
Version
29.4.1
Steps to reproduce
This commit introduced a
tsconfigproperties check issuing the following warning whentsconfig.compilerOptions.isolatedModulesis nottrueandtsconfig.compilerOptions.moduleisnode16ornodenext.As far as I know this is a widely common setup and it seems to be fully supported by
ts-jest.Since when the warning has been introduced, all my commonJS tests have turned into a wall of warnings.
See screenshot
I initially tried to enable
isolatedModulesas suggested by the warning but it turned out thatisolatedModuleshandling is currently flawed ints-jestand caused the library to skip type checking at test execution time:I even tried to suppress the specific log entry but since
ts-jestuses a logger library it turned out to be overkill.I open this issue to try and find a solution to make
ts-jestusable again on CommonJS project using type check at test execution time. Here are a few possible steps:isolatedModulesis true (see PR)I understand changing
isolatedModulesbehaviour could be an effort that this library might not be able to afford short-term. What about the 2 other solutions?Would point 1 a quick painless solution implementable short term?
Thank you for your attention, happy to land hand if the case.
Expected behavior
Actual behavior
Debug log
Additional context
Environment