Skip to content

Commit 8131163

Browse files
committed
Merge branch 'main' into v7
# Conflicts: # CHANGELOG.md # dev-packages/e2e-tests/package.json # dev-packages/type-check/package.json # dev-packages/utils/package.json # lerna.json # packages/core/android/src/main/java/io/sentry/react/RNSentryVersion.java # packages/core/ios/RNSentryVersion.m # packages/core/package.json # packages/core/src/js/feedback/FeedbackWidget.tsx # packages/core/src/js/feedback/ScreenshotButton.tsx # packages/core/src/js/version.ts # performance-tests/TestAppPlain/package.json # performance-tests/TestAppSentry/package.json # samples/expo/app.json # samples/expo/package.json # samples/react-native-macos/package.json # samples/react-native/android/app/build.gradle # samples/react-native/ios/sentryreactnativesample/Info.plist # samples/react-native/ios/sentryreactnativesampleTests/Info.plist # samples/react-native/package.json # yarn.lock
2 parents 62622b2 + 9e3030a commit 8131163

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2792
-157
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @krystofwoldrich @lucas-zimerman @antonis
1+
* @antonis @lucas-zimerman

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444

4545
# Initializes the CodeQL tools for scanning.
4646
- name: Initialize CodeQL
47-
uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # pin@v3.28.18
47+
uses: github/codeql-action/init@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # pin@v3.29.0
4848
with:
4949
languages: ${{ matrix.language }}
5050
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -55,7 +55,7 @@ jobs:
5555
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5656
# If this step fails, then you should remove it and run the build manually (see below)
5757
- name: Autobuild
58-
uses: github/codeql-action/autobuild@ff0a06e83cb2de871e5a09832bc6a81e7276941f # pin@v3.28.18
58+
uses: github/codeql-action/autobuild@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # pin@v3.29.0
5959

6060
# ℹ️ Command-line programs to run using the OS shell.
6161
# 📚 https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
@@ -66,4 +66,4 @@ jobs:
6666
# make bootstrap
6767
# make release
6868
- name: Perform CodeQL Analysis
69-
uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # pin@v3.28.18
69+
uses: github/codeql-action/analyze@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # pin@v3.29.0

.github/workflows/e2e-v2.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,15 @@ jobs:
163163
strategy:
164164
fail-fast: false # keeps matrix running if one fails
165165
matrix:
166-
rn-version: ['0.65.3', '0.79.1']
166+
rn-version: ['0.65.3', '0.80.0']
167167
rn-architecture: ['legacy', 'new']
168168
platform: ['android', 'ios']
169169
build-type: ['production']
170170
ios-use-frameworks: ['no', 'static', 'dynamic']
171171
engine: ['hermes', 'jsc']
172172
include:
173173
- platform: ios
174-
rn-version: '0.79.1'
174+
rn-version: '0.80.0'
175175
xcode-version: '16.2'
176176
runs-on: macos-15
177177
- platform: ios
@@ -182,7 +182,7 @@ jobs:
182182
runs-on: ubuntu-latest
183183
exclude:
184184
# exclude JSC for new RN versions (keeping the matrix manageable)
185-
- rn-version: '0.79.1'
185+
- rn-version: '0.80.0'
186186
engine: 'jsc'
187187
# exclude all rn versions lower than 0.70.0 for new architecture
188188
- rn-version: '0.65.3'
@@ -301,15 +301,15 @@ jobs:
301301
strategy:
302302
fail-fast: false # keeps matrix running if one fails
303303
matrix:
304-
rn-version: ['0.65.3', '0.79.1']
304+
rn-version: ['0.65.3', '0.80.0']
305305
rn-architecture: ['legacy', 'new']
306306
platform: ['android', 'ios']
307307
build-type: ['production']
308308
ios-use-frameworks: ['no'] # test only no framworks
309309
engine: ['hermes', 'jsc']
310310
include:
311311
- platform: ios
312-
rn-version: '0.79.1'
312+
rn-version: '0.80.0'
313313
runs-on: macos-15
314314
- platform: ios
315315
rn-version: '0.65.3'
@@ -323,7 +323,7 @@ jobs:
323323
# e2e test only the default combinations
324324
- rn-version: '0.65.3'
325325
engine: 'hermes'
326-
- rn-version: '0.79.1'
326+
- rn-version: '0.80.0'
327327
engine: 'jsc'
328328

329329
steps:
@@ -391,8 +391,7 @@ jobs:
391391
force-avd-creation: false
392392
disable-animations: true
393393
disable-spellchecker: true
394-
target: 'aosp_atd'
395-
channel: canary # Necessary for ATDs
394+
target: 'google_apis'
396395
emulator-options: >
397396
-no-window
398397
-no-snapshot-save

.github/workflows/skip-ci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,18 @@ jobs:
1010
diff_check:
1111
runs-on: ubuntu-latest
1212
continue-on-error: true
13+
env:
14+
PR_NUMBER: ${{ github.event.pull_request.number }}
15+
BASE_REF: ${{ github.base_ref }}
16+
HEAD_REF: ${{ github.head_ref }}
1317
outputs:
1418
skip_ci:
1519
${{ steps.check_diff.outputs.skip_ci }}
1620
steps:
1721
- name: Check if is PR
1822
id: check-pr
1923
run: |
20-
if [ -z "${{ github.event.pull_request.number }}" ] || [ -z "${{ github.base_ref }}" ] || [ -z "${{ github.head_ref }}" ]; then
24+
if [ -z "$PR_NUMBER" ] || [ -z "$BASE_REF" ] || [ -z "$HEAD_REF" ]; then
2125
echo "This action is intended to be run on pull requests only."
2226
echo "is-pr=false" >> $GITHUB_OUTPUT
2327
else
@@ -34,16 +38,16 @@ jobs:
3438
- name: Checkout PR Head Branch
3539
if: steps.check-pr.outputs.is-pr == 'true'
3640
run: |
37-
git fetch origin pull/${{ github.event.pull_request.number }}/head:${{ github.head_ref }}
38-
git checkout ${{ github.head_ref }}
41+
git fetch origin "pull/$PR_NUMBER/head:$HEAD_REF"
42+
git checkout "$HEAD_REF"
3943
4044
- name: Check diff from Pull Request
4145
if: steps.check-pr.outputs.is-pr == 'true'
4246
id: check_diff
4347
run: |
4448
skipList=(".github/CODEOWNERS" ".prettierignore")
4549
# Ignores changelog.md, readme.md,...
46-
fileChangesArray=($(git diff --name-only ${{ github.base_ref }}...${{ github.head_ref }} | grep -v '\.md$' || true))
50+
fileChangesArray=($(git diff --name-only "$BASE_REF...$HEAD_REF" | grep -v '\.md$' || true))
4751
printf '%s\n' "${fileChangesArray[@]}"
4852
for item in "${fileChangesArray[@]}"
4953
do

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,43 @@ Version 7 of the SDK is compatible with Sentry self-hosted versions 24.4.2 or hi
112112
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#8132)
113113
- [diff](https://github.com/getsentry/sentry-java/compare/7.20.1...8.13.2)
114114

115+
## 6.16.0
116+
117+
### Features
118+
119+
- Introducing `@sentry/react-native/playground` ([#4916](https://github.com/getsentry/sentry-react-native/pull/4916))
120+
121+
The new `withSentryPlayground` component allows developers to verify
122+
that the SDK is properly configured and reports errors as expected.
123+
124+
```jsx
125+
import * as Sentry from '@sentry/react-native';
126+
import { withSentryPlayground } from '@sentry/react-native/playground';
127+
128+
function App() {
129+
return <View>...</View>;
130+
}
131+
132+
export default withSentryPlayground(
133+
Sentry.wrap(App)
134+
);
135+
```
136+
137+
### Fixes
138+
139+
- Adds support for React Native 0.80 ([#4938](https://github.com/getsentry/sentry-react-native/pull/4938))
140+
- Report slow and frozen frames as app start span data ([#4865](https://github.com/getsentry/sentry-react-native/pull/4865))
141+
- User set by `Sentry.setUser` is prefilled in Feedback Widget ([#4901](https://github.com/getsentry/sentry-react-native/pull/4901))
142+
- User data are considered from all scopes in the following order current, isolation and global.
143+
144+
## 6.15.1
145+
146+
### Dependencies
147+
148+
- Bump Cocoa SDK from v8.52.0 to v8.52.1 ([#4899](https://github.com/getsentry/sentry-react-native/pull/4899))
149+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8521)
150+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.52.0...8.52.1)
151+
115152
## 6.15.0
116153

117154
### Features

dev-packages/e2e-tests/cli.mjs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,25 @@ const testApp = `${e2eDir}/${testAppName}`;
6868
const appId = platform === 'ios' ? 'org.reactjs.native.example.RnDiffApp' : 'com.rndiffapp';
6969
const sentryAuthToken = env.SENTRY_AUTH_TOKEN;
7070

71+
function runCodegenIfNeeded(rnVersion, platform, appDir) {
72+
const versionNumber = parseFloat(rnVersion.replace(/[^\d.]/g, ''));
73+
const shouldRunCodegen = platform === 'android' && versionNumber >= 0.80;
74+
75+
if (shouldRunCodegen) {
76+
console.log(`Running codegen for React Native ${rnVersion}...`);
77+
try {
78+
execSync('./gradlew generateCodegenArtifactsFromSchema', {
79+
stdio: 'inherit',
80+
cwd: path.join(appDir, 'android'),
81+
env: env
82+
});
83+
console.log('Gradle codegen task completed successfully');
84+
} catch (error) {
85+
console.error('Codegen failed:', error.message);
86+
}
87+
}
88+
}
89+
7190
// Build and publish the SDK - we only need to do this once in CI.
7291
// Locally, we may want to get updates from the latest build so do it on every app build.
7392
if (actions.includes('create') || (env.CI === undefined && actions.includes('build'))) {
@@ -198,6 +217,8 @@ if (actions.includes('build')) {
198217

199218
appProduct = `${appDir}/ios/DerivedData/Build/Products/${buildType}-iphonesimulator/${appName}.app`;
200219
} else if (platform == 'android') {
220+
runCodegenIfNeeded(RNVersion, platform, appDir);
221+
201222
execSync(`./gradlew assemble${buildType} -PreactNativeArchitectures=x86 --no-daemon`, {
202223
stdio: 'inherit',
203224
cwd: `${appDir}/android`,

dev-packages/e2e-tests/maestro/feedback.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,13 @@ jsEngine: graaljs
1717
file: feedback/happyFlow-android.yml
1818
when:
1919
platform: Android
20+
21+
- runFlow:
22+
file: feedback/captureFlow-ios.yml
23+
when:
24+
platform: iOS
25+
26+
- runFlow:
27+
file: feedback/captureFlow-android.yml
28+
when:
29+
platform: Android
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# This is a happy path test for the feedback widget on Android.
2+
# It verifies that the feedback form can be opened, filled out, and submitted successfully
3+
appId: ${APP_ID}
4+
jsEngine: graaljs
5+
---
6+
7+
# Show feedback button
8+
- tapOn: 'Feedback'
9+
10+
# Open feedback widget
11+
- tapOn: 'Report a Bug'
12+
13+
# Assert that the feedback form is visible
14+
- extendedWaitUntil:
15+
visible: 'Report a Bug'
16+
timeout: 5_000
17+
18+
# Fill out name field
19+
- tapOn: 'Your Name'
20+
- inputText: 'John Doe'
21+
22+
# Fill out email field
23+
24+
- inputText: '[email protected]'
25+
26+
# Fill out message field
27+
- tapOn: "What's the bug? What did you expect?"
28+
- inputText: 'This is a test feedback message with a screenshot from CI e2e tests'
29+
30+
# Take screenshot
31+
- scrollUntilVisible:
32+
element:
33+
text: 'Take a screenshot'
34+
- tapOn: 'Take a screenshot'
35+
- tapOn: 'Take Screenshot'
36+
37+
# Assert that the feedback form is visible
38+
- extendedWaitUntil:
39+
visible: 'Report a Bug'
40+
timeout: 5_000
41+
42+
# Hide keyboard by tapping on a non-tappable element
43+
- tapOn: 'Email'
44+
45+
# Submit feedback
46+
- scrollUntilVisible:
47+
element:
48+
text: 'Send Bug Report'
49+
- tapOn: 'Send Bug Report'
50+
- assertVisible: 'Thank you for your report!'
51+
- tapOn: 'OK'
52+
53+
# Verify feedback form is closed and the home screen is visible
54+
- assertVisible: 'Welcome to React Native'
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# This is a happy path test for the feedback widget on iOS.
2+
# It verifies that the feedback form can be opened, filled out, and submitted successfully
3+
appId: ${APP_ID}
4+
jsEngine: graaljs
5+
---
6+
7+
# Show feedback button
8+
- tapOn: 'Feedback'
9+
10+
# Open feedback widget
11+
- tapOn:
12+
id: 'sentry-feedback-button'
13+
14+
# Assert that the feedback form is visible
15+
- extendedWaitUntil:
16+
visible:
17+
id: 'sentry-feedback-form-title'
18+
timeout: 5_000
19+
20+
# Fill out name field
21+
- tapOn:
22+
id: 'sentry-feedback-name-input'
23+
- inputText: 'John Doe'
24+
25+
# Fill out email field
26+
- tapOn:
27+
id: 'sentry-feedback-email-input'
28+
- inputText: '[email protected]'
29+
30+
# Fill out message field
31+
- tapOn:
32+
id: 'sentry-feedback-message-input'
33+
- inputText: 'This is a test feedback message with a screenshot from CI e2e tests'
34+
35+
# Take screenshot
36+
- scrollUntilVisible:
37+
element:
38+
id: 'sentry-feedback-take-screenshot-button'
39+
- tapOn:
40+
id: 'sentry-feedback-take-screenshot-button'
41+
- tapOn:
42+
id: 'sentry-feedback-screenshot-button'
43+
44+
# Hide keyboard by tapping on a non-tappable element
45+
- tapOn:
46+
id: 'sentry-logo'
47+
48+
# Submit feedback
49+
- scrollUntilVisible:
50+
element:
51+
id: 'sentry-feedback-submit-button'
52+
- tapOn:
53+
id: 'sentry-feedback-submit-button'
54+
- assertVisible: 'Thank you for your report!'
55+
- tapOn: 'OK'
56+
57+
# Verify feedback form is closed and the home screen is visible
58+
- assertVisible: 'Welcome to React Native'

dev-packages/e2e-tests/maestro/feedback/happyFlow-android.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ jsEngine: graaljs
2727
- tapOn: "What's the bug? What did you expect?"
2828
- inputText: 'This is a test feedback message from CI e2e tests'
2929

30+
# Hide keyboard by tapping on a non-tappable element
31+
- tapOn: 'Email'
32+
3033
# Submit feedback
3134
- scrollUntilVisible:
3235
element:

0 commit comments

Comments
 (0)