Skip to content

Commit 8b21604

Browse files
authored
chore: update reanimated to v4 (#1120)
## 📜 Description Update reanimated to v4 in fabric example app. ## 💡 Motivation and Context To test lib compatibility we need to assure that newest libs versions are supported. Since reanimated v4 is only fabric compatible I update it in fabric example only. We don't have e2e tests for fabric project yet, but i tested manually and everything works well. Verifies #1094 ## 📢 Changelog <!-- High level overview of important changes --> <!-- For example: fixed status bar manipulation; added new types declarations; --> <!-- If your changes don't affect one of platform/language below - then remove this platform/language --> ### JS - update reanimated to v4 in fabric example app. ## 🤔 How Has This Been Tested? Tested manually in example app. ## 📸 Screenshots (if appropriate): https://github.com/user-attachments/assets/0c6b4d62-eda2-45db-983c-00a0b08bb8b1 ## 📝 Checklist - [x] CI successfully passed - [x] I added new mocks and corresponding unit-tests if library API was changed
1 parent b9618e8 commit 8b21604

File tree

5 files changed

+87
-51
lines changed

5 files changed

+87
-51
lines changed

FabricExample/babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
22
presets: ["module:@react-native/babel-preset"],
3-
plugins: ["react-native-reanimated/plugin"],
3+
plugins: ["react-native-worklets/plugin"],
44
};

FabricExample/ios/KeyboardControllerFabricExample.xcodeproj/project.pbxproj

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -241,14 +241,10 @@
241241
inputFileListPaths = (
242242
"${PODS_ROOT}/Target Support Files/Pods-KeyboardControllerFabricExample/Pods-KeyboardControllerFabricExample-frameworks-${CONFIGURATION}-input-files.xcfilelist",
243243
);
244-
inputPaths = (
245-
);
246244
name = "[CP] Embed Pods Frameworks";
247245
outputFileListPaths = (
248246
"${PODS_ROOT}/Target Support Files/Pods-KeyboardControllerFabricExample/Pods-KeyboardControllerFabricExample-frameworks-${CONFIGURATION}-output-files.xcfilelist",
249247
);
250-
outputPaths = (
251-
);
252248
runOnlyForDeploymentPostprocessing = 0;
253249
shellPath = /bin/sh;
254250
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-KeyboardControllerFabricExample/Pods-KeyboardControllerFabricExample-frameworks.sh\"\n";
@@ -284,14 +280,10 @@
284280
inputFileListPaths = (
285281
"${PODS_ROOT}/Target Support Files/Pods-KeyboardControllerFabricExample/Pods-KeyboardControllerFabricExample-resources-${CONFIGURATION}-input-files.xcfilelist",
286282
);
287-
inputPaths = (
288-
);
289283
name = "[CP] Copy Pods Resources";
290284
outputFileListPaths = (
291285
"${PODS_ROOT}/Target Support Files/Pods-KeyboardControllerFabricExample/Pods-KeyboardControllerFabricExample-resources-${CONFIGURATION}-output-files.xcfilelist",
292286
);
293-
outputPaths = (
294-
);
295287
runOnlyForDeploymentPostprocessing = 0;
296288
shellPath = /bin/sh;
297289
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-KeyboardControllerFabricExample/Pods-KeyboardControllerFabricExample-resources.sh\"\n";
@@ -531,7 +523,10 @@
531523
"-DFOLLY_USE_LIBCPP=1",
532524
"-DRN_FABRIC_ENABLED",
533525
);
534-
OTHER_LDFLAGS = "$(inherited) ";
526+
OTHER_LDFLAGS = (
527+
"$(inherited)",
528+
" ",
529+
);
535530
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
536531
SDKROOT = iphoneos;
537532
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
@@ -611,7 +606,10 @@
611606
"-DFOLLY_USE_LIBCPP=1",
612607
"-DRN_FABRIC_ENABLED",
613608
);
614-
OTHER_LDFLAGS = "$(inherited) ";
609+
OTHER_LDFLAGS = (
610+
"$(inherited)",
611+
" ",
612+
);
615613
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
616614
SDKROOT = iphoneos;
617615
USE_HERMES = true;

FabricExample/ios/Podfile.lock

