diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 8c8a8c5e..f4496137 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -40,6 +40,33 @@ steps: - bundle install - features/scripts/build-ios.sh + - label: ':runner: expo Android 15' + depends_on: + - "build-expo-apk" + timeout_in_minutes: 50 + plugins: + artifacts#v1.5.0: + download: "build/output.apk" + docker-compose#v3.9.0: + pull: expo-maze-runner + run: expo-maze-runner + use-aliases: true + command: + - --app=build/output.apk + - --farm=bs + - --device=ANDROID_15 + - --a11y-locator + - --fail-fast + - --retry=2 + - --order=random + test-collector#v1.10.2: + files: "reports/TEST-*.xml" + format: "junit" + branch: "^v52$" + concurrency: 5 + concurrency_group: 'browserstack-app' + concurrency_method: eager + - label: ':runner: expo Android 12' depends_on: - "build-expo-apk" @@ -62,12 +89,12 @@ steps: test-collector#v1.10.2: files: "reports/TEST-*.xml" format: "junit" - branch: "^v51$" + branch: "^v52$" concurrency: 5 concurrency_group: 'browserstack-app' concurrency_method: eager - - label: ':runner: expo iOS 16' + - label: ':runner: expo iOS 18' depends_on: - "build-expo-ipa" timeout_in_minutes: 50 @@ -81,7 +108,7 @@ steps: command: - --app=build/output.ipa - --farm=bs - - --device=IOS_16 + - --device=IOS_18 - --a11y-locator - --fail-fast - --retry=2 @@ -89,12 +116,12 @@ steps: test-collector#v1.10.2: files: "reports/TEST-*.xml" format: "junit" - branch: "^v51$" + branch: "^v52$" concurrency: 5 concurrency_group: 'browserstack-app' concurrency_method: eager - - label: ':runner: expo iOS 14' + - label: ':runner: expo iOS 16' depends_on: - "build-expo-ipa" timeout_in_minutes: 50 @@ -108,7 +135,7 @@ steps: command: - --app=build/output.ipa - --farm=bs - - --device=IOS_14 + - --device=IOS_16 - --a11y-locator - --fail-fast - --retry=2 @@ -116,7 +143,7 @@ steps: test-collector#v1.10.2: files: "reports/TEST-*.xml" format: "junit" - branch: "^v51$" + branch: "^v52$" concurrency: 5 concurrency_group: 'browserstack-app' concurrency_method: eager diff --git a/examples/expo-52/.gitignore b/examples/expo-52/.gitignore new file mode 100644 index 00000000..c9d575d7 --- /dev/null +++ b/examples/expo-52/.gitignore @@ -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 diff --git a/examples/expo-52/App.tsx b/examples/expo-52/App.tsx new file mode 100644 index 00000000..e5bd2d88 --- /dev/null +++ b/examples/expo-52/App.tsx @@ -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 ( + + + Expo example app + + + + ) +} + +const styles = StyleSheet.create({ + screenContainer: { + flex: 1, + justifyContent: "center", + alignItems: "center" + } +}); diff --git a/examples/expo48/README.md b/examples/expo-52/README.md similarity index 100% rename from examples/expo48/README.md rename to examples/expo-52/README.md diff --git a/examples/expo-52/app.json b/examples/expo-52/app.json new file mode 100644 index 00000000..879e17fe --- /dev/null +++ b/examples/expo-52/app.json @@ -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" + } + } + } +} diff --git a/examples/expo48/babel.config.js b/examples/expo-52/babel.config.js similarity index 100% rename from examples/expo48/babel.config.js rename to examples/expo-52/babel.config.js diff --git a/examples/expo-52/components/Button.tsx b/examples/expo-52/components/Button.tsx new file mode 100644 index 00000000..559a6b98 --- /dev/null +++ b/examples/expo-52/components/Button.tsx @@ -0,0 +1,34 @@ +import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'; + +interface Props { + onPress: () => void + title: string +} + +const Button: React.FunctionComponent = ({ onPress, title }) => ( + + + {title} + + +); + +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, + } +}); diff --git a/examples/expo-52/components/Controls.tsx b/examples/expo-52/components/Controls.tsx new file mode 100644 index 00000000..db01f714 --- /dev/null +++ b/examples/expo-52/components/Controls.tsx @@ -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 ( + +