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.
- Added shareable support outside UI runtime by @tshmieldev in #9391
DX improvements
-
Passing a local function to
scheduleOnRNno longer crashes the app in C++ but throws an actionable error in JavaScript. -
We append an asynchronous stacktrace to error thrown in Worklets for easier debugging.
This is an opt-out feature that can be disabled withENABLE_CROSS_RUNTIME_STACK_TRACESstatic feature flag.- Add RN runtime error traces to errors from UI runtime by @tshmieldev in #9280
-
Console implementation in Bundle Mode now prints objects exactly the same way on Worklet Runtimes as on the RN Runtime.
- Added native logging behavior to worklets runtime by @tshmieldev in #9201
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
_createSerializableby @tjzel in #9464 - feat(Worklets): native Error serialization by @tjzel in #9452
- feat(Worklets): use
__RUNTIME_NAMEfor 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.hinclude inUnpackerLoader.hby @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
- @tshmieldev made their first contribution in #9130
- @avibega23 made their first contribution in #9153
- @mobinni made their first contribution in #9052
- @pkfms made their first contribution in #9154
- @GrzywN made their first contribution in #9175
- @PiotrWszolek made their first contribution in #8848
- @pranko17 made their first contribution in #8782
- @edkimmel made their first contribution in #7494
- @ashfurrow made their first contribution in #9162
- @elliottkember made their first contribution in #9466
Full Changelog: worklets-0.8.3...worklets-0.9.1