diff --git a/modules/ContactsNitroModule/nitrogen/generated/ios/ContactsModule+autolinking.rb b/modules/ContactsNitroModule/nitrogen/generated/ios/ContactsModule+autolinking.rb index 35bc19c47bf7..2b12fb674feb 100644 --- a/modules/ContactsNitroModule/nitrogen/generated/ios/ContactsModule+autolinking.rb +++ b/modules/ContactsNitroModule/nitrogen/generated/ios/ContactsModule+autolinking.rb @@ -54,5 +54,6 @@ def add_nitrogen_files(spec) "SWIFT_OBJC_INTEROP_MODE" => "objcxx", # Enables stricter modular headers "DEFINES_MODULE" => "YES", + "GCC_PREPROCESSOR_DEFINITIONS" => "$(inherited) FOLLY_NO_CONFIG FOLLY_CFG_NO_COROUTINES", }) end diff --git a/modules/ContactsNitroModule/package.json b/modules/ContactsNitroModule/package.json index 6f70882a2193..92343a44f9ee 100644 --- a/modules/ContactsNitroModule/package.json +++ b/modules/ContactsNitroModule/package.json @@ -50,9 +50,9 @@ "registry": "https://registry.npmjs.org/" }, "devDependencies": { - "@react-native/eslint-config": "^0.75.2", - "@types/jest": "^29.5.12", - "@types/react": "^18.3.4", + "@react-native/eslint-config": "0.76.3", + "@types/jest": "^29.5.2", + "@types/react": "^18.2.6", "del-cli": "^5.1.0", "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", @@ -60,7 +60,7 @@ "nitro-codegen": "0.18.1", "prettier": "^3.3.3", "react": "^18.3.1", - "react-native": "0.75.2", + "react-native": "0.76.3", "react-native-nitro-modules": "*", "typescript": "^5.5.4" }, diff --git a/package-lock.json b/package-lock.json index 9555a28c86bd..85f2939aec9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -293,9 +293,9 @@ "hasInstallScript": true, "license": "MIT", "devDependencies": { - "@react-native/eslint-config": "^0.75.2", - "@types/jest": "^29.5.12", - "@types/react": "^18.3.4", + "@react-native/eslint-config": "0.76.3", + "@types/jest": "^29.5.2", + "@types/react": "^18.2.6", "del-cli": "^5.1.0", "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", @@ -303,7 +303,7 @@ "nitro-codegen": "0.18.1", "prettier": "^3.3.3", "react": "^18.3.1", - "react-native": "0.75.2", + "react-native": "0.76.3", "react-native-nitro-modules": "*", "typescript": "^5.5.4" }, @@ -312,6 +312,58 @@ "react-native": "*" } }, + "modules/ContactsNitroModule/node_modules/@react-native/eslint-config": { + "version": "0.76.3", + "resolved": "https://registry.npmjs.org/@react-native/eslint-config/-/eslint-config-0.76.3.tgz", + "integrity": "sha512-TmZ1M6Aw1vnhB9LA0zFx7yq/lQYSWNPpq5fS1jFzz99XemFB92lI9vhqzwRun1VmztTs4Cv1kcJa51xYFRPh2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.25.2", + "@babel/eslint-parser": "^7.25.1", + "@react-native/eslint-plugin": "0.76.3", + "@typescript-eslint/eslint-plugin": "^7.1.1", + "@typescript-eslint/parser": "^7.1.1", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-eslint-comments": "^3.2.0", + "eslint-plugin-ft-flow": "^2.0.1", + "eslint-plugin-jest": "^27.9.0", + "eslint-plugin-react": "^7.30.1", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-react-native": "^4.0.0", + "hermes-eslint": "^0.23.1" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "eslint": ">=8", + "prettier": ">=2" + } + }, + "modules/ContactsNitroModule/node_modules/@react-native/eslint-config/node_modules/eslint-config-prettier": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", + "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", + "dev": true, + "license": "MIT", + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "modules/ContactsNitroModule/node_modules/@react-native/eslint-plugin": { + "version": "0.76.3", + "resolved": "https://registry.npmjs.org/@react-native/eslint-plugin/-/eslint-plugin-0.76.3.tgz", + "integrity": "sha512-aHs61SGO61K/ULI6jUjrIajeYAz3thh0VT2r/cFsgOxeXgr8j98mqr6+beGlHo4BET0TC7u6+p+fxQNGoI9blg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "modules/ContactsNitroModule/node_modules/@types/jest": { "version": "29.5.14", "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz", @@ -334,6 +386,32 @@ "csstype": "^3.0.2" } }, + "modules/ContactsNitroModule/node_modules/eslint-plugin-jest": { + "version": "27.9.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz", + "integrity": "sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/utils": "^5.10.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^5.0.0 || ^6.0.0 || ^7.0.0", + "eslint": "^7.0.0 || ^8.0.0", + "jest": "*" + }, + "peerDependenciesMeta": { + "@typescript-eslint/eslint-plugin": { + "optional": true + }, + "jest": { + "optional": true + } + } + }, "modules/ContactsNitroModule/node_modules/eslint-plugin-prettier": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz", @@ -9660,83 +9738,6 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "license": "MIT" }, - "node_modules/@react-native/eslint-config": { - "version": "0.75.4", - "resolved": "https://registry.npmjs.org/@react-native/eslint-config/-/eslint-config-0.75.4.tgz", - "integrity": "sha512-3KBHYwp4HnBdaCFx9KDPvQY+sGrv5fHX2qDkXGKmN3uYBz+zfnMQXTiht6OuBbWULUF0y0o8m+uH1yYAn/V9mw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.20.0", - "@babel/eslint-parser": "^7.20.0", - "@react-native/eslint-plugin": "0.75.4", - "@typescript-eslint/eslint-plugin": "^7.1.1", - "@typescript-eslint/parser": "^7.1.1", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-ft-flow": "^2.0.1", - "eslint-plugin-jest": "^27.9.0", - "eslint-plugin-react": "^7.30.1", - "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-react-native": "^4.0.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "eslint": ">=8", - "prettier": ">=2" - } - }, - "node_modules/@react-native/eslint-config/node_modules/eslint-config-prettier": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", - "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", - "dev": true, - "license": "MIT", - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "node_modules/@react-native/eslint-config/node_modules/eslint-plugin-jest": { - "version": "27.9.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz", - "integrity": "sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/utils": "^5.10.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^5.0.0 || ^6.0.0 || ^7.0.0", - "eslint": "^7.0.0 || ^8.0.0", - "jest": "*" - }, - "peerDependenciesMeta": { - "@typescript-eslint/eslint-plugin": { - "optional": true - }, - "jest": { - "optional": true - } - } - }, - "node_modules/@react-native/eslint-plugin": { - "version": "0.75.4", - "resolved": "https://registry.npmjs.org/@react-native/eslint-plugin/-/eslint-plugin-0.75.4.tgz", - "integrity": "sha512-1kEZzC8UKi3baHnH7tBVCNpF4aoAmT7g7hEa5/rtZ+Z7vcpaxeY6wjNYt3j02Z9n310yX0NKDJox30CqvzEvsg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, "node_modules/@react-native/gradle-plugin": { "version": "0.76.3", "resolved": "https://registry.npmjs.org/@react-native/gradle-plugin/-/gradle-plugin-0.76.3.tgz", @@ -24086,6 +24087,18 @@ "he": "bin/he" } }, + "node_modules/hermes-eslint": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/hermes-eslint/-/hermes-eslint-0.23.1.tgz", + "integrity": "sha512-DaEpbJobK1KwpTSXrPIKkHs2h+B+RTw2F1g9S70tjtJ14a3zM+2gPVUtc8xyffQqRJ6tPfs+/zRKwV17lwDvqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "esrecurse": "^4.3.0", + "hermes-estree": "0.23.1", + "hermes-parser": "0.23.1" + } + }, "node_modules/hermes-estree": { "version": "0.23.1", "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.23.1.tgz", @@ -29212,11 +29225,6 @@ "map-or-similar": "^1.5.0" } }, - "node_modules/memory-cache": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/memory-cache/-/memory-cache-0.2.0.tgz", - "integrity": "sha512-OcjA+jzjOYzKmKS6IQVALHLVz+rNTMPoJvCztFaZxwG14wtAW7VRZjwTQu06vKCYOxh4jVnik7ya0SXTB0W+xA==" - }, "node_modules/meow": { "version": "10.1.5", "resolved": "https://registry.npmjs.org/meow/-/meow-10.1.5.tgz", @@ -37638,11 +37646,6 @@ "node": ">=10.12.0" } }, - "node_modules/valid-url": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/valid-url/-/valid-url-1.0.9.tgz", - "integrity": "sha512-QQDsV8OnSf5Uc30CKSwG9lnhMPe6exHtTXLRYX8uMwKENy640pU+2BgBL0LRbDh/eYRahNCS7aewCx0wf3NYVA==" - }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", diff --git a/patches/react-native+0.75.2+026+fix-dropping-mutations-in-transactions.patch b/patches/react-native+0.75.2+026+fix-dropping-mutations-in-transactions.patch deleted file mode 100644 index 974a0d090fb9..000000000000 --- a/patches/react-native+0.75.2+026+fix-dropping-mutations-in-transactions.patch +++ /dev/null @@ -1,67 +0,0 @@ -diff --git a/node_modules/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.cpp b/node_modules/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.cpp -index 572fb3d..0efa1ed 100644 ---- a/node_modules/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.cpp -+++ b/node_modules/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.cpp -@@ -468,7 +468,7 @@ void Binding::schedulerDidFinishTransaction( - mountingTransaction->getSurfaceId(); - }); - -- if (pendingTransaction != pendingTransactions_.end()) { -+ if (pendingTransaction != pendingTransactions_.end() && pendingTransaction->canMergeWith(*mountingTransaction)) { - pendingTransaction->mergeWith(std::move(*mountingTransaction)); - } else { - pendingTransactions_.push_back(std::move(*mountingTransaction)); -diff --git a/node_modules/react-native/ReactCommon/react/renderer/mounting/MountingTransaction.cpp b/node_modules/react-native/ReactCommon/react/renderer/mounting/MountingTransaction.cpp -index d7dd1bc..d95d779 100644 ---- a/node_modules/react-native/ReactCommon/react/renderer/mounting/MountingTransaction.cpp -+++ b/node_modules/react-native/ReactCommon/react/renderer/mounting/MountingTransaction.cpp -@@ -5,6 +5,8 @@ - * LICENSE file in the root directory of this source tree. - */ - -+#include -+ - #include "MountingTransaction.h" - - namespace facebook::react { -@@ -54,4 +56,21 @@ void MountingTransaction::mergeWith(MountingTransaction&& transaction) { - telemetry_ = std::move(transaction.telemetry_); - } - -+bool MountingTransaction::canMergeWith(MountingTransaction& transaction) { -+ std::set deletedTags; -+ for (const auto& mutation : mutations_) { -+ if (mutation.type == ShadowViewMutation::Type::Delete) { -+ deletedTags.insert(mutation.oldChildShadowView.tag); -+ } -+ } -+ -+ for (const auto& mutation : transaction.getMutations()) { -+ if (mutation.type == ShadowViewMutation::Type::Create && deletedTags.contains(mutation.newChildShadowView.tag)) { -+ return false; -+ } -+ } -+ -+ return true; -+} -+ - } // namespace facebook::react -diff --git a/node_modules/react-native/ReactCommon/react/renderer/mounting/MountingTransaction.h b/node_modules/react-native/ReactCommon/react/renderer/mounting/MountingTransaction.h -index 277e9f4..38629db 100644 ---- a/node_modules/react-native/ReactCommon/react/renderer/mounting/MountingTransaction.h -+++ b/node_modules/react-native/ReactCommon/react/renderer/mounting/MountingTransaction.h -@@ -85,6 +85,14 @@ class MountingTransaction final { - */ - void mergeWith(MountingTransaction&& transaction); - -+ /* -+ * Checks whether the two transactions can be safely merged. Due to -+ * reordering of mutations during mount, the sequence of -+ * REMOVE -> DELETE | CREATE -> INSERT (2 transactions) may get changed to -+ * INSERT -> REMOVE -> DELETE and the state will diverge from there. -+ */ -+ bool canMergeWith(MountingTransaction& transaction); -+ - private: - SurfaceId surfaceId_; - Number number_;