From 94c1f4968d7a09e04389b25a17f0125ffc375db3 Mon Sep 17 00:00:00 2001 From: dan Date: Fri, 14 Jun 2024 19:01:31 +0200 Subject: Resolve patch-package warnings (#4520) --- patches/expo-haptics+12.8.1.patch | 13 ------------- patches/expo-haptics+13.0.1.patch | 13 +++++++++++++ patches/expo-updates+0.25.11.patch | 26 -------------------------- patches/expo-updates+0.25.14.patch | 26 ++++++++++++++++++++++++++ 4 files changed, 39 insertions(+), 39 deletions(-) delete mode 100644 patches/expo-haptics+12.8.1.patch create mode 100644 patches/expo-haptics+13.0.1.patch delete mode 100644 patches/expo-updates+0.25.11.patch create mode 100644 patches/expo-updates+0.25.14.patch (limited to 'patches') diff --git a/patches/expo-haptics+12.8.1.patch b/patches/expo-haptics+12.8.1.patch deleted file mode 100644 index a95b56f3b..000000000 --- a/patches/expo-haptics+12.8.1.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/node_modules/expo-haptics/android/src/main/java/expo/modules/haptics/HapticsModule.kt b/node_modules/expo-haptics/android/src/main/java/expo/modules/haptics/HapticsModule.kt -index 26c52af..b949a4c 100644 ---- a/node_modules/expo-haptics/android/src/main/java/expo/modules/haptics/HapticsModule.kt -+++ b/node_modules/expo-haptics/android/src/main/java/expo/modules/haptics/HapticsModule.kt -@@ -42,7 +42,7 @@ class HapticsModule : Module() { - - private fun vibrate(type: HapticsVibrationType) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { -- vibrator.vibrate(VibrationEffect.createWaveform(type.timings, type.amplitudes, -1)) -+ vibrator.vibrate(VibrationEffect.createWaveform(type.oldSDKPattern, intArrayOf(0, 100), -1)) - } else { - @Suppress("DEPRECATION") - vibrator.vibrate(type.oldSDKPattern, -1) diff --git a/patches/expo-haptics+13.0.1.patch b/patches/expo-haptics+13.0.1.patch new file mode 100644 index 000000000..9c7b9a666 --- /dev/null +++ b/patches/expo-haptics+13.0.1.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/expo-haptics/android/src/main/java/expo/modules/haptics/HapticsModule.kt b/node_modules/expo-haptics/android/src/main/java/expo/modules/haptics/HapticsModule.kt +index 1520465..6ea988a 100644 +--- a/node_modules/expo-haptics/android/src/main/java/expo/modules/haptics/HapticsModule.kt ++++ b/node_modules/expo-haptics/android/src/main/java/expo/modules/haptics/HapticsModule.kt +@@ -42,7 +42,7 @@ class HapticsModule : Module() { + + private fun vibrate(type: HapticsVibrationType) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { +- vibrator.vibrate(VibrationEffect.createWaveform(type.timings, type.amplitudes, -1)) ++ vibrator.vibrate(VibrationEffect.createWaveform(type.oldSDKPattern, intArrayOf(0, 100), -1)) + } else { + @Suppress("DEPRECATION") + vibrator.vibrate(type.oldSDKPattern, -1) diff --git a/patches/expo-updates+0.25.11.patch b/patches/expo-updates+0.25.11.patch deleted file mode 100644 index 5f9eceef4..000000000 --- a/patches/expo-updates+0.25.11.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/node_modules/expo-updates/ios/EXUpdates/Update/ExpoUpdatesUpdate.swift b/node_modules/expo-updates/ios/EXUpdates/Update/ExpoUpdatesUpdate.swift -index b85291e..07a5d3c 100644 ---- a/node_modules/expo-updates/ios/EXUpdates/Update/ExpoUpdatesUpdate.swift -+++ b/node_modules/expo-updates/ios/EXUpdates/Update/ExpoUpdatesUpdate.swift -@@ -78,13 +78,20 @@ public final class ExpoUpdatesUpdate: Update { - status = UpdateStatus.StatusPending - } - -+ // Instead of relying on various hacks to get the correct format for the specific -+ // platform on the backend, we can just add this little patch.. -+ let dateFormatter = DateFormatter() -+ dateFormatter.locale = Locale(identifier: "en_US_POSIX") -+ dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZ" -+ let date = dateFormatter.date(from:commitTime) ?? RCTConvert.nsDate(commitTime)! -+ - return Update( - manifest: manifest, - config: config, - database: database, - updateId: uuid, - scopeKey: config.scopeKey, -- commitTime: RCTConvert.nsDate(commitTime), -+ commitTime: date, - runtimeVersion: runtimeVersion, - keep: true, - status: status, diff --git a/patches/expo-updates+0.25.14.patch b/patches/expo-updates+0.25.14.patch new file mode 100644 index 000000000..6fc4fc5fc --- /dev/null +++ b/patches/expo-updates+0.25.14.patch @@ -0,0 +1,26 @@ +diff --git a/node_modules/expo-updates/ios/EXUpdates/Update/ExpoUpdatesUpdate.swift b/node_modules/expo-updates/ios/EXUpdates/Update/ExpoUpdatesUpdate.swift +index b85291e..546709d 100644 +--- a/node_modules/expo-updates/ios/EXUpdates/Update/ExpoUpdatesUpdate.swift ++++ b/node_modules/expo-updates/ios/EXUpdates/Update/ExpoUpdatesUpdate.swift +@@ -78,13 +78,20 @@ public final class ExpoUpdatesUpdate: Update { + status = UpdateStatus.StatusPending + } + ++ // Instead of relying on various hacks to get the correct format for the specific ++ // platform on the backend, we can just add this little patch.. ++ let dateFormatter = DateFormatter() ++ dateFormatter.locale = Locale(identifier: "en_US_POSIX") ++ dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZ" ++ let date = dateFormatter.date(from:commitTime) ?? RCTConvert.nsDate(commitTime)! ++ + return Update( + manifest: manifest, + config: config, + database: database, + updateId: uuid, + scopeKey: config.scopeKey, +- commitTime: RCTConvert.nsDate(commitTime), ++ commitTime: date, + runtimeVersion: runtimeVersion, + keep: true, + status: status, -- cgit 1.4.1