diff --git a/__mocks__/react-native-haptic-feedback.ts b/__mocks__/react-native-haptic-feedback.ts new file mode 100644 index 000000000000..6d20b410d835 --- /dev/null +++ b/__mocks__/react-native-haptic-feedback.ts @@ -0,0 +1,5 @@ +import type HapticFeedback from 'react-native-haptic-feedback'; + +const RNHapticFeedback: typeof HapticFeedback = {trigger: jest.fn()}; + +export default RNHapticFeedback; diff --git a/ios/Podfile.lock b/ios/Podfile.lock index a801a7c4de1c..beac64acd083 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2451,7 +2451,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - RNReactNativeHapticFeedback (2.3.1): + - RNReactNativeHapticFeedback (2.3.3): - DoubleConversion - glog - hermes-engine @@ -3233,7 +3233,7 @@ SPEC CHECKSUMS: RNLocalize: d4b8af4e442d4bcca54e68fc687a2129b4d71a81 rnmapbox-maps: 460d6ff97ae49c7d5708c3212c6521697c36a0c4 RNPermissions: 0b1429b55af59d1d08b75a8be2459f65a8ac3f28 - RNReactNativeHapticFeedback: 31833c3ef341d716dbbd9d64e940f0c230db46f6 + RNReactNativeHapticFeedback: 73756a3477a5a622fa16862a3ab0d0fc5e5edff5 RNReanimated: 76901886830e1032f16bbf820153f7dc3f02d51d RNScreens: de6e57426ba0e6cbc3fb5b4f496e7f08cb2773c2 RNShare: bd4fe9b95d1ee89a200778cc0753ebe650154bb0 diff --git a/package-lock.json b/package-lock.json index d5672be4b484..c40f3f92a66f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -85,7 +85,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.3.1", + "react-native-haptic-feedback": "^2.3.3", "react-native-image-picker": "^7.0.3", "react-native-image-size": "git+https://github.com/Expensify/react-native-image-size#cb392140db4953a283590d7cf93b4d0461baa2a9", "react-native-key-command": "^1.0.8", @@ -34543,9 +34543,9 @@ } }, "node_modules/react-native-haptic-feedback": { - "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==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/react-native-haptic-feedback/-/react-native-haptic-feedback-2.3.3.tgz", + "integrity": "sha512-svS4D5PxfNv8o68m9ahWfwje5NqukM3qLS48+WTdhbDkNUkOhP9rDfDSRHzlhk4zq+ISjyw95EhLeh8NkKX5vQ==", "workspaces": [ "example" ], diff --git a/package.json b/package.json index 4965fb8f60e3..b0162b06073a 100644 --- a/package.json +++ b/package.json @@ -142,7 +142,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.3.1", + "react-native-haptic-feedback": "^2.3.3", "react-native-image-picker": "^7.0.3", "react-native-image-size": "git+https://github.com/Expensify/react-native-image-size#cb392140db4953a283590d7cf93b4d0461baa2a9", "react-native-key-command": "^1.0.8", diff --git a/patches/react-native-haptic-feedback+2.3.1.patch b/patches/react-native-haptic-feedback+2.3.1.patch deleted file mode 100644 index 799bdaf7e53e..000000000000 --- a/patches/react-native-haptic-feedback+2.3.1.patch +++ /dev/null @@ -1,56 +0,0 @@ -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..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 @@ - #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..9cec8e4 100644 ---- a/node_modules/react-native-haptic-feedback/package.json -+++ b/node_modules/react-native-haptic-feedback/package.json -@@ -6,18 +6,7 @@ - "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" -- } -- } -- }, -+ "types": "./lib/typescript/module/src/index.d.ts", - "scripts": { - "typecheck": "tsc --noEmit --project tsconfig.test.json", - "test": "jest",