Lines changed: 47 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1741,7 +1741,7 @@ PODS:
17411741
- ReactCommon/turbomodule/bridging
17421742
- ReactCommon/turbomodule/core
17431743
- Yoga
1744-
- RNReanimated (3.17.0):
1744+
- RNReanimated (4.1.0):
17451745
- DoubleConversion
17461746
- glog
17471747
- hermes-engine
@@ -1763,10 +1763,10 @@ PODS:
17631763
- ReactCodegen
17641764
- ReactCommon/turbomodule/bridging
17651765
- ReactCommon/turbomodule/core
1766-
- RNReanimated/reanimated (= 3.17.0)
1767-
- RNReanimated/worklets (= 3.17.0)
1766+
- RNReanimated/reanimated (= 4.1.0)
1767+
- RNWorklets
17681768
- Yoga
1769-
- RNReanimated/reanimated (3.17.0):
1769+
- RNReanimated/reanimated (4.1.0):
17701770
- DoubleConversion
17711771
- glog
17721772
- hermes-engine
@@ -1788,9 +1788,10 @@ PODS:
17881788
- ReactCodegen
17891789
- ReactCommon/turbomodule/bridging
17901790
- ReactCommon/turbomodule/core
1791-
- RNReanimated/reanimated/apple (= 3.17.0)
1791+
- RNReanimated/reanimated/apple (= 4.1.0)
1792+
- RNWorklets
17921793
- Yoga
1793-
- RNReanimated/reanimated/apple (3.17.0):
1794+
- RNReanimated/reanimated/apple (4.1.0):
17941795
- DoubleConversion
17951796
- glog
17961797
- hermes-engine
@@ -1812,8 +1813,32 @@ PODS:
18121813
- ReactCodegen
18131814
- ReactCommon/turbomodule/bridging
18141815
- ReactCommon/turbomodule/core
1816+
- RNWorklets
18151817
- Yoga
1816-
- RNReanimated/worklets (3.17.0):
1818+
- RNScreens (4.9.0):
1819+
- DoubleConversion
1820+
- glog
1821+
- hermes-engine
1822+
- RCT-Folly (= 2024.11.18.00)
1823+
- RCTRequired
1824+
- RCTTypeSafety
1825+
- React-Core
1826+
- React-debug
1827+
- React-Fabric
1828+
- React-featureflags
1829+
- React-graphics
1830+
- React-ImageManager
1831+
- React-NativeModulesApple
1832+
- React-RCTFabric
1833+
- React-RCTImage
1834+
- React-rendererdebug
1835+
- React-utils
1836+
- ReactCodegen
1837+
- ReactCommon/turbomodule/bridging
1838+
- ReactCommon/turbomodule/core
1839+
- RNScreens/common (= 4.9.0)
1840+
- Yoga
1841+
- RNScreens/common (4.9.0):
18171842
- DoubleConversion
18181843
- glog
18191844
- hermes-engine
@@ -1825,19 +1850,17 @@ PODS:
18251850
- React-Fabric
18261851
- React-featureflags
18271852
- React-graphics
1828-
- React-hermes
18291853
- React-ImageManager
1830-
- React-jsi
18311854
- React-NativeModulesApple
18321855
- React-RCTFabric
1856+
- React-RCTImage
18331857
- React-rendererdebug
18341858
- React-utils
18351859
- ReactCodegen
18361860
- ReactCommon/turbomodule/bridging
18371861
- ReactCommon/turbomodule/core
1838-
- RNReanimated/worklets/apple (= 3.17.0)
18391862
- Yoga
1840-
- RNReanimated/worklets/apple (3.17.0):
1863+
- RNWorklets (0.5.1):
18411864
- DoubleConversion
18421865
- glog
18431866
- hermes-engine
@@ -1859,8 +1882,9 @@ PODS:
18591882
- ReactCodegen
18601883
- ReactCommon/turbomodule/bridging
18611884
- ReactCommon/turbomodule/core
1885+
- RNWorklets/worklets (= 0.5.1)
18621886
- Yoga
1863-
- RNScreens (4.9.0):
1887+
- RNWorklets/worklets (0.5.1):
18641888
- DoubleConversion
18651889
- glog
18661890
- hermes-engine
@@ -1872,18 +1896,19 @@ PODS:
18721896
- React-Fabric
18731897
- React-featureflags
18741898
- React-graphics
1899+
- React-hermes
18751900
- React-ImageManager
1901+
- React-jsi
18761902
- React-NativeModulesApple
18771903
- React-RCTFabric
1878-
- React-RCTImage
18791904
- React-rendererdebug
18801905
- React-utils
18811906
- ReactCodegen
18821907
- ReactCommon/turbomodule/bridging
18831908
- ReactCommon/turbomodule/core
1884-
- RNScreens/common (= 4.9.0)
1909+
- RNWorklets/worklets/apple (= 0.5.1)
18851910
- Yoga
1886-
- RNScreens/common (4.9.0):
1911+
- RNWorklets/worklets/apple (0.5.1):
18871912
- DoubleConversion
18881913
- glog
18891914
- hermes-engine
@@ -1895,10 +1920,11 @@ PODS:
18951920
- React-Fabric
18961921
- React-featureflags
18971922
- React-graphics
1923+
- React-hermes
18981924
- React-ImageManager
1925+
- React-jsi
18991926
- React-NativeModulesApple
19001927
- React-RCTFabric
1901-
- React-RCTImage
19021928
- React-rendererdebug
19031929
- React-utils
19041930
- ReactCodegen
@@ -1985,6 +2011,7 @@ DEPENDENCIES:
19852011
- RNReactNativeHapticFeedback (from `../node_modules/react-native-haptic-feedback`)
19862012
- RNReanimated (from `../node_modules/react-native-reanimated`)
19872013
- RNScreens (from `../node_modules/react-native-screens`)
2014+
- RNWorklets (from `../node_modules/react-native-worklets`)
19882015
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
19892016

19902017
SPEC REPOS:
@@ -2142,6 +2169,8 @@ EXTERNAL SOURCES:
21422169
:path: "../node_modules/react-native-reanimated"
21432170
RNScreens:
21442171
:path: "../node_modules/react-native-screens"
2172+
RNWorklets:
2173+
:path: "../node_modules/react-native-worklets"
21452174
Yoga:
21462175
:path: "../node_modules/react-native/ReactCommon/yoga"
21472176

@@ -2219,8 +2248,9 @@ SPEC CHECKSUMS:
22192248
RNCMaskedView: 18c76ebdf9752bb75652829f99f6c3d1318cc864
22202249
RNGestureHandler: 9b05fab9a0b48fe48c968de7dbb9ca38a2b4f7ab
22212250
RNReactNativeHapticFeedback: 5fdbbaedabc1698dc3bb2a72105fadf63136a451
2222-
RNReanimated: c7ceb6676ff1f734cb441ec35f16f6b4183af2db
2251+
RNReanimated: 4e5b99c89a024c1d6166e1f9f6a2d6b655f73292
22232252
RNScreens: 2faba2591006e59fa14b9b665599ce29435a749a
2253+
RNWorklets: 6e6132a6a2e78b6a874d090f2427a250cb4856fc
22242254
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
22252255
Yoga: 9b7fb56e7b08cde60e2153344fa6afbd88e5d99f
22262256

FabricExample/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@
2424
"react-native-gesture-handler": "2.24.0",
2525
"react-native-haptic-feedback": "2.3.3",
2626
"react-native-keyboard-controller": "link:../",
27-
"react-native-reanimated": "3.17.0",
27+
"react-native-reanimated": "4.1.0",
2828
"react-native-safe-area-context": "5.2.0",
2929
"react-native-screens": "4.9.0",
30-
"react-native-toast-message": "^2.2.1"
30+
"react-native-toast-message": "^2.2.1",
31+
"react-native-worklets": "^0.5.1"
3132
},
3233
"devDependencies": {
3334
"@babel/core": "^7.25.2",

FabricExample/yarn.lock

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4544,11 +4544,6 @@ react-native-haptic-feedback@2.3.3:
45444544
resolved "https://registry.yarnpkg.com/react-native-haptic-feedback/-/react-native-haptic-feedback-2.3.3.tgz#88b6876e91399a69bd1b551fe1681b2f3dc1214e"
45454545
integrity sha512-svS4D5PxfNv8o68m9ahWfwje5NqukM3qLS48+WTdhbDkNUkOhP9rDfDSRHzlhk4zq+ISjyw95EhLeh8NkKX5vQ==
45464546

4547-
react-native-is-edge-to-edge@1.1.6:
4548-
version "1.1.6"
4549-
resolved "https://registry.yarnpkg.com/react-native-is-edge-to-edge/-/react-native-is-edge-to-edge-1.1.6.tgz#69ec13f70d76e9245e275eed4140d0873a78f902"
4550-
integrity sha512-1pHnFTlBahins6UAajXUqeCOHew9l9C2C8tErnpGC3IyLJzvxD+TpYAixnCbrVS52f7+NvMttbiSI290XfwN0w==
4551-
45524547
react-native-is-edge-to-edge@^1.2.1:
45534548
version "1.2.1"
45544549
resolved "https://registry.yarnpkg.com/react-native-is-edge-to-edge/-/react-native-is-edge-to-edge-1.2.1.tgz#64e10851abd9d176cbf2b40562f751622bde3358"
@@ -4558,23 +4553,13 @@ react-native-is-edge-to-edge@^1.2.1:
45584553
version "0.0.0"
45594554
uid ""
45604555

4561-
react-native-reanimated@3.17.0:
4562-
version "3.17.0"
4563-
resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-3.17.0.tgz#241c0b5c6bb034c445835bc04f6699965be9d3ea"
4564-
integrity sha512-gGuEmzJ03LHASsQU9fIUCnGpDVyXXdnFbiEMl7+Tkth+xiAaIIfJcSXEbkMtCRrxox3xvvfnF7dtMYSdzHUozQ==
4556+
react-native-reanimated@4.1.0:
4557+
version "4.1.0"
4558+
resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-4.1.0.tgz#dd0a2495b14fa344d7f482131ecae79110fa59cd"
4559+
integrity sha512-L8FqZn8VjZyBaCUMYFyx1Y+T+ZTbblaudpxReOXJ66RnOf52g6UM4Pa/IjwLD1XAw1FUxLRQrtpdjbkEc74FiQ==
45654560
dependencies:
4566-
"@babel/plugin-transform-arrow-functions" "^7.0.0-0"
4567-
"@babel/plugin-transform-class-properties" "^7.0.0-0"
4568-
"@babel/plugin-transform-classes" "^7.0.0-0"
4569-
"@babel/plugin-transform-nullish-coalescing-operator" "^7.0.0-0"
4570-
"@babel/plugin-transform-optional-chaining" "^7.0.0-0"
4571-
"@babel/plugin-transform-shorthand-properties" "^7.0.0-0"
4572-
"@babel/plugin-transform-template-literals" "^7.0.0-0"
4573-
"@babel/plugin-transform-unicode-regex" "^7.0.0-0"
4574-
"@babel/preset-typescript" "^7.16.7"
4575-
convert-source-map "^2.0.0"
4576-
invariant "^2.2.4"
4577-
react-native-is-edge-to-edge "1.1.6"
4561+
react-native-is-edge-to-edge "^1.2.1"
4562+
semver "7.7.2"
45784563

45794564
react-native-safe-area-context@5.2.0:
45804565
version "5.2.0"
@@ -4594,6 +4579,23 @@ react-native-toast-message@^2.2.1:
45944579
resolved "https://registry.yarnpkg.com/react-native-toast-message/-/react-native-toast-message-2.2.1.tgz#f395321e9bc818ce63274c38a3d294ed997a4a27"
45954580
integrity sha512-iXFMnlxPcgKKs4bZOIl06W16m6KXMh/bAYpWLyVXlISSCdcL2+FX5WPpRP3TGQeM/u9q+j5ex48DDY+72en+Sw==
45964581

4582+
react-native-worklets@^0.5.1:
4583+
version "0.5.1"
4584+
resolved "https://registry.yarnpkg.com/react-native-worklets/-/react-native-worklets-0.5.1.tgz#d153242655e3757b6c62a474768831157316ad33"
4585+
integrity sha512-lJG6Uk9YuojjEX/tQrCbcbmpdLCSFxDK1rJlkDhgqkVi1KZzG7cdcBFQRqyNOOzR9Y0CXNuldmtWTGOyM0k0+w==
4586+
dependencies:
4587+
"@babel/plugin-transform-arrow-functions" "^7.0.0-0"
4588+
"@babel/plugin-transform-class-properties" "^7.0.0-0"
4589+
"@babel/plugin-transform-classes" "^7.0.0-0"
4590+
"@babel/plugin-transform-nullish-coalescing-operator" "^7.0.0-0"
4591+
"@babel/plugin-transform-optional-chaining" "^7.0.0-0"
4592+
"@babel/plugin-transform-shorthand-properties" "^7.0.0-0"
4593+
"@babel/plugin-transform-template-literals" "^7.0.0-0"
4594+
"@babel/plugin-transform-unicode-regex" "^7.0.0-0"
4595+
"@babel/preset-typescript" "^7.16.7"
4596+
convert-source-map "^2.0.0"
4597+
semver "7.7.2"
4598+
45974599
react-native@0.78.0:
45984600
version "0.78.0"
45994601
resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.78.0.tgz#3e76252c8f8f35e5b7e07f9d8aee775aa8a315a7"
@@ -4838,6 +4840,11 @@ selfsigned@^2.4.1:
48384840
"@types/node-forge" "^1.3.0"
48394841
node-forge "^1"
48404842

4843+
semver@7.7.2:
4844+
version "7.7.2"
4845+
resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.2.tgz#67d99fdcd35cec21e6f8b87a7fd515a33f982b58"
4846+
integrity sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==
4847+
48414848
semver@^5.5.0, semver@^5.6.0:
48424849
version "5.7.2"
48434850
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8"

0 commit comments

Comments
 (0)