chore: migrate design system to reanimated 4#1216
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning MetaMask internal reviewing guidelines:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Worklets import missing peer
- Added react-native-worklets as a peerDependency and raised react-native-reanimated peer to �>=4.0.0 to align with component usage.
Or push these changes by commenting:
@cursor push c3f8f7716f
Preview (c3f8f7716f)
diff --git a/packages/design-system-react-native/package.json b/packages/design-system-react-native/package.json
--- a/packages/design-system-react-native/package.json
+++ b/packages/design-system-react-native/package.json
@@ -96,8 +96,9 @@
"react": ">=18.2.0",
"react-native": ">=0.76.0",
"react-native-gesture-handler": ">=2.25.0",
- "react-native-reanimated": ">=3.17.0",
- "react-native-safe-area-context": ">=5.0.0"
+ "react-native-reanimated": ">=4.0.0",
+ "react-native-safe-area-context": ">=5.0.0",
+ "react-native-worklets": ">=0.8.3"
},
"engines": {
"node": ">=20"You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 98bb0dd. Configure here.
📖 Storybook Preview |
📖 Storybook Preview |
📖 Storybook Preview |
📖 Storybook Preview |
📖 Storybook Preview |
📖 Storybook Preview |
ed2add8 to
bd3697c
Compare
📖 Storybook Preview |
📖 Storybook Preview |
📖 Storybook Preview |
📖 Storybook Preview |
…adFileSync paths The worklets Babel plugin reads source file content to embed in source maps. Vite appends `?v=xxx` cache-busters to file paths, causing `fs.readFileSync` to throw ENOENT. Apply the same fix that was patched on 0.5.1 to the new 0.8.3 version. Also pass `disableSourceMaps: true` to the plugin in `pluginReactOptions` so the transform phase skips the readFileSync path entirely (belt-and-suspenders alongside the patch).
📖 Storybook Preview |
d5ee610 to
24c6dbb
Compare
📖 Storybook Preview |
📖 Storybook Preview |


Description
Upgrade the design-system React Native package to the Reanimated 4 / worklets stack used by mobile, including the Babel plugin switch, worklets scheduling API migration, and the matching dependency bumps.
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Changes the animation bridge and Babel pipeline for bottom sheet and toast UI; dependency upgrades are broad but the code changes follow a consistent worklets API migration.
Overview
Migrates the React Native design system and Storybook app to Reanimated 4 with
react-native-worklets0.8.3 (from 0.5.x), bumpingreact-native-reanimatedto ~4.3 and adding a root Yarn patch so the worklets Babel plugin can read source files whose paths include query/hash suffixes.Runtime / API: Babel’s last plugin switches from
react-native-reanimated/plugintoreact-native-worklets/plugin.BottomSheetDialogandToasterreplacerunOnJSwithscheduleOnRNfrom worklets for animation completion callbacks. Jest adds a worklets mock (includingscheduleOnRN). Package peer dependencies now require Reanimated ≥4 and worklets ≥0.8.3.Storybook: On-device controls addon is disabled and the ondevice-controls ESM patch is removed. Device preview is simplified (drops extra gesture-handler / safe-area / token background wrapping). Web Storybook configures the worklets plugin with
disableSourceMaps, uses Vite’s built-inresolve.tsconfigPaths, and dropsvite-tsconfig-paths. Expo start scripts no longer runprestorybook; story discovery is a separatestorybook-generatescript.Reviewed by Cursor Bugbot for commit 007b4d4. Bugbot is set up for automated code reviews on this repo. Configure here.