[Bug]: allow require(esm)
Version
29.7.0
Steps to reproduce
Have a Jest unit test use require() on a dependency with an "exports" field giving ESM
Expected behavior
When running Node.js 20.19, require(esm) should work.
https://nodejs.org/en/blog/release/v20.19.0
Actual behavior
https://github.com/jestjs/jest/blob/ac334c0cdf04ead9999f0964567d81672d116d42/packages/jest-runtime/src/index.ts#L960-L969
Additional context
It'd be great to get a patch release of 29.7.1 that uses the more relaxed behavior of node 20.x. Node.js 18 has been EOL since April 30.
Environment
All of them
See https://github.com/jestjs/jest/issues/15275
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.
Duplicate of #15275
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.