From 0c8e15e8bb16ec279290d2390caf75e83d52f518 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Mon, 13 Jan 2025 15:57:54 +0100 Subject: [PATCH 001/108] [LOCAL] Bump Hermes --- packages/react-native/sdks/.hermesversion | 1 + 1 file changed, 1 insertion(+) create mode 100644 packages/react-native/sdks/.hermesversion diff --git a/packages/react-native/sdks/.hermesversion b/packages/react-native/sdks/.hermesversion new file mode 100644 index 00000000000000..4d7c96a0fd5566 --- /dev/null +++ b/packages/react-native/sdks/.hermesversion @@ -0,0 +1 @@ +hermes-2025-01-13-RNv0.78.0-a942ef374897d85da38e9c8904574f8376555388 \ No newline at end of file From 94b7082a461d8d73fe8a576d84a183297048691c Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Mon, 13 Jan 2025 19:19:03 +0000 Subject: [PATCH 002/108] Revert "Do not reset rn-artifacts-version on release branch (#48572)" This reverts commit a28d3961bd6ce561d20419c49ce37596896bcdf0. --- .github/actions/build-android/action.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/actions/build-android/action.yml b/.github/actions/build-android/action.yml index 4f32483d975a65..b18e605c8eb90d 100644 --- a/.github/actions/build-android/action.yml +++ b/.github/actions/build-android/action.yml @@ -20,8 +20,6 @@ runs: - name: Set React Native Version shell: bash run: node ./scripts/releases/set-rn-artifacts-version.js --build-type ${{ inputs.release-type }} - # We don't want to re-set the artifacts version if we're on the release branch. - if: ${{ !contains(github.ref, '-stable') }} - name: Setup gradle uses: ./.github/actions/setup-gradle with: From b713f273b6df654e4274ae00a849c39d2efccedc Mon Sep 17 00:00:00 2001 From: React Native Bot Date: Wed, 15 Jan 2025 08:40:26 +0000 Subject: [PATCH 003/108] Release 0.78.0-rc.0 #publish-packages-to-npm&next --- package.json | 4 ++-- packages/assets/package.json | 2 +- packages/babel-plugin-codegen/package.json | 4 ++-- packages/community-cli-plugin/package.json | 6 +++--- packages/core-cli-utils/package.json | 2 +- packages/debugger-frontend/package.json | 2 +- packages/dev-middleware/package.json | 4 ++-- .../eslint-config-react-native/package.json | 4 ++-- .../eslint-plugin-react-native/package.json | 2 +- packages/eslint-plugin-specs/package.json | 4 ++-- packages/gradle-plugin/package.json | 2 +- packages/helloworld/package.json | 12 ++++++------ packages/metro-config/package.json | 6 +++--- packages/normalize-color/package.json | 2 +- packages/polyfills/package.json | 2 +- .../react-native-babel-preset/package.json | 4 ++-- .../package.json | 4 ++-- packages/react-native-bots/package.json | 2 +- .../package.json | 4 ++-- packages/react-native-codegen/package.json | 2 +- packages/react-native-fantom/package.json | 18 +++++++++--------- packages/react-native-info/package.json | 2 +- .../package.json | 4 ++-- .../react-native-test-library/package.json | 6 +++--- .../Libraries/Core/ReactNativeVersion.js | 6 +++--- packages/react-native/React/Base/RCTVersion.m | 6 +++--- .../ReactAndroid/gradle.properties | 2 +- .../modules/systeminfo/ReactNativeVersion.java | 6 +++--- .../ReactCommon/cxxreact/ReactNativeVersion.h | 6 +++--- packages/react-native/package.json | 16 ++++++++-------- packages/rn-tester/package.json | 6 +++--- packages/typescript-config/package.json | 2 +- packages/virtualized-lists/package.json | 2 +- 33 files changed, 78 insertions(+), 78 deletions(-) diff --git a/package.json b/package.json index 142e0a21932271..0979a97b2875ca 100644 --- a/package.json +++ b/package.json @@ -49,8 +49,8 @@ "@babel/preset-flow": "^7.24.7", "@definitelytyped/dtslint": "^0.0.127", "@jest/create-cache-key-function": "^29.6.3", - "@react-native/metro-babel-transformer": "0.77.0-main", - "@react-native/metro-config": "0.77.0-main", + "@react-native/metro-babel-transformer": "0.78.0-rc.0", + "@react-native/metro-config": "0.78.0-rc.0", "@tsconfig/node18": "1.0.1", "@types/react": "^19.0.0", "@typescript-eslint/parser": "^7.1.1", diff --git a/packages/assets/package.json b/packages/assets/package.json index 07f15969ba657f..c697f396b18839 100644 --- a/packages/assets/package.json +++ b/packages/assets/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/assets-registry", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "description": "Asset support code for React Native.", "license": "MIT", "repository": { diff --git a/packages/babel-plugin-codegen/package.json b/packages/babel-plugin-codegen/package.json index 98924cb4aae7c5..cddec2d9f3829d 100644 --- a/packages/babel-plugin-codegen/package.json +++ b/packages/babel-plugin-codegen/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/babel-plugin-codegen", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "description": "Babel plugin to generate native module and view manager code for React Native.", "license": "MIT", "repository": { @@ -26,7 +26,7 @@ ], "dependencies": { "@babel/traverse": "^7.25.3", - "@react-native/codegen": "0.77.0-main" + "@react-native/codegen": "0.78.0-rc.0" }, "devDependencies": { "@babel/core": "^7.25.2" diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index f1daf525ec572e..9e7a58f97e179e 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/community-cli-plugin", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "description": "Core CLI commands for React Native", "keywords": [ "react-native", @@ -22,8 +22,8 @@ "dist" ], "dependencies": { - "@react-native/dev-middleware": "0.77.0-main", - "@react-native/metro-babel-transformer": "0.77.0-main", + "@react-native/dev-middleware": "0.78.0-rc.0", + "@react-native/metro-babel-transformer": "0.78.0-rc.0", "chalk": "^4.0.0", "debug": "^2.2.0", "invariant": "^2.2.4", diff --git a/packages/core-cli-utils/package.json b/packages/core-cli-utils/package.json index 99f098a80e8e04..9f68c2fa43901b 100644 --- a/packages/core-cli-utils/package.json +++ b/packages/core-cli-utils/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/core-cli-utils", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "description": "React Native CLI library for Frameworks to build on", "license": "MIT", "main": "./src/index.flow.js", diff --git a/packages/debugger-frontend/package.json b/packages/debugger-frontend/package.json index 03ca64cf90e151..b1b52eca925b64 100644 --- a/packages/debugger-frontend/package.json +++ b/packages/debugger-frontend/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/debugger-frontend", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "description": "Debugger frontend for React Native based on Chrome DevTools", "keywords": [ "react-native", diff --git a/packages/dev-middleware/package.json b/packages/dev-middleware/package.json index 3dfde88432fe5b..38aa0adda5f45e 100644 --- a/packages/dev-middleware/package.json +++ b/packages/dev-middleware/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/dev-middleware", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "description": "Dev server middleware for React Native", "keywords": [ "react-native", @@ -23,7 +23,7 @@ ], "dependencies": { "@isaacs/ttlcache": "^1.4.1", - "@react-native/debugger-frontend": "0.77.0-main", + "@react-native/debugger-frontend": "0.78.0-rc.0", "chrome-launcher": "^0.15.2", "chromium-edge-launcher": "^0.2.0", "connect": "^3.6.5", diff --git a/packages/eslint-config-react-native/package.json b/packages/eslint-config-react-native/package.json index a1aee9ed4437d2..160b58ecb3808c 100644 --- a/packages/eslint-config-react-native/package.json +++ b/packages/eslint-config-react-native/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/eslint-config", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "description": "ESLint config for React Native", "license": "MIT", "repository": { @@ -22,7 +22,7 @@ "dependencies": { "@babel/core": "^7.25.2", "@babel/eslint-parser": "^7.25.1", - "@react-native/eslint-plugin": "0.77.0-main", + "@react-native/eslint-plugin": "0.78.0-rc.0", "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", "eslint-config-prettier": "^8.5.0", diff --git a/packages/eslint-plugin-react-native/package.json b/packages/eslint-plugin-react-native/package.json index 82151c1f614e0c..1ca54adc8e5bfd 100644 --- a/packages/eslint-plugin-react-native/package.json +++ b/packages/eslint-plugin-react-native/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/eslint-plugin", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "description": "ESLint rules for @react-native/eslint-config", "license": "MIT", "repository": { diff --git a/packages/eslint-plugin-specs/package.json b/packages/eslint-plugin-specs/package.json index ca94060a48eec1..fa5575ea113df6 100644 --- a/packages/eslint-plugin-specs/package.json +++ b/packages/eslint-plugin-specs/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/eslint-plugin-specs", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "description": "ESLint rules to validate NativeModule and Component Specs", "license": "MIT", "repository": { @@ -26,7 +26,7 @@ "dependencies": { "@babel/core": "^7.25.2", "@babel/plugin-transform-flow-strip-types": "^7.25.2", - "@react-native/codegen": "0.77.0-main", + "@react-native/codegen": "0.78.0-rc.0", "make-dir": "^2.1.0", "pirates": "^4.0.1", "source-map-support": "0.5.0" diff --git a/packages/gradle-plugin/package.json b/packages/gradle-plugin/package.json index a3d8c09a64498c..6d29c74f6b5809 100644 --- a/packages/gradle-plugin/package.json +++ b/packages/gradle-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/gradle-plugin", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "description": "Gradle Plugin for React Native", "license": "MIT", "repository": { diff --git a/packages/helloworld/package.json b/packages/helloworld/package.json index e83ee292686332..b5ab12057d35ac 100644 --- a/packages/helloworld/package.json +++ b/packages/helloworld/package.json @@ -1,6 +1,6 @@ { "name": "helloworld", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "private": true, "scripts": { "bootstrap": "node ./cli.js bootstrap", @@ -13,16 +13,16 @@ }, "dependencies": { "react": "19.0.0", - "react-native": "1000.0.0" + "react-native": "0.78.0-rc.0" }, "devDependencies": { "@babel/core": "^7.25.2", "@babel/preset-env": "^7.25.3", "@babel/runtime": "^7.25.0", - "@react-native/babel-preset": "0.77.0-main", - "@react-native/core-cli-utils": "0.77.0-main", - "@react-native/eslint-config": "0.77.0-main", - "@react-native/metro-config": "0.77.0-main", + "@react-native/babel-preset": "0.78.0-rc.0", + "@react-native/core-cli-utils": "0.78.0-rc.0", + "@react-native/eslint-config": "0.78.0-rc.0", + "@react-native/metro-config": "0.78.0-rc.0", "chalk": "^4.1.2", "commander": "^12.0.0", "eslint": "^8.19.0", diff --git a/packages/metro-config/package.json b/packages/metro-config/package.json index 875347ef99a9ab..ec61fe23a0ad35 100644 --- a/packages/metro-config/package.json +++ b/packages/metro-config/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/metro-config", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "description": "Metro configuration for React Native.", "license": "MIT", "repository": { @@ -26,8 +26,8 @@ "dist" ], "dependencies": { - "@react-native/js-polyfills": "0.77.0-main", - "@react-native/metro-babel-transformer": "0.77.0-main", + "@react-native/js-polyfills": "0.78.0-rc.0", + "@react-native/metro-babel-transformer": "0.78.0-rc.0", "metro-config": "^0.81.0", "metro-runtime": "^0.81.0" } diff --git a/packages/normalize-color/package.json b/packages/normalize-color/package.json index 5db370d8b5c361..e7060ce3d5be42 100644 --- a/packages/normalize-color/package.json +++ b/packages/normalize-color/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/normalize-colors", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "description": "Color normalization for React Native.", "license": "MIT", "repository": { diff --git a/packages/polyfills/package.json b/packages/polyfills/package.json index b80037150fdbfd..508b940849c9c4 100644 --- a/packages/polyfills/package.json +++ b/packages/polyfills/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/js-polyfills", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "description": "Polyfills for React Native.", "license": "MIT", "repository": { diff --git a/packages/react-native-babel-preset/package.json b/packages/react-native-babel-preset/package.json index ba57efc6941582..f350ffa3a8bc7a 100644 --- a/packages/react-native-babel-preset/package.json +++ b/packages/react-native-babel-preset/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/babel-preset", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "description": "Babel preset for React Native applications", "main": "src/index.js", "repository": { @@ -55,7 +55,7 @@ "@babel/plugin-transform-typescript": "^7.25.2", "@babel/plugin-transform-unicode-regex": "^7.24.7", "@babel/template": "^7.25.0", - "@react-native/babel-plugin-codegen": "0.77.0-main", + "@react-native/babel-plugin-codegen": "0.78.0-rc.0", "babel-plugin-syntax-hermes-parser": "0.25.1", "babel-plugin-transform-flow-enums": "^0.0.2", "react-refresh": "^0.14.0" diff --git a/packages/react-native-babel-transformer/package.json b/packages/react-native-babel-transformer/package.json index 524baafe464a56..5c5f64c8f1e031 100644 --- a/packages/react-native-babel-transformer/package.json +++ b/packages/react-native-babel-transformer/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/metro-babel-transformer", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "description": "Babel transformer for React Native applications.", "main": "src/index.js", "repository": { @@ -16,7 +16,7 @@ "license": "MIT", "dependencies": { "@babel/core": "^7.25.2", - "@react-native/babel-preset": "0.77.0-main", + "@react-native/babel-preset": "0.78.0-rc.0", "hermes-parser": "0.25.1", "nullthrows": "^1.1.1" }, diff --git a/packages/react-native-bots/package.json b/packages/react-native-bots/package.json index facc1e3fcab814..635fac9cb47382 100644 --- a/packages/react-native-bots/package.json +++ b/packages/react-native-bots/package.json @@ -1,7 +1,7 @@ { "name": "@react-native/bots", "description": "React Native Bots", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "private": true, "license": "MIT", "repository": { diff --git a/packages/react-native-codegen-typescript-test/package.json b/packages/react-native-codegen-typescript-test/package.json index 5d124daf46c8b2..b715e0a3024ce1 100644 --- a/packages/react-native-codegen-typescript-test/package.json +++ b/packages/react-native-codegen-typescript-test/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/codegen-typescript-test", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "private": true, "description": "TypeScript related unit test for @react-native/codegen", "license": "MIT", @@ -19,7 +19,7 @@ "prepare": "yarn run build" }, "dependencies": { - "@react-native/codegen": "0.77.0-main" + "@react-native/codegen": "0.78.0-rc.0" }, "devDependencies": { "@babel/core": "^7.25.2", diff --git a/packages/react-native-codegen/package.json b/packages/react-native-codegen/package.json index 80f3e14e658670..7c041c00789920 100644 --- a/packages/react-native-codegen/package.json +++ b/packages/react-native-codegen/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/codegen", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "description": "Code generation tools for React Native", "license": "MIT", "repository": { diff --git a/packages/react-native-fantom/package.json b/packages/react-native-fantom/package.json index c4c61cc5384f62..0e0fbfb93b1e76 100644 --- a/packages/react-native-fantom/package.json +++ b/packages/react-native-fantom/package.json @@ -1,11 +1,11 @@ { - "name": "@react-native/fantom", - "private": true, - "version": "0.77.0-main", - "main": "src/index.js", - "description": "Internal integration testing and benchmarking tool for React Native", - "peerDependencies":{ - "jest":"^29.7.0", - "jest-snapshot": "^29.7.0" - } + "name": "@react-native/fantom", + "private": true, + "version": "0.78.0-rc.0", + "main": "src/index.js", + "description": "Internal integration testing and benchmarking tool for React Native", + "peerDependencies": { + "jest": "^29.7.0", + "jest-snapshot": "^29.7.0" + } } diff --git a/packages/react-native-info/package.json b/packages/react-native-info/package.json index 6381b4f2cb631b..64a07beea34a2d 100644 --- a/packages/react-native-info/package.json +++ b/packages/react-native-info/package.json @@ -1,6 +1,6 @@ { "name": "react-native-info", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "main": "build/index.js", "license": "MIT", "private": true, diff --git a/packages/react-native-popup-menu-android/package.json b/packages/react-native-popup-menu-android/package.json index c07e3fd1ad9fd0..b918fa89145410 100644 --- a/packages/react-native-popup-menu-android/package.json +++ b/packages/react-native-popup-menu-android/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/popup-menu-android", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "description": "PopupMenu for the Android platform", "main": "index.js", "files": [ @@ -17,7 +17,7 @@ ], "license": "MIT", "devDependencies": { - "@react-native/codegen": "0.77.0-main" + "@react-native/codegen": "0.78.0-rc.0" }, "peerDependencies": { "@types/react": "^19.0.0", diff --git a/packages/react-native-test-library/package.json b/packages/react-native-test-library/package.json index c378871432ff36..221bc43b331f92 100644 --- a/packages/react-native-test-library/package.json +++ b/packages/react-native-test-library/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/oss-library-example", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "private": true, "description": "Package that includes native module exapmle, native component example, targets both the old and the new architecture. It should serve as an example of a real-world OSS library.", "license": "MIT", @@ -26,8 +26,8 @@ ], "devDependencies": { "@babel/core": "^7.25.2", - "@react-native/babel-preset": "0.77.0-main", - "react-native": "1000.0.0" + "@react-native/babel-preset": "0.78.0-rc.0", + "react-native": "0.78.0-rc.0" }, "peerDependencies": { "react": "*", diff --git a/packages/react-native/Libraries/Core/ReactNativeVersion.js b/packages/react-native/Libraries/Core/ReactNativeVersion.js index 786a34fcdd1f2c..8aaf7fffc68754 100644 --- a/packages/react-native/Libraries/Core/ReactNativeVersion.js +++ b/packages/react-native/Libraries/Core/ReactNativeVersion.js @@ -14,10 +14,10 @@ const version: $ReadOnly<{ patch: number, prerelease: string | null, }> = { - major: 1000, - minor: 0, + major: 0, + minor: 78, patch: 0, - prerelease: null, + prerelease: 'rc.0', }; module.exports = {version}; diff --git a/packages/react-native/React/Base/RCTVersion.m b/packages/react-native/React/Base/RCTVersion.m index 69ce4f75320e63..4aca54d56d509c 100644 --- a/packages/react-native/React/Base/RCTVersion.m +++ b/packages/react-native/React/Base/RCTVersion.m @@ -21,10 +21,10 @@ static dispatch_once_t onceToken; dispatch_once(&onceToken, ^(void){ __rnVersion = @{ - RCTVersionMajor: @(1000), - RCTVersionMinor: @(0), + RCTVersionMajor: @(0), + RCTVersionMinor: @(78), RCTVersionPatch: @(0), - RCTVersionPrerelease: [NSNull null], + RCTVersionPrerelease: @"rc.0", }; }); return __rnVersion; diff --git a/packages/react-native/ReactAndroid/gradle.properties b/packages/react-native/ReactAndroid/gradle.properties index 8866d933a00e53..cfca124afa93d6 100644 --- a/packages/react-native/ReactAndroid/gradle.properties +++ b/packages/react-native/ReactAndroid/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=1000.0.0 +VERSION_NAME=0.78.0-rc.0 react.internal.publishingGroup=com.facebook.react android.useAndroidX=true diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java index dd881ce78cacdc..b25e3400d51f55 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java @@ -15,8 +15,8 @@ public class ReactNativeVersion { public static final Map VERSION = MapBuilder.of( - "major", 1000, - "minor", 0, + "major", 0, + "minor", 78, "patch", 0, - "prerelease", null); + "prerelease", "rc.0"); } diff --git a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h index c2509cc0404a27..53c51cd63ee985 100644 --- a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h +++ b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h @@ -15,10 +15,10 @@ namespace facebook::react { constexpr struct { - int32_t Major = 1000; - int32_t Minor = 0; + int32_t Major = 0; + int32_t Minor = 78; int32_t Patch = 0; - std::string_view Prerelease = ""; + std::string_view Prerelease = "rc.0"; } ReactNativeVersion; } // namespace facebook::react diff --git a/packages/react-native/package.json b/packages/react-native/package.json index b2df8ae87aab28..9f6b83aa9c3172 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -1,6 +1,6 @@ { "name": "react-native", - "version": "1000.0.0", + "version": "0.78.0-rc.0", "description": "A framework for building native apps using React", "license": "MIT", "repository": { @@ -108,13 +108,13 @@ }, "dependencies": { "@jest/create-cache-key-function": "^29.6.3", - "@react-native/assets-registry": "0.77.0-main", - "@react-native/codegen": "0.77.0-main", - "@react-native/community-cli-plugin": "0.77.0-main", - "@react-native/gradle-plugin": "0.77.0-main", - "@react-native/js-polyfills": "0.77.0-main", - "@react-native/normalize-colors": "0.77.0-main", - "@react-native/virtualized-lists": "0.77.0-main", + "@react-native/assets-registry": "0.78.0-rc.0", + "@react-native/codegen": "0.78.0-rc.0", + "@react-native/community-cli-plugin": "0.78.0-rc.0", + "@react-native/gradle-plugin": "0.78.0-rc.0", + "@react-native/js-polyfills": "0.78.0-rc.0", + "@react-native/normalize-colors": "0.78.0-rc.0", + "@react-native/virtualized-lists": "0.78.0-rc.0", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", diff --git a/packages/rn-tester/package.json b/packages/rn-tester/package.json index 00e65fc2e61451..31af89e70b8ae4 100644 --- a/packages/rn-tester/package.json +++ b/packages/rn-tester/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/tester", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "private": true, "description": "React Native tester app.", "license": "MIT", @@ -27,8 +27,8 @@ "e2e-test-ios": "./scripts/maestro-test-ios.sh" }, "dependencies": { - "@react-native/oss-library-example": "0.77.0-main", - "@react-native/popup-menu-android": "0.77.0-main", + "@react-native/oss-library-example": "0.78.0-rc.0", + "@react-native/popup-menu-android": "0.78.0-rc.0", "flow-enums-runtime": "^0.0.6", "invariant": "^2.2.4", "nullthrows": "^1.1.1" diff --git a/packages/typescript-config/package.json b/packages/typescript-config/package.json index ac400bc87f4a58..c9f48c7ec84124 100644 --- a/packages/typescript-config/package.json +++ b/packages/typescript-config/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/typescript-config", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "description": "Default TypeScript configuration for React Native apps", "license": "MIT", "repository": { diff --git a/packages/virtualized-lists/package.json b/packages/virtualized-lists/package.json index d292128acb634b..3bc61503640742 100644 --- a/packages/virtualized-lists/package.json +++ b/packages/virtualized-lists/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/virtualized-lists", - "version": "0.77.0-main", + "version": "0.78.0-rc.0", "description": "Virtualized lists for React Native.", "license": "MIT", "repository": { From 5c7823f32c0493b5b96ab87d9cb32a51059b8f52 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Tue, 14 Jan 2025 08:11:25 -0800 Subject: [PATCH 004/108] Properly test JSC for template_app e2e tests (#48656) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48656 While working on 0.78, I realize we were not testing the template app with JSC. This change should fix this. ## Changelog: [Internal] - Disable Hermes for the JSC E2E tests with Maestro Reviewed By: cortinico, fabriziocucci Differential Revision: D68147849 fbshipit-source-id: 4fbe005b5d04d6163a37041d1bd57fd48a9dfda8 --- .github/workflows/test-all.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index fe6de2c89c6400..cbe2a66e6ed0c1 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -369,6 +369,11 @@ jobs: sed -i 's/newArchEnabled=true/newArchEnabled=false/' android/gradle.properties fi + if [[ ${{matrix.jsengine}} == "JSC" ]]; then + echo "Using JSC instead of Hermes" + sed -i 's/hermesEnabled=true/hermesEnabled=false/' android/gradle.properties + fi + # Build cd android CAPITALIZED_FLAVOR=$(echo "${{ matrix.flavor }}" | awk '{print toupper(substr($0, 1, 1)) substr($0, 2)}') From ddfa8a780b511d5928645da89986e35e251f2dc9 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Wed, 15 Jan 2025 01:04:29 -0800 Subject: [PATCH 005/108] Use RNTester App downloaded from CI instead of building (#48637) Summary: This change improves the E2E testing by downloading the iOS RNTesterApp that is built in CI instead of building it locally. This should let us save 10 to 20 minutes when we test a new release. ## Changelog: [Internal] - Use the RNTester app built in CI for release testing on iOS Pull Request resolved: https://github.com/facebook/react-native/pull/48637 Test Plan: - build the app in ci - run `yarn test-e2e-local -c ` and `yarn test-e2e-local -h false -c ` and verify that the iOS app is not built, but run in the simulator Reviewed By: cortinico Differential Revision: D68161477 Pulled By: cipolleschi fbshipit-source-id: 577d110f9ff0197a2d3348a08a60e60a4d0a752b --- .github/workflows/test-all.yml | 2 +- scripts/release-testing/test-e2e-local.js | 78 ++++++++++++------- .../utils/github-actions-utils.js | 10 +++ 3 files changed, 63 insertions(+), 27 deletions(-) diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index cbe2a66e6ed0c1..a2a77530c9db10 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -157,7 +157,7 @@ jobs: react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} test_ios_rntester: - runs-on: macos-13 + runs-on: macos-13-large needs: [build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos] env: diff --git a/scripts/release-testing/test-e2e-local.js b/scripts/release-testing/test-e2e-local.js index fcb23721ee4a9d..7698b1427eab03 100644 --- a/scripts/release-testing/test-e2e-local.js +++ b/scripts/release-testing/test-e2e-local.js @@ -85,40 +85,66 @@ async function testRNTesterIOS( } version of RNTester iOS with the new Architecture enabled`, ); + // if everything succeeded so far, we can launch Metro and the app + // start the Metro server in a separate window + launchPackagerInSeparateWindow(pwd().toString()); + // remember that for this to be successful // you should have run bundle install once // in your local setup - if (argv.hermes === true && ciArtifacts != null) { - const hermesURL = await ciArtifacts.artifactURLHermesDebug(); - const hermesZipPath = path.join(ciArtifacts.baseTmpPath(), 'hermes.zip'); - // download hermes source code from manifold - ciArtifacts.downloadArtifact(hermesURL, hermesZipPath); - // GHA zips by default the artifacts. - const outputFolder = path.join(ciArtifacts.baseTmpPath(), 'hermes'); - exec(`rm -rf ${outputFolder}`); - exec(`unzip ${hermesZipPath} -d ${outputFolder}`); - const hermesPath = path.join(outputFolder, 'hermes-ios-Debug.tar.gz'); - - console.info(`Downloaded Hermes in ${hermesPath}`); - exec( - `HERMES_ENGINE_TARBALL_PATH=${hermesPath} RCT_NEW_ARCH_ENABLED=1 bundle exec pod install --ansi`, + if (ciArtifacts != null) { + const appOutputFolder = path.join( + ciArtifacts.baseTmpPath(), + 'RNTester.app', ); + exec(`rm -rf ${appOutputFolder}`); + if (argv.hermes === true) { + // download hermes App + const hermesAppUrl = await ciArtifacts.artifactURLForHermesRNTesterApp(); + const hermesAppZipPath = path.join( + ciArtifacts.baseTmpPath(), + 'RNTesterAppHermes.zip', + ); + ciArtifacts.downloadArtifact(hermesAppUrl, hermesAppZipPath); + exec(`unzip ${hermesAppZipPath} -d ${appOutputFolder}`); + } else { + // download JSC app + const hermesAppUrl = await ciArtifacts.artifactURLForJSCRNTesterApp(); + const hermesAppZipPath = path.join( + ciArtifacts.baseTmpPath(), + 'RNTesterAppJSC.zip', + ); + ciArtifacts.downloadArtifact(hermesAppUrl, hermesAppZipPath); + exec(`unzip ${hermesAppZipPath} -d ${appOutputFolder}`); + } + + // boot device + const bootedDevice = String( + exec('xcrun simctl list | grep "iPhone 16 Pro" | grep Booted', { + silent: true, + }), + ).trim(); + if (!bootedDevice || bootedDevice.length === 0) { + exec('xcrun simctl boot "iPhone 16 Pro"'); + } + + // install app on device + exec(`xcrun simctl install booted ${appOutputFolder}`); + + // launch the app on iOS simulator + exec('xcrun simctl launch booted com.meta.RNTester.localDevelopment'); } else { exec( `USE_HERMES=${ argv.hermes === true ? 1 : 0 } CI=${onReleaseBranch.toString()} RCT_NEW_ARCH_ENABLED=1 bundle exec pod install --ansi`, ); - } - - // if everything succeeded so far, we can launch Metro and the app - // start the Metro server in a separate window - launchPackagerInSeparateWindow(pwd().toString()); - // launch the app on iOS simulator - exec( - 'npx react-native run-ios --scheme RNTester --simulator "iPhone 15 Pro"', - ); + // launch the app on iOS simulator + exec( + 'npx react-native run-ios --scheme RNTester --simulator "iPhone 15 Pro"', + ); + } } /** @@ -201,7 +227,7 @@ async function testRNTesterAndroid( * - @onReleaseBranch whether we are on a release branch or not */ async function testRNTester( - circleCIArtifacts /*:Unwrap> */, + ciArtifacts /*:Unwrap> */, onReleaseBranch /*: boolean */, ) { // FIXME: make sure that the commands retains colors @@ -210,9 +236,9 @@ async function testRNTester( pushd('packages/rn-tester'); if (argv.platform === 'ios') { - await testRNTesterIOS(circleCIArtifacts, onReleaseBranch); + await testRNTesterIOS(ciArtifacts, onReleaseBranch); } else { - await testRNTesterAndroid(circleCIArtifacts); + await testRNTesterAndroid(ciArtifacts); } popd(); } diff --git a/scripts/release-testing/utils/github-actions-utils.js b/scripts/release-testing/utils/github-actions-utils.js index 501e3e9c3d791e..b9e3d466850440 100644 --- a/scripts/release-testing/utils/github-actions-utils.js +++ b/scripts/release-testing/utils/github-actions-utils.js @@ -214,6 +214,14 @@ async function artifactURLForHermesRNTesterAPK( return getArtifactURL('rntester-hermes-debug'); } +async function artifactURLForJSCRNTesterApp() /*: Promise */ { + return getArtifactURL('RNTesterApp-NewArch-JSC-Debug'); +} + +async function artifactURLForHermesRNTesterApp() /*: Promise */ { + return getArtifactURL('RNTesterApp-NewArch-Hermes-Debug'); +} + async function artifactURLForMavenLocal() /*: Promise */ { return getArtifactURL('maven-local'); } @@ -247,6 +255,8 @@ module.exports = { downloadArtifact, artifactURLForJSCRNTesterAPK, artifactURLForHermesRNTesterAPK, + artifactURLForJSCRNTesterApp, + artifactURLForHermesRNTesterApp, artifactURLForMavenLocal, artifactURLHermesDebug, artifactURLForReactNative, From 5bff540ad33a76c6a4718217bd92908195ae577a Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Thu, 16 Jan 2025 02:57:24 -0800 Subject: [PATCH 006/108] Fix ruby (#48721) Summary: Following the suggestions [here](https://stackoverflow.com/questions/79360526/uninitialized-constant-activesupportloggerthreadsafelevellogger-nameerror), it seems that concurrent-ruby has been released tonight and it is bugged. Let's pin it to the right version. ## Changelog: [iOS][Changed] - Pin 'concurrent-ruby' to a working version Pull Request resolved: https://github.com/facebook/react-native/pull/48721 Test Plan: GHA Reviewed By: robhogan Differential Revision: D68262719 Pulled By: cipolleschi fbshipit-source-id: fc6410e28cc96f9d3769d3082a77cac0a3efe6db --- Gemfile | 1 + packages/helloworld/Gemfile | 1 + packages/rn-tester/Gemfile | 1 + 3 files changed, 3 insertions(+) diff --git a/Gemfile b/Gemfile index ec2e5c6b0f130f..4dd36df9782cad 100644 --- a/Gemfile +++ b/Gemfile @@ -6,3 +6,4 @@ ruby ">= 2.6.10" gem 'cocoapods', '~> 1.13', '!= 1.15.0', '!= 1.15.1' gem 'activesupport', '>= 6.1.7.5', '< 7.1.0' gem 'xcodeproj', '< 1.26.0' +gem 'concurrent-ruby', '< 1.3.4' diff --git a/packages/helloworld/Gemfile b/packages/helloworld/Gemfile index a8af404e61ae85..1036ed276bed1c 100644 --- a/packages/helloworld/Gemfile +++ b/packages/helloworld/Gemfile @@ -5,3 +5,4 @@ ruby ">= 2.6.10" gem 'cocoapods', '~> 1.13', '!= 1.15.0', '!= 1.15.1' gem 'activesupport', '>= 6.1.7.5', '< 7.1.0' gem 'xcodeproj', '< 1.26.0' +gem 'concurrent-ruby', '< 1.3.4' diff --git a/packages/rn-tester/Gemfile b/packages/rn-tester/Gemfile index 22f0060db385f6..120dcb2bf5d1e3 100644 --- a/packages/rn-tester/Gemfile +++ b/packages/rn-tester/Gemfile @@ -9,3 +9,4 @@ gem 'cocoapods', '~> 1.13', '!= 1.15.0', '!= 1.15.1' gem 'rexml' gem 'activesupport', '>= 6.1.7.5', '< 7.1.0' gem 'xcodeproj', '< 1.26.0' +gem 'concurrent-ruby', '< 1.3.4' From 36e2ae6a9c0387716feab7fd688564e50fd7557c Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Tue, 14 Jan 2025 11:05:07 -0800 Subject: [PATCH 007/108] fix Pressable when transform style is animated (#48672) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48672 ## Changelog: [General] [Fixed] - Buttons becoming unresponsive when transform is animated # The problem D67872307 changes when `ensureUpdateSubscriptionExists` is called to in `__attach`. This breaks the functionality because `__attach` is called before flag `__isNative` is set and subscriptions are never setup. # Fix The diff sets up subscriptions in `__makeNative` method. Reviewed By: yungsters Differential Revision: D68154908 fbshipit-source-id: e2ac108b064a66dda08902653d6bd20286f92458 --- .../react-native/Libraries/Animated/nodes/AnimatedValue.js | 6 ++++++ .../__tests__/__snapshots__/public-api-test.js.snap | 1 + 2 files changed, 7 insertions(+) diff --git a/packages/react-native/Libraries/Animated/nodes/AnimatedValue.js b/packages/react-native/Libraries/Animated/nodes/AnimatedValue.js index 889bfa51825e1c..2e500bf64b480d 100644 --- a/packages/react-native/Libraries/Animated/nodes/AnimatedValue.js +++ b/packages/react-native/Libraries/Animated/nodes/AnimatedValue.js @@ -9,6 +9,7 @@ */ import type {EventSubscription} from '../../vendor/emitter/EventEmitter'; +import type {PlatformConfig} from '../AnimatedPlatformConfig'; import type Animation, {EndCallback} from '../animations/Animation'; import type {InterpolationConfigType} from './AnimatedInterpolation'; import type AnimatedNode from './AnimatedNode'; @@ -131,6 +132,11 @@ export default class AnimatedValue extends AnimatedWithChildren { return this._value + this._offset; } + __makeNative(platformConfig: ?PlatformConfig): void { + super.__makeNative(platformConfig); + this.#ensureUpdateSubscriptionExists(); + } + #ensureUpdateSubscriptionExists(): void { if (this.#updateSubscription != null) { return; diff --git a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap index 32b72e85d0ba5d..96d1f4fd869c05 100644 --- a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap +++ b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap @@ -1169,6 +1169,7 @@ declare export default class AnimatedValue extends AnimatedWithChildren { __attach(): void; __detach(): void; __getValue(): number; + __makeNative(platformConfig: ?PlatformConfig): void; setValue(value: number): void; setOffset(offset: number): void; flattenOffset(): void; From bb5f971389b97936190254adb37ea0abf55fdfb5 Mon Sep 17 00:00:00 2001 From: Tim Yung Date: Wed, 15 Jan 2025 05:40:15 -0800 Subject: [PATCH 008/108] Animated: Fix `onUserDrivenAnimationEnded` w/ Insertion Effects (#48678) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48678 While diagnosing a recent issue in which `AnimatedValue` instances were not being correctly updated as expected, the insertion effects feature flag was identified as a root cause. Upon further investigation, it appears that this is because the `onUserDrivenAnimationEnded` listener was not implemented the same way in the two feature flag states: - When `useInsertionEffectsForAnimations` is disabled, `useAnimatedProps` listens to `onUserDrivenAnimationEnded` in a passive effect, after all nodes have been attached. - When `useInsertionEffectsForAnimations` is enabled, `useAnimatedProps` listens to `onUserDrivenAnimationEnded` in an insertion effect when attaching nodes. The bugs occurs because `useAnimatedProps` checks whether native driver is employed to decide whether to listen to `onUserDrivenAnimationEnded`. However, we do not know whether native driver will be employed during the insertion effect. (Actually, we do not necessarily know that in a passive effect, either... but that is a separate matter.) This fixes the bug when that occurs when `useInsertionEffectsForAnimations` is enabled, by moving the listening logic of `onUserDrivenAnimationEnded` into a passive effect. This is the same way that it is implemented when `useInsertionEffectsForAnimations` is disabled. Changelog: [Internal] Reviewed By: javache, sammy-SC Differential Revision: D68171721 fbshipit-source-id: 50b23348fd4641580581cacebc920959651f96a7 --- .../Libraries/Animated/useAnimatedProps.js | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/packages/react-native/Libraries/Animated/useAnimatedProps.js b/packages/react-native/Libraries/Animated/useAnimatedProps.js index 9c66dfa827dafa..98fc5678373071 100644 --- a/packages/react-native/Libraries/Animated/useAnimatedProps.js +++ b/packages/react-native/Libraries/Animated/useAnimatedProps.js @@ -276,6 +276,20 @@ function useAnimatedPropsLifecycle_insertionEffects(node: AnimatedProps): void { // if the queue is empty. When multiple animated components are mounted at // the same time. Only first component flushes the queue and the others will noop. NativeAnimatedHelper.API.flushQueue(); + let drivenAnimationEndedListener: ?EventSubscription = null; + if (node.__isNative) { + drivenAnimationEndedListener = + NativeAnimatedHelper.nativeEventEmitter.addListener( + 'onUserDrivenAnimationEnded', + data => { + node.update(); + }, + ); + } + + return () => { + drivenAnimationEndedListener?.remove(); + }; }); useInsertionEffect(() => { @@ -287,17 +301,6 @@ function useAnimatedPropsLifecycle_insertionEffects(node: AnimatedProps): void { useInsertionEffect(() => { node.__attach(); - let drivenAnimationEndedListener: ?EventSubscription = null; - - if (node.__isNative) { - drivenAnimationEndedListener = - NativeAnimatedHelper.nativeEventEmitter.addListener( - 'onUserDrivenAnimationEnded', - data => { - node.update(); - }, - ); - } if (prevNodeRef.current != null) { const prevNode = prevNodeRef.current; // TODO: Stop restoring default values (unless `reset` is called). @@ -312,8 +315,6 @@ function useAnimatedPropsLifecycle_insertionEffects(node: AnimatedProps): void { } else { prevNodeRef.current = node; } - - drivenAnimationEndedListener?.remove(); }; }, [node]); } From 3abb4cab7d1fba738987dca5f317e395dd985d27 Mon Sep 17 00:00:00 2001 From: Tim Yung Date: Wed, 15 Jan 2025 17:00:44 -0800 Subject: [PATCH 009/108] Animated: Defer `onAnimatedValueUpdate` on Attach + Native (#48715) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48715 {D68154908} fixed a problem with the `onAnimatedValueUpdate` listener not being correctly attached if `__attach` were called before `__makeNative` (which sets `__isNative` to true). We're potentially seeing production symptoms of stuttering interactions and user responsiveness, after queuing up many operations. Our hypothesis is that in scenarios where `ensureUpdateSubscriptionExists` is being called during `__makeNative` (instead of during `__attach`), a backup of operations occurs leading to these symptoms. This diff attempts to validate and mitigate this hypothesis by deferring `ensureUpdateSubscriptionExists` to when an `AnimatedValue` instance has had both `__attach` and `__makeNative` invoked. Changelog: [Internal] Differential Revision: D68236594 fbshipit-source-id: 2089100a773ebfc161fb5b567123eb58a893939f --- .../Libraries/Animated/nodes/AnimatedValue.js | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/packages/react-native/Libraries/Animated/nodes/AnimatedValue.js b/packages/react-native/Libraries/Animated/nodes/AnimatedValue.js index 2e500bf64b480d..8ab98a06246ac2 100644 --- a/packages/react-native/Libraries/Animated/nodes/AnimatedValue.js +++ b/packages/react-native/Libraries/Animated/nodes/AnimatedValue.js @@ -85,6 +85,7 @@ function _executeAsAnimatedBatch(id: string, operation: () => void) { * See https://reactnative.dev/docs/animatedvalue */ export default class AnimatedValue extends AnimatedWithChildren { + #attached: boolean = false; #updateSubscription: ?EventSubscription = null; _value: number; @@ -107,14 +108,8 @@ export default class AnimatedValue extends AnimatedWithChildren { } __attach(): void { - if (this.__isNative) { - // NOTE: In theory, we should only need to call this when any listeners - // are added. However, there is a global `onUserDrivenAnimationEnded` - // listener that relies on `onAnimatedValueUpdate` having fired to update - // the values in JavaScript. If that listener is removed, this could be - // re-optimized. - this.#ensureUpdateSubscriptionExists(); - } + this.#attached = true; + this.#ensureUpdateSubscriptionExists(); } __detach(): void { @@ -126,6 +121,7 @@ export default class AnimatedValue extends AnimatedWithChildren { } this.stopAnimation(); super.__detach(); + this.#attached = false; } __getValue(): number { @@ -137,10 +133,22 @@ export default class AnimatedValue extends AnimatedWithChildren { this.#ensureUpdateSubscriptionExists(); } + /** + * NOTE: In theory, we should only need to call this when any listeners + * are added. However, there is a global `onUserDrivenAnimationEnded` + * listener that relies on `onAnimatedValueUpdate` having fired to update + * the values in JavaScript. If that listener is removed, this could be + * re-optimized. + */ #ensureUpdateSubscriptionExists(): void { if (this.#updateSubscription != null) { return; } + // The order in which `__attach` and `__makeNative` are called is not + // deterministic, and we only want to do this when both have occurred. + if (!this.#attached || !this.__isNative) { + return; + } const nativeTag = this.__getNativeTag(); NativeAnimatedAPI.startListeningToAnimatedNodeValue(nativeTag); const subscription: EventSubscription = From 1f412d0826683989c5fd6051287e3bf31ee54b56 Mon Sep 17 00:00:00 2001 From: React Native Bot Date: Mon, 20 Jan 2025 20:09:09 +0000 Subject: [PATCH 010/108] Release 0.78.0-rc.1 #publish-packages-to-npm&next --- package.json | 4 ++-- packages/assets/package.json | 2 +- packages/babel-plugin-codegen/package.json | 4 ++-- packages/community-cli-plugin/package.json | 6 +++--- packages/core-cli-utils/package.json | 2 +- packages/debugger-frontend/package.json | 2 +- packages/dev-middleware/package.json | 4 ++-- packages/eslint-config-react-native/package.json | 4 ++-- packages/eslint-plugin-react-native/package.json | 2 +- packages/eslint-plugin-specs/package.json | 4 ++-- packages/gradle-plugin/package.json | 2 +- packages/helloworld/package.json | 12 ++++++------ packages/metro-config/package.json | 6 +++--- packages/normalize-color/package.json | 2 +- packages/polyfills/package.json | 2 +- packages/react-native-babel-preset/package.json | 4 ++-- .../react-native-babel-transformer/package.json | 4 ++-- packages/react-native-bots/package.json | 2 +- .../package.json | 4 ++-- packages/react-native-codegen/package.json | 2 +- packages/react-native-fantom/package.json | 2 +- packages/react-native-info/package.json | 2 +- .../react-native-popup-menu-android/package.json | 4 ++-- packages/react-native-test-library/package.json | 6 +++--- .../Libraries/Core/ReactNativeVersion.js | 2 +- packages/react-native/React/Base/RCTVersion.m | 2 +- .../react-native/ReactAndroid/gradle.properties | 2 +- .../modules/systeminfo/ReactNativeVersion.java | 2 +- .../ReactCommon/cxxreact/ReactNativeVersion.h | 2 +- packages/react-native/package.json | 16 ++++++++-------- packages/rn-tester/package.json | 6 +++--- packages/typescript-config/package.json | 2 +- packages/virtualized-lists/package.json | 2 +- 33 files changed, 62 insertions(+), 62 deletions(-) diff --git a/package.json b/package.json index 0979a97b2875ca..64312ff6935709 100644 --- a/package.json +++ b/package.json @@ -49,8 +49,8 @@ "@babel/preset-flow": "^7.24.7", "@definitelytyped/dtslint": "^0.0.127", "@jest/create-cache-key-function": "^29.6.3", - "@react-native/metro-babel-transformer": "0.78.0-rc.0", - "@react-native/metro-config": "0.78.0-rc.0", + "@react-native/metro-babel-transformer": "0.78.0-rc.1", + "@react-native/metro-config": "0.78.0-rc.1", "@tsconfig/node18": "1.0.1", "@types/react": "^19.0.0", "@typescript-eslint/parser": "^7.1.1", diff --git a/packages/assets/package.json b/packages/assets/package.json index c697f396b18839..51bc46ba664420 100644 --- a/packages/assets/package.json +++ b/packages/assets/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/assets-registry", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "description": "Asset support code for React Native.", "license": "MIT", "repository": { diff --git a/packages/babel-plugin-codegen/package.json b/packages/babel-plugin-codegen/package.json index cddec2d9f3829d..7fa3ae8535d5cc 100644 --- a/packages/babel-plugin-codegen/package.json +++ b/packages/babel-plugin-codegen/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/babel-plugin-codegen", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "description": "Babel plugin to generate native module and view manager code for React Native.", "license": "MIT", "repository": { @@ -26,7 +26,7 @@ ], "dependencies": { "@babel/traverse": "^7.25.3", - "@react-native/codegen": "0.78.0-rc.0" + "@react-native/codegen": "0.78.0-rc.1" }, "devDependencies": { "@babel/core": "^7.25.2" diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index 9e7a58f97e179e..a6049e1448b44d 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/community-cli-plugin", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "description": "Core CLI commands for React Native", "keywords": [ "react-native", @@ -22,8 +22,8 @@ "dist" ], "dependencies": { - "@react-native/dev-middleware": "0.78.0-rc.0", - "@react-native/metro-babel-transformer": "0.78.0-rc.0", + "@react-native/dev-middleware": "0.78.0-rc.1", + "@react-native/metro-babel-transformer": "0.78.0-rc.1", "chalk": "^4.0.0", "debug": "^2.2.0", "invariant": "^2.2.4", diff --git a/packages/core-cli-utils/package.json b/packages/core-cli-utils/package.json index 9f68c2fa43901b..07c44c3e4061e5 100644 --- a/packages/core-cli-utils/package.json +++ b/packages/core-cli-utils/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/core-cli-utils", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "description": "React Native CLI library for Frameworks to build on", "license": "MIT", "main": "./src/index.flow.js", diff --git a/packages/debugger-frontend/package.json b/packages/debugger-frontend/package.json index b1b52eca925b64..b8164d4c8e4427 100644 --- a/packages/debugger-frontend/package.json +++ b/packages/debugger-frontend/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/debugger-frontend", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "description": "Debugger frontend for React Native based on Chrome DevTools", "keywords": [ "react-native", diff --git a/packages/dev-middleware/package.json b/packages/dev-middleware/package.json index 38aa0adda5f45e..10028055091020 100644 --- a/packages/dev-middleware/package.json +++ b/packages/dev-middleware/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/dev-middleware", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "description": "Dev server middleware for React Native", "keywords": [ "react-native", @@ -23,7 +23,7 @@ ], "dependencies": { "@isaacs/ttlcache": "^1.4.1", - "@react-native/debugger-frontend": "0.78.0-rc.0", + "@react-native/debugger-frontend": "0.78.0-rc.1", "chrome-launcher": "^0.15.2", "chromium-edge-launcher": "^0.2.0", "connect": "^3.6.5", diff --git a/packages/eslint-config-react-native/package.json b/packages/eslint-config-react-native/package.json index 160b58ecb3808c..35b06f542ea9b9 100644 --- a/packages/eslint-config-react-native/package.json +++ b/packages/eslint-config-react-native/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/eslint-config", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "description": "ESLint config for React Native", "license": "MIT", "repository": { @@ -22,7 +22,7 @@ "dependencies": { "@babel/core": "^7.25.2", "@babel/eslint-parser": "^7.25.1", - "@react-native/eslint-plugin": "0.78.0-rc.0", + "@react-native/eslint-plugin": "0.78.0-rc.1", "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", "eslint-config-prettier": "^8.5.0", diff --git a/packages/eslint-plugin-react-native/package.json b/packages/eslint-plugin-react-native/package.json index 1ca54adc8e5bfd..77d24670bb3d06 100644 --- a/packages/eslint-plugin-react-native/package.json +++ b/packages/eslint-plugin-react-native/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/eslint-plugin", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "description": "ESLint rules for @react-native/eslint-config", "license": "MIT", "repository": { diff --git a/packages/eslint-plugin-specs/package.json b/packages/eslint-plugin-specs/package.json index fa5575ea113df6..f7407e8e73b6cb 100644 --- a/packages/eslint-plugin-specs/package.json +++ b/packages/eslint-plugin-specs/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/eslint-plugin-specs", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "description": "ESLint rules to validate NativeModule and Component Specs", "license": "MIT", "repository": { @@ -26,7 +26,7 @@ "dependencies": { "@babel/core": "^7.25.2", "@babel/plugin-transform-flow-strip-types": "^7.25.2", - "@react-native/codegen": "0.78.0-rc.0", + "@react-native/codegen": "0.78.0-rc.1", "make-dir": "^2.1.0", "pirates": "^4.0.1", "source-map-support": "0.5.0" diff --git a/packages/gradle-plugin/package.json b/packages/gradle-plugin/package.json index 6d29c74f6b5809..7a8d1a9fe5625f 100644 --- a/packages/gradle-plugin/package.json +++ b/packages/gradle-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/gradle-plugin", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "description": "Gradle Plugin for React Native", "license": "MIT", "repository": { diff --git a/packages/helloworld/package.json b/packages/helloworld/package.json index b5ab12057d35ac..f0f14a4399b772 100644 --- a/packages/helloworld/package.json +++ b/packages/helloworld/package.json @@ -1,6 +1,6 @@ { "name": "helloworld", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "private": true, "scripts": { "bootstrap": "node ./cli.js bootstrap", @@ -13,16 +13,16 @@ }, "dependencies": { "react": "19.0.0", - "react-native": "0.78.0-rc.0" + "react-native": "0.78.0-rc.1" }, "devDependencies": { "@babel/core": "^7.25.2", "@babel/preset-env": "^7.25.3", "@babel/runtime": "^7.25.0", - "@react-native/babel-preset": "0.78.0-rc.0", - "@react-native/core-cli-utils": "0.78.0-rc.0", - "@react-native/eslint-config": "0.78.0-rc.0", - "@react-native/metro-config": "0.78.0-rc.0", + "@react-native/babel-preset": "0.78.0-rc.1", + "@react-native/core-cli-utils": "0.78.0-rc.1", + "@react-native/eslint-config": "0.78.0-rc.1", + "@react-native/metro-config": "0.78.0-rc.1", "chalk": "^4.1.2", "commander": "^12.0.0", "eslint": "^8.19.0", diff --git a/packages/metro-config/package.json b/packages/metro-config/package.json index ec61fe23a0ad35..1aeb86b4668f28 100644 --- a/packages/metro-config/package.json +++ b/packages/metro-config/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/metro-config", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "description": "Metro configuration for React Native.", "license": "MIT", "repository": { @@ -26,8 +26,8 @@ "dist" ], "dependencies": { - "@react-native/js-polyfills": "0.78.0-rc.0", - "@react-native/metro-babel-transformer": "0.78.0-rc.0", + "@react-native/js-polyfills": "0.78.0-rc.1", + "@react-native/metro-babel-transformer": "0.78.0-rc.1", "metro-config": "^0.81.0", "metro-runtime": "^0.81.0" } diff --git a/packages/normalize-color/package.json b/packages/normalize-color/package.json index e7060ce3d5be42..ccbc86cc7596fc 100644 --- a/packages/normalize-color/package.json +++ b/packages/normalize-color/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/normalize-colors", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "description": "Color normalization for React Native.", "license": "MIT", "repository": { diff --git a/packages/polyfills/package.json b/packages/polyfills/package.json index 508b940849c9c4..b2d11dab182a81 100644 --- a/packages/polyfills/package.json +++ b/packages/polyfills/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/js-polyfills", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "description": "Polyfills for React Native.", "license": "MIT", "repository": { diff --git a/packages/react-native-babel-preset/package.json b/packages/react-native-babel-preset/package.json index f350ffa3a8bc7a..fd2b977b6c7506 100644 --- a/packages/react-native-babel-preset/package.json +++ b/packages/react-native-babel-preset/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/babel-preset", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "description": "Babel preset for React Native applications", "main": "src/index.js", "repository": { @@ -55,7 +55,7 @@ "@babel/plugin-transform-typescript": "^7.25.2", "@babel/plugin-transform-unicode-regex": "^7.24.7", "@babel/template": "^7.25.0", - "@react-native/babel-plugin-codegen": "0.78.0-rc.0", + "@react-native/babel-plugin-codegen": "0.78.0-rc.1", "babel-plugin-syntax-hermes-parser": "0.25.1", "babel-plugin-transform-flow-enums": "^0.0.2", "react-refresh": "^0.14.0" diff --git a/packages/react-native-babel-transformer/package.json b/packages/react-native-babel-transformer/package.json index 5c5f64c8f1e031..f52894b803e6c9 100644 --- a/packages/react-native-babel-transformer/package.json +++ b/packages/react-native-babel-transformer/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/metro-babel-transformer", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "description": "Babel transformer for React Native applications.", "main": "src/index.js", "repository": { @@ -16,7 +16,7 @@ "license": "MIT", "dependencies": { "@babel/core": "^7.25.2", - "@react-native/babel-preset": "0.78.0-rc.0", + "@react-native/babel-preset": "0.78.0-rc.1", "hermes-parser": "0.25.1", "nullthrows": "^1.1.1" }, diff --git a/packages/react-native-bots/package.json b/packages/react-native-bots/package.json index 635fac9cb47382..cebb0fd8c34885 100644 --- a/packages/react-native-bots/package.json +++ b/packages/react-native-bots/package.json @@ -1,7 +1,7 @@ { "name": "@react-native/bots", "description": "React Native Bots", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "private": true, "license": "MIT", "repository": { diff --git a/packages/react-native-codegen-typescript-test/package.json b/packages/react-native-codegen-typescript-test/package.json index b715e0a3024ce1..8a4d8488c56d5e 100644 --- a/packages/react-native-codegen-typescript-test/package.json +++ b/packages/react-native-codegen-typescript-test/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/codegen-typescript-test", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "private": true, "description": "TypeScript related unit test for @react-native/codegen", "license": "MIT", @@ -19,7 +19,7 @@ "prepare": "yarn run build" }, "dependencies": { - "@react-native/codegen": "0.78.0-rc.0" + "@react-native/codegen": "0.78.0-rc.1" }, "devDependencies": { "@babel/core": "^7.25.2", diff --git a/packages/react-native-codegen/package.json b/packages/react-native-codegen/package.json index 7c041c00789920..18b366191bb556 100644 --- a/packages/react-native-codegen/package.json +++ b/packages/react-native-codegen/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/codegen", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "description": "Code generation tools for React Native", "license": "MIT", "repository": { diff --git a/packages/react-native-fantom/package.json b/packages/react-native-fantom/package.json index 0e0fbfb93b1e76..a41c36feaa48be 100644 --- a/packages/react-native-fantom/package.json +++ b/packages/react-native-fantom/package.json @@ -1,7 +1,7 @@ { "name": "@react-native/fantom", "private": true, - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "main": "src/index.js", "description": "Internal integration testing and benchmarking tool for React Native", "peerDependencies": { diff --git a/packages/react-native-info/package.json b/packages/react-native-info/package.json index 64a07beea34a2d..d86a7e7ab69811 100644 --- a/packages/react-native-info/package.json +++ b/packages/react-native-info/package.json @@ -1,6 +1,6 @@ { "name": "react-native-info", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "main": "build/index.js", "license": "MIT", "private": true, diff --git a/packages/react-native-popup-menu-android/package.json b/packages/react-native-popup-menu-android/package.json index b918fa89145410..b28666f0d64471 100644 --- a/packages/react-native-popup-menu-android/package.json +++ b/packages/react-native-popup-menu-android/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/popup-menu-android", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "description": "PopupMenu for the Android platform", "main": "index.js", "files": [ @@ -17,7 +17,7 @@ ], "license": "MIT", "devDependencies": { - "@react-native/codegen": "0.78.0-rc.0" + "@react-native/codegen": "0.78.0-rc.1" }, "peerDependencies": { "@types/react": "^19.0.0", diff --git a/packages/react-native-test-library/package.json b/packages/react-native-test-library/package.json index 221bc43b331f92..c73b95f604ba2f 100644 --- a/packages/react-native-test-library/package.json +++ b/packages/react-native-test-library/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/oss-library-example", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "private": true, "description": "Package that includes native module exapmle, native component example, targets both the old and the new architecture. It should serve as an example of a real-world OSS library.", "license": "MIT", @@ -26,8 +26,8 @@ ], "devDependencies": { "@babel/core": "^7.25.2", - "@react-native/babel-preset": "0.78.0-rc.0", - "react-native": "0.78.0-rc.0" + "@react-native/babel-preset": "0.78.0-rc.1", + "react-native": "0.78.0-rc.1" }, "peerDependencies": { "react": "*", diff --git a/packages/react-native/Libraries/Core/ReactNativeVersion.js b/packages/react-native/Libraries/Core/ReactNativeVersion.js index 8aaf7fffc68754..daa82a6d720ddb 100644 --- a/packages/react-native/Libraries/Core/ReactNativeVersion.js +++ b/packages/react-native/Libraries/Core/ReactNativeVersion.js @@ -17,7 +17,7 @@ const version: $ReadOnly<{ major: 0, minor: 78, patch: 0, - prerelease: 'rc.0', + prerelease: 'rc.1', }; module.exports = {version}; diff --git a/packages/react-native/React/Base/RCTVersion.m b/packages/react-native/React/Base/RCTVersion.m index 4aca54d56d509c..a00ef40704f467 100644 --- a/packages/react-native/React/Base/RCTVersion.m +++ b/packages/react-native/React/Base/RCTVersion.m @@ -24,7 +24,7 @@ RCTVersionMajor: @(0), RCTVersionMinor: @(78), RCTVersionPatch: @(0), - RCTVersionPrerelease: @"rc.0", + RCTVersionPrerelease: @"rc.1", }; }); return __rnVersion; diff --git a/packages/react-native/ReactAndroid/gradle.properties b/packages/react-native/ReactAndroid/gradle.properties index cfca124afa93d6..1646810a2f5ed3 100644 --- a/packages/react-native/ReactAndroid/gradle.properties +++ b/packages/react-native/ReactAndroid/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=0.78.0-rc.0 +VERSION_NAME=0.78.0-rc.1 react.internal.publishingGroup=com.facebook.react android.useAndroidX=true diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java index b25e3400d51f55..cdd6aa919f4bc1 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java @@ -18,5 +18,5 @@ public class ReactNativeVersion { "major", 0, "minor", 78, "patch", 0, - "prerelease", "rc.0"); + "prerelease", "rc.1"); } diff --git a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h index 53c51cd63ee985..19f0768ab1b80f 100644 --- a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h +++ b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h @@ -18,7 +18,7 @@ constexpr struct { int32_t Major = 0; int32_t Minor = 78; int32_t Patch = 0; - std::string_view Prerelease = "rc.0"; + std::string_view Prerelease = "rc.1"; } ReactNativeVersion; } // namespace facebook::react diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 9f6b83aa9c3172..2947323b6f0ec0 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -1,6 +1,6 @@ { "name": "react-native", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "description": "A framework for building native apps using React", "license": "MIT", "repository": { @@ -108,13 +108,13 @@ }, "dependencies": { "@jest/create-cache-key-function": "^29.6.3", - "@react-native/assets-registry": "0.78.0-rc.0", - "@react-native/codegen": "0.78.0-rc.0", - "@react-native/community-cli-plugin": "0.78.0-rc.0", - "@react-native/gradle-plugin": "0.78.0-rc.0", - "@react-native/js-polyfills": "0.78.0-rc.0", - "@react-native/normalize-colors": "0.78.0-rc.0", - "@react-native/virtualized-lists": "0.78.0-rc.0", + "@react-native/assets-registry": "0.78.0-rc.1", + "@react-native/codegen": "0.78.0-rc.1", + "@react-native/community-cli-plugin": "0.78.0-rc.1", + "@react-native/gradle-plugin": "0.78.0-rc.1", + "@react-native/js-polyfills": "0.78.0-rc.1", + "@react-native/normalize-colors": "0.78.0-rc.1", + "@react-native/virtualized-lists": "0.78.0-rc.1", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", diff --git a/packages/rn-tester/package.json b/packages/rn-tester/package.json index 31af89e70b8ae4..7be3da5c01a8b7 100644 --- a/packages/rn-tester/package.json +++ b/packages/rn-tester/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/tester", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "private": true, "description": "React Native tester app.", "license": "MIT", @@ -27,8 +27,8 @@ "e2e-test-ios": "./scripts/maestro-test-ios.sh" }, "dependencies": { - "@react-native/oss-library-example": "0.78.0-rc.0", - "@react-native/popup-menu-android": "0.78.0-rc.0", + "@react-native/oss-library-example": "0.78.0-rc.1", + "@react-native/popup-menu-android": "0.78.0-rc.1", "flow-enums-runtime": "^0.0.6", "invariant": "^2.2.4", "nullthrows": "^1.1.1" diff --git a/packages/typescript-config/package.json b/packages/typescript-config/package.json index c9f48c7ec84124..7491e05f8b293d 100644 --- a/packages/typescript-config/package.json +++ b/packages/typescript-config/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/typescript-config", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "description": "Default TypeScript configuration for React Native apps", "license": "MIT", "repository": { diff --git a/packages/virtualized-lists/package.json b/packages/virtualized-lists/package.json index 3bc61503640742..ce42e09b3e216a 100644 --- a/packages/virtualized-lists/package.json +++ b/packages/virtualized-lists/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/virtualized-lists", - "version": "0.78.0-rc.0", + "version": "0.78.0-rc.1", "description": "Virtualized lists for React Native.", "license": "MIT", "repository": { From 7e883be8003681d40d3840817abe63df149e26ed Mon Sep 17 00:00:00 2001 From: Fabrizio Cucci Date: Wed, 22 Jan 2025 10:32:32 +0000 Subject: [PATCH 011/108] Update Podfile.lock Changelog: [Internal] --- packages/rn-tester/Podfile.lock | 582 ++++++++++++++++---------------- 1 file changed, 291 insertions(+), 291 deletions(-) diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index 7d6b03bb3920b8..00850e0a1ae3d6 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -2,13 +2,13 @@ PODS: - boost (1.84.0) - DoubleConversion (1.1.6) - fast_float (6.1.4) - - FBLazyVector (1000.0.0) + - FBLazyVector (0.78.0-rc.1) - fmt (11.0.2) - glog (0.3.5) - - hermes-engine (1000.0.0): - - hermes-engine/Pre-built (= 1000.0.0) - - hermes-engine/Pre-built (1000.0.0) - - MyNativeView (0.77.0-main): + - hermes-engine (0.78.0-rc.1): + - hermes-engine/Pre-built (= 0.78.0-rc.1) + - hermes-engine/Pre-built (0.78.0-rc.1) + - MyNativeView (0.78.0-rc.1): - DoubleConversion - glog - hermes-engine @@ -29,7 +29,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - NativeCxxModuleExample (0.77.0-main): + - NativeCxxModuleExample (0.78.0-rc.1): - DoubleConversion - glog - hermes-engine @@ -51,7 +51,7 @@ PODS: - ReactCommon/turbomodule/core - Yoga - OCMock (3.9.4) - - OSSLibraryExample (0.77.0-main): + - OSSLibraryExample (0.78.0-rc.1): - DoubleConversion - glog - hermes-engine @@ -91,32 +91,32 @@ PODS: - fast_float (= 6.1.4) - fmt (= 11.0.2) - glog - - RCTDeprecation (1000.0.0) - - RCTRequired (1000.0.0) - - RCTTypeSafety (1000.0.0): - - FBLazyVector (= 1000.0.0) - - RCTRequired (= 1000.0.0) - - React-Core (= 1000.0.0) - - React (1000.0.0): - - React-Core (= 1000.0.0) - - React-Core/DevSupport (= 1000.0.0) - - React-Core/RCTWebSocket (= 1000.0.0) - - React-RCTActionSheet (= 1000.0.0) - - React-RCTAnimation (= 1000.0.0) - - React-RCTBlob (= 1000.0.0) - - React-RCTImage (= 1000.0.0) - - React-RCTLinking (= 1000.0.0) - - React-RCTNetwork (= 1000.0.0) - - React-RCTSettings (= 1000.0.0) - - React-RCTText (= 1000.0.0) - - React-RCTVibration (= 1000.0.0) - - React-callinvoker (1000.0.0) - - React-Core (1000.0.0): + - RCTDeprecation (0.78.0-rc.1) + - RCTRequired (0.78.0-rc.1) + - RCTTypeSafety (0.78.0-rc.1): + - FBLazyVector (= 0.78.0-rc.1) + - RCTRequired (= 0.78.0-rc.1) + - React-Core (= 0.78.0-rc.1) + - React (0.78.0-rc.1): + - React-Core (= 0.78.0-rc.1) + - React-Core/DevSupport (= 0.78.0-rc.1) + - React-Core/RCTWebSocket (= 0.78.0-rc.1) + - React-RCTActionSheet (= 0.78.0-rc.1) + - React-RCTAnimation (= 0.78.0-rc.1) + - React-RCTBlob (= 0.78.0-rc.1) + - React-RCTImage (= 0.78.0-rc.1) + - React-RCTLinking (= 0.78.0-rc.1) + - React-RCTNetwork (= 0.78.0-rc.1) + - React-RCTSettings (= 0.78.0-rc.1) + - React-RCTText (= 0.78.0-rc.1) + - React-RCTVibration (= 0.78.0-rc.1) + - React-callinvoker (0.78.0-rc.1) + - React-Core (0.78.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) - RCTDeprecation - - React-Core/Default (= 1000.0.0) + - React-Core/Default (= 0.78.0-rc.1) - React-cxxreact - React-featureflags - React-hermes @@ -128,7 +128,7 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/CoreModulesHeaders (1000.0.0): + - React-Core/CoreModulesHeaders (0.78.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -145,7 +145,7 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/Default (1000.0.0): + - React-Core/Default (0.78.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -161,13 +161,13 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/DevSupport (1000.0.0): + - React-Core/DevSupport (0.78.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) - RCTDeprecation - - React-Core/Default (= 1000.0.0) - - React-Core/RCTWebSocket (= 1000.0.0) + - React-Core/Default (= 0.78.0-rc.1) + - React-Core/RCTWebSocket (= 0.78.0-rc.1) - React-cxxreact - React-featureflags - React-hermes @@ -179,7 +179,7 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/RCTActionSheetHeaders (1000.0.0): + - React-Core/RCTActionSheetHeaders (0.78.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -196,7 +196,7 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/RCTAnimationHeaders (1000.0.0): + - React-Core/RCTAnimationHeaders (0.78.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -213,7 +213,7 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/RCTBlobHeaders (1000.0.0): + - React-Core/RCTBlobHeaders (0.78.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -230,7 +230,7 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/RCTImageHeaders (1000.0.0): + - React-Core/RCTImageHeaders (0.78.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -247,7 +247,7 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/RCTLinkingHeaders (1000.0.0): + - React-Core/RCTLinkingHeaders (0.78.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -264,7 +264,7 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/RCTNetworkHeaders (1000.0.0): + - React-Core/RCTNetworkHeaders (0.78.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -281,7 +281,7 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/RCTPushNotificationHeaders (1000.0.0): + - React-Core/RCTPushNotificationHeaders (0.78.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -298,7 +298,7 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/RCTSettingsHeaders (1000.0.0): + - React-Core/RCTSettingsHeaders (0.78.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -315,7 +315,7 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/RCTTextHeaders (1000.0.0): + - React-Core/RCTTextHeaders (0.78.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -332,7 +332,7 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/RCTVibrationHeaders (1000.0.0): + - React-Core/RCTVibrationHeaders (0.78.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -349,12 +349,12 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/RCTWebSocket (1000.0.0): + - React-Core/RCTWebSocket (0.78.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) - RCTDeprecation - - React-Core/Default (= 1000.0.0) + - React-Core/Default (= 0.78.0-rc.1) - React-cxxreact - React-featureflags - React-hermes @@ -366,22 +366,22 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-CoreModules (1000.0.0): + - React-CoreModules (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) - RCT-Folly (= 2024.11.18.00) - - RCTTypeSafety (= 1000.0.0) - - React-Core/CoreModulesHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) + - RCTTypeSafety (= 0.78.0-rc.1) + - React-Core/CoreModulesHeaders (= 0.78.0-rc.1) + - React-jsi (= 0.78.0-rc.1) - React-jsinspector - React-NativeModulesApple - React-RCTBlob - React-RCTFBReactNativeSpec - - React-RCTImage (= 1000.0.0) + - React-RCTImage (= 0.78.0-rc.1) - ReactCommon - SocketRocket (= 0.7.1) - - React-cxxreact (1000.0.0): + - React-cxxreact (0.78.0-rc.1): - boost - DoubleConversion - fast_float (= 6.1.4) @@ -389,16 +389,16 @@ PODS: - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) - - React-callinvoker (= 1000.0.0) - - React-debug (= 1000.0.0) - - React-jsi (= 1000.0.0) + - React-callinvoker (= 0.78.0-rc.1) + - React-debug (= 0.78.0-rc.1) + - React-jsi (= 0.78.0-rc.1) - React-jsinspector - - React-logger (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - React-runtimeexecutor (= 1000.0.0) - - React-timing (= 1000.0.0) - - React-debug (1000.0.0) - - React-defaultsnativemodule (1000.0.0): + - React-logger (= 0.78.0-rc.1) + - React-perflogger (= 0.78.0-rc.1) + - React-runtimeexecutor (= 0.78.0-rc.1) + - React-timing (= 0.78.0-rc.1) + - React-debug (0.78.0-rc.1) + - React-defaultsnativemodule (0.78.0-rc.1): - hermes-engine - RCT-Folly - React-domnativemodule @@ -408,7 +408,7 @@ PODS: - React-jsiexecutor - React-microtasksnativemodule - React-RCTFBReactNativeSpec - - React-domnativemodule (1000.0.0): + - React-domnativemodule (0.78.0-rc.1): - hermes-engine - RCT-Folly - React-Fabric @@ -419,7 +419,7 @@ PODS: - React-RCTFBReactNativeSpec - ReactCommon/turbomodule/core - Yoga - - React-Fabric (1000.0.0): + - React-Fabric (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -431,22 +431,22 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/animations (= 1000.0.0) - - React-Fabric/attributedstring (= 1000.0.0) - - React-Fabric/componentregistry (= 1000.0.0) - - React-Fabric/componentregistrynative (= 1000.0.0) - - React-Fabric/components (= 1000.0.0) - - React-Fabric/consistency (= 1000.0.0) - - React-Fabric/core (= 1000.0.0) - - React-Fabric/dom (= 1000.0.0) - - React-Fabric/imagemanager (= 1000.0.0) - - React-Fabric/leakchecker (= 1000.0.0) - - React-Fabric/mounting (= 1000.0.0) - - React-Fabric/observers (= 1000.0.0) - - React-Fabric/scheduler (= 1000.0.0) - - React-Fabric/telemetry (= 1000.0.0) - - React-Fabric/templateprocessor (= 1000.0.0) - - React-Fabric/uimanager (= 1000.0.0) + - React-Fabric/animations (= 0.78.0-rc.1) + - React-Fabric/attributedstring (= 0.78.0-rc.1) + - React-Fabric/componentregistry (= 0.78.0-rc.1) + - React-Fabric/componentregistrynative (= 0.78.0-rc.1) + - React-Fabric/components (= 0.78.0-rc.1) + - React-Fabric/consistency (= 0.78.0-rc.1) + - React-Fabric/core (= 0.78.0-rc.1) + - React-Fabric/dom (= 0.78.0-rc.1) + - React-Fabric/imagemanager (= 0.78.0-rc.1) + - React-Fabric/leakchecker (= 0.78.0-rc.1) + - React-Fabric/mounting (= 0.78.0-rc.1) + - React-Fabric/observers (= 0.78.0-rc.1) + - React-Fabric/scheduler (= 0.78.0-rc.1) + - React-Fabric/telemetry (= 0.78.0-rc.1) + - React-Fabric/templateprocessor (= 0.78.0-rc.1) + - React-Fabric/uimanager (= 0.78.0-rc.1) - React-featureflags - React-graphics - React-jsi @@ -456,7 +456,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/animations (1000.0.0): + - React-Fabric/animations (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -477,7 +477,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/attributedstring (1000.0.0): + - React-Fabric/attributedstring (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -498,7 +498,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/componentregistry (1000.0.0): + - React-Fabric/componentregistry (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -519,7 +519,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/componentregistrynative (1000.0.0): + - React-Fabric/componentregistrynative (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -540,7 +540,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components (1000.0.0): + - React-Fabric/components (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -552,9 +552,9 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/components/legacyviewmanagerinterop (= 1000.0.0) - - React-Fabric/components/root (= 1000.0.0) - - React-Fabric/components/view (= 1000.0.0) + - React-Fabric/components/legacyviewmanagerinterop (= 0.78.0-rc.1) + - React-Fabric/components/root (= 0.78.0-rc.1) + - React-Fabric/components/view (= 0.78.0-rc.1) - React-featureflags - React-graphics - React-jsi @@ -564,7 +564,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/legacyviewmanagerinterop (1000.0.0): + - React-Fabric/components/legacyviewmanagerinterop (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -585,7 +585,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/root (1000.0.0): + - React-Fabric/components/root (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -606,7 +606,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/view (1000.0.0): + - React-Fabric/components/view (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -628,7 +628,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-Fabric/consistency (1000.0.0): + - React-Fabric/consistency (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -649,7 +649,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/core (1000.0.0): + - React-Fabric/core (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -670,7 +670,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/dom (1000.0.0): + - React-Fabric/dom (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -691,7 +691,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/imagemanager (1000.0.0): + - React-Fabric/imagemanager (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -712,7 +712,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/leakchecker (1000.0.0): + - React-Fabric/leakchecker (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -733,7 +733,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/mounting (1000.0.0): + - React-Fabric/mounting (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -754,7 +754,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/observers (1000.0.0): + - React-Fabric/observers (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -766,7 +766,7 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/observers/events (= 1000.0.0) + - React-Fabric/observers/events (= 0.78.0-rc.1) - React-featureflags - React-graphics - React-jsi @@ -776,7 +776,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/observers/events (1000.0.0): + - React-Fabric/observers/events (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -797,7 +797,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/scheduler (1000.0.0): + - React-Fabric/scheduler (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -820,7 +820,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/telemetry (1000.0.0): + - React-Fabric/telemetry (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -841,7 +841,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/templateprocessor (1000.0.0): + - React-Fabric/templateprocessor (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -862,7 +862,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/uimanager (1000.0.0): + - React-Fabric/uimanager (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -874,7 +874,7 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/uimanager/consistency (= 1000.0.0) + - React-Fabric/uimanager/consistency (= 0.78.0-rc.1) - React-featureflags - React-graphics - React-jsi @@ -885,7 +885,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/uimanager/consistency (1000.0.0): + - React-Fabric/uimanager/consistency (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -907,7 +907,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-FabricComponents (1000.0.0): + - React-FabricComponents (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -920,8 +920,8 @@ PODS: - React-cxxreact - React-debug - React-Fabric - - React-FabricComponents/components (= 1000.0.0) - - React-FabricComponents/textlayoutmanager (= 1000.0.0) + - React-FabricComponents/components (= 0.78.0-rc.1) + - React-FabricComponents/textlayoutmanager (= 0.78.0-rc.1) - React-featureflags - React-graphics - React-jsi @@ -932,7 +932,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-FabricComponents/components (1000.0.0): + - React-FabricComponents/components (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -945,15 +945,15 @@ PODS: - React-cxxreact - React-debug - React-Fabric - - React-FabricComponents/components/inputaccessory (= 1000.0.0) - - React-FabricComponents/components/iostextinput (= 1000.0.0) - - React-FabricComponents/components/modal (= 1000.0.0) - - React-FabricComponents/components/rncore (= 1000.0.0) - - React-FabricComponents/components/safeareaview (= 1000.0.0) - - React-FabricComponents/components/scrollview (= 1000.0.0) - - React-FabricComponents/components/text (= 1000.0.0) - - React-FabricComponents/components/textinput (= 1000.0.0) - - React-FabricComponents/components/unimplementedview (= 1000.0.0) + - React-FabricComponents/components/inputaccessory (= 0.78.0-rc.1) + - React-FabricComponents/components/iostextinput (= 0.78.0-rc.1) + - React-FabricComponents/components/modal (= 0.78.0-rc.1) + - React-FabricComponents/components/rncore (= 0.78.0-rc.1) + - React-FabricComponents/components/safeareaview (= 0.78.0-rc.1) + - React-FabricComponents/components/scrollview (= 0.78.0-rc.1) + - React-FabricComponents/components/text (= 0.78.0-rc.1) + - React-FabricComponents/components/textinput (= 0.78.0-rc.1) + - React-FabricComponents/components/unimplementedview (= 0.78.0-rc.1) - React-featureflags - React-graphics - React-jsi @@ -964,7 +964,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-FabricComponents/components/inputaccessory (1000.0.0): + - React-FabricComponents/components/inputaccessory (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -987,7 +987,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-FabricComponents/components/iostextinput (1000.0.0): + - React-FabricComponents/components/iostextinput (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -1010,7 +1010,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-FabricComponents/components/modal (1000.0.0): + - React-FabricComponents/components/modal (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -1033,7 +1033,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-FabricComponents/components/rncore (1000.0.0): + - React-FabricComponents/components/rncore (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -1056,7 +1056,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-FabricComponents/components/safeareaview (1000.0.0): + - React-FabricComponents/components/safeareaview (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -1079,7 +1079,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-FabricComponents/components/scrollview (1000.0.0): + - React-FabricComponents/components/scrollview (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -1102,7 +1102,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-FabricComponents/components/text (1000.0.0): + - React-FabricComponents/components/text (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -1125,7 +1125,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-FabricComponents/components/textinput (1000.0.0): + - React-FabricComponents/components/textinput (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -1148,7 +1148,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-FabricComponents/components/unimplementedview (1000.0.0): + - React-FabricComponents/components/unimplementedview (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -1171,7 +1171,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-FabricComponents/textlayoutmanager (1000.0.0): + - React-FabricComponents/textlayoutmanager (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -1194,29 +1194,29 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-FabricImage (1000.0.0): + - React-FabricImage (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) - glog - hermes-engine - RCT-Folly/Fabric (= 2024.11.18.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.78.0-rc.1) + - RCTTypeSafety (= 0.78.0-rc.1) - React-Fabric - React-featureflags - React-graphics - React-ImageManager - React-jsi - - React-jsiexecutor (= 1000.0.0) + - React-jsiexecutor (= 0.78.0-rc.1) - React-logger - React-rendererdebug - React-utils - ReactCommon - Yoga - - React-featureflags (1000.0.0): + - React-featureflags (0.78.0-rc.1): - RCT-Folly (= 2024.11.18.00) - - React-featureflagsnativemodule (1000.0.0): + - React-featureflagsnativemodule (0.78.0-rc.1): - hermes-engine - RCT-Folly - React-featureflags @@ -1224,7 +1224,7 @@ PODS: - React-jsiexecutor - React-RCTFBReactNativeSpec - ReactCommon/turbomodule/core - - React-graphics (1000.0.0): + - React-graphics (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -1234,20 +1234,20 @@ PODS: - React-jsi - React-jsiexecutor - React-utils - - React-hermes (1000.0.0): + - React-hermes (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) - - React-cxxreact (= 1000.0.0) + - React-cxxreact (= 0.78.0-rc.1) - React-jsi - - React-jsiexecutor (= 1000.0.0) + - React-jsiexecutor (= 0.78.0-rc.1) - React-jsinspector - - React-perflogger (= 1000.0.0) + - React-perflogger (= 0.78.0-rc.1) - React-runtimeexecutor - - React-idlecallbacksnativemodule (1000.0.0): + - React-idlecallbacksnativemodule (0.78.0-rc.1): - glog - hermes-engine - RCT-Folly @@ -1256,7 +1256,7 @@ PODS: - React-RCTFBReactNativeSpec - React-runtimescheduler - ReactCommon/turbomodule/core - - React-ImageManager (1000.0.0): + - React-ImageManager (0.78.0-rc.1): - glog - RCT-Folly/Fabric - React-Core/Default @@ -1265,7 +1265,7 @@ PODS: - React-graphics - React-rendererdebug - React-utils - - React-jserrorhandler (1000.0.0): + - React-jserrorhandler (0.78.0-rc.1): - glog - hermes-engine - RCT-Folly/Fabric (= 2024.11.18.00) @@ -1274,7 +1274,7 @@ PODS: - React-featureflags - React-jsi - ReactCommon/turbomodule/bridging - - React-jsi (1000.0.0): + - React-jsi (0.78.0-rc.1): - boost - DoubleConversion - fast_float (= 6.1.4) @@ -1282,18 +1282,18 @@ PODS: - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) - - React-jsiexecutor (1000.0.0): + - React-jsiexecutor (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) + - React-cxxreact (= 0.78.0-rc.1) + - React-jsi (= 0.78.0-rc.1) - React-jsinspector - - React-perflogger (= 1000.0.0) - - React-jsinspector (1000.0.0): + - React-perflogger (= 0.78.0-rc.1) + - React-jsinspector (0.78.0-rc.1): - DoubleConversion - glog - hermes-engine @@ -1301,25 +1301,25 @@ PODS: - React-featureflags - React-jsi - React-jsinspectortracing - - React-perflogger (= 1000.0.0) - - React-runtimeexecutor (= 1000.0.0) - - React-jsinspectortracing (1000.0.0): + - React-perflogger (= 0.78.0-rc.1) + - React-runtimeexecutor (= 0.78.0-rc.1) + - React-jsinspectortracing (0.78.0-rc.1): - RCT-Folly - - React-jsitracing (1000.0.0): + - React-jsitracing (0.78.0-rc.1): - React-jsi - - React-logger (1000.0.0): + - React-logger (0.78.0-rc.1): - glog - - React-Mapbuffer (1000.0.0): + - React-Mapbuffer (0.78.0-rc.1): - glog - React-debug - - React-microtasksnativemodule (1000.0.0): + - React-microtasksnativemodule (0.78.0-rc.1): - hermes-engine - RCT-Folly - React-jsi - React-jsiexecutor - React-RCTFBReactNativeSpec - ReactCommon/turbomodule/core - - React-NativeModulesApple (1000.0.0): + - React-NativeModulesApple (0.78.0-rc.1): - glog - hermes-engine - React-callinvoker @@ -1330,18 +1330,18 @@ PODS: - React-runtimeexecutor - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-perflogger (1000.0.0): + - React-perflogger (0.78.0-rc.1): - DoubleConversion - RCT-Folly (= 2024.11.18.00) - - React-performancetimeline (1000.0.0): + - React-performancetimeline (0.78.0-rc.1): - RCT-Folly (= 2024.11.18.00) - React-cxxreact - React-featureflags - React-jsinspectortracing - React-timing - - React-RCTActionSheet (1000.0.0): - - React-Core/RCTActionSheetHeaders (= 1000.0.0) - - React-RCTAnimation (1000.0.0): + - React-RCTActionSheet (0.78.0-rc.1): + - React-Core/RCTActionSheetHeaders (= 0.78.0-rc.1) + - React-RCTAnimation (0.78.0-rc.1): - RCT-Folly (= 2024.11.18.00) - RCTTypeSafety - React-Core/RCTAnimationHeaders @@ -1349,7 +1349,7 @@ PODS: - React-NativeModulesApple - React-RCTFBReactNativeSpec - ReactCommon - - React-RCTAppDelegate (1000.0.0): + - React-RCTAppDelegate (0.78.0-rc.1): - RCT-Folly (= 2024.11.18.00) - RCTRequired - RCTTypeSafety @@ -1373,7 +1373,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon - - React-RCTBlob (1000.0.0): + - React-RCTBlob (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -1387,7 +1387,7 @@ PODS: - React-RCTFBReactNativeSpec - React-RCTNetwork - ReactCommon - - React-RCTFabric (1000.0.0): + - React-RCTFabric (0.78.0-rc.1): - glog - hermes-engine - RCT-Folly/Fabric (= 2024.11.18.00) @@ -1410,7 +1410,7 @@ PODS: - React-runtimescheduler - React-utils - Yoga - - React-RCTFBReactNativeSpec (1000.0.0): + - React-RCTFBReactNativeSpec (0.78.0-rc.1): - hermes-engine - RCT-Folly - RCTRequired @@ -1420,7 +1420,7 @@ PODS: - React-jsiexecutor - React-NativeModulesApple - ReactCommon - - React-RCTImage (1000.0.0): + - React-RCTImage (0.78.0-rc.1): - RCT-Folly (= 2024.11.18.00) - RCTTypeSafety - React-Core/RCTImageHeaders @@ -1429,14 +1429,14 @@ PODS: - React-RCTFBReactNativeSpec - React-RCTNetwork - ReactCommon - - React-RCTLinking (1000.0.0): - - React-Core/RCTLinkingHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) + - React-RCTLinking (0.78.0-rc.1): + - React-Core/RCTLinkingHeaders (= 0.78.0-rc.1) + - React-jsi (= 0.78.0-rc.1) - React-NativeModulesApple - React-RCTFBReactNativeSpec - ReactCommon - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTNetwork (1000.0.0): + - ReactCommon/turbomodule/core (= 0.78.0-rc.1) + - React-RCTNetwork (0.78.0-rc.1): - RCT-Folly (= 2024.11.18.00) - RCTTypeSafety - React-Core/RCTNetworkHeaders @@ -1444,14 +1444,14 @@ PODS: - React-NativeModulesApple - React-RCTFBReactNativeSpec - ReactCommon - - React-RCTPushNotification (1000.0.0): + - React-RCTPushNotification (0.78.0-rc.1): - RCTTypeSafety - React-Core/RCTPushNotificationHeaders - React-jsi - React-NativeModulesApple - React-RCTFBReactNativeSpec - ReactCommon - - React-RCTSettings (1000.0.0): + - React-RCTSettings (0.78.0-rc.1): - RCT-Folly (= 2024.11.18.00) - RCTTypeSafety - React-Core/RCTSettingsHeaders @@ -1459,31 +1459,31 @@ PODS: - React-NativeModulesApple - React-RCTFBReactNativeSpec - ReactCommon - - React-RCTTest (1000.0.0): + - React-RCTTest (0.78.0-rc.1): - RCT-Folly (= 2024.11.18.00) - - React-Core (= 1000.0.0) - - React-CoreModules (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTText (1000.0.0): - - React-Core/RCTTextHeaders (= 1000.0.0) + - React-Core (= 0.78.0-rc.1) + - React-CoreModules (= 0.78.0-rc.1) + - React-jsi (= 0.78.0-rc.1) + - ReactCommon/turbomodule/core (= 0.78.0-rc.1) + - React-RCTText (0.78.0-rc.1): + - React-Core/RCTTextHeaders (= 0.78.0-rc.1) - Yoga - - React-RCTVibration (1000.0.0): + - React-RCTVibration (0.78.0-rc.1): - RCT-Folly (= 2024.11.18.00) - React-Core/RCTVibrationHeaders - React-jsi - React-NativeModulesApple - React-RCTFBReactNativeSpec - ReactCommon - - React-rendererconsistency (1000.0.0) - - React-rendererdebug (1000.0.0): + - React-rendererconsistency (0.78.0-rc.1) + - React-rendererdebug (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) - RCT-Folly (= 2024.11.18.00) - React-debug - - React-rncore (1000.0.0) - - React-RuntimeApple (1000.0.0): + - React-rncore (0.78.0-rc.1) + - React-RuntimeApple (0.78.0-rc.1): - hermes-engine - RCT-Folly/Fabric (= 2024.11.18.00) - React-callinvoker @@ -1504,7 +1504,7 @@ PODS: - React-RuntimeHermes - React-runtimescheduler - React-utils - - React-RuntimeCore (1000.0.0): + - React-RuntimeCore (0.78.0-rc.1): - glog - hermes-engine - RCT-Folly/Fabric (= 2024.11.18.00) @@ -1519,9 +1519,9 @@ PODS: - React-runtimeexecutor - React-runtimescheduler - React-utils - - React-runtimeexecutor (1000.0.0): - - React-jsi (= 1000.0.0) - - React-RuntimeHermes (1000.0.0): + - React-runtimeexecutor (0.78.0-rc.1): + - React-jsi (= 0.78.0-rc.1) + - React-RuntimeHermes (0.78.0-rc.1): - hermes-engine - RCT-Folly/Fabric (= 2024.11.18.00) - React-featureflags @@ -1531,7 +1531,7 @@ PODS: - React-jsitracing - React-RuntimeCore - React-utils - - React-runtimescheduler (1000.0.0): + - React-runtimescheduler (0.78.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -1546,16 +1546,16 @@ PODS: - React-runtimeexecutor - React-timing - React-utils - - React-timing (1000.0.0) - - React-utils (1000.0.0): + - React-timing (0.78.0-rc.1) + - React-utils (0.78.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) - React-debug - - React-jsi (= 1000.0.0) - - ReactAppDependencyProvider (1000.0.0): + - React-jsi (= 0.78.0-rc.1) + - ReactAppDependencyProvider (0.78.0-rc.1): - ReactCodegen - - ReactCodegen (1000.0.0): + - ReactCodegen (0.78.0-rc.1): - DoubleConversion - glog - hermes-engine @@ -1576,9 +1576,9 @@ PODS: - React-utils - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - ReactCommon (1000.0.0): - - ReactCommon/turbomodule (= 1000.0.0) - - ReactCommon-Samples (1000.0.0): + - ReactCommon (0.78.0-rc.1): + - ReactCommon/turbomodule (= 0.78.0-rc.1) + - ReactCommon-Samples (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -1590,48 +1590,48 @@ PODS: - React-NativeModulesApple - React-RCTFBReactNativeSpec - ReactCommon - - ReactCommon/turbomodule (1000.0.0): + - ReactCommon/turbomodule (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) - - React-callinvoker (= 1000.0.0) - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-logger (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - ReactCommon/turbomodule/bridging (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - ReactCommon/turbomodule/bridging (1000.0.0): + - React-callinvoker (= 0.78.0-rc.1) + - React-cxxreact (= 0.78.0-rc.1) + - React-jsi (= 0.78.0-rc.1) + - React-logger (= 0.78.0-rc.1) + - React-perflogger (= 0.78.0-rc.1) + - ReactCommon/turbomodule/bridging (= 0.78.0-rc.1) + - ReactCommon/turbomodule/core (= 0.78.0-rc.1) + - ReactCommon/turbomodule/bridging (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) - - React-callinvoker (= 1000.0.0) - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-logger (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - ReactCommon/turbomodule/core (1000.0.0): + - React-callinvoker (= 0.78.0-rc.1) + - React-cxxreact (= 0.78.0-rc.1) + - React-jsi (= 0.78.0-rc.1) + - React-logger (= 0.78.0-rc.1) + - React-perflogger (= 0.78.0-rc.1) + - ReactCommon/turbomodule/core (0.78.0-rc.1): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) - - React-callinvoker (= 1000.0.0) - - React-cxxreact (= 1000.0.0) - - React-debug (= 1000.0.0) - - React-featureflags (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-logger (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - React-utils (= 1000.0.0) - - ScreenshotManager (0.77.0-main): + - React-callinvoker (= 0.78.0-rc.1) + - React-cxxreact (= 0.78.0-rc.1) + - React-debug (= 0.78.0-rc.1) + - React-featureflags (= 0.78.0-rc.1) + - React-jsi (= 0.78.0-rc.1) + - React-logger (= 0.78.0-rc.1) + - React-perflogger (= 0.78.0-rc.1) + - React-utils (= 0.78.0-rc.1) + - ScreenshotManager (0.78.0-rc.1): - DoubleConversion - glog - hermes-engine @@ -1753,7 +1753,7 @@ EXTERNAL SOURCES: :podspec: "../react-native/third-party-podspecs/glog.podspec" hermes-engine: :podspec: "../react-native/sdks/hermes-engine/hermes-engine.podspec" - :tag: '' + :tag: hermes-2025-01-13-RNv0.78.0-a942ef374897d85da38e9c8904574f8376555388 MyNativeView: :path: NativeComponentExample NativeCxxModuleExample: @@ -1891,78 +1891,78 @@ SPEC CHECKSUMS: boost: 7e761d76ca2ce687f7cc98e698152abd03a18f90 DoubleConversion: cb417026b2400c8f53ae97020b2be961b59470cb fast_float: 06eeec4fe712a76acc9376682e4808b05ce978b6 - FBLazyVector: d3c2dd739a63c1a124e775df075dc7c517a719cb + FBLazyVector: ca1027b5fd51467e762a783d3dcd362fce5a6547 fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd glog: eb93e2f488219332457c3c4eafd2738ddc7e80b8 - hermes-engine: 60e4048240c6d6c4bf6fe622e6ea9a1fb6d9706d - MyNativeView: d92d8827d14b7c296f84424a8aed94fad2c689f5 - NativeCxxModuleExample: a9058817bb3f1776256d9def25c341fa1aa9cc07 + hermes-engine: 4f30ac09d90c9ea90f9e912f574c9f8110f0f32a + MyNativeView: 579fbc5b050b7e20c5ef62f6eb1dc1896db6c582 + NativeCxxModuleExample: c974a1842b9abe9f5ca18dfbdb4583dd7312203e OCMock: 589f2c84dacb1f5aaf6e4cec1f292551fe748e74 - OSSLibraryExample: fb99bfb6f1033e5ac3cc1e382343e90676cc5a7a - RCT-Folly: 36fe2295e44b10d831836cc0d1daec5f8abcf809 - RCTDeprecation: 3808e36294137f9ee5668f4df2e73dc079cd1dcf - RCTRequired: a00614e2da5344c2cda3d287050b6cee00e21dc6 - RCTTypeSafety: 459a16418c6b413060d35434ba3e83f5b0bd2651 - React: 170a01a19ba2525ab7f11243e2df6b19bf268093 - React-callinvoker: f08f425e4043cd1998a158b6e39a6aed1fd1d718 - React-Core: a1d04289bb054eb9f2de0b1ddbbd5ff22b8dbab9 - React-CoreModules: 60a8ca66ac2348dee82ecc768b4d631f02baa549 - React-cxxreact: 7d2cf5415a8e75e0d4b3e9a467e1a72c76a15a24 - React-debug: 195df38487d3f48a7af04deddeb4a5c6d4440416 - React-defaultsnativemodule: 809281bb19b5ba6aad8973694f6a73f3e10d8c5d - React-domnativemodule: 31be96c046c8537cbdf92943b07cd9fe8d830d19 - React-Fabric: 93aea764b03a651c7b103d3a07b2535c3a3c08b2 - React-FabricComponents: 5d813c8f71c50c397c7320dbf130ebffba2422a4 - React-FabricImage: be4b453a55590a65b2d35dbf956dae3a8f1853f9 - React-featureflags: 7faf26669323dc8b2869ba9d15cfa453b71685f1 - React-featureflagsnativemodule: 09e3acf24f068d883d93bbfc5a20a00d3835b6c0 - React-graphics: 1981e7fe8e9a7046577d8fc9df17c022ed927be5 - React-hermes: 695f334095ee48442dee2783970199525cecaf72 - React-idlecallbacksnativemodule: 899e0a7fc71a51f1fda81d26fea67456780e0019 - React-ImageManager: 575cefd6f3fe4a9998409eebe9c26eee9ed702f7 - React-jserrorhandler: 021a49bbc21c7612c53acb3397cd9f61e8a4db84 - React-jsi: e666d26bdc29dccfe681075979b924cbe1f183a8 - React-jsiexecutor: 7300101e6928e353da00e7d2e9647ac86b8501bc - React-jsinspector: ab0371bb964beed1af6d9bab664cc30bde684ff9 - React-jsinspectortracing: 701e33adfb5b14f0fb675a97ab2e0c63283cad43 - React-jsitracing: ef82947481b8bf7d49adbaacd8ae0e01028b8ddb - React-logger: b19e99fbaaf73d83adaca8917c133d1da71df8de - React-Mapbuffer: 11fabe7a2a035584622004cd476699897492927b - React-microtasksnativemodule: 8558ac343d183b631db1453dca484640b0eb3c05 - React-NativeModulesApple: 0596f545e307887fc7bcee2abf958190599934e1 - React-perflogger: a6ddeb969540aab135d6adbaa132938518587f63 - React-performancetimeline: bbdd8e1bc2c06d5fe7e3f37c37e47f21a87d02d9 - React-RCTActionSheet: 1bf8cc8086ad1c15da3407dfb7bc9dd94dc7595d - React-RCTAnimation: ac4a08b91b12a5d61e522698162d92a52581dcc5 - React-RCTAppDelegate: 148645da9bc427c825da55d2b63686545ca463f3 - React-RCTBlob: 310559ebf6e64228675806a145f43aa7197a9d14 - React-RCTFabric: 64387d220300433e81bb4cc045bcd53b114215dc - React-RCTFBReactNativeSpec: 5ac2a4a112a4fdd830bf33816563cee67b0793f6 - React-RCTImage: d84619c84f38ba644ec0d6fb8049cee8435b28c3 - React-RCTLinking: 4b179cdacf8dfab5ee483546ff9353797361f520 - React-RCTNetwork: 830b1da36cd5950b88248e1cb4a939906d1f28e4 - React-RCTPushNotification: c9868b10d51b51081cdcec5833cc9567bfc27b59 - React-RCTSettings: 9ff4d7a991f6199eafa3dfde10c138fe96f1731d - React-RCTTest: b3b23ad60a85dc33e5b48ffaf9a4694a0cea23e6 - React-RCTText: e5a08c3829b35f1db001c9cbdf1917936f5dbd25 - React-RCTVibration: 0a46dd90d07c0e6323781b0b67829932a53e0c44 - React-rendererconsistency: 777c894edc43dde01499189917ac54ee76ae6a6a - React-rendererdebug: 5578683edef6807f7b01c90d0d4981409abce41c - React-rncore: 4a81ce7b8e47448973a6b29c765b07e01715921e - React-RuntimeApple: 6c664f1800a3dee277af5efa6b82fb7a08fd78ee - React-RuntimeCore: 378bf39635fe0b6c7ef10aa8dd222e08ca093081 - React-runtimeexecutor: fb2d342a477bb13f7128cceb711ee8311edce0c0 - React-RuntimeHermes: d2ae89cd74457bfe5790287d29fa0848bc89ed0c - React-runtimescheduler: 78f50328f9c9b6d39dbee4b193145b9e84e77433 - React-timing: 9d49179631e5e3c759e6e82d4c613c73da80a144 - React-utils: 1a450d57b1bdf1c6946b36ce16f33e897d110b6b - ReactAppDependencyProvider: d62d00ee22412c6ac6074ea5e220a6a26737cdab - ReactCodegen: 7cfa434acb2911bda43c92149ea7a6b7935bb696 - ReactCommon: 86a4859be6f6455e177185a1bcfefd43477f859a - ReactCommon-Samples: 921a9a38ed66f267559171430ae000a5aa0973d8 - ScreenshotManager: 6c5a166001490d34391f6d7c441409849544f730 + OSSLibraryExample: 31a75de6272cafe760ba4f3b6e8a582c8d3c1bf7 + RCT-Folly: e78785aa9ba2ed998ea4151e314036f6c49e6d82 + RCTDeprecation: d26f07b97b34d9e9c93d09b95c3f7f2380f797b4 + RCTRequired: 00b12066335e477c039c631fdd7a6f2b768e573b + RCTTypeSafety: 51115e55fba96189d1d7dc435bfb56adbf7cc393 + React: a2329b41c7889da4848b05f186c00993f6c21180 + React-callinvoker: 6b8f4eee747a0f7e94a93a96c9a70a5abe64d678 + React-Core: a3568149feee0488020cf58eddaa9b3713686121 + React-CoreModules: 2762a77dfb728d64fa1b8de37e32b014fe203eb2 + React-cxxreact: 8b21f790ca1d992cd2c47494f20a60f5228fb120 + React-debug: 3598ecaaddcaf176b9ba706f6ebb729014bde1f5 + React-defaultsnativemodule: c63420c2e6597a1a7d8630190c68ee11c294e284 + React-domnativemodule: 41832975e89859c154e7cdfecb127d10d1f0e109 + React-Fabric: b5b0ac7d8e77b4599a560f63e9f7336b4fe41bae + React-FabricComponents: 89d6a42300a33316f388b9436095e448104595eb + React-FabricImage: 00790a9fb6fdc38f003c4e6be5eab9287ce44c8b + React-featureflags: cd67232d473b287337b6f28c40d8b7ef6c7d2ab4 + React-featureflagsnativemodule: dda07acf88c3124606fed904940721376219c49d + React-graphics: dfdc123688da49608ffd7947f906787f2220b979 + React-hermes: 7f8a11fded0388dbfe72fdbbac3cab240cf661e0 + React-idlecallbacksnativemodule: 62b10e54550763e56836826c82a5166941b177bf + React-ImageManager: 6c30d61bcae05a1dd0833ecc59e3dbb3d964dbdd + React-jserrorhandler: 1b911b1df322e3c3c88ffbe3cd91a65cd2355e32 + React-jsi: 30ecca0aca80da9f253bfcf8fdeb06ed82f1fbd2 + React-jsiexecutor: dbb1ca80012a48ab4697a66512d202b2e55c1871 + React-jsinspector: 9253f30933a78e135f4b510a4fabc1ea3a8f59ab + React-jsinspectortracing: 07c872d22af2838772607494b467d2def2e80363 + React-jsitracing: 90877d4bb4a897cf6e0075eead332650e50a820a + React-logger: 8d96a93e2071ea8769e125ad1f2b919e09fc653e + React-Mapbuffer: 0052ee03ceb290b74a531e48529a7f90b1b7e49f + React-microtasksnativemodule: 7348e24320f3b8af4f230ee6d8b895161ea1ee81 + React-NativeModulesApple: 54d2c2ee150632222746bb11ac8cc46e60946691 + React-perflogger: 596f6443f9536ca01a24398d231abfd2122418d9 + React-performancetimeline: 14615e28d3ebe9c9c7fddb73c85af0e6e23d1083 + React-RCTActionSheet: 45e28202a7986b70434d2375fc02ee68b1f87082 + React-RCTAnimation: 7e7f94815c0886f110aa3f107155009cc6eb2895 + React-RCTAppDelegate: 6c9e993b386844593b020178d2302e7fdabbab30 + React-RCTBlob: 4050ee867ae16d92e7764ba86c4dbf13c17d4b42 + React-RCTFabric: 453e88d905c6a9c185627262ed0a2ab3ae0b3144 + React-RCTFBReactNativeSpec: d8595cecbef8ee1eccba968905313a4e5398353c + React-RCTImage: b843589d5e34041110656e2bdbaacc097f3cdd7e + React-RCTLinking: aba38f49076140d9fec95ec281f94b38629e0dec + React-RCTNetwork: d9515648fab0128c4c01327774c855f294d6ee5d + React-RCTPushNotification: e938260640cd733989ab552c2efe262e2a7f4a17 + React-RCTSettings: 4cde0079a2cfe6552d65d75bf3080ac40018dacc + React-RCTTest: fadae7ee56fae17f679e8a26f389aed00e1fdaaf + React-RCTText: 0aa8cfdb28486bedd839cbe46e405ec77e85410f + React-RCTVibration: 0b1117ad7ec1b7a2b3b526f9e6f7f958ce65efe5 + React-rendererconsistency: 3aa947ecc01022afc3d530821aca461284494878 + React-rendererdebug: bdada0b4b5c1bd64bb595dec0d6dc651d4e5a039 + React-rncore: 96c83d7dade700003320265380b7c4741af60ca6 + React-RuntimeApple: 510e9496603998489e7485e4775f5fbecec0d3e9 + React-RuntimeCore: 76909a8e030528132bc064583d91fddf9214cfd9 + React-runtimeexecutor: f8f51e274459fecb12ee60727b4f5067484ad053 + React-RuntimeHermes: d46795aa1cf5b86c33f5e0e885fcac2754db90b6 + React-runtimescheduler: 15edb80188be32faadd92106d2ddee2c6e810fe2 + React-timing: 16de18b703b05422a277c84e66bc1b1dbb3d1d20 + React-utils: 029acb2f254deb800a5a279f92a2c3fee80f7267 + ReactAppDependencyProvider: d8c8d73e775f7e367e65b629d0dedcb830e490d5 + ReactCodegen: d6893f46b61542453a3a5cefea434922ae4bff9f + ReactCommon: c99ace9bc7fd37ab0860e05b84758770a5193861 + ReactCommon-Samples: efd28144639ba2372a36a346e6f7a47920887b2b + ScreenshotManager: 0ccb24ae0229c095708d8637953acce967fcdfdb SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 - Yoga: 216ee0d4bcba7186f47624eeac1477a068bceea0 + Yoga: d7af68bbe88ef55fd73754fe6942746eff12919c PODFILE CHECKSUM: 8591f96a513620a2a83a0b9a125ad3fa32ea1369 From 8207a091078e201f5a037d6ae07f9f0e329fb17d Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Thu, 23 Jan 2025 11:37:16 -0800 Subject: [PATCH 012/108] Fix images not displayed when extension is implicit (#48888) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48888 We have a report from OSS where Images are not displayed properly in case they are saved on disk with no extension. We previously had a fix attempt iwith [this pr](https://github.com/facebook/react-native/pull/46971), but this was breaking some internal apps. This second attempt should work for both cases. ## Changelog: [iOS][Fixed] - Load images even when the extension is implicit Reviewed By: cortinico Differential Revision: D68555813 fbshipit-source-id: bc25970aafe3e6e5284163b663d36e00b3df3d82 --- .../react-native/Libraries/Image/RCTImageLoader.mm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/react-native/Libraries/Image/RCTImageLoader.mm b/packages/react-native/Libraries/Image/RCTImageLoader.mm index 68a12d351227ef..3caaf7bdf10a0b 100644 --- a/packages/react-native/Libraries/Image/RCTImageLoader.mm +++ b/packages/react-native/Libraries/Image/RCTImageLoader.mm @@ -477,7 +477,15 @@ - (RCTImageURLLoaderRequest *)_loadImageOrDataWithURLRequest:(NSURLRequest *)req // Add missing png extension if (request.URL.fileURL && request.URL.pathExtension.length == 0) { - mutableRequest.URL = [request.URL URLByAppendingPathExtension:@"png"]; + // Check if there exists a file with that url on disk already + // This should fix issue https://github.com/facebook/react-native/issues/46870 + if ([[NSFileManager defaultManager] fileExistsAtPath:request.URL.path]) { + mutableRequest.URL = request.URL; + } else { + // This is the default behavior in case there is no file on disk with no extension. + // We assume that the extension is `png`. + mutableRequest.URL = [request.URL URLByAppendingPathExtension:@"png"]; + } } if (_redirectDelegate != nil) { mutableRequest.URL = [_redirectDelegate redirectAssetsURL:mutableRequest.URL]; From 465f49ea2a5f3ba85f253f2c061b34b8bceefef7 Mon Sep 17 00:00:00 2001 From: React Native Bot Date: Tue, 28 Jan 2025 13:44:52 +0000 Subject: [PATCH 013/108] Release 0.78.0-rc.2 #publish-packages-to-npm&next --- package.json | 4 ++-- packages/assets/package.json | 2 +- packages/babel-plugin-codegen/package.json | 4 ++-- packages/community-cli-plugin/package.json | 6 +++--- packages/core-cli-utils/package.json | 2 +- packages/debugger-frontend/package.json | 2 +- packages/dev-middleware/package.json | 4 ++-- packages/eslint-config-react-native/package.json | 4 ++-- packages/eslint-plugin-react-native/package.json | 2 +- packages/eslint-plugin-specs/package.json | 4 ++-- packages/gradle-plugin/package.json | 2 +- packages/helloworld/package.json | 12 ++++++------ packages/metro-config/package.json | 6 +++--- packages/normalize-color/package.json | 2 +- packages/polyfills/package.json | 2 +- packages/react-native-babel-preset/package.json | 4 ++-- .../react-native-babel-transformer/package.json | 4 ++-- packages/react-native-bots/package.json | 2 +- .../package.json | 4 ++-- packages/react-native-codegen/package.json | 2 +- packages/react-native-fantom/package.json | 2 +- packages/react-native-info/package.json | 2 +- .../react-native-popup-menu-android/package.json | 4 ++-- packages/react-native-test-library/package.json | 6 +++--- .../Libraries/Core/ReactNativeVersion.js | 2 +- packages/react-native/React/Base/RCTVersion.m | 2 +- .../react-native/ReactAndroid/gradle.properties | 2 +- .../modules/systeminfo/ReactNativeVersion.java | 2 +- .../ReactCommon/cxxreact/ReactNativeVersion.h | 2 +- packages/react-native/package.json | 16 ++++++++-------- packages/rn-tester/package.json | 6 +++--- packages/typescript-config/package.json | 2 +- packages/virtualized-lists/package.json | 2 +- 33 files changed, 62 insertions(+), 62 deletions(-) diff --git a/package.json b/package.json index 64312ff6935709..43aec7e0fe2abd 100644 --- a/package.json +++ b/package.json @@ -49,8 +49,8 @@ "@babel/preset-flow": "^7.24.7", "@definitelytyped/dtslint": "^0.0.127", "@jest/create-cache-key-function": "^29.6.3", - "@react-native/metro-babel-transformer": "0.78.0-rc.1", - "@react-native/metro-config": "0.78.0-rc.1", + "@react-native/metro-babel-transformer": "0.78.0-rc.2", + "@react-native/metro-config": "0.78.0-rc.2", "@tsconfig/node18": "1.0.1", "@types/react": "^19.0.0", "@typescript-eslint/parser": "^7.1.1", diff --git a/packages/assets/package.json b/packages/assets/package.json index 51bc46ba664420..d5c8f2bb39b5f2 100644 --- a/packages/assets/package.json +++ b/packages/assets/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/assets-registry", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "description": "Asset support code for React Native.", "license": "MIT", "repository": { diff --git a/packages/babel-plugin-codegen/package.json b/packages/babel-plugin-codegen/package.json index 7fa3ae8535d5cc..ad4ae4a779b79e 100644 --- a/packages/babel-plugin-codegen/package.json +++ b/packages/babel-plugin-codegen/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/babel-plugin-codegen", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "description": "Babel plugin to generate native module and view manager code for React Native.", "license": "MIT", "repository": { @@ -26,7 +26,7 @@ ], "dependencies": { "@babel/traverse": "^7.25.3", - "@react-native/codegen": "0.78.0-rc.1" + "@react-native/codegen": "0.78.0-rc.2" }, "devDependencies": { "@babel/core": "^7.25.2" diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index a6049e1448b44d..c69aa72eb2d8a6 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/community-cli-plugin", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "description": "Core CLI commands for React Native", "keywords": [ "react-native", @@ -22,8 +22,8 @@ "dist" ], "dependencies": { - "@react-native/dev-middleware": "0.78.0-rc.1", - "@react-native/metro-babel-transformer": "0.78.0-rc.1", + "@react-native/dev-middleware": "0.78.0-rc.2", + "@react-native/metro-babel-transformer": "0.78.0-rc.2", "chalk": "^4.0.0", "debug": "^2.2.0", "invariant": "^2.2.4", diff --git a/packages/core-cli-utils/package.json b/packages/core-cli-utils/package.json index 07c44c3e4061e5..287cc53a9964ea 100644 --- a/packages/core-cli-utils/package.json +++ b/packages/core-cli-utils/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/core-cli-utils", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "description": "React Native CLI library for Frameworks to build on", "license": "MIT", "main": "./src/index.flow.js", diff --git a/packages/debugger-frontend/package.json b/packages/debugger-frontend/package.json index b8164d4c8e4427..522d5b978b40a8 100644 --- a/packages/debugger-frontend/package.json +++ b/packages/debugger-frontend/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/debugger-frontend", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "description": "Debugger frontend for React Native based on Chrome DevTools", "keywords": [ "react-native", diff --git a/packages/dev-middleware/package.json b/packages/dev-middleware/package.json index 10028055091020..6cc9601f007611 100644 --- a/packages/dev-middleware/package.json +++ b/packages/dev-middleware/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/dev-middleware", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "description": "Dev server middleware for React Native", "keywords": [ "react-native", @@ -23,7 +23,7 @@ ], "dependencies": { "@isaacs/ttlcache": "^1.4.1", - "@react-native/debugger-frontend": "0.78.0-rc.1", + "@react-native/debugger-frontend": "0.78.0-rc.2", "chrome-launcher": "^0.15.2", "chromium-edge-launcher": "^0.2.0", "connect": "^3.6.5", diff --git a/packages/eslint-config-react-native/package.json b/packages/eslint-config-react-native/package.json index 35b06f542ea9b9..d0c75fb173d7f1 100644 --- a/packages/eslint-config-react-native/package.json +++ b/packages/eslint-config-react-native/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/eslint-config", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "description": "ESLint config for React Native", "license": "MIT", "repository": { @@ -22,7 +22,7 @@ "dependencies": { "@babel/core": "^7.25.2", "@babel/eslint-parser": "^7.25.1", - "@react-native/eslint-plugin": "0.78.0-rc.1", + "@react-native/eslint-plugin": "0.78.0-rc.2", "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", "eslint-config-prettier": "^8.5.0", diff --git a/packages/eslint-plugin-react-native/package.json b/packages/eslint-plugin-react-native/package.json index 77d24670bb3d06..0767743475bb85 100644 --- a/packages/eslint-plugin-react-native/package.json +++ b/packages/eslint-plugin-react-native/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/eslint-plugin", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "description": "ESLint rules for @react-native/eslint-config", "license": "MIT", "repository": { diff --git a/packages/eslint-plugin-specs/package.json b/packages/eslint-plugin-specs/package.json index f7407e8e73b6cb..175a9d86157de2 100644 --- a/packages/eslint-plugin-specs/package.json +++ b/packages/eslint-plugin-specs/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/eslint-plugin-specs", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "description": "ESLint rules to validate NativeModule and Component Specs", "license": "MIT", "repository": { @@ -26,7 +26,7 @@ "dependencies": { "@babel/core": "^7.25.2", "@babel/plugin-transform-flow-strip-types": "^7.25.2", - "@react-native/codegen": "0.78.0-rc.1", + "@react-native/codegen": "0.78.0-rc.2", "make-dir": "^2.1.0", "pirates": "^4.0.1", "source-map-support": "0.5.0" diff --git a/packages/gradle-plugin/package.json b/packages/gradle-plugin/package.json index 7a8d1a9fe5625f..95cd7e4358aceb 100644 --- a/packages/gradle-plugin/package.json +++ b/packages/gradle-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/gradle-plugin", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "description": "Gradle Plugin for React Native", "license": "MIT", "repository": { diff --git a/packages/helloworld/package.json b/packages/helloworld/package.json index f0f14a4399b772..6a6fa59aeb3d4f 100644 --- a/packages/helloworld/package.json +++ b/packages/helloworld/package.json @@ -1,6 +1,6 @@ { "name": "helloworld", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "private": true, "scripts": { "bootstrap": "node ./cli.js bootstrap", @@ -13,16 +13,16 @@ }, "dependencies": { "react": "19.0.0", - "react-native": "0.78.0-rc.1" + "react-native": "0.78.0-rc.2" }, "devDependencies": { "@babel/core": "^7.25.2", "@babel/preset-env": "^7.25.3", "@babel/runtime": "^7.25.0", - "@react-native/babel-preset": "0.78.0-rc.1", - "@react-native/core-cli-utils": "0.78.0-rc.1", - "@react-native/eslint-config": "0.78.0-rc.1", - "@react-native/metro-config": "0.78.0-rc.1", + "@react-native/babel-preset": "0.78.0-rc.2", + "@react-native/core-cli-utils": "0.78.0-rc.2", + "@react-native/eslint-config": "0.78.0-rc.2", + "@react-native/metro-config": "0.78.0-rc.2", "chalk": "^4.1.2", "commander": "^12.0.0", "eslint": "^8.19.0", diff --git a/packages/metro-config/package.json b/packages/metro-config/package.json index 1aeb86b4668f28..4b868dfafcf82e 100644 --- a/packages/metro-config/package.json +++ b/packages/metro-config/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/metro-config", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "description": "Metro configuration for React Native.", "license": "MIT", "repository": { @@ -26,8 +26,8 @@ "dist" ], "dependencies": { - "@react-native/js-polyfills": "0.78.0-rc.1", - "@react-native/metro-babel-transformer": "0.78.0-rc.1", + "@react-native/js-polyfills": "0.78.0-rc.2", + "@react-native/metro-babel-transformer": "0.78.0-rc.2", "metro-config": "^0.81.0", "metro-runtime": "^0.81.0" } diff --git a/packages/normalize-color/package.json b/packages/normalize-color/package.json index ccbc86cc7596fc..50ddd17138a027 100644 --- a/packages/normalize-color/package.json +++ b/packages/normalize-color/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/normalize-colors", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "description": "Color normalization for React Native.", "license": "MIT", "repository": { diff --git a/packages/polyfills/package.json b/packages/polyfills/package.json index b2d11dab182a81..6b6b8bb8369593 100644 --- a/packages/polyfills/package.json +++ b/packages/polyfills/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/js-polyfills", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "description": "Polyfills for React Native.", "license": "MIT", "repository": { diff --git a/packages/react-native-babel-preset/package.json b/packages/react-native-babel-preset/package.json index fd2b977b6c7506..43a3592a37bc96 100644 --- a/packages/react-native-babel-preset/package.json +++ b/packages/react-native-babel-preset/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/babel-preset", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "description": "Babel preset for React Native applications", "main": "src/index.js", "repository": { @@ -55,7 +55,7 @@ "@babel/plugin-transform-typescript": "^7.25.2", "@babel/plugin-transform-unicode-regex": "^7.24.7", "@babel/template": "^7.25.0", - "@react-native/babel-plugin-codegen": "0.78.0-rc.1", + "@react-native/babel-plugin-codegen": "0.78.0-rc.2", "babel-plugin-syntax-hermes-parser": "0.25.1", "babel-plugin-transform-flow-enums": "^0.0.2", "react-refresh": "^0.14.0" diff --git a/packages/react-native-babel-transformer/package.json b/packages/react-native-babel-transformer/package.json index f52894b803e6c9..75ce4ff0b21d71 100644 --- a/packages/react-native-babel-transformer/package.json +++ b/packages/react-native-babel-transformer/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/metro-babel-transformer", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "description": "Babel transformer for React Native applications.", "main": "src/index.js", "repository": { @@ -16,7 +16,7 @@ "license": "MIT", "dependencies": { "@babel/core": "^7.25.2", - "@react-native/babel-preset": "0.78.0-rc.1", + "@react-native/babel-preset": "0.78.0-rc.2", "hermes-parser": "0.25.1", "nullthrows": "^1.1.1" }, diff --git a/packages/react-native-bots/package.json b/packages/react-native-bots/package.json index cebb0fd8c34885..af535b3ad75c1d 100644 --- a/packages/react-native-bots/package.json +++ b/packages/react-native-bots/package.json @@ -1,7 +1,7 @@ { "name": "@react-native/bots", "description": "React Native Bots", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "private": true, "license": "MIT", "repository": { diff --git a/packages/react-native-codegen-typescript-test/package.json b/packages/react-native-codegen-typescript-test/package.json index 8a4d8488c56d5e..6cdfce7cccc1fd 100644 --- a/packages/react-native-codegen-typescript-test/package.json +++ b/packages/react-native-codegen-typescript-test/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/codegen-typescript-test", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "private": true, "description": "TypeScript related unit test for @react-native/codegen", "license": "MIT", @@ -19,7 +19,7 @@ "prepare": "yarn run build" }, "dependencies": { - "@react-native/codegen": "0.78.0-rc.1" + "@react-native/codegen": "0.78.0-rc.2" }, "devDependencies": { "@babel/core": "^7.25.2", diff --git a/packages/react-native-codegen/package.json b/packages/react-native-codegen/package.json index 18b366191bb556..f2c726ef6794ed 100644 --- a/packages/react-native-codegen/package.json +++ b/packages/react-native-codegen/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/codegen", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "description": "Code generation tools for React Native", "license": "MIT", "repository": { diff --git a/packages/react-native-fantom/package.json b/packages/react-native-fantom/package.json index a41c36feaa48be..420b02cbb648ae 100644 --- a/packages/react-native-fantom/package.json +++ b/packages/react-native-fantom/package.json @@ -1,7 +1,7 @@ { "name": "@react-native/fantom", "private": true, - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "main": "src/index.js", "description": "Internal integration testing and benchmarking tool for React Native", "peerDependencies": { diff --git a/packages/react-native-info/package.json b/packages/react-native-info/package.json index d86a7e7ab69811..94580f122f138b 100644 --- a/packages/react-native-info/package.json +++ b/packages/react-native-info/package.json @@ -1,6 +1,6 @@ { "name": "react-native-info", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "main": "build/index.js", "license": "MIT", "private": true, diff --git a/packages/react-native-popup-menu-android/package.json b/packages/react-native-popup-menu-android/package.json index b28666f0d64471..935b95640a45cc 100644 --- a/packages/react-native-popup-menu-android/package.json +++ b/packages/react-native-popup-menu-android/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/popup-menu-android", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "description": "PopupMenu for the Android platform", "main": "index.js", "files": [ @@ -17,7 +17,7 @@ ], "license": "MIT", "devDependencies": { - "@react-native/codegen": "0.78.0-rc.1" + "@react-native/codegen": "0.78.0-rc.2" }, "peerDependencies": { "@types/react": "^19.0.0", diff --git a/packages/react-native-test-library/package.json b/packages/react-native-test-library/package.json index c73b95f604ba2f..5584d61b312e19 100644 --- a/packages/react-native-test-library/package.json +++ b/packages/react-native-test-library/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/oss-library-example", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "private": true, "description": "Package that includes native module exapmle, native component example, targets both the old and the new architecture. It should serve as an example of a real-world OSS library.", "license": "MIT", @@ -26,8 +26,8 @@ ], "devDependencies": { "@babel/core": "^7.25.2", - "@react-native/babel-preset": "0.78.0-rc.1", - "react-native": "0.78.0-rc.1" + "@react-native/babel-preset": "0.78.0-rc.2", + "react-native": "0.78.0-rc.2" }, "peerDependencies": { "react": "*", diff --git a/packages/react-native/Libraries/Core/ReactNativeVersion.js b/packages/react-native/Libraries/Core/ReactNativeVersion.js index daa82a6d720ddb..236be4534b38f6 100644 --- a/packages/react-native/Libraries/Core/ReactNativeVersion.js +++ b/packages/react-native/Libraries/Core/ReactNativeVersion.js @@ -17,7 +17,7 @@ const version: $ReadOnly<{ major: 0, minor: 78, patch: 0, - prerelease: 'rc.1', + prerelease: 'rc.2', }; module.exports = {version}; diff --git a/packages/react-native/React/Base/RCTVersion.m b/packages/react-native/React/Base/RCTVersion.m index a00ef40704f467..e0de3e54f41de1 100644 --- a/packages/react-native/React/Base/RCTVersion.m +++ b/packages/react-native/React/Base/RCTVersion.m @@ -24,7 +24,7 @@ RCTVersionMajor: @(0), RCTVersionMinor: @(78), RCTVersionPatch: @(0), - RCTVersionPrerelease: @"rc.1", + RCTVersionPrerelease: @"rc.2", }; }); return __rnVersion; diff --git a/packages/react-native/ReactAndroid/gradle.properties b/packages/react-native/ReactAndroid/gradle.properties index 1646810a2f5ed3..f8f06ca872d92f 100644 --- a/packages/react-native/ReactAndroid/gradle.properties +++ b/packages/react-native/ReactAndroid/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=0.78.0-rc.1 +VERSION_NAME=0.78.0-rc.2 react.internal.publishingGroup=com.facebook.react android.useAndroidX=true diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java index cdd6aa919f4bc1..17b63d7473817e 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java @@ -18,5 +18,5 @@ public class ReactNativeVersion { "major", 0, "minor", 78, "patch", 0, - "prerelease", "rc.1"); + "prerelease", "rc.2"); } diff --git a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h index 19f0768ab1b80f..79d00ca65a5eb8 100644 --- a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h +++ b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h @@ -18,7 +18,7 @@ constexpr struct { int32_t Major = 0; int32_t Minor = 78; int32_t Patch = 0; - std::string_view Prerelease = "rc.1"; + std::string_view Prerelease = "rc.2"; } ReactNativeVersion; } // namespace facebook::react diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 2947323b6f0ec0..0a4381dd15353a 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -1,6 +1,6 @@ { "name": "react-native", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "description": "A framework for building native apps using React", "license": "MIT", "repository": { @@ -108,13 +108,13 @@ }, "dependencies": { "@jest/create-cache-key-function": "^29.6.3", - "@react-native/assets-registry": "0.78.0-rc.1", - "@react-native/codegen": "0.78.0-rc.1", - "@react-native/community-cli-plugin": "0.78.0-rc.1", - "@react-native/gradle-plugin": "0.78.0-rc.1", - "@react-native/js-polyfills": "0.78.0-rc.1", - "@react-native/normalize-colors": "0.78.0-rc.1", - "@react-native/virtualized-lists": "0.78.0-rc.1", + "@react-native/assets-registry": "0.78.0-rc.2", + "@react-native/codegen": "0.78.0-rc.2", + "@react-native/community-cli-plugin": "0.78.0-rc.2", + "@react-native/gradle-plugin": "0.78.0-rc.2", + "@react-native/js-polyfills": "0.78.0-rc.2", + "@react-native/normalize-colors": "0.78.0-rc.2", + "@react-native/virtualized-lists": "0.78.0-rc.2", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", diff --git a/packages/rn-tester/package.json b/packages/rn-tester/package.json index 7be3da5c01a8b7..680e9553276b51 100644 --- a/packages/rn-tester/package.json +++ b/packages/rn-tester/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/tester", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "private": true, "description": "React Native tester app.", "license": "MIT", @@ -27,8 +27,8 @@ "e2e-test-ios": "./scripts/maestro-test-ios.sh" }, "dependencies": { - "@react-native/oss-library-example": "0.78.0-rc.1", - "@react-native/popup-menu-android": "0.78.0-rc.1", + "@react-native/oss-library-example": "0.78.0-rc.2", + "@react-native/popup-menu-android": "0.78.0-rc.2", "flow-enums-runtime": "^0.0.6", "invariant": "^2.2.4", "nullthrows": "^1.1.1" diff --git a/packages/typescript-config/package.json b/packages/typescript-config/package.json index 7491e05f8b293d..d8532010eced85 100644 --- a/packages/typescript-config/package.json +++ b/packages/typescript-config/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/typescript-config", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "description": "Default TypeScript configuration for React Native apps", "license": "MIT", "repository": { diff --git a/packages/virtualized-lists/package.json b/packages/virtualized-lists/package.json index ce42e09b3e216a..8e8a12a9d324f7 100644 --- a/packages/virtualized-lists/package.json +++ b/packages/virtualized-lists/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/virtualized-lists", - "version": "0.78.0-rc.1", + "version": "0.78.0-rc.2", "description": "Virtualized lists for React Native.", "license": "MIT", "repository": { From 76da20aab41f910f0d45fdbd90db6713536a39e3 Mon Sep 17 00:00:00 2001 From: Fabrizio Cucci Date: Wed, 29 Jan 2025 11:42:42 +0000 Subject: [PATCH 014/108] Update Podfile.lock Changelog: [Internal] --- packages/rn-tester/Podfile.lock | 578 ++++++++++++++++---------------- 1 file changed, 289 insertions(+), 289 deletions(-) diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index 00850e0a1ae3d6..29be3021c52501 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -2,13 +2,13 @@ PODS: - boost (1.84.0) - DoubleConversion (1.1.6) - fast_float (6.1.4) - - FBLazyVector (0.78.0-rc.1) + - FBLazyVector (0.78.0-rc.2) - fmt (11.0.2) - glog (0.3.5) - - hermes-engine (0.78.0-rc.1): - - hermes-engine/Pre-built (= 0.78.0-rc.1) - - hermes-engine/Pre-built (0.78.0-rc.1) - - MyNativeView (0.78.0-rc.1): + - hermes-engine (0.78.0-rc.2): + - hermes-engine/Pre-built (= 0.78.0-rc.2) + - hermes-engine/Pre-built (0.78.0-rc.2) + - MyNativeView (0.78.0-rc.2): - DoubleConversion - glog - hermes-engine @@ -29,7 +29,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - NativeCxxModuleExample (0.78.0-rc.1): + - NativeCxxModuleExample (0.78.0-rc.2): - DoubleConversion - glog - hermes-engine @@ -51,7 +51,7 @@ PODS: - ReactCommon/turbomodule/core - Yoga - OCMock (3.9.4) - - OSSLibraryExample (0.78.0-rc.1): + - OSSLibraryExample (0.78.0-rc.2): - DoubleConversion - glog - hermes-engine @@ -91,32 +91,32 @@ PODS: - fast_float (= 6.1.4) - fmt (= 11.0.2) - glog - - RCTDeprecation (0.78.0-rc.1) - - RCTRequired (0.78.0-rc.1) - - RCTTypeSafety (0.78.0-rc.1): - - FBLazyVector (= 0.78.0-rc.1) - - RCTRequired (= 0.78.0-rc.1) - - React-Core (= 0.78.0-rc.1) - - React (0.78.0-rc.1): - - React-Core (= 0.78.0-rc.1) - - React-Core/DevSupport (= 0.78.0-rc.1) - - React-Core/RCTWebSocket (= 0.78.0-rc.1) - - React-RCTActionSheet (= 0.78.0-rc.1) - - React-RCTAnimation (= 0.78.0-rc.1) - - React-RCTBlob (= 0.78.0-rc.1) - - React-RCTImage (= 0.78.0-rc.1) - - React-RCTLinking (= 0.78.0-rc.1) - - React-RCTNetwork (= 0.78.0-rc.1) - - React-RCTSettings (= 0.78.0-rc.1) - - React-RCTText (= 0.78.0-rc.1) - - React-RCTVibration (= 0.78.0-rc.1) - - React-callinvoker (0.78.0-rc.1) - - React-Core (0.78.0-rc.1): + - RCTDeprecation (0.78.0-rc.2) + - RCTRequired (0.78.0-rc.2) + - RCTTypeSafety (0.78.0-rc.2): + - FBLazyVector (= 0.78.0-rc.2) + - RCTRequired (= 0.78.0-rc.2) + - React-Core (= 0.78.0-rc.2) + - React (0.78.0-rc.2): + - React-Core (= 0.78.0-rc.2) + - React-Core/DevSupport (= 0.78.0-rc.2) + - React-Core/RCTWebSocket (= 0.78.0-rc.2) + - React-RCTActionSheet (= 0.78.0-rc.2) + - React-RCTAnimation (= 0.78.0-rc.2) + - React-RCTBlob (= 0.78.0-rc.2) + - React-RCTImage (= 0.78.0-rc.2) + - React-RCTLinking (= 0.78.0-rc.2) + - React-RCTNetwork (= 0.78.0-rc.2) + - React-RCTSettings (= 0.78.0-rc.2) + - React-RCTText (= 0.78.0-rc.2) + - React-RCTVibration (= 0.78.0-rc.2) + - React-callinvoker (0.78.0-rc.2) + - React-Core (0.78.0-rc.2): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) - RCTDeprecation - - React-Core/Default (= 0.78.0-rc.1) + - React-Core/Default (= 0.78.0-rc.2) - React-cxxreact - React-featureflags - React-hermes @@ -128,7 +128,7 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/CoreModulesHeaders (0.78.0-rc.1): + - React-Core/CoreModulesHeaders (0.78.0-rc.2): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -145,7 +145,7 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/Default (0.78.0-rc.1): + - React-Core/Default (0.78.0-rc.2): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -161,13 +161,13 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/DevSupport (0.78.0-rc.1): + - React-Core/DevSupport (0.78.0-rc.2): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) - RCTDeprecation - - React-Core/Default (= 0.78.0-rc.1) - - React-Core/RCTWebSocket (= 0.78.0-rc.1) + - React-Core/Default (= 0.78.0-rc.2) + - React-Core/RCTWebSocket (= 0.78.0-rc.2) - React-cxxreact - React-featureflags - React-hermes @@ -179,7 +179,7 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/RCTActionSheetHeaders (0.78.0-rc.1): + - React-Core/RCTActionSheetHeaders (0.78.0-rc.2): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -196,7 +196,7 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/RCTAnimationHeaders (0.78.0-rc.1): + - React-Core/RCTAnimationHeaders (0.78.0-rc.2): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -213,7 +213,7 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/RCTBlobHeaders (0.78.0-rc.1): + - React-Core/RCTBlobHeaders (0.78.0-rc.2): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -230,7 +230,7 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/RCTImageHeaders (0.78.0-rc.1): + - React-Core/RCTImageHeaders (0.78.0-rc.2): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -247,7 +247,7 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/RCTLinkingHeaders (0.78.0-rc.1): + - React-Core/RCTLinkingHeaders (0.78.0-rc.2): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -264,7 +264,7 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/RCTNetworkHeaders (0.78.0-rc.1): + - React-Core/RCTNetworkHeaders (0.78.0-rc.2): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -281,7 +281,7 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/RCTPushNotificationHeaders (0.78.0-rc.1): + - React-Core/RCTPushNotificationHeaders (0.78.0-rc.2): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -298,7 +298,7 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/RCTSettingsHeaders (0.78.0-rc.1): + - React-Core/RCTSettingsHeaders (0.78.0-rc.2): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -315,7 +315,7 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/RCTTextHeaders (0.78.0-rc.1): + - React-Core/RCTTextHeaders (0.78.0-rc.2): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -332,7 +332,7 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/RCTVibrationHeaders (0.78.0-rc.1): + - React-Core/RCTVibrationHeaders (0.78.0-rc.2): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -349,12 +349,12 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-Core/RCTWebSocket (0.78.0-rc.1): + - React-Core/RCTWebSocket (0.78.0-rc.2): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) - RCTDeprecation - - React-Core/Default (= 0.78.0-rc.1) + - React-Core/Default (= 0.78.0-rc.2) - React-cxxreact - React-featureflags - React-hermes @@ -366,22 +366,22 @@ PODS: - React-utils - SocketRocket (= 0.7.1) - Yoga - - React-CoreModules (0.78.0-rc.1): + - React-CoreModules (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) - RCT-Folly (= 2024.11.18.00) - - RCTTypeSafety (= 0.78.0-rc.1) - - React-Core/CoreModulesHeaders (= 0.78.0-rc.1) - - React-jsi (= 0.78.0-rc.1) + - RCTTypeSafety (= 0.78.0-rc.2) + - React-Core/CoreModulesHeaders (= 0.78.0-rc.2) + - React-jsi (= 0.78.0-rc.2) - React-jsinspector - React-NativeModulesApple - React-RCTBlob - React-RCTFBReactNativeSpec - - React-RCTImage (= 0.78.0-rc.1) + - React-RCTImage (= 0.78.0-rc.2) - ReactCommon - SocketRocket (= 0.7.1) - - React-cxxreact (0.78.0-rc.1): + - React-cxxreact (0.78.0-rc.2): - boost - DoubleConversion - fast_float (= 6.1.4) @@ -389,16 +389,16 @@ PODS: - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) - - React-callinvoker (= 0.78.0-rc.1) - - React-debug (= 0.78.0-rc.1) - - React-jsi (= 0.78.0-rc.1) + - React-callinvoker (= 0.78.0-rc.2) + - React-debug (= 0.78.0-rc.2) + - React-jsi (= 0.78.0-rc.2) - React-jsinspector - - React-logger (= 0.78.0-rc.1) - - React-perflogger (= 0.78.0-rc.1) - - React-runtimeexecutor (= 0.78.0-rc.1) - - React-timing (= 0.78.0-rc.1) - - React-debug (0.78.0-rc.1) - - React-defaultsnativemodule (0.78.0-rc.1): + - React-logger (= 0.78.0-rc.2) + - React-perflogger (= 0.78.0-rc.2) + - React-runtimeexecutor (= 0.78.0-rc.2) + - React-timing (= 0.78.0-rc.2) + - React-debug (0.78.0-rc.2) + - React-defaultsnativemodule (0.78.0-rc.2): - hermes-engine - RCT-Folly - React-domnativemodule @@ -408,7 +408,7 @@ PODS: - React-jsiexecutor - React-microtasksnativemodule - React-RCTFBReactNativeSpec - - React-domnativemodule (0.78.0-rc.1): + - React-domnativemodule (0.78.0-rc.2): - hermes-engine - RCT-Folly - React-Fabric @@ -419,7 +419,7 @@ PODS: - React-RCTFBReactNativeSpec - ReactCommon/turbomodule/core - Yoga - - React-Fabric (0.78.0-rc.1): + - React-Fabric (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -431,22 +431,22 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/animations (= 0.78.0-rc.1) - - React-Fabric/attributedstring (= 0.78.0-rc.1) - - React-Fabric/componentregistry (= 0.78.0-rc.1) - - React-Fabric/componentregistrynative (= 0.78.0-rc.1) - - React-Fabric/components (= 0.78.0-rc.1) - - React-Fabric/consistency (= 0.78.0-rc.1) - - React-Fabric/core (= 0.78.0-rc.1) - - React-Fabric/dom (= 0.78.0-rc.1) - - React-Fabric/imagemanager (= 0.78.0-rc.1) - - React-Fabric/leakchecker (= 0.78.0-rc.1) - - React-Fabric/mounting (= 0.78.0-rc.1) - - React-Fabric/observers (= 0.78.0-rc.1) - - React-Fabric/scheduler (= 0.78.0-rc.1) - - React-Fabric/telemetry (= 0.78.0-rc.1) - - React-Fabric/templateprocessor (= 0.78.0-rc.1) - - React-Fabric/uimanager (= 0.78.0-rc.1) + - React-Fabric/animations (= 0.78.0-rc.2) + - React-Fabric/attributedstring (= 0.78.0-rc.2) + - React-Fabric/componentregistry (= 0.78.0-rc.2) + - React-Fabric/componentregistrynative (= 0.78.0-rc.2) + - React-Fabric/components (= 0.78.0-rc.2) + - React-Fabric/consistency (= 0.78.0-rc.2) + - React-Fabric/core (= 0.78.0-rc.2) + - React-Fabric/dom (= 0.78.0-rc.2) + - React-Fabric/imagemanager (= 0.78.0-rc.2) + - React-Fabric/leakchecker (= 0.78.0-rc.2) + - React-Fabric/mounting (= 0.78.0-rc.2) + - React-Fabric/observers (= 0.78.0-rc.2) + - React-Fabric/scheduler (= 0.78.0-rc.2) + - React-Fabric/telemetry (= 0.78.0-rc.2) + - React-Fabric/templateprocessor (= 0.78.0-rc.2) + - React-Fabric/uimanager (= 0.78.0-rc.2) - React-featureflags - React-graphics - React-jsi @@ -456,7 +456,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/animations (0.78.0-rc.1): + - React-Fabric/animations (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -477,7 +477,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/attributedstring (0.78.0-rc.1): + - React-Fabric/attributedstring (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -498,7 +498,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/componentregistry (0.78.0-rc.1): + - React-Fabric/componentregistry (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -519,7 +519,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/componentregistrynative (0.78.0-rc.1): + - React-Fabric/componentregistrynative (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -540,7 +540,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components (0.78.0-rc.1): + - React-Fabric/components (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -552,9 +552,9 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/components/legacyviewmanagerinterop (= 0.78.0-rc.1) - - React-Fabric/components/root (= 0.78.0-rc.1) - - React-Fabric/components/view (= 0.78.0-rc.1) + - React-Fabric/components/legacyviewmanagerinterop (= 0.78.0-rc.2) + - React-Fabric/components/root (= 0.78.0-rc.2) + - React-Fabric/components/view (= 0.78.0-rc.2) - React-featureflags - React-graphics - React-jsi @@ -564,7 +564,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/legacyviewmanagerinterop (0.78.0-rc.1): + - React-Fabric/components/legacyviewmanagerinterop (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -585,7 +585,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/root (0.78.0-rc.1): + - React-Fabric/components/root (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -606,7 +606,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/view (0.78.0-rc.1): + - React-Fabric/components/view (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -628,7 +628,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-Fabric/consistency (0.78.0-rc.1): + - React-Fabric/consistency (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -649,7 +649,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/core (0.78.0-rc.1): + - React-Fabric/core (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -670,7 +670,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/dom (0.78.0-rc.1): + - React-Fabric/dom (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -691,7 +691,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/imagemanager (0.78.0-rc.1): + - React-Fabric/imagemanager (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -712,7 +712,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/leakchecker (0.78.0-rc.1): + - React-Fabric/leakchecker (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -733,7 +733,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/mounting (0.78.0-rc.1): + - React-Fabric/mounting (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -754,7 +754,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/observers (0.78.0-rc.1): + - React-Fabric/observers (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -766,7 +766,7 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/observers/events (= 0.78.0-rc.1) + - React-Fabric/observers/events (= 0.78.0-rc.2) - React-featureflags - React-graphics - React-jsi @@ -776,7 +776,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/observers/events (0.78.0-rc.1): + - React-Fabric/observers/events (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -797,7 +797,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/scheduler (0.78.0-rc.1): + - React-Fabric/scheduler (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -820,7 +820,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/telemetry (0.78.0-rc.1): + - React-Fabric/telemetry (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -841,7 +841,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/templateprocessor (0.78.0-rc.1): + - React-Fabric/templateprocessor (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -862,7 +862,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/uimanager (0.78.0-rc.1): + - React-Fabric/uimanager (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -874,7 +874,7 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/uimanager/consistency (= 0.78.0-rc.1) + - React-Fabric/uimanager/consistency (= 0.78.0-rc.2) - React-featureflags - React-graphics - React-jsi @@ -885,7 +885,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/uimanager/consistency (0.78.0-rc.1): + - React-Fabric/uimanager/consistency (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -907,7 +907,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-FabricComponents (0.78.0-rc.1): + - React-FabricComponents (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -920,8 +920,8 @@ PODS: - React-cxxreact - React-debug - React-Fabric - - React-FabricComponents/components (= 0.78.0-rc.1) - - React-FabricComponents/textlayoutmanager (= 0.78.0-rc.1) + - React-FabricComponents/components (= 0.78.0-rc.2) + - React-FabricComponents/textlayoutmanager (= 0.78.0-rc.2) - React-featureflags - React-graphics - React-jsi @@ -932,7 +932,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-FabricComponents/components (0.78.0-rc.1): + - React-FabricComponents/components (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -945,15 +945,15 @@ PODS: - React-cxxreact - React-debug - React-Fabric - - React-FabricComponents/components/inputaccessory (= 0.78.0-rc.1) - - React-FabricComponents/components/iostextinput (= 0.78.0-rc.1) - - React-FabricComponents/components/modal (= 0.78.0-rc.1) - - React-FabricComponents/components/rncore (= 0.78.0-rc.1) - - React-FabricComponents/components/safeareaview (= 0.78.0-rc.1) - - React-FabricComponents/components/scrollview (= 0.78.0-rc.1) - - React-FabricComponents/components/text (= 0.78.0-rc.1) - - React-FabricComponents/components/textinput (= 0.78.0-rc.1) - - React-FabricComponents/components/unimplementedview (= 0.78.0-rc.1) + - React-FabricComponents/components/inputaccessory (= 0.78.0-rc.2) + - React-FabricComponents/components/iostextinput (= 0.78.0-rc.2) + - React-FabricComponents/components/modal (= 0.78.0-rc.2) + - React-FabricComponents/components/rncore (= 0.78.0-rc.2) + - React-FabricComponents/components/safeareaview (= 0.78.0-rc.2) + - React-FabricComponents/components/scrollview (= 0.78.0-rc.2) + - React-FabricComponents/components/text (= 0.78.0-rc.2) + - React-FabricComponents/components/textinput (= 0.78.0-rc.2) + - React-FabricComponents/components/unimplementedview (= 0.78.0-rc.2) - React-featureflags - React-graphics - React-jsi @@ -964,7 +964,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-FabricComponents/components/inputaccessory (0.78.0-rc.1): + - React-FabricComponents/components/inputaccessory (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -987,7 +987,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-FabricComponents/components/iostextinput (0.78.0-rc.1): + - React-FabricComponents/components/iostextinput (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -1010,7 +1010,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-FabricComponents/components/modal (0.78.0-rc.1): + - React-FabricComponents/components/modal (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -1033,7 +1033,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-FabricComponents/components/rncore (0.78.0-rc.1): + - React-FabricComponents/components/rncore (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -1056,7 +1056,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-FabricComponents/components/safeareaview (0.78.0-rc.1): + - React-FabricComponents/components/safeareaview (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -1079,7 +1079,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-FabricComponents/components/scrollview (0.78.0-rc.1): + - React-FabricComponents/components/scrollview (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -1102,7 +1102,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-FabricComponents/components/text (0.78.0-rc.1): + - React-FabricComponents/components/text (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -1125,7 +1125,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-FabricComponents/components/textinput (0.78.0-rc.1): + - React-FabricComponents/components/textinput (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -1148,7 +1148,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-FabricComponents/components/unimplementedview (0.78.0-rc.1): + - React-FabricComponents/components/unimplementedview (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -1171,7 +1171,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-FabricComponents/textlayoutmanager (0.78.0-rc.1): + - React-FabricComponents/textlayoutmanager (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -1194,29 +1194,29 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-FabricImage (0.78.0-rc.1): + - React-FabricImage (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) - glog - hermes-engine - RCT-Folly/Fabric (= 2024.11.18.00) - - RCTRequired (= 0.78.0-rc.1) - - RCTTypeSafety (= 0.78.0-rc.1) + - RCTRequired (= 0.78.0-rc.2) + - RCTTypeSafety (= 0.78.0-rc.2) - React-Fabric - React-featureflags - React-graphics - React-ImageManager - React-jsi - - React-jsiexecutor (= 0.78.0-rc.1) + - React-jsiexecutor (= 0.78.0-rc.2) - React-logger - React-rendererdebug - React-utils - ReactCommon - Yoga - - React-featureflags (0.78.0-rc.1): + - React-featureflags (0.78.0-rc.2): - RCT-Folly (= 2024.11.18.00) - - React-featureflagsnativemodule (0.78.0-rc.1): + - React-featureflagsnativemodule (0.78.0-rc.2): - hermes-engine - RCT-Folly - React-featureflags @@ -1224,7 +1224,7 @@ PODS: - React-jsiexecutor - React-RCTFBReactNativeSpec - ReactCommon/turbomodule/core - - React-graphics (0.78.0-rc.1): + - React-graphics (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -1234,20 +1234,20 @@ PODS: - React-jsi - React-jsiexecutor - React-utils - - React-hermes (0.78.0-rc.1): + - React-hermes (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) - - React-cxxreact (= 0.78.0-rc.1) + - React-cxxreact (= 0.78.0-rc.2) - React-jsi - - React-jsiexecutor (= 0.78.0-rc.1) + - React-jsiexecutor (= 0.78.0-rc.2) - React-jsinspector - - React-perflogger (= 0.78.0-rc.1) + - React-perflogger (= 0.78.0-rc.2) - React-runtimeexecutor - - React-idlecallbacksnativemodule (0.78.0-rc.1): + - React-idlecallbacksnativemodule (0.78.0-rc.2): - glog - hermes-engine - RCT-Folly @@ -1256,7 +1256,7 @@ PODS: - React-RCTFBReactNativeSpec - React-runtimescheduler - ReactCommon/turbomodule/core - - React-ImageManager (0.78.0-rc.1): + - React-ImageManager (0.78.0-rc.2): - glog - RCT-Folly/Fabric - React-Core/Default @@ -1265,7 +1265,7 @@ PODS: - React-graphics - React-rendererdebug - React-utils - - React-jserrorhandler (0.78.0-rc.1): + - React-jserrorhandler (0.78.0-rc.2): - glog - hermes-engine - RCT-Folly/Fabric (= 2024.11.18.00) @@ -1274,7 +1274,7 @@ PODS: - React-featureflags - React-jsi - ReactCommon/turbomodule/bridging - - React-jsi (0.78.0-rc.1): + - React-jsi (0.78.0-rc.2): - boost - DoubleConversion - fast_float (= 6.1.4) @@ -1282,18 +1282,18 @@ PODS: - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) - - React-jsiexecutor (0.78.0-rc.1): + - React-jsiexecutor (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) - - React-cxxreact (= 0.78.0-rc.1) - - React-jsi (= 0.78.0-rc.1) + - React-cxxreact (= 0.78.0-rc.2) + - React-jsi (= 0.78.0-rc.2) - React-jsinspector - - React-perflogger (= 0.78.0-rc.1) - - React-jsinspector (0.78.0-rc.1): + - React-perflogger (= 0.78.0-rc.2) + - React-jsinspector (0.78.0-rc.2): - DoubleConversion - glog - hermes-engine @@ -1301,25 +1301,25 @@ PODS: - React-featureflags - React-jsi - React-jsinspectortracing - - React-perflogger (= 0.78.0-rc.1) - - React-runtimeexecutor (= 0.78.0-rc.1) - - React-jsinspectortracing (0.78.0-rc.1): + - React-perflogger (= 0.78.0-rc.2) + - React-runtimeexecutor (= 0.78.0-rc.2) + - React-jsinspectortracing (0.78.0-rc.2): - RCT-Folly - - React-jsitracing (0.78.0-rc.1): + - React-jsitracing (0.78.0-rc.2): - React-jsi - - React-logger (0.78.0-rc.1): + - React-logger (0.78.0-rc.2): - glog - - React-Mapbuffer (0.78.0-rc.1): + - React-Mapbuffer (0.78.0-rc.2): - glog - React-debug - - React-microtasksnativemodule (0.78.0-rc.1): + - React-microtasksnativemodule (0.78.0-rc.2): - hermes-engine - RCT-Folly - React-jsi - React-jsiexecutor - React-RCTFBReactNativeSpec - ReactCommon/turbomodule/core - - React-NativeModulesApple (0.78.0-rc.1): + - React-NativeModulesApple (0.78.0-rc.2): - glog - hermes-engine - React-callinvoker @@ -1330,18 +1330,18 @@ PODS: - React-runtimeexecutor - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-perflogger (0.78.0-rc.1): + - React-perflogger (0.78.0-rc.2): - DoubleConversion - RCT-Folly (= 2024.11.18.00) - - React-performancetimeline (0.78.0-rc.1): + - React-performancetimeline (0.78.0-rc.2): - RCT-Folly (= 2024.11.18.00) - React-cxxreact - React-featureflags - React-jsinspectortracing - React-timing - - React-RCTActionSheet (0.78.0-rc.1): - - React-Core/RCTActionSheetHeaders (= 0.78.0-rc.1) - - React-RCTAnimation (0.78.0-rc.1): + - React-RCTActionSheet (0.78.0-rc.2): + - React-Core/RCTActionSheetHeaders (= 0.78.0-rc.2) + - React-RCTAnimation (0.78.0-rc.2): - RCT-Folly (= 2024.11.18.00) - RCTTypeSafety - React-Core/RCTAnimationHeaders @@ -1349,7 +1349,7 @@ PODS: - React-NativeModulesApple - React-RCTFBReactNativeSpec - ReactCommon - - React-RCTAppDelegate (0.78.0-rc.1): + - React-RCTAppDelegate (0.78.0-rc.2): - RCT-Folly (= 2024.11.18.00) - RCTRequired - RCTTypeSafety @@ -1373,7 +1373,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon - - React-RCTBlob (0.78.0-rc.1): + - React-RCTBlob (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -1387,7 +1387,7 @@ PODS: - React-RCTFBReactNativeSpec - React-RCTNetwork - ReactCommon - - React-RCTFabric (0.78.0-rc.1): + - React-RCTFabric (0.78.0-rc.2): - glog - hermes-engine - RCT-Folly/Fabric (= 2024.11.18.00) @@ -1410,7 +1410,7 @@ PODS: - React-runtimescheduler - React-utils - Yoga - - React-RCTFBReactNativeSpec (0.78.0-rc.1): + - React-RCTFBReactNativeSpec (0.78.0-rc.2): - hermes-engine - RCT-Folly - RCTRequired @@ -1420,7 +1420,7 @@ PODS: - React-jsiexecutor - React-NativeModulesApple - ReactCommon - - React-RCTImage (0.78.0-rc.1): + - React-RCTImage (0.78.0-rc.2): - RCT-Folly (= 2024.11.18.00) - RCTTypeSafety - React-Core/RCTImageHeaders @@ -1429,14 +1429,14 @@ PODS: - React-RCTFBReactNativeSpec - React-RCTNetwork - ReactCommon - - React-RCTLinking (0.78.0-rc.1): - - React-Core/RCTLinkingHeaders (= 0.78.0-rc.1) - - React-jsi (= 0.78.0-rc.1) + - React-RCTLinking (0.78.0-rc.2): + - React-Core/RCTLinkingHeaders (= 0.78.0-rc.2) + - React-jsi (= 0.78.0-rc.2) - React-NativeModulesApple - React-RCTFBReactNativeSpec - ReactCommon - - ReactCommon/turbomodule/core (= 0.78.0-rc.1) - - React-RCTNetwork (0.78.0-rc.1): + - ReactCommon/turbomodule/core (= 0.78.0-rc.2) + - React-RCTNetwork (0.78.0-rc.2): - RCT-Folly (= 2024.11.18.00) - RCTTypeSafety - React-Core/RCTNetworkHeaders @@ -1444,14 +1444,14 @@ PODS: - React-NativeModulesApple - React-RCTFBReactNativeSpec - ReactCommon - - React-RCTPushNotification (0.78.0-rc.1): + - React-RCTPushNotification (0.78.0-rc.2): - RCTTypeSafety - React-Core/RCTPushNotificationHeaders - React-jsi - React-NativeModulesApple - React-RCTFBReactNativeSpec - ReactCommon - - React-RCTSettings (0.78.0-rc.1): + - React-RCTSettings (0.78.0-rc.2): - RCT-Folly (= 2024.11.18.00) - RCTTypeSafety - React-Core/RCTSettingsHeaders @@ -1459,31 +1459,31 @@ PODS: - React-NativeModulesApple - React-RCTFBReactNativeSpec - ReactCommon - - React-RCTTest (0.78.0-rc.1): + - React-RCTTest (0.78.0-rc.2): - RCT-Folly (= 2024.11.18.00) - - React-Core (= 0.78.0-rc.1) - - React-CoreModules (= 0.78.0-rc.1) - - React-jsi (= 0.78.0-rc.1) - - ReactCommon/turbomodule/core (= 0.78.0-rc.1) - - React-RCTText (0.78.0-rc.1): - - React-Core/RCTTextHeaders (= 0.78.0-rc.1) + - React-Core (= 0.78.0-rc.2) + - React-CoreModules (= 0.78.0-rc.2) + - React-jsi (= 0.78.0-rc.2) + - ReactCommon/turbomodule/core (= 0.78.0-rc.2) + - React-RCTText (0.78.0-rc.2): + - React-Core/RCTTextHeaders (= 0.78.0-rc.2) - Yoga - - React-RCTVibration (0.78.0-rc.1): + - React-RCTVibration (0.78.0-rc.2): - RCT-Folly (= 2024.11.18.00) - React-Core/RCTVibrationHeaders - React-jsi - React-NativeModulesApple - React-RCTFBReactNativeSpec - ReactCommon - - React-rendererconsistency (0.78.0-rc.1) - - React-rendererdebug (0.78.0-rc.1): + - React-rendererconsistency (0.78.0-rc.2) + - React-rendererdebug (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) - RCT-Folly (= 2024.11.18.00) - React-debug - - React-rncore (0.78.0-rc.1) - - React-RuntimeApple (0.78.0-rc.1): + - React-rncore (0.78.0-rc.2) + - React-RuntimeApple (0.78.0-rc.2): - hermes-engine - RCT-Folly/Fabric (= 2024.11.18.00) - React-callinvoker @@ -1504,7 +1504,7 @@ PODS: - React-RuntimeHermes - React-runtimescheduler - React-utils - - React-RuntimeCore (0.78.0-rc.1): + - React-RuntimeCore (0.78.0-rc.2): - glog - hermes-engine - RCT-Folly/Fabric (= 2024.11.18.00) @@ -1519,9 +1519,9 @@ PODS: - React-runtimeexecutor - React-runtimescheduler - React-utils - - React-runtimeexecutor (0.78.0-rc.1): - - React-jsi (= 0.78.0-rc.1) - - React-RuntimeHermes (0.78.0-rc.1): + - React-runtimeexecutor (0.78.0-rc.2): + - React-jsi (= 0.78.0-rc.2) + - React-RuntimeHermes (0.78.0-rc.2): - hermes-engine - RCT-Folly/Fabric (= 2024.11.18.00) - React-featureflags @@ -1531,7 +1531,7 @@ PODS: - React-jsitracing - React-RuntimeCore - React-utils - - React-runtimescheduler (0.78.0-rc.1): + - React-runtimescheduler (0.78.0-rc.2): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) @@ -1546,16 +1546,16 @@ PODS: - React-runtimeexecutor - React-timing - React-utils - - React-timing (0.78.0-rc.1) - - React-utils (0.78.0-rc.1): + - React-timing (0.78.0-rc.2) + - React-utils (0.78.0-rc.2): - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) - React-debug - - React-jsi (= 0.78.0-rc.1) - - ReactAppDependencyProvider (0.78.0-rc.1): + - React-jsi (= 0.78.0-rc.2) + - ReactAppDependencyProvider (0.78.0-rc.2): - ReactCodegen - - ReactCodegen (0.78.0-rc.1): + - ReactCodegen (0.78.0-rc.2): - DoubleConversion - glog - hermes-engine @@ -1576,9 +1576,9 @@ PODS: - React-utils - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - ReactCommon (0.78.0-rc.1): - - ReactCommon/turbomodule (= 0.78.0-rc.1) - - ReactCommon-Samples (0.78.0-rc.1): + - ReactCommon (0.78.0-rc.2): + - ReactCommon/turbomodule (= 0.78.0-rc.2) + - ReactCommon-Samples (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) @@ -1590,48 +1590,48 @@ PODS: - React-NativeModulesApple - React-RCTFBReactNativeSpec - ReactCommon - - ReactCommon/turbomodule (0.78.0-rc.1): + - ReactCommon/turbomodule (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) - - React-callinvoker (= 0.78.0-rc.1) - - React-cxxreact (= 0.78.0-rc.1) - - React-jsi (= 0.78.0-rc.1) - - React-logger (= 0.78.0-rc.1) - - React-perflogger (= 0.78.0-rc.1) - - ReactCommon/turbomodule/bridging (= 0.78.0-rc.1) - - ReactCommon/turbomodule/core (= 0.78.0-rc.1) - - ReactCommon/turbomodule/bridging (0.78.0-rc.1): + - React-callinvoker (= 0.78.0-rc.2) + - React-cxxreact (= 0.78.0-rc.2) + - React-jsi (= 0.78.0-rc.2) + - React-logger (= 0.78.0-rc.2) + - React-perflogger (= 0.78.0-rc.2) + - ReactCommon/turbomodule/bridging (= 0.78.0-rc.2) + - ReactCommon/turbomodule/core (= 0.78.0-rc.2) + - ReactCommon/turbomodule/bridging (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) - - React-callinvoker (= 0.78.0-rc.1) - - React-cxxreact (= 0.78.0-rc.1) - - React-jsi (= 0.78.0-rc.1) - - React-logger (= 0.78.0-rc.1) - - React-perflogger (= 0.78.0-rc.1) - - ReactCommon/turbomodule/core (0.78.0-rc.1): + - React-callinvoker (= 0.78.0-rc.2) + - React-cxxreact (= 0.78.0-rc.2) + - React-jsi (= 0.78.0-rc.2) + - React-logger (= 0.78.0-rc.2) + - React-perflogger (= 0.78.0-rc.2) + - ReactCommon/turbomodule/core (0.78.0-rc.2): - DoubleConversion - fast_float (= 6.1.4) - fmt (= 11.0.2) - glog - hermes-engine - RCT-Folly (= 2024.11.18.00) - - React-callinvoker (= 0.78.0-rc.1) - - React-cxxreact (= 0.78.0-rc.1) - - React-debug (= 0.78.0-rc.1) - - React-featureflags (= 0.78.0-rc.1) - - React-jsi (= 0.78.0-rc.1) - - React-logger (= 0.78.0-rc.1) - - React-perflogger (= 0.78.0-rc.1) - - React-utils (= 0.78.0-rc.1) - - ScreenshotManager (0.78.0-rc.1): + - React-callinvoker (= 0.78.0-rc.2) + - React-cxxreact (= 0.78.0-rc.2) + - React-debug (= 0.78.0-rc.2) + - React-featureflags (= 0.78.0-rc.2) + - React-jsi (= 0.78.0-rc.2) + - React-logger (= 0.78.0-rc.2) + - React-perflogger (= 0.78.0-rc.2) + - React-utils (= 0.78.0-rc.2) + - ScreenshotManager (0.78.0-rc.2): - DoubleConversion - glog - hermes-engine @@ -1891,78 +1891,78 @@ SPEC CHECKSUMS: boost: 7e761d76ca2ce687f7cc98e698152abd03a18f90 DoubleConversion: cb417026b2400c8f53ae97020b2be961b59470cb fast_float: 06eeec4fe712a76acc9376682e4808b05ce978b6 - FBLazyVector: ca1027b5fd51467e762a783d3dcd362fce5a6547 + FBLazyVector: 9017b973ef2275baa867493ad206a9293b30057b fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd glog: eb93e2f488219332457c3c4eafd2738ddc7e80b8 - hermes-engine: 4f30ac09d90c9ea90f9e912f574c9f8110f0f32a - MyNativeView: 579fbc5b050b7e20c5ef62f6eb1dc1896db6c582 - NativeCxxModuleExample: c974a1842b9abe9f5ca18dfbdb4583dd7312203e + hermes-engine: 0a986134ae267355f11106ff43fcbd5195768032 + MyNativeView: e797e3b0386857aff8db2c9029bd0eabea1f54f0 + NativeCxxModuleExample: 136a24bbf07c2c143e7c199ca1650ae608baf79d OCMock: 589f2c84dacb1f5aaf6e4cec1f292551fe748e74 - OSSLibraryExample: 31a75de6272cafe760ba4f3b6e8a582c8d3c1bf7 + OSSLibraryExample: d6f9363635920a08492b75f67eff3cb5f782d232 RCT-Folly: e78785aa9ba2ed998ea4151e314036f6c49e6d82 - RCTDeprecation: d26f07b97b34d9e9c93d09b95c3f7f2380f797b4 - RCTRequired: 00b12066335e477c039c631fdd7a6f2b768e573b - RCTTypeSafety: 51115e55fba96189d1d7dc435bfb56adbf7cc393 - React: a2329b41c7889da4848b05f186c00993f6c21180 - React-callinvoker: 6b8f4eee747a0f7e94a93a96c9a70a5abe64d678 - React-Core: a3568149feee0488020cf58eddaa9b3713686121 - React-CoreModules: 2762a77dfb728d64fa1b8de37e32b014fe203eb2 - React-cxxreact: 8b21f790ca1d992cd2c47494f20a60f5228fb120 - React-debug: 3598ecaaddcaf176b9ba706f6ebb729014bde1f5 - React-defaultsnativemodule: c63420c2e6597a1a7d8630190c68ee11c294e284 - React-domnativemodule: 41832975e89859c154e7cdfecb127d10d1f0e109 - React-Fabric: b5b0ac7d8e77b4599a560f63e9f7336b4fe41bae - React-FabricComponents: 89d6a42300a33316f388b9436095e448104595eb - React-FabricImage: 00790a9fb6fdc38f003c4e6be5eab9287ce44c8b - React-featureflags: cd67232d473b287337b6f28c40d8b7ef6c7d2ab4 - React-featureflagsnativemodule: dda07acf88c3124606fed904940721376219c49d - React-graphics: dfdc123688da49608ffd7947f906787f2220b979 - React-hermes: 7f8a11fded0388dbfe72fdbbac3cab240cf661e0 - React-idlecallbacksnativemodule: 62b10e54550763e56836826c82a5166941b177bf - React-ImageManager: 6c30d61bcae05a1dd0833ecc59e3dbb3d964dbdd - React-jserrorhandler: 1b911b1df322e3c3c88ffbe3cd91a65cd2355e32 - React-jsi: 30ecca0aca80da9f253bfcf8fdeb06ed82f1fbd2 - React-jsiexecutor: dbb1ca80012a48ab4697a66512d202b2e55c1871 - React-jsinspector: 9253f30933a78e135f4b510a4fabc1ea3a8f59ab - React-jsinspectortracing: 07c872d22af2838772607494b467d2def2e80363 - React-jsitracing: 90877d4bb4a897cf6e0075eead332650e50a820a - React-logger: 8d96a93e2071ea8769e125ad1f2b919e09fc653e - React-Mapbuffer: 0052ee03ceb290b74a531e48529a7f90b1b7e49f - React-microtasksnativemodule: 7348e24320f3b8af4f230ee6d8b895161ea1ee81 - React-NativeModulesApple: 54d2c2ee150632222746bb11ac8cc46e60946691 - React-perflogger: 596f6443f9536ca01a24398d231abfd2122418d9 - React-performancetimeline: 14615e28d3ebe9c9c7fddb73c85af0e6e23d1083 - React-RCTActionSheet: 45e28202a7986b70434d2375fc02ee68b1f87082 - React-RCTAnimation: 7e7f94815c0886f110aa3f107155009cc6eb2895 - React-RCTAppDelegate: 6c9e993b386844593b020178d2302e7fdabbab30 - React-RCTBlob: 4050ee867ae16d92e7764ba86c4dbf13c17d4b42 - React-RCTFabric: 453e88d905c6a9c185627262ed0a2ab3ae0b3144 - React-RCTFBReactNativeSpec: d8595cecbef8ee1eccba968905313a4e5398353c - React-RCTImage: b843589d5e34041110656e2bdbaacc097f3cdd7e - React-RCTLinking: aba38f49076140d9fec95ec281f94b38629e0dec - React-RCTNetwork: d9515648fab0128c4c01327774c855f294d6ee5d - React-RCTPushNotification: e938260640cd733989ab552c2efe262e2a7f4a17 - React-RCTSettings: 4cde0079a2cfe6552d65d75bf3080ac40018dacc - React-RCTTest: fadae7ee56fae17f679e8a26f389aed00e1fdaaf - React-RCTText: 0aa8cfdb28486bedd839cbe46e405ec77e85410f - React-RCTVibration: 0b1117ad7ec1b7a2b3b526f9e6f7f958ce65efe5 - React-rendererconsistency: 3aa947ecc01022afc3d530821aca461284494878 - React-rendererdebug: bdada0b4b5c1bd64bb595dec0d6dc651d4e5a039 - React-rncore: 96c83d7dade700003320265380b7c4741af60ca6 - React-RuntimeApple: 510e9496603998489e7485e4775f5fbecec0d3e9 - React-RuntimeCore: 76909a8e030528132bc064583d91fddf9214cfd9 - React-runtimeexecutor: f8f51e274459fecb12ee60727b4f5067484ad053 - React-RuntimeHermes: d46795aa1cf5b86c33f5e0e885fcac2754db90b6 - React-runtimescheduler: 15edb80188be32faadd92106d2ddee2c6e810fe2 - React-timing: 16de18b703b05422a277c84e66bc1b1dbb3d1d20 - React-utils: 029acb2f254deb800a5a279f92a2c3fee80f7267 - ReactAppDependencyProvider: d8c8d73e775f7e367e65b629d0dedcb830e490d5 - ReactCodegen: d6893f46b61542453a3a5cefea434922ae4bff9f - ReactCommon: c99ace9bc7fd37ab0860e05b84758770a5193861 - ReactCommon-Samples: efd28144639ba2372a36a346e6f7a47920887b2b - ScreenshotManager: 0ccb24ae0229c095708d8637953acce967fcdfdb + RCTDeprecation: 7b05789584c8d5258c15959de353d57fb276d809 + RCTRequired: 124c0811c1839b0c4adb360fe56ccb956144645f + RCTTypeSafety: c5ab16586d92c86eaf9eeef8362bb4976dacf635 + React: 46eeb98e3db5bccb8dd94b769835121dd3fe8785 + React-callinvoker: 63721586b5925a59b033a2701ddb1e3f3b87c8c2 + React-Core: 8df8a9311c8f051d37505022bf6fe3b12db01a59 + React-CoreModules: ec8c706418bc96a22c6a9332e0eef0f8bf3f149a + React-cxxreact: 7fa4be83a16cee34e9a5d0051d2382477eb130fc + React-debug: faa0cbb4fefb2eec74cee4755bc6539049fb33f5 + React-defaultsnativemodule: e75de953416a14edf75ea4e49f7148850064fbb8 + React-domnativemodule: 0e082cd2b47651d7314453e655243d180d2e04e5 + React-Fabric: f16ba4fb019d2cda78198066d8d18a2b97b64620 + React-FabricComponents: 0da790f24b3ee337d4d78f09a1edae0308112c35 + React-FabricImage: c51d09e3ce3bdb0efae362af0b184a70d0869ffa + React-featureflags: 210dcf8b4f7d78231c6b340de7ba15f7bf1e5045 + React-featureflagsnativemodule: 9782b5e135ee15df261663f5a871dd755cc65c09 + React-graphics: 8da90b62edd621dba8a6e6446cd21bb9708ab8a0 + React-hermes: 8418ac8972c611cf31b59c03aef9a036ba95db41 + React-idlecallbacksnativemodule: 20d949bf48657311e443b48a2a79979eac95ff06 + React-ImageManager: 141574b505068cf3b625abcf69272744231b1815 + React-jserrorhandler: 47ac5ac1375d7382fa98b4fb3eac732b4773082f + React-jsi: 47dcef0ad993d80ae5bf6f5fcfa0d0365f388c3a + React-jsiexecutor: d91462c403e75c4bc9bdfcde345fd9ddd0a5d082 + React-jsinspector: 34b706396fe7adf765a65e8aec788c46e13769ad + React-jsinspectortracing: f450d7323dde15b84b430df4c3bf2e9fbb47a34d + React-jsitracing: 8bd1187953c43e330860b9b5d263aeb71995e8eb + React-logger: f63562881c5f622941788ca6a5b95011b524e367 + React-Mapbuffer: 7c277ffe8cac3b71cf2f45162d03f33a9433dcc5 + React-microtasksnativemodule: be42d7d2b53170c9a144cb13190e4ebd0040a5ac + React-NativeModulesApple: 7ba4e954dac75d627d4be5c305a98dcb8e15619b + React-perflogger: bebc1158be81872eefd9589607fc2e05f73d060d + React-performancetimeline: 52a74ede38a371eb1c1cb9e11b0857b06776eb31 + React-RCTActionSheet: 54c2b8f6dd782644dd60c12bdca8dac7ff04e205 + React-RCTAnimation: a9618ac0744902c754a12e1195139f0a827b2b82 + React-RCTAppDelegate: 8c5fbfada3c113197cf4e25501146331b5a09c03 + React-RCTBlob: 1b3864df20273725cf56aa53751b54960a3ce432 + React-RCTFabric: 38d8f700da2e6aa5548ff56e2e8e71dca3ce0e78 + React-RCTFBReactNativeSpec: 259934459cba3fcb8e5bf455d67dd3a243cd3334 + React-RCTImage: 605b96126decbd10c6528eab3bd175cdf3251f43 + React-RCTLinking: ac8b197cc076d67d979ca475f966e77fee6c8775 + React-RCTNetwork: 37cbdbd3228267e8301499d4502adda864de42ea + React-RCTPushNotification: fce98d3af676cb29330c7a92c7d1dc8bd0567fe1 + React-RCTSettings: 20e40823338f3c1c90b5315033bf41c9b1dae3f7 + React-RCTTest: ed8221730a4ba3cf33098afb886b555c7f95d5c4 + React-RCTText: 615cd64bc900c7bdebcd392099bd3988bccf2187 + React-RCTVibration: c4541a15842cf010b5acbf78ca13998a40628af4 + React-rendererconsistency: ba099f736d72cdf95718a7a43f0361e3f1a16b89 + React-rendererdebug: 3a2eba23c28fb815ca924baebf26281cff4ca960 + React-rncore: a1636452ab5c0e62f213cb180669ee1ed1bcbc92 + React-RuntimeApple: 83f5fa46f08a908bb71ffb786ed963257f22e385 + React-RuntimeCore: 757c35f1b8f141b78ea1702a5d7315c400246616 + React-runtimeexecutor: 0ee2204052863ae023cf119ebf5f865a0c3f6094 + React-RuntimeHermes: f5a9dbfae4dc6c183c1dbe8b65dfe7bc8d1cc18c + React-runtimescheduler: ac9da9b2e070cea8f1e27987cf3dde618651cbc3 + React-timing: 1c798fbdb464b3d16e812b5ad02fa0a505153d9b + React-utils: 5304213c024c01e38506912538cca8e5b86d50f5 + ReactAppDependencyProvider: 92e04002e3e6bf05337463adb0e533b5904651d5 + ReactCodegen: 49027aea46d7e79f3fb3af0923fd68a5c5e8f258 + ReactCommon: 5a44ad1b87d8c583cddf44947e012b4f7761f3b5 + ReactCommon-Samples: b5b5dd04bbc0e39fb7ee7b45f5d1b76e1ed4e101 + ScreenshotManager: f4ad7c194c67caa6620974a8b4446eeb0f6688c0 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 - Yoga: d7af68bbe88ef55fd73754fe6942746eff12919c + Yoga: e157016079d4bd81fcbf8b6a109dd767ba00a811 PODFILE CHECKSUM: 8591f96a513620a2a83a0b9a125ad3fa32ea1369 From 1bd9d36b707124e85514a6fc3817695611e3223e Mon Sep 17 00:00:00 2001 From: Cedric van Putten Date: Tue, 28 Jan 2025 07:20:32 -0800 Subject: [PATCH 015/108] fix(react-native): pass the protocol from bundle URL to HMR client on Android (#48998) Summary: This is another attempt at fixing the Android HMR client for HTTPS proxied Metro instances. The previous one unintentionally [caused the following error](https://github.com/facebook/react-native/pull/48970#issuecomment-2617047184): ``` java.lang.AssertionError: Method overloading is unsupported: com.facebook.react.devsupport.HMRClient#setup ``` This PR removes the overloading, and only adds the `scheme` property as a parameter to the existing `.setup` method. Aligning with the exact behavior we have on iOS. The alternative fix, which should NOT be backward breaking (if this is) - is to move this "infer the protocol from the bundle URL" to the JS side of the HMR client. Where we don't just always default to `http`, but instead default to `https IF port === 443, otherwise http`. It's a bit more hacky, but shouldn't cause any other issues. _**Ideally**_, we have the same working behavior on both Android and iOS without workarounds.
Alternative workaround See [this change](https://github.com/facebook/react-native/compare/main...byCedric:react-native:patch-2). image
See full explanation on https://github.com/facebook/react-native/issues/48970 > We've noticed that the HMR on Android doesn't seem to be connecting when using a HTTPS-proxied Metro instance, where the proxy is hosted through Cloudflare. This is only an issue on Android - not iOS - and likely caused by the HMR Client not being set up properly on Android. > >- On Android, we run `.setup('android', , , , )` in the [**react/devsupport/DevSupportManagerBase.java**](https://github.com/facebook/react-native/blob/53d94c3abe3fcd2168b512652bc0169956bffa39/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java#L689-L691) file. >- On iOS, we run `[self.callableJSModules invokeModule:@"HMRClient" method:@"setup" withArgs:@[ RCTPlatformName, path, host, RCTNullIfNil(port), @(isHotLoadingEnabled), scheme ]];` in the [**React/CoreModules /RCTDevSettings.mm**](https://github.com/facebook/react-native/blob/53d94c3abe3fcd2168b512652bc0169956bffa39/packages/react-native/React/CoreModules/RCTDevSettings.mm#L488-L491) file. > >Notice how Android does not pass in the scheme/protocol of the bundle URL, while iOS actually does? Unfortunately, because the default protocol (`http`) mismatches on Android when using HTTPS proxies, we actually try to connect the HMR client over `http` instead of `https` - while still using port 443 - which is rejected by Cloudflare's infrastructure even before we can redirect or mitigate this issue. And the rejection is valid, as we basically try to connect on `http://:443` (the source URL is `https`, so the port is infered as `443`). > >This change adds scheme propagation to Android, exactly like we do on iOS for the HMR Client. ## Changelog: [ANDROID] [FIXED] Pass the bundle URL protocol when setting up HMR client on Android [IOS] [FIXED] - app crash caused by the `[RCTFileRequestHanlder invalidate]` method Pull Request resolved: https://github.com/facebook/react-native/pull/48350 Test Plan: I am not able to reproduce this issue locally either, so the changes in this PR are totally from my inference, I am not sure if it really makes sense, so please help take a deeper look, thanks. Reviewed By: javache Differential Revision: D69751695 Pulled By: cipolleschi fbshipit-source-id: aa4654a30f5dfac99b72ed1bda0dae1e0dc881c9 --- .../Network/RCTDataRequestHandler.mm | 20 ++++++++++++++++--- .../Network/RCTFileRequestHandler.mm | 20 ++++++++++++++++--- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/packages/react-native/Libraries/Network/RCTDataRequestHandler.mm b/packages/react-native/Libraries/Network/RCTDataRequestHandler.mm index f95d0c078e0d5a..2aff977cf65a8f 100644 --- a/packages/react-native/Libraries/Network/RCTDataRequestHandler.mm +++ b/packages/react-native/Libraries/Network/RCTDataRequestHandler.mm @@ -8,6 +8,8 @@ #import #import +#import + #import "RCTNetworkPlugins.h" @interface RCTDataRequestHandler () @@ -15,14 +17,22 @@ @interface RCTDataRequestHandler () @implementation RCTDataRequestHandler { NSOperationQueue *_queue; + std::mutex _operationHandlerMutexLock; } RCT_EXPORT_MODULE() - (void)invalidate { - [_queue cancelAllOperations]; - _queue = nil; + std::lock_guard lock(_operationHandlerMutexLock); + if (_queue) { + for (NSOperation *operation in _queue.operations) { + if (!operation.isCancelled && !operation.isFinished) { + [operation cancel]; + } + } + _queue = nil; + } } - (BOOL)canHandleRequest:(NSURLRequest *)request @@ -32,6 +42,7 @@ - (BOOL)canHandleRequest:(NSURLRequest *)request - (NSOperation *)sendRequest:(NSURLRequest *)request withDelegate:(id)delegate { + std::lock_guard lock(_operationHandlerMutexLock); // Lazy setup if (!_queue) { _queue = [NSOperationQueue new]; @@ -69,7 +80,10 @@ - (NSOperation *)sendRequest:(NSURLRequest *)request withDelegate:(id lock(_operationHandlerMutexLock); + if (!op.isCancelled && !op.isFinished) { + [op cancel]; + } } - (std::shared_ptr)getTurboModule: diff --git a/packages/react-native/Libraries/Network/RCTFileRequestHandler.mm b/packages/react-native/Libraries/Network/RCTFileRequestHandler.mm index 19d025c51e19df..4ca36256c681af 100644 --- a/packages/react-native/Libraries/Network/RCTFileRequestHandler.mm +++ b/packages/react-native/Libraries/Network/RCTFileRequestHandler.mm @@ -7,6 +7,8 @@ #import +#import + #import #import @@ -19,14 +21,22 @@ @interface RCTFileRequestHandler () @implementation RCTFileRequestHandler { NSOperationQueue *_fileQueue; + std::mutex _operationHandlerMutexLock; } RCT_EXPORT_MODULE() - (void)invalidate { - [_fileQueue cancelAllOperations]; - _fileQueue = nil; + std::lock_guard lock(_operationHandlerMutexLock); + if (_fileQueue) { + for (NSOperation *operation in _fileQueue.operations) { + if (!operation.isCancelled && !operation.isFinished) { + [operation cancel]; + } + } + _fileQueue = nil; + } } - (BOOL)canHandleRequest:(NSURLRequest *)request @@ -36,6 +46,7 @@ - (BOOL)canHandleRequest:(NSURLRequest *)request - (NSOperation *)sendRequest:(NSURLRequest *)request withDelegate:(id)delegate { + std::lock_guard lock(_operationHandlerMutexLock); // Lazy setup if (!_fileQueue) { _fileQueue = [NSOperationQueue new]; @@ -83,7 +94,10 @@ - (NSOperation *)sendRequest:(NSURLRequest *)request withDelegate:(id lock(_operationHandlerMutexLock); + if (!op.isCancelled && !op.isFinished) { + [op cancel]; + } } - (std::shared_ptr)getTurboModule: From eb8c1c3e95c92b98a9c78832271562011831c4e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Norte?= Date: Tue, 18 Mar 2025 05:59:50 -0700 Subject: [PATCH 055/108] Correctly batch reportMount calls (#50090) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50090 Changelog: [internal] I refactored `FabricUIManager` in D54547194 / https://github.com/facebook/react-native/pull/43337 and accidentally removed setting this flag to avoid scheduling redundant tasks in the UI thread to report mount. This fixes it. Reviewed By: javache Differential Revision: D71387374 fbshipit-source-id: cad8a3ead2434738325560902cbab817e5d5dde7 --- .../main/java/com/facebook/react/fabric/FabricUIManager.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java index 6d4c7155803aa4..a7389a8b48fca5 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java @@ -1256,6 +1256,8 @@ public void didMountItems(@Nullable List mountItems) { } if (!mMountNotificationScheduled && !mMountedSurfaceIds.isEmpty()) { + mMountNotificationScheduled = true; + // Notify mount when the effects are visible and prevent mount hooks to // delay paint. UiThreadUtil.getUiThreadHandler() From aa75e94831df7ec94ee4cbc4df0de453c486022e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Norte?= Date: Tue, 18 Mar 2025 05:59:50 -0700 Subject: [PATCH 056/108] Avoid errors when dispatching mount operations within mount hooks (#50091) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50091 Changelog: [internal] If a library uses mount hooks to perform mount operations, it's possible to get concurrent modifications of the list of pending surface IDs to report. This fixes that potential error by making a copy of the list before dispatching the mount notifications. Fixes https://github.com/facebook/react-native/issues/49783. Reviewed By: javache Differential Revision: D71387739 fbshipit-source-id: 96c723ef2d6bcc659c4452434b7a4d5af26117ef --- .../react/fabric/FabricUIManager.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java index a7389a8b48fca5..2e8cab11087744 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java @@ -173,7 +173,7 @@ public class FabricUIManager private final CopyOnWriteArrayList mListeners = new CopyOnWriteArrayList<>(); private boolean mMountNotificationScheduled = false; - private final List mMountedSurfaceIds = new ArrayList<>(); + private List mSurfaceIdsWithPendingMountNotification = new ArrayList<>(); @ThreadConfined(UI) @NonNull @@ -1250,12 +1250,13 @@ public void didMountItems(@Nullable List mountItems) { // Collect surface IDs for all the mount items for (MountItem mountItem : mountItems) { - if (mountItem != null && !mMountedSurfaceIds.contains(mountItem.getSurfaceId())) { - mMountedSurfaceIds.add(mountItem.getSurfaceId()); + if (mountItem != null + && !mSurfaceIdsWithPendingMountNotification.contains(mountItem.getSurfaceId())) { + mSurfaceIdsWithPendingMountNotification.add(mountItem.getSurfaceId()); } } - if (!mMountNotificationScheduled && !mMountedSurfaceIds.isEmpty()) { + if (!mMountNotificationScheduled && !mSurfaceIdsWithPendingMountNotification.isEmpty()) { mMountNotificationScheduled = true; // Notify mount when the effects are visible and prevent mount hooks to @@ -1267,17 +1268,19 @@ public void didMountItems(@Nullable List mountItems) { public void run() { mMountNotificationScheduled = false; + // Create a copy in case mount hooks trigger more mutations + final List surfaceIdsToReportMount = + mSurfaceIdsWithPendingMountNotification; + mSurfaceIdsWithPendingMountNotification = new ArrayList<>(); + final @Nullable FabricUIManagerBinding binding = mBinding; if (binding == null || mDestroyed) { - mMountedSurfaceIds.clear(); return; } - for (int surfaceId : mMountedSurfaceIds) { + for (int surfaceId : surfaceIdsToReportMount) { binding.reportMount(surfaceId); } - - mMountedSurfaceIds.clear(); } }); } From ae1841ac9645c10d66aeef784579b94fa0169e03 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Fri, 21 Mar 2025 10:08:12 -0700 Subject: [PATCH 057/108] Convert to JSException only NSException from sync methods (#50193) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50193 This fix makes sure that we convert to JSException only NSException thrwn by sync methods. Currently, nothing in the stack will be capable of understanding that js error if it is triggered by an exception raised by an asyc method. See https://github.com/reactwg/react-native-new-architecture/discussions/276 for further details We need to cherry pick this in 0.78 and 0.79 ## Changelog: [iOS][Fixed] - Make sure the TM infra does not crash on NSException when triggered by async method Reviewed By: fabriziocucci Differential Revision: D71619229 fbshipit-source-id: b87aef5dd2720a2641c8da0904da651866370dc6 --- .../ios/ReactCommon/RCTTurboModule.mm | 37 ++++++++++++------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm b/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm index 167368828e39eb..ac9bbe1176114a 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm +++ b/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm @@ -57,7 +57,7 @@ static int32_t getUniqueId() static jsi::String convertNSStringToJSIString(jsi::Runtime &runtime, NSString *value) { - return jsi::String::createFromUtf8(runtime, [value UTF8String] ?: ""); + return jsi::String::createFromUtf8(runtime, [value UTF8String] ? [value UTF8String] : ""); } static jsi::Object convertNSDictionaryToJSIObject(jsi::Runtime &runtime, NSDictionary *value) @@ -203,7 +203,11 @@ id convertJSIValueToObjCObject(jsi::Runtime &runtime, const jsi::Value &value, s /** * Creates JSError with current JS runtime and NSException stack trace. */ -static jsi::JSError convertNSExceptionToJSError(jsi::Runtime &runtime, NSException *exception) +static jsi::JSError convertNSExceptionToJSError( + jsi::Runtime &runtime, + NSException *exception, + const std::string &moduleName, + const std::string &methodName) { std::string reason = [exception.reason UTF8String]; @@ -214,7 +218,8 @@ id convertJSIValueToObjCObject(jsi::Runtime &runtime, const jsi::Value &value, s cause.setProperty( runtime, "stackReturnAddresses", convertNSArrayToJSIArray(runtime, exception.callStackReturnAddresses)); - jsi::Value error = createJSRuntimeError(runtime, "Exception in HostFunction: " + reason); + std::string message = moduleName + "." + methodName + " raised an exception: " + reason; + jsi::Value error = createJSRuntimeError(runtime, message); error.asObject(runtime).setProperty(runtime, "cause", std::move(cause)); return {runtime, std::move(error)}; } @@ -346,28 +351,34 @@ id convertJSIValueToObjCObject(jsi::Runtime &runtime, const jsi::Value &value, s } if (isSync) { - TurboModulePerfLogger::syncMethodCallExecutionStart(moduleName, methodNameStr.c_str()); + TurboModulePerfLogger::syncMethodCallExecutionStart(moduleName, methodName); } else { - TurboModulePerfLogger::asyncMethodCallExecutionStart(moduleName, methodNameStr.c_str(), asyncCallCounter); + TurboModulePerfLogger::asyncMethodCallExecutionStart(moduleName, methodName, asyncCallCounter); } @try { [inv invokeWithTarget:strongModule]; } @catch (NSException *exception) { - throw convertNSExceptionToJSError(runtime, exception); + if (isSync) { + // We can only convert NSException to JSError in sync method calls. + // See https://github.com/reactwg/react-native-new-architecture/discussions/276#discussioncomment-12567155 + throw convertNSExceptionToJSError(runtime, exception, std::string{moduleName}, methodNameStr); + } else { + @throw exception; + } } @finally { [retainedObjectsForInvocation removeAllObjects]; } if (!isSync) { - TurboModulePerfLogger::asyncMethodCallExecutionEnd(moduleName, methodNameStr.c_str(), asyncCallCounter); + TurboModulePerfLogger::asyncMethodCallExecutionEnd(moduleName, methodName, asyncCallCounter); return; } void *rawResult; [inv getReturnValue:&rawResult]; result = (__bridge id)rawResult; - TurboModulePerfLogger::syncMethodCallExecutionEnd(moduleName, methodNameStr.c_str()); + TurboModulePerfLogger::syncMethodCallExecutionEnd(moduleName, methodName); }; if (isSync) { @@ -409,23 +420,23 @@ TraceSection s( } if (shouldVoidMethodsExecuteSync_) { - TurboModulePerfLogger::syncMethodCallExecutionStart(moduleName, methodNameStr.c_str()); + TurboModulePerfLogger::syncMethodCallExecutionStart(moduleName, methodName); } else { - TurboModulePerfLogger::asyncMethodCallExecutionStart(moduleName, methodNameStr.c_str(), asyncCallCounter); + TurboModulePerfLogger::asyncMethodCallExecutionStart(moduleName, methodName, asyncCallCounter); } @try { [inv invokeWithTarget:strongModule]; } @catch (NSException *exception) { - throw convertNSExceptionToJSError(runtime, exception); + throw convertNSExceptionToJSError(runtime, exception, std::string{moduleName}, methodNameStr); } @finally { [retainedObjectsForInvocation removeAllObjects]; } if (shouldVoidMethodsExecuteSync_) { - TurboModulePerfLogger::syncMethodCallExecutionEnd(moduleName, methodNameStr.c_str()); + TurboModulePerfLogger::syncMethodCallExecutionEnd(moduleName, methodName); } else { - TurboModulePerfLogger::asyncMethodCallExecutionEnd(moduleName, methodNameStr.c_str(), asyncCallCounter); + TurboModulePerfLogger::asyncMethodCallExecutionEnd(moduleName, methodName, asyncCallCounter); } return; From f3d1ad12048575a76d46fb226423dce3b9c70516 Mon Sep 17 00:00:00 2001 From: React Native Bot Date: Tue, 1 Apr 2025 12:57:44 +0000 Subject: [PATCH 058/108] Release 0.78.2 #publish-packages-to-npm&latest --- package.json | 4 ++-- packages/assets/package.json | 2 +- packages/babel-plugin-codegen/package.json | 4 ++-- packages/community-cli-plugin/package.json | 6 +++--- packages/core-cli-utils/package.json | 2 +- packages/debugger-frontend/package.json | 2 +- packages/dev-middleware/package.json | 4 ++-- packages/eslint-config-react-native/package.json | 4 ++-- packages/eslint-plugin-react-native/package.json | 2 +- packages/eslint-plugin-specs/package.json | 4 ++-- packages/gradle-plugin/package.json | 2 +- packages/helloworld/package.json | 12 ++++++------ packages/metro-config/package.json | 6 +++--- packages/normalize-color/package.json | 2 +- packages/polyfills/package.json | 2 +- packages/react-native-babel-preset/package.json | 4 ++-- .../react-native-babel-transformer/package.json | 4 ++-- packages/react-native-bots/package.json | 2 +- .../package.json | 4 ++-- packages/react-native-codegen/package.json | 2 +- packages/react-native-fantom/package.json | 2 +- packages/react-native-info/package.json | 2 +- .../react-native-popup-menu-android/package.json | 4 ++-- packages/react-native-test-library/package.json | 6 +++--- .../Libraries/Core/ReactNativeVersion.js | 2 +- packages/react-native/React/Base/RCTVersion.m | 2 +- .../react-native/ReactAndroid/gradle.properties | 2 +- .../modules/systeminfo/ReactNativeVersion.java | 2 +- .../ReactCommon/cxxreact/ReactNativeVersion.h | 2 +- packages/react-native/package.json | 16 ++++++++-------- packages/rn-tester/package.json | 6 +++--- packages/typescript-config/package.json | 2 +- packages/virtualized-lists/package.json | 2 +- 33 files changed, 62 insertions(+), 62 deletions(-) diff --git a/package.json b/package.json index 00f065caac17a4..7db61c111711bf 100644 --- a/package.json +++ b/package.json @@ -49,8 +49,8 @@ "@babel/preset-flow": "^7.24.7", "@definitelytyped/dtslint": "^0.0.127", "@jest/create-cache-key-function": "^29.6.3", - "@react-native/metro-babel-transformer": "0.78.1", - "@react-native/metro-config": "0.78.1", + "@react-native/metro-babel-transformer": "0.78.2", + "@react-native/metro-config": "0.78.2", "@tsconfig/node18": "1.0.1", "@types/react": "^19.0.0", "@typescript-eslint/parser": "^7.1.1", diff --git a/packages/assets/package.json b/packages/assets/package.json index 19e3365cb2b581..5e5135b0660ffa 100644 --- a/packages/assets/package.json +++ b/packages/assets/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/assets-registry", - "version": "0.78.1", + "version": "0.78.2", "description": "Asset support code for React Native.", "license": "MIT", "repository": { diff --git a/packages/babel-plugin-codegen/package.json b/packages/babel-plugin-codegen/package.json index 4c850a6b1fb1b9..9d77de73f305a1 100644 --- a/packages/babel-plugin-codegen/package.json +++ b/packages/babel-plugin-codegen/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/babel-plugin-codegen", - "version": "0.78.1", + "version": "0.78.2", "description": "Babel plugin to generate native module and view manager code for React Native.", "license": "MIT", "repository": { @@ -26,7 +26,7 @@ ], "dependencies": { "@babel/traverse": "^7.25.3", - "@react-native/codegen": "0.78.1" + "@react-native/codegen": "0.78.2" }, "devDependencies": { "@babel/core": "^7.25.2" diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index 6f06156e29ba06..fc797310131e53 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/community-cli-plugin", - "version": "0.78.1", + "version": "0.78.2", "description": "Core CLI commands for React Native", "keywords": [ "react-native", @@ -22,8 +22,8 @@ "dist" ], "dependencies": { - "@react-native/dev-middleware": "0.78.1", - "@react-native/metro-babel-transformer": "0.78.1", + "@react-native/dev-middleware": "0.78.2", + "@react-native/metro-babel-transformer": "0.78.2", "chalk": "^4.0.0", "debug": "^2.2.0", "invariant": "^2.2.4", diff --git a/packages/core-cli-utils/package.json b/packages/core-cli-utils/package.json index 8d4983e110f706..1ecbb0a32b8f3d 100644 --- a/packages/core-cli-utils/package.json +++ b/packages/core-cli-utils/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/core-cli-utils", - "version": "0.78.1", + "version": "0.78.2", "description": "React Native CLI library for Frameworks to build on", "license": "MIT", "main": "./src/index.flow.js", diff --git a/packages/debugger-frontend/package.json b/packages/debugger-frontend/package.json index 346fa9ea1c25c9..3609e1eb6d57f7 100644 --- a/packages/debugger-frontend/package.json +++ b/packages/debugger-frontend/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/debugger-frontend", - "version": "0.78.1", + "version": "0.78.2", "description": "Debugger frontend for React Native based on Chrome DevTools", "keywords": [ "react-native", diff --git a/packages/dev-middleware/package.json b/packages/dev-middleware/package.json index eea904e3980baf..22926156f091b1 100644 --- a/packages/dev-middleware/package.json +++ b/packages/dev-middleware/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/dev-middleware", - "version": "0.78.1", + "version": "0.78.2", "description": "Dev server middleware for React Native", "keywords": [ "react-native", @@ -23,7 +23,7 @@ ], "dependencies": { "@isaacs/ttlcache": "^1.4.1", - "@react-native/debugger-frontend": "0.78.1", + "@react-native/debugger-frontend": "0.78.2", "chrome-launcher": "^0.15.2", "chromium-edge-launcher": "^0.2.0", "connect": "^3.6.5", diff --git a/packages/eslint-config-react-native/package.json b/packages/eslint-config-react-native/package.json index dc03eda35382e7..90d997c329be48 100644 --- a/packages/eslint-config-react-native/package.json +++ b/packages/eslint-config-react-native/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/eslint-config", - "version": "0.78.1", + "version": "0.78.2", "description": "ESLint config for React Native", "license": "MIT", "repository": { @@ -22,7 +22,7 @@ "dependencies": { "@babel/core": "^7.25.2", "@babel/eslint-parser": "^7.25.1", - "@react-native/eslint-plugin": "0.78.1", + "@react-native/eslint-plugin": "0.78.2", "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", "eslint-config-prettier": "^8.5.0", diff --git a/packages/eslint-plugin-react-native/package.json b/packages/eslint-plugin-react-native/package.json index 36d7e12a232f4b..05fc56ef7a5f49 100644 --- a/packages/eslint-plugin-react-native/package.json +++ b/packages/eslint-plugin-react-native/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/eslint-plugin", - "version": "0.78.1", + "version": "0.78.2", "description": "ESLint rules for @react-native/eslint-config", "license": "MIT", "repository": { diff --git a/packages/eslint-plugin-specs/package.json b/packages/eslint-plugin-specs/package.json index d57b5a283d562b..f5a2254cb7d408 100644 --- a/packages/eslint-plugin-specs/package.json +++ b/packages/eslint-plugin-specs/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/eslint-plugin-specs", - "version": "0.78.1", + "version": "0.78.2", "description": "ESLint rules to validate NativeModule and Component Specs", "license": "MIT", "repository": { @@ -26,7 +26,7 @@ "dependencies": { "@babel/core": "^7.25.2", "@babel/plugin-transform-flow-strip-types": "^7.25.2", - "@react-native/codegen": "0.78.1", + "@react-native/codegen": "0.78.2", "make-dir": "^2.1.0", "pirates": "^4.0.1", "source-map-support": "0.5.0" diff --git a/packages/gradle-plugin/package.json b/packages/gradle-plugin/package.json index 86dc0831d3d5a4..2aa91e7b18ba6b 100644 --- a/packages/gradle-plugin/package.json +++ b/packages/gradle-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/gradle-plugin", - "version": "0.78.1", + "version": "0.78.2", "description": "Gradle Plugin for React Native", "license": "MIT", "repository": { diff --git a/packages/helloworld/package.json b/packages/helloworld/package.json index 380f13dacee724..d4c4b62ef86a5c 100644 --- a/packages/helloworld/package.json +++ b/packages/helloworld/package.json @@ -1,6 +1,6 @@ { "name": "helloworld", - "version": "0.78.1", + "version": "0.78.2", "private": true, "scripts": { "bootstrap": "node ./cli.js bootstrap", @@ -13,16 +13,16 @@ }, "dependencies": { "react": "19.0.0", - "react-native": "0.78.1" + "react-native": "0.78.2" }, "devDependencies": { "@babel/core": "^7.25.2", "@babel/preset-env": "^7.25.3", "@babel/runtime": "^7.25.0", - "@react-native/babel-preset": "0.78.1", - "@react-native/core-cli-utils": "0.78.1", - "@react-native/eslint-config": "0.78.1", - "@react-native/metro-config": "0.78.1", + "@react-native/babel-preset": "0.78.2", + "@react-native/core-cli-utils": "0.78.2", + "@react-native/eslint-config": "0.78.2", + "@react-native/metro-config": "0.78.2", "chalk": "^4.1.2", "commander": "^12.0.0", "eslint": "^8.19.0", diff --git a/packages/metro-config/package.json b/packages/metro-config/package.json index 7127467dc230b9..662b3b7a0583a5 100644 --- a/packages/metro-config/package.json +++ b/packages/metro-config/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/metro-config", - "version": "0.78.1", + "version": "0.78.2", "description": "Metro configuration for React Native.", "license": "MIT", "repository": { @@ -26,8 +26,8 @@ "dist" ], "dependencies": { - "@react-native/js-polyfills": "0.78.1", - "@react-native/metro-babel-transformer": "0.78.1", + "@react-native/js-polyfills": "0.78.2", + "@react-native/metro-babel-transformer": "0.78.2", "metro-config": "^0.81.3", "metro-runtime": "^0.81.3" } diff --git a/packages/normalize-color/package.json b/packages/normalize-color/package.json index c84af413cdc213..2d645d54b779a9 100644 --- a/packages/normalize-color/package.json +++ b/packages/normalize-color/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/normalize-colors", - "version": "0.78.1", + "version": "0.78.2", "description": "Color normalization for React Native.", "license": "MIT", "repository": { diff --git a/packages/polyfills/package.json b/packages/polyfills/package.json index 6365acb98204f1..2ad16684227b47 100644 --- a/packages/polyfills/package.json +++ b/packages/polyfills/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/js-polyfills", - "version": "0.78.1", + "version": "0.78.2", "description": "Polyfills for React Native.", "license": "MIT", "repository": { diff --git a/packages/react-native-babel-preset/package.json b/packages/react-native-babel-preset/package.json index 17e9f7ca7f8497..abdb23cb042304 100644 --- a/packages/react-native-babel-preset/package.json +++ b/packages/react-native-babel-preset/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/babel-preset", - "version": "0.78.1", + "version": "0.78.2", "description": "Babel preset for React Native applications", "main": "src/index.js", "repository": { @@ -55,7 +55,7 @@ "@babel/plugin-transform-typescript": "^7.25.2", "@babel/plugin-transform-unicode-regex": "^7.24.7", "@babel/template": "^7.25.0", - "@react-native/babel-plugin-codegen": "0.78.1", + "@react-native/babel-plugin-codegen": "0.78.2", "babel-plugin-syntax-hermes-parser": "0.25.1", "babel-plugin-transform-flow-enums": "^0.0.2", "react-refresh": "^0.14.0" diff --git a/packages/react-native-babel-transformer/package.json b/packages/react-native-babel-transformer/package.json index cf4566603ae9c2..821aa7e8af41e7 100644 --- a/packages/react-native-babel-transformer/package.json +++ b/packages/react-native-babel-transformer/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/metro-babel-transformer", - "version": "0.78.1", + "version": "0.78.2", "description": "Babel transformer for React Native applications.", "main": "src/index.js", "repository": { @@ -16,7 +16,7 @@ "license": "MIT", "dependencies": { "@babel/core": "^7.25.2", - "@react-native/babel-preset": "0.78.1", + "@react-native/babel-preset": "0.78.2", "hermes-parser": "0.25.1", "nullthrows": "^1.1.1" }, diff --git a/packages/react-native-bots/package.json b/packages/react-native-bots/package.json index a119bc1bb66a61..ea1f789f77eb06 100644 --- a/packages/react-native-bots/package.json +++ b/packages/react-native-bots/package.json @@ -1,7 +1,7 @@ { "name": "@react-native/bots", "description": "React Native Bots", - "version": "0.78.1", + "version": "0.78.2", "private": true, "license": "MIT", "repository": { diff --git a/packages/react-native-codegen-typescript-test/package.json b/packages/react-native-codegen-typescript-test/package.json index 804ec0fe8987bd..94beb5ef08f8bd 100644 --- a/packages/react-native-codegen-typescript-test/package.json +++ b/packages/react-native-codegen-typescript-test/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/codegen-typescript-test", - "version": "0.78.1", + "version": "0.78.2", "private": true, "description": "TypeScript related unit test for @react-native/codegen", "license": "MIT", @@ -19,7 +19,7 @@ "prepare": "yarn run build" }, "dependencies": { - "@react-native/codegen": "0.78.1" + "@react-native/codegen": "0.78.2" }, "devDependencies": { "@babel/core": "^7.25.2", diff --git a/packages/react-native-codegen/package.json b/packages/react-native-codegen/package.json index 400d9d9ec5e87a..0b2bb85f0f3cb5 100644 --- a/packages/react-native-codegen/package.json +++ b/packages/react-native-codegen/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/codegen", - "version": "0.78.1", + "version": "0.78.2", "description": "Code generation tools for React Native", "license": "MIT", "repository": { diff --git a/packages/react-native-fantom/package.json b/packages/react-native-fantom/package.json index e464a7e25fa364..63fae569b2c018 100644 --- a/packages/react-native-fantom/package.json +++ b/packages/react-native-fantom/package.json @@ -1,7 +1,7 @@ { "name": "@react-native/fantom", "private": true, - "version": "0.78.1", + "version": "0.78.2", "main": "src/index.js", "description": "Internal integration testing and benchmarking tool for React Native", "peerDependencies": { diff --git a/packages/react-native-info/package.json b/packages/react-native-info/package.json index de0ff7bef0aadb..8837293894ab3e 100644 --- a/packages/react-native-info/package.json +++ b/packages/react-native-info/package.json @@ -1,6 +1,6 @@ { "name": "react-native-info", - "version": "0.78.1", + "version": "0.78.2", "main": "build/index.js", "license": "MIT", "private": true, diff --git a/packages/react-native-popup-menu-android/package.json b/packages/react-native-popup-menu-android/package.json index 908f87dfffe578..f6183d3d2f7f86 100644 --- a/packages/react-native-popup-menu-android/package.json +++ b/packages/react-native-popup-menu-android/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/popup-menu-android", - "version": "0.78.1", + "version": "0.78.2", "description": "PopupMenu for the Android platform", "main": "index.js", "files": [ @@ -17,7 +17,7 @@ ], "license": "MIT", "devDependencies": { - "@react-native/codegen": "0.78.1" + "@react-native/codegen": "0.78.2" }, "peerDependencies": { "@types/react": "^19.0.0", diff --git a/packages/react-native-test-library/package.json b/packages/react-native-test-library/package.json index e9cc263b58cf1a..fd6cb2e1ffabd4 100644 --- a/packages/react-native-test-library/package.json +++ b/packages/react-native-test-library/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/oss-library-example", - "version": "0.78.1", + "version": "0.78.2", "private": true, "description": "Package that includes native module exapmle, native component example, targets both the old and the new architecture. It should serve as an example of a real-world OSS library.", "license": "MIT", @@ -26,8 +26,8 @@ ], "devDependencies": { "@babel/core": "^7.25.2", - "@react-native/babel-preset": "0.78.1", - "react-native": "0.78.1" + "@react-native/babel-preset": "0.78.2", + "react-native": "0.78.2" }, "peerDependencies": { "react": "*", diff --git a/packages/react-native/Libraries/Core/ReactNativeVersion.js b/packages/react-native/Libraries/Core/ReactNativeVersion.js index 8cf9b244ab8a9f..e47992fc8d2e01 100644 --- a/packages/react-native/Libraries/Core/ReactNativeVersion.js +++ b/packages/react-native/Libraries/Core/ReactNativeVersion.js @@ -16,7 +16,7 @@ const version: $ReadOnly<{ }> = { major: 0, minor: 78, - patch: 1, + patch: 2, prerelease: null, }; diff --git a/packages/react-native/React/Base/RCTVersion.m b/packages/react-native/React/Base/RCTVersion.m index 954adeeedd3ccb..917c106e42e9c3 100644 --- a/packages/react-native/React/Base/RCTVersion.m +++ b/packages/react-native/React/Base/RCTVersion.m @@ -23,7 +23,7 @@ __rnVersion = @{ RCTVersionMajor: @(0), RCTVersionMinor: @(78), - RCTVersionPatch: @(1), + RCTVersionPatch: @(2), RCTVersionPrerelease: [NSNull null], }; }); diff --git a/packages/react-native/ReactAndroid/gradle.properties b/packages/react-native/ReactAndroid/gradle.properties index 12dcb2710511d8..a38d501b6839c4 100644 --- a/packages/react-native/ReactAndroid/gradle.properties +++ b/packages/react-native/ReactAndroid/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=0.78.1 +VERSION_NAME=0.78.2 react.internal.publishingGroup=com.facebook.react android.useAndroidX=true diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java index bd705db8d44544..2c82f1d3cc4421 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java @@ -17,6 +17,6 @@ public class ReactNativeVersion { public static final Map VERSION = MapBuilder.of( "major", 0, "minor", 78, - "patch", 1, + "patch", 2, "prerelease", null); } diff --git a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h index e83551df7e195f..a061a541ae3752 100644 --- a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h +++ b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h @@ -17,7 +17,7 @@ namespace facebook::react { constexpr struct { int32_t Major = 0; int32_t Minor = 78; - int32_t Patch = 1; + int32_t Patch = 2; std::string_view Prerelease = ""; } ReactNativeVersion; diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 226ccb55b68b11..8521fff1cbba2c 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -1,6 +1,6 @@ { "name": "react-native", - "version": "0.78.1", + "version": "0.78.2", "description": "A framework for building native apps using React", "license": "MIT", "repository": { @@ -108,13 +108,13 @@ }, "dependencies": { "@jest/create-cache-key-function": "^29.6.3", - "@react-native/assets-registry": "0.78.1", - "@react-native/codegen": "0.78.1", - "@react-native/community-cli-plugin": "0.78.1", - "@react-native/gradle-plugin": "0.78.1", - "@react-native/js-polyfills": "0.78.1", - "@react-native/normalize-colors": "0.78.1", - "@react-native/virtualized-lists": "0.78.1", + "@react-native/assets-registry": "0.78.2", + "@react-native/codegen": "0.78.2", + "@react-native/community-cli-plugin": "0.78.2", + "@react-native/gradle-plugin": "0.78.2", + "@react-native/js-polyfills": "0.78.2", + "@react-native/normalize-colors": "0.78.2", + "@react-native/virtualized-lists": "0.78.2", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", diff --git a/packages/rn-tester/package.json b/packages/rn-tester/package.json index c343ee64d18c5b..ebb9ae27781e84 100644 --- a/packages/rn-tester/package.json +++ b/packages/rn-tester/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/tester", - "version": "0.78.1", + "version": "0.78.2", "private": true, "description": "React Native tester app.", "license": "MIT", @@ -27,8 +27,8 @@ "e2e-test-ios": "./scripts/maestro-test-ios.sh" }, "dependencies": { - "@react-native/oss-library-example": "0.78.1", - "@react-native/popup-menu-android": "0.78.1", + "@react-native/oss-library-example": "0.78.2", + "@react-native/popup-menu-android": "0.78.2", "flow-enums-runtime": "^0.0.6", "invariant": "^2.2.4", "nullthrows": "^1.1.1" diff --git a/packages/typescript-config/package.json b/packages/typescript-config/package.json index c48f4cb45e4cde..7765cb66e2b5b2 100644 --- a/packages/typescript-config/package.json +++ b/packages/typescript-config/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/typescript-config", - "version": "0.78.1", + "version": "0.78.2", "description": "Default TypeScript configuration for React Native apps", "license": "MIT", "repository": { diff --git a/packages/virtualized-lists/package.json b/packages/virtualized-lists/package.json index 0df56f1f659f25..8f5273d14d2329 100644 --- a/packages/virtualized-lists/package.json +++ b/packages/virtualized-lists/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/virtualized-lists", - "version": "0.78.1", + "version": "0.78.2", "description": "Virtualized lists for React Native.", "license": "MIT", "repository": { From b05a2548c7b3ce34052eb206fa32685403b096e9 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 22 Apr 2019 18:11:59 -0700 Subject: [PATCH 059/108] Avoid memory leak in RCTWebSocketModule --- packages/react-native/React/Base/RCTDisplayLink.m | 3 ++- packages/react-native/React/CoreModules/RCTWebSocketModule.mm | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/react-native/React/Base/RCTDisplayLink.m b/packages/react-native/React/Base/RCTDisplayLink.m index 4aed812ed7e04f..83fdff06ca5d55 100644 --- a/packages/react-native/React/Base/RCTDisplayLink.m +++ b/packages/react-native/React/Base/RCTDisplayLink.m @@ -19,7 +19,8 @@ #define RCTAssertRunLoop() \ RCTAssert(_runLoop == [NSRunLoop currentRunLoop], @"This method must be called on the CADisplayLink run loop") -@implementation RCTDisplayLink { +@implementation RCTDisplayLink +{ CADisplayLink *_jsDisplayLink; NSMutableSet *_frameUpdateObservers; NSRunLoop *_runLoop; diff --git a/packages/react-native/React/CoreModules/RCTWebSocketModule.mm b/packages/react-native/React/CoreModules/RCTWebSocketModule.mm index 3fd7238911f559..8c1990e66eaf9b 100644 --- a/packages/react-native/React/CoreModules/RCTWebSocketModule.mm +++ b/packages/react-native/React/CoreModules/RCTWebSocketModule.mm @@ -167,7 +167,6 @@ - (void)webSocket:(SRWebSocket *)webSocket didFailWithError:(NSError *)error { NSNumber *socketID = [webSocket reactTag]; _contentHandlers[socketID] = nil; - _sockets[socketID] = nil; NSDictionary *body = @{@"message" : error.localizedDescription ?: @"Undefined, error is nil", @"id" : socketID ?: @(-1)}; [self sendEventWithName:@"websocketFailed" body:body]; @@ -180,7 +179,6 @@ - (void)webSocket:(SRWebSocket *)webSocket { NSNumber *socketID = [webSocket reactTag]; _contentHandlers[socketID] = nil; - _sockets[socketID] = nil; [self sendEventWithName:@"websocketClosed" body:@{ @"code" : @(code), From 28447193a115e9a2b5199f538ffaf412811bafc8 Mon Sep 17 00:00:00 2001 From: mrkcsc Date: Sun, 12 Dec 2021 02:20:51 -0800 Subject: [PATCH 060/108] [Discord] Update boost podspec to expose PodToBuild friendly artifact. --- packages/react-native/third-party-podspecs/boost.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native/third-party-podspecs/boost.podspec b/packages/react-native/third-party-podspecs/boost.podspec index e30a2305df8e9f..0c7a0c0650b819 100644 --- a/packages/react-native/third-party-podspecs/boost.podspec +++ b/packages/react-native/third-party-podspecs/boost.podspec @@ -13,8 +13,8 @@ Pod::Spec.new do |spec| spec.homepage = 'http://www.boost.org' spec.summary = 'Boost provides free peer-reviewed portable C++ source libraries.' spec.authors = 'Rene Rivera' - spec.source = { :git => boost_git_url, - :tag => "v1.84.0" } + spec.source = { :http => 'https://archives.boost.io/release/1.84.0/source/boost_1_84_0.tar.gz', + :sha256 => 'a5800f405508f5df8114558ca9855d2640a2de8f0445f051fa1c7c3383045724' } # Pinning to the same version as React.podspec. spec.platforms = min_supported_versions From d1d206d7e17f9f5f5a7484cc22826385de42a032 Mon Sep 17 00:00:00 2001 From: Denbeigh Stevens Date: Thu, 27 Jan 2022 12:18:40 -0800 Subject: [PATCH 061/108] [Discord] Version bumping script --- discord/bump_version.py | 66 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100755 discord/bump_version.py diff --git a/discord/bump_version.py b/discord/bump_version.py new file mode 100755 index 00000000000000..fb41c7bc277276 --- /dev/null +++ b/discord/bump_version.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python3 + +from pathlib import Path +from typing import List +import re +import subprocess +import sys + + +def check_output(args: List[str]) -> str: + return subprocess.check_output(args).decode('utf-8').strip() + + +VERSION_MATCHER = re.compile(r'^(.*)-discord-(\d*)$') + +status = check_output(['git', 'status', '--porcelain']) +if status != '': + print('Detected changed files, please remove or commit them first.\n') + print(status) + sys.exit(1) + + +root = check_output(['git', 'rev-parse', '--show-toplevel']) +android_path = Path(root) / "ReactAndroid" +props_path = android_path / "gradle.properties" + +version = None +property_lines = [line.strip() for line in props_path.read_text().splitlines()] +for line in property_lines: + if line.startswith("VERSION_NAME="): + version = line.split('=')[1] + +assert version, "unable to find current version" + +matches = VERSION_MATCHER.match(version) +assert matches, f'{version} did not match expected format, X.Y.Z-discord-N' + +upstream = matches[1] +local = int(matches[2]) + +new_version = f'{upstream}-discord-{local + 1}' + +with open(props_path, 'w') as f: + for line in property_lines: + if line.startswith("VERSION_NAME="): + f.write(f'VERSION_NAME={new_version}\n') + else: + f.write(f'{line}\n') + + +branch_name = check_output(['git', 'symbolic-ref', '--short', 'HEAD']) + +subprocess.check_call( + ['../gradlew', 'publishReleasePublicationToDiscordRepository'], + cwd=android_path.absolute() + ) + +subprocess.check_call(['git', 'add', props_path.absolute()]) +subprocess.check_call(['git', 'commit', '-m', f'version bump: {new_version}']) +subprocess.check_call(['git', 'push', 'origin', branch_name]) + +new_commit = check_output(['git', 'rev-parse', 'HEAD']) + + +print(f'NEW TAGGED VERSION: {new_version}') +print(f'NEW COMMIT: {new_commit}') From b457431462512d803cac78a8f34f8b5d68b30b88 Mon Sep 17 00:00:00 2001 From: mrkcsc Date: Wed, 16 Mar 2022 14:59:40 -0700 Subject: [PATCH 062/108] [RNA] Add max fling velocity capability to scroll view. --- .../facebook/react/views/scroll/ReactScrollView.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java index adf92c118eae31..604b93be4be06d 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java @@ -83,6 +83,8 @@ public class ReactScrollView extends ScrollView HasScrollEventThrottle, HasSmoothScroll { + static Integer MAX_FLING_VELOCITY = null; + private static @Nullable Field sScrollerField; private static boolean sTriedToGetScrollerField = false; @@ -557,7 +559,14 @@ public boolean getChildVisibleRect(View child, Rect r, android.graphics.Point of @Override public void fling(int velocityY) { - final int correctedVelocityY = correctFlingVelocityY(velocityY); + final int correctedVelocityY; + if (MAX_FLING_VELOCITY != null) { + int velocityYBeforeMaxFling = correctFlingVelocityY(velocityY); + correctedVelocityY = (int) ((Math.min(Math.abs(velocityYBeforeMaxFling), MAX_FLING_VELOCITY)) * + Math.signum(velocityYBeforeMaxFling)); + } else { + correctedVelocityY = correctFlingVelocityY(velocityY); + } if (mPagingEnabled) { flingAndSnap(correctedVelocityY); From ae1621af5a60e9784342813e04869913caf3b3c7 Mon Sep 17 00:00:00 2001 From: mrkcsc Date: Thu, 24 Mar 2022 15:24:59 -0700 Subject: [PATCH 063/108] [RNA] Add useSmallCache prop to ReactImageView. --- .../react/views/image/ReactImageManager.kt | 5 +++ .../react/views/image/ReactImageView.kt | 31 ++++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageManager.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageManager.kt index 63942f03f6ee54..403583f205acf3 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageManager.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageManager.kt @@ -93,6 +93,11 @@ public constructor( public override fun getName(): String = REACT_CLASS + @ReactProp(name = "useSmallCache") + public fun setUseSmallCache(view: ReactImageView, useSmallCache: Boolean) { + view.setUseSmallCache(useSmallCache) + } + @ReactProp(name = "accessible") public fun setAccessible(view: ReactImageView, accessible: Boolean) { view.isFocusable = accessible diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.kt index 4662a3bc074eb2..0f31e609648e4a 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.kt @@ -22,6 +22,7 @@ import android.graphics.Shader.TileMode import android.graphics.drawable.Animatable import android.graphics.drawable.Drawable import android.net.Uri +import android.widget.Toast import com.facebook.common.references.CloseableReference import com.facebook.common.util.UriUtil import com.facebook.drawee.backends.pipeline.Fresco @@ -97,6 +98,7 @@ public class ReactImageView( private var scaleType = defaultValue() private var tileMode = defaultTileMode() private var isDirty = false + private var useSmallCache = false private var tilePostprocessor: TilePostprocessor? = null private var iterativeBoxBlurPostProcessor: IterativeBoxBlurPostProcessor? = null private var downloadListener: ReactImageDownloadListener? = null @@ -120,6 +122,13 @@ public class ReactImageView( } } + public fun setUseSmallCache(useSmallCache: Boolean) { + if (this.useSmallCache != useSmallCache) { + this.useSmallCache = useSmallCache + isDirty = true + } + } + public fun setShouldNotifyLoadEvents(shouldNotify: Boolean) { // Skip update if shouldNotify is already in sync with the download listener if (shouldNotify == (downloadListener != null)) { @@ -462,6 +471,12 @@ public class ReactImageView( imageRequestBuilder.setDownsampleOverride(DownsampleMode.NEVER) } + if (useSmallCache) { + imageRequestBuilder.setCacheChoice(ImageRequest.CacheChoice.SMALL); + } else { + imageRequestBuilder.setCacheChoice(ImageRequest.CacheChoice.DEFAULT); + } + val imageRequest: ImageRequest = ReactNetworkImageRequest.fromBuilderWithHeaders(imageRequestBuilder, headers, cacheControl) @@ -491,7 +506,15 @@ public class ReactImageView( if (resizeMethod == ImageResizeMethod.NONE) { cachedImageRequestBuilder.setDownsampleOverride(DownsampleMode.NEVER) } - builder.setLowResImageRequest(cachedImageRequestBuilder.build()) + + if (useSmallCache) { + cachedImageRequestBuilder.setCacheChoice(ImageRequest.CacheChoice.SMALL); + } else { + cachedImageRequestBuilder.setCacheChoice(ImageRequest.CacheChoice.DEFAULT); + } + + val cachedImageRequest = cachedImageRequestBuilder.build() + builder.setLowResImageRequest(cachedImageRequest) } if (downloadListener != null && controllerForTesting != null) { @@ -583,6 +606,12 @@ public class ReactImageView( // 4. Rinse and repeat. if (ReactBuildConfig.DEBUG && !ReactNativeFeatureFlags.enableBridgelessArchitecture()) { RNLog.w(context as ReactContext, "ReactImageView: Image source \"$uri\" doesn't exist") + + Toast.makeText( + context, + "Warning: Image source \"$uri\" doesn't exist", + Toast.LENGTH_SHORT) + .show(); } } From 6df70c02fc7bc54a83cb23824a4fdb58804400f0 Mon Sep 17 00:00:00 2001 From: Zhi Pan Date: Wed, 6 Apr 2022 17:51:03 -0700 Subject: [PATCH 064/108] animate switch on value change --- packages/react-native/React/Views/RCTSwitchManager.m | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/react-native/React/Views/RCTSwitchManager.m b/packages/react-native/React/Views/RCTSwitchManager.m index b04b51f844e11a..9f47d5eb7f0eba 100644 --- a/packages/react-native/React/Views/RCTSwitchManager.m +++ b/packages/react-native/React/Views/RCTSwitchManager.m @@ -49,7 +49,17 @@ - (void)onChange:(RCTSwitch *)sender RCT_EXPORT_VIEW_PROPERTY(onTintColor, UIColor); RCT_EXPORT_VIEW_PROPERTY(tintColor, UIColor); RCT_EXPORT_VIEW_PROPERTY(thumbTintColor, UIColor); -RCT_REMAP_VIEW_PROPERTY(value, on, BOOL); +//RCT_REMAP_VIEW_PROPERTY(value, on, BOOL); +RCT_CUSTOM_VIEW_PROPERTY(value, BOOL, RCTSwitch) +{ + if (json) { + BOOL on = [RCTConvert BOOL:json]; + if (view.wasOn != on) { + [(UISwitch *)view setOn:on animated:YES]; + view.wasOn = on; + } + } +} RCT_EXPORT_VIEW_PROPERTY(onChange, RCTBubblingEventBlock); RCT_CUSTOM_VIEW_PROPERTY(disabled, BOOL, RCTSwitch) { From e4e6ead7bcca1bb572908c9e53ddcea078707a8d Mon Sep 17 00:00:00 2001 From: mrkcsc Date: Tue, 19 Apr 2022 08:37:32 -0700 Subject: [PATCH 065/108] [RNA] Allow modal component to be edge to edge on Android. --- .../facebook/react/views/modal/ReactModalHostView.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt index ff673906481810..fed597318c36d2 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt @@ -27,6 +27,8 @@ import android.view.accessibility.AccessibilityEvent import android.view.accessibility.AccessibilityNodeInfo import android.widget.FrameLayout import androidx.annotation.UiThread +import androidx.core.content.ContextCompat +import androidx.core.view.WindowCompat import com.facebook.common.logging.FLog import com.facebook.react.R import com.facebook.react.bridge.GuardedRunnable @@ -265,6 +267,15 @@ public class ReactModalHostView(context: ThemedReactContext) : WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE) + // Enabled Edge to Edge modal when transparent/translucent system UI. + if (transparent && statusBarTranslucent) { + newDialog.window?.let { + it.addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); + it.navigationBarColor = ContextCompat.getColor(context, android.R.color.transparent); + WindowCompat.setDecorFitsSystemWindows(it, false) + }; + } + newDialog.setContentView(contentView) updateProperties() From ede5a7cfeb2789be6610442cd1df6759964ad46c Mon Sep 17 00:00:00 2001 From: AndyG Date: Wed, 11 May 2022 13:46:23 -0700 Subject: [PATCH 066/108] have clicks working to show keyboard on android 7 --- .../react/views/textinput/ReactEditText.java | 9 ++ .../textinput/ReactEditTextClickDetector.java | 92 +++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditTextClickDetector.java diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java index a0370775f5c288..ed7557a8a62b69 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java @@ -143,6 +143,8 @@ public class ReactEditText extends AppCompatEditText { private static final KeyListener sKeyListener = QwertyKeyListener.getInstanceForFullKeyboard(); private @Nullable EventDispatcher mEventDispatcher; + private final ReactEditTextClickDetector clickDetector = new ReactEditTextClickDetector(this); + public ReactEditText(Context context) { super(context); setFocusableInTouchMode(false); @@ -264,6 +266,13 @@ public boolean onTouchEvent(MotionEvent ev) { // Disallow parent views to intercept touch events, until we can detect if we should be // capturing these touches or not. this.getParent().requestDisallowInterceptTouchEvent(true); + clickDetector.handleDown(ev); + break; + case MotionEvent.ACTION_UP: + clickDetector.handleUp(ev); + break; + case MotionEvent.ACTION_CANCEL: + clickDetector.cancelPress(); break; case MotionEvent.ACTION_MOVE: if (mDetectScrollMovement) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditTextClickDetector.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditTextClickDetector.java new file mode 100644 index 00000000000000..9098d25ce06cf5 --- /dev/null +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditTextClickDetector.java @@ -0,0 +1,92 @@ +package com.facebook.react.views.textinput; + +import android.os.Build; +import android.view.MotionEvent; +import android.view.View; + +import androidx.annotation.Nullable; + +class ReactEditTextClickDetector { + + private static final long MAX_CLICK_DURATION_MS = 250L; + private static final int MAX_CLICK_DISTANCE_DP = 12; + + private final ReactEditText reactEditText; + private final float screenDensity; + + @Nullable + private TimestampedMotionEvent currentDownEvent; + + public ReactEditTextClickDetector(final ReactEditText reactEditText) { + this.reactEditText = reactEditText; + screenDensity = reactEditText.getResources().getDisplayMetrics().density; + } + + void handleDown(final MotionEvent downEvent) { + currentDownEvent = new TimestampedMotionEvent(System.currentTimeMillis(), downEvent); + } + + void cancelPress() { + currentDownEvent = null; + } + + void handleUp(final MotionEvent upEvent) { + if (currentDownEvent == null) { + return; + } + + final TimestampedMotionEvent downEvent = currentDownEvent; + currentDownEvent = null; + + // for now, if we're not forcing showing the keyboard on clicks, we don't care if it was a + // click. we also early return if the view is not enabled. + if (!(forceShowKeyboardOnClicks() && reactEditText.isEnabled())) { + return; + } + + // make sure the press event was close enough in time + final long now = System.currentTimeMillis(); + final long timeDelta = now - downEvent.timestamp; + if (timeDelta > MAX_CLICK_DURATION_MS) { + return; + } + + // make sure the press event was close enough in distance + final float oldX = downEvent.motionEvent.getRawX(); + final float oldY = downEvent.motionEvent.getRawY(); + final float newX = upEvent.getRawX(); + final float newY = upEvent.getRawY(); + + // distance = sqrt((x2 − x1)^2 + (y2 − y1)^2) + final double distancePx = Math.sqrt( + Math.pow((newX - oldX), 2) + Math.pow((newY - oldY), 2) + ); + + double distanceDp = distancePx / screenDensity; + if (distanceDp > MAX_CLICK_DISTANCE_DP) { + return; + } + + reactEditText.showSoftKeyboard(); + } + + /** + * There is a bug on Android 7/8/9 where clicking the view while it is already + * focused does not show the keyboard. On those API levels, we force showing + * the keyboard when we detect a click. + */ + private static boolean forceShowKeyboardOnClicks() { + return Build.VERSION.SDK_INT <= Build.VERSION_CODES.P; + } + + private static class TimestampedMotionEvent { + + final long timestamp; + final MotionEvent motionEvent; + + TimestampedMotionEvent(final long timestamp, final MotionEvent motionEvent) { + this.timestamp = timestamp; + this.motionEvent = motionEvent; + } + } +} From f7e838218a1fc20eafb7c300d1ae1bee8683dbe6 Mon Sep 17 00:00:00 2001 From: Neal Manaktola Date: Wed, 25 May 2022 18:39:49 -0400 Subject: [PATCH 067/108] expose `flush` on RCTWebSocketModule to close all open websockets synchronously (#14) * expose `flush` on RCTWebSocketModule to close all open websockets synchronously add log statement back * simplify code * simplify even more * change comment --- .../react-native/React/CoreModules/RCTWebSocketModule.h | 3 +++ .../react-native/React/CoreModules/RCTWebSocketModule.mm | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/packages/react-native/React/CoreModules/RCTWebSocketModule.h b/packages/react-native/React/CoreModules/RCTWebSocketModule.h index f92bfc42e3aea3..cf9da4ed2a8f18 100644 --- a/packages/react-native/React/CoreModules/RCTWebSocketModule.h +++ b/packages/react-native/React/CoreModules/RCTWebSocketModule.h @@ -25,6 +25,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)sendData:(NSData *)data forSocketID:(nonnull NSNumber *)socketID; +// Blocking call that waits until there are no more remaining actions on the queue +- (void)flush; + @end @interface RCTBridge (RCTWebSocketModule) diff --git a/packages/react-native/React/CoreModules/RCTWebSocketModule.mm b/packages/react-native/React/CoreModules/RCTWebSocketModule.mm index 8c1990e66eaf9b..256b50511b4f62 100644 --- a/packages/react-native/React/CoreModules/RCTWebSocketModule.mm +++ b/packages/react-native/React/CoreModules/RCTWebSocketModule.mm @@ -51,6 +51,14 @@ - (NSArray *)supportedEvents return @[ @"websocketMessage", @"websocketOpen", @"websocketFailed", @"websocketClosed" ]; } + +- (void)flush +{ + for (RCTSRWebSocket *socket in _sockets.allValues) { + [socket flush]; + } +} + - (void)invalidate { [super invalidate]; From 0ffa31fdf0200c8d560214cf82d895f9a76ce970 Mon Sep 17 00:00:00 2001 From: Danny Weinberg Date: Mon, 13 Jun 2022 15:02:49 -0700 Subject: [PATCH 068/108] [Discord] Have codegen script prefer `react-codegen` in NPM For some reason the in-repo version isn't where this script it expects it to be (it's at `src` in our repo, whereas the script is looking in `lib`). This is likely due to us pulling down the source code directly whereas the script expects it to have gone through some build process first. In any case, this updates thes cript to prefer the version provided via NPM which does tend to work. --- .../scripts/react_native_pods_utils/script_phases.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/react-native/scripts/react_native_pods_utils/script_phases.sh b/packages/react-native/scripts/react_native_pods_utils/script_phases.sh index 92325f1ad078f4..ae3dd62eb0090f 100755 --- a/packages/react-native/scripts/react_native_pods_utils/script_phases.sh +++ b/packages/react-native/scripts/react_native_pods_utils/script_phases.sh @@ -21,6 +21,18 @@ error () { exit 1 } +# Determine path to react-native-codegen +# DISCORD FIX: Our repo path isn't valid (has the files under `src` +# rather than `lib`), so the order of this `if` was modified to prefer +# the NPM path. +if [ -d "$CODEGEN_NPM_PATH" ]; then + CODEGEN_CLI_PATH=$(cd "$CODEGEN_NPM_PATH" && pwd) +elif [ -d "$CODEGEN_REPO_PATH" ]; then + CODEGEN_CLI_PATH=$(cd "$CODEGEN_REPO_PATH" && pwd) +else + error "error: Could not determine react-native-codegen location in $CODEGEN_REPO_PATH or $CODEGEN_NPM_PATH. Try running 'yarn install' or 'npm install' in your project root." +fi + find_node () { NODE_BINARY="${NODE_BINARY:-$(command -v node || true)}" if [ -z "$NODE_BINARY" ]; then From 16c200f145841a4c2c35fadda94ec3b00db41208 Mon Sep 17 00:00:00 2001 From: Ankit Kumar Date: Wed, 22 Jun 2022 14:06:01 -0400 Subject: [PATCH 069/108] Add a `preventClipping` prop --- .../react/views/view/ReactViewGroup.java | 62 ++++++++++++++++++- .../react/views/view/ReactViewManager.kt | 5 ++ 2 files changed, 64 insertions(+), 3 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java index 46302881b3e81f..1df2615e038806 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java @@ -139,6 +139,7 @@ public void shutdown() { private float mBackfaceOpacity; private boolean mBackfaceVisible; private @Nullable Set mChildrenRemovedWhileTransitioning; + private boolean mPreventClipping; /** * Creates a new `ReactViewGroup` instance. @@ -174,6 +175,7 @@ private void initView() { mBackfaceOpacity = 1.f; mBackfaceVisible = true; mChildrenRemovedWhileTransitioning = null; + mPreventClipping = false; } /* package */ void recycleView() { @@ -350,6 +352,19 @@ public void setBorderStyle(@Nullable String style) { this, style == null ? null : BorderStyle.fromString(style)); } + public void setPreventClipping(boolean preventClipping) { + mPreventClipping = preventClipping; + + // TODO(apkumar) + // + // It would be nice to trigger the LayoutChangeListener at this point. + } + + public boolean getPreventClipping() { + return mPreventClipping; + } + + @Override public void setRemoveClippedSubviews(boolean removeClippedSubviews) { if (removeClippedSubviews == mRemoveClippedSubviews) { @@ -486,20 +501,61 @@ private void updateSubviewClipStatus(Rect clippingRect, int idx, int clippedSoFa // it won't be size and located properly. Animation animation = child.getAnimation(); boolean isAnimating = animation != null && !animation.hasEnded(); - if (!intersects && !isViewClipped(child, idx) && !isAnimating) { + + // NOTE (apkumar): + // + // The `preventClipping` logic here, and the `getDrawingOrderHelper().*` + // calls within the if-else statements below, are added in our fork. They + // work together to support `removeClippedSubviews` in the presence of + // animated subviews. + // + // Typically, when `removeClippedSubviews` is turned on, you run the risk + // of animated subviews being clipped when they shouldn't be, since their + // bounding rectangle may be outside the clipping window, but due to the + // animation transforming the view, the actual rendering _would be_ inside + // the clipping window. To fix this, we added a `preventClipping` prop to + // Views, and here we simply never clip any View that has that prop set to + // true. + // + // That change fixes the clipping issue, but exposed a second problem: when + // `removeClippedSubviews` is turned on, React Native's zIndex system is + // not respected. The issue is that, normally, the drawing order helper is + // informed of new and removed views via handleAddView and + // handleRemoveView, called in `addView` and `removeView` respectively. + // However, when removeClippedSubviews is true, + // `addViewWithSubviewClippingEnabled` is called _instead of_ `addView`, + // which _does not_ call into the drawing order helper's handleAddView + // (with a similar story for removing views). Because of this, the drawing + // order helper is not aware of any child views, and so does not perform + // any of the z-indexing logic it normally does. + // + // To fix that second issue, we simply have to call handleRemoveView / + // handleAddView explicitly here, when the clipping logic adds or removes + // views because of their intersection with the clipping window. + boolean preventClipping = false; + if (child instanceof ReactViewGroup) { + preventClipping = ((ReactViewGroup)child).getPreventClipping(); + } + + if (!intersects && !isViewClipped(child, idx) && !isAnimating && !preventClipping) { setViewClipped(child, true); + getDrawingOrderHelper().handleRemoveView(child); + setChildrenDrawingOrderEnabled(getDrawingOrderHelper().shouldEnableCustomDrawingOrder()); // We can try saving on invalidate call here as the view that we remove is out of visible area // therefore invalidation is not necessary. removeViewInLayout(child); needUpdateClippingRecursive = true; - } else if (intersects && isViewClipped(child, idx)) { + } else if (((intersects && isViewClipped(child, idx)) || preventClipping) && child.getParent() == null) { int adjustedIdx = idx - clippedSoFar; Assertions.assertCondition(adjustedIdx >= 0); + getDrawingOrderHelper().handleAddView(child); + setChildrenDrawingOrderEnabled(getDrawingOrderHelper().shouldEnableCustomDrawingOrder()); + setViewClipped(child, false); addViewInLayout(child, adjustedIdx, sDefaultLayoutParam, true); invalidate(); needUpdateClippingRecursive = true; - } else if (intersects) { + } else if (intersects || preventClipping) { // If there is any intersection we need to inform the child to update its clipping rect needUpdateClippingRecursive = true; } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.kt index 99d64164593b0f..c24247af70525c 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.kt @@ -81,6 +81,11 @@ public open class ReactViewManager : ReactClippingViewManager() view.isFocusable = accessible } + @ReactProp(name = "preventClipping") + public open fun setPreventClipping(view: ReactViewGroup, preventClipping: Boolean) { + view.preventClipping = preventClipping + } + @ReactProp(name = "hasTVPreferredFocus") public open fun setTVPreferredFocus(view: ReactViewGroup, hasTVPreferredFocus: Boolean) { if (hasTVPreferredFocus) { From 0f80a08f0c33f63078be6dc1bc5025695949d2d7 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 29 Jun 2022 19:17:51 -0500 Subject: [PATCH 070/108] Ripple radius now applies to corner radius instead of circular radius --- .../Pressable/useAndroidRippleForView.js | 6 +++++- .../Libraries/Components/View/ViewPropTypes.js | 1 + .../react/views/view/ReactDrawableHelper.kt | 14 ++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/packages/react-native/Libraries/Components/Pressable/useAndroidRippleForView.js b/packages/react-native/Libraries/Components/Pressable/useAndroidRippleForView.js index 20dd19e969181b..ed6eb2f67e10dd 100644 --- a/packages/react-native/Libraries/Components/Pressable/useAndroidRippleForView.js +++ b/packages/react-native/Libraries/Components/Pressable/useAndroidRippleForView.js @@ -24,12 +24,14 @@ type NativeBackgroundProp = $ReadOnly<{| color: ?number, borderless: boolean, rippleRadius: ?number, + rippleCornerRadius: ?number, |}>; export type RippleConfig = {| color?: ColorValue, borderless?: boolean, radius?: number, + cornerRadius?: number, foreground?: boolean, |}; @@ -48,7 +50,8 @@ export default function useAndroidRippleForView( | $ReadOnly<{|nativeBackgroundAndroid: NativeBackgroundProp|}> | $ReadOnly<{|nativeForegroundAndroid: NativeBackgroundProp|}>, |}> { - const {color, borderless, radius, foreground} = rippleConfig ?? {}; + const {color, borderless, radius, cornerRadius, foreground} = + rippleConfig ?? {}; return useMemo(() => { if ( @@ -66,6 +69,7 @@ export default function useAndroidRippleForView( color: processedColor, borderless: borderless === true, rippleRadius: radius, + rippleCornerRadius: cornerRadius, }; return { diff --git a/packages/react-native/Libraries/Components/View/ViewPropTypes.js b/packages/react-native/Libraries/Components/View/ViewPropTypes.js index f56e28d86e0c4b..9f209a4fc21678 100644 --- a/packages/react-native/Libraries/Components/View/ViewPropTypes.js +++ b/packages/react-native/Libraries/Components/View/ViewPropTypes.js @@ -261,6 +261,7 @@ type AndroidDrawableRipple = $ReadOnly<{| color?: ?number, borderless?: ?boolean, rippleRadius?: ?number, + rippleCornerRadius?: ?number, |}>; type AndroidDrawable = AndroidDrawableThemeAttr | AndroidDrawableRipple; diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactDrawableHelper.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactDrawableHelper.kt index 735d69bd2909f7..a76546e6c12609 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactDrawableHelper.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactDrawableHelper.kt @@ -101,6 +101,20 @@ public object ReactDrawableHelper { } private fun getMask(drawableDescriptionDict: ReadableMap): Drawable? { + if (drawableDescriptionDict.hasKey("borderless") && drawableDescriptionDict.getBoolean("borderless")) { + // Borderless ripples don't have masks. + return null + } + + if (drawableDescriptionDict.hasKey("rippleCornerRadius")) { + val rippleRadius = PixelUtil.toPixelFromDIP(drawableDescriptionDict.getDouble("rippleCornerRadius")) + return ShapeDrawable(RoundRectShape( + FloatArray(8) { rippleRadius }, + null, + null + )) + } + if (!drawableDescriptionDict.hasKey("borderless") || drawableDescriptionDict.isNull("borderless") || !drawableDescriptionDict.getBoolean("borderless")) { From 4db42affead79af4afc60e4fe9da86ce6d4762c5 Mon Sep 17 00:00:00 2001 From: Charles Xue Date: Mon, 29 Aug 2022 15:05:30 -0700 Subject: [PATCH 071/108] [RNA] CustomLineHeightSpan changes --- .../views/text/internal/span/CustomLineHeightSpan.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/CustomLineHeightSpan.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/CustomLineHeightSpan.kt index c73d42fd48ff8e..d0424f6a5b96f3 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/CustomLineHeightSpan.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/CustomLineHeightSpan.kt @@ -9,6 +9,7 @@ package com.facebook.react.views.text.internal.span import android.graphics.Paint.FontMetricsInt import android.text.style.LineHeightSpan +import com.facebook.react.bridge.Callback import kotlin.math.ceil import kotlin.math.floor @@ -37,6 +38,10 @@ public class CustomLineHeightSpan(height: Float) : LineHeightSpan, ReactSpan { // ascent above the baseline of A′ = A + L/2, and an effective descent of D′ = D + L/2. However, // if line-fit-edge is not leading and this is not the root inline box, if the half-leading is // positive, treat it as zero. The layout bounds exactly encloses this effective A′ and D′. + chooseHeightOverride?.let { + it.invoke(fm, lineHeight) + return + } val leading = lineHeight - ((-fm.ascent) + fm.descent) fm.ascent -= ceil(leading / 2.0f).toInt() @@ -53,4 +58,8 @@ public class CustomLineHeightSpan(height: Float) : LineHeightSpan, ReactSpan { fm.bottom = fm.descent } } + + public companion object { + public var chooseHeightOverride: Callback? = null + } } From 3507fe7a4c4fbe0e335f261834e2888dd3ae9680 Mon Sep 17 00:00:00 2001 From: Alex Hendrix Date: Thu, 18 Jul 2024 18:04:15 -0500 Subject: [PATCH 072/108] Custom handling of fonts --- .../Libraries/Text/RCTTextAttributes.mm | 54 +++- .../ReactAndroid/api/ReactAndroid.api | 32 --- .../react/common/assets/ReactFontManager.kt | 197 ------------- .../react/views/text/CreateTypefaceObject.kt | 9 + .../react/views/text/ReactFontManager.kt | 269 ++++++++++++++++-- .../text/internal/span/CustomStyleSpan.kt | 2 +- .../react/uiapp/RNTesterApplication.kt | 2 +- 7 files changed, 301 insertions(+), 264 deletions(-) delete mode 100644 packages/react-native/ReactAndroid/src/main/java/com/facebook/react/common/assets/ReactFontManager.kt create mode 100644 packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/CreateTypefaceObject.kt diff --git a/packages/react-native/Libraries/Text/RCTTextAttributes.mm b/packages/react-native/Libraries/Text/RCTTextAttributes.mm index 43dd1f7c18ee0e..7841115b995fc3 100644 --- a/packages/react-native/Libraries/Text/RCTTextAttributes.mm +++ b/packages/react-native/Libraries/Text/RCTTextAttributes.mm @@ -223,14 +223,52 @@ - (NSParagraphStyle *)effectiveParagraphStyle - (UIFont *)effectiveFont { - // FIXME: RCTFont has thread-safety issues and must be rewritten. - return [RCTFont updateFont:nil - withFamily:_fontFamily - size:@(isnan(_fontSize) ? 0 : _fontSize) - weight:_fontWeight - style:_fontStyle - variant:_fontVariant - scaleMultiplier:self.effectiveFontSizeMultiplier]; + NSArray *rawFontFamilies = [_fontFamily componentsSeparatedByString:@","]; + + // If _fontFamily is nil or has a single fontFamily, then use the original RN logic. + if (rawFontFamilies.count <= 1) { + // FIXME: RCTFont has thread-safety issues and must be rewritten. + return [RCTFont updateFont:nil + withFamily:_fontFamily + size:@(isnan(_fontSize) ? 0 : _fontSize) + weight:_fontWeight + style:_fontStyle + variant:_fontVariant + scaleMultiplier:self.effectiveFontSizeMultiplier]; + } + + NSMutableArray *fonts = [NSMutableArray new]; + for (NSString *rawFontFamily in rawFontFamilies) { + NSString *fontFamily = [rawFontFamily stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; + if (fontFamily.length == 0) { + continue; + } + + UIFont *font = [RCTFont updateFont:nil + withFamily:fontFamily + size:@(isnan(_fontSize) ? 0 : _fontSize) + weight:_fontWeight + style:_fontStyle + variant:_fontVariant + scaleMultiplier:self.effectiveFontSizeMultiplier]; + + if (font) { + [fonts addObject:font]; + } + } + + UIFont *primaryFont = fonts[0]; + + NSMutableArray *fontDescriptors = [NSMutableArray new]; + for (NSUInteger i = 1; i < fonts.count; i++) { + UIFont *font = fonts[i]; + [fontDescriptors addObject:font.fontDescriptor]; + } + + UIFontDescriptor *fontDescriptor = [primaryFont.fontDescriptor fontDescriptorByAddingAttributes: + @{UIFontDescriptorCascadeListAttribute: fontDescriptors}]; + + return [UIFont fontWithDescriptor:fontDescriptor size:primaryFont.pointSize]; } - (CGFloat)effectiveFontSizeMultiplier diff --git a/packages/react-native/ReactAndroid/api/ReactAndroid.api b/packages/react-native/ReactAndroid/api/ReactAndroid.api index e544465aa330b8..bcd1984958efc1 100644 --- a/packages/react-native/ReactAndroid/api/ReactAndroid.api +++ b/packages/react-native/ReactAndroid/api/ReactAndroid.api @@ -1870,38 +1870,6 @@ public abstract interface annotation class com/facebook/react/common/annotations public abstract interface annotation class com/facebook/react/common/annotations/VisibleForTesting : java/lang/annotation/Annotation { } -public final class com/facebook/react/common/assets/ReactFontManager { - public static final field Companion Lcom/facebook/react/common/assets/ReactFontManager$Companion; - public fun ()V - public final fun addCustomFont (Landroid/content/Context;Ljava/lang/String;I)V - public final fun addCustomFont (Ljava/lang/String;Landroid/graphics/Typeface;)V - public static final fun getInstance ()Lcom/facebook/react/common/assets/ReactFontManager; - public final fun getTypeface (Ljava/lang/String;IILandroid/content/res/AssetManager;)Landroid/graphics/Typeface; - public final fun getTypeface (Ljava/lang/String;ILandroid/content/res/AssetManager;)Landroid/graphics/Typeface; - public final fun getTypeface (Ljava/lang/String;IZLandroid/content/res/AssetManager;)Landroid/graphics/Typeface; - public final fun getTypeface (Ljava/lang/String;Lcom/facebook/react/common/assets/ReactFontManager$TypefaceStyle;Landroid/content/res/AssetManager;)Landroid/graphics/Typeface; - public final fun setTypeface (Ljava/lang/String;ILandroid/graphics/Typeface;)V -} - -public final class com/facebook/react/common/assets/ReactFontManager$Companion { - public final fun getInstance ()Lcom/facebook/react/common/assets/ReactFontManager; -} - -public final class com/facebook/react/common/assets/ReactFontManager$TypefaceStyle { - public static final field BOLD I - public static final field Companion Lcom/facebook/react/common/assets/ReactFontManager$TypefaceStyle$Companion; - public static final field NORMAL I - public fun (I)V - public fun (II)V - public synthetic fun (IIILkotlin/jvm/internal/DefaultConstructorMarker;)V - public fun (IZ)V - public final fun apply (Landroid/graphics/Typeface;)Landroid/graphics/Typeface; - public final fun getNearestStyle ()I -} - -public final class com/facebook/react/common/assets/ReactFontManager$TypefaceStyle$Companion { -} - public final class com/facebook/react/common/build/ReactBuildConfig { public static final field DEBUG Z public static final field EXOPACKAGE_FLAGS I diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/common/assets/ReactFontManager.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/common/assets/ReactFontManager.kt deleted file mode 100644 index 8850773c4e9c1b..00000000000000 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/common/assets/ReactFontManager.kt +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -package com.facebook.react.common.assets - -import android.content.Context -import android.content.res.AssetManager -import android.graphics.Typeface -import android.os.Build -import android.util.SparseArray -import androidx.core.content.res.ResourcesCompat -import com.facebook.react.common.ReactConstants - -/** - * Responsible for loading and caching Typeface objects. - * - * This will first try to load a typeface from the assets/fonts folder. If one is not found in that - * folder, this will fallback to the best matching system typeface. - * - * Custom fonts support the extensions `.ttf` and `.otf` and the variants `bold`, `italic`, and - * `bold_italic`. For example, given a font named "ExampleFontFamily", the following are supported: - * * ExampleFontFamily.ttf (or .otf) - * * ExampleFontFamily_bold.ttf (or .otf) - * * ExampleFontFamily_italic.ttf (or .otf) - * * ExampleFontFamily_bold_italic.ttf (or .otf) - */ -public class ReactFontManager { - - private val fontCache: MutableMap = mutableMapOf() - private val customTypefaceCache: MutableMap = mutableMapOf() - - public fun getTypeface( - fontFamilyName: String, - style: Int, - assetManager: AssetManager?, - ): Typeface = getTypeface(fontFamilyName, TypefaceStyle(style), assetManager) - - public fun getTypeface( - fontFamilyName: String, - weight: Int, - italic: Boolean, - assetManager: AssetManager?, - ): Typeface = getTypeface(fontFamilyName, TypefaceStyle(weight, italic), assetManager) - - public fun getTypeface( - fontFamilyName: String, - style: Int, - weight: Int, - assetManager: AssetManager?, - ): Typeface = getTypeface(fontFamilyName, TypefaceStyle(style, weight), assetManager) - - public fun getTypeface( - fontFamilyName: String, - typefaceStyle: TypefaceStyle, - assetManager: AssetManager?, - ): Typeface { - if (customTypefaceCache.containsKey(fontFamilyName)) { - // Apply `typefaceStyle` because custom fonts configure variants using `app:fontStyle` and - // `app:fontWeight` in their resource XML configuration file. - return typefaceStyle.apply(customTypefaceCache[fontFamilyName]) - } - - val assetFontFamily = fontCache.getOrPut(fontFamilyName) { AssetFontFamily() } - val style = typefaceStyle.nearestStyle - return assetFontFamily.getTypefaceForStyle(style) - ?: createAssetTypeface(fontFamilyName, style, assetManager).also { - assetFontFamily.setTypefaceForStyle(style, it) - } - } - - /* - * This method allows you to load custom fonts from res/font folder as provided font family name. - * Fonts may be one of .ttf, .otf or XML (https://developer.android.com/guide/topics/ui/look-and-feel/fonts-in-xml). - * To support multiple font styles or weights, you must provide a font in XML format. - * - * ReactFontManager.getInstance().addCustomFont(this, "Srisakdi", R.font.srisakdi); - */ - public fun addCustomFont(context: Context, fontFamily: String, fontId: Int): Unit { - addCustomFont(fontFamily, ResourcesCompat.getFont(context, fontId)) - } - - /** - * Equivalent method to {@see addCustomFont(Context, String, int)} which accepts a Typeface - * object. - */ - public fun addCustomFont(fontFamily: String, font: Typeface?): Unit { - if (font != null) { - customTypefaceCache[fontFamily] = font - } - } - - /** - * Add additional font family, or replace the exist one in the font memory cache. - * - * @see [Typeface.DEFAULT] - * @see [Typeface.BOLD] - * @see [Typeface.ITALIC] - * @see [Typeface.BOLD_ITALIC] - */ - public fun setTypeface(fontFamilyName: String, style: Int, typeface: Typeface?): Unit { - if (typeface != null) { - fontCache.getOrPut(fontFamilyName) { AssetFontFamily() }.setTypefaceForStyle(style, typeface) - } - } - - /** Responsible for normalizing style and numeric weight for backward compatibility. */ - public class TypefaceStyle { - private val italic: Boolean - private val weight: Int - - public constructor(weight: Int, italic: Boolean) { - this.italic = italic - this.weight = if (weight == ReactConstants.UNSET) NORMAL else weight - } - - /** - * If `weight` is supplied, it will be combined with the italic bit from `style`. Otherwise, any - * existing weight bit in `style` will be used. - */ - @JvmOverloads - public constructor(style: Int, weight: Int = ReactConstants.UNSET) { - val fixedStyle = if (style == ReactConstants.UNSET) Typeface.NORMAL else style - italic = (fixedStyle and Typeface.ITALIC) != 0 - this.weight = - if (weight == ReactConstants.UNSET) - (if ((fixedStyle and Typeface.BOLD) != 0) BOLD else NORMAL) - else weight - } - - public val nearestStyle: Int - get() = - if (weight < BOLD) { - if (italic) Typeface.ITALIC else Typeface.NORMAL - } else { - if (italic) Typeface.BOLD_ITALIC else Typeface.BOLD - } - - public fun apply(typeface: Typeface?): Typeface = - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) { - Typeface.create(typeface, nearestStyle) - } else { - Typeface.create(typeface, weight, italic) - } - - public companion object { - public const val BOLD: Int = 700 - public const val NORMAL: Int = 400 - } - } - - public companion object { - - // NOTE: Indices in `EXTENSIONS` correspond to the `TypeFace` style constants. - private val EXTENSIONS = arrayOf("", "_bold", "_italic", "_bold_italic") - private val FILE_EXTENSIONS = arrayOf(".ttf", ".otf") - private const val FONTS_ASSET_PATH = "fonts/" - - private val _instance = ReactFontManager() - - @JvmStatic public fun getInstance(): ReactFontManager = _instance - - private fun createAssetTypeface( - fontFamilyName: String, - style: Int, - assetManager: AssetManager?, - ): Typeface { - if (assetManager != null) { - val extension = EXTENSIONS[style] - for (fileExtension in FILE_EXTENSIONS) { - val fileName = "$FONTS_ASSET_PATH$fontFamilyName$extension$fileExtension" - try { - return Typeface.createFromAsset(assetManager, fileName) - } catch (e: RuntimeException) { - // If the typeface asset does not exist, try another extension. - continue - } - } - } - return Typeface.create(fontFamilyName, style) - } - } - - /** Responsible for caching typefaces for each custom font family. */ - private class AssetFontFamily { - private val typefaceSparseArray: SparseArray = SparseArray(4) - - fun getTypefaceForStyle(style: Int): Typeface? = typefaceSparseArray[style] - - fun setTypefaceForStyle(style: Int, typeface: Typeface?) { - typefaceSparseArray.put(style, typeface) - } - } -} diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/CreateTypefaceObject.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/CreateTypefaceObject.kt new file mode 100644 index 00000000000000..604f4162151fc6 --- /dev/null +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/CreateTypefaceObject.kt @@ -0,0 +1,9 @@ +package com.facebook.react.views.text + +import android.content.res.AssetManager + +public class CreateTypefaceObject( + public var fontFamilyName: String, + public var style: Int, + public var assetManager: AssetManager +) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactFontManager.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactFontManager.kt index 5b4cee489b41a7..d44bc0de4410e5 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactFontManager.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactFontManager.kt @@ -10,51 +10,270 @@ package com.facebook.react.views.text import android.content.Context import android.content.res.AssetManager import android.graphics.Typeface -import com.facebook.react.common.assets.ReactFontManager as ReactFontAssetManager +import android.graphics.fonts.Font +import android.graphics.fonts.FontFamily +import android.os.Build +import android.util.SparseArray +import androidx.annotation.Nullable +import androidx.annotation.RequiresApi +import androidx.core.content.res.ResourcesCompat +import com.facebook.infer.annotation.Nullsafe +import androidx.arch.core.util.Function +import com.facebook.react.common.ReactConstants +import java.io.IOException +import java.util.ArrayList +import java.util.HashMap -/** Responsible for loading and caching Typeface objects. */ -@Deprecated( - message = - "This class is deprecated and will be deleted in the near future. Please use [com.facebook.react.common.assets.ReactFontManager] instead.") -@Suppress("DEPRECATION") -public class ReactFontManager private constructor(private val delegate: ReactFontAssetManager) { +/** + * Responsible for loading and caching Typeface objects. + * + * @deprecated This class is deprecated and it will be deleted in the near future. Please use + * [com.facebook.react.common.assets.ReactFontManager] instead. + */ +@Nullsafe(Nullsafe.Mode.LOCAL) +class ReactFontManager private constructor() { + + companion object { + var createAssetTypefaceOverride: Function? = null + + // NOTE: Indices in `EXTENSIONS` correspond to the `TypeFace` style constants. + private val EXTENSIONS = arrayOf("", "_bold", "_italic", "_bold_italic") + private val FILE_EXTENSIONS = arrayOf(".ttf", ".otf") + private const val FONTS_ASSET_PATH = "fonts/" + + private var sReactFontManagerInstance: ReactFontManager? = null + + @JvmStatic + fun getInstance(): ReactFontManager { + return sReactFontManagerInstance ?: ReactFontManager().also { sReactFontManagerInstance = it } + } + + private fun createAssetTypeface( + fontFamilyName: String, + style: Int, + assetManager: AssetManager + ): Typeface { + createAssetTypefaceOverride?.let { override -> + return override.apply(CreateTypefaceObject(fontFamilyName, style, assetManager)) + } + + // This is the original RN logic for getting the typeface. + val extension = EXTENSIONS[style] + for (fileExtension in FILE_EXTENSIONS) { + val fileName = StringBuilder() + .append(FONTS_ASSET_PATH) + .append(fontFamilyName) + .append(extension) + .append(fileExtension) + .toString() + try { + return Typeface.createFromAsset(assetManager, fileName) + } catch (e: RuntimeException) { + // If the typeface asset does not exist, try another extension. + continue + } + } + return Typeface.create(fontFamilyName, style) + } + + @RequiresApi(Build.VERSION_CODES.Q) + private fun createAssetTypefaceWithFallbacks( + fontFamilyNames: Array, + style: Int, + assetManager: AssetManager + ): Typeface { + val fontFamilies = ArrayList() + + // Iterate over the list of fontFamilyNames, constructing new FontFamily objects + // for use in the CustomFallbackBuilder below. + for (fontFamilyName in fontFamilyNames) { + for (fileExtension in FILE_EXTENSIONS) { + val fileName = StringBuilder() + .append(FONTS_ASSET_PATH) + .append(fontFamilyName) + .append(fileExtension) + .toString() + try { + val font = Font.Builder(assetManager, fileName).build() + val family = FontFamily.Builder(font).build() + fontFamilies.add(family) + } catch (e: RuntimeException) { + // If the typeface asset does not exist, try another extension. + continue + } catch (e: IOException) { + // If the font asset does not exist, try another extension. + continue + } + } + } - public fun getTypeface(fontFamilyName: String, style: Int, assetManager: AssetManager): Typeface = - delegate.getTypeface(fontFamilyName, style, assetManager) + // If there's some problem constructing fonts, fall back to the default behavior. + if (fontFamilies.isEmpty()) { + return createAssetTypeface(fontFamilyNames[0], style, assetManager) + } - public fun getTypeface( + val fallbackBuilder = Typeface.CustomFallbackBuilder(fontFamilies[0]) + for (i in 1 until fontFamilies.size) { + fallbackBuilder.addCustomFallback(fontFamilies[i]) + } + return fallbackBuilder.build() + } + } + + private val mFontCache = HashMap() + private val mCustomTypefaceCache = HashMap() + + fun getTypeface(fontFamilyName: String, style: Int, assetManager: AssetManager): Typeface { + return getTypeface(fontFamilyName, TypefaceStyle(style), assetManager) + } + + fun getTypeface( fontFamilyName: String, weight: Int, italic: Boolean, assetManager: AssetManager - ): Typeface = delegate.getTypeface(fontFamilyName, weight, italic, assetManager) + ): Typeface { + return getTypeface(fontFamilyName, TypefaceStyle(weight, italic), assetManager) + } - public fun getTypeface( + fun getTypeface( fontFamilyName: String, style: Int, weight: Int, assetManager: AssetManager - ): Typeface = delegate.getTypeface(fontFamilyName, style, weight, assetManager) + ): Typeface { + return getTypeface(fontFamilyName, TypefaceStyle(style, weight), assetManager) + } + + fun getTypeface( + fontFamilyName: String, + typefaceStyle: TypefaceStyle, + assetManager: AssetManager + ): Typeface { + mCustomTypefaceCache[fontFamilyName]?.let { customTypeface -> + // Apply `typefaceStyle` because custom fonts configure variants using `app:fontStyle` and + // `app:fontWeight` in their resource XML configuration file. + return typefaceStyle.apply(customTypeface) + } + + var assetFontFamily = mFontCache[fontFamilyName] + if (assetFontFamily == null) { + assetFontFamily = AssetFontFamily() + mFontCache[fontFamilyName] = assetFontFamily + } + + val style = typefaceStyle.getNearestStyle() - public fun addCustomFont(context: Context, fontFamily: String, fontId: Int) { - delegate.addCustomFont(context, fontFamily, fontId) + var assetTypeface = assetFontFamily.getTypefaceForStyle(style) + if (assetTypeface == null) { + assetTypeface = createAssetTypeface(fontFamilyName, style, assetManager) + assetFontFamily.setTypefaceForStyle(style, assetTypeface) + } + // Do not apply `typefaceStyle` because asset font files already incorporate the style. + return assetTypeface } - public fun addCustomFont(fontFamily: String, font: Typeface?) { - delegate.addCustomFont(fontFamily, font) + /* + * This method allows you to load custom fonts from res/font folder as provided font family name. + * Fonts may be one of .ttf, .otf or XML (https://developer.android.com/guide/topics/ui/look-and-feel/fonts-in-xml). + * To support multiple font styles or weights, you must provide a font in XML format. + * + * ReactFontManager.getInstance().addCustomFont(this, "Srisakdi", R.font.srisakdi); + */ + fun addCustomFont(context: Context, fontFamily: String, fontId: Int) { + ResourcesCompat.getFont(context, fontId)?.let { font -> + mCustomTypefaceCache[fontFamily] = font + } } - public fun setTypeface(fontFamilyName: String, style: Int, typeface: Typeface) { - delegate.setTypeface(fontFamilyName, style, typeface) + /** + * Equivalent method to [addCustomFont] which accepts a Typeface object. + */ + fun addCustomFont(fontFamily: String, font: Typeface?) { + font?.let { mCustomTypefaceCache[fontFamily] = it } } - public companion object { - private var instance: ReactFontManager? = null + /** + * Add additional font family, or replace the exist one in the font memory cache. + * + * @param style see [Typeface.DEFAULT], [Typeface.BOLD], [Typeface.ITALIC], [Typeface.BOLD_ITALIC] + */ + fun setTypeface(fontFamilyName: String, style: Int, typeface: Typeface?) { + typeface?.let { font -> + var assetFontFamily = mFontCache[fontFamilyName] + if (assetFontFamily == null) { + assetFontFamily = AssetFontFamily() + mFontCache[fontFamilyName] = assetFontFamily + } + assetFontFamily.setTypefaceForStyle(style, font) + } + } - @JvmStatic - public fun getInstance(): ReactFontManager { - return instance - ?: ReactFontManager(ReactFontAssetManager.getInstance()).also { instance = it } + class TypefaceStyle { + companion object { + const val BOLD = 700 + const val NORMAL = 400 + private const val MIN_WEIGHT = 1 + private const val MAX_WEIGHT = 1000 + } + + private val mItalic: Boolean + private val mWeight: Int + + constructor(weight: Int, italic: Boolean) { + mItalic = italic + mWeight = if (weight == ReactConstants.UNSET) NORMAL else weight + } + + constructor(style: Int) { + var styleValue = if (style == ReactConstants.UNSET) Typeface.NORMAL else style + + mItalic = (styleValue and Typeface.ITALIC) != 0 + mWeight = if ((styleValue and Typeface.BOLD) != 0) BOLD else NORMAL + } + + /** + * If `weight` is supplied, it will be combined with the italic bit from `style`. Otherwise, any + * existing weight bit in `style` will be used. + */ + constructor(style: Int, weight: Int) { + var styleValue = if (style == ReactConstants.UNSET) Typeface.NORMAL else style + + mItalic = (styleValue and Typeface.ITALIC) != 0 + mWeight = when { + weight != ReactConstants.UNSET -> weight + (styleValue and Typeface.BOLD) != 0 -> BOLD + else -> NORMAL + } + } + + fun getNearestStyle(): Int { + return if (mWeight < BOLD) { + if (mItalic) Typeface.ITALIC else Typeface.NORMAL + } else { + if (mItalic) Typeface.BOLD_ITALIC else Typeface.BOLD + } + } + + fun apply(typeface: Typeface): Typeface { + return if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) { + Typeface.create(typeface, getNearestStyle()) + } else { + Typeface.create(typeface, mWeight, mItalic) + } + } + } + + /** Responsible for caching typefaces for each custom font family. */ + private class AssetFontFamily { + private val mTypefaceSparseArray = SparseArray(4) + + fun getTypefaceForStyle(style: Int): Typeface? { + return mTypefaceSparseArray.get(style) + } + + fun setTypefaceForStyle(style: Int, typeface: Typeface) { + mTypefaceSparseArray.put(style, typeface) } } } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/CustomStyleSpan.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/CustomStyleSpan.kt index 81bb303e6a3052..3e5f13e89e7da7 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/CustomStyleSpan.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/CustomStyleSpan.kt @@ -13,7 +13,7 @@ import android.graphics.Typeface import android.text.TextPaint import android.text.style.MetricAffectingSpan import com.facebook.react.common.ReactConstants -import com.facebook.react.common.assets.ReactFontManager +import com.facebook.react.views.text.ReactFontManager import com.facebook.react.views.text.ReactTypefaceUtils /** diff --git a/packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/RNTesterApplication.kt b/packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/RNTesterApplication.kt index 2fe4530c3e2798..e34f58083ac012 100644 --- a/packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/RNTesterApplication.kt +++ b/packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/RNTesterApplication.kt @@ -18,7 +18,6 @@ import com.facebook.react.ReactPackage import com.facebook.react.ViewManagerOnDemandReactPackage import com.facebook.react.bridge.NativeModule import com.facebook.react.bridge.ReactApplicationContext -import com.facebook.react.common.assets.ReactFontManager import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load import com.facebook.react.defaults.DefaultReactHost import com.facebook.react.defaults.DefaultReactNativeHost @@ -32,6 +31,7 @@ import com.facebook.react.uiapp.component.MyLegacyViewManager import com.facebook.react.uiapp.component.MyNativeViewManager import com.facebook.react.uimanager.ReactShadowNode import com.facebook.react.uimanager.ViewManager +import com.facebook.react.views.text.ReactFontManager; import com.facebook.soloader.SoLoader internal class RNTesterApplication : Application(), ReactApplication { From eb0d37e8249c61ab13c2fcd2489de7fc89295a3e Mon Sep 17 00:00:00 2001 From: mrkcsc Date: Sat, 11 Dec 2021 14:20:59 -0800 Subject: [PATCH 073/108] Update RNA ImageView to support forced cached property to fix GIF flicker. Add ability to override mSource of the image source. --- .../react/views/image/ReactImageView.kt | 27 +++++++++++++++---- .../react/views/imagehelper/ImageSource.kt | 11 +++++++- .../views/imagehelper/MultiSourceHelper.kt | 10 +++++-- 3 files changed, 40 insertions(+), 8 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.kt index 0f31e609648e4a..3243031c9ced4a 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.kt @@ -291,15 +291,32 @@ public class ReactImageView( for (idx in 0 until sources.size()) { val source = sources.getMap(idx) ?: continue val cacheControl = computeCacheControl(source.getString("cache")) + val uri = source.getString("uri") + val isForceCached = if (source.hasKey("isForceCached")) { + source.getBoolean("isForceCached") + } else { + false + } + val width = if (source.hasKey("width")) { + source.getDouble("width") + } else { + 0.0 + } + val height = if (source.hasKey("height")) { + source.getDouble("height") + } else { + 0.0 + } var imageSource = ImageSource( context, - source.getString("uri"), - source.getDouble("width"), - source.getDouble("height"), - cacheControl) + uri, + width, + height, + cacheControl, + isForceCached) if (Uri.EMPTY == imageSource.uri) { - warnImageSource(source.getString("uri")) + warnImageSource(uri) imageSource = getTransparentBitmapImageSource(context) } tmpSources.add(imageSource) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ImageSource.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ImageSource.kt index 289dd445bfb006..4d69ff91739df1 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ImageSource.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ImageSource.kt @@ -9,7 +9,11 @@ package com.facebook.react.views.imagehelper import android.content.Context import android.net.Uri +<<<<<<< HEAD import com.facebook.react.modules.fresco.ImageCacheControl +======= +import androidx.arch.core.util.Function +>>>>>>> 946f3eaa576 (Update RNA ImageView to support forced cached property to fix GIF flicker.) import java.util.Objects /** Class describing an image source (network URI or resource) and size. */ @@ -18,10 +22,11 @@ public open class ImageSource constructor( context: Context, /** Get the source of this image, as it was passed to the constructor. */ - public val source: String?, + public var source: String?, width: Double = 0.0, height: Double = 0.0, public val cacheControl: ImageCacheControl = ImageCacheControl.DEFAULT, + public val isForceCached: Boolean = false ) { /** Get the URI for this image - can be either a parsed network URI or a resource URI. */ @@ -55,6 +60,9 @@ constructor( private fun computeUri(context: Context): Uri = try { + sourceOverride?.let { + source = it.apply(source) + } val uri = Uri.parse(source) // Verify scheme is set, so that relative uri (used by static resources) are not handled. if (uri.scheme == null) computeLocalUri(context) else uri @@ -68,6 +76,7 @@ constructor( } public companion object { + public var sourceOverride: Function? = null private const val TRANSPARENT_BITMAP_URI = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=" diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/MultiSourceHelper.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/MultiSourceHelper.kt index c7619aac19b696..cfee94cfa28576 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/MultiSourceHelper.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/MultiSourceHelper.kt @@ -59,8 +59,10 @@ public object MultiSourceHelper { for (source in sources) { val precision = Math.abs(1.0 - source.size / viewArea) if (precision < bestPrecision) { - bestPrecision = precision - best = source + if (!source.isForceCached) { + bestPrecision = precision + best = source + } } if (precision < bestCachePrecision && source.cacheControl != ImageCacheControl.RELOAD && @@ -71,6 +73,10 @@ public object MultiSourceHelper { bestCachePrecision = precision bestCached = source } + if (source.isForceCached) { + bestCachePrecision = 0.0 + bestCached = source + } } if (bestCached != null && best != null && bestCached.source == best.source) { bestCached = null From 2995db38051c8b2f34f0ace66bdc4f98a99ffcee Mon Sep 17 00:00:00 2001 From: Alex Hendrix Date: Fri, 8 Mar 2024 18:40:52 -0600 Subject: [PATCH 074/108] [Discord] SRWebSocket flush method --- packages/react-native/React/CoreModules/RCTWebSocketModule.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native/React/CoreModules/RCTWebSocketModule.mm b/packages/react-native/React/CoreModules/RCTWebSocketModule.mm index 256b50511b4f62..eb44017e2d50b2 100644 --- a/packages/react-native/React/CoreModules/RCTWebSocketModule.mm +++ b/packages/react-native/React/CoreModules/RCTWebSocketModule.mm @@ -54,8 +54,8 @@ - (NSArray *)supportedEvents - (void)flush { - for (RCTSRWebSocket *socket in _sockets.allValues) { - [socket flush]; + for (SRWebSocket *socket in _sockets.allValues) { + [socket close]; } } From c7b9b794ab39821018f816ad181ecca7cbeae538 Mon Sep 17 00:00:00 2001 From: Shidong Lin Date: Fri, 4 Aug 2023 15:56:10 -0700 Subject: [PATCH 075/108] Clamp `last` prop of `VirtualizedList` --- packages/virtualized-lists/Lists/VirtualizedList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/virtualized-lists/Lists/VirtualizedList.js b/packages/virtualized-lists/Lists/VirtualizedList.js index 43632c60cdd1fd..0e89261e2a69e1 100644 --- a/packages/virtualized-lists/Lists/VirtualizedList.js +++ b/packages/virtualized-lists/Lists/VirtualizedList.js @@ -841,7 +841,7 @@ class VirtualizedList extends StateSafePureComponent { return { first: clamp(0, cells.first, maxFirst), - last: Math.min(lastPossibleCellIndex, cells.last), + last: clamp(-1, cells.last, lastPossibleCellIndex), }; } From 0867de9dd0d3296e527226122d6e447b133dc104 Mon Sep 17 00:00:00 2001 From: Patrick Mick Date: Wed, 11 Oct 2023 09:46:06 -0700 Subject: [PATCH 076/108] [Upstreamed] Fix incorrect values for modal sizing (#45) This fixes an issues where the fabric renderer would get the correct sizing via onSizeChanged, write it to the shadow tree generating a state update callback and then setting the wrong size using ModalHostManager. Once onSizeChanged is fired by the OS it is treated as the definitive source of truth for sizing. --- .../react/views/modal/ReactModalHostView.kt | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt index fed597318c36d2..493d359cc6bb1c 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt @@ -479,10 +479,21 @@ public class ReactModalHostView(context: ThemedReactContext) : updateState(viewWidth, viewHeight) } + /** + * Updates the shadow tree via the local fabric view state manager. Can noop if the same values + * are passed multiple times. Can also ignore params if the local variables for viewWidth & + * viewHeight are non-zero. + * + * @param width target width of the container as pixels. Will be converted to DIP. + * @param height target height of the container as pixels. Will be converted to DIP. + */ @UiThread public fun updateState(width: Int, height: Int) { - val realWidth: Float = width.toFloat().pxToDp() - val realHeight: Float = height.toFloat().pxToDp() + // Once viewWidth & viewHeight are set by an onSizeChanged callback they become our source + // of truth. This makes the fabric renderer function like the paper renderer is currently + // functioning. + val realWidth = (if ((viewWidth > 0)) viewWidth else width).toFloat().pxToDp() + val realHeight = (if ((viewHeight > 0)) viewHeight else height).toFloat().pxToDp() stateWrapper?.let { sw -> // new architecture From 0479c5f3671223b3c5c58a1b942c1b1ad56032a6 Mon Sep 17 00:00:00 2001 From: Alex Hendrix Date: Thu, 25 May 2023 14:25:54 -0500 Subject: [PATCH 077/108] [Discord] Always configure React Native NDK regardless of New Arch --- .../facebook/react/utils/NdkConfiguratorUtils.kt | 16 +--------------- .../react/defaults/DefaultReactNativeHost.kt | 7 +------ 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/NdkConfiguratorUtils.kt b/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/NdkConfiguratorUtils.kt index 80248e4657ba39..e81ed851a81af5 100644 --- a/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/NdkConfiguratorUtils.kt +++ b/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/NdkConfiguratorUtils.kt @@ -11,7 +11,6 @@ import com.android.build.api.variant.AndroidComponentsExtension import com.android.build.api.variant.Variant import com.facebook.react.ReactExtension import com.facebook.react.utils.ProjectUtils.getReactNativeArchitectures -import com.facebook.react.utils.ProjectUtils.isNewArchEnabled import java.io.File import org.gradle.api.Project @@ -20,10 +19,6 @@ internal object NdkConfiguratorUtils { fun configureReactNativeNdk(project: Project, extension: ReactExtension) { project.pluginManager.withPlugin("com.android.application") { project.extensions.getByType(AndroidComponentsExtension::class.java).finalizeDsl { ext -> - if (!project.isNewArchEnabled(extension)) { - // For Old Arch, we don't need to setup the NDK - return@finalizeDsl - } // We enable prefab so users can consume .so/headers from ReactAndroid and hermes-engine // .aar ext.buildFeatures.prefab = true @@ -72,20 +67,12 @@ internal object NdkConfiguratorUtils { * sure we specify the correct .pickFirsts for all the .so files we are producing or that we're * aware of as some of our dependencies are pulling them in. */ + @Suppress("UNUSED_PARAMETER") fun configureNewArchPackagingOptions( project: Project, extension: ReactExtension, variant: Variant ) { - if (!project.isNewArchEnabled(extension)) { - // For Old Arch, we set a pickFirst only on libraries that we know are - // clashing with our direct dependencies (mainly FBJNI and Hermes). - variant.packaging.jniLibs.pickFirsts.addAll( - listOf( - "**/libfbjni.so", - "**/libc++_shared.so", - )) - } else { // We set some packagingOptions { pickFirst ... } for our users for libraries we own. variant.packaging.jniLibs.pickFirsts.addAll( listOf( @@ -99,7 +86,6 @@ internal object NdkConfiguratorUtils { // AGP will give priority of libc++_shared coming from App modules. "**/libc++_shared.so", )) - } } /** diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactNativeHost.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactNativeHost.kt index b816bad9ae6b27..f3391c5862fbb6 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactNativeHost.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactNativeHost.kt @@ -35,12 +35,7 @@ protected constructor( ) : ReactNativeHost(application) { override fun getReactPackageTurboModuleManagerDelegateBuilder(): - ReactPackageTurboModuleManagerDelegate.Builder? = - if (isNewArchEnabled) { - DefaultTurboModuleManagerDelegate.Builder() - } else { - null - } + ReactPackageTurboModuleManagerDelegate.Builder? = DefaultTurboModuleManagerDelegate.Builder() override fun getUIManagerProvider(): UIManagerProvider? = if (isNewArchEnabled) { From 2d1b548b1b6867315650aa64877eedf643a67703 Mon Sep 17 00:00:00 2001 From: Yuliy Pisetsky Date: Tue, 31 Oct 2023 12:05:14 -0700 Subject: [PATCH 078/108] Include `raw_length` in Websocket event --- packages/react-native/Libraries/WebSocket/WebSocket.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-native/Libraries/WebSocket/WebSocket.js b/packages/react-native/Libraries/WebSocket/WebSocket.js index 08d737493c3e23..92b0b61712df31 100644 --- a/packages/react-native/Libraries/WebSocket/WebSocket.js +++ b/packages/react-native/Libraries/WebSocket/WebSocket.js @@ -245,7 +245,8 @@ class WebSocket extends (EventTarget(...WEBSOCKET_EVENTS): typeof EventTarget) { data = BlobManager.createFromOptions(ev.data); break; } - this.dispatchEvent(new WebSocketEvent('message', {data})); + const raw_length = ev.raw_length; + this.dispatchEvent(new WebSocketEvent('message', {data, raw_length})); }), this._eventEmitter.addListener('websocketOpen', ev => { if (ev.id !== this._socketId) { From 7adbb7398fe48ebb320305b3ae5d3af9af23b92f Mon Sep 17 00:00:00 2001 From: Steven Petryk Date: Tue, 28 Nov 2023 14:22:47 -0800 Subject: [PATCH 079/108] Avoid using Xcode 15's gcc to compile glog --- .../react-native/scripts/ios-configure-glog.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/react-native/scripts/ios-configure-glog.sh b/packages/react-native/scripts/ios-configure-glog.sh index 6b2c9026843938..0450aafa684170 100755 --- a/packages/react-native/scripts/ios-configure-glog.sh +++ b/packages/react-native/scripts/ios-configure-glog.sh @@ -42,15 +42,15 @@ EOF patch -p1 config.sub fix_glog_0.3.5_apple_silicon.patch fi -XCRUN="$(which xcrun || true)" -if [ -n "$XCRUN" ]; then - export CC="$(xcrun -find -sdk $PLATFORM_NAME cc) -arch $CURRENT_ARCH -isysroot $(xcrun -sdk $PLATFORM_NAME --show-sdk-path)" - export CXX="$CC" -else - export CC="$CC:-$(which gcc)" - export CXX="$CXX:-$(which g++ || true)" -fi -export CXX="$CXX:-$CC" +# XCRUN="$(which xcrun || true)" +# if [ -n "$XCRUN" ]; then +# export CC="$(xcrun -find -sdk $PLATFORM_NAME cc) -arch $CURRENT_ARCH -isysroot $(xcrun -sdk $PLATFORM_NAME --show-sdk-path)" +# export CXX="$CC" +# else +# export CC="$CC:-$(which gcc)" +# export CXX="$CXX:-$(which g++ || true)" +# fi +# export CXX="$CXX:-$CC" # Remove automake symlink if it exists if [ -h "test-driver" ]; then From fb11161081185aa1656b1077c17b25f1f68c5784 Mon Sep 17 00:00:00 2001 From: Colin Edwards Date: Thu, 15 Feb 2024 16:32:47 -0600 Subject: [PATCH 080/108] [Discord] Add Websocket Module setCustomClientBuilder https://github.com/facebook/react-native/commit/0cdb9e6a52f69ebee635d5bfaa34a52f6059dd47 --- .../com/facebook/react/modules/network/NetworkingModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.java index 5b24caff523e15..d9ef5d90de1982 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.java @@ -177,7 +177,7 @@ public static void setCustomClientBuilder( * https://github.com/facebook/react-native/pull/37798#pullrequestreview-1518338914 */ @Deprecated - public interface CustomClientBuilder + public static interface CustomClientBuilder extends com.facebook.react.modules.network.CustomClientBuilder {} private static void applyCustomBuilder(OkHttpClient.Builder builder) { From 3e2977d62864ae865d6f234a0ca78be89d5a01b9 Mon Sep 17 00:00:00 2001 From: Alex Hendrix Date: Thu, 22 Feb 2024 10:42:06 -0600 Subject: [PATCH 081/108] Additional null check for focusing/blurring views --- .../com/facebook/react/ReactAndroidHWInputDeviceHelper.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactAndroidHWInputDeviceHelper.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactAndroidHWInputDeviceHelper.java index c34e63d8489e91..433af185d317b2 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactAndroidHWInputDeviceHelper.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactAndroidHWInputDeviceHelper.java @@ -64,6 +64,10 @@ public void handleKeyEvent(KeyEvent ev) { /** Called from {@link ReactRootView} when focused view changes. */ public void onFocusChanged(View newFocusedView) { + if (newFocusedView == null) { + return; + } + if (mLastFocusedViewId == newFocusedView.getId()) { return; } From a22ddd62a6529b685e752ba114f17be87afe420e Mon Sep 17 00:00:00 2001 From: Alex Hendrix Date: Wed, 10 Apr 2024 09:01:34 -0500 Subject: [PATCH 082/108] [Discord] Moving registry of RCTEventEmitter to constructor --- .../java/com/facebook/react/uimanager/UIManagerModule.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java index 7a3cfc55ae68ec..8481e0cea4e15f 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java @@ -148,6 +148,8 @@ public UIManagerModule( minTimeLeftInFrameForNonBatchedOperationMs); reactContext.addLifecycleEventListener(this); + mEventDispatcher.registerEventEmitter( + DEFAULT, getReactApplicationContext().getJSModule(RCTEventEmitter.class)); } /** @@ -175,8 +177,6 @@ public Map getConstants() { public void initialize() { getReactApplicationContext().registerComponentCallbacks(mMemoryTrimCallback); getReactApplicationContext().registerComponentCallbacks(mViewManagerRegistry); - mEventDispatcher.registerEventEmitter( - DEFAULT, getReactApplicationContext().getJSModule(RCTEventEmitter.class)); } @Override From 3577afd528d2eda7a9eb57590a1e13ab23314250 Mon Sep 17 00:00:00 2001 From: Alex Hendrix Date: Fri, 19 Apr 2024 15:46:34 -0500 Subject: [PATCH 083/108] Adding ClassCastException to possible Exceptions that unwind additional module call information --- .../main/java/com/facebook/react/bridge/JavaMethodWrapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/JavaMethodWrapper.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/JavaMethodWrapper.java index daa3eaca785272..d312648f9f4527 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/JavaMethodWrapper.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/JavaMethodWrapper.java @@ -356,7 +356,7 @@ public void invoke(JSInstance jsInstance, ReadableArray parameters) { mArgumentExtractors[i].extractArgument(jsInstance, parameters, jsArgumentsConsumed); jsArgumentsConsumed += mArgumentExtractors[i].getJSArgumentsNeeded(); } - } catch (UnexpectedNativeTypeException | NullPointerException e) { + } catch (UnexpectedNativeTypeException | NullPointerException | ClassCastException e) { throw new NativeArgumentsParseException( e.getMessage() + " (constructing arguments for " From 76f12f89230aff775f2343a1e79b6d7ec1d1046d Mon Sep 17 00:00:00 2001 From: Alex Hendrix Date: Wed, 12 Jun 2024 16:49:39 -0500 Subject: [PATCH 084/108] [Discord] Addressing Gradle plugin versioning issues caused by Version Catalog --- build.gradle.kts | 2 +- packages/react-native/ReactAndroid/build.gradle.kts | 6 +++--- .../ReactAndroid/hermes-engine/build.gradle.kts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index d848efee0ab69c..567cbcfa592b3d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,7 +7,7 @@ plugins { alias(libs.plugins.nexus.publish) - alias(libs.plugins.android.library) apply false + id(libs.plugins.android.library.get().pluginId) version libs.plugins.android.library.get().version.requiredVersion apply false alias(libs.plugins.android.application) apply false alias(libs.plugins.download) apply false alias(libs.plugins.kotlin.android) apply false diff --git a/packages/react-native/ReactAndroid/build.gradle.kts b/packages/react-native/ReactAndroid/build.gradle.kts index 2f31180ade13f1..b96273ad042c1d 100644 --- a/packages/react-native/ReactAndroid/build.gradle.kts +++ b/packages/react-native/ReactAndroid/build.gradle.kts @@ -16,9 +16,9 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { id("maven-publish") id("com.facebook.react") - alias(libs.plugins.android.library) - alias(libs.plugins.download) - alias(libs.plugins.kotlin.android) + id(libs.plugins.android.library.get().pluginId) + id(libs.plugins.download.get().pluginId) + id(libs.plugins.kotlin.android.get().pluginId) } version = project.findProperty("VERSION_NAME")?.toString()!! diff --git a/packages/react-native/ReactAndroid/hermes-engine/build.gradle.kts b/packages/react-native/ReactAndroid/hermes-engine/build.gradle.kts index d8b0d5f382f564..449f3aa939ad22 100644 --- a/packages/react-native/ReactAndroid/hermes-engine/build.gradle.kts +++ b/packages/react-native/ReactAndroid/hermes-engine/build.gradle.kts @@ -12,8 +12,8 @@ import org.apache.tools.ant.taskdefs.condition.Os plugins { id("maven-publish") id("signing") - alias(libs.plugins.android.library) - alias(libs.plugins.download) + id(libs.plugins.android.library.get().pluginId) + id(libs.plugins.download.get().pluginId) } group = "com.facebook.react" From cf35472b91c916bb75922d4b2f846ea1bdca838b Mon Sep 17 00:00:00 2001 From: Alex Hendrix Date: Wed, 17 Jul 2024 11:06:50 -0500 Subject: [PATCH 085/108] [Discord] NDK Publishing additions --- .../ReactAndroid/build.gradle.kts | 61 ++++++++++++++++++- .../react-native/ReactAndroid/publish.gradle | 4 ++ 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/packages/react-native/ReactAndroid/build.gradle.kts b/packages/react-native/ReactAndroid/build.gradle.kts index b96273ad042c1d..e132a49c05c274 100644 --- a/packages/react-native/ReactAndroid/build.gradle.kts +++ b/packages/react-native/ReactAndroid/build.gradle.kts @@ -467,6 +467,55 @@ val packageReactNdkLibsForBuck by into("src/main/jni/prebuilt/lib") } +// Derivative of the packageReactNdkDebugLibsForBuck task, appends "debug" to the "into" dir +val packageReactNdkDebugLibsForDiscord by + tasks.registering(Copy::class) { + dependsOn("mergeDebugNativeLibs") + // Shared libraries (.so) are copied from the merged_native_libs folder instead + from("$buildDir/intermediates/merged_native_libs/debug/out/lib/") + exclude("**/libjsc.so") + exclude("**/libhermes.so") + into("src/main/jni/prebuilt/lib/debug") + } + +// Derivative of the packageReactNdkReleaseLibsForBuck task, appends "release" to the "into" dir +val packageReactNdkReleaseLibsForDiscord by + tasks.registering(Copy::class) { + dependsOn("mergeReleaseNativeLibs") + // Shared libraries (.so) are copied from the merged_native_libs folder instead + from("$buildDir/intermediates/merged_native_libs/release/out/lib/") + exclude("**/libjsc.so") + exclude("**/libhermes.so") + into("src/main/jni/prebuilt/lib/release") + } + +val createReactNdkLibraryZipArchiveForDiscord by + tasks.registering(Zip::class) { + // This dependsOn tasks gets all our *.so files into the src/main/jni/prebuilt/lib directory + dependsOn("packageReactNdkDebugLibsForDiscord") + dependsOn("packageReactNdkReleaseLibsForDiscord") + + // A searchable self-documenting name for the build process, but its final packaged name will end up being react-native-{version}.zip + archiveFileName.set("ReactNativeLibrariesForDiscord.zip") + from(layout.projectDirectory.dir("src/main/jni/prebuilt")) { + // Get all *.so files in the prebuilt directory + include("**/*.so") + val fileCopyAction = object: Action { + override fun execute(fcd: FileCopyDetails) { + // Trim down each file's directory to just include the "lib/{debug/release}/{architecture}" part + val relativeFileName = RelativePath(true, *fcd.relativePath.segments.takeLast(4).toTypedArray()) + fcd.relativePath = relativeFileName + } + } + eachFile(fileCopyAction) + // Removes empty dirs resulting from the eachFile directory remapping above + includeEmptyDirs = false + } + + // Place this .zip right into our ReactAndroid directory + destinationDirectory.set(layout.projectDirectory) + } + repositories { // Normally RNGP will set repositories for all modules, // but when consumed from source, we need to re-declare @@ -709,5 +758,15 @@ apply(from = "./publish.gradle") // Please note that the original coordinates, `react-native`, have been voided // as they caused https://github.com/facebook/react-native/issues/35210 publishing { - publications { getByName("release", MavenPublication::class) { artifactId = "react-android" } } + publications { + getByName("release", MavenPublication::class) { + artifactId = "react-android" + } + create("libZip") { + groupId = "com.facebook.react" + version = "test" + artifactId = "discord-rn-libs" + artifact(tasks.named("createReactNdkLibraryZipArchiveForDiscord").get()) + } + } } diff --git a/packages/react-native/ReactAndroid/publish.gradle b/packages/react-native/ReactAndroid/publish.gradle index 32287a7c81392c..2e44520d6620cb 100644 --- a/packages/react-native/ReactAndroid/publish.gradle +++ b/packages/react-native/ReactAndroid/publish.gradle @@ -68,6 +68,10 @@ publishing { name = "mavenTempLocal" url = mavenTempLocalUrl } + maven { + name = "discord" + url = uri("gcs://discord-maven") + } } if (signingKey && signingPwd) { From 49ad178406661f0bc252bc3dd4a7a99befebb07d Mon Sep 17 00:00:00 2001 From: Alex Hendrix Date: Mon, 22 Jul 2024 10:45:36 -0500 Subject: [PATCH 086/108] [Discord] Adding ICU_FOUND=1 to hermes build --- .../react-native/ReactAndroid/hermes-engine/build.gradle.kts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native/ReactAndroid/hermes-engine/build.gradle.kts b/packages/react-native/ReactAndroid/hermes-engine/build.gradle.kts index 449f3aa939ad22..ec4d4c5439164a 100644 --- a/packages/react-native/ReactAndroid/hermes-engine/build.gradle.kts +++ b/packages/react-native/ReactAndroid/hermes-engine/build.gradle.kts @@ -147,6 +147,7 @@ val configureBuildForHermes by "-B", hermesBuildDir.toString(), "-DJSI_DIR=" + jsiDir.absolutePath, + "-DICU_FOUND=1", )) standardOutput = FileOutputStream("$buildDir/configure-hermesc.log") } From ccf1612e4161da5171ed36cad9cff3a737a05ddd Mon Sep 17 00:00:00 2001 From: Steven Petryk Date: Mon, 29 Jul 2024 14:40:09 -0700 Subject: [PATCH 087/108] Ensure third-party-podspecs depend on react_native_pods.rb These podspecs all depend on a function defined in another Ruby file (which is kind of scary, but prooobably okay). However, they do not `require` that file, and instead (previously) were just relying on the fact that CocoaPods loads all the podspecs declared in your Podfile. This is fine for `pod install`, but doesn't apply to commands like `pod ipc spec` (which is used to convert an individual Podspec file to JSON). With that command, the PodSpecs were not evaluating successfully, as they didn't have access to this function. So we add the proper requires here and call it a day. --- .../react-native/third-party-podspecs/DoubleConversion.podspec | 2 ++ packages/react-native/third-party-podspecs/RCT-Folly.podspec | 2 ++ packages/react-native/third-party-podspecs/boost.podspec | 2 ++ packages/react-native/third-party-podspecs/fmt.podspec | 2 ++ packages/react-native/third-party-podspecs/glog.podspec | 2 ++ 5 files changed, 10 insertions(+) diff --git a/packages/react-native/third-party-podspecs/DoubleConversion.podspec b/packages/react-native/third-party-podspecs/DoubleConversion.podspec index 56923bcab13a3e..9c89ac48e77ea1 100644 --- a/packages/react-native/third-party-podspecs/DoubleConversion.podspec +++ b/packages/react-native/third-party-podspecs/DoubleConversion.podspec @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +require_relative "../scripts/react_native_pods" + double_conversion_config = get_double_conversion_config() double_conversion_git_url = double_conversion_config[:git] diff --git a/packages/react-native/third-party-podspecs/RCT-Folly.podspec b/packages/react-native/third-party-podspecs/RCT-Folly.podspec index b3c60a50a9e3fd..ea2a44b708af95 100644 --- a/packages/react-native/third-party-podspecs/RCT-Folly.podspec +++ b/packages/react-native/third-party-podspecs/RCT-Folly.podspec @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +require_relative "../scripts/react_native_pods" + folly_config = get_folly_config() folly_compiler_flags = folly_config[:compiler_flags] folly_release_version = folly_config[:version] diff --git a/packages/react-native/third-party-podspecs/boost.podspec b/packages/react-native/third-party-podspecs/boost.podspec index 0c7a0c0650b819..5c29c4c7e5f860 100644 --- a/packages/react-native/third-party-podspecs/boost.podspec +++ b/packages/react-native/third-party-podspecs/boost.podspec @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +require_relative "../scripts/react_native_pods" + boost_config = get_boost_config() boost_git_url = boost_config[:git] diff --git a/packages/react-native/third-party-podspecs/fmt.podspec b/packages/react-native/third-party-podspecs/fmt.podspec index 2f38990e226c13..0c92fb26257628 100644 --- a/packages/react-native/third-party-podspecs/fmt.podspec +++ b/packages/react-native/third-party-podspecs/fmt.podspec @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +require_relative "../scripts/react_native_pods" + fmt_config = get_fmt_config() fmt_git_url = fmt_config[:git] diff --git a/packages/react-native/third-party-podspecs/glog.podspec b/packages/react-native/third-party-podspecs/glog.podspec index af7668077f9045..c03f6038d0fc0f 100644 --- a/packages/react-native/third-party-podspecs/glog.podspec +++ b/packages/react-native/third-party-podspecs/glog.podspec @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +require_relative "../scripts/react_native_pods" + glog_config = get_glog_config() glog_git_url = glog_config[:git] From 1403b04d1645955da46f5e14e98bfd51bdffd862 Mon Sep 17 00:00:00 2001 From: Miguel Gaeta Date: Tue, 10 Sep 2024 17:20:05 -0700 Subject: [PATCH 088/108] [IOS] Fix a bug in reported device window/screen size for iPad and possibly iPhone. --- .../React/CoreModules/RCTDeviceInfo.mm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/packages/react-native/React/CoreModules/RCTDeviceInfo.mm b/packages/react-native/React/CoreModules/RCTDeviceInfo.mm index 95395e190cfa8d..91db28b374c8e5 100644 --- a/packages/react-native/React/CoreModules/RCTDeviceInfo.mm +++ b/packages/react-native/React/CoreModules/RCTDeviceInfo.mm @@ -78,7 +78,7 @@ - (void)initialize _currentInterfaceOrientation = RCTKeyWindow().windowScene.interfaceOrientation; [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(interfaceFrameDidChange) + selector:@selector(interfaceFrameDidChangeAsync) name:UIDeviceOrientationDidChangeNotification object:nil]; #endif @@ -260,6 +260,23 @@ - (void)interfaceFrameDidChange RCTExecuteOnMainQueue(^{ [weakSelf _interfaceFrameDidChange]; }); + +} + +// Because this RCTDeviceInfo uses dispatch_get_main_queue, RCTExecuteOnMainQueue +// as specified in the interfaceFrameDidChange method will run without delay. +// +// The call to get window measurements may not be accurate as the window +// may not have updated yet. To ensure we get the correct window measurements +// use `dispatch_async` to delay a tick and wait for the window to update. +// +// This bug was observed and reproduced on an iPad but may exist for iPhone as well. +- (void)interfaceFrameDidChangeAsync +{ + __weak __typeof(self) weakSelf = self; + dispatch_async(dispatch_get_main_queue(), ^{ + [weakSelf _interfaceFrameDidChange]; + }); } - (void)_interfaceFrameDidChange From 23cf8eceb8e76ab6260b70fcf6f7c6b42f5edc3a Mon Sep 17 00:00:00 2001 From: Alex Hendrix Date: Wed, 4 Dec 2024 11:29:28 -0600 Subject: [PATCH 089/108] [Discord] kv-storage prebuilt prefab config --- .../react/tasks/internal/PrepareBoostTask.kt | 2 ++ .../tasks/internal/PreparePrefabHeadersTask.kt | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PrepareBoostTask.kt b/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PrepareBoostTask.kt index e3da9e4aa448b3..3abec5c2435a41 100644 --- a/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PrepareBoostTask.kt +++ b/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PrepareBoostTask.kt @@ -33,7 +33,9 @@ abstract class PrepareBoostTask : DefaultTask() { it.from(project.file("src/main/jni/third-party/boost")) it.include( "CMakeLists.txt", + "boost_${boostVersion.get()}/boost/**/*.h", "boost_${boostVersion.get()}/boost/**/*.hpp", + "boost/boost/**/*.h", "boost/boost/**/*.hpp", "asm/**/*.S") it.includeEmptyDirs = false diff --git a/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PreparePrefabHeadersTask.kt b/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PreparePrefabHeadersTask.kt index f30392dd3ebc1c..08b3562bcad549 100644 --- a/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PreparePrefabHeadersTask.kt +++ b/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PreparePrefabHeadersTask.kt @@ -70,6 +70,19 @@ abstract class PreparePrefabHeadersTask : DefaultTask() { it.include("boost/cstdint.hpp") it.include("boost/utility.hpp") it.include("boost/version.hpp") + // Extra files for kv-storage + it.include("boost/*.hpp") + it.include("boost/align/**/*.hpp") + it.include("boost/container/**/*.hpp") + it.include("boost/intrusive/**/*.hpp") + it.include("boost/iterator/**/*.hpp") + it.include("boost/lockfree/**/*.hpp") + it.include("boost/move/**/*.hpp") + it.include("boost/mp11/**/*.hpp") + it.include("boost/mpl/**/*.hpp") + it.include("boost/parameter/**/*.hpp") + it.include("boost/type_traits/**/*.hpp") + it.include("boost/utility/**/*.hpp") it.into(File(outputFolder.asFile, headerPrefix)) } } From 4d0542acdc14c126b636c5811ba9416d26cc25ec Mon Sep 17 00:00:00 2001 From: Joe Mun Date: Thu, 5 Dec 2024 13:16:40 -0800 Subject: [PATCH 090/108] Patch Flow syntax failures --- .../Libraries/Animated/createAnimatedComponent.js | 7 +------ .../react-native/Libraries/vendor/emitter/EventEmitter.js | 2 +- .../src/private/animated/NativeAnimatedHelper.js | 6 +++--- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/packages/react-native/Libraries/Animated/createAnimatedComponent.js b/packages/react-native/Libraries/Animated/createAnimatedComponent.js index cef22cd810fd45..bc240c4eff9e28 100644 --- a/packages/react-native/Libraries/Animated/createAnimatedComponent.js +++ b/packages/react-native/Libraries/Animated/createAnimatedComponent.js @@ -19,12 +19,7 @@ import {useMemo} from 'react'; export type AnimatedProps = { // eslint-disable-next-line no-unused-vars - +[_K in keyof (Props & - $ReadOnly<{ - passthroughAnimatedPropExplicitValues?: React.ElementConfig< - typeof View, - >, - }>)]: any, + +[_K]: any, }; // We could use a mapped type here to introduce acceptable Animated variants diff --git a/packages/react-native/Libraries/vendor/emitter/EventEmitter.js b/packages/react-native/Libraries/vendor/emitter/EventEmitter.js index 1087654ea57827..5beed1d4de3c3a 100644 --- a/packages/react-native/Libraries/vendor/emitter/EventEmitter.js +++ b/packages/react-native/Libraries/vendor/emitter/EventEmitter.js @@ -36,7 +36,7 @@ interface Registration { } type Registry = { - [K in keyof TEventToArgsMap]: Set>, + [K]: Set>, }; /** diff --git a/packages/react-native/src/private/animated/NativeAnimatedHelper.js b/packages/react-native/src/private/animated/NativeAnimatedHelper.js index 9ef311408a894c..b1acf6d995f4df 100644 --- a/packages/react-native/src/private/animated/NativeAnimatedHelper.js +++ b/packages/react-native/src/private/animated/NativeAnimatedHelper.js @@ -135,7 +135,7 @@ const API = { } : (tag, saveValueCallback) => { NativeOperations.getValue(tag, saveValueCallback); - }) as $NonMaybeType['getValue'], + }), setWaitingForIdentifier(id: string): void { waitingForQueuedOperations.add(id); @@ -218,7 +218,7 @@ const API = { if (Platform.OS === 'android') { NativeAnimatedModule?.finishOperationBatch?.(); } - }) as () => void, + }), createAnimatedNode(tag: number, config: AnimatedNodeConfig): void { NativeOperations.createAnimatedNode(tag, config); @@ -260,7 +260,7 @@ const API = { config, endCallback, ); - }) as $NonMaybeType['startAnimatingNode'], + }), stopAnimation(animationId: number) { NativeOperations.stopAnimation(animationId); From 277f1e365f3bb2b7d19094b17a20682cd26d1ef3 Mon Sep 17 00:00:00 2001 From: Alex Hendrix Date: Fri, 3 Jan 2025 18:52:54 -0600 Subject: [PATCH 091/108] [Discord] ForwardingConsoleMethods.def -> ForwardingConsoleMethods.h because of bazel --- ...orwardingConsoleMethods.def => ForwardingConsoleMethods.h} | 0 .../ReactCommon/jsinspector-modern/RuntimeTargetConsole.cpp | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename packages/react-native/ReactCommon/jsinspector-modern/{ForwardingConsoleMethods.def => ForwardingConsoleMethods.h} (100%) diff --git a/packages/react-native/ReactCommon/jsinspector-modern/ForwardingConsoleMethods.def b/packages/react-native/ReactCommon/jsinspector-modern/ForwardingConsoleMethods.h similarity index 100% rename from packages/react-native/ReactCommon/jsinspector-modern/ForwardingConsoleMethods.def rename to packages/react-native/ReactCommon/jsinspector-modern/ForwardingConsoleMethods.h diff --git a/packages/react-native/ReactCommon/jsinspector-modern/RuntimeTargetConsole.cpp b/packages/react-native/ReactCommon/jsinspector-modern/RuntimeTargetConsole.cpp index a129d662339adc..52bb80602fbe1c 100644 --- a/packages/react-native/ReactCommon/jsinspector-modern/RuntimeTargetConsole.cpp +++ b/packages/react-native/ReactCommon/jsinspector-modern/RuntimeTargetConsole.cpp @@ -321,7 +321,7 @@ void consoleAssert( runtime, \ {timestampMs, type, std::move(argsVec), std::move(stackTrace)}); \ } -#include "ForwardingConsoleMethods.def" +#include "ForwardingConsoleMethods.h" #undef FORWARDING_CONSOLE_METHOD } // namespace @@ -469,7 +469,7 @@ void RuntimeTarget::installConsoleHandler() { // Install forwarding console methods. #define FORWARDING_CONSOLE_METHOD(name, type) \ installConsoleMethod(#name, console_##name); -#include "ForwardingConsoleMethods.def" +#include "ForwardingConsoleMethods.h" #undef FORWARDING_CONSOLE_METHOD runtime.global().setProperty(runtime, "console", console); From b83bb38d44afaf8d1f42f39ded246d1593271308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Sun, 2 Mar 2025 19:33:24 +0100 Subject: [PATCH 092/108] fix: work with comma separated fonts New arch version of: https://github.com/discord/react-native/commit/107d9a8ee20b23cc309eafe4091a1c9ee39e0cea --- .../textlayoutmanager/RCTFontUtils.mm | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm index b48a427fceab2c..86409360da8ac3 100644 --- a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm +++ b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm @@ -192,8 +192,23 @@ static UIFontDescriptorSystemDesign RCTGetFontDescriptorSystemDesign(NSString *f fontNames = [UIFont fontNamesForFamilyName:font.familyName]; fontWeight = fontWeight ?: RCTGetFontWeight(font); } else { - // Failback to system font. - font = [UIFont systemFontOfSize:effectiveFontSize weight:fontProperties.weight]; + // Check if font string is a list of fonts comma separated + NSArray *rawFontFamilies = [fontProperties.family componentsSeparatedByString:@","]; + if (rawFontFamilies.count >= 1) { + NSArray *updatedFontNames = fontNames; + + for (NSString *name in rawFontFamilies) { + UIFont *font = [UIFont fontWithName:name size:effectiveFontSize]; + if (font) { + updatedFontNames = [updatedFontNames arrayByAddingObject:font.fontName]; + } + } + + fontNames = updatedFontNames; + } else { + // Failback to system font. + font = [UIFont systemFontOfSize:effectiveFontSize weight:fontProperties.weight]; + } } } From c3add7b721d8f5518495edefa84c61e9eeef8bb1 Mon Sep 17 00:00:00 2001 From: Alex Hendrix Date: Mon, 10 Mar 2025 11:41:39 -0500 Subject: [PATCH 093/108] Misc. Syntax Errors, Squash Later --- .../hermes-engine/build.gradle.kts | 5 +++ .../react/views/text/ReactFontManager.kt | 44 +++++++++---------- .../react/views/text/ReactTypefaceUtils.kt | 1 - .../react/views/view/ReactDrawableHelper.kt | 8 +++- 4 files changed, 33 insertions(+), 25 deletions(-) diff --git a/packages/react-native/ReactAndroid/hermes-engine/build.gradle.kts b/packages/react-native/ReactAndroid/hermes-engine/build.gradle.kts index ec4d4c5439164a..0bbaa06b11ec3e 100644 --- a/packages/react-native/ReactAndroid/hermes-engine/build.gradle.kts +++ b/packages/react-native/ReactAndroid/hermes-engine/build.gradle.kts @@ -222,6 +222,11 @@ android { ndkVersion = libs.versions.ndkVersion.get() } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + defaultConfig { minSdk = libs.versions.minSdk.get().toInt() diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactFontManager.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactFontManager.kt index d44bc0de4410e5..c67a11a617b97b 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactFontManager.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactFontManager.kt @@ -31,10 +31,10 @@ import java.util.HashMap * [com.facebook.react.common.assets.ReactFontManager] instead. */ @Nullsafe(Nullsafe.Mode.LOCAL) -class ReactFontManager private constructor() { +public class ReactFontManager private constructor() { - companion object { - var createAssetTypefaceOverride: Function? = null + public companion object { + public var createAssetTypefaceOverride: Function? = null // NOTE: Indices in `EXTENSIONS` correspond to the `TypeFace` style constants. private val EXTENSIONS = arrayOf("", "_bold", "_italic", "_bold_italic") @@ -44,7 +44,7 @@ class ReactFontManager private constructor() { private var sReactFontManagerInstance: ReactFontManager? = null @JvmStatic - fun getInstance(): ReactFontManager { + public fun getInstance(): ReactFontManager { return sReactFontManagerInstance ?: ReactFontManager().also { sReactFontManagerInstance = it } } @@ -123,11 +123,11 @@ class ReactFontManager private constructor() { private val mFontCache = HashMap() private val mCustomTypefaceCache = HashMap() - fun getTypeface(fontFamilyName: String, style: Int, assetManager: AssetManager): Typeface { + public fun getTypeface(fontFamilyName: String, style: Int, assetManager: AssetManager): Typeface { return getTypeface(fontFamilyName, TypefaceStyle(style), assetManager) } - fun getTypeface( + public fun getTypeface( fontFamilyName: String, weight: Int, italic: Boolean, @@ -136,7 +136,7 @@ class ReactFontManager private constructor() { return getTypeface(fontFamilyName, TypefaceStyle(weight, italic), assetManager) } - fun getTypeface( + public fun getTypeface( fontFamilyName: String, style: Int, weight: Int, @@ -145,7 +145,7 @@ class ReactFontManager private constructor() { return getTypeface(fontFamilyName, TypefaceStyle(style, weight), assetManager) } - fun getTypeface( + public fun getTypeface( fontFamilyName: String, typefaceStyle: TypefaceStyle, assetManager: AssetManager @@ -180,7 +180,7 @@ class ReactFontManager private constructor() { * * ReactFontManager.getInstance().addCustomFont(this, "Srisakdi", R.font.srisakdi); */ - fun addCustomFont(context: Context, fontFamily: String, fontId: Int) { + public fun addCustomFont(context: Context, fontFamily: String, fontId: Int) { ResourcesCompat.getFont(context, fontId)?.let { font -> mCustomTypefaceCache[fontFamily] = font } @@ -189,7 +189,7 @@ class ReactFontManager private constructor() { /** * Equivalent method to [addCustomFont] which accepts a Typeface object. */ - fun addCustomFont(fontFamily: String, font: Typeface?) { + public fun addCustomFont(fontFamily: String, font: Typeface?) { font?.let { mCustomTypefaceCache[fontFamily] = it } } @@ -198,7 +198,7 @@ class ReactFontManager private constructor() { * * @param style see [Typeface.DEFAULT], [Typeface.BOLD], [Typeface.ITALIC], [Typeface.BOLD_ITALIC] */ - fun setTypeface(fontFamilyName: String, style: Int, typeface: Typeface?) { + public fun setTypeface(fontFamilyName: String, style: Int, typeface: Typeface?) { typeface?.let { font -> var assetFontFamily = mFontCache[fontFamilyName] if (assetFontFamily == null) { @@ -209,23 +209,23 @@ class ReactFontManager private constructor() { } } - class TypefaceStyle { - companion object { - const val BOLD = 700 - const val NORMAL = 400 - private const val MIN_WEIGHT = 1 - private const val MAX_WEIGHT = 1000 + public class TypefaceStyle { + public companion object { + public const val BOLD: Int = 700 + public const val NORMAL: Int = 400 + private const val MIN_WEIGHT: Int = 1 + private const val MAX_WEIGHT: Int = 1000 } private val mItalic: Boolean private val mWeight: Int - constructor(weight: Int, italic: Boolean) { + public constructor(weight: Int, italic: Boolean) { mItalic = italic mWeight = if (weight == ReactConstants.UNSET) NORMAL else weight } - constructor(style: Int) { + public constructor(style: Int) { var styleValue = if (style == ReactConstants.UNSET) Typeface.NORMAL else style mItalic = (styleValue and Typeface.ITALIC) != 0 @@ -236,7 +236,7 @@ class ReactFontManager private constructor() { * If `weight` is supplied, it will be combined with the italic bit from `style`. Otherwise, any * existing weight bit in `style` will be used. */ - constructor(style: Int, weight: Int) { + public constructor(style: Int, weight: Int) { var styleValue = if (style == ReactConstants.UNSET) Typeface.NORMAL else style mItalic = (styleValue and Typeface.ITALIC) != 0 @@ -247,7 +247,7 @@ class ReactFontManager private constructor() { } } - fun getNearestStyle(): Int { + public fun getNearestStyle(): Int { return if (mWeight < BOLD) { if (mItalic) Typeface.ITALIC else Typeface.NORMAL } else { @@ -255,7 +255,7 @@ class ReactFontManager private constructor() { } } - fun apply(typeface: Typeface): Typeface { + public fun apply(typeface: Typeface): Typeface { return if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) { Typeface.create(typeface, getNearestStyle()) } else { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTypefaceUtils.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTypefaceUtils.kt index 517466055c7217..db5feca6671511 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTypefaceUtils.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTypefaceUtils.kt @@ -12,7 +12,6 @@ import android.graphics.Typeface import android.text.TextUtils import com.facebook.react.bridge.ReadableArray import com.facebook.react.common.ReactConstants -import com.facebook.react.common.assets.ReactFontManager public object ReactTypefaceUtils { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactDrawableHelper.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactDrawableHelper.kt index a76546e6c12609..58448140809291 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactDrawableHelper.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactDrawableHelper.kt @@ -14,6 +14,8 @@ import android.graphics.Color import android.graphics.drawable.ColorDrawable import android.graphics.drawable.Drawable import android.graphics.drawable.RippleDrawable +import android.graphics.drawable.ShapeDrawable +import android.graphics.drawable.shapes.RoundRectShape import android.util.TypedValue import com.facebook.react.bridge.JSApplicationIllegalArgumentException import com.facebook.react.bridge.ReadableMap @@ -108,11 +110,13 @@ public object ReactDrawableHelper { if (drawableDescriptionDict.hasKey("rippleCornerRadius")) { val rippleRadius = PixelUtil.toPixelFromDIP(drawableDescriptionDict.getDouble("rippleCornerRadius")) - return ShapeDrawable(RoundRectShape( + return ShapeDrawable( + RoundRectShape( FloatArray(8) { rippleRadius }, null, null - )) + ) + ) } if (!drawableDescriptionDict.hasKey("borderless") || From 0cf4f7dc907a1dca3a21f4475df19ae2b0d38351 Mon Sep 17 00:00:00 2001 From: Alex Hendrix Date: Mon, 10 Mar 2025 14:34:20 -0500 Subject: [PATCH 094/108] More ImageSource Cleanup (Squash Later) --- .../java/com/facebook/react/views/imagehelper/ImageSource.kt | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ImageSource.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ImageSource.kt index 4d69ff91739df1..2acbcbb37a1982 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ImageSource.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ImageSource.kt @@ -9,11 +9,8 @@ package com.facebook.react.views.imagehelper import android.content.Context import android.net.Uri -<<<<<<< HEAD import com.facebook.react.modules.fresco.ImageCacheControl -======= import androidx.arch.core.util.Function ->>>>>>> 946f3eaa576 (Update RNA ImageView to support forced cached property to fix GIF flicker.) import java.util.Objects /** Class describing an image source (network URI or resource) and size. */ From 0d46d0e2e9d08a8096f8c78148f516b7df841f46 Mon Sep 17 00:00:00 2001 From: Alex Hendrix Date: Tue, 11 Mar 2025 14:39:23 -0500 Subject: [PATCH 095/108] Update Android websocket module to expose onOpen callback. --- .../react/modules/websocket/WebSocketModule.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.kt index 06c891c51f3913..d47f3c0c6abd0e 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.kt @@ -44,10 +44,17 @@ public class WebSocketModule(context: ReactApplicationContext) : public fun onMessage(byteString: ByteString, params: WritableMap) } + public interface OnOpenHandler { + + public fun onOpen(webSocket: WebSocket, socketId: Int); + } + private val webSocketConnections: MutableMap = ConcurrentHashMap() private val contentHandlers: MutableMap = ConcurrentHashMap() private val cookieHandler: ForwardingCookieHandler = ForwardingCookieHandler() + var mOnOpenHandler: OnOpenHandler = null; + override fun invalidate() { for (socket in webSocketConnections.values) { socket.close(1_001 /* endpoint is going away */, null) @@ -145,6 +152,9 @@ public class WebSocketModule(context: ReactApplicationContext) : params.putInt("id", id) params.putString("protocol", response.header("Sec-WebSocket-Protocol", "")) sendEvent("websocketOpen", params) + if (mOnOpenHandler != null) { + mOnOpenHandler.onOpen(webSocket, id); + } } override fun onClosing(websocket: WebSocket, code: Int, reason: String) { From a4391096910e1c32dfe3e9c4e55130327bc75207 Mon Sep 17 00:00:00 2001 From: Alex Hendrix Date: Tue, 11 Mar 2025 14:50:38 -0500 Subject: [PATCH 096/108] Syntax Fixes, Squash Later --- .../facebook/react/modules/websocket/WebSocketModule.kt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.kt index d47f3c0c6abd0e..861d776f8dde14 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.kt @@ -46,14 +46,14 @@ public class WebSocketModule(context: ReactApplicationContext) : public interface OnOpenHandler { - public fun onOpen(webSocket: WebSocket, socketId: Int); + public fun onOpen(webSocket: WebSocket, socketId: Int) } private val webSocketConnections: MutableMap = ConcurrentHashMap() private val contentHandlers: MutableMap = ConcurrentHashMap() private val cookieHandler: ForwardingCookieHandler = ForwardingCookieHandler() - var mOnOpenHandler: OnOpenHandler = null; + public var mOnOpenHandler: OnOpenHandler? = null override fun invalidate() { for (socket in webSocketConnections.values) { @@ -152,9 +152,7 @@ public class WebSocketModule(context: ReactApplicationContext) : params.putInt("id", id) params.putString("protocol", response.header("Sec-WebSocket-Protocol", "")) sendEvent("websocketOpen", params) - if (mOnOpenHandler != null) { - mOnOpenHandler.onOpen(webSocket, id); - } + mOnOpenHandler?.onOpen(webSocket, id) } override fun onClosing(websocket: WebSocket, code: Int, reason: String) { From 4334a1ba738a00c24083ca8b404c7e8797ccdb35 Mon Sep 17 00:00:00 2001 From: Patrick Mick Date: Thu, 27 Mar 2025 10:53:23 -0700 Subject: [PATCH 097/108] Add require_relative to fast_float podspec --- packages/react-native/third-party-podspecs/fast_float.podspec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-native/third-party-podspecs/fast_float.podspec b/packages/react-native/third-party-podspecs/fast_float.podspec index 8c89d9da18f54f..00ddbe85585de0 100644 --- a/packages/react-native/third-party-podspecs/fast_float.podspec +++ b/packages/react-native/third-party-podspecs/fast_float.podspec @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +require_relative "../scripts/react_native_pods" + fast_float_config = get_fast_float_config() fast_float_git_url = fast_float_config[:git] From df4fc7a2a8c0a3f26f03846f7f5e9894b58a1e00 Mon Sep 17 00:00:00 2001 From: Patrick Mick Date: Tue, 15 Apr 2025 09:39:53 -0700 Subject: [PATCH 098/108] Add ifdef to plugins import in devtools --- .../devtoolsruntimesettings/DevToolsRuntimeSettingsModule.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/react-native/ReactCommon/react/nativemodule/devtoolsruntimesettings/DevToolsRuntimeSettingsModule.cpp b/packages/react-native/ReactCommon/react/nativemodule/devtoolsruntimesettings/DevToolsRuntimeSettingsModule.cpp index 4b0e5ca0bd2f6a..99424585afc880 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/devtoolsruntimesettings/DevToolsRuntimeSettingsModule.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/devtoolsruntimesettings/DevToolsRuntimeSettingsModule.cpp @@ -6,7 +6,10 @@ */ #include "DevToolsRuntimeSettingsModule.h" + +#ifdef RN_DISABLE_OSS_PLUGIN_HEADER #include "Plugins.h" +#endif std::shared_ptr ReactDevToolsRuntimeSettingsModuleProvider( From 130eb14772c3e572c3af220efb68caf15288263d Mon Sep 17 00:00:00 2001 From: Patrick Mick Date: Mon, 21 Apr 2025 10:09:15 -0700 Subject: [PATCH 099/108] Revert to rn76 logic for rncore codegen check --- .../scripts/codegen/generate-artifacts-executor.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/react-native/scripts/codegen/generate-artifacts-executor.js b/packages/react-native/scripts/codegen/generate-artifacts-executor.js index 6b4e7b730a9109..f33d8133ef7998 100644 --- a/packages/react-native/scripts/codegen/generate-artifacts-executor.js +++ b/packages/react-native/scripts/codegen/generate-artifacts-executor.js @@ -495,7 +495,13 @@ function shouldSkipGenerationForRncore(schemaInfo, platform) { if (platform !== 'ios' || schemaInfo.library.config.name !== 'rncore') { return false; } - const rncoreOutputPath = CORE_LIBRARIES_WITH_OUTPUT_FOLDER.rncore.ios; + const rncoreOutputPath = path.join( + RNCORE_CONFIGS.ios, + 'react', + 'renderer', + 'components', + 'rncore', + ); const rncoreAbsolutePath = path.resolve(rncoreOutputPath); return ( rncoreAbsolutePath.includes('node_modules') && From e0f3d799d2683326b6a6ee39038f193f57d4790f Mon Sep 17 00:00:00 2001 From: Timothy Huynh Date: Tue, 22 Apr 2025 12:31:19 -0400 Subject: [PATCH 100/108] update Text to support gradient colors --- .../Text/BaseText/RCTBaseTextViewManager.mm | 1 + .../Libraries/Text/RCTTextAttributes.h | 1 + .../Libraries/Text/RCTTextAttributes.mm | 29 ++++++++++++++ .../react-native/Libraries/Text/Text.d.ts | 5 +++ .../Libraries/Text/TextNativeComponent.js | 1 + .../views/text/ReactBaseTextShadowNode.java | 40 +++++++++++++++++-- .../text/internal/span/LinearGradientSpan.kt | 27 +++++++++++++ 7 files changed, 101 insertions(+), 3 deletions(-) create mode 100644 packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/LinearGradientSpan.kt diff --git a/packages/react-native/Libraries/Text/BaseText/RCTBaseTextViewManager.mm b/packages/react-native/Libraries/Text/BaseText/RCTBaseTextViewManager.mm index e9ce272b5f55fb..6e88d6f922799a 100644 --- a/packages/react-native/Libraries/Text/BaseText/RCTBaseTextViewManager.mm +++ b/packages/react-native/Libraries/Text/BaseText/RCTBaseTextViewManager.mm @@ -28,6 +28,7 @@ - (RCTShadowView *)shadowView // Color RCT_REMAP_SHADOW_PROPERTY(color, textAttributes.foregroundColor, UIColor) RCT_REMAP_SHADOW_PROPERTY(backgroundColor, textAttributes.backgroundColor, UIColor) +RCT_REMAP_SHADOW_PROPERTY(gradientColors, textAttributes.gradientColors, NSArray) RCT_REMAP_SHADOW_PROPERTY(opacity, textAttributes.opacity, CGFloat) // Font RCT_REMAP_SHADOW_PROPERTY(fontFamily, textAttributes.fontFamily, NSString) diff --git a/packages/react-native/Libraries/Text/RCTTextAttributes.h b/packages/react-native/Libraries/Text/RCTTextAttributes.h index 1b72abe51df44e..ad48554f36f31d 100644 --- a/packages/react-native/Libraries/Text/RCTTextAttributes.h +++ b/packages/react-native/Libraries/Text/RCTTextAttributes.h @@ -26,6 +26,7 @@ extern NSString *const RCTTextAttributesTagAttributeName; // Color @property (nonatomic, strong, nullable) UIColor *foregroundColor; @property (nonatomic, strong, nullable) UIColor *backgroundColor; +@property (nonatomic, copy, nullable) NSArray *gradientColors; @property (nonatomic, assign) CGFloat opacity; // Font @property (nonatomic, copy, nullable) NSString *fontFamily; diff --git a/packages/react-native/Libraries/Text/RCTTextAttributes.mm b/packages/react-native/Libraries/Text/RCTTextAttributes.mm index 7841115b995fc3..865cdfd397af4f 100644 --- a/packages/react-native/Libraries/Text/RCTTextAttributes.mm +++ b/packages/react-native/Libraries/Text/RCTTextAttributes.mm @@ -46,6 +46,7 @@ - (void)applyTextAttributes:(RCTTextAttributes *)textAttributes // Color _foregroundColor = textAttributes->_foregroundColor ?: _foregroundColor; _backgroundColor = textAttributes->_backgroundColor ?: _backgroundColor; + _gradientColors = textAttributes->_gradientColors ?: _gradientColors; _opacity = !isnan(textAttributes->_opacity) ? (isnan(_opacity) ? 1.0 : _opacity) * textAttributes->_opacity : _opacity; @@ -294,6 +295,34 @@ - (UIColor *)effectiveForegroundColor { UIColor *effectiveForegroundColor = _foregroundColor ?: [UIColor blackColor]; + if (_gradientColors != nil) { + NSMutableArray *cgColors = [NSMutableArray array]; + for (NSNumber *rawColor in _gradientColors) { + if (rawColor != nil) { + UIColor *color = [RCTConvert UIColor:@((0xFF << 24) | [rawColor integerValue])]; + [cgColors addObject:(id)color.CGColor]; + } + } + + if([cgColors count] > 0) { + CAGradientLayer *gradient = [CAGradientLayer layer]; + // this pattern width corresponds roughly to desktop's pattern width + int patternWidth = 100; + CGFloat height = _lineHeight * self.effectiveFontSizeMultiplier; + gradient.frame = CGRectMake(0, 0, patternWidth, height); + gradient.colors = cgColors; + gradient.startPoint = CGPointMake(0.0, 0.5); + gradient.endPoint = CGPointMake(1.0, 0.5); + + UIGraphicsBeginImageContextWithOptions(gradient.frame.size, NO, 0.0); + [gradient renderInContext:UIGraphicsGetCurrentContext()]; + UIImage *gradientImage = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + + effectiveForegroundColor = [UIColor colorWithPatternImage:gradientImage]; + } + } + if (!isnan(_opacity)) { effectiveForegroundColor = [effectiveForegroundColor colorWithAlphaComponent:CGColorGetAlpha(effectiveForegroundColor.CGColor) * _opacity]; diff --git a/packages/react-native/Libraries/Text/Text.d.ts b/packages/react-native/Libraries/Text/Text.d.ts index 2481ba7707ce20..8a1170d6d84ae4 100644 --- a/packages/react-native/Libraries/Text/Text.d.ts +++ b/packages/react-native/Libraries/Text/Text.d.ts @@ -214,6 +214,11 @@ export interface TextProps * Controls how touch events are handled. Similar to `View`'s `pointerEvents`. */ pointerEvents?: ViewStyle['pointerEvents'] | undefined; + + /** + * Adds a horizontal gradient using the int based color values. + */ + gradientColors?: number[] | undefined; } /** diff --git a/packages/react-native/Libraries/Text/TextNativeComponent.js b/packages/react-native/Libraries/Text/TextNativeComponent.js index db354707320cfa..26bcb60b6e2518 100644 --- a/packages/react-native/Libraries/Text/TextNativeComponent.js +++ b/packages/react-native/Libraries/Text/TextNativeComponent.js @@ -48,6 +48,7 @@ const textViewConfig = { dataDetectorType: true, android_hyphenationFrequency: true, lineBreakStrategyIOS: true, + gradientColors: true, }, directEventTypes: { topTextLayout: { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.java index 6cb16d00028de2..8a6eb83930da07 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.java @@ -20,6 +20,7 @@ import com.facebook.infer.annotation.Assertions; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; +import com.facebook.react.bridge.ReadableType; import com.facebook.react.common.ReactConstants; import com.facebook.react.uimanager.IllegalViewOperationException; import com.facebook.react.uimanager.LayoutShadowNode; @@ -34,6 +35,7 @@ import com.facebook.react.views.text.internal.span.CustomLetterSpacingSpan; import com.facebook.react.views.text.internal.span.CustomLineHeightSpan; import com.facebook.react.views.text.internal.span.CustomStyleSpan; +import com.facebook.react.views.text.internal.span.LinearGradientSpan; import com.facebook.react.views.text.internal.span.ReactAbsoluteSizeSpan; import com.facebook.react.views.text.internal.span.ReactBackgroundColorSpan; import com.facebook.react.views.text.internal.span.ReactClickableSpan; @@ -160,9 +162,15 @@ private static void buildSpannedFromShadowNode( } int end = sb.length(); if (end >= start) { - if (textShadowNode.mIsColorSet) { - ops.add( - new SetSpanOperation(start, end, new ReactForegroundColorSpan(textShadowNode.mColor))); + if (textShadowNode.mIsColorSet || textShadowNode.mGradientColors != null) { + if (textShadowNode.mGradientColors != null && textShadowNode.mGradientColors.length >= 2) { + int effectiveFontSize = textAttributes.getEffectiveFontSize(); + ops.add( + new SetSpanOperation(start, end, new LinearGradientSpan(start * effectiveFontSize, textShadowNode.mGradientColors))); + } else { + ops.add( + new SetSpanOperation(start, end, new ReactForegroundColorSpan(textShadowNode.mColor))); + } } if (textShadowNode.mIsBackgroundColorSet) { ops.add( @@ -319,6 +327,8 @@ protected Spannable spannedFromShadowNode( protected boolean mIsBackgroundColorSet = false; protected int mBackgroundColor; + protected @Nullable int[] mGradientColors = null; + protected @Nullable AccessibilityRole mAccessibilityRole = null; protected @Nullable Role mRole = null; @@ -479,6 +489,30 @@ public void setColor(@Nullable Integer color) { markUpdated(); } + @ReactProp(name = "gradientColors") + public void setGradientColors(@Nullable ReadableArray gradientColors) { + if (gradientColors != null) { + ArrayList colors = new ArrayList(); + + for (int i = 0; i < gradientColors.size(); i++) { + if (!gradientColors.isNull(i) && gradientColors.getType(i) == ReadableType.Number) { + int color = gradientColors.getInt(i); + colors.add(color); + } + } + + int colorsSize = colors.size(); + if (colorsSize >= 2) { + int[] colorsAsList = new int[colorsSize]; + for (int i = 0; i < colorsSize; i++) { + colorsAsList[i] = colors.get(i); + } + + mGradientColors = colorsAsList; + } + } + } + @ReactProp(name = ViewProps.BACKGROUND_COLOR, customType = "Color") public void setBackgroundColor(@Nullable Integer color) { // Background color needs to be handled here for virtual nodes so it can be incorporated into diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/LinearGradientSpan.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/LinearGradientSpan.kt new file mode 100644 index 00000000000000..76a6d88e0be01c --- /dev/null +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/LinearGradientSpan.kt @@ -0,0 +1,27 @@ +package com.facebook.react.views.text.internal.span + +import android.graphics.LinearGradient +import android.graphics.Shader +import android.text.TextPaint +import android.text.style.CharacterStyle +import android.text.style.UpdateAppearance + +public class LinearGradientSpan( + private val start: Float, + private val colors: IntArray, +) : CharacterStyle(), ReactSpan, + UpdateAppearance { + public override fun updateDrawState(tp: TextPaint) { + val textShader: Shader = + LinearGradient( + start, + 0f, + start + 150.0f, + 0f, + colors, + null, + Shader.TileMode.MIRROR, + ) + tp.setShader(textShader) + } +} From effdf52d9cfe9194826be722e4c76fa625ddd4ed Mon Sep 17 00:00:00 2001 From: Ruby Feinstein <4782063+RubyFeinstein@users.noreply.github.com> Date: Mon, 5 May 2025 15:07:52 -0700 Subject: [PATCH 101/108] [android] harden AppStateModule initial state (#57) ## Issue During app startup, react-native's `AppState.currentState` can incorrectly report `background` when the app is actually in the foreground. This happens because: 1. `AppStateModule` relies on `onHostResume` and `onHostPause` event subscriptions to track state 2. The initial state can incorrectly initialize to `APP_STATE_BACKGROUND` when `reactContext.lifecycleState === LifecycleState.BEFORE_CREATE` (which occurs before root view attachment) ## Solution This PR adds an `isAppForegroundedByMemoryState()` method that provides a more accurate initial state detection when the React context is in `BEFORE_CREATE` lifecycle state. ## Future Improvements While this is a quick workaround to address the immediate issue, potential future improvements: 1. Leveraging Android activity lifecycle to set initial state to `RESUMED` on `onCreate` 2. Mapping `LifecycleState.BEFORE_CREATE` to `unknown` instead of incorrectly mapping to `background` --- .../react/modules/appstate/AppStateModule.kt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/appstate/AppStateModule.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/appstate/AppStateModule.kt index 543ab79fba8677..385fd1582a261c 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/appstate/AppStateModule.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/appstate/AppStateModule.kt @@ -7,6 +7,8 @@ package com.facebook.react.modules.appstate +import android.app.ActivityManager +import com.facebook.common.logging.FLog import com.facebook.fbreact.specs.NativeAppStateSpec import com.facebook.react.bridge.Arguments import com.facebook.react.bridge.Callback @@ -26,11 +28,27 @@ internal class AppStateModule(reactContext: ReactApplicationContext) : init { reactContext.addLifecycleEventListener(this) reactContext.addWindowFocusChangeListener(this) + val isAppForegroundedByMemoryState = isAppForegroundedByMemoryState() + // pasten: temporary debug log - remove after we validate with real users + FLog.w("AppStateModule", "initial isAppForegroundedByMemoryState = $isAppForegroundedByMemoryState, " + + "reactContext.lifecycleState = ${reactContext.lifecycleState}") + appState = if (reactContext.lifecycleState === LifecycleState.RESUMED) APP_STATE_ACTIVE + // pasten: during cold start appState=APP_STATE_BACKGROUND while tha is actually in the foreground + // best effort foreground detection when LifecycleState.BEFORE_CREATE (which is the initial state) + else if (reactContext.lifecycleState === LifecycleState.BEFORE_CREATE && isAppForegroundedByMemoryState) { + APP_STATE_ACTIVE + } else if (isAppForegroundedByMemoryState) APP_STATE_ACTIVE else APP_STATE_BACKGROUND } + private fun isAppForegroundedByMemoryState(): Boolean { + return ActivityManager.RunningAppProcessInfo().apply { + ActivityManager.getMyMemoryState(this) + }.importance == ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND + } + public override fun getTypedExportedConstants(): Map = mapOf(INITIAL_STATE to appState) From ba6bb62924bb17a58cae6316323ea368482c52a1 Mon Sep 17 00:00:00 2001 From: Timothy Huynh <99213468+timothy-huynh@users.noreply.github.com> Date: Tue, 6 May 2025 16:21:55 -0400 Subject: [PATCH 102/108] update Text gradient colors to be mirrored on ios (#59) --- packages/react-native/Libraries/Text/RCTTextAttributes.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native/Libraries/Text/RCTTextAttributes.mm b/packages/react-native/Libraries/Text/RCTTextAttributes.mm index 865cdfd397af4f..acd157939436b2 100644 --- a/packages/react-native/Libraries/Text/RCTTextAttributes.mm +++ b/packages/react-native/Libraries/Text/RCTTextAttributes.mm @@ -305,6 +305,7 @@ - (UIColor *)effectiveForegroundColor } if([cgColors count] > 0) { + [cgColors addObject:cgColors[0]]; CAGradientLayer *gradient = [CAGradientLayer layer]; // this pattern width corresponds roughly to desktop's pattern width int patternWidth = 100; From 0d785f45e011d0c09c6ca8b21c6452d77c637921 Mon Sep 17 00:00:00 2001 From: Timothy Huynh <99213468+timothy-huynh@users.noreply.github.com> Date: Tue, 6 May 2025 16:22:15 -0400 Subject: [PATCH 103/108] fix android gradient colors faded (#60) --- .../react/views/text/ReactBaseTextShadowNode.java | 13 +++++-------- .../views/text/internal/span/LinearGradientSpan.kt | 3 +++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.java index 8a6eb83930da07..8a38e05a5b345f 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.java @@ -162,15 +162,12 @@ private static void buildSpannedFromShadowNode( } int end = sb.length(); if (end >= start) { - if (textShadowNode.mIsColorSet || textShadowNode.mGradientColors != null) { - if (textShadowNode.mGradientColors != null && textShadowNode.mGradientColors.length >= 2) { + if (textShadowNode.mIsColorSet) { + ops.add(new SetSpanOperation(start, end, new ReactForegroundColorSpan(textShadowNode.mColor))); + } + if (textShadowNode.mGradientColors != null && textShadowNode.mGradientColors.length >= 2) { int effectiveFontSize = textAttributes.getEffectiveFontSize(); - ops.add( - new SetSpanOperation(start, end, new LinearGradientSpan(start * effectiveFontSize, textShadowNode.mGradientColors))); - } else { - ops.add( - new SetSpanOperation(start, end, new ReactForegroundColorSpan(textShadowNode.mColor))); - } + ops.add(new SetSpanOperation(start, end, new LinearGradientSpan(start * effectiveFontSize, textShadowNode.mGradientColors))); } if (textShadowNode.mIsBackgroundColorSet) { ops.add( diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/LinearGradientSpan.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/LinearGradientSpan.kt index 76a6d88e0be01c..8f4a4753572c54 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/LinearGradientSpan.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/LinearGradientSpan.kt @@ -12,6 +12,9 @@ public class LinearGradientSpan( ) : CharacterStyle(), ReactSpan, UpdateAppearance { public override fun updateDrawState(tp: TextPaint) { + // without setting the paint color, the gradient appears "faded" if no foreground color span is also applied + // https://stackoverflow.com/a/52289927 + tp.setColor(colors[0]) val textShader: Shader = LinearGradient( start, From 3af7d4ae2dbeced7a35281378d9254c0bfe3af48 Mon Sep 17 00:00:00 2001 From: hannomargelo Date: Wed, 7 May 2025 15:05:53 +0200 Subject: [PATCH 104/108] new arch rn078 fixes (#62) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Split shadow node reference setter and update functionality (#50752) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50752 Storing the runtime reference for a shadow node and updating the runtime reference to point at a specific shadow node should be separated so that these actions can be done at different moments in time. We want to keep a reference to the runtime reference of a shadow node for all revisions cloned internally (not triggered by the React renderer, e.g. on layout or shadow node state updates). We also want to support updating that runtime reference to point at a specific shadow node revision, ideally the one that will end up being used to mount the host component. Changelog: [Internal] Reviewed By: rubennorte Differential Revision: D73038438 fbshipit-source-id: 68c3912cbb077d790dd8d2abe8291548b12c8231 * Move shadow node reference updates to tree commit (#50753) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50753 Runtime Shadow Node Reference Updates (RSNRU) is currently implemented through the clone method which on each internal clone updates the runtime reference to point to the new clone. This guarantees that the runtime reference always points at the latest revision of the shadow node. This came with the constraint that RSNRU could only run from one thread at all times, otherwise the React renderer state (current fiber tree) would end up being corrupted by receiving reference updates from multiple threads cloning shadow nodes. This change moves the reference update step to the locked scope of the commit phase. Since the runtime is blocking on the commit and the scope is locked, it is safe and correct to update the runtime references with the latest revision of the shadow node after running state progression and layout. By moving the reference update to the commit, we can support shadow node syncing from any thread since the actual runtime references are now executing at a safe time and the renderer state will stay valid at all times. This change is gated behind the `updateRuntimeShadowNodeReferencesOnCommit` feature flag, which enabled shadow node syncing from any thread and reference updates only during the commit. Changelog: [Internal] Reviewed By: rubennorte Differential Revision: D73038439 fbshipit-source-id: d90308498f3c0625dc87158f15311d1088aad8b0 * rename feature flag used mirroring: https://github.com/facebook/react-native/commit/1156c08ac4d1fd9f782c87864d63c3f152f93734#diff-401e4af73546645a81c7e2c576b1319d0d819d92d0c214c88e3759bcb4d5e9c2R53-R54 * enable feature flag * rename feature flag used mirroring: https://github.com/facebook/react-native/commit/1156c08ac4d1fd9f782c87864d63c3f152f93734#diff-401e4af73546645a81c7e2c576b1319d0d819d92d0c214c88e3759bcb4d5e9c2R53-R54 --------- Co-authored-by: Nick Lefever Co-authored-by: Hanno J. Gödecke --- .../defaults/DefaultNewArchitectureEntryPoint.kt | 5 +++++ .../ReactCommon/react/renderer/core/ShadowNode.cpp | 11 +++++++++-- .../ReactCommon/react/renderer/core/ShadowNode.h | 6 ++++++ .../react/renderer/mounting/updateMountedFlag.cpp | 6 ++++++ 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt index f90ad0246a36f9..662a98ab1f8f41 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt @@ -51,6 +51,11 @@ public object DefaultNewArchitectureEntryPoint { bridgelessEnabled || fabricEnabled override fun useTurboModules(): Boolean = bridgelessEnabled || turboModulesEnabled + + // Fixes reanimated flickering issues where shadow node updates on the UI thread wouldn't be + // propagated back to the react JS fiber node/tree. + override fun useRuntimeShadowNodeReferenceUpdate(): Boolean = + bridgelessEnabled || turboModulesEnabled }) privateFabricEnabled = fabricEnabled diff --git a/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.cpp b/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.cpp index a9ca4d71c9d6a8..989b89d7af4363 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.cpp +++ b/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.cpp @@ -308,13 +308,20 @@ void ShadowNode::setRuntimeShadowNodeReference( runtimeShadowNodeReference_ = runtimeShadowNodeReference; } +void ShadowNode::updateRuntimeShadowNodeReference( + const Shared& destinationShadowNode) const { + if (auto reference = runtimeShadowNodeReference_.lock()) { + reference->shadowNode = destinationShadowNode; + } +} + void ShadowNode::transferRuntimeShadowNodeReference( const Shared& destinationShadowNode) const { destinationShadowNode->runtimeShadowNodeReference_ = runtimeShadowNodeReference_; - if (auto reference = runtimeShadowNodeReference_.lock()) { - reference->shadowNode = destinationShadowNode; + if (!ReactNativeFeatureFlags::useRuntimeShadowNodeReferenceUpdate()) { + updateRuntimeShadowNodeReference(destinationShadowNode); } } diff --git a/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.h b/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.h index 7a3ad9cbc1b8b3..ae648988875ade 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.h @@ -187,6 +187,12 @@ class ShadowNode : public Sealable, void setRuntimeShadowNodeReference(const std::shared_ptr& runtimeShadowNodeReference) const; + /* + * Update the runtime reference to point to the provided shadow node. + */ + void updateRuntimeShadowNodeReference( + const Shared& destinationShadowNode) const; + /* * Transfer the runtime reference to this `ShadowNode` to a new instance, * updating the reference to point to the new `ShadowNode` referencing it. diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/updateMountedFlag.cpp b/packages/react-native/ReactCommon/react/renderer/mounting/updateMountedFlag.cpp index 4b501294144878..42d8695977fb2f 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/updateMountedFlag.cpp +++ b/packages/react-native/ReactCommon/react/renderer/mounting/updateMountedFlag.cpp @@ -7,6 +7,8 @@ #include "updateMountedFlag.h" +#include + namespace facebook::react { void updateMountedFlag( const ShadowNode::ListOfShared& oldChildren, @@ -47,6 +49,10 @@ void updateMountedFlag( newChild->setMounted(true); oldChild->setMounted(false); + if (ReactNativeFeatureFlags::useRuntimeShadowNodeReferenceUpdate()) { + newChild->updateRuntimeShadowNodeReference(newChild); + } + updateMountedFlag(oldChild->getChildren(), newChild->getChildren()); } From 79663df066cb60054439333d56d17b2d68d0f8ef Mon Sep 17 00:00:00 2001 From: hannomargelo Date: Wed, 14 May 2025 16:39:16 +0200 Subject: [PATCH 105/108] Introduce getDiffProps for (#45552) (#64) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/45552 In this diff I'm overriding the getDiffProps for ViewProps. The goal is to verify what's the impact of calculating diffs of props in Android, starting with ViewProps. Once we verify what are the implication we will automatic implement this diffing. The full implementation of this method will be implemented in the following diffs changelog: [internal] internal Reviewed By: NickGerleman Differential Revision: D59969328 fbshipit-source-id: ce141528581e46e9ced4175dca040ddf8bed5ddb Co-authored-by: David Vacca --- .../components/view/HostPlatformViewProps.cpp | 21 +++++++++++++++++++ .../components/view/HostPlatformViewProps.h | 6 ++++++ 2 files changed, 27 insertions(+) diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.cpp b/packages/react-native/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.cpp index dfbae60abd7c94..352b8274c929db 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.cpp @@ -133,4 +133,25 @@ SharedDebugStringConvertibleList HostPlatformViewProps::getDebugProps() const { } #endif +#ifdef ANDROID + +folly::dynamic HostPlatformViewProps::getDiffProps( + const Props* prevProps) const { + folly::dynamic result = folly::dynamic::object(); + + static const auto defaultProps = HostPlatformViewProps(); + + const HostPlatformViewProps* oldProps = prevProps == nullptr + ? &defaultProps + : static_cast(prevProps); + + if (focusable != oldProps->focusable) { + result["focusable"] = focusable; + } + + return result; +} + +#endif + } // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.h b/packages/react-native/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.h index 25a6cd30529b1a..d18d7e863bbdf9 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.h @@ -55,6 +55,12 @@ class HostPlatformViewProps : public BaseViewProps { #if RN_DEBUG_STRING_CONVERTIBLE SharedDebugStringConvertibleList getDebugProps() const override; #endif + +#ifdef ANDROID + + folly::dynamic getDiffProps(const Props* prevProps) const override; + +#endif }; } // namespace facebook::react From a1f9872f92cba21edd6e4df82b62d3f259ac7d3d Mon Sep 17 00:00:00 2001 From: Andrei Xavier de Oliveira Calazans Date: Wed, 14 May 2025 13:14:54 -0300 Subject: [PATCH 106/108] patch ReactModalHostview to init with correct sizes (#63) --- .../react/views/modal/ReactModalHostView.kt | 33 +++++++++++++++++ .../renderer/components/modal/CMakeLists.txt | 5 ++- .../components/modal/ModalHostViewState.h | 11 ++---- .../components/modal/ModalHostViewUtils.h | 2 +- .../platform/android/JReactModalHostView.h | 35 +++++++++++++++++++ .../platform/android/ModalHostViewUtils.cpp | 17 +++++++++ 6 files changed, 93 insertions(+), 10 deletions(-) create mode 100644 packages/react-native/ReactCommon/react/renderer/components/modal/platform/android/JReactModalHostView.h create mode 100644 packages/react-native/ReactCommon/react/renderer/components/modal/platform/android/ModalHostViewUtils.cpp diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt index 493d359cc6bb1c..a811a613524529 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt @@ -27,8 +27,11 @@ import android.view.accessibility.AccessibilityEvent import android.view.accessibility.AccessibilityNodeInfo import android.widget.FrameLayout import androidx.annotation.UiThread +import androidx.core.view.ViewCompat import androidx.core.content.ContextCompat import androidx.core.view.WindowCompat +import androidx.core.view.WindowInsetsCompat +import androidx.core.view.WindowInsetsCompat.CONSUMED import com.facebook.common.logging.FLog import com.facebook.react.R import com.facebook.react.bridge.GuardedRunnable @@ -40,6 +43,7 @@ import com.facebook.react.bridge.WritableNativeMap import com.facebook.react.common.ReactConstants import com.facebook.react.common.annotations.VisibleForTesting import com.facebook.react.config.ReactFeatureFlags +import com.facebook.react.uimanager.DisplayMetricsHolder import com.facebook.react.uimanager.JSPointerDispatcher import com.facebook.react.uimanager.JSTouchDispatcher import com.facebook.react.uimanager.PixelUtil.pxToDp @@ -52,6 +56,7 @@ import com.facebook.react.views.common.ContextUtils import com.facebook.react.views.view.ReactViewGroup import com.facebook.react.views.view.setStatusBarTranslucency import com.facebook.react.views.view.setSystemBarsTranslucency +import com.facebook.yoga.annotations.DoNotStrip import java.util.Objects /** @@ -122,6 +127,7 @@ public class ReactModalHostView(context: ThemedReactContext) : private var createNewDialog = false init { + initStatusBarHeight(context) dialogRootViewGroup = DialogRootViewGroup(context) } @@ -412,6 +418,18 @@ public class ReactModalHostView(context: ThemedReactContext) : } } + private fun initStatusBarHeight(reactContext: ReactContext) { + val windowInsets = + reactContext.getCurrentActivity()?.window?.decorView?.let(ViewCompat::getRootWindowInsets) + statusBarHeight = + windowInsets + ?.getInsets( + WindowInsetsCompat.Type.statusBars() or + WindowInsetsCompat.Type.navigationBars() or + WindowInsetsCompat.Type.displayCutout()) + ?.top ?: 0 + } + /** * Sets the testID on the DialogRootViewGroup. Since the accessibility events are not triggered on * the on the ReactModalHostView, the testID is forwarded to the DialogRootViewGroup to set the @@ -430,8 +448,22 @@ public class ReactModalHostView(context: ThemedReactContext) : private companion object { private const val TAG = "ReactModalHost" + + // We store the status bar height to be able to properly position + // the modal on the first render. + private var statusBarHeight = 0 + + @JvmStatic + @DoNotStrip + private fun getScreenDisplayMetricsWithoutInsets(): FloatArray { + val displayMetrics = DisplayMetricsHolder.getScreenDisplayMetrics() + return floatArrayOf( + displayMetrics.widthPixels.toFloat().pxToDp(), + (displayMetrics.heightPixels - statusBarHeight).toFloat().pxToDp()) + } } + /** * DialogRootViewGroup is the ViewGroup which contains all the children of a Modal. It gets all * child information forwarded from [ReactModalHostView] and uses that to create children. It is @@ -568,3 +600,4 @@ public class ReactModalHostView(context: ThemedReactContext) : } } } + diff --git a/packages/react-native/ReactCommon/react/renderer/components/modal/CMakeLists.txt b/packages/react-native/ReactCommon/react/renderer/components/modal/CMakeLists.txt index dd1a291061ba22..a84728b6b2811a 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/modal/CMakeLists.txt +++ b/packages/react-native/ReactCommon/react/renderer/components/modal/CMakeLists.txt @@ -14,7 +14,10 @@ add_compile_options( -Wpedantic -DLOG_TAG=\"Fabric\") -file(GLOB rrc_modal_SRC CONFIGURE_DEPENDS *.cpp) +file(GLOB rrc_modal_SRC CONFIGURE_DEPENDS + *.cpp + platform/android/*.cpp) + add_library(rrc_modal STATIC ${rrc_modal_SRC}) target_include_directories(rrc_modal PUBLIC ${REACT_COMMON_DIR}) diff --git a/packages/react-native/ReactCommon/react/renderer/components/modal/ModalHostViewState.h b/packages/react-native/ReactCommon/react/renderer/components/modal/ModalHostViewState.h index 2b713926dd5efc..e8e97707930436 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/modal/ModalHostViewState.h +++ b/packages/react-native/ReactCommon/react/renderer/components/modal/ModalHostViewState.h @@ -9,14 +9,13 @@ #include #include +#include "ModalHostViewUtils.h" #ifdef ANDROID #include #endif -#if defined(__APPLE__) && TARGET_OS_IOS #include "ModalHostViewUtils.h" -#endif namespace facebook::react { @@ -27,12 +26,7 @@ class ModalHostViewState final { public: using Shared = std::shared_ptr; -#if defined(__APPLE__) && TARGET_OS_IOS - ModalHostViewState() : screenSize(RCTModalHostViewScreenSize()) { -#else - ModalHostViewState(){ -#endif - }; + ModalHostViewState() : screenSize(RCTModalHostViewScreenSize()) {} ModalHostViewState(Size screenSize_) : screenSize(screenSize_){}; #ifdef ANDROID @@ -54,3 +48,4 @@ class ModalHostViewState final { }; } // namespace facebook::react + diff --git a/packages/react-native/ReactCommon/react/renderer/components/modal/ModalHostViewUtils.h b/packages/react-native/ReactCommon/react/renderer/components/modal/ModalHostViewUtils.h index fc038ad33de5fd..b4881ff22974fd 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/modal/ModalHostViewUtils.h +++ b/packages/react-native/ReactCommon/react/renderer/components/modal/ModalHostViewUtils.h @@ -7,7 +7,7 @@ #pragma once -#include +#include namespace facebook::react { diff --git a/packages/react-native/ReactCommon/react/renderer/components/modal/platform/android/JReactModalHostView.h b/packages/react-native/ReactCommon/react/renderer/components/modal/platform/android/JReactModalHostView.h new file mode 100644 index 00000000000000..eeae4d73356e8f --- /dev/null +++ b/packages/react-native/ReactCommon/react/renderer/components/modal/platform/android/JReactModalHostView.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#pragma once + +#include +#include + +#include + +namespace facebook::react { + +class JReactModalHostView + : public facebook::jni::JavaClass { + public: + static auto constexpr kJavaDescriptor = + "Lcom/facebook/react/views/modal/ReactModalHostView;"; + + static Size getDisplayMetrics() { + static auto method = JReactModalHostView::javaClassStatic() + ->getStaticMethod( + "getScreenDisplayMetricsWithoutInsets"); + auto result = method(javaClassStatic()); + size_t size = result->size(); + std::vector elements(size + 1L); + result->getRegion(0, size, elements.data()); + return Size{elements[0], elements[1]}; + } +}; + +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/modal/platform/android/ModalHostViewUtils.cpp b/packages/react-native/ReactCommon/react/renderer/components/modal/platform/android/ModalHostViewUtils.cpp new file mode 100644 index 00000000000000..7489ee509b0e24 --- /dev/null +++ b/packages/react-native/ReactCommon/react/renderer/components/modal/platform/android/ModalHostViewUtils.cpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#include +#include "JReactModalHostView.h" + +namespace facebook::react { + +Size RCTModalHostViewScreenSize(void) { + return JReactModalHostView::getDisplayMetrics(); +} + +} // namespace facebook::react From 1dbcf5e640e26666c9376c1d86976db97f228279 Mon Sep 17 00:00:00 2001 From: hannomargelo Date: Tue, 20 May 2025 16:17:52 +0200 Subject: [PATCH 107/108] fix: shadow node state updates (#65) * Add feature flag for using shadow node state on clone Copy of commit: b962646 PR: https://github.com/facebook/react-native/pull/50751 wasn't cherry-pickable * Use source shadow node state on clone (#50773) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50773 With shadow node syncing enabled by default, whenever a shadow node has to be cloned, we can be guaranteed that the state on the shadow node will be the most recent state in most cases. This change fixes state updates being ignored when cloning YogaLayoutableShadowNodes from a commit hook. Since the most recent state gets updated post commit, any clone reading the most recent state might miss state changes done within the commit. Changelog: [Internal] Reviewed By: rshest, cipolleschi Differential Revision: D72315898 fbshipit-source-id: 5e14d03681dd1cc5686a649caa2e8c3685042cfa --------- Co-authored-by: Nick Lefever --- .../featureflags/ReactNativeFeatureFlags.kt | 8 ++++++- .../ReactNativeFeatureFlagsCxxAccessor.kt | 12 +++++++++- .../ReactNativeFeatureFlagsCxxInterop.kt | 4 +++- .../ReactNativeFeatureFlagsDefaults.kt | 4 +++- .../ReactNativeFeatureFlagsLocalAccessor.kt | 13 +++++++++- .../ReactNativeFeatureFlagsProvider.kt | 4 +++- .../JReactNativeFeatureFlagsCxxInterop.cpp | 16 ++++++++++++- .../JReactNativeFeatureFlagsCxxInterop.h | 5 +++- .../featureflags/ReactNativeFeatureFlags.cpp | 6 ++++- .../featureflags/ReactNativeFeatureFlags.h | 7 +++++- .../ReactNativeFeatureFlagsAccessor.cpp | 24 ++++++++++++++++--- .../ReactNativeFeatureFlagsAccessor.h | 6 +++-- .../ReactNativeFeatureFlagsDefaults.h | 6 ++++- .../ReactNativeFeatureFlagsDynamicProvider.h | 11 ++++++++- .../ReactNativeFeatureFlagsProvider.h | 3 ++- .../NativeReactNativeFeatureFlags.cpp | 7 +++++- .../NativeReactNativeFeatureFlags.h | 4 +++- .../react/renderer/core/ShadowNode.cpp | 4 +++- .../ReactNativeFeatureFlags.config.js | 11 +++++++++ .../featureflags/ReactNativeFeatureFlags.js | 7 +++++- .../specs/NativeReactNativeFeatureFlags.js | 3 ++- 21 files changed, 142 insertions(+), 23 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt index 53c4bd6c186d09..ee33a8467aab94 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<3e10f8d2f623da3b7b502d8fa78f82a4>> + * @generated SignedSource<<99da5cf948e469e385bd70b4c59cd764>> */ /** @@ -286,6 +286,12 @@ public object ReactNativeFeatureFlags { @JvmStatic public fun useRuntimeShadowNodeReferenceUpdate(): Boolean = accessor.useRuntimeShadowNodeReferenceUpdate() + /** + * Use the state stored on the source shadow node when cloning it instead of reading in the most recent state on the shadow node family. + */ + @JvmStatic + public fun useShadowNodeStateOnClone(): Boolean = accessor.useShadowNodeStateOnClone() + /** * In Bridgeless mode, should legacy NativeModules use the TurboModule system? */ diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt index c25a7ad0a77d46..f16e6b88855156 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<497bbb23778fe0f9763e9bfa715ea3aa>> + * @generated SignedSource<<5e1d8c0e728715d4110b6d1d156357c5>> */ /** @@ -63,6 +63,7 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null private var useRawPropsJsiValueCache: Boolean? = null private var useRuntimeShadowNodeReferenceUpdateCache: Boolean? = null + private var useShadowNodeStateOnCloneCache: Boolean? = null private var useTurboModuleInteropCache: Boolean? = null private var useTurboModulesCache: Boolean? = null @@ -453,6 +454,15 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso return cached } + override fun useShadowNodeStateOnClone(): Boolean { + var cached = useShadowNodeStateOnCloneCache + if (cached == null) { + cached = ReactNativeFeatureFlagsCxxInterop.useShadowNodeStateOnClone() + useShadowNodeStateOnCloneCache = cached + } + return cached + } + override fun useTurboModuleInterop(): Boolean { var cached = useTurboModuleInteropCache if (cached == null) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt index 181c06d9c7cb03..cd57aa387902ea 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<> */ /** @@ -114,6 +114,8 @@ public object ReactNativeFeatureFlagsCxxInterop { @DoNotStrip @JvmStatic public external fun useRuntimeShadowNodeReferenceUpdate(): Boolean + @DoNotStrip @JvmStatic public external fun useShadowNodeStateOnClone(): Boolean + @DoNotStrip @JvmStatic public external fun useTurboModuleInterop(): Boolean @DoNotStrip @JvmStatic public external fun useTurboModules(): Boolean diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt index ca2265e22368bb..435c9394711599 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<5de2cfc00f486b7d07266939ce18a397>> + * @generated SignedSource<<11d93a900862ed8ce98f90f9af2de47b>> */ /** @@ -109,6 +109,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi override fun useRuntimeShadowNodeReferenceUpdate(): Boolean = true + override fun useShadowNodeStateOnClone(): Boolean = false + override fun useTurboModuleInterop(): Boolean = false override fun useTurboModules(): Boolean = false diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt index 0200670573d136..7c22c3bdd3d0dd 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<0614fa80cbc66806fa45aef70f34e2d7>> */ /** @@ -67,6 +67,7 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null private var useRawPropsJsiValueCache: Boolean? = null private var useRuntimeShadowNodeReferenceUpdateCache: Boolean? = null + private var useShadowNodeStateOnCloneCache: Boolean? = null private var useTurboModuleInteropCache: Boolean? = null private var useTurboModulesCache: Boolean? = null @@ -500,6 +501,16 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces return cached } + override fun useShadowNodeStateOnClone(): Boolean { + var cached = useShadowNodeStateOnCloneCache + if (cached == null) { + cached = currentProvider.useShadowNodeStateOnClone() + accessedFeatureFlags.add("useShadowNodeStateOnClone") + useShadowNodeStateOnCloneCache = cached + } + return cached + } + override fun useTurboModuleInterop(): Boolean { var cached = useTurboModuleInteropCache if (cached == null) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt index e3fb3270f52fce..31c4f90f10b730 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<3cd802bdd1d383ea0668e43319d53b3f>> + * @generated SignedSource<<5f4ff90382b2d69df401535cb33e64c5>> */ /** @@ -109,6 +109,8 @@ public interface ReactNativeFeatureFlagsProvider { @DoNotStrip public fun useRuntimeShadowNodeReferenceUpdate(): Boolean + @DoNotStrip public fun useShadowNodeStateOnClone(): Boolean + @DoNotStrip public fun useTurboModuleInterop(): Boolean @DoNotStrip public fun useTurboModules(): Boolean diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp index d3d0dc3ea1e040..1ede11bdd9ed6a 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<7c3853858da56eb5f471abccf9dcbf55>> + * @generated SignedSource<<28069af1f34c79e9907c85697a291c0e>> */ /** @@ -297,6 +297,12 @@ class ReactNativeFeatureFlagsProviderHolder return method(javaProvider_); } + bool useShadowNodeStateOnClone() override { + static const auto method = + getReactNativeFeatureFlagsProviderJavaClass()->getMethod("useShadowNodeStateOnClone"); + return method(javaProvider_); + } + bool useTurboModuleInterop() override { static const auto method = getReactNativeFeatureFlagsProviderJavaClass()->getMethod("useTurboModuleInterop"); @@ -528,6 +534,11 @@ bool JReactNativeFeatureFlagsCxxInterop::useRuntimeShadowNodeReferenceUpdate( return ReactNativeFeatureFlags::useRuntimeShadowNodeReferenceUpdate(); } +bool JReactNativeFeatureFlagsCxxInterop::useShadowNodeStateOnClone( + facebook::jni::alias_ref /*unused*/) { + return ReactNativeFeatureFlags::useShadowNodeStateOnClone(); +} + bool JReactNativeFeatureFlagsCxxInterop::useTurboModuleInterop( facebook::jni::alias_ref /*unused*/) { return ReactNativeFeatureFlags::useTurboModuleInterop(); @@ -698,6 +709,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() { makeNativeMethod( "useRuntimeShadowNodeReferenceUpdate", JReactNativeFeatureFlagsCxxInterop::useRuntimeShadowNodeReferenceUpdate), + makeNativeMethod( + "useShadowNodeStateOnClone", + JReactNativeFeatureFlagsCxxInterop::useShadowNodeStateOnClone), makeNativeMethod( "useTurboModuleInterop", JReactNativeFeatureFlagsCxxInterop::useTurboModuleInterop), diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h index 80ef331dff8352..665dd08e57343d 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<77b4ed5aa33290ba9da1719544e974cb>> + * @generated SignedSource<<763d595784bdf31a852ebf2a492a1393>> */ /** @@ -159,6 +159,9 @@ class JReactNativeFeatureFlagsCxxInterop static bool useRuntimeShadowNodeReferenceUpdate( facebook::jni::alias_ref); + static bool useShadowNodeStateOnClone( + facebook::jni::alias_ref); + static bool useTurboModuleInterop( facebook::jni::alias_ref); diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp index f71795970ae0c7..811d4fef5a177c 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<7d301656072183649246db8fa738fc4d>> + * @generated SignedSource<<511c1667fab247b77d771a7a26e87b46>> */ /** @@ -198,6 +198,10 @@ bool ReactNativeFeatureFlags::useRuntimeShadowNodeReferenceUpdate() { return getAccessor().useRuntimeShadowNodeReferenceUpdate(); } +bool ReactNativeFeatureFlags::useShadowNodeStateOnClone() { + return getAccessor().useShadowNodeStateOnClone(); +} + bool ReactNativeFeatureFlags::useTurboModuleInterop() { return getAccessor().useTurboModuleInterop(); } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h index 4d075604aa7da4..f082b18249f424 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<19cfd8b41dd429c83a5e0f0df514d1d1>> */ /** @@ -254,6 +254,11 @@ class ReactNativeFeatureFlags { */ RN_EXPORT static bool useRuntimeShadowNodeReferenceUpdate(); + /** + * Use the state stored on the source shadow node when cloning it instead of reading in the most recent state on the shadow node family. + */ + RN_EXPORT static bool useShadowNodeStateOnClone(); + /** * In Bridgeless mode, should legacy NativeModules use the TurboModule system? */ diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp index 4e528eff110880..c8ef7996747ccf 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<> */ /** @@ -803,6 +803,24 @@ bool ReactNativeFeatureFlagsAccessor::useRuntimeShadowNodeReferenceUpdate() { return flagValue.value(); } +bool ReactNativeFeatureFlagsAccessor::useShadowNodeStateOnClone() { + auto flagValue = useShadowNodeStateOnClone_.load(); + + if (!flagValue.has_value()) { + // This block is not exclusive but it is not necessary. + // If multiple threads try to initialize the feature flag, we would only + // be accessing the provider multiple times but the end state of this + // instance and the returned flag value would be the same. + + markFlagAsAccessed(43, "useShadowNodeStateOnClone"); + + flagValue = currentProvider_->useShadowNodeStateOnClone(); + useShadowNodeStateOnClone_ = flagValue; + } + + return flagValue.value(); +} + bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() { auto flagValue = useTurboModuleInterop_.load(); @@ -812,7 +830,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(43, "useTurboModuleInterop"); + markFlagAsAccessed(44, "useTurboModuleInterop"); flagValue = currentProvider_->useTurboModuleInterop(); useTurboModuleInterop_ = flagValue; @@ -830,7 +848,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModules() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(44, "useTurboModules"); + markFlagAsAccessed(45, "useTurboModules"); flagValue = currentProvider_->useTurboModules(); useTurboModules_ = flagValue; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h index ac0c3e53a1dbd7..1d453a762d518a 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<8eb2b5d6dd367826ff7bc899afbdea60>> + * @generated SignedSource<<2a6cbfd5de86a5bb840f1fc5f47c51a6>> */ /** @@ -75,6 +75,7 @@ class ReactNativeFeatureFlagsAccessor { bool useOptimizedEventBatchingOnAndroid(); bool useRawPropsJsiValue(); bool useRuntimeShadowNodeReferenceUpdate(); + bool useShadowNodeStateOnClone(); bool useTurboModuleInterop(); bool useTurboModules(); @@ -88,7 +89,7 @@ class ReactNativeFeatureFlagsAccessor { std::unique_ptr currentProvider_; bool wasOverridden_; - std::array, 45> accessedFeatureFlags_; + std::array, 46> accessedFeatureFlags_; std::atomic> commonTestFlag_; std::atomic> completeReactInstanceCreationOnBgThreadOnAndroid_; @@ -133,6 +134,7 @@ class ReactNativeFeatureFlagsAccessor { std::atomic> useOptimizedEventBatchingOnAndroid_; std::atomic> useRawPropsJsiValue_; std::atomic> useRuntimeShadowNodeReferenceUpdate_; + std::atomic> useShadowNodeStateOnClone_; std::atomic> useTurboModuleInterop_; std::atomic> useTurboModules_; }; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h index aec774f80d20dc..08f09fe37764e9 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<830cdd4b394262ee65abc63a54833674>> */ /** @@ -199,6 +199,10 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider { return true; } + bool useShadowNodeStateOnClone() override { + return false; + } + bool useTurboModuleInterop() override { return false; } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h index 5a6b8a82ae33f2..9e436f6ecd0b18 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<627094b444d8b7a513d7190272848a9e>> */ /** @@ -432,6 +432,15 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef return ReactNativeFeatureFlagsDefaults::useRuntimeShadowNodeReferenceUpdate(); } + bool useShadowNodeStateOnClone() override { + auto value = values_["useShadowNodeStateOnClone"]; + if (!value.isNull()) { + return value.getBool(); + } + + return ReactNativeFeatureFlagsDefaults::useShadowNodeStateOnClone(); + } + bool useTurboModuleInterop() override { auto value = values_["useTurboModuleInterop"]; if (!value.isNull()) { diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h index c89d65c0d88b54..e7f1ceaf8e6e67 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<36bfe0037e4dba3b6eb6e95075914fce>> + * @generated SignedSource<<190bad7388fb33884eebca0fed4ad61f>> */ /** @@ -68,6 +68,7 @@ class ReactNativeFeatureFlagsProvider { virtual bool useOptimizedEventBatchingOnAndroid() = 0; virtual bool useRawPropsJsiValue() = 0; virtual bool useRuntimeShadowNodeReferenceUpdate() = 0; + virtual bool useShadowNodeStateOnClone() = 0; virtual bool useTurboModuleInterop() = 0; virtual bool useTurboModules() = 0; }; diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp index f326fcd073b5f8..f2ea23f46d83f3 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<2911cd67b3a434c7d3610740befac4f9>> */ /** @@ -259,6 +259,11 @@ bool NativeReactNativeFeatureFlags::useRuntimeShadowNodeReferenceUpdate( return ReactNativeFeatureFlags::useRuntimeShadowNodeReferenceUpdate(); } +bool NativeReactNativeFeatureFlags::useShadowNodeStateOnClone( + jsi::Runtime& /*runtime*/) { + return ReactNativeFeatureFlags::useShadowNodeStateOnClone(); +} + bool NativeReactNativeFeatureFlags::useTurboModuleInterop( jsi::Runtime& /*runtime*/) { return ReactNativeFeatureFlags::useTurboModuleInterop(); diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h index 7f4364d355d522..e6260245a1e94e 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +++ b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<9df551425337f50b9bb8837684bbbba0>> */ /** @@ -123,6 +123,8 @@ class NativeReactNativeFeatureFlags bool useRuntimeShadowNodeReferenceUpdate(jsi::Runtime& runtime); + bool useShadowNodeStateOnClone(jsi::Runtime& runtime); + bool useTurboModuleInterop(jsi::Runtime& runtime); bool useTurboModules(jsi::Runtime& runtime); diff --git a/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.cpp b/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.cpp index 989b89d7af4363..690c3d16645074 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.cpp +++ b/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.cpp @@ -112,7 +112,9 @@ ShadowNode::ShadowNode( fragment.children ? fragment.children : sourceShadowNode.children_), state_( fragment.state ? fragment.state - : sourceShadowNode.getMostRecentState()), + : (ReactNativeFeatureFlags::useShadowNodeStateOnClone() + ? sourceShadowNode.state_ + : sourceShadowNode.getMostRecentState())), orderIndex_(sourceShadowNode.orderIndex_), family_(sourceShadowNode.family_), traits_(sourceShadowNode.traits_) { diff --git a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js index 744e112311a77e..5b28c10110c32f 100644 --- a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js +++ b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js @@ -458,6 +458,17 @@ const definitions: FeatureFlagDefinitions = { purpose: 'experimentation', }, }, + useShadowNodeStateOnClone: { + defaultValue: false, + metadata: { + dateAdded: '2025-04-16', + description: + 'Use the state stored on the source shadow node when cloning it instead of reading in the most recent state on the shadow node family.', + expectedReleaseValue: true, + purpose: 'experimentation', + }, + ossReleaseStage: 'none', + }, useTurboModuleInterop: { defaultValue: false, metadata: { diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js index cebed3c31eafc8..d958b2fa0e53b9 100644 --- a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<3037cf1c938dae492b656333cec9633c>> + * @generated SignedSource<<63601ec83ade8f3774d185ebacf4c792>> * @flow strict */ @@ -94,6 +94,7 @@ export type ReactNativeFeatureFlags = $ReadOnly<{ useOptimizedEventBatchingOnAndroid: Getter, useRawPropsJsiValue: Getter, useRuntimeShadowNodeReferenceUpdate: Getter, + useShadowNodeStateOnClone: Getter, useTurboModuleInterop: Getter, useTurboModules: Getter, }>; @@ -359,6 +360,10 @@ export const useRawPropsJsiValue: Getter = createNativeFlagGetter('useR * When enabled, cloning shadow nodes within react native will update the reference held by the current JS fiber tree. */ export const useRuntimeShadowNodeReferenceUpdate: Getter = createNativeFlagGetter('useRuntimeShadowNodeReferenceUpdate', true); +/** + * Use the state stored on the source shadow node when cloning it instead of reading in the most recent state on the shadow node family. + */ +export const useShadowNodeStateOnClone: Getter = createNativeFlagGetter('useShadowNodeStateOnClone', false); /** * In Bridgeless mode, should legacy NativeModules use the TurboModule system? */ diff --git a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js index f9f4a5bc187baf..03e8d13530798f 100644 --- a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<37e95652ef5d824bb05e78ebdb051e43>> + * @generated SignedSource<> * @flow strict */ @@ -67,6 +67,7 @@ export interface Spec extends TurboModule { +useOptimizedEventBatchingOnAndroid?: () => boolean; +useRawPropsJsiValue?: () => boolean; +useRuntimeShadowNodeReferenceUpdate?: () => boolean; + +useShadowNodeStateOnClone?: () => boolean; +useTurboModuleInterop?: () => boolean; +useTurboModules?: () => boolean; } From 7abaca9c72b5f2c7acbc4f46a1af22559f0d45ec Mon Sep 17 00:00:00 2001 From: Alex Hendrix Date: Tue, 20 May 2025 16:16:27 -0500 Subject: [PATCH 108/108] Set useShadowNodeStateOnClone by default to true --- .../internal/featureflags/ReactNativeFeatureFlagsDefaults.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt index 435c9394711599..6cdd06a7ec7fe8 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt @@ -109,7 +109,7 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi override fun useRuntimeShadowNodeReferenceUpdate(): Boolean = true - override fun useShadowNodeStateOnClone(): Boolean = false + override fun useShadowNodeStateOnClone(): Boolean = true override fun useTurboModuleInterop(): Boolean = false