-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Expo 52 #202
Merged
Merged
Support Expo 52 #202
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
8f0cb12
chore: :arrow_up: upgrade dependencies using expo install --fix
gingerbenw 590623a
chore: :bookmark: update latest supported expo sdk version
gingerbenw e456fe4
update react-native version in test app
gingerbenw a7c7eb5
update buildkite pipeline
gingerbenw 67fefdb
update @react-native-community/netinfo
gingerbenw 0ffd670
update expo-constants
gingerbenw b5bb705
update iOS versions for testing
gingerbenw 7819147
test against iOS 16 (switch to 15 in a future PR)
gingerbenw 7eee894
add android 15 to e2e tests
gingerbenw b24a535
test: :white_check_mark: enable new arch in test fixture
gingerbenw 0812721
call createErrorBoundary for lazy loading
gingerbenw 28195f9
update error boundary test
gingerbenw 4854351
update react-native
gingerbenw d02352a
add id to view
gingerbenw a536328
docs: :memo: update example app to expo 52
gingerbenw 031a778
remove unused scripts
gingerbenw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files | ||
|
||
# dependencies | ||
node_modules/ | ||
|
||
# Expo | ||
.expo/ | ||
dist/ | ||
web-build/ | ||
expo-env.d.ts | ||
|
||
# Native | ||
*.orig.* | ||
*.jks | ||
*.p8 | ||
*.p12 | ||
*.key | ||
*.mobileprovision | ||
|
||
# Metro | ||
.metro-health-check* | ||
|
||
# debug | ||
npm-debug.* | ||
yarn-debug.* | ||
yarn-error.* | ||
|
||
# macOS | ||
.DS_Store | ||
*.pem | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
|
||
app-example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import Bugsnag from "@bugsnag/expo"; | ||
import React from "react"; | ||
import { StyleSheet, Text, View } from "react-native"; | ||
import Controls from "./components/Controls"; | ||
import ErrorView from "./components/ErrorView"; | ||
|
||
Bugsnag.start(); | ||
|
||
// Create the error boundary... | ||
const ErrorBoundary = Bugsnag.getPlugin('react').createErrorBoundary(React); | ||
|
||
const onError = (event: any) => { | ||
// callback will only run for errors caught by boundary | ||
} | ||
|
||
export default function Index() { | ||
return ( | ||
<ErrorBoundary FallbackComponent={ErrorView} onError={onError}> | ||
<View style={styles.screenContainer}> | ||
<Text>Expo example app</Text> | ||
<Controls /> | ||
</View> | ||
</ErrorBoundary> | ||
) | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
screenContainer: { | ||
flex: 1, | ||
justifyContent: "center", | ||
alignItems: "center" | ||
} | ||
}); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"expo": { | ||
"name": "expo-example-52", | ||
"slug": "expo-example-52", | ||
"version": "1.0.0", | ||
"newArchEnabled": true, | ||
"platforms": [ | ||
"ios", | ||
"android" | ||
], | ||
"extra": { | ||
"bugsnag": { | ||
"apiKey": "API_KEY" | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'; | ||
|
||
interface Props { | ||
onPress: () => void | ||
title: string | ||
} | ||
|
||
const Button: React.FunctionComponent<Props> = ({ onPress, title }) => ( | ||
<View style={styles.buttonContainer}> | ||
<TouchableOpacity style={styles.button} onPress={onPress} > | ||
<Text style={styles.text}>{title}</Text> | ||
</TouchableOpacity> | ||
</View> | ||
); | ||
|
||
export default Button | ||
|
||
const styles = StyleSheet.create({ | ||
button: { | ||
backgroundColor: '#003366', | ||
borderRadius: 4, | ||
paddingVertical: 10, | ||
paddingHorizontal: 25, | ||
}, | ||
text: { | ||
fontSize: 16, | ||
lineHeight: 21, | ||
letterSpacing: 0.25, | ||
color: 'white', | ||
}, | ||
buttonContainer: { | ||
paddingVertical: 10, | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import Bugsnag from '@bugsnag/expo'; | ||
import React from 'react'; | ||
import { View } from 'react-native'; | ||
import Button from './Button'; | ||
|
||
function unhandledError() { | ||
throw new Error('Unhandled error!'); | ||
} | ||
|
||
function handledError() { | ||
Bugsnag.notify(new Error('Handled error!')); | ||
} | ||
|
||
const Controls = () => { | ||
const [yeah, setYeah] = React.useState(false); | ||
|
||
const triggerRenderError = () => { | ||
setYeah(true) | ||
} | ||
|
||
return ( | ||
<View> | ||
<Button onPress={handledError} title='Handled error' /> | ||
<Button onPress={unhandledError} title='Unhandled error' /> | ||
<Button onPress={triggerRenderError} title='Render error' /> | ||
{/* @ts-expect-error This will throw an error because the property doesn't exist */} | ||
{yeah ? <span>{yeah.non.existent.property}</span> : null} | ||
</View> | ||
) | ||
} | ||
|
||
export default Controls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Button, StyleSheet, Text, View } from 'react-native'; | ||
|
||
interface Props { | ||
clearError: () => void | ||
} | ||
|
||
const ErrorView: React.FunctionComponent<Props> = ({ clearError }) => ( | ||
<View style={styles.screenContainer}> | ||
<Text>Inform users of an error in the component tree. | ||
Use clearError to reset ErrorBoundary state and re-render child tree.</Text> | ||
<Button onPress={clearError} title='Reset' /> | ||
</View> | ||
); | ||
|
||
export default ErrorView | ||
|
||
const styles = StyleSheet.create({ | ||
screenContainer: { | ||
flex: 1, | ||
justifyContent: 'center', | ||
alignItems: 'center' | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "expo-52", | ||
"version": "1.0.0", | ||
"private": true, | ||
"scripts": { | ||
"start": "expo start", | ||
"android": "expo start --android", | ||
"ios": "expo start --ios" | ||
}, | ||
"dependencies": { | ||
"@bugsnag/expo": "^52.0.0", | ||
"expo": "~52.0.11", | ||
"react": "18.3.1", | ||
"react-dom": "18.3.1", | ||
"react-native": "0.76.3" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.19.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"extends": "expo/tsconfig.base", | ||
"compilerOptions": { | ||
"strict": true, | ||
"paths": { | ||
"@/*": [ | ||
"./*" | ||
] | ||
} | ||
}, | ||
"include": [ | ||
"**/*.ts", | ||
"**/*.tsx" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minimum supported version for Expo 52 is
15.1
but browserstack capabilities do not appear to match up, so we'll up(down?)date this later.