@sentry/react-native 5.0.0-alpha.5 → 5.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -0
- package/RNSentry.podspec +21 -3
- package/android/build.gradle +20 -2
- package/android/src/main/java/io/sentry/react/{RNSentryModule.java → RNSentryModuleImpl.java} +64 -84
- package/android/src/main/java/io/sentry/react/RNSentryPackage.java +35 -19
- package/android/src/newarch/java/io/sentry/react/RNSentryModule.java +109 -0
- package/android/src/oldarch/java/io/sentry/react/RNSentryModule.java +109 -0
- package/dist/js/NativeRNSentry.d.ts +45 -0
- package/dist/js/NativeRNSentry.d.ts.map +1 -0
- package/dist/js/NativeRNSentry.js +4 -0
- package/dist/js/NativeRNSentry.js.map +1 -0
- package/dist/js/measurements.js +1 -1
- package/dist/js/measurements.js.map +1 -1
- package/dist/js/scope.d.ts +1 -1
- package/dist/js/scope.d.ts.map +1 -1
- package/dist/js/scope.js +1 -1
- package/dist/js/scope.js.map +1 -1
- package/dist/js/sdk.d.ts +1 -1
- package/dist/js/sdk.d.ts.map +1 -1
- package/dist/js/sdk.js +1 -2
- package/dist/js/sdk.js.map +1 -1
- package/dist/js/touchevents.d.ts +4 -0
- package/dist/js/touchevents.d.ts.map +1 -1
- package/dist/js/touchevents.js.map +1 -1
- package/dist/js/tracing/nativeframes.js.map +1 -1
- package/dist/js/tracing/reactnativenavigation.d.ts +7 -0
- package/dist/js/tracing/reactnativenavigation.d.ts.map +1 -1
- package/dist/js/tracing/reactnativenavigation.js.map +1 -1
- package/dist/js/tracing/reactnativetracing.d.ts +1 -1
- package/dist/js/tracing/reactnativetracing.d.ts.map +1 -1
- package/dist/js/tracing/reactnativetracing.js +1 -0
- package/dist/js/tracing/reactnativetracing.js.map +1 -1
- package/dist/js/tracing/reactnavigation.d.ts +5 -1
- package/dist/js/tracing/reactnavigation.d.ts.map +1 -1
- package/dist/js/tracing/reactnavigation.js.map +1 -1
- package/dist/js/tracing/reactnavigationv4.d.ts +5 -1
- package/dist/js/tracing/reactnavigationv4.d.ts.map +1 -1
- package/dist/js/tracing/reactnavigationv4.js.map +1 -1
- package/dist/js/tracing/routingInstrumentation.d.ts +1 -1
- package/dist/js/tracing/routingInstrumentation.d.ts.map +1 -1
- package/dist/js/tracing/routingInstrumentation.js.map +1 -1
- package/dist/js/version.d.ts +1 -1
- package/dist/js/version.js +1 -1
- package/dist/js/version.js.map +1 -1
- package/dist/js/wrapper.d.ts +6 -2
- package/dist/js/wrapper.d.ts.map +1 -1
- package/dist/js/wrapper.js +17 -5
- package/dist/js/wrapper.js.map +1 -1
- package/ios/{RNSentry.m → RNSentry.mm} +22 -5
- package/package.json +25 -21
- package/sample-new-architecture/react-native.config.js +10 -0
- package/dist/js/definitions.d.ts +0 -50
- package/dist/js/definitions.d.ts.map +0 -1
- package/dist/js/definitions.js +0 -1
- package/dist/js/definitions.js.map +0 -1
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
#import <Sentry/Sentry.h>
|
|
10
10
|
#import <Sentry/SentryScreenFrames.h>
|
|
11
11
|
|
|
12
|
+
// Thanks to this guard, we won't import this header when we build for the old architecture.
|
|
13
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
14
|
+
#import "RNSentrySpec.h"
|
|
15
|
+
#endif
|
|
16
|
+
|
|
12
17
|
@interface SentryTraceContext : NSObject
|
|
13
18
|
- (nullable instancetype)initWithDict:(NSDictionary<NSString *, id> *)dictionary;
|
|
14
19
|
@end
|
|
@@ -39,11 +44,6 @@ static bool didFetchAppStart;
|
|
|
39
44
|
|
|
40
45
|
RCT_EXPORT_MODULE()
|
|
41
46
|
|
|
42
|
-
- (NSDictionary<NSString *, id> *)constantsToExport
|
|
43
|
-
{
|
|
44
|
-
return @{@"nativeClientAvailable": @YES, @"nativeTransport": @YES};
|
|
45
|
-
}
|
|
46
|
-
|
|
47
47
|
RCT_EXPORT_METHOD(initNativeSdk:(NSDictionary *_Nonnull)options
|
|
48
48
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
49
49
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
@@ -407,4 +407,21 @@ RCT_EXPORT_METHOD(disableNativeFramesTracking)
|
|
|
407
407
|
// Do nothing on iOS, this bridge method only has an effect on android.
|
|
408
408
|
}
|
|
409
409
|
|
|
410
|
+
RCT_EXPORT_METHOD(enableNativeFramesTracking)
|
|
411
|
+
{
|
|
412
|
+
// Do nothing on iOS, this bridge method only has an effect on android.
|
|
413
|
+
// If you're starting the Cocoa SDK manually,
|
|
414
|
+
// you can set the 'enableAutoPerformanceTracking: true' option and
|
|
415
|
+
// the 'tracesSampleRate' or 'tracesSampler' option.
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
// Thanks to this guard, we won't compile this code when we build for the old architecture.
|
|
419
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
420
|
+
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
|
421
|
+
(const facebook::react::ObjCTurboModule::InitParams &)params
|
|
422
|
+
{
|
|
423
|
+
return std::make_shared<facebook::react::NativeRNSentrySpecJSI>(params);
|
|
424
|
+
}
|
|
425
|
+
#endif
|
|
426
|
+
|
|
410
427
|
@end
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@sentry/react-native",
|
|
3
3
|
"homepage": "https://github.com/getsentry/sentry-react-native",
|
|
4
4
|
"repository": "https://github.com/getsentry/sentry-react-native",
|
|
5
|
-
"version": "5.0.0-alpha.
|
|
5
|
+
"version": "5.0.0-alpha.6",
|
|
6
6
|
"description": "Official Sentry SDK for react-native",
|
|
7
7
|
"typings": "dist/js/index.d.ts",
|
|
8
8
|
"types": "dist/js/index.d.ts",
|
|
@@ -36,36 +36,36 @@
|
|
|
36
36
|
"When bumping make sure to update the version of react, i.e: https://github.com/facebook/react-native/blob/v0.56.0/package.json"
|
|
37
37
|
],
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"react": ">=
|
|
40
|
-
"react-native": ">=0.
|
|
39
|
+
"react": ">=17.0.0",
|
|
40
|
+
"react-native": ">=0.70.0"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@sentry/browser": "7.
|
|
43
|
+
"@sentry/browser": "7.15.0",
|
|
44
44
|
"@sentry/cli": "1.74.4",
|
|
45
|
-
"@sentry/core": "7.
|
|
46
|
-
"@sentry/hub": "7.
|
|
47
|
-
"@sentry/integrations": "7.
|
|
48
|
-
"@sentry/react": "7.
|
|
49
|
-
"@sentry/tracing": "7.
|
|
50
|
-
"@sentry/types": "7.
|
|
51
|
-
"@sentry/utils": "7.
|
|
45
|
+
"@sentry/core": "7.15.0",
|
|
46
|
+
"@sentry/hub": "7.15.0",
|
|
47
|
+
"@sentry/integrations": "7.15.0",
|
|
48
|
+
"@sentry/react": "7.15.0",
|
|
49
|
+
"@sentry/tracing": "7.15.0",
|
|
50
|
+
"@sentry/types": "7.15.0",
|
|
51
|
+
"@sentry/utils": "7.15.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@sentry-internal/eslint-config-sdk": "7.
|
|
55
|
-
"@sentry-internal/eslint-plugin-sdk": "7.
|
|
54
|
+
"@sentry-internal/eslint-config-sdk": "7.15.0",
|
|
55
|
+
"@sentry-internal/eslint-plugin-sdk": "7.15.0",
|
|
56
56
|
"@sentry/typescript": "^5.20.1",
|
|
57
57
|
"@sentry/wizard": "2.2.0",
|
|
58
58
|
"@types/jest": "^26.0.15",
|
|
59
|
-
"@types/react": "^
|
|
60
|
-
"@types/react-native": "^0.
|
|
59
|
+
"@types/react": "^18",
|
|
60
|
+
"@types/react-native": "^0.70.0",
|
|
61
61
|
"babel-jest": "^26.1.0",
|
|
62
62
|
"eslint": "^7.6.0",
|
|
63
63
|
"eslint-plugin-react": "^7.20.6",
|
|
64
64
|
"eslint-plugin-react-native": "^3.8.1",
|
|
65
65
|
"jest": "^24.9.0",
|
|
66
66
|
"prettier": "^2.0.5",
|
|
67
|
-
"react": "
|
|
68
|
-
"react-native": "
|
|
67
|
+
"react": "^18",
|
|
68
|
+
"react-native": "^0.70.0",
|
|
69
69
|
"replace-in-file": "^6.0.0",
|
|
70
70
|
"rimraf": "^3.0.0",
|
|
71
71
|
"ts-jest": "^24.3.0",
|
|
@@ -82,10 +82,6 @@
|
|
|
82
82
|
"jest": {
|
|
83
83
|
"collectCoverage": true,
|
|
84
84
|
"preset": "react-native",
|
|
85
|
-
"transform": {
|
|
86
|
-
"^.+\\.(tsx)$": "<rootDir>/node_modules/react-native/jest/preprocessor.js",
|
|
87
|
-
"^.+\\.(ts|tsx)$": "ts-jest"
|
|
88
|
-
},
|
|
89
85
|
"globals": {
|
|
90
86
|
"__DEV__": true,
|
|
91
87
|
"ts-jest": {
|
|
@@ -105,5 +101,13 @@
|
|
|
105
101
|
"testMatch": [
|
|
106
102
|
"**/*.test.(ts|tsx)"
|
|
107
103
|
]
|
|
104
|
+
},
|
|
105
|
+
"codegenConfig": {
|
|
106
|
+
"name": "RNSentrySpec",
|
|
107
|
+
"type": "modules",
|
|
108
|
+
"jsSrcsDir": "src",
|
|
109
|
+
"android": {
|
|
110
|
+
"javaPackageName": "io.sentry.react"
|
|
111
|
+
}
|
|
108
112
|
}
|
|
109
113
|
}
|
package/dist/js/definitions.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { Breadcrumb, Package } from '@sentry/types';
|
|
2
|
-
import { ReactNativeOptions } from './options';
|
|
3
|
-
export declare type NativeAppStartResponse = {
|
|
4
|
-
isColdStart: boolean;
|
|
5
|
-
appStartTime: number;
|
|
6
|
-
didFetchAppStart: boolean;
|
|
7
|
-
};
|
|
8
|
-
export declare type NativeFramesResponse = {
|
|
9
|
-
totalFrames: number;
|
|
10
|
-
slowFrames: number;
|
|
11
|
-
frozenFrames: number;
|
|
12
|
-
};
|
|
13
|
-
export declare type NativeReleaseResponse = {
|
|
14
|
-
build: string;
|
|
15
|
-
id: string;
|
|
16
|
-
version: string;
|
|
17
|
-
};
|
|
18
|
-
export declare type NativeDeviceContextsResponse = {
|
|
19
|
-
[key: string]: Record<string, unknown>;
|
|
20
|
-
};
|
|
21
|
-
interface SerializedObject {
|
|
22
|
-
[key: string]: string;
|
|
23
|
-
}
|
|
24
|
-
export interface SentryNativeBridgeModule {
|
|
25
|
-
nativeClientAvailable: boolean;
|
|
26
|
-
addBreadcrumb(breadcrumb: Breadcrumb): void;
|
|
27
|
-
captureEnvelope(bytes: number[], options: {
|
|
28
|
-
store: boolean;
|
|
29
|
-
}): PromiseLike<boolean>;
|
|
30
|
-
clearBreadcrumbs(): void;
|
|
31
|
-
crash(): void;
|
|
32
|
-
closeNativeSdk(): PromiseLike<void>;
|
|
33
|
-
disableNativeFramesTracking(): void;
|
|
34
|
-
fetchNativeRelease(): Promise<{
|
|
35
|
-
build: string;
|
|
36
|
-
id: string;
|
|
37
|
-
version: string;
|
|
38
|
-
}>;
|
|
39
|
-
fetchNativeSdkInfo(): PromiseLike<Package>;
|
|
40
|
-
fetchNativeDeviceContexts(): PromiseLike<NativeDeviceContextsResponse>;
|
|
41
|
-
fetchNativeAppStart(): PromiseLike<NativeAppStartResponse | null>;
|
|
42
|
-
fetchNativeFrames(): PromiseLike<NativeFramesResponse | null>;
|
|
43
|
-
initNativeSdk(options: ReactNativeOptions): Promise<boolean>;
|
|
44
|
-
setUser(defaultUserKeys: SerializedObject | null, otherUserKeys: SerializedObject | null): void;
|
|
45
|
-
setContext(key: string, value: SerializedObject | null): void;
|
|
46
|
-
setExtra(key: string, value: string): void;
|
|
47
|
-
setTag(key: string, value: string): void;
|
|
48
|
-
}
|
|
49
|
-
export {};
|
|
50
|
-
//# sourceMappingURL=definitions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/js/definitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAA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C3C,yBAAyB,IAAI,WAAW,CAAC,4BAA4B,CAAC,CAAC;IACvE,mBAAmB,IAAI,WAAW,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAAC;IAClE,iBAAiB,IAAI,WAAW,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAC9D,aAAa,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7D,OAAO,CACL,eAAe,EAAE,gBAAgB,GAAG,IAAI,EACxC,aAAa,EAAE,gBAAgB,GAAG,IAAI,GACrC,IAAI,CAAC;IACR,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,GAAG,IAAI,GAAG,IAAI,CAAC;IAC9D,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1C"}
|
package/dist/js/definitions.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=definitions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/js/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb, Package } from '@sentry/types';\n\nimport { ReactNativeOptions } from './options';\n\nexport type NativeAppStartResponse = {\n isColdStart: boolean;\n appStartTime: number;\n didFetchAppStart: boolean;\n};\n\nexport type NativeFramesResponse = {\n totalFrames: number;\n slowFrames: number;\n frozenFrames: number;\n};\n\nexport type NativeReleaseResponse = {\n build: string;\n id: string;\n version: string;\n};\n\nexport type NativeDeviceContextsResponse = {\n [key: string]: Record<string, unknown>;\n};\n\ninterface SerializedObject {\n [key: string]: string;\n}\n\nexport interface SentryNativeBridgeModule {\n nativeClientAvailable: boolean;\n\n addBreadcrumb(breadcrumb: Breadcrumb): void;\n captureEnvelope(\n bytes: number[],\n options: {\n store: boolean,\n },\n ): PromiseLike<boolean>;\n clearBreadcrumbs(): void;\n crash(): void;\n closeNativeSdk(): PromiseLike<void>;\n disableNativeFramesTracking(): void;\n fetchNativeRelease(): Promise<{\n build: string;\n id: string;\n version: string;\n }>;\n fetchNativeSdkInfo(): PromiseLike<Package>;\n fetchNativeDeviceContexts(): PromiseLike<NativeDeviceContextsResponse>;\n fetchNativeAppStart(): PromiseLike<NativeAppStartResponse | null>;\n fetchNativeFrames(): PromiseLike<NativeFramesResponse | null>;\n initNativeSdk(options: ReactNativeOptions): Promise<boolean>;\n setUser(\n defaultUserKeys: SerializedObject | null,\n otherUserKeys: SerializedObject | null\n ): void;\n setContext(key: string, value: SerializedObject | null): void;\n setExtra(key: string, value: string): void;\n setTag(key: string, value: string): void;\n}\n"]}
|