Skip to content

Commit

Permalink
test(macos): upstream has a fix for the logbox now
Browse files Browse the repository at this point in the history
- integrating upstream fix via patch-package
- can drop that patch hunk likely with react-native-macos 0.77.1
  • Loading branch information
mikehardy committed Feb 24, 2025
1 parent 082a1e4 commit be16913
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
7 changes: 0 additions & 7 deletions tests/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ import { StyleSheet, View, StatusBar, AppRegistry, LogBox } from 'react-native';

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

// react-native-macos 0.77.0 - pops an empty, non-dismissable logbox
// logged as https://github.com/microsoft/react-native-macos/issues/2376
if (Platform.other) {
// ...unless you ignore all logs in logbox
LogBox.ignoreAllLogs();
}

const platformSupportedModules = [];

if (Platform.other) {
Expand Down
13 changes: 13 additions & 0 deletions tests/patches/react-native-macos+0.77.0.patch
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,16 @@ index f4c5ed3..7628f81 100644
}
if (part instanceof Blob) {
return {
diff --git a/node_modules/react-native-macos/Libraries/Utilities/Platform.macos.js b/node_modules/react-native-macos/Libraries/Utilities/Platform.macos.js
index 3b1e7cd..e5a1274 100644
--- a/node_modules/react-native-macos/Libraries/Utilities/Platform.macos.js
+++ b/node_modules/react-native-macos/Libraries/Utilities/Platform.macos.js
@@ -84,7 +84,7 @@ const Platform: PlatformType = {
},
select: <T>(spec: PlatformSelectSpec<T>): T =>
// $FlowFixMe[incompatible-return]
- 'ios' in spec ? spec.macos : 'native' in spec ? spec.native : spec.default,
+ 'macos' in spec ? spec.macos : 'native' in spec ? spec.native : spec.default,
};

module.exports = Platform;

0 comments on commit be16913

Please sign in to comment.