[Bug]: transform esm module in jest-runtime
Version
29.7.0
Steps to reproduce
- clone https://github.com/kim-jaedeok/jest-runtime-report
- run the test according to the readme.
Expected behavior
auto-bind is transpiled as a cjs module.
Actual behavior
I know that jest does not support esm module, so if i use esm module, i need to transpile esm module to cjs module via transform. but i have two problems.
- if
type:"module"is declared in the package.json of an npm package imported from node_modules, an esm module import error occurs before the transform runs. - esmodule is not converted to cjs module after transform is executed, even if
type:"module"is not declared.
Additional context
No response
Environment
System:
OS: macOS 14.2
CPU: (8) arm64 Apple M2
Binaries:
Node: 20.9.0 - ~/.nvm/versions/node/v20.9.0/bin/node
npm: 10.1.0 - ~/.nvm/versions/node/v20.9.0/bin/npm
pnpm: 9.1.1 - ~/.nvm/versions/node/v20.9.0/bin/pnpm
npmPackages:
jest: ^29.7.0 => 29.7.0
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
Can you set up a reproduction without ts-jest? That's not maintained in this repo
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.