From 25bcfa823100b2ec5fafe1ceb450e48c59dd10a8 Mon Sep 17 00:00:00 2001 From: Oleksii Bulenok Date: Wed, 29 Jul 2026 15:51:46 +0200 Subject: [PATCH] wip --- app.config.js | 2 +- .../ios/ExpoBlueskySwissArmy.podspec | 2 +- ...xpoBlueskyNotificationSettingsModule.swift | 2 +- package.json | 6 +- ...2.18.patch => expo-age-range@57.0.2.patch} | 0 ...ch => react-native-reanimated@4.4.2.patch} | 67 ++++++++----------- ...=> react-native-reanimated@4.4.2.patch.md} | 2 +- pnpm-workspace.yaml | 14 ++-- scripts/buildAndroidRelease.sh | 2 +- 9 files changed, 42 insertions(+), 55 deletions(-) rename patches/{expo-age-range@0.2.18.patch => expo-age-range@57.0.2.patch} (100%) rename patches/{react-native-reanimated@4.3.2.patch => react-native-reanimated@4.4.2.patch} (89%) rename patches/{react-native-reanimated@4.3.2.patch.md => react-native-reanimated@4.4.2.patch.md} (98%) diff --git a/app.config.js b/app.config.js index 79dd1dc619..cdb308eb88 100644 --- a/app.config.js +++ b/app.config.js @@ -261,7 +261,7 @@ module.exports = function (_config) { 'expo-build-properties', { ios: { - deploymentTarget: '15.1', + deploymentTarget: '16.4', buildReactNativeFromSource: true, ccacheEnabled: IS_DEV, cxxLanguageStandard: 'c++23', diff --git a/modules/expo-bluesky-swiss-army/ios/ExpoBlueskySwissArmy.podspec b/modules/expo-bluesky-swiss-army/ios/ExpoBlueskySwissArmy.podspec index 54ce66526c..f7744814cc 100644 --- a/modules/expo-bluesky-swiss-army/ios/ExpoBlueskySwissArmy.podspec +++ b/modules/expo-bluesky-swiss-army/ios/ExpoBlueskySwissArmy.podspec @@ -10,7 +10,7 @@ Pod::Spec.new do |s| s.static_framework = true s.dependency 'ExpoModulesCore' - s.dependency 'EXNotifications' + s.dependency 'ExpoNotifications' # Swift/Objective-C compatibility s.pod_target_xcconfig = { diff --git a/modules/expo-bluesky-swiss-army/ios/NotificationSettings/ExpoBlueskyNotificationSettingsModule.swift b/modules/expo-bluesky-swiss-army/ios/NotificationSettings/ExpoBlueskyNotificationSettingsModule.swift index 6374d33487..010b438abd 100644 --- a/modules/expo-bluesky-swiss-army/ios/NotificationSettings/ExpoBlueskyNotificationSettingsModule.swift +++ b/modules/expo-bluesky-swiss-army/ios/NotificationSettings/ExpoBlueskyNotificationSettingsModule.swift @@ -1,4 +1,4 @@ -import EXNotifications +import ExpoNotifications import ExpoModulesCore import UIKit import UserNotifications diff --git a/package.json b/package.json index b7c0f1829e..c665adabc8 100644 --- a/package.json +++ b/package.json @@ -160,7 +160,7 @@ "emoji-regex": "^10.4.0", "eventemitter3": "^5.0.1", "expo": "57.0.8", - "expo-age-range": "0.2.18", + "expo-age-range": "57.0.2", "expo-application": "~57.0.2", "expo-asset": "~57.0.7", "expo-blur": "~57.0.2", @@ -234,7 +234,7 @@ "react-native-pager-view": "6.8.0", "react-native-progress": "^5.0.1", "react-native-qrcode-styled": "^0.3.3", - "react-native-reanimated": "~4.3.2", + "react-native-reanimated": "~4.4.2", "react-native-safe-area-context": "~5.7.0", "react-native-screens": "4.26.2", "react-native-scroll-forwarder": "link:./modules/react-native-scroll-forwarder", @@ -266,7 +266,7 @@ "@lingui/babel-plugin-lingui-macro": "^5.9.2", "@lingui/cli": "^5.9.2", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.15", - "@react-native/babel-preset": "0.81.5", + "@react-native/babel-preset": "0.86.0", "@react-native/typescript-config": "^0.81.5", "@sentry/webpack-plugin": "^3.2.2", "@testing-library/react-native": "^13.2.0", diff --git a/patches/expo-age-range@0.2.18.patch b/patches/expo-age-range@57.0.2.patch similarity index 100% rename from patches/expo-age-range@0.2.18.patch rename to patches/expo-age-range@57.0.2.patch diff --git a/patches/react-native-reanimated@4.3.2.patch b/patches/react-native-reanimated@4.4.2.patch similarity index 89% rename from patches/react-native-reanimated@4.3.2.patch rename to patches/react-native-reanimated@4.4.2.patch index bc517898b5..c15e1836c1 100644 --- a/patches/react-native-reanimated@4.3.2.patch +++ b/patches/react-native-reanimated@4.4.2.patch @@ -1,10 +1,10 @@ diff --git a/Common/cpp/reanimated/Fabric/updates/AnimatedPropsRegistry.cpp b/Common/cpp/reanimated/Fabric/updates/AnimatedPropsRegistry.cpp -index 531f0dc7b4eeb9b29cb2255d8444da02a74c35b7..534f419fce55c39a09a7eebfb7ab3c53f8a16637 100644 +index 2db064c..2f8c187 100644 --- a/Common/cpp/reanimated/Fabric/updates/AnimatedPropsRegistry.cpp +++ b/Common/cpp/reanimated/Fabric/updates/AnimatedPropsRegistry.cpp -@@ -1,8 +1,10 @@ - #include - #include +@@ -5,8 +5,10 @@ + + #include +#include #include @@ -13,8 +13,8 @@ index 531f0dc7b4eeb9b29cb2255d8444da02a74c35b7..534f419fce55c39a09a7eebfb7ab3c53 namespace reanimated { -@@ -25,25 +27,59 @@ void AnimatedPropsRegistry::update(jsi::Runtime &rt, const jsi::Value &operation - addUpdatesToBatch(shadowNode, jsi::dynamicFromValue(rt, updates)); +@@ -36,25 +38,59 @@ void AnimatedPropsRegistry::update(jsi::Runtime &rt, const jsi::Value &operation + } if constexpr (StaticFeatureFlags::getFlag("FORCE_REACT_RENDER_FOR_SETTLED_ANIMATIONS")) { - timestampMap_[shadowNode->getTag()] = timestamp; @@ -34,7 +34,7 @@ index 531f0dc7b4eeb9b29cb2255d8444da02a74c35b7..534f419fce55c39a09a7eebfb7ab3c53 - const double timestamp, - const double cleanupTimestamp) { +jsi::Value AnimatedPropsRegistry::collectSettledUpdates(jsi::Runtime &rt, const double settledTimestamp) { - std::lock_guard lock{mutex_}; + react_native_assert(UpdatesRegistryManager::isLockedByCurrentThread()); - removeUpdatesOlderThanTimestamp(cleanupTimestamp); std::vector>> updates; @@ -83,7 +83,7 @@ index 531f0dc7b4eeb9b29cb2255d8444da02a74c35b7..534f419fce55c39a09a7eebfb7ab3c53 } const jsi::Array array(rt, updates.size()); -@@ -58,22 +94,11 @@ jsi::Value AnimatedPropsRegistry::getUpdatesOlderThanTimestamp( +@@ -69,22 +105,11 @@ jsi::Value AnimatedPropsRegistry::getUpdatesOlderThanTimestamp( return jsi::Value(rt, array); } @@ -109,7 +109,7 @@ index 531f0dc7b4eeb9b29cb2255d8444da02a74c35b7..534f419fce55c39a09a7eebfb7ab3c53 } // namespace reanimated diff --git a/Common/cpp/reanimated/Fabric/updates/AnimatedPropsRegistry.h b/Common/cpp/reanimated/Fabric/updates/AnimatedPropsRegistry.h -index 2c6c0e13604c9421e147d7eea7f4a4752288011c..8cd67f118501c2786b94d76541aea29a14ba8c16 100644 +index 2197eec..a9cb24c 100644 --- a/Common/cpp/reanimated/Fabric/updates/AnimatedPropsRegistry.h +++ b/Common/cpp/reanimated/Fabric/updates/AnimatedPropsRegistry.h @@ -4,10 +4,8 @@ @@ -138,7 +138,7 @@ index 2c6c0e13604c9421e147d7eea7f4a4752288011c..8cd67f118501c2786b94d76541aea29a + jsi::Value collectSettledUpdates(jsi::Runtime &rt, double settledTimestamp); private: - std::unordered_map timestampMap_; // viewTag -> timestamp, protected by `mutex_` + std::unordered_map timestampMap_; + // Tags whose latest values have already been pushed to React `settledProps`. + // Intentionally retained after eviction to detect re-animation staleness. + std::unordered_set syncedTags_; @@ -151,10 +151,10 @@ index 2c6c0e13604c9421e147d7eea7f4a4752288011c..8cd67f118501c2786b94d76541aea29a }; diff --git a/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxyCommon.h b/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxyCommon.h -index 096218ab9659955cd6272c97181bce3c893ed591..1a8e25fc8295b3ac943130709bf063ea41a50585 100644 +index 8603591..20d042b 100644 --- a/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxyCommon.h +++ b/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxyCommon.h -@@ -57,11 +57,11 @@ class LayoutAnimationsProxyCommon : public facebook::react::MountingOverrideDele +@@ -62,11 +62,11 @@ class LayoutAnimationsProxyCommon : public facebook::react::MountingOverrideDele const SharedComponentDescriptorRegistry &componentDescriptorRegistry, const std::shared_ptr &contextContainer, jsi::Runtime &uiRuntime, @@ -168,7 +168,7 @@ index 096218ab9659955cd6272c97181bce3c893ed591..1a8e25fc8295b3ac943130709bf063ea const std::shared_ptr &jsInvoker #endif ) -@@ -69,11 +69,11 @@ class LayoutAnimationsProxyCommon : public facebook::react::MountingOverrideDele +@@ -74,11 +74,11 @@ class LayoutAnimationsProxyCommon : public facebook::react::MountingOverrideDele contextContainer_(contextContainer), componentDescriptorRegistry_(componentDescriptorRegistry), uiRuntime_(uiRuntime), @@ -182,7 +182,7 @@ index 096218ab9659955cd6272c97181bce3c893ed591..1a8e25fc8295b3ac943130709bf063ea jsInvoker_(jsInvoker) #endif { -@@ -93,10 +93,10 @@ class LayoutAnimationsProxyCommon : public facebook::react::MountingOverrideDele +@@ -98,10 +98,10 @@ class LayoutAnimationsProxyCommon : public facebook::react::MountingOverrideDele SharedComponentDescriptorRegistry componentDescriptorRegistry_; jsi::Runtime &uiRuntime_; const std::shared_ptr uiScheduler_; @@ -195,7 +195,7 @@ index 096218ab9659955cd6272c97181bce3c893ed591..1a8e25fc8295b3ac943130709bf063ea void restoreOpacityInCaseOfFlakyEnteringAnimation(SurfaceId surfaceId) const; diff --git a/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Experimental.h b/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Experimental.h -index eca44e4cf651d16e9741806004ce9119c85d07d6..e39c79a5d7b52659106ed6fe6fbcbbc048bf4787 100644 +index eca44e4..e39c79a 100644 --- a/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Experimental.h +++ b/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Experimental.h @@ -66,11 +66,11 @@ struct LayoutAnimationsProxy_Experimental : public LayoutAnimationsProxyCommon, @@ -227,18 +227,18 @@ index eca44e4cf651d16e9741806004ce9119c85d07d6..e39c79a5d7b52659106ed6fe6fbcbbc0 #endif ), diff --git a/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Legacy.cpp b/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Legacy.cpp -index 83ef7430b923b6b3b99368ee8072168769110cd0..2affd12822ab19bdc90963d3ce8ca1e6bb0d43b7 100644 +index a3927af..13833b7 100644 --- a/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Legacy.cpp +++ b/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Legacy.cpp -@@ -2,6 +2,7 @@ - #include +@@ -1,6 +1,7 @@ + #include - #include + #include +#include #include #include -@@ -53,14 +54,37 @@ std::optional LayoutAnimationsProxy_Legacy::pullTransaction +@@ -58,14 +59,37 @@ std::optional LayoutAnimationsProxy_Legacy::pullTransaction parseRemoveMutations(movedViews, mutations, roots); @@ -278,7 +278,7 @@ index 83ef7430b923b6b3b99368ee8072168769110cd0..2affd12822ab19bdc90963d3ce8ca1e6 return MountingTransaction{surfaceId, transactionNumber, std::move(filteredMutations), telemetry}; } -@@ -947,23 +971,22 @@ inline bool MutationNode::isMutationNode() { +@@ -959,23 +983,22 @@ inline bool MutationNode::isMutationNode() { return true; } @@ -318,7 +318,7 @@ index 83ef7430b923b6b3b99368ee8072168769110cd0..2affd12822ab19bdc90963d3ce8ca1e6 } // namespace reanimated diff --git a/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Legacy.h b/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Legacy.h -index e9a5e9959e89ec33cee179ddb907c17f6dfbd3de..a2c89041518cd71e8ba5ac62ef89c0022d197c9b 100644 +index e9a5e99..a2c8904 100644 --- a/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Legacy.h +++ b/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Legacy.h @@ -3,8 +3,8 @@ @@ -404,10 +404,10 @@ index e9a5e9959e89ec33cee179ddb907c17f6dfbd3de..a2c89041518cd71e8ba5ac62ef89c002 } // namespace reanimated diff --git a/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.cpp b/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.cpp -index 9ade22bf773005613048a00c47b35767628e86c6..f3415e824da1a8da5c83762415ca54646bd6429f 100644 +index 60c88ec..a23545a 100644 --- a/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.cpp +++ b/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.cpp -@@ -524,15 +524,13 @@ jsi::Value ReanimatedModuleProxy::getSettledUpdates(jsi::Runtime &rt) { +@@ -641,16 +641,14 @@ jsi::Value ReanimatedModuleProxy::getSettledUpdates(jsi::Runtime &rt) { StaticFeatureFlags::getFlag("FORCE_REACT_RENDER_FOR_SETTLED_ANIMATIONS") && "getSettledUpdates requires FORCE_REACT_RENDER_FOR_SETTLED_ANIMATIONS static feature flag to be enabled"); @@ -420,27 +420,14 @@ index 9ade22bf773005613048a00c47b35767628e86c6..f3415e824da1a8da5c83762415ca5464 // TODO(future): flush updates from CSS animations and CSS transitions registries - // TODO(future): find a better way to obtain timestamp for removing updates - // TODO(future): move removing old updates to separate method + auto lock = updatesRegistryManager_->lock(); - return animatedPropsRegistry_->getUpdatesOlderThanTimestamp( - rt, currentTimestamp - 1000 /* 1 second */, currentTimestamp - 2000 /* 2 seconds */); + return animatedPropsRegistry_->collectSettledUpdates(rt, currentTimestamp - SETTLED_ANIMATION_THRESHOLD_MS); } bool ReanimatedModuleProxy::handleEvent( -@@ -1306,11 +1304,11 @@ void ReanimatedModuleProxy::initializeLayoutAnimationsProxy() { - componentDescriptorRegistry, - scheduler->getContextContainer(), - getJSIRuntimeFromWorkletRuntime(uiRuntime_), -- uiScheduler_ -+ uiScheduler_, -+ uiManager_ - #ifdef ANDROID - , - filterUnmountedTagsFunction_, -- uiManager_, - jsInvoker_ - #endif - ); -@@ -1319,22 +1317,19 @@ void ReanimatedModuleProxy::initializeLayoutAnimationsProxy() { +@@ -1227,22 +1225,19 @@ void ReanimatedModuleProxy::initializeLayoutAnimationsProxy() { #endif layoutAnimationsProxy_ = std::move(layoutAnimationsProxyExperimental); } else { @@ -467,7 +454,7 @@ index 9ade22bf773005613048a00c47b35767628e86c6..f3415e824da1a8da5c83762415ca5464 } } diff --git a/src/PropsRegistryGarbageCollector.ts b/src/PropsRegistryGarbageCollector.ts -index f917ce5a8586c02855f1d8d9ae73154592d22510..32148fbac8a9224ffec6edc784b48938da9585fb 100644 +index f917ce5..32148fb 100644 --- a/src/PropsRegistryGarbageCollector.ts +++ b/src/PropsRegistryGarbageCollector.ts @@ -11,7 +11,6 @@ import { ReanimatedModule } from './ReanimatedModule'; diff --git a/patches/react-native-reanimated@4.3.2.patch.md b/patches/react-native-reanimated@4.4.2.patch.md similarity index 98% rename from patches/react-native-reanimated@4.3.2.patch.md rename to patches/react-native-reanimated@4.4.2.patch.md index 3a5281702e..c8e21ba82e 100644 --- a/patches/react-native-reanimated@4.3.2.patch.md +++ b/patches/react-native-reanimated@4.4.2.patch.md @@ -1,4 +1,4 @@ -# react-native-reanimated@4.3.2.patch +# react-native-reanimated@4.4.2.patch Backports of two merged upstream PRs: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 199f479b2f..db4000161e 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -4,16 +4,16 @@ strictPeerDependencies: false # default: false trustPolicy: 'no-downgrade' # default: off trustPolicyIgnoreAfter: 10080 # 7 days, default: undefined overrides: - '@react-native/babel-preset': '0.81.5' - '@react-native/normalize-colors': '0.81.5' + '@react-native/babel-preset': '0.86.0' + '@react-native/normalize-colors': '0.86.0' '@expo/image-utils': '0.8.12' '@types/estree': '1.0.6' 'react-native-compressor': '1.13.0' - 'react-native-reanimated': '4.3.2' - 'react-native-worklets': '0.8.3' + 'react-native-reanimated': '4.4.2' + 'react-native-worklets': '0.10.0' 'psl': '1.9.0' '@types/psl': '1.1.1' - 'react-native-screens': '4.24.0' + 'react-native-screens': '4.26.2' allowBuilds: '@sentry/cli': true 'core-js-pure': true @@ -21,7 +21,7 @@ allowBuilds: 'unrs-resolver': true patchedDependencies: '@sentry/expo-upload-sourcemaps@8.18.0': patches/@sentry__expo-upload-sourcemaps@8.18.0.patch - 'expo-age-range@0.2.18': patches/expo-age-range@0.2.18.patch + 'expo-age-range@57.0.2': patches/expo-age-range@57.0.2.patch 'expo-haptics@57.0.1': patches/expo-haptics@57.0.1.patch 'expo-media-library@57.0.3': patches/expo-media-library@57.0.3.patch 'expo-modules-core@57.0.7': patches/expo-modules-core@57.0.7.patch @@ -32,7 +32,7 @@ patchedDependencies: 'react-native-drawer-layout@4.2.3': patches/react-native-drawer-layout@4.2.3.patch 'react-native-keyboard-controller@1.21.9': patches/react-native-keyboard-controller@1.21.9.patch 'react-native-pager-view@6.8.0': patches/react-native-pager-view@6.8.0.patch - 'react-native-reanimated@4.3.2': patches/react-native-reanimated@4.3.2.patch + 'react-native-reanimated@4.4.2': patches/react-native-reanimated@4.4.2.patch react-native-screens@4.24.0: patches/react-native-screens@4.24.0.patch 'react-native-svg@15.15.4': patches/react-native-svg@15.15.4.patch 'react-native-view-shot@4.0.3': patches/react-native-view-shot@4.0.3.patch diff --git a/scripts/buildAndroidRelease.sh b/scripts/buildAndroidRelease.sh index 0d5d0698a8..7cc6c669b0 100755 --- a/scripts/buildAndroidRelease.sh +++ b/scripts/buildAndroidRelease.sh @@ -14,7 +14,7 @@ SETTINGS_GRADLE="$ANDROID_DIR/settings.gradle" # Guard against building with the wrong app identity. The New Arch build must # use a distinct rootProject.name so it installs alongside the store app rather # than overwriting it. -EXPECTED_APP_NAME="rootProject.name = 'Bluesky (New Arch)'" +EXPECTED_APP_NAME="rootProject.name = 'Bluesky'" if ! grep -qF "$EXPECTED_APP_NAME" "$SETTINGS_GRADLE"; then echo "Error: expected \"$EXPECTED_APP_NAME\" in $SETTINGS_GRADLE" >&2 echo "(Set the app name in settings.gradle before building the New Arch release.)" >&2