From 8f0cb1285eba5d5e5f0d9184b26fe44481c4b306 Mon Sep 17 00:00:00 2001 From: Ben Wilson Date: Fri, 22 Nov 2024 16:43:21 +0000 Subject: [PATCH 01/16] chore: :arrow_up: upgrade dependencies using expo install --fix --- features/fixtures/test-app/package.json | 20 +++++++++---------- package.json | 11 +++++----- packages/delivery-expo/package.json | 10 +++++----- packages/expo/package.json | 6 +++--- packages/plugin-expo-app/package.json | 6 +++--- .../package.json | 2 +- packages/plugin-expo-device/package.json | 10 +++++----- 7 files changed, 33 insertions(+), 32 deletions(-) diff --git a/features/fixtures/test-app/package.json b/features/fixtures/test-app/package.json index 1dd38c07..5b0b5d22 100644 --- a/features/fixtures/test-app/package.json +++ b/features/fixtures/test-app/package.json @@ -11,17 +11,17 @@ "dependencies": { "@bugsnag/expo": "*", "@react-native-community/netinfo": "11.3.1", - "expo": "~51.0.4", - "expo-application": "~5.9.1", + "expo": "^52.0.0", + "expo-application": "~6.0.1", "expo-constants": "~16.0.1", - "expo-crypto": "~13.0.2", - "expo-device": "~6.0.2", - "expo-file-system": "~17.0.1", - "expo-screen-orientation": "~7.0.4", - "expo-secure-store": "~13.0.1", - "expo-status-bar": "~1.12.1", - "react": "18.2.0", - "react-native": "0.74.1" + "expo-crypto": "~14.0.1", + "expo-device": "~7.0.1", + "expo-file-system": "~18.0.4", + "expo-screen-orientation": "~8.0.0", + "expo-secure-store": "~14.0.0", + "expo-status-bar": "~2.0.0", + "react": "18.3.1", + "react-native": "0.74.5" }, "devDependencies": { "@babel/core": "^7.20.0", diff --git a/package.json b/package.json index 8eaba889..2a4dc8ca 100644 --- a/package.json +++ b/package.json @@ -8,12 +8,12 @@ "eslint-plugin-promise": "^4.2.1", "eslint-plugin-react": "^7.18.3", "eslint-plugin-standard": "^4.0.1", - "expo": "^51.0.0", + "expo": "^52.0.0", "jest": "^29.3.1", - "jest-expo": "^51.0.1", + "jest-expo": "~52.0.2", "lerna": "^8.0.2", - "react": "18.2.0", - "react-native": "0.74.1", + "react": "18.3.1", + "react-native": "0.76.2", "verdaccio": "^5.10.2" }, "scripts": { @@ -24,6 +24,7 @@ }, "private": true, "workspaces": [ - "packages/*", "features/fixtures/test-app" + "packages/*", + "features/fixtures/test-app" ] } diff --git a/packages/delivery-expo/package.json b/packages/delivery-expo/package.json index 548a90fc..9a55ac6c 100644 --- a/packages/delivery-expo/package.json +++ b/packages/delivery-expo/package.json @@ -18,14 +18,14 @@ "license": "MIT", "devDependencies": { "@bugsnag/core": "^7.22.7", - "@react-native-community/netinfo": "11.3.1", - "expo-crypto": "~13.0.2", - "expo-file-system": "~17.0.1" + "@react-native-community/netinfo": "11.4.1", + "expo-crypto": "~14.0.1", + "expo-file-system": "~18.0.4" }, "peerDependencies": { "@bugsnag/core": "^7.22.7", "@react-native-community/netinfo": "11.3.1", - "expo-crypto": "~13.0.2", - "expo-file-system": "~17.0.1" + "expo-crypto": "~14.0.1", + "expo-file-system": "~18.0.4" } } diff --git a/packages/expo/package.json b/packages/expo/package.json index c6375b75..9fad4e00 100644 --- a/packages/expo/package.json +++ b/packages/expo/package.json @@ -49,11 +49,11 @@ "bugsnag-build-reporter": "^2.0.0" }, "devDependencies": { - "expo-constants": "~16.0.1" + "expo-constants": "~17.0.3" }, "peerDependencies": { - "expo": "^51.0.0", - "expo-constants": "~16.0.1", + "expo": "^52.0.0", + "expo-constants": "~17.0.3", "promise": "^8.3.0", "react": "*" } diff --git a/packages/plugin-expo-app/package.json b/packages/plugin-expo-app/package.json index 9f0051bd..490318c6 100644 --- a/packages/plugin-expo-app/package.json +++ b/packages/plugin-expo-app/package.json @@ -18,12 +18,12 @@ "license": "MIT", "devDependencies": { "@bugsnag/core": "^7.19.0", - "expo-application": "~5.9.1", - "expo-constants": "~16.0.1" + "expo-application": "~6.0.1", + "expo-constants": "~17.0.3" }, "peerDependencies": { "@bugsnag/core": "^7.0.0", - "expo-application": "~5.9.1", + "expo-application": "~6.0.1", "expo-constants": "~16.0.1" } } diff --git a/packages/plugin-expo-connectivity-breadcrumbs/package.json b/packages/plugin-expo-connectivity-breadcrumbs/package.json index 65f50b55..cc94c7df 100644 --- a/packages/plugin-expo-connectivity-breadcrumbs/package.json +++ b/packages/plugin-expo-connectivity-breadcrumbs/package.json @@ -18,7 +18,7 @@ "license": "MIT", "devDependencies": { "@bugsnag/core": "^7.16.0", - "@react-native-community/netinfo": "11.3.1" + "@react-native-community/netinfo": "11.4.1" }, "peerDependencies": { "@bugsnag/core": "^7.0.0", diff --git a/packages/plugin-expo-device/package.json b/packages/plugin-expo-device/package.json index 062ab703..c23c5d63 100644 --- a/packages/plugin-expo-device/package.json +++ b/packages/plugin-expo-device/package.json @@ -21,14 +21,14 @@ }, "devDependencies": { "@bugsnag/core": "^7.16.0", - "expo-constants": "~16.0.1", - "expo-device": "~6.0.2", - "expo-secure-store": "~13.0.1" + "expo-constants": "~17.0.3", + "expo-device": "~7.0.1", + "expo-secure-store": "~14.0.0" }, "peerDependencies": { "@bugsnag/core": "^7.0.0", "expo-constants": "~16.0.1", - "expo-device": "~6.0.2", - "expo-secure-store": "~13.0.1" + "expo-device": "~7.0.1", + "expo-secure-store": "~14.0.0" } } From 590623aac9b1f8c30ee1c53cb3ed2c6d3cca0d55 Mon Sep 17 00:00:00 2001 From: Ben Wilson Date: Fri, 22 Nov 2024 16:43:46 +0000 Subject: [PATCH 02/16] chore: :bookmark: update latest supported expo sdk version --- packages/expo-cli/lib/version-information.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/expo-cli/lib/version-information.js b/packages/expo-cli/lib/version-information.js index 5c33fd6a..56fbf8ed 100644 --- a/packages/expo-cli/lib/version-information.js +++ b/packages/expo-cli/lib/version-information.js @@ -1,7 +1,7 @@ const semver = require('semver') // the major version number of the latest Expo SDK we support -const LATEST_SUPPORTED_EXPO_SDK = 51 +const LATEST_SUPPORTED_EXPO_SDK = 52 class Version { constructor (expoSdkVersion, bugsnagVersion, isLegacy = false) { From e456fe40ad80916ccca5c6beca4aa2f18ebb1eae Mon Sep 17 00:00:00 2001 From: Ben Wilson Date: Fri, 22 Nov 2024 16:46:59 +0000 Subject: [PATCH 03/16] update react-native version in test app --- features/fixtures/test-app/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/fixtures/test-app/package.json b/features/fixtures/test-app/package.json index 5b0b5d22..9458a965 100644 --- a/features/fixtures/test-app/package.json +++ b/features/fixtures/test-app/package.json @@ -21,7 +21,7 @@ "expo-secure-store": "~14.0.0", "expo-status-bar": "~2.0.0", "react": "18.3.1", - "react-native": "0.74.5" + "react-native": "0.76.2" }, "devDependencies": { "@babel/core": "^7.20.0", From a7c7eb5a025c1e27660a80a2c39e306978a4a558 Mon Sep 17 00:00:00 2001 From: Ben Wilson Date: Fri, 22 Nov 2024 16:47:12 +0000 Subject: [PATCH 04/16] update buildkite pipeline --- .buildkite/pipeline.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 8c8a8c5e..53de4681 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -62,7 +62,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 @@ -89,7 +89,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 @@ -116,7 +116,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 From 67fefdbd9d246528d08a5b16eda47e83d27494d1 Mon Sep 17 00:00:00 2001 From: Ben Wilson Date: Fri, 22 Nov 2024 16:51:36 +0000 Subject: [PATCH 05/16] update @react-native-community/netinfo --- features/fixtures/test-app/package.json | 2 +- packages/delivery-expo/package.json | 2 +- packages/plugin-expo-connectivity-breadcrumbs/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/features/fixtures/test-app/package.json b/features/fixtures/test-app/package.json index 9458a965..58ba351d 100644 --- a/features/fixtures/test-app/package.json +++ b/features/fixtures/test-app/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@bugsnag/expo": "*", - "@react-native-community/netinfo": "11.3.1", + "@react-native-community/netinfo": "11.4.1", "expo": "^52.0.0", "expo-application": "~6.0.1", "expo-constants": "~16.0.1", diff --git a/packages/delivery-expo/package.json b/packages/delivery-expo/package.json index 9a55ac6c..e68022b7 100644 --- a/packages/delivery-expo/package.json +++ b/packages/delivery-expo/package.json @@ -24,7 +24,7 @@ }, "peerDependencies": { "@bugsnag/core": "^7.22.7", - "@react-native-community/netinfo": "11.3.1", + "@react-native-community/netinfo": "11.4.1", "expo-crypto": "~14.0.1", "expo-file-system": "~18.0.4" } diff --git a/packages/plugin-expo-connectivity-breadcrumbs/package.json b/packages/plugin-expo-connectivity-breadcrumbs/package.json index cc94c7df..31f7c80f 100644 --- a/packages/plugin-expo-connectivity-breadcrumbs/package.json +++ b/packages/plugin-expo-connectivity-breadcrumbs/package.json @@ -22,6 +22,6 @@ }, "peerDependencies": { "@bugsnag/core": "^7.0.0", - "@react-native-community/netinfo": "11.3.1" + "@react-native-community/netinfo": "11.4.1" } } From 0ffd670a1a1dd689c85977e3a62640bcba5bc7d7 Mon Sep 17 00:00:00 2001 From: Ben Wilson Date: Fri, 22 Nov 2024 17:41:55 +0000 Subject: [PATCH 06/16] update expo-constants --- features/fixtures/test-app/package.json | 2 +- packages/plugin-expo-app/package.json | 2 +- packages/plugin-expo-device/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/features/fixtures/test-app/package.json b/features/fixtures/test-app/package.json index 58ba351d..5b73ba56 100644 --- a/features/fixtures/test-app/package.json +++ b/features/fixtures/test-app/package.json @@ -13,7 +13,7 @@ "@react-native-community/netinfo": "11.4.1", "expo": "^52.0.0", "expo-application": "~6.0.1", - "expo-constants": "~16.0.1", + "expo-constants": "~17.0.3", "expo-crypto": "~14.0.1", "expo-device": "~7.0.1", "expo-file-system": "~18.0.4", diff --git a/packages/plugin-expo-app/package.json b/packages/plugin-expo-app/package.json index 490318c6..afef2828 100644 --- a/packages/plugin-expo-app/package.json +++ b/packages/plugin-expo-app/package.json @@ -24,6 +24,6 @@ "peerDependencies": { "@bugsnag/core": "^7.0.0", "expo-application": "~6.0.1", - "expo-constants": "~16.0.1" + "expo-constants": "~17.0.3" } } diff --git a/packages/plugin-expo-device/package.json b/packages/plugin-expo-device/package.json index c23c5d63..e5a843de 100644 --- a/packages/plugin-expo-device/package.json +++ b/packages/plugin-expo-device/package.json @@ -27,7 +27,7 @@ }, "peerDependencies": { "@bugsnag/core": "^7.0.0", - "expo-constants": "~16.0.1", + "expo-constants": "~17.0.3", "expo-device": "~7.0.1", "expo-secure-store": "~14.0.0" } From b5bb70586de75dc6d38848f82a541e8e47dee99e Mon Sep 17 00:00:00 2001 From: Ben Wilson Date: Mon, 25 Nov 2024 14:29:53 +0000 Subject: [PATCH 07/16] update iOS versions for testing --- .buildkite/pipeline.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 53de4681..cc52450e 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -67,7 +67,7 @@ steps: 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 +81,7 @@ steps: command: - --app=build/output.ipa - --farm=bs - - --device=IOS_16 + - --device=IOS_18 - --a11y-locator - --fail-fast - --retry=2 @@ -94,7 +94,7 @@ steps: concurrency_group: 'browserstack-app' concurrency_method: eager - - label: ':runner: expo iOS 14' + - label: ':runner: expo iOS 15' depends_on: - "build-expo-ipa" timeout_in_minutes: 50 @@ -108,7 +108,7 @@ steps: command: - --app=build/output.ipa - --farm=bs - - --device=IOS_14 + - --device=IOS_15 - --a11y-locator - --fail-fast - --retry=2 From 7819147980210b587e115dab96286395b8774108 Mon Sep 17 00:00:00 2001 From: Ben Wilson Date: Mon, 25 Nov 2024 16:34:42 +0000 Subject: [PATCH 08/16] test against iOS 16 (switch to 15 in a future PR) --- .buildkite/pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index cc52450e..0b4d80fe 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -94,7 +94,7 @@ steps: concurrency_group: 'browserstack-app' concurrency_method: eager - - label: ':runner: expo iOS 15' + - label: ':runner: expo iOS 16' depends_on: - "build-expo-ipa" timeout_in_minutes: 50 @@ -108,7 +108,7 @@ steps: command: - --app=build/output.ipa - --farm=bs - - --device=IOS_15 + - --device=IOS_16 - --a11y-locator - --fail-fast - --retry=2 From 7eee8945cb6fe7ee4f67a05868d0be7cb678c51e Mon Sep 17 00:00:00 2001 From: Ben Wilson Date: Mon, 25 Nov 2024 17:01:25 +0000 Subject: [PATCH 09/16] add android 15 to e2e tests --- .buildkite/pipeline.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 0b4d80fe..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" From b24a5357be5df4379e0d4153e3ddd0ae832a841e Mon Sep 17 00:00:00 2001 From: Ben Wilson Date: Tue, 26 Nov 2024 11:09:26 +0000 Subject: [PATCH 10/16] test: :white_check_mark: enable new arch in test fixture --- features/fixtures/test-app/app.json | 1 + 1 file changed, 1 insertion(+) diff --git a/features/fixtures/test-app/app.json b/features/fixtures/test-app/app.json index 5fdce29d..a271e3e1 100644 --- a/features/fixtures/test-app/app.json +++ b/features/fixtures/test-app/app.json @@ -7,6 +7,7 @@ "orientation": "portrait", "icon": "./assets/icon.png", "userInterfaceStyle": "light", + "newArchEnabled": true, "splash": { "image": "./assets/splash.png", "resizeMode": "contain", From 0812721fe5fff0202c6bd24f3d592df6fdd9af38 Mon Sep 17 00:00:00 2001 From: Ben Wilson Date: Wed, 27 Nov 2024 09:52:01 +0000 Subject: [PATCH 11/16] call createErrorBoundary for lazy loading --- features/fixtures/test-app/app/error_boundary.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/features/fixtures/test-app/app/error_boundary.js b/features/fixtures/test-app/app/error_boundary.js index b13d75a7..7b955a2a 100644 --- a/features/fixtures/test-app/app/error_boundary.js +++ b/features/fixtures/test-app/app/error_boundary.js @@ -2,7 +2,8 @@ import React, { Component } from 'react' import { View, Button, Text } from 'react-native' import { bugsnagClient } from './bugsnag' -const ErrorBound = bugsnagClient.getPlugin('react') +// Create the error boundary... +const ErrorBound = bugsnagClient.getPlugin('react').createErrorBoundary(React) export default class ErrorBoundary extends Component { constructor(props) { From 28195f970610ea05a324d6f6af7de8663934f9b3 Mon Sep 17 00:00:00 2001 From: Ben Wilson Date: Wed, 27 Nov 2024 10:10:53 +0000 Subject: [PATCH 12/16] update error boundary test --- features/error_boundary.feature | 13 +- features/fixtures/test-app/app.json | 1 - .../fixtures/test-app/app/error_boundary.js | 111 ++++-------------- features/fixtures/test-app/package.json | 2 +- 4 files changed, 29 insertions(+), 98 deletions(-) diff --git a/features/error_boundary.feature b/features/error_boundary.feature index 754fec97..4c357171 100644 --- a/features/error_boundary.feature +++ b/features/error_boundary.feature @@ -6,18 +6,9 @@ Background: And I click the element "errorBoundary" Scenario: A render error is captured by an error boundary - Given the element "errorBoundaryButton" is present - When I click the element "errorBoundaryButton" - Then I wait to receive an error - And the exception "errorClass" equals "Error" + Given I wait to receive an error + Then the exception "errorClass" equals "Error" And the exception "message" starts with "An error has occurred in Buggy component!" And the event "metaData.react.componentStack" is not null And the error Bugsnag-Integrity header is valid - -Scenario: When a render error occurs, a fallback is presented - Given the element "errorBoundaryFallbackButton" is present - When I click the element "errorBoundaryFallbackButton" - Then I wait to receive an error - And the exception "errorClass" equals "Error" And the element "errorBoundaryFallback" is present - And the error Bugsnag-Integrity header is valid diff --git a/features/fixtures/test-app/app.json b/features/fixtures/test-app/app.json index a271e3e1..1c711490 100644 --- a/features/fixtures/test-app/app.json +++ b/features/fixtures/test-app/app.json @@ -2,7 +2,6 @@ "expo": { "name": "test-fixture", "slug": "test-fixture", - "privacy": "unlisted", "version": "2.0.0", "orientation": "portrait", "icon": "./assets/icon.png", diff --git a/features/fixtures/test-app/app/error_boundary.js b/features/fixtures/test-app/app/error_boundary.js index 7b955a2a..668ee912 100644 --- a/features/fixtures/test-app/app/error_boundary.js +++ b/features/fixtures/test-app/app/error_boundary.js @@ -1,96 +1,37 @@ -import React, { Component } from 'react' -import { View, Button, Text } from 'react-native' +import React from 'react' +import { View, Text } from 'react-native' import { bugsnagClient } from './bugsnag' // Create the error boundary... -const ErrorBound = bugsnagClient.getPlugin('react').createErrorBoundary(React) +const ErrorBoundary = bugsnagClient.getPlugin('react').createErrorBoundary(React) -export default class ErrorBoundary extends Component { - constructor(props) { - super(props) - this.state = { - ebTrigger: false, - fallbackTrigger: false - } - } - - triggerErrorBoundary = () => { - this.setState(previous => ( - { - ebTrigger: true, - fallbackTrigger: false - } - )) - } - - renderErrorBoundary = () => { - if (this.state.ebTrigger) { - return ( - - ) - } else { - return null; - } - } - - triggerFallback = () => { - this.setState(previous => ( - { - ebTrigger: false, - fallbackTrigger: true - } - )) - } - - renderFallback = () => { - if (this.state.fallbackTrigger) { - return ( - - ) - } else { - return null; - } - } - - render() { - return ( - -