ts-jest icon indicating copy to clipboard operation
ts-jest copied to clipboard

[Bug]: `isolatedModules` property in `ts-jest` config doesn't create `isolatedModule` option in normalized tsconfig

Open dmy-leanix opened this issue 1 year ago • 3 comments

Version

29

Steps to reproduce

Tried to debug an example from this repository (ts-only) with isolated modules, after enabling debugger have the logs with the normalized config below

Expected behavior

After enabling isolatedModules tsconfig should have this property (if it's really expected and isolatedModules shouldn't do something else)

Actual behavior

isolatedModules is not in tsconfig

Debug log

{
    "context": {
        "logLevel": 20,
        "namespace": "config",
        "package": "ts-jest",
        "tsconfig": {
            "compileOnSave": false,
            "errors": [],
            "fileNames": [
                "/Users/username/projects/ts-jest/examples/ts-only/globals.d.ts"
            ],
            "options": {
                "configFilePath": "/Users/username/projects/ts-jest/examples/ts-only/tsconfig.json",
                "declaration": false,
                "inlineSourceMap": false,
                "inlineSources": true,
                "module": 1,
                "noEmit": false,
                "removeComments": false,
                "sourceMap": true,
                "target": 8
            },
            "raw": {
                "compileOnSave": false,
                "compilerOptions": {
                    "module": "CommonJS",
                    "target": "ES2021"
                },
                "files": [
                    "globals.d.ts"
                ]
            },
            "typeAcquisition": {
                "enable": false,
                "exclude": [],
                "include": []
            },
            "wildcardDirectories": {}
        },
        "version": "29.1.0"
    },
    "message": "normalized typescript config via ts-jest option",
    "sequence": 16,
    "time": "2023-05-04T08:20:06.981Z"
}

Additional context

No response

Environment

System:
    OS: macOS 13.3.1
    CPU: (8) arm64 Apple M1 Pro
  Binaries:
    Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
    npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm

dmy-leanix avatar May 05 '23 04:05 dmy-leanix

The isolatedModules option of ts-jest is not equal to typescript's one, see #3750

CSchulz avatar Jun 08 '23 10:06 CSchulz

We will rename it later to something else to be less confused. Indeed the option isolatedModules of ts-jest is not the same as typescript's one.

ahnpnl avatar Jul 10 '24 00:07 ahnpnl

duplicate with #3750

ahnpnl avatar Jul 10 '24 00:07 ahnpnl