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

latest release: 4.4.0
5 hours ago

Key changes

Support for cross-runtime Promises

Now functions that return a promise like runOnRuntimeAsync can be used on all runtimes in Bundle Mode, not only the RN Runtime.
The code responsible for memory-management of JavaScript callbacks in C++ was overhauled to support this, which should reduce
the memory imprint and stability of long-held callbacks in brownfield app.

  • feat(Worklets): cross-runtime promise handling in Bundle Mode by @tjzel in #9451
  • refactor(Worklets): remoteFunction memory model by @tjzel in #9272

Uniform Shareable hosting

Shareables can now be hosted on any runtime, not only the UI Runtime.

DX improvements

  • Passing a local function to scheduleOnRN no longer crashes the app in C++ but throws an actionable error in JavaScript.

    • feat(Worklets): actionable error when passing local function to scheduleOnRN by @tjzel in #9386
  • We append an asynchronous stacktrace to error thrown in Worklets for easier debugging.
    This is an opt-out feature that can be disabled with ENABLE_CROSS_RUNTIME_STACK_TRACES static feature flag.

  • Console implementation in Bundle Mode now prints objects exactly the same way on Worklet Runtimes as on the RN Runtime.

Other changes

  • feat(Worklets): Serializable regexp by @tshmieldev in #9494
  • feat(Worklets): respect relative requires in worklets by @tjzel in #9486
  • feat(Worklets): simplified Bundle Mode setup vol2 by @tjzel in #9465
  • feat(Worklets): add native ArrayBuffer serialization support and explicitly deprecate _createSerializable by @tjzel in #9464
  • feat(Worklets): native Error serialization by @tjzel in #9452
  • feat(Worklets): use __RUNTIME_NAME for better error messages by @tjzel in #9410
  • migrated worklets from java to kotlin by @tshmieldev in #9130
  • fix(Worklets): misplaced else when cloning remote function by @tjzel in #9141
  • fix(Worklets): wrong config object in .podspec by @tjzel in #9169
  • chore(Worklets): improve async scheduling API error messages by @tjzel in #9183
  • fix: Worklets x Reanimated compatibility CI by @tjzel in #9188
  • refactor(Worklets): load unpackers with JSI by @tjzel in #8984
  • refactor(Worklets): two-step initialization by @tjzel in #9203
  • Replaced WorkletsError and ReanimatedError with lint rule by @tshmieldev in #9243
  • fix(Worklets): duplicate definitions to call microtasks by @tjzel in #9245
  • Refactored JSIWorkletsModuleProxy to not inherit from HostObject by @tshmieldev in #9252
  • [fix]ed installUnpackers being called in bundleMode by @tshmieldev in #9283
  • CallGuard in cpp, added support for worklet batching by @tshmieldev in #9313
  • Added tests for bundle mode in babel plugin by @tshmieldev in #9318
  • fix(Worklets): shareable deadlock by @tjzel in #9321
  • chore(Worklets): removed stackDetails from bundleMode by @tshmieldev in #9331
  • chore(Worklets): remove duplicate RNRuntime decoration by @tjzel in #9332
  • chore(Worklets) Changed scheduleOnUI to schedule in helper by @tshmieldev in #9376
  • chore(Worklets): documented stack trace flag by @tshmieldev in #9378
  • chore(Worklets): various cleanups by @tjzel in #9387
  • chore(Worklets): update deprecated API snippets by @tjzel in #9392
  • Worklets: fixed memleak in shareable and serializable by @tshmieldev in #9393
  • chore(Worklets): renamed cleanupIfRuntimeExists by @tshmieldev in #9426
  • chore(Worklets): cleaned up ts createWorkletRuntime interface by @tshmieldev in #9427
  • fix(Worklets): remove unused hermes/hermes.h include in UnpackerLoader.h by @tomekzaw in #9448
  • chore(Worklets): serialization code nits by @tjzel in #9453
  • fix(Worklets): repair NDEBUG-only build error in SerializableRemoteFunction by @tomekzaw in #9456
  • chore(Worklets): add recent expo issues to troubleshooting page by @tshmieldev in #9460
  • refactor(Worklets): add hostRuntimeId to JSIWorkletsModuleProxy by @tjzel in #9461
  • chore(Worklets): throw when serializing promises by @tjzel in #9468
  • Symbol serializable hotfix by @tshmieldev in #9476
  • fix(Worklets): unused lambda capture in release Android build by @tomekzaw in #9480
  • chore(Worklets): remove unnecessary CI-s by @tshmieldev in #9484
  • fix(Worklets): eager imports issue by @tjzel in #9488

New Contributors

Full Changelog: worklets-0.8.3...worklets-0.9.1

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

NewReleases is sending notifications on new releases.