Skip to content

Commit

Permalink
Merge branch 'main' into kw-do-not-enabled-native-frames-in-expo-go
Browse files Browse the repository at this point in the history
  • Loading branch information
krystofwoldrich committed Mar 21, 2024
2 parents 0933b71 + 2ed3d20 commit fb9f741
Show file tree
Hide file tree
Showing 18 changed files with 2,710 additions and 1,081 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ test/perf/TestApp*

# Ignore dangerfile
dangerfile.js

# Android Test App includes js in JVM test reports
RNSentryAndroidTester
16 changes: 8 additions & 8 deletions .github/workflows/buildandtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,24 +111,24 @@ jobs:
- name: Build
run: yarn build
- name: Archive dist
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
- name: Archive ts3.8
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ts3.8
path: ts3.8
- name: Archive Expo Plugin
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: expo-plugin
path: plugin/build
- name: Pack
run: yarn pack
- name: Archive Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ github.sha }}
path: |
Expand All @@ -150,12 +150,12 @@ jobs:
path: test/typescript/ts3.8/node_modules
key: ${{ runner.os }}-${{ github.sha }}-ts3.8
- name: Download dist
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Download ts3.8
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ts3.8
path: ts3.8
Expand Down Expand Up @@ -194,12 +194,12 @@ jobs:
if: ${{ steps.cache.outputs['cache-hit'] != 'true' }}
run: yarn install
- name: Download dist
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Download Expo Plugin
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: expo-plugin
path: plugin/build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 18
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: "adopt"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@7df0ce34898d659f95c0c4a09eaa8d4e32ee64db # pin@v2
uses: github/codeql-action/init@3ab4101902695724f9365a384f86c1074d94e18c # pin@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -55,7 +55,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@7df0ce34898d659f95c0c4a09eaa8d4e32ee64db # pin@v2
uses: github/codeql-action/autobuild@3ab4101902695724f9365a384f86c1074d94e18c # pin@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
Expand All @@ -66,4 +66,4 @@ jobs:
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@7df0ce34898d659f95c0c4a09eaa8d4e32ee64db # pin@v2
uses: github/codeql-action/analyze@3ab4101902695724f9365a384f86c1074d94e18c # pin@v2
28 changes: 11 additions & 17 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 18
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: "adopt"
Expand Down Expand Up @@ -228,13 +228,13 @@ jobs:
with:
node-version: 18

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
if: ${{ matrix.rn-version == '0.65.3' }}
with:
java-version: '11'
distribution: 'adopt'

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
if: ${{ matrix.rn-version != '0.65.3' }}
with:
java-version: '17'
Expand Down Expand Up @@ -406,23 +406,23 @@ jobs:
- name: Upload App APK
if: matrix.platform == 'android' && matrix.build-type == 'production'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.rn-version }}-${{ matrix.rn-architecture }}-${{ matrix.engine }}-${{ matrix.platform }}-${{ matrix.build-type }}-${{ matrix.ios-use-frameworks }}-app-package
path: apk.tar
retention-days: 1

- name: Upload App APP
if: matrix.platform == 'ios' && matrix.build-type == 'production'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.rn-version }}-${{ matrix.rn-architecture }}-${{ matrix.engine }}-${{ matrix.platform }}-${{ matrix.build-type }}-${{ matrix.ios-use-frameworks }}-app-package
path: app.tar
retention-days: 1

- name: Upload logs
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: rn-build-logs-${{ matrix.rn-version }}-${{ matrix.rn-architecture }}-${{ matrix.engine }}-${{ matrix.platform }}-${{ matrix.build-type }}-${{ matrix.ios-use-frameworks }}
path: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp/ios/*.log
Expand Down Expand Up @@ -482,7 +482,7 @@ jobs:

- name: Download App Package
if: matrix.build-type == 'production'
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ matrix.rn-version }}-${{ matrix.rn-architecture }}-${{ matrix.engine }}-${{ matrix.platform }}-${{ matrix.build-type }}-${{ matrix.ios-use-frameworks }}-app-package
path: test/e2e
Expand All @@ -492,16 +492,10 @@ jobs:
run: tar -xvf *.tar

- uses: actions/setup-node@v4
if: ${{ matrix.rn-version == '0.65.3' }}
with:
node-version: 18

- uses: actions/setup-node@v4
if: ${{ matrix.rn-version != '0.65.3' }}
with:
node-version: 18
node-version: 20

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
Expand Down Expand Up @@ -567,7 +561,7 @@ jobs:
if: ${{ matrix.platform == 'android' }}
env:
APPIUM_APP: ./app-release.apk
uses: reactivecircus/android-emulator-runner@50986b1464923454c95e261820bc626f38490ec0 # pin@v2
uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 # pin@v2
with:
working-directory: test/e2e
api-level: 30
Expand Down Expand Up @@ -602,7 +596,7 @@ jobs:

- name: Upload logs
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.rn-version }}-${{ matrix.rn-architecture }}-${{ matrix.engine }}-${{ matrix.platform }}-${{ matrix.build-type }}-${{ matrix.ios-use-frameworks }}-logs
path: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/native-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:

- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #pin@v2.28.0
uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 #pin@v2.30.1
with:
api-level: 30
force-avd-creation: false
Expand All @@ -117,7 +117,7 @@ jobs:
script: echo "Generated AVD snapshot for caching."

- name: Run connected tests
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #pin@v2.28.0
uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 #pin@v2.30.1
with:
working-directory: RNSentryAndroidTester
api-level: 30
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sample-application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 1 # cache the installed gems

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
- name: Upload logs
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build-sample-${{ matrix.rn-architecture }}-${{ matrix.platform }}-${{ matrix.build-type }}-logs
path: samples/react-native/ios/*.log
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@

- Do not enable NativeFramesTracking when native is not available ([#3700](https://github.com/getsentry/sentry-react-native/pull/3700))

### Dependencies

- Bump CLI from v2.30.0 to v2.30.2 ([#3678](https://github.com/getsentry/sentry-react-native/pull/3678))
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2302)
- [diff](https://github.com/getsentry/sentry-cli/compare/2.30.0...2.30.2)

## 5.20.0

### Features
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
},
"dependencies": {
"@sentry/browser": "7.100.1",
"@sentry/cli": "2.30.0",
"@sentry/cli": "2.30.2",
"@sentry/core": "7.100.1",
"@sentry/hub": "7.100.1",
"@sentry/integrations": "7.100.1",
Expand Down
6 changes: 3 additions & 3 deletions samples/expo/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4425,9 +4425,9 @@ ip-regex@^2.1.0:
integrity sha512-58yWmlHpp7VYfcdTwMTvwMmqx/Elfxjd9RXTDyMsbL7lLWmhMylLEqiYVLKuLzOZqVgiWXD9MfR62Vv89VRxkw==

ip@^1.1.5:
version "1.1.8"
resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48"
integrity sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==
version "1.1.9"
resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.9.tgz#8dfbcc99a754d07f425310b86a99546b1151e396"
integrity sha512-cyRxvOEpNHNtchU3Ln9KC/auJgup87llfQpQ+t5ghoC/UhL16SWzbueiCsdTnWmqAWl7LadfuwhlqmtOaqMHdQ==

ipaddr.js@^1.9.0:
version "1.9.1"
Expand Down
6 changes: 3 additions & 3 deletions samples/react-native/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5248,9 +5248,9 @@ invariant@^2.2.4:
loose-envify "^1.0.0"

ip@^1.1.5:
version "1.1.8"
resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48"
integrity sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==
version "1.1.9"
resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.9.tgz#8dfbcc99a754d07f425310b86a99546b1151e396"
integrity sha512-cyRxvOEpNHNtchU3Ln9KC/auJgup87llfQpQ+t5ghoC/UhL16SWzbueiCsdTnWmqAWl7LadfuwhlqmtOaqMHdQ==

is-array-buffer@^3.0.1:
version "3.0.1"
Expand Down
14 changes: 7 additions & 7 deletions test/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
"main": "dist/index.js",
"scripts": {
"build": "tsc --project tsconfig.build.json",
"test": "jest"
"test": "NODE_OPTIONS=--experimental-vm-modules jest"
},
"license": "MIT",
"devDependencies": {
"@babel/preset-env": "^7.20.2",
"@babel/preset-typescript": "^7.18.6",
"appium": "^2.0.0-beta.46",
"appium-uiautomator2-driver": "^2.12.1",
"appium-xcuitest-driver": "^4.16.6",
"babel-jest": "^29.3.1",
"jest": "^29.3.1",
"appium": "^2.4.1",
"appium-uiautomator2-driver": "^2.39.0",
"appium-xcuitest-driver": "^5.13.0",
"babel-jest": "^29.7.0",
"jest": "^29.7.0",
"typescript": "4.1.3",
"webdriverio": "7.26.0"
"webdriverio": "^8.27.0"
}
}
22 changes: 11 additions & 11 deletions test/e2e/test/utils/fetchEvent.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { Event } from '@sentry/types';
import fetch, { Request } from 'node-fetch';

const domain = 'sentry.io';
const eventEndpoint = '/api/0/projects/sentry-sdks/sentry-react-native/events/';
Expand All @@ -20,16 +19,17 @@ const fetchEvent = async (eventId: string): Promise<ApiEvent> => {
expect(process.env.SENTRY_AUTH_TOKEN).toBeDefined();
expect(process.env.SENTRY_AUTH_TOKEN?.length).toBeGreaterThan(0);

const request = new Request(url, {
headers: {
Authorization: `Bearer ${process.env.SENTRY_AUTH_TOKEN}`,
'Content-Type': 'application/json',
},
method: 'GET',
});
const request = () =>
fetch(url, {
headers: {
Authorization: `Bearer ${process.env.SENTRY_AUTH_TOKEN}`,
'Content-Type': 'application/json',
},
method: 'GET',
});

let retries = 0;
const retryer = (jsonResponse: any) =>
const retryer: (json: any) => Promise<ApiEvent> = (jsonResponse: any) =>
new Promise((resolve, reject) => {
if (jsonResponse.detail === 'Event not found') {
if (retries < RETRY_COUNT) {
Expand All @@ -38,7 +38,7 @@ const fetchEvent = async (eventId: string): Promise<ApiEvent> => {
// eslint-disable-next-line no-console
console.log(`Retrying api request. Retry number: ${retries}`);
resolve(
fetch(request)
request()
.then(res => res.json())
.then(retryer),
);
Expand All @@ -51,7 +51,7 @@ const fetchEvent = async (eventId: string): Promise<ApiEvent> => {
}
});

const json: ApiEvent = (await fetch(request)
const json: ApiEvent = (await request()
// tslint:disable-next-line: no-unsafe-any
.then(res => res.json())
.then(retryer)) as ApiEvent;
Expand Down
Loading

0 comments on commit fb9f741

Please sign in to comment.