@sentry/react-native 5.14.1 → 5.15.1
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 +36 -0
- package/RNSentry.podspec +1 -1
- package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +3 -5
- package/android/src/newarch/java/io/sentry/react/RNSentryModule.java +1 -1
- package/android/src/oldarch/java/io/sentry/react/RNSentryModule.java +1 -1
- package/dist/js/NativeRNSentry.d.ts +1 -1
- package/dist/js/NativeRNSentry.d.ts.map +1 -1
- package/dist/js/NativeRNSentry.js.map +1 -1
- package/dist/js/index.d.ts +4 -3
- package/dist/js/index.d.ts.map +1 -1
- package/dist/js/index.js.map +1 -1
- package/dist/js/integrations/debugsymbolicator.d.ts +25 -3
- package/dist/js/integrations/debugsymbolicator.d.ts.map +1 -1
- package/dist/js/integrations/debugsymbolicator.js +109 -70
- package/dist/js/integrations/debugsymbolicator.js.map +1 -1
- package/dist/js/integrations/reactnativeerrorhandlers.d.ts +4 -0
- package/dist/js/integrations/reactnativeerrorhandlers.d.ts.map +1 -1
- package/dist/js/integrations/reactnativeerrorhandlers.js +10 -1
- package/dist/js/integrations/reactnativeerrorhandlers.js.map +1 -1
- package/dist/js/tracing/index.d.ts +3 -2
- package/dist/js/tracing/index.d.ts.map +1 -1
- package/dist/js/tracing/index.js.map +1 -1
- package/dist/js/utils/error.d.ts +19 -0
- package/dist/js/utils/error.d.ts.map +1 -0
- package/dist/js/utils/error.js +30 -0
- package/dist/js/utils/error.js.map +1 -0
- package/dist/js/vendor/base64-js/fromByteArray.d.ts +5 -0
- package/dist/js/vendor/base64-js/fromByteArray.d.ts.map +1 -0
- package/dist/js/vendor/base64-js/fromByteArray.js +61 -0
- package/dist/js/vendor/base64-js/fromByteArray.js.map +1 -0
- package/dist/js/vendor/base64-js/index.d.ts +2 -0
- package/dist/js/vendor/base64-js/index.d.ts.map +1 -0
- package/dist/js/vendor/base64-js/index.js +2 -0
- package/dist/js/vendor/base64-js/index.js.map +1 -0
- package/dist/js/vendor/index.d.ts +2 -0
- package/dist/js/vendor/index.d.ts.map +1 -1
- package/dist/js/vendor/index.js +2 -0
- package/dist/js/vendor/index.js.map +1 -1
- package/dist/js/vendor/react-native/index.d.ts +27 -0
- package/dist/js/vendor/react-native/index.d.ts.map +1 -0
- package/dist/js/vendor/react-native/index.js +3 -0
- package/dist/js/vendor/react-native/index.js.map +1 -0
- 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.map +1 -1
- package/dist/js/wrapper.js +18 -12
- package/dist/js/wrapper.js.map +1 -1
- package/ios/RNSentry.mm +2 -6
- package/metro.d.ts +1 -0
- package/metro.js +1 -0
- package/package.json +5 -5
- package/{sample-new-architecture → samples/react-native}/react-native.config.js +1 -1
- package/scripts/sentry-xcode.sh +1 -1
- package/src/js/NativeRNSentry.ts +1 -1
- package/ts3.8/dist/js/NativeRNSentry.d.ts +1 -1
- package/ts3.8/dist/js/index.d.ts +4 -3
- package/ts3.8/dist/js/integrations/debugsymbolicator.d.ts +25 -3
- package/ts3.8/dist/js/integrations/reactnativeerrorhandlers.d.ts +4 -0
- package/ts3.8/dist/js/tracing/index.d.ts +3 -2
- package/ts3.8/dist/js/utils/error.d.ts +19 -0
- package/ts3.8/dist/js/vendor/base64-js/fromByteArray.d.ts +5 -0
- package/ts3.8/dist/js/vendor/base64-js/index.d.ts +2 -0
- package/ts3.8/dist/js/vendor/index.d.ts +2 -0
- package/ts3.8/dist/js/vendor/react-native/index.d.ts +27 -0
- package/ts3.8/dist/js/version.d.ts +1 -1
package/ios/RNSentry.mm
CHANGED
|
@@ -396,16 +396,12 @@ RCT_EXPORT_METHOD(fetchNativeRelease:(RCTPromiseResolveBlock)resolve
|
|
|
396
396
|
});
|
|
397
397
|
}
|
|
398
398
|
|
|
399
|
-
RCT_EXPORT_METHOD(captureEnvelope:(
|
|
399
|
+
RCT_EXPORT_METHOD(captureEnvelope:(NSString * _Nonnull)rawBytes
|
|
400
400
|
options: (NSDictionary * _Nonnull)options
|
|
401
401
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
402
402
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
403
403
|
{
|
|
404
|
-
|
|
405
|
-
for(NSNumber *number in bytes) {
|
|
406
|
-
char byte = [number charValue];
|
|
407
|
-
[data appendBytes: &byte length: 1];
|
|
408
|
-
}
|
|
404
|
+
NSData *data = [[NSData alloc] initWithBase64EncodedString:rawBytes options:0];
|
|
409
405
|
|
|
410
406
|
SentryEnvelope *envelope = [PrivateSentrySDKOnly envelopeWithData:data];
|
|
411
407
|
if (envelope == nil) {
|
package/metro.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/js/tools/sentryMetroSerializer';
|
package/metro.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./dist/js/tools/sentryMetroSerializer');
|
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.
|
|
5
|
+
"version": "5.15.1",
|
|
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",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"lint:eslint": "eslint --config .eslintrc.js .",
|
|
35
35
|
"lint:prettier": "prettier --check \"{src,test,scripts}/**/**.ts\"",
|
|
36
36
|
"test:watch": "jest --watch",
|
|
37
|
-
"run-ios": "cd
|
|
38
|
-
"run-android": "cd
|
|
37
|
+
"run-ios": "cd samples/react-native && yarn react-native run-ios",
|
|
38
|
+
"run-android": "cd samples/react-native && yarn react-native run-android",
|
|
39
39
|
"yalc:add:sentry-javascript": "yalc add @sentry/browser @sentry/core @sentry/hub @sentry/integrations @sentry/react @sentry/types @sentry/utils"
|
|
40
40
|
},
|
|
41
41
|
"keywords": [
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@sentry/browser": "7.81.1",
|
|
62
|
-
"@sentry/cli": "2.
|
|
62
|
+
"@sentry/cli": "2.23.0",
|
|
63
63
|
"@sentry/core": "7.81.1",
|
|
64
64
|
"@sentry/hub": "7.81.1",
|
|
65
65
|
"@sentry/integrations": "7.81.1",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@sentry-internal/eslint-config-sdk": "7.81.1",
|
|
72
72
|
"@sentry-internal/eslint-plugin-sdk": "7.81.1",
|
|
73
|
-
"@sentry/typescript": "
|
|
73
|
+
"@sentry-internal/typescript": "7.80.0",
|
|
74
74
|
"@sentry/wizard": "3.16.3",
|
|
75
75
|
"@types/jest": "^29.5.3",
|
|
76
76
|
"@types/node": "^20.9.3",
|
package/scripts/sentry-xcode.sh
CHANGED
|
@@ -25,7 +25,7 @@ else
|
|
|
25
25
|
/bin/sh -c "$REACT_NATIVE_XCODE"
|
|
26
26
|
fi
|
|
27
27
|
|
|
28
|
-
[ -z "$SENTRY_COLLECT_MODULES" ] && SENTRY_COLLECT_MODULES="
|
|
28
|
+
[ -z "$SENTRY_COLLECT_MODULES" ] && SENTRY_COLLECT_MODULES="../node_modules/@sentry/react-native/scripts/collect-modules.sh"
|
|
29
29
|
|
|
30
30
|
if [ -f "$SENTRY_COLLECT_MODULES" ]; then
|
|
31
31
|
/bin/sh "$SENTRY_COLLECT_MODULES"
|
package/src/js/NativeRNSentry.ts
CHANGED
|
@@ -8,7 +8,7 @@ import type { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';
|
|
|
8
8
|
export interface Spec extends TurboModule {
|
|
9
9
|
addBreadcrumb(breadcrumb: UnsafeObject): void;
|
|
10
10
|
captureEnvelope(
|
|
11
|
-
bytes:
|
|
11
|
+
bytes: string,
|
|
12
12
|
options: {
|
|
13
13
|
store: boolean;
|
|
14
14
|
},
|
|
@@ -3,7 +3,7 @@ import type { TurboModule } from 'react-native';
|
|
|
3
3
|
import type { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';
|
|
4
4
|
export interface Spec extends TurboModule {
|
|
5
5
|
addBreadcrumb(breadcrumb: UnsafeObject): void;
|
|
6
|
-
captureEnvelope(bytes:
|
|
6
|
+
captureEnvelope(bytes: string, options: {
|
|
7
7
|
store: boolean;
|
|
8
8
|
}): Promise<boolean>;
|
|
9
9
|
captureScreenshot(): Promise<NativeScreenshot[] | undefined | null>;
|
package/ts3.8/dist/js/index.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
export { Breadcrumb, Request, SdkInfo, Event, Exception, StackFrame, Stacktrace, Thread, User, UserFeedback, } from '@sentry/types';
|
|
1
|
+
export type { Breadcrumb, Request, SdkInfo, Event, Exception, StackFrame, Stacktrace, Thread, User, UserFeedback, } from '@sentry/types';
|
|
2
2
|
export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, getHubFromCarrier, getCurrentHub, Hub, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, startInactiveSpan, startSpan, startSpanManual, getActiveSpan, } from '@sentry/core';
|
|
3
3
|
export { Integrations as BrowserIntegrations, ErrorBoundary, withErrorBoundary, createReduxEnhancer, Profiler, useProfiler, withProfiler, } from '@sentry/react';
|
|
4
4
|
export { lastEventId } from '@sentry/browser';
|
|
5
5
|
import * as Integrations from './integrations';
|
|
6
6
|
import { SDK_NAME, SDK_VERSION } from './version';
|
|
7
|
-
export { ReactNativeOptions } from './options';
|
|
7
|
+
export type { ReactNativeOptions } from './options';
|
|
8
8
|
export { ReactNativeClient } from './client';
|
|
9
9
|
export { init, wrap, setDist, setRelease, nativeCrash, flush, close, captureUserFeedback, withScope, configureScope, } from './sdk';
|
|
10
10
|
export { TouchEventBoundary, withTouchEventBoundary } from './touchevents';
|
|
11
|
-
export { ReactNativeTracing, ReactNavigationV4Instrumentation, ReactNavigationV5Instrumentation, ReactNavigationInstrumentation, ReactNativeNavigationInstrumentation, RoutingInstrumentation,
|
|
11
|
+
export { ReactNativeTracing, ReactNavigationV4Instrumentation, ReactNavigationV5Instrumentation, ReactNavigationInstrumentation, ReactNativeNavigationInstrumentation, RoutingInstrumentation, sentryTraceGesture, } from './tracing';
|
|
12
|
+
export type { ReactNavigationTransactionContext } from './tracing';
|
|
12
13
|
export { Integrations, SDK_NAME, SDK_VERSION };
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Integration } from '@sentry/types';
|
|
1
|
+
import type { EventProcessor, Hub, Integration } from '@sentry/types';
|
|
2
2
|
/**
|
|
3
3
|
* React Native Error
|
|
4
4
|
*/
|
|
@@ -21,7 +21,7 @@ export declare class DebugSymbolicator implements Integration {
|
|
|
21
21
|
/**
|
|
22
22
|
* @inheritDoc
|
|
23
23
|
*/
|
|
24
|
-
setupOnce(): void;
|
|
24
|
+
setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void;
|
|
25
25
|
/**
|
|
26
26
|
* Symbolicates the stack on the device talking to local dev server.
|
|
27
27
|
* Mutates the passed event.
|
|
@@ -37,7 +37,13 @@ export declare class DebugSymbolicator implements Integration {
|
|
|
37
37
|
* @param event Event
|
|
38
38
|
* @param frames StackFrame[]
|
|
39
39
|
*/
|
|
40
|
-
private
|
|
40
|
+
private _replaceExceptionFramesInEvent;
|
|
41
|
+
/**
|
|
42
|
+
* Replaces the frames in the thread of a message.
|
|
43
|
+
* @param event Event
|
|
44
|
+
* @param frames StackFrame[]
|
|
45
|
+
*/
|
|
46
|
+
private _replaceThreadFramesInEvent;
|
|
41
47
|
/**
|
|
42
48
|
* This tries to add source context for in_app Frames
|
|
43
49
|
*
|
|
@@ -45,5 +51,21 @@ export declare class DebugSymbolicator implements Integration {
|
|
|
45
51
|
* @param getDevServer function from RN to get DevServer URL
|
|
46
52
|
*/
|
|
47
53
|
private _addSourceContext;
|
|
54
|
+
/**
|
|
55
|
+
* Get source context for segment
|
|
56
|
+
*/
|
|
57
|
+
private _fetchSourceContext;
|
|
58
|
+
/**
|
|
59
|
+
* Loads and calls RN Core Devtools parseErrorStack function.
|
|
60
|
+
*/
|
|
61
|
+
private _parseErrorStack;
|
|
62
|
+
/**
|
|
63
|
+
* Loads and calls RN Core Devtools symbolicateStackTrace function.
|
|
64
|
+
*/
|
|
65
|
+
private _symbolicateStackTrace;
|
|
66
|
+
/**
|
|
67
|
+
* Loads and returns the RN DevServer URL.
|
|
68
|
+
*/
|
|
69
|
+
private _getDevServer;
|
|
48
70
|
}
|
|
49
71
|
//# sourceMappingURL=debugsymbolicator.d.ts.map
|
|
@@ -54,6 +54,10 @@ export declare class ReactNativeErrorHandlers implements Integration {
|
|
|
54
54
|
* Handle errors
|
|
55
55
|
*/
|
|
56
56
|
private _handleOnError;
|
|
57
|
+
/**
|
|
58
|
+
* Loads and returns rejection tracking module
|
|
59
|
+
*/
|
|
60
|
+
private _loadRejectionTracking;
|
|
57
61
|
}
|
|
58
62
|
export {};
|
|
59
63
|
//# sourceMappingURL=reactnativeerrorhandlers.d.ts.map
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export { ReactNativeTracing } from './reactnativetracing';
|
|
2
|
-
export {
|
|
2
|
+
export type { RoutingInstrumentationInstance } from './routingInstrumentation';
|
|
3
|
+
export { RoutingInstrumentation } from './routingInstrumentation';
|
|
3
4
|
export { ReactNavigationInstrumentation, ReactNavigationV5Instrumentation, } from './reactnavigation';
|
|
4
5
|
export { ReactNavigationV4Instrumentation } from './reactnavigationv4';
|
|
5
6
|
export { ReactNativeNavigationInstrumentation } from './reactnativenavigation';
|
|
6
|
-
export { ReactNavigationCurrentRoute, ReactNavigationRoute, ReactNavigationTransactionContext } from './types';
|
|
7
|
+
export type { ReactNavigationCurrentRoute, ReactNavigationRoute, ReactNavigationTransactionContext } from './types';
|
|
7
8
|
export { ReactNativeProfiler } from './reactnativeprofiler';
|
|
8
9
|
export { sentryTraceGesture } from './gesturetracing';
|
|
9
10
|
export * from './ops';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface ExtendedError extends Error {
|
|
2
|
+
framesToPop?: number | undefined;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Creates synthetic trace. By default pops 2 frames - `createSyntheticError` and the caller
|
|
6
|
+
*/
|
|
7
|
+
export declare function createSyntheticError(framesToPop?: number): ExtendedError;
|
|
8
|
+
/**
|
|
9
|
+
* Returns the number of frames to pop from the stack trace.
|
|
10
|
+
* @param error ExtendedError
|
|
11
|
+
*/
|
|
12
|
+
export declare function getFramesToPop(error: ExtendedError): number;
|
|
13
|
+
/**
|
|
14
|
+
* Check if `potentialError` is an object with string stack property.
|
|
15
|
+
*/
|
|
16
|
+
export declare function isErrorLike(potentialError: unknown): potentialError is {
|
|
17
|
+
stack: string;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=error.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type StackFrame = {
|
|
2
|
+
column?: number;
|
|
3
|
+
file?: string;
|
|
4
|
+
lineNumber?: number;
|
|
5
|
+
methodName: string;
|
|
6
|
+
collapse?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type CodeFrame = Readonly<{
|
|
9
|
+
content: string;
|
|
10
|
+
location?: {
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
row: number;
|
|
13
|
+
column: number;
|
|
14
|
+
};
|
|
15
|
+
fileName: string;
|
|
16
|
+
}>;
|
|
17
|
+
export type SymbolicatedStackTrace = Readonly<{
|
|
18
|
+
stack: Array<StackFrame>;
|
|
19
|
+
codeFrame?: CodeFrame;
|
|
20
|
+
}>;
|
|
21
|
+
export type DevServerInfo = {
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
url: string;
|
|
24
|
+
fullBundleUrl?: string;
|
|
25
|
+
bundleLoadedFromServer: boolean;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|