$ the-wire · showcase
React unobserve fix, Jest ESM subpath bug, RN stable API guards
By RepoJournal · Filed · About Meta
React stops leaking detached IntersectionObserver targets, Jest's 30.5.0 ESM subpath bug gets a fix, and React Native tightens its stable API visibility.
React's DOM fix changes how fragment IntersectionObserver and ResizeObserver targets are cleaned up: targets used to stay observed after a child was removed so the exit record could fire, but that left the observer holding detached nodes; now ResizeObserver targets are unobserved immediately, and IntersectionObserver unobserve is delayed until after paint so the exit still lands [1]. If the same node is reinserted before that flush, the pending unobserve is canceled, preventing a later cleanup from detaching a still-attached child [2]. Once the exit record fires, the strong ref is dropped, so observers no longer pin detached nodes [1]. In Jest, 30.5.0 broke all ESM resolves of subpaths in the `imports` field: every subpath starts with `#`, and `splitQueryAndFragment` in `packages/jest-runtime/src/internals/EsmLoader.ts` treats the first `#` as a fragment delimiter, so `import { value } from '#dep'` fails with 'The requested module `#dep` does not provide an export named `value`'; the fix stops treating a leading `#` as a fragment delimiter so subpath imports resolve correctly [3][4]. Jest also refined its config warnings: the change only warns about global-only options where they are actually ignored, fixing cases where a project directory without its own config resolved to the root config and the comparison misfired [5][6]. React Native added an AI code review bot via `@expo/code-review-cli`, which leaves a single comment on PRs with findings from three reviewers (correctness, security, consistency) and never blocks merging or auto-approves [7]; separately, `devtoolsruntimesettings` and `jsc:JSCRuntime` are now classified under the C++ stable API three-tier visibility model, with consumers that opt into `RN_STRICT_API` getting a suppressible warning if they include `JSCRuntime.h` directly [8][9].
Action items
- → Upgrade Jest to the fix for ESM subpath imports if you use `#dep` module imports facebook/jest [immediate]
- → Monitor React's unobserve behavior change for any fragment components with removed children facebook/react [plan]
- → Review React Native's new AI code review bot config in `.expo-code-review/` facebook/react-native [monitor]
References
- [1] [DOM] Unobserve fragment IntersectionObserver targets after exit ↗ facebook/react
- [2] [DOM] Unobserve fragment IntersectionObserver targets after exit (#37408) ↗ facebook/react
- [3] fix(jest-runtime): do not treat a leading `#` as a fragment delimiter ↗ facebook/jest
- [4] fix(jest-runtime): do not treat a leading `#` as a fragment delimiter (#16413) ↗ facebook/jest
- [5] fix(jest-config): only warn about global-only options where they're actually ignored ↗ facebook/jest
- [6] fix(jest-config): only warn about global-only options where they're actually ignored (#16411) ↗ facebook/jest
- [7] Add @expo/code-review-cli (#58021) ↗ facebook/react-native
- [8] Cover `devtoolsruntimesettings` with Stable API guards (#58131) ↗ facebook/react-native
- [9] Cover `jsc:JSCRuntime` with Stable API guards (#58023) ↗ facebook/react-native