diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5307fc7e..72168bf4 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,6 +8,10 @@ updates: commit-message: prefix: "chore" include: "scope" + ignore: + # Matches the minimum Node in `engines`; raise it with that floor. + - dependency-name: "@types/node" + update-types: ["version-update:semver-major"] # Dependencies updates config for examples - package-ecosystem: "npm" @@ -33,6 +37,18 @@ updates: # Package in example is accessed by path, # do not update in package.json. - dependency-name: "raygun4reactnative" + # Expo pins these to the versions its SDK supports. Update them + # with `npx expo install` when moving to a new Expo SDK instead. + - dependency-name: "expo" + - dependency-name: "expo-*" + - dependency-name: "@expo/*" + - dependency-name: "react" + - dependency-name: "react-dom" + - dependency-name: "react-native" + - dependency-name: "react-native-*" + - dependency-name: "@react-native-async-storage/async-storage" + - dependency-name: "@types/react" + - dependency-name: "typescript" # Github Actions dependencies updates config - package-ecosystem: "github-actions" diff --git a/.github/workflows/demo.yaml b/.github/workflows/demo.yaml index dececd7a..9359f902 100644 --- a/.github/workflows/demo.yaml +++ b/.github/workflows/demo.yaml @@ -1,5 +1,21 @@ name: Demo CI -on: [ push, pull_request ] +on: + # Pull requests run on pull_request only; push covers master, so a PR isn't checked twice. + push: + branches: [ master ] + paths: [ 'sdk/**', 'demo/**', '.github/workflows/demo.yaml' ] + pull_request: + paths: [ 'sdk/**', 'demo/**', '.github/workflows/demo.yaml' ] + +permissions: + contents: read + +# A new push to a PR cancels its runs for older commits. Each push to master gets its own +# group, so master runs are never cancelled or replaced while pending. +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: demo-android-build: runs-on: ubuntu-latest @@ -25,13 +41,13 @@ jobs: with: node-version: '24' - - name: Build and pack SDK + # The demo uses the SDK from ../sdk, and installing it runs the SDK's build. + - name: Install SDK dependencies working-directory: sdk - run: npm run build_pack_1 + run: npm ci - - name: Install SDK into demo app - working-directory: sdk - run: npm run build_demo_2 + - name: Install demo dependencies + run: npm ci - name: Build Android app run: | @@ -57,13 +73,13 @@ jobs: with: node-version: '24' - - name: Build and pack SDK + # The demo uses the SDK from ../sdk, and installing it runs the SDK's build. + - name: Install SDK dependencies working-directory: sdk - run: npm run build_pack_1 + run: npm ci - - name: Install SDK into demo app - working-directory: sdk - run: npm run build_demo_2 + - name: Install demo dependencies + run: npm ci - name: Install CocoaPods dependencies working-directory: demo/ios diff --git a/.github/workflows/expo-demo.yaml b/.github/workflows/expo-demo.yaml new file mode 100644 index 00000000..56e73f1a --- /dev/null +++ b/.github/workflows/expo-demo.yaml @@ -0,0 +1,90 @@ +name: Expo Demo CI +on: + # Pull requests run on pull_request only; push covers master, so a PR isn't checked twice. + push: + branches: [ master ] + paths: [ 'sdk/**', 'ExpoDemo/**', '.github/workflows/expo-demo.yaml' ] + pull_request: + paths: [ 'sdk/**', 'ExpoDemo/**', '.github/workflows/expo-demo.yaml' ] + +permissions: + contents: read + +# A new push to a PR cancels its runs for older commits. Each push to master gets its own +# group, so master runs are never cancelled or replaced while pending. +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + expo-demo-android-build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v7 + + - name: Setup Java + uses: actions/setup-java@v6.0.1 + with: + java-version: 17 + distribution: temurin + cache: gradle + + - name: Setup Node + uses: actions/setup-node@v7 + with: + node-version: '24' + + # ExpoDemo uses the SDK from ../sdk, and installing it runs the SDK's build. + - name: Install SDK dependencies + working-directory: sdk + run: npm ci + + - name: Install ExpoDemo dependencies + working-directory: ExpoDemo + run: npm ci + + - name: Generate the Android project + working-directory: ExpoDemo + run: npx expo prebuild --platform android --no-install + + - name: Build Android app + working-directory: ExpoDemo/android + run: ./gradlew assembleDebug + + expo-demo-ios-build: + runs-on: macos-26 + steps: + - name: Checkout repository + uses: actions/checkout@v7 + + # Expo SDK 56 and later need Xcode 26.4 or later. + - name: Select Xcode + run: | + sudo xcode-select -switch /Applications/Xcode_26.6.app + xcodebuild -version + + - name: Setup Node + uses: actions/setup-node@v7 + with: + node-version: '24' + + # ExpoDemo uses the SDK from ../sdk, and installing it runs the SDK's build. + - name: Install SDK dependencies + working-directory: sdk + run: npm ci + + - name: Install ExpoDemo dependencies + working-directory: ExpoDemo + run: npm ci + + - name: Generate the iOS project and install pods + working-directory: ExpoDemo + run: npx expo prebuild --platform ios + + - name: Build iOS app + working-directory: ExpoDemo/ios + run: > + xcodebuild -workspace ExpoDemo.xcworkspace -scheme ExpoDemo -configuration Debug + -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' + CODE_SIGNING_ALLOWED=NO build diff --git a/.github/workflows/sdk.yaml b/.github/workflows/sdk.yaml index 996a1269..2d061f14 100644 --- a/.github/workflows/sdk.yaml +++ b/.github/workflows/sdk.yaml @@ -1,5 +1,21 @@ name: SDK CI -on: [ push, pull_request ] +on: + # Pull requests run on pull_request only; push covers master, so a PR isn't checked twice. + push: + branches: [ master ] + paths: [ 'sdk/**', '.github/workflows/sdk.yaml' ] + pull_request: + paths: [ 'sdk/**', '.github/workflows/sdk.yaml' ] + +permissions: + contents: read + +# A new push to a PR cancels its runs for older commits. Each push to master gets its own +# group, so master runs are never cancelled or replaced while pending. +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: sdk-checks: runs-on: ubuntu-latest @@ -18,30 +34,14 @@ jobs: - name: Install dependencies run: npm ci + - name: Check formatting + run: npx prettier --check "**/*.{js,ts,tsx}" + - name: Run ESLint run: npm run eslint + - name: Type-check + run: npx tsc --noEmit -p tsconfig.test.json + - name: Run unit tests run: npm run test - - # Checks code formatting, fails if there are changes after applying prettier. - # Based on this example here: - # https://github.com/creyD/prettier_action?tab=readme-ov-file#example-4-dry-run - prettier: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v7 - with: - # Make sure the actual branch is checked out when running on pull requests - ref: ${{ github.head_ref }} - # Make sure the value of GITHUB_TOKEN will not be persisted in repo's config - persist-credentials: false - - - name: Prettify code - uses: creyD/prettier_action@8c18391fdc98ed0d884c6345f03975edac71b8f0 # v4.6 - with: - # "dry" causes that if any file is modified, the job fails - dry: True - # "write" performs changes in place - prettier_options: --write sdk/**/*.js sdk/**/*.ts sdk/**/*.tsx diff --git a/CHANGELOG.md b/CHANGELOG.md index d8b6a8d9..ca41febf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,48 @@ +## 2.0.0 + +This release sets React Native 0.81 as the minimum and updates `raygun4android` to 6.3.0. It restores Real User Monitoring network timing on React Native 0.80+, which sent no network events since 1.6.0, and captures `fetch` requests on Expo SDK 56+. The SDK no longer has runtime dependencies. + +Breaking changes: + +- React Native 0.81+ and React 19.1+ are peer dependencies +- Android: `compileSdk` 36, `minSdk` 24 and Java 17 +- iOS: the minimum is 15.1, from React Native's `min_ios_version_supported` +- Node: `engines` requires `>=20.19.4` +- `raygun4android` 6.2.3 cannot read crash reports that 6.3.0 caches. If an app downgrades to a release with 6.2.3, the device loses its pending reports + +- chore: update brace-expansion to 1.1.21 and 5.0.12 in the sdk (#269) (2026-10-18) +- chore: update shell-quote to 1.12.0 in the sdk (#269) (2026-10-18) +- chore: update raygun4android to 6.3.0 and drop the stdlib exclude (#269) (2026-10-06) +- ci: stop dependabot updating expo-managed packages in ExpoDemo (#269) (2026-10-06) +- chore: update globals and typescript-eslint, pin @types/node to node 20 (#269) (2026-10-06) +- chore: remove unused jest-fetch-mock and mockdate (#269) (2026-10-06) +- feat: exercise the xhr and expo network paths in the demos (#269) (2026-09-20) +- docs: add a ci badge and correct the native crash reporting section (#269) (2026-09-20) +- ci: type-check the tests as well as the sdk source (#269) (2026-09-19) +- chore: remove stale ios declarations and unused code (#269) (2026-09-19) +- chore: install the sdk into the demo from ../sdk (#269) (2026-09-19) +- chore: remove ExpoDemo's obsolete plugin, packages and scripts (#269) (2026-09-19) +- fix: resolve the type errors in the demo screens (#269) (2026-09-19) +- chore: upgrade ExpoDemo to expo sdk 57 (#269) (2026-09-19) +- chore: upgrade the demo to react native 0.87 (#269) (2026-09-19) +- fix: capture fetch requests in rum on expo sdk 56+ (#269) (2026-09-18) +- fix: restore rum network timing on react native 0.80+ (#269) (2026-09-18) +- fix: key monitored requests by the request instead of uuid (#269) (2026-09-18) +- chore: ship the MIT license with the npm package (#269) (2026-09-18) +- chore: raise the demo's activesupport floor to 7.2.3.1 (#269) (2026-09-18) +- chore: fix the prettier and eslint config warnings (#269) (2026-09-18) +- docs: update requirements and installation for react-native 0.81+ (#269) (2026-09-18) +- chore: declare react and react-native peer dependencies and engines (#269) (2026-09-18) +- fix: build dist on pack and publish only runtime files (#269) (2026-09-18) +- fix: point the podspec at the MindscapeHQ repo (#269) (2026-09-18) +- chore: update raygun4android to 6.2.3 (#269) (2026-09-18) +- ci: stop running each check twice per pull request (#269) (2026-09-18) +- ci: type-check the sdk (#269) (2026-09-18) +- chore: remove unused babel and jest dependencies (#269) (2026-09-18) + ## 1.7.1 -This release fixes an Android build failure for consumers whose Kotlin compiler is older than the version `raygun4android` was compiled against (notably Expo SDK 55 / React Native 0.81, which pin Kotlin 2.1.20). +This release fixes an Android build failure for consumers whose Kotlin compiler is older than the version `raygun4android` was compiled against (notably Expo SDK 55 / React Native 0.83, which pin Kotlin 2.1.20). - fix: exclude `kotlin-stdlib` from `raygun4android` to avoid forcing a stdlib upgrade on the host app (#237) diff --git a/ExpoDemo/README.md b/ExpoDemo/README.md index 89436430..bf472fea 100644 --- a/ExpoDemo/README.md +++ b/ExpoDemo/README.md @@ -15,13 +15,20 @@ This is an [Expo](https://expo.dev) project created following the instructions i }; ``` -2. Install dependencies +2. Install the SDK's dependencies. ExpoDemo uses the SDK from `../sdk`, and installing it runs the SDK's build, + which needs them + + ```bash + cd ../sdk && npm install && cd ../ExpoDemo + ``` + +3. Install dependencies ```bash npm install ``` -3. Start the app +4. Start the app ```bash npx expo start diff --git a/ExpoDemo/app.json b/ExpoDemo/app.json index 4734d1a7..1bbd6aac 100644 --- a/ExpoDemo/app.json +++ b/ExpoDemo/app.json @@ -7,7 +7,6 @@ "icon": "./assets/images/icon.png", "scheme": "myapp", "userInterfaceStyle": "automatic", - "newArchEnabled": true, "ios": { "supportsTablet": true, "bundleIdentifier": "com.raygun.expodemo" @@ -25,7 +24,6 @@ "favicon": "./assets/images/favicon.png" }, "plugins": [ - "./plugins/withRaygunAndroid", "expo-router", [ "expo-splash-screen", @@ -37,7 +35,8 @@ } ], "expo-font", - "expo-web-browser" + "expo-web-browser", + "expo-status-bar" ], "experiments": { "typedRoutes": true diff --git a/ExpoDemo/app/index.tsx b/ExpoDemo/app/index.tsx index d896ae3a..a15e1cde 100644 --- a/ExpoDemo/app/index.tsx +++ b/ExpoDemo/app/index.tsx @@ -10,6 +10,7 @@ const options: RaygunClientOptions = { apiKey: "INSERT_YOUR_API_KEY_HERE", version: "0.1.2", enableCrashReporting: true, + enableRealUserMonitoring: true, logLevel: LogLevel.verbose, }; @@ -46,6 +47,25 @@ export default function Index() { onPress={() => RaygunClient.sendError(Error("Error from Expo app"))} /> +