Version
30.4.0
Steps to reproduce
- Have a project with "type": "module" and --experimental-vm-modules
- Depend (directly or transitively) on any package whose ESM build imports from tslib — e.g. @peculiar/asn1-schema, whose import export condition resolves to an ES2015 build containing import { __decorate } from "tslib"
- Run jest
The failure chain:
- Jest resolves import { __decorate } from "tslib" via the import.node export condition → tslib/modules/index.js
- modules/index.js does import tslib from '../tslib.js' (a default import of the CJS file)
- Jest 30.4.0 sees exports.__esModule === true on tslib.js and sets defaultExport = exports.default → undefined
- const { __extends, ... } = tslib throws TypeError
Expected behavior
Tests pass, as they did with Jest 30.2.0.
Actual behavior
TypeError: Cannot destructure property '__extends' of 'tslib' as it is undefined.
at node_modules/tslib/modules/index.js:3:5
Additional context
No response
Environment
System:
OS: Linux 7.0 Arch Linux
CPU: (16) x64 AMD Ryzen 7 7840U w/ Radeon 780M Graphics
Binaries:
Node: 25.9.0 - /usr/bin/node
Yarn: 1.22.22 - /usr/bin/yarn
npm: 11.13.0 - /usr/bin/npm
Version
30.4.0
Steps to reproduce
The failure chain:
Expected behavior
Tests pass, as they did with Jest 30.2.0.
Actual behavior
Additional context
No response
Environment
System: OS: Linux 7.0 Arch Linux CPU: (16) x64 AMD Ryzen 7 7840U w/ Radeon 780M Graphics Binaries: Node: 25.9.0 - /usr/bin/node Yarn: 1.22.22 - /usr/bin/yarn npm: 11.13.0 - /usr/bin/npm