The Wire · Showcase
JEST TEARS DOWN WORKER FARMS BEFORE THEY LEAK, REACT NATIVE COMPILES PLATFORM CHECKS FASTER
By RepoJournal · Filed · About Meta
Jest shipped three critical fixes to worker lifecycle management and snapshot handling that prevent resource leaks and test corruption.
SimenB landed a cluster of fixes across jest-haste-map that plug holes in how Jest manages its worker farm [1]. The build now properly ends the worker pool even when `processFile` throws synchronously, not just when workers reject. That's paired with a second fix that attaches watchman's error listener before use [2], preventing daemon startup failures from escaping unhandled. A third fix restores error handlers on the correct process object in jest-circus and jest-jasmine2 [3], where the ambient `process` in the VM sandbox was getting snapshotted instead of the actual parent process. On the React Native side, Rob Hogan merged a Babel plugin that inlines `Platform.OS` and `Platform.select(...)` at the front of RN's preset [4], running before ES modules lower to CommonJS so the optimizer can strip dead branches earlier in the pipeline. Evan Katz added object support to `fontVariationSettings` [5], letting developers pass OpenType axis tags as an object instead of just CSS strings. Jest also refreshed all lock files [6] via Renovate. Simon Bekkhus also fixed snapshot comparison logic [7] so hinted snapshots stay attached to their own test instead of getting reported obsolete and deleted on the next update.
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 Jest to pick up worker farm fixes before your next test run facebook/jest [plan]
- → Update React Native to gain faster Platform inlining in builds facebook/react-native [monitor]
References
- [1] fix(jest-haste-map): end the worker farm when the build aborts synchronously ↗ facebook/jest
- [2] fix(jest-haste-map): attach the watchman client's error listener before use ↗ facebook/jest
- [3] [jest-circus, jest-jasmine2] Fix error-handler restore, `--expand` for assert diffs, and generator test context ↗ facebook/jest
- [4] Inline `Platform` within RN’s Babel preset (#57848) facebook/react-native
- [5] Accept object font variation settings (#57929) facebook/react-native
- [6] chore(deps): lock file maintenance ↗ facebook/jest
- [7] fix: Keep hinted snapshots with their own test ↗ facebook/jest