The Wire · Showcase
JEST RUNTIME OVERHEAD SLAIN AS RN SHORES UP API BORDERS
By RepoJournal · Filed · About Meta
Jest just deleted a pile of hidden per-require work, and React Native is locking down its private components with strict API guards.
Jest is shipping a performance win that every test suite will feel: jest-runtime cut six pieces of discarded work from every require and ESM specifier, and the release notes say the mock-decision path "can skip module-ID resolution when no mock can apply" [1]. The same PR streamlines how module IDs are derived only when callers actually need them, which should shave real milliseconds off large suites [2]. Meanwhile, a separate fix stops jest-core from reporting CustomGC as an open handle, killing a false-positive that forced Nx and swc users to chase phantom leaks; the report notes the handle "is inert by design" [3], and the same fix landed in a follow-up under a different author to say the same [4]. Over in React Native, the team is methodically wrapping its C++ internals: strict API guards now cover `react/renderer/components/*` private targets like inputaccessory and legacyviewmanagerinterop [5], public umbrella headers landed for modal, root, and scrollview components [6], and `jsinspector-modern/network` got Stable API guards across four headers [7]. The user-facing win is smaller but real: SampleTurboModuleExample UI now matches NativeCxxModuleExampleExample, so you can compare TurboModule and C++ TurboModule behavior side by side without squinting at drifted screens [8]. Finally, UnimplementedView gets a DEBUG guard on iOS and production error logging, meaning release builds stop showing the red overlay that Android already suppressed [9].
One email a day. Unsubscribe in one click.
Keep up with Meta in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Upgrade to the Jest runtime fix and rerun your big suites to see real time savings facebook/jest [immediate]
- → Update react-native if you depend on jsinspector-modern/network or renderer components, then verify your builds pass with the new strict guards facebook/react-native [plan]
- → If you see CustomGC in --detectOpenHandles, patch jest-core so the false positive disappears facebook/jest [plan]
- → For RN testers, pull the SampleTurboModuleExample alignment to compare module behaviors cleanly facebook/react-native [monitor]
References
- [1] perf(jest-runtime): cut per-require and per-specifier overhead ↗ facebook/jest
- [2] perf(jest-runtime): cut per-require and per-specifier overhead (#16376) facebook/jest
- [3] fix(jest-core): do not report CustomGC as an open handle ↗ facebook/jest
- [4] fix(jest-core): do not report CustomGC as an open handle (#16379) facebook/jest
- [5] Add strict API support for `react/renderer/components/*` private targets (#58009) facebook/react-native
- [6] Add umbrella for public components in `react/renderer/components/*` subtree. (#57312) facebook/react-native
- [7] Cover `jsinspector-modern/network:jsinspector_network` with Stable API guards (#57962) facebook/react-native
- [8] Align SampleTurboModuleExample UI with NativeCxxModuleExampleExample (#57985) facebook/react-native
- [9] Add DEBUG guard and production error logging to UnimplementedView (#57980) facebook/react-native