Skip to content
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

[Bug]: Should Not Show Warning About esModuleInterop If module is node16 or nodenext #4266

Closed
threeal opened this issue Feb 13, 2024 · 0 comments · Fixed by #4377
Closed
Labels
🐛 Bug Confirmed Bug is confirmed

Comments

@threeal
Copy link

threeal commented Feb 13, 2024

Version

29.1.2

Steps to reproduce

Modify the tsconfig.json file by setting module to node16 or nodenext and don't specify the esModuleInterop option. As of me, i'm using the following configuration:

{
  "include": ["src"],
  "exclude": ["**/*.test.*"],
  "compilerOptions": {
    "exactOptionalPropertyTypes": true,
    "strict": true,
    "module": "node16",
    "declaration": true,
    "outDir": "dist",
    "target": "es2022",
    "skipLibCheck": true
  }
}

Expected behavior

Should not show warning about a suggestion to set the esModuleInterop to true. As seen here, the esModuleInterop option defaults to true if module is node16 or nodenext, so not specifying esModuleInterop on node16 should behave the same as setting esModuleInterop to true.

Actual behavior

Got this warning, everything works fine though:

ts-jest[config] (WARN) message TS151001: If you have issues related to imports, you should consider setting `esModuleInterop` to `true` in your TypeScript configuration file (usually `tsconfig.json`). See https://blogs.msdn.microsoft.com/typescript/2018/01/31/announcing-typescript-2-7/#easier-ecmascript-module-interoperability for more information.

Debug log

...

Additional context

No response

Environment

System:
    OS: Linux 5.15 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (12) x64 12th Gen Intel(R) Core(TM) i5-12600
  Binaries:
    Node: 21.6.0 - ~/.nvm/versions/node/v21.6.0/bin/node
    Yarn: 4.1.0 - /mnt/c/Program Files/nodejs/yarn
    npm: 10.2.4 - ~/.nvm/versions/node/v21.6.0/bin/npm
Vylpes pushed a commit to Vylpes/random-bunny that referenced this issue Aug 7, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [ts-jest](https://kulshekhar.github.io/ts-jest) ([source](https://github.com/kulshekhar/ts-jest)) | devDependencies | minor | [`29.1.2` -> `29.2.3`](https://renovatebot.com/diffs/npm/ts-jest/29.1.2/29.2.3) |

---

### Release Notes

<details>
<summary>kulshekhar/ts-jest (ts-jest)</summary>

### [`v29.2.3`](https://github.com/kulshekhar/ts-jest/blob/HEAD/CHANGELOG.md#2923-2024-07-18)

[Compare Source](kulshekhar/ts-jest@v29.2.2...v29.2.3)

### [`v29.2.2`](https://github.com/kulshekhar/ts-jest/blob/HEAD/CHANGELOG.md#2922-2024-07-10)

[Compare Source](kulshekhar/ts-jest@v29.2.1...v29.2.2)

### [`v29.2.1`](https://github.com/kulshekhar/ts-jest/blob/HEAD/CHANGELOG.md#2921-2024-07-10)

[Compare Source](kulshekhar/ts-jest@v29.2.0...v29.2.1)

### [`v29.2.0`](https://github.com/kulshekhar/ts-jest/blob/HEAD/CHANGELOG.md#2920-2024-07-08)

[Compare Source](kulshekhar/ts-jest@v29.1.5...v29.2.0)

##### Bug Fixes

-   fix: don't show warning message with Node16/NodeNext ([99c4f49](kulshekhar/ts-jest@99c4f49)), closes [#&#8203;4266](kulshekhar/ts-jest#4266)

##### Features

-   feat(cli): allow migrating cjs `presets` to `transform` config ([22fb027](kulshekhar/ts-jest@22fb027))
-   feat(presets): add util functions to create ESM presets ([06f78ed](kulshekhar/ts-jest@06f78ed)), close [#&#8203;4200](kulshekhar/ts-jest#4200)
-   feat(presets): add util functions to create CJS presets ([f9cc3c0](kulshekhar/ts-jest@f9cc3c0)), close [#&#8203;4200](kulshekhar/ts-jest#4200)

##### Code refactoring

-   refactor: replace lodash deps with native js implementation ([40f1708](kulshekhar/ts-jest@40f1708))
-   refactor: use `TsJestTransformerOptions` type everywhere possibly ([7d001be](kulshekhar/ts-jest@7d001be))
-   refactor(cli): use new preset util functions to initialize test config ([c2b56ca](kulshekhar/ts-jest@c2b56ca))
-   refactor(presets): use create preset util functions for cjs presets ([922d6d0](kulshekhar/ts-jest@922d6d0))
-   test: switch `react-app` to use Vite ([827c8ad](kulshekhar/ts-jest@827c8ad))

### [`v29.1.5`](https://github.com/kulshekhar/ts-jest/blob/HEAD/CHANGELOG.md#2915-2024-06-16)

[Compare Source](kulshekhar/ts-jest@v29.1.4...v29.1.5)

### [`v29.1.4`](https://github.com/kulshekhar/ts-jest/blob/HEAD/CHANGELOG.md#2914-2024-05-28)

[Compare Source](kulshekhar/ts-jest@v29.1.3...v29.1.4)

### [`v29.1.3`](https://github.com/kulshekhar/ts-jest/blob/HEAD/CHANGELOG.md#2913-2024-05-21)

[Compare Source](kulshekhar/ts-jest@v29.1.2...v29.1.3)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy40MzEuNCIsInRhcmdldEJyYW5jaCI6ImRldmVsb3AifQ==-->

Reviewed-on: https://git.vylpes.xyz/RabbitLabs/random-bunny/pulls/178
Reviewed-by: Vylpes <ethan@vylpes.com>
Co-authored-by: Renovate Bot <renovate@vylpes.com>
Co-committed-by: Renovate Bot <renovate@vylpes.com>
Vylpes pushed a commit to Vylpes/card-drop that referenced this issue Aug 12, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [ts-jest](https://kulshekhar.github.io/ts-jest) ([source](https://github.com/kulshekhar/ts-jest)) | dependencies | minor | [`29.1.5` -> `29.2.4`](https://renovatebot.com/diffs/npm/ts-jest/29.1.5/29.2.4) |

---

### Release Notes

<details>
<summary>kulshekhar/ts-jest (ts-jest)</summary>

### [`v29.2.4`](https://github.com/kulshekhar/ts-jest/blob/HEAD/CHANGELOG.md#2924-2024-08-01)

[Compare Source](kulshekhar/ts-jest@v29.2.3...v29.2.4)

### [`v29.2.3`](https://github.com/kulshekhar/ts-jest/blob/HEAD/CHANGELOG.md#2923-2024-07-18)

[Compare Source](kulshekhar/ts-jest@v29.2.2...v29.2.3)

### [`v29.2.2`](https://github.com/kulshekhar/ts-jest/blob/HEAD/CHANGELOG.md#2922-2024-07-10)

[Compare Source](kulshekhar/ts-jest@v29.2.1...v29.2.2)

### [`v29.2.1`](https://github.com/kulshekhar/ts-jest/blob/HEAD/CHANGELOG.md#2921-2024-07-10)

[Compare Source](kulshekhar/ts-jest@v29.2.0...v29.2.1)

### [`v29.2.0`](https://github.com/kulshekhar/ts-jest/blob/HEAD/CHANGELOG.md#2920-2024-07-08)

[Compare Source](kulshekhar/ts-jest@v29.1.5...v29.2.0)

##### Bug Fixes

-   fix: don't show warning message with Node16/NodeNext ([99c4f49](kulshekhar/ts-jest@99c4f49)), closes [#&#8203;4266](kulshekhar/ts-jest#4266)

##### Features

-   feat(cli): allow migrating cjs `presets` to `transform` config ([22fb027](kulshekhar/ts-jest@22fb027))
-   feat(presets): add util functions to create ESM presets ([06f78ed](kulshekhar/ts-jest@06f78ed)), close [#&#8203;4200](kulshekhar/ts-jest#4200)
-   feat(presets): add util functions to create CJS presets ([f9cc3c0](kulshekhar/ts-jest@f9cc3c0)), close [#&#8203;4200](kulshekhar/ts-jest#4200)

##### Code refactoring

-   refactor: replace lodash deps with native js implementation ([40f1708](kulshekhar/ts-jest@40f1708))
-   refactor: use `TsJestTransformerOptions` type everywhere possibly ([7d001be](kulshekhar/ts-jest@7d001be))
-   refactor(cli): use new preset util functions to initialize test config ([c2b56ca](kulshekhar/ts-jest@c2b56ca))
-   refactor(presets): use create preset util functions for cjs presets ([922d6d0](kulshekhar/ts-jest@922d6d0))
-   test: switch `react-app` to use Vite ([827c8ad](kulshekhar/ts-jest@827c8ad))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzEuNCIsInVwZGF0ZWRJblZlciI6IjM3LjQzMS40IiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6WyJ0eXBlL2RlcGVuZGVuY2llcyJdfQ==-->

Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/336
Reviewed-by: Vylpes <ethan@vylpes.com>
Co-authored-by: Renovate Bot <renovate@vylpes.com>
Co-committed-by: Renovate Bot <renovate@vylpes.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Confirmed Bug is confirmed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants