Skip to content

Bump react-native-worklets to 0.10.2#765

Open
tomekzaw wants to merge 5 commits into
mainfrom
@tomekzaw/worklets-0.10-compat
Open

Bump react-native-worklets to 0.10.2#765
tomekzaw wants to merge 5 commits into
mainfrom
@tomekzaw/worklets-0.10-compat

Conversation

@tomekzaw

@tomekzaw tomekzaw commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Details

Bumps react-native-worklets to 0.10.2 and adds compatibility with the 0.10.2+ line.

Related Issues

N/A

Manual Tests

N/A

Linked PRs

N/A

tomekzaw and others added 3 commits July 3, 2026 12:16
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the repository to use react-native-worklets 0.10.1 and adds a compatibility shim to prevent parser worklets from failing serialization when they capture expensify-common’s Log (a Logger instance), which now throws in Worklets 0.10 instead of silently substituting placeholders.

Changes:

  • Bump react-native-worklets from 0.9.1 → 0.10.1 (including example + lockfiles).
  • Register a custom serializer to replace Logger instances with a no-op stand-in on the worklet runtime.
  • Update README compatibility matrix to include Worklets 0.10.x.

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/MarkdownTextInput.tsx Registers a custom serialization rule so Logger captured in the parser closure won’t crash Worklets 0.10 serialization.
README.md Extends the Worklets compatibility table to include 0.10.x.
package.json Bumps dev dependency react-native-worklets to 0.10.1.
package-lock.json Updates lockfile entries for react-native-worklets 0.10.1 (and transitive deps).
example/package.json Bumps example app’s react-native-worklets to 0.10.1.
example/ios/Podfile.lock Updates CocoaPods lockfile for RNWorklets 0.10.1.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment on lines +216 to +218
| 0.1.333+ | ❌ | ✅ | ✅ | ✅ | ✅ |
| 0.1.321 – 0.1.332 | ❌ | ✅ | ✅ | ✅ | ❌ |
| 0.1.308 – 0.1.320 | ✅ | ❌ | ❌ | ❌ | ❌ |
Comment thread src/MarkdownTextInput.tsx
Comment on lines 22 to +33
let initialized = false;
let workletRuntime: WorkletRuntime | undefined;

// The worklet closure of the built-in `parseExpensiMark` parser captures the `Log` singleton from
// `expensify-common`, and serializing the parser worklet fails because `react-native-worklets` 0.10
// can't copy `Logger` class instances. The logger is unused on the worklet runtime, so serialize it as a no-op.
// `registerCustomSerializable` has been available since react-native-worklets 0.7.0, so this stays
// compatible with every supported version (on 0.9.x and older it's a harmless no-op — they don't throw).
function registerLoggerSerializableOnceIfNeeded() {
type NoopLogger = Record<string, (...args: unknown[]) => void>;
registerCustomSerializable<NoopLogger, Record<string, never>>({
name: 'react-native-live-markdown/Logger',
@tomekzaw tomekzaw changed the title Bump react-native-worklets to 0.10.x Bump react-native-worklets to 0.10.2 Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants