From 3bf7fae12f6947f1fc013014b4e7c1100f471690 Mon Sep 17 00:00:00 2001 From: Christian Baroni <7061887+christianbaroni@users.noreply.github.com> Date: Sat, 25 May 2024 12:36:32 -0400 Subject: [PATCH] Reanimated v3.11.0 (#5683) * Reanimated v3.10.0 * Update patch * v3.11.0 --- ios/Podfile.lock | 4 +-- package.json | 2 +- ...h => react-native-reanimated+3.11.0.patch} | 29 ++++++++++++++----- yarn.lock | 8 ++--- 4 files changed, 29 insertions(+), 14 deletions(-) rename patches/{react-native-reanimated+3.8.0.patch => react-native-reanimated+3.11.0.patch} (52%) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 0e3ce2bf8c3..7abc9b234c9 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -780,7 +780,7 @@ PODS: - React-Core - RNReactNativeHapticFeedback (1.11.0): - React-Core - - RNReanimated (3.8.0): + - RNReanimated (3.11.0): - RCT-Folly (= 2021.07.22.00) - React-Core - ReactCommon/turbomodule/core @@ -1383,7 +1383,7 @@ SPEC CHECKSUMS: RNOS: 31db6fa4a197d179afbba9e6b4d28d450a7f250b RNPermissions: 4e3714e18afe7141d000beae3755e5b5fb2f5e05 RNReactNativeHapticFeedback: 653a8c126a0f5e88ce15ffe280b3ff37e1fbb285 - RNReanimated: 5afba582037b0dae040a5f927dec7fdd18e430c3 + RNReanimated: 9d4971e437f38c11fd2c43344ac9d40c330058b1 RNRudderSdk: 805d4b7064714f3295bf5f152d3812cc67f67a93 RNScreens: 6a8a3c6b808aa48dca1780df7b73ea524f602c63 RNSentry: 468d45dc823258945fb1ee04dcd3f252cb57415f diff --git a/package.json b/package.json index 3a8a8c540b9..aafccec0ce0 100644 --- a/package.json +++ b/package.json @@ -248,7 +248,7 @@ "react-native-quick-md5": "3.0.3", "react-native-radial-gradient": "rainbow-me/react-native-radial-gradient#b99ab59d27dba70364ef516bd5193c37657ba95c", "react-native-randombytes": "3.5.3", - "react-native-reanimated": "3.8.0", + "react-native-reanimated": "3.11.0", "react-native-redash": "16.3.0", "react-native-restart": "0.0.22", "react-native-safe-area-context": "4.5.3", diff --git a/patches/react-native-reanimated+3.8.0.patch b/patches/react-native-reanimated+3.11.0.patch similarity index 52% rename from patches/react-native-reanimated+3.8.0.patch rename to patches/react-native-reanimated+3.11.0.patch index 71a74f45952..37c211a4e16 100644 --- a/patches/react-native-reanimated+3.8.0.patch +++ b/patches/react-native-reanimated+3.11.0.patch @@ -2,19 +2,34 @@ diff --git a/node_modules/react-native-reanimated/.DS_Store b/node_modules/react new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/react-native-reanimated/apple/REANodesManager.mm b/node_modules/react-native-reanimated/apple/REANodesManager.mm -index ed36c99..0156141 100644 +index 4fa8f44..70651d4 100644 --- a/node_modules/react-native-reanimated/apple/REANodesManager.mm +++ b/node_modules/react-native-reanimated/apple/REANodesManager.mm @@ -176,7 +176,11 @@ - (READisplayLink *)getDisplayLink if (!_displayLink) { _displayLink = [READisplayLink displayLinkWithTarget:self selector:@selector(onAnimationFrame:)]; #if !TARGET_OS_OSX -- _displayLink.preferredFramesPerSecond = 120; // will fallback to 60 fps for devices without Pro Motion display -+ if (@available(iOS 15.0, *)) { -+ _displayLink.preferredFrameRateRange = CAFrameRateRangeMake(80, 120, 80); -+ } else { -+ _displayLink.preferredFramesPerSecond = 120; // will fallback to 60 fps for devices without Pro Motion display -+ } ++ if (@available(iOS 15.0, *)) { ++ _displayLink.preferredFrameRateRange = CAFrameRateRangeMake(80, 120, 80); ++ } else { + _displayLink.preferredFramesPerSecond = 120; // will fallback to 60 fps for devices without Pro Motion display ++ } + #endif // TARGET_OS_OSX + [_displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes]; + } +diff --git a/node_modules/react-native-reanimated/apple/keyboardObserver/REAKeyboardEventObserver.mm b/node_modules/react-native-reanimated/apple/keyboardObserver/REAKeyboardEventObserver.mm +index fddcb84..be06bac 100644 +--- a/node_modules/react-native-reanimated/apple/keyboardObserver/REAKeyboardEventObserver.mm ++++ b/node_modules/react-native-reanimated/apple/keyboardObserver/REAKeyboardEventObserver.mm +@@ -51,7 +51,11 @@ - (READisplayLink *)getDisplayLink + if (!_displayLink) { + _displayLink = [READisplayLink displayLinkWithTarget:self selector:@selector(updateKeyboardFrame)]; + #if !TARGET_OS_OSX ++ if (@available(iOS 15.0, *)) { ++ _displayLink.preferredFrameRateRange = CAFrameRateRangeMake(80, 120, 80); ++ } else { + _displayLink.preferredFramesPerSecond = 120; // will fallback to 60 fps for devices without Pro Motion display ++ } #endif [_displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes]; } diff --git a/yarn.lock b/yarn.lock index 52aeefeb098..f11441ea499 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16549,10 +16549,10 @@ react-native-randombytes@3.5.3: buffer "^4.9.1" sjcl "^1.0.3" -react-native-reanimated@3.8.0: - version "3.8.0" - resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-3.8.0.tgz#e7724ceae8fdf87e9523d9d54efb3e4652f608cb" - integrity sha512-xoG4+nf+lSmzv37mjTUIT0gYNEIr2Mb8WXgmqR8deCJk8CC6lXT0HRpshTPVAF00LvdzrD2W/rCpiBdHN5FW2w== +react-native-reanimated@3.11.0: + version "3.11.0" + resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-3.11.0.tgz#d4265d4e0232623f5958ed60e1686ca884fc3452" + integrity sha512-BNw/XDgUfs8UhfY1X6IniU8kWpnotWGyt8qmQviaHisTi5lvwnaOdXQKfN1KGONx6ekdFRHRP5EFwLi0UajwKA== dependencies: "@babel/plugin-transform-arrow-functions" "^7.0.0-0" "@babel/plugin-transform-nullish-coalescing-operator" "^7.0.0-0"