Skip to content

Commit 0f5cd7d

Browse files
Merge remote-tracking branch 'origin/main' into capture-app-start-errors
2 parents 0bf6636 + 05b43ab commit 0f5cd7d

File tree

29 files changed

+411
-244
lines changed

29 files changed

+411
-244
lines changed

.github/workflows/e2e.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,15 +162,15 @@ jobs:
162162
strategy:
163163
fail-fast: false # keeps matrix running if one fails
164164
matrix:
165-
rn-version: ['0.65.3', '0.76.6']
165+
rn-version: ['0.65.3', '0.77.1']
166166
rn-architecture: ['legacy', 'new']
167167
platform: ['android', 'ios']
168168
build-type: ['production']
169169
ios-use-frameworks: ['no', 'static', 'dynamic']
170170
engine: ['hermes', 'jsc']
171171
include:
172172
- platform: ios
173-
rn-version: '0.76.6'
173+
rn-version: '0.77.1'
174174
runs-on: macos-14
175175
- platform: ios
176176
rn-version: '0.65.3'
@@ -179,7 +179,7 @@ jobs:
179179
runs-on: ubuntu-latest
180180
exclude:
181181
# exclude JSC for new RN versions (keeping the matrix manageable)
182-
- rn-version: '0.76.6'
182+
- rn-version: '0.77.1'
183183
engine: 'jsc'
184184
# exclude all rn versions lower than 0.70.0 for new architecture
185185
- rn-version: '0.65.3'
@@ -298,15 +298,15 @@ jobs:
298298
strategy:
299299
fail-fast: false # keeps matrix running if one fails
300300
matrix:
301-
rn-version: ['0.65.3', '0.76.6']
301+
rn-version: ['0.65.3', '0.77.1']
302302
rn-architecture: ['legacy', 'new']
303303
platform: ['android', 'ios']
304304
build-type: ['production']
305305
ios-use-frameworks: ['no'] # test only no framworks
306306
engine: ['hermes', 'jsc']
307307
include:
308308
- platform: ios
309-
rn-version: '0.76.6'
309+
rn-version: '0.77.1'
310310
runs-on: macos-15
311311
- platform: ios
312312
rn-version: '0.65.3'
@@ -320,7 +320,7 @@ jobs:
320320
# e2e test only the default combinations
321321
- rn-version: '0.65.3'
322322
engine: 'hermes'
323-
- rn-version: '0.76.6'
323+
- rn-version: '0.77.1'
324324
engine: 'jsc'
325325

326326
steps:

CHANGELOG.md

Lines changed: 46 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,52 @@
66
> make sure you follow our [migration guide](https://docs.sentry.io/platforms/react-native/migration/) first.
77
<!-- prettier-ignore-end -->
88
9+
## 6.8.0
10+
11+
### Features
12+
13+
- Adds Sentry Android Gradle Plugin as an experimental Expo plugin feature ([#4440](https://github.com/getsentry/sentry-react-native/pull/4440))
14+
15+
To enable the plugin add the `enableAndroidGradlePlugin` in the `@sentry/react-native/expo` of the Expo application configuration.
16+
17+
```js
18+
"plugins": [
19+
[
20+
"@sentry/react-native/expo",
21+
{
22+
"experimental_android": {
23+
"enableAndroidGradlePlugin": true,
24+
}
25+
}
26+
],
27+
```
28+
29+
To learn more about the available configuration options visit [the documentation](https://docs.sentry.io/platforms/react-native/manual-setup/expo/gradle).
30+
31+
### Fixes
32+
33+
- Remove `error:` prefix from `collect-modules.sh` to avoid failing iOS builds ([#4570](https://github.com/getsentry/sentry-react-native/pull/4570))
34+
- Sentry Module Collection Script Fails with Spaces in Node Path on iOS ([#4559](https://github.com/getsentry/sentry-react-native/pull/4559))
35+
- Various crashes and issues of Session Replay on Android. See the Android SDK version bump for more details. ([#4529](https://github.com/getsentry/sentry-react-native/pull/4529))
36+
- `Sentry.setUser(null)` doesn't crash on iOS with RN 0.77.1 ([#4567](https://github.com/getsentry/sentry-react-native/pull/4567))
37+
- Avoid importing `tslib` in Sentry Metro Plugin ([#4573](https://github.com/getsentry/sentry-react-native/pull/4573))
38+
39+
### Dependencies
40+
41+
- Bump Android SDK from v7.20.1 to v7.22.0 ([#4529](https://github.com/getsentry/sentry-react-native/pull/4529))
42+
- [changelog](https://github.com/getsentry/sentry-java/blob/7.x.x/CHANGELOG.md#7220)
43+
- [diff](https://github.com/getsentry/sentry-java/compare/7.20.1...7.22.0)
44+
- Bump Cocoa SDK from v8.44.0 to v8.45.0 ([#4537](https://github.com/getsentry/sentry-react-native/pull/4537))
45+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8450)
46+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.44.0...8.45.0)
47+
- Bump CLI from v2.41.1 to v2.42.1 ([#4563](https://github.com/getsentry/sentry-react-native/pull/4563))
48+
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2421)
49+
- [diff](https://github.com/getsentry/sentry-cli/compare/2.41.1...2.42.1)
50+
- Bump Bundler Plugins from v3.1.2 to v3.2.0 ([#4565](https://github.com/getsentry/sentry-react-native/pull/4565))
51+
- [changelog](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/main/CHANGELOG.md#320)
52+
- [diff](https://github.com/getsentry/sentry-javascript-bundler-plugins/compare/3.1.2...3.2.0)
53+
54+
955
## 6.7.0-alpha.0
1056

1157
### Features
@@ -60,39 +106,6 @@
60106
- Extract iOS native initialization to standalone structures ([#4442](https://github.com/getsentry/sentry-react-native/pull/4442))
61107
- Extract Android native initialization to standalone structures ([#4445](https://github.com/getsentry/sentry-react-native/pull/4445))
62108
63-
### Features
64-
65-
- Adds Sentry Android Gradle Plugin as an experimental Expo plugin feature ([#4440](https://github.com/getsentry/sentry-react-native/pull/4440))
66-
67-
To enable the plugin add the `enableAndroidGradlePlugin` in the `@sentry/react-native/expo` of the Expo application configuration.
68-
69-
```js
70-
"plugins": [
71-
[
72-
"@sentry/react-native/expo",
73-
{
74-
"experimental_android": {
75-
"enableAndroidGradlePlugin": true,
76-
}
77-
}
78-
],
79-
```
80-
81-
To learn more about the available configuration options visit [the documentation](https://docs.sentry.io/platforms/react-native/manual-setup/expo/expo-sagp/).
82-
83-
### Fixes
84-
85-
- Various crashes and issues of Session Replay on Android. See the Android SDK version bump for more details. ([#4529](https://github.com/getsentry/sentry-react-native/pull/4529))
86-
87-
### Dependencies
88-
89-
- Bump Android SDK from v7.20.1 to v7.22.0 ([#4529](https://github.com/getsentry/sentry-react-native/pull/4529))
90-
- [changelog](https://github.com/getsentry/sentry-java/blob/7.x.x/CHANGELOG.md#7220)
91-
- [diff](https://github.com/getsentry/sentry-java/compare/7.20.1...7.22.0)
92-
- Bump Cocoa SDK from v8.44.0 to v8.45.0 ([#4537](https://github.com/getsentry/sentry-react-native/pull/4537))
93-
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8450)
94-
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.44.0...8.45.0)
95-
96109
## 6.7.0
97110
98111
### Features

dev-packages/e2e-tests/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sentry-react-native-e2e-tests",
3-
"version": "6.7.0",
3+
"version": "6.8.0",
44
"private": true,
55
"description": "Sentry React Native End to End Tests Library",
66
"main": "dist/index.js",
@@ -14,7 +14,7 @@
1414
"@babel/preset-env": "^7.25.3",
1515
"@babel/preset-typescript": "^7.18.6",
1616
"@sentry/core": "8.54.0",
17-
"@sentry/react-native": "6.7.0",
17+
"@sentry/react-native": "6.8.0",
1818
"@types/node": "^20.9.3",
1919
"@types/react": "^18.2.64",
2020
"appium": "2.4.1",
@@ -23,7 +23,7 @@
2323
"babel-jest": "^29.7.0",
2424
"jest": "^29.7.0",
2525
"react": "18.3.1",
26-
"react-native": "0.77.0",
26+
"react-native": "0.77.1",
2727
"react-native-launch-arguments": "^4.0.2",
2828
"typescript": "4.9.5",
2929
"webdriverio": "^8.27.0"

dev-packages/type-check/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "sentry-react-native-type-check",
33
"private": true,
4-
"version": "6.7.0",
4+
"version": "6.8.0",
55
"scripts": {
66
"type-check": "./run-type-check.sh"
77
}

dev-packages/utils/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sentry-react-native-samples-utils",
3-
"version": "6.7.0",
3+
"version": "6.8.0",
44
"description": "Internal Samples Utils",
55
"main": "index.js",
66
"license": "MIT",

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
3-
"version": "6.7.0",
3+
"version": "6.8.0",
44
"packages": [
55
"packages/*",
66
"dev-packages/*",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"devDependencies": {
3131
"@expo/swiftlint": "^0.57.1",
3232
"@naturalcycles/ktlint": "^1.13.0",
33-
"@sentry/cli": "2.41.1",
33+
"@sentry/cli": "2.42.1",
3434
"clang-format": "^1.8.0",
3535
"downlevel-dts": "^0.11.0",
3636
"google-java-format": "^1.4.0",

packages/core/RNSentryCocoaTester/RNSentryCocoaTester.xcodeproj/project.pbxproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
/* Begin PBXBuildFile section */
1010
332D33472CDBDBB600547D76 /* RNSentryReplayOptionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 332D33462CDBDBB600547D76 /* RNSentryReplayOptionsTests.swift */; };
11+
3339C4812D6625570088EB3A /* RNSentryUserTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3339C4802D6625570088EB3A /* RNSentryUserTests.mm */; };
1112
336084392C32E382008CC412 /* RNSentryReplayBreadcrumbConverterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 336084382C32E382008CC412 /* RNSentryReplayBreadcrumbConverterTests.swift */; };
1213
3380C6C42CE25ECA0018B9B6 /* RNSentryReplayPostInitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3380C6C32CE25ECA0018B9B6 /* RNSentryReplayPostInitTests.swift */; };
1314
33958C692BFCF12600AD1FB6 /* RNSentryOnDrawReporterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 33958C682BFCF12600AD1FB6 /* RNSentryOnDrawReporterTests.m */; };
@@ -30,6 +31,8 @@
3031
332D33482CDBDC7300547D76 /* RNSentry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RNSentry.h; path = ../ios/RNSentry.h; sourceTree = SOURCE_ROOT; };
3132
332D33492CDCC8E100547D76 /* RNSentryTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNSentryTests.h; sourceTree = "<group>"; };
3233
332D334A2CDCC8EB00547D76 /* RNSentryCocoaTesterTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RNSentryCocoaTesterTests-Bridging-Header.h"; sourceTree = "<group>"; };
34+
3339C47F2D6625260088EB3A /* RNSentry+Test.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RNSentry+Test.h"; sourceTree = "<group>"; };
35+
3339C4802D6625570088EB3A /* RNSentryUserTests.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = RNSentryUserTests.mm; sourceTree = "<group>"; };
3336
333B58A82D35BA93000F8D04 /* RNSentryStart.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RNSentryStart.h; path = ../ios/RNSentryStart.h; sourceTree = SOURCE_ROOT; };
3437
333B58A92D35BB2D000F8D04 /* RNSentryStart+Test.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "RNSentryStart+Test.h"; path = "RNSentryCocoaTesterTests/RNSentryStart+Test.h"; sourceTree = SOURCE_ROOT; };
3538
333B58AF2D36A7FD000F8D04 /* RNSentrySDK.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RNSentrySDK.h; path = ../ios/RNSentrySDK.h; sourceTree = SOURCE_ROOT; };
@@ -106,10 +109,12 @@
106109
children = (
107110
339C6C412D3FD39500CA72ED /* RNSentryStartFromFileTests.swift */,
108111
339C6C3B2D3EB23B00CA72ED /* RNSentryStartTests.swift */,
112+
3339C47F2D6625260088EB3A /* RNSentry+Test.h */,
109113
332D334A2CDCC8EB00547D76 /* RNSentryCocoaTesterTests-Bridging-Header.h */,
110114
332D33492CDCC8E100547D76 /* RNSentryTests.h */,
111115
336084382C32E382008CC412 /* RNSentryReplayBreadcrumbConverterTests.swift */,
112116
33F58ACF2977037D008F60EA /* RNSentryTests.mm */,
117+
3339C4802D6625570088EB3A /* RNSentryUserTests.mm */,
113118
33AFDFEC2B8D14B300AAB120 /* RNSentryFramesTrackerListenerTests.m */,
114119
33AFDFEE2B8D14C200AAB120 /* RNSentryFramesTrackerListenerTests.h */,
115120
33AFDFF02B8D15E500AAB120 /* RNSentryDependencyContainerTests.m */,
@@ -292,6 +297,7 @@
292297
336084392C32E382008CC412 /* RNSentryReplayBreadcrumbConverterTests.swift in Sources */,
293298
33F58AD02977037D008F60EA /* RNSentryTests.mm in Sources */,
294299
33958C692BFCF12600AD1FB6 /* RNSentryOnDrawReporterTests.m in Sources */,
300+
3339C4812D6625570088EB3A /* RNSentryUserTests.mm in Sources */,
295301
3380C6C42CE25ECA0018B9B6 /* RNSentryReplayPostInitTests.swift in Sources */,
296302
33AFDFED2B8D14B300AAB120 /* RNSentryFramesTrackerListenerTests.m in Sources */,
297303
);
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#import <RNSentry/RNSentry.h>
2+
3+
@interface
4+
RNSentry (RNSentryInternal)
5+
6+
+ (SentryUser *_Nullable)userFrom:(NSDictionary *)userKeys
7+
otherUserKeys:(NSDictionary *)userDataKeys;
8+
9+
@end
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
#import "RNSentry+Test.h"
2+
#import "RNSentryTests.h"
3+
#import <XCTest/XCTest.h>
4+
5+
@interface RNSentryUserTests : XCTestCase
6+
@end
7+
8+
@implementation RNSentryUserTests
9+
10+
- (void)testValidUser
11+
{
12+
SentryUser *expected = [[SentryUser alloc] init];
13+
[expected setUserId:@"123"];
14+
[expected setIpAddress:@"192.168.1.1"];
15+
[expected setEmail:@"test@example.com"];
16+
[expected setUsername:@"testuser"];
17+
[expected setSegment:@"testsegment"];
18+
[expected setData:@{
19+
@"foo" : @"bar",
20+
@"baz" : @123,
21+
@"qux" : @[ @"a", @"b", @"c" ],
22+
}];
23+
24+
SentryUser *actual = [RNSentry userFrom:@{
25+
@"id" : @"123",
26+
@"ip_address" : @"192.168.1.1",
27+
@"email" : @"test@example.com",
28+
@"username" : @"testuser",
29+
@"segment" : @"testsegment",
30+
}
31+
otherUserKeys:@{
32+
@"foo" : @"bar",
33+
@"baz" : @123,
34+
@"qux" : @[ @"a", @"b", @"c" ],
35+
}];
36+
37+
XCTAssertTrue([actual isEqualToUser:expected]);
38+
}
39+
40+
- (void)testNilUser
41+
{
42+
SentryUser *actual = [RNSentry userFrom:nil otherUserKeys:nil];
43+
XCTAssertNil(actual);
44+
}
45+
46+
- (void)testNullUser
47+
{
48+
SentryUser *actual = [RNSentry userFrom:(NSDictionary *)[NSNull null] otherUserKeys:nil];
49+
XCTAssertNil(actual);
50+
}
51+
52+
- (void)testEmptyUser
53+
{
54+
SentryUser *expected = [[SentryUser alloc] init];
55+
[expected setData:@{}];
56+
57+
SentryUser *actual = [RNSentry userFrom:@{} otherUserKeys:@{}];
58+
XCTAssertTrue([actual isEqualToUser:expected]);
59+
}
60+
61+
- (void)testInvalidUser
62+
{
63+
SentryUser *expected = [[SentryUser alloc] init];
64+
65+
SentryUser *actual = [RNSentry userFrom:@{
66+
@"id" : @123,
67+
@"ip_address" : @ {},
68+
@"email" : @ {},
69+
@"username" : @ {},
70+
@"segment" : @[],
71+
}
72+
otherUserKeys:nil];
73+
74+
XCTAssertTrue([actual isEqualToUser:expected]);
75+
}
76+
77+
- (void)testPartiallyInvalidUser
78+
{
79+
SentryUser *expected = [[SentryUser alloc] init];
80+
[expected setUserId:@"123"];
81+
82+
SentryUser *actual = [RNSentry userFrom:@{
83+
@"id" : @"123",
84+
@"ip_address" : @ {},
85+
@"email" : @ {},
86+
@"username" : @ {},
87+
@"segment" : @[],
88+
}
89+
otherUserKeys:nil];
90+
91+
XCTAssertTrue([actual isEqualToUser:expected]);
92+
}
93+
94+
- (void)testNullValuesUser
95+
{
96+
SentryUser *expected = [[SentryUser alloc] init];
97+
98+
SentryUser *actual = [RNSentry userFrom:@{
99+
@"id" : [NSNull null],
100+
@"ip_address" : [NSNull null],
101+
@"email" : [NSNull null],
102+
@"username" : [NSNull null],
103+
@"segment" : [NSNull null],
104+
}
105+
otherUserKeys:nil];
106+
107+
XCTAssertTrue([actual isEqualToUser:expected]);
108+
}
109+
110+
@end

packages/core/android/src/main/java/io/sentry/react/RNSentryVersion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class RNSentryVersion {
44
static final String REACT_NATIVE_SDK_PACKAGE_NAME = "npm:@sentry/react-native";
5-
static final String REACT_NATIVE_SDK_PACKAGE_VERSION = "6.7.0";
5+
static final String REACT_NATIVE_SDK_PACKAGE_VERSION = "6.8.0";
66
static final String NATIVE_SDK_NAME = "sentry.native.android.react-native";
77
static final String ANDROID_SDK_NAME = "sentry.java.android.react-native";
88
static final String REACT_NATIVE_SDK_NAME = "sentry.javascript.react-native";

0 commit comments

Comments
 (0)