From 29158fa2eee1e9bb4a249d6a8e4debea7a8d3596 Mon Sep 17 00:00:00 2001 From: Wojciech Lewicki Date: Mon, 2 Sep 2024 16:30:19 +0200 Subject: [PATCH 1/2] feat: bump haptic-feedback, remove old patch and add new one --- ios/Podfile.lock | 4 +- package-lock.json | 10 +++- package.json | 2 +- .../react-native-haptic-feedback+2.2.0.patch | 30 ---------- .../react-native-haptic-feedback+2.3.1.patch | 55 +++++++++++++++++++ 5 files changed, 65 insertions(+), 36 deletions(-) delete mode 100644 patches/react-native-haptic-feedback+2.2.0.patch create mode 100644 patches/react-native-haptic-feedback+2.3.1.patch diff --git a/ios/Podfile.lock b/ios/Podfile.lock index d688213fafb4..e89c21fbec0f 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2453,7 +2453,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - RNReactNativeHapticFeedback (2.2.0): + - RNReactNativeHapticFeedback (2.3.1): - DoubleConversion - glog - hermes-engine @@ -3239,7 +3239,7 @@ SPEC CHECKSUMS: RNLocalize: d4b8af4e442d4bcca54e68fc687a2129b4d71a81 rnmapbox-maps: 5ab6bfd249cd67262615153c648f8d809aab781c RNPermissions: 0b1429b55af59d1d08b75a8be2459f65a8ac3f28 - RNReactNativeHapticFeedback: a15b431d2903bc2eb3474ff8d9a05d3e67a70199 + RNReactNativeHapticFeedback: 31833c3ef341d716dbbd9d64e940f0c230db46f6 RNReanimated: 76901886830e1032f16bbf820153f7dc3f02d51d RNScreens: de6e57426ba0e6cbc3fb5b4f496e7f08cb2773c2 RNShare: a3c2fbbca5682530b65ff405b34c91dad1e22442 diff --git a/package-lock.json b/package-lock.json index a7c9fc4fb570..6d272bf140c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -94,7 +94,7 @@ "react-native-fs": "^2.20.0", "react-native-gesture-handler": "2.18.0", "react-native-google-places-autocomplete": "2.5.6", - "react-native-haptic-feedback": "^2.2.0", + "react-native-haptic-feedback": "^2.3.1", "react-native-image-picker": "^7.0.3", "react-native-image-size": "git+https://github.com/Expensify/react-native-image-size#93399c6410de32966eb57085936ef6951398c2c3", "react-native-key-command": "^1.0.8", @@ -37322,8 +37322,12 @@ } }, "node_modules/react-native-haptic-feedback": { - "version": "2.2.0", - "license": "MIT", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/react-native-haptic-feedback/-/react-native-haptic-feedback-2.3.1.tgz", + "integrity": "sha512-dPfjV4iVHfhVyfG+nRd88ygjahbdup7KFZDM5L2aNIAzqbNtKxHZn5O1pHegwSj1t15VJliu0GyTX7XpBDeXUw==", + "workspaces": [ + "example" + ], "peerDependencies": { "react-native": ">=0.60.0" } diff --git a/package.json b/package.json index 2945464ec907..1cfbabe438f0 100644 --- a/package.json +++ b/package.json @@ -151,7 +151,7 @@ "react-native-fs": "^2.20.0", "react-native-gesture-handler": "2.18.0", "react-native-google-places-autocomplete": "2.5.6", - "react-native-haptic-feedback": "^2.2.0", + "react-native-haptic-feedback": "^2.3.1", "react-native-image-picker": "^7.0.3", "react-native-image-size": "git+https://github.com/Expensify/react-native-image-size#93399c6410de32966eb57085936ef6951398c2c3", "react-native-key-command": "^1.0.8", diff --git a/patches/react-native-haptic-feedback+2.2.0.patch b/patches/react-native-haptic-feedback+2.2.0.patch deleted file mode 100644 index 4fb61b430869..000000000000 --- a/patches/react-native-haptic-feedback+2.2.0.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/node_modules/react-native-haptic-feedback/RNReactNativeHapticFeedback.podspec b/node_modules/react-native-haptic-feedback/RNReactNativeHapticFeedback.podspec -index e692f2d..9dedd9b 100644 ---- a/node_modules/react-native-haptic-feedback/RNReactNativeHapticFeedback.podspec -+++ b/node_modules/react-native-haptic-feedback/RNReactNativeHapticFeedback.podspec -@@ -17,24 +17,7 @@ Pod::Spec.new do |s| - s.source_files = "ios/**/*.{h,m,mm}" - s.requires_arc = true - -- s.dependency 'React-Core' -- -- # This guard prevent to install the dependencies when we run `pod install` in the old architecture. -- if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then -- folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32' -- -- s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1" -- s.pod_target_xcconfig = { -- "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"", -- "CLANG_CXX_LANGUAGE_STANDARD" => "c++17" -- } -- -- s.dependency "React-Codegen" -- s.dependency "RCT-Folly" -- s.dependency "RCTRequired" -- s.dependency "RCTTypeSafety" -- s.dependency "ReactCommon/turbomodule/core" -- end -+ install_modules_dependencies(s) - end - - diff --git a/patches/react-native-haptic-feedback+2.3.1.patch b/patches/react-native-haptic-feedback+2.3.1.patch new file mode 100644 index 000000000000..342b20863995 --- /dev/null +++ b/patches/react-native-haptic-feedback+2.3.1.patch @@ -0,0 +1,55 @@ +diff --git a/node_modules/react-native-haptic-feedback/ios/RNHapticFeedback/RNHapticFeedback.h b/node_modules/react-native-haptic-feedback/ios/RNHapticFeedback/RNHapticFeedback.h +index c1498b9..1a3afb7 100644 +--- a/node_modules/react-native-haptic-feedback/ios/RNHapticFeedback/RNHapticFeedback.h ++++ b/node_modules/react-native-haptic-feedback/ios/RNHapticFeedback/RNHapticFeedback.h +@@ -1,5 +1,5 @@ + #ifdef RCT_NEW_ARCH_ENABLED +-#import "RNHapticFeedbackSpec.h" ++#import + + @interface RNHapticFeedback : NSObject + #else +diff --git a/node_modules/react-native-haptic-feedback/ios/RNHapticFeedback/RNHapticFeedbackSpec.h b/node_modules/react-native-haptic-feedback/ios/RNHapticFeedback/RNHapticFeedbackSpec.h +deleted file mode 100644 +index 6f0f81d..0000000 +--- a/node_modules/react-native-haptic-feedback/ios/RNHapticFeedback/RNHapticFeedbackSpec.h ++++ /dev/null +@@ -1,15 +0,0 @@ +-// +-// RNHapticFeedbackSpec.h +-// RNHapticFeedback +-// +-// Created by Michael Kuczera on 05.08.24. +-// Copyright © 2024 Facebook. All rights reserved. +-// +-#import +- +-@protocol NativeHapticFeedbackSpec +- +-// Indicates whether the device supports haptic feedback +-- (Boolean)supportsHaptic; +- +-@end +diff --git a/node_modules/react-native-haptic-feedback/package.json b/node_modules/react-native-haptic-feedback/package.json +index 86dfaa4..b6d4d97 100644 +--- a/node_modules/react-native-haptic-feedback/package.json ++++ b/node_modules/react-native-haptic-feedback/package.json +@@ -6,18 +6,6 @@ + "source": "src/index.ts", + "main": "./lib/commonjs/index.js", + "module": "./lib/module/index.js", +- "exports": { +- ".": { +- "import": { +- "types": "./lib/typescript/module/src/index.d.ts", +- "default": "./lib/module/index.js" +- }, +- "require": { +- "types": "./lib/typescript/commonjs/src/index.d.ts", +- "default": "./lib/commonjs/index.js" +- } +- } +- }, + "scripts": { + "typecheck": "tsc --noEmit --project tsconfig.test.json", + "test": "jest", From 476daa9880928cf514c3b6c302ee6ce8e2059159 Mon Sep 17 00:00:00 2001 From: Jakub Piasecki Date: Mon, 16 Sep 2024 15:55:34 +0200 Subject: [PATCH 2/2] Update patch --- patches/react-native-haptic-feedback+2.3.1.patch | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/patches/react-native-haptic-feedback+2.3.1.patch b/patches/react-native-haptic-feedback+2.3.1.patch index 342b20863995..799bdaf7e53e 100644 --- a/patches/react-native-haptic-feedback+2.3.1.patch +++ b/patches/react-native-haptic-feedback+2.3.1.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/react-native-haptic-feedback/ios/RNHapticFeedback/RNHapticFeedback.h b/node_modules/react-native-haptic-feedback/ios/RNHapticFeedback/RNHapticFeedback.h -index c1498b9..1a3afb7 100644 +index c1498b9..250df1f 100644 --- a/node_modules/react-native-haptic-feedback/ios/RNHapticFeedback/RNHapticFeedback.h +++ b/node_modules/react-native-haptic-feedback/ios/RNHapticFeedback/RNHapticFeedback.h @@ -1,5 +1,5 @@ @@ -31,10 +31,10 @@ index 6f0f81d..0000000 - -@end diff --git a/node_modules/react-native-haptic-feedback/package.json b/node_modules/react-native-haptic-feedback/package.json -index 86dfaa4..b6d4d97 100644 +index 86dfaa4..9cec8e4 100644 --- a/node_modules/react-native-haptic-feedback/package.json +++ b/node_modules/react-native-haptic-feedback/package.json -@@ -6,18 +6,6 @@ +@@ -6,18 +6,7 @@ "source": "src/index.ts", "main": "./lib/commonjs/index.js", "module": "./lib/module/index.js", @@ -50,6 +50,7 @@ index 86dfaa4..b6d4d97 100644 - } - } - }, ++ "types": "./lib/typescript/module/src/index.d.ts", "scripts": { "typecheck": "tsc --noEmit --project tsconfig.test.json", "test": "jest",