The Wire · Showcase
JEST FINALLY SHIPS REQUIRE(ESM) — REACT NATIVE TIGHTENS ANDROID PLUMBING
By RepoJournal · Filed · About Meta
Jest landed the feature engineers have asked for since ESM landed: you can now require() ES modules directly, no more dual-build nightmares.
The Jest team shipped `require(esm)` support [1] after re-implementing ESM on top of Node's `linkRequests` APIs [2], unblocking the hybrid CommonJS/ESM workflows that have plagued monorepos for years. They also fixed a critical cross-realm constructor bug in `toStrictEqual` [3] that broke equality checks on every built-in type when using `structuredClone`, and bumped Babel to 8.0.0-rc.4 [4] to keep the test runner aligned with the next-gen transpiler. On the React Native front, the Android team consolidated image prefetch flags [5] into a single control, removing deprecated `enableImagePrefetchingJNIBatchingAndroid` and `enableImagePrefetchingOnUiThreadAndroid` — batching and UI thread dispatch now default to on. They also fixed ThreadSanitizer data races in the inspector layer [6] that caught the JS and main threads reading unsynchronized state, and are testing a memory-efficient view registry swap [7] using `MutableIntObjectMap` instead of `ConcurrentHashMap` to eliminate boxing overhead on Android. Event dispatch correctness landed too [8], ensuring the new EventTarget-based dispatcher honors the legacy `skipBubbling` flag.
Action items
- → Test Jest with `require(esm)` in your monorepo — this unblocks hybrid workflows you've likely worked around facebook/jest [plan]
- → Review React Native image prefetch consolidation if you're using `enableImagePrefetchingAndroid` — behavior is now defaulted-on facebook/react-native [monitor]
- → Update to latest Jest for the `toStrictEqual` cross-realm fix if your tests use `structuredClone` with built-in types facebook/jest [plan]
References
- [1] feat: support `require(esm)` ↗ facebook/jest
- [2] chore: re-implement ESM support ↗ facebook/jest
- [3] fix(expect-utils): handle cross-realm constructors in toStrictEqual ↗ facebook/jest
- [4] chore(deps): update babel monorepo to v8.0.0-rc.4 ↗ facebook/jest
- [5] Consolidate image prefetch flags into enableImagePrefetchingAndroid (#56610) facebook/react-native
- [6] Fix TSAN data races in InspectorFlags and InspectorPackagerConnection (#56534) facebook/react-native
- [7] Use MutableIntObjectMap for SurfaceMountingManager view registry (#56646) facebook/react-native
- [8] Honor skipBubbling in the new EventTarget-based event dispatch (#56666) facebook/react-native
FAQ
- What changed in Meta on May 2, 2026?
- Jest landed the feature engineers have asked for since ESM landed: you can now require() ES modules directly, no more dual-build nightmares.
- What should Meta teams do about it?
- Test Jest with `require(esm)` in your monorepo — this unblocks hybrid workflows you've likely worked around • Review React Native image prefetch consolidation if you're using `enableImagePrefetchingAndroid` — behavior is now defaulted-on • Update to latest Jest for the `toStrictEqual` cross-realm fix if your tests use `structuredClone` with built-in types
- Which Meta repositories shipped on May 2, 2026?
- facebook/jest, facebook/react-native