Skip to content

Bump react-native-worklets to 0.10.x#763

Merged
tomekzaw merged 0 commit into
mainfrom
@tomekzaw/bump-worklets-0.10
Jul 3, 2026
Merged

Bump react-native-worklets to 0.10.x#763
tomekzaw merged 0 commit into
mainfrom
@tomekzaw/bump-worklets-0.10

Conversation

@tomekzaw

@tomekzaw tomekzaw commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Details

Bumps react-native-worklets to 0.10.1 and adds compatibility with the 0.10.x line.

Worklets 0.10 no longer silently substitutes an inaccessible placeholder for non-plain objects it can't serialize — it throws Cannot copy value of type `Logger` instead. The built-in parseExpensiMark parser's worklet closure transitively captures the Log singleton from expensify-common (a Logger class instance), so registering the parser crashes the moment a <MarkdownTextInput> mounts.

The logger is never invoked on the worklet runtime, so we register a custom serializer (registerCustomSerializable) that replaces any Logger with a no-op stand-in on the worklet side.

Related Issues

N/A

Manual Tests

  • Ran the example app on the iOS simulator: without the fix it renders the Cannot copy value of type `Logger` red screen on mount; with the fix the editor renders and live Markdown formatting works (typed *live* → bold).

Linked PRs

N/A

🤖 Generated with Claude Code

@tomekzaw tomekzaw removed their assignment Jul 3, 2026
@tomekzaw

tomekzaw commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator Author

Here's the error that shows up if we only bump react-native-worklets to 0.10.x:

Android iOS

@tomekzaw tomekzaw closed this Jul 3, 2026
@tomekzaw tomekzaw force-pushed the @tomekzaw/bump-worklets-0.10 branch from 376a321 to e4bb29a Compare July 3, 2026 08:28
@tomekzaw tomekzaw reopened this Jul 3, 2026
@tomekzaw tomekzaw requested review from Copilot and j-piasecki July 3, 2026 09:01

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 upgrades the project to react-native-worklets@0.10.1 and adds a compatibility workaround for the new 0.10.x serialization behavior that throws on non-plain objects captured by worklet closures (notably expensify-common’s Log / Logger).

Changes:

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

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/MarkdownTextInput.tsx Registers a custom worklets serializer to avoid crashes when a Logger instance is captured by the parser worklet closure.
README.md Updates the worklets compatibility table to include 0.10.x.
package.json Bumps react-native-worklets dependency to 0.10.1.
package-lock.json Updates lockfile for react-native-worklets@0.10.1 and its dependency graph.
example/package.json Bumps example app’s react-native-worklets dependency to 0.10.1.
example/ios/Podfile.lock Updates CocoaPods lockfile to RNWorklets 0.10.1.

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

Comment thread src/MarkdownTextInput.tsx Outdated
Comment on lines +32 to +36
determine: (value): value is NoopLogger => {
'worklet';

return value !== null && typeof value === 'object' && (value as {constructor?: {name?: string}}).constructor?.name === 'Logger';
},
@tomekzaw tomekzaw closed this Jul 3, 2026
@tomekzaw tomekzaw force-pushed the @tomekzaw/bump-worklets-0.10 branch from bdceef1 to 22835b2 Compare July 3, 2026 10:16
@tomekzaw tomekzaw merged commit 22835b2 into main Jul 3, 2026
3 checks passed
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.

3 participants