Skip to content

Commit be16913

Browse files
committed
test(macos): upstream has a fix for the logbox now
- integrating upstream fix via patch-package - can drop that patch hunk likely with react-native-macos 0.77.1
1 parent 082a1e4 commit be16913

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

tests/app.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@ import { StyleSheet, View, StatusBar, AppRegistry, LogBox } from 'react-native';
2121

2222
import { JetProvider, ConnectionText, StatusEmoji, StatusText } from 'jet';
2323

24-
// react-native-macos 0.77.0 - pops an empty, non-dismissable logbox
25-
// logged as https://github.com/microsoft/react-native-macos/issues/2376
26-
if (Platform.other) {
27-
// ...unless you ignore all logs in logbox
28-
LogBox.ignoreAllLogs();
29-
}
30-
3124
const platformSupportedModules = [];
3225

3326
if (Platform.other) {

tests/patches/react-native-macos+0.77.0.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,16 @@ index f4c5ed3..7628f81 100644
2626
}
2727
if (part instanceof Blob) {
2828
return {
29+
diff --git a/node_modules/react-native-macos/Libraries/Utilities/Platform.macos.js b/node_modules/react-native-macos/Libraries/Utilities/Platform.macos.js
30+
index 3b1e7cd..e5a1274 100644
31+
--- a/node_modules/react-native-macos/Libraries/Utilities/Platform.macos.js
32+
+++ b/node_modules/react-native-macos/Libraries/Utilities/Platform.macos.js
33+
@@ -84,7 +84,7 @@ const Platform: PlatformType = {
34+
},
35+
select: <T>(spec: PlatformSelectSpec<T>): T =>
36+
// $FlowFixMe[incompatible-return]
37+
- 'ios' in spec ? spec.macos : 'native' in spec ? spec.native : spec.default,
38+
+ 'macos' in spec ? spec.macos : 'native' in spec ? spec.native : spec.default,
39+
};
40+
41+
module.exports = Platform;

0 commit comments

Comments
 (0)