github software-mansion/react-native-reanimated worklets-0.14.0
Worklets - 0.14.0

latest release: 4.8.0
3 hours ago

Key changes

  • Networking: WebSocket is now available on Worklet Runtimes.
  • Runtime lifecycle: Worker Runtimes can be stopped with abortWorkletRuntime and the new abortable runtime option.
  • Cross-runtime execution: runOnRNSync can synchronously call the React Native Runtime, including from UI and Worker Runtimes in Bundle Mode; development builds can also attach cross-runtime stack traces.
  • Serialization: New typed createSerializable variants and explicit serializable-mapping APIs provide tighter control over values shared between runtimes.
  • Bundle Mode: Added lazy Metro chunk imports, Metro 0.87 patches, safer import forwarding, and improved development-bundle handling.
  • Runtime correctness and performance: Frames are requested on demand, synchronous-call microtasks drain at the outermost boundary, and runtime identity fixes prevent stale-runtime crashes and use-after-free errors.
  • Compatibility: Worklets 0.14 supports React Native 0.87–0.89 and pairs with Reanimated 4.8.x.

Changelog

🎉 New features

  • Warn when an importForwarding.relativePaths entry has only common folder names such as src, and add the silenceDangerousPathsWarning plugin option to turn the warning off. (#11415 by @tjzel)
  • Add WebSocket on Worklet Runtimes. (#11157 by @tjzel)
  • Add abortWorkletRuntime and the abortable runtime option to stop a Worker Runtime, dropping its pending work and rejecting the matching promises. (#11063 by @tshmieldev)
  • Add cross-runtime stack traces in development builds, when ENABLE_CROSS_RUNTIME_STACK_TRACES is enabled, to errors thrown by functions run with scheduleOnRN and runOnRNSync. (#10798 by @tshmieldev)
  • Add typed createSerializable variants, for example createSerializableArray and createSerializableMap, that accept only one type of value. (#10770 by @tshmieldev)
  • Add runOnRNSync to run a function synchronously on the RN Runtime, including from UI and Worker Runtimes when Bundle Mode is enabled. (#10767 by @tshmieldev)
  • Add setSerializableMapping, getSerializableMapping, hasSerializableMapping and removeSerializableMapping to control the value that other runtimes receive in place of an object, and deprecate serializableMappingCache. (#10758 by @tshmieldev)
  • Support import() of lazy Metro chunks on Worklet Runtimes in Bundle Mode. (#10711 by @tjzel)
  • Add the Bundle Mode patches for metro and metro-runtime 0.87.0. (#10455 by @jslok)
  • Read the iOS dev bundle in Bundle Mode from the file that React Native 0.88 and newer persists, instead of downloading it again. (#10181 by @tjzel)

🐛 Bug fixes

  • Run the remaining frame finalizers in the next frame when one of them throws. (#11431 by @tjzel)
  • Report an error thrown by a microtask at the checkpoint of a scheduled worklet the same way as an error thrown by the worklet, instead of crashing the app in debug builds. (#11421 by @tjzel)
  • Run the microtasks queued by a synchronous call into a Worklet Runtime (runOnUISync, runOnRuntimeSync, and the calls Reanimated makes for events) when the outermost call into that runtime returns, instead of leaving them for a later task. (#11410 by @tjzel)
  • Make importForwarding.moduleNames match only exact module names, so my-library no longer forwards imports from my-library/utils unless that subpath is also in the list. (#11402 by @tjzel)
  • Fix the UI runtime frame loop running on every vsync on Android when React starts without an Activity and no headless JS task is active. (#11400 by @tjzel)
  • Fix the iOS, tvOS and macOS builds failing on Xcode 27 because of the deployment target of the privacy manifest bundle. (#11374 by @tjzel)
  • Request UI Runtime animation frames only when callbacks or finalizers are pending instead of on every frame. (#11372 by @tjzel)
  • Autoworkletize the inline withCallback, custom and progressAnimation functions of SharedTransition builder chains, and layout animation callbacks after reduceMotion, dampingRatio or withTargetValues, in the Babel and Oxc plugins. (#11283 by @pawicao)
  • Stop the Android dev bundle download in Bundle Mode from blocking forever when the development server stops sending data. (#11167 by @tjzel)
  • Fix performance.now() on Worklet Runtimes on iOS to use the same clock as the React Native Runtime. (#11156 by @tjzel)
  • Fix a Shareable treating a new Worker Runtime as its host when the new runtime reuses the memory address of the destroyed host runtime. (#11140 by @tjzel)
  • Autoworkletize worklet callbacks of runOnRuntimeAsyncWithId, createWorkletRuntime, createShareable, registerCustomSerializable, the withTiming easing option and useHandler in the Babel and Oxc plugins. (#11083 by @tjzel)
  • Fix crashes and use-after-free errors when a Worklet Runtime is created at the memory address of a destroyed one: Worklets now identify runtimes by their React Native instance and runtime id instead of their address, so values cached for a destroyed runtime, Remote Functions hosted on it and Networking callbacks are never read or released through another runtime. (#11073 by @tjzel)
  • Rebase relative require() calls inside worklet bodies in Bundle Mode also in files that are not in importForwarding.relativePaths. (#10935 by @tjzel)
  • Fix a worklet that assigns to a captured variable failing with invalid assignment left-hand side on Hermes when Bundle Mode is disabled. (#10889 by @tshmieldev)
  • Bundle Mode works with Metro inlineRequires disabled, and getBundleModeMetroConfig no longer forces it. (#10862 by @tjzel)
  • Keep the library prefix in the names the Oxc plugin gives worklets under node_modules when the path uses Windows separators. (#10856 by @YevheniiKotyrlo)
  • Fix a memory leak in which a worklet and a JS function it calls kept each other alive, with everything they captured, when the closure of the function reached the worklet (for example a runOnJS callback in a scroll or gesture handler). (#10854 by @knappam)
  • Fix the Jest resolver resolving web implementations for every module of packages that peer-depend on Worklets, such as Reanimated, when installed with pnpm. (#10821 by @ryanlntn)
  • Fix a crash in release builds when the initializer passed to createWorkletRuntime throws. (#10774 by @tshmieldev)
  • Fix RegExp, Error and typed array Serializables being serialized again when passed to createSerializable. (#10771 by @tshmieldev)
  • Stop a Worklets XMLHttpRequest that was aborted or reopened after send to a non-HTTP URL from later firing a stale error and failing the next request. (#10731 by @ahmdshrif)
  • Point the Worklets plugin option docs links to the renamed worklets-plugin docs pages. (#10709 by @tshmieldev)
  • Fall back to a timer in web scheduleOnUI and runOnUIAsync when requestAnimationFrame is unavailable, such as during server-side rendering in Node.js. (#10667 by @robhogan)
  • Initialize __DEV__ in JavaScript and remove the native development flag plumbing. (#10632 by @tshmieldev)
  • Accept Groovy GString values for ndkVersion and ndkPath from the root Gradle project instead of ignoring them. (#10544 by @piaskowyk)
  • Stop the Babel plugin reading every worklet's sources off disk to fill sourcesContent, a field it deletes again before returning the map, so a source that is not on disk no longer aborts the whole transform. (#10510 by @YevheniiKotyrlo)

💡 Others

  • Remove the __flushAnimationFrame compatibility entry that Reanimated 4.3 used. (#11419 by @tjzel)
  • Document that importForwarding.relativePaths also matches folders inside packages in node_modules. (#11403 by @tjzel)
  • Added support for React Native 0.89 and dropped support for React Native 0.86. (#11298 by @pawicao)
  • Add a privacy manifest that declares the system boot time API for the clock of performance.now() on Apple. (#11206 by @tjzel)
  • Check in Debug builds that the runtime ids which JS passes to native Worklets methods are valid integers. (#11170 by @tjzel)
  • Replaced the test-only getAliveRuntimeCount() binding with isRuntimeAlive(runtimeId), which checks if one Worklet Runtime is destroyed. (#11163 by @tjzel)
  • Fix the bundleMode documentation link in the Babel plugin option types. (#11155 by @tjzel)
  • Fold the duplicated Debug and Release versions of the native runOnUISync and runOnRuntimeSync helpers. (#11119 by @tshmieldev)
  • Mark AsyncQueueImpl as final. (#11118 by @tshmieldev)
  • Only the outermost task on a Worklet Runtime decides whether to drain microtasks, so a task nested inside a running worklet no longer drains the microtask queue in the middle of the calling JS. (#11103 by @tshmieldev)
  • Add runtime-test-only bindings that keep Serializables alive across a React Native reload. (#11085 by @tjzel)
  • Renamed the RuntimeManager registration step to onRuntimeReady and asserted that it runs after onRuntimeCreated. (#11077 by @tjzel)
  • Merged the two SerializableRemoteFunction constructors into one that asserts a JSScheduler is given only for Remote Functions hosted on the RN Runtime. (#11075 by @tjzel)
  • Removed WorkletRuntimeRegistry, WorkletRuntimeCollector and the __workletRuntimeCollector global, which RuntimeIdentity replaced. (#11074 by @tjzel)
  • Added a RuntimeIdentity that identifies every runtime by its owner and runtime id, and tracked alive Worklet Runtimes in RuntimeManager, without any reader yet. (#11072 by @tjzel)
  • Let ccache share the Android C++ compile results that use the precompiled header between checkouts at different paths. (#11047 by @bartlomiejbloniarz)
  • Fixed a typo in the unpack JSDoc of registerCustomSerializable. (#10990 by @tjzel)
  • Pointed the runOnRNSync documentation link to the unreleased docs until the page is released. (#10970 by @tjzel)
  • Bump the React Native dev dependencies to 0.88.0. (#10952 by @pawicao)
  • Configure the Android library with LibraryExtension instead of the deprecated android {} Gradle DSL. (#10865 by @tjzel)
  • Fail the example app build on use of deprecated APIs in native code. (#10864 by @tjzel)
  • Bump the dev dependency on React Native to 0.88.0-rc.4. (#10846 by @pawicao)
  • Write Oxc instead of OXC in the Oxc plugin messages and docs. (#10766 by @tshmieldev)
  • Bump the dev dependency on React Native to 0.88.0-rc.3. (#10738 by @pawicao)
  • Bump the dev dependency on React Native to 0.88.0-rc.2 and add Bundle Mode patches for Metro 0.87.1. (#10650 by @pawicao)
  • Replace ESLint with oxlint for JavaScript and TypeScript linting. (#10584 by @tshmieldev)

Full comparison: worklets-0.13.1...worklets-0.14.0

Don't miss a new react-native-reanimated release

NewReleases is sending notifications on new releases.