@sentry/react-native 4.0.0-beta.3 → 4.0.0
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 +23 -0
- package/README.md +1 -1
- package/RNSentry.podspec +1 -1
- package/android/build.gradle +1 -1
- package/dist/js/client.d.ts.map +1 -1
- package/dist/js/client.js +2 -1
- package/dist/js/client.js.map +1 -1
- package/dist/js/version.d.ts +1 -1
- package/dist/js/version.d.ts.map +1 -1
- package/dist/js/version.js +1 -1
- package/dist/js/version.js.map +1 -1
- package/ios/RNSentry.m +4 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.0.0
|
|
4
|
+
|
|
5
|
+
- Bump Sentry Cocoa 7.18.0 ([#2303](https://github.com/getsentry/sentry-react-native/pull/2303))
|
|
6
|
+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/7.18.0/CHANGELOG.md)
|
|
7
|
+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/7.17.0...7.18.0)
|
|
8
|
+
- Bump Sentry Android 6.1.2 ([#2303](https://github.com/getsentry/sentry-react-native/pull/2303))
|
|
9
|
+
- [changelog](https://github.com/getsentry/sentry-java/blob/6.1.2/CHANGELOG.md)
|
|
10
|
+
- [diff](https://github.com/getsentry/sentry-java/compare/6.1.1...6.1.2)
|
|
11
|
+
|
|
12
|
+
## 4.0.0-beta.5
|
|
13
|
+
|
|
14
|
+
- Fix warning missing DSN on BrowserClient. ([#2294](https://github.com/getsentry/sentry-react-native/pull/2294))
|
|
15
|
+
|
|
16
|
+
## 4.0.0-beta.4
|
|
17
|
+
|
|
18
|
+
- Bump Sentry Cocoa 7.17.0 ([#2300](https://github.com/getsentry/sentry-react-native/pull/2300))
|
|
19
|
+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/7.17.0/CHANGELOG.md)
|
|
20
|
+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/7.16.1...7.17.0)
|
|
21
|
+
|
|
22
|
+
- Bump Sentry Android 6.1.1 ([#2300](https://github.com/getsentry/sentry-react-native/pull/2300))
|
|
23
|
+
- [changelog](https://github.com/getsentry/sentry-java/blob/6.1.1/CHANGELOG.md)
|
|
24
|
+
- [diff](https://github.com/getsentry/sentry-java/compare/6.0.0...6.1.1)
|
|
25
|
+
|
|
3
26
|
## 4.0.0-beta.3
|
|
4
27
|
|
|
5
28
|
- Bump Sentry Cocoa 7.16.1 ([#2279](https://github.com/getsentry/sentry-react-native/pull/2283))
|
package/README.md
CHANGED
|
@@ -84,7 +84,7 @@ If you are coming from `react-native-sentry` which was our SDK `< 1.0` you shoul
|
|
|
84
84
|
## Resources
|
|
85
85
|
|
|
86
86
|
- [](https://docs.sentry.io/platforms/react-native/)
|
|
87
|
-
- [](https://github.com/getsentry/sentry-react-native/discussions)
|
|
88
88
|
- [](https://discord.gg/PXa5Apfe7K)
|
|
89
89
|
- [](http://stackoverflow.com/questions/tagged/sentry)
|
|
90
90
|
- [](https://github.com/getsentry/.github/blob/main/CODE_OF_CONDUCT.md)
|
package/RNSentry.podspec
CHANGED
package/android/build.gradle
CHANGED
package/dist/js/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/js/client.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAa,MAAM,eAAe,CAAC;AAI3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAIrD;;;;;GAKG;AACH,qBAAa,iBAAkB,SAAQ,UAAU,CAAC,wBAAwB,CAAC;IAEzE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAgB;IAE/C;;;OAGG;gBACiB,OAAO,EAAE,wBAAwB;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/js/client.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAa,MAAM,eAAe,CAAC;AAI3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAIrD;;;;;GAKG;AACH,qBAAa,iBAAkB,SAAQ,UAAU,CAAC,wBAAwB,CAAC;IAEzE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAgB;IAE/C;;;OAGG;gBACiB,OAAO,EAAE,wBAAwB;IAgCrD;;OAEG;IACI,kBAAkB,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC;IAIrF;;OAEG;IACI,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,aAAa,EAAE,KAAK,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC;IAIxG;;;OAGG;IACI,WAAW,IAAI,IAAI;IAI1B;;OAEG;IACI,KAAK,IAAI,WAAW,CAAC,OAAO,CAAC;IAOpC;;KAEC;YACa,cAAc;IAe5B;;OAEG;IACH,OAAO,CAAC,wBAAwB;CAQjC"}
|
package/dist/js/client.js
CHANGED
|
@@ -35,12 +35,13 @@ export class ReactNativeClient extends BaseClient {
|
|
|
35
35
|
// eslint-disable-next-line deprecation/deprecation
|
|
36
36
|
YellowBox.ignoreWarnings(['Require cycle:']);
|
|
37
37
|
}
|
|
38
|
-
void this._initNativeSdk();
|
|
39
38
|
this._browserClient = new BrowserClient({
|
|
39
|
+
dsn: options.dsn,
|
|
40
40
|
transport: options.transport,
|
|
41
41
|
stackParser: options.stackParser || defaultStackParser,
|
|
42
42
|
integrations: [],
|
|
43
43
|
});
|
|
44
|
+
void this._initNativeSdk();
|
|
44
45
|
}
|
|
45
46
|
/**
|
|
46
47
|
* @inheritDoc
|
package/dist/js/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/js/client.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAGxF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,0CAA0C;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGxD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,OAAO,iBAAkB,SAAQ,UAAoC;IAIzE;;;OAGG;IACF,YAAmB,OAAiC;QACnD,MAAM,SAAS,GAAG,CAAC,OAAgC,EAAE,WAAuB,EAAa,EAAE;YACzF,IAAI,MAAM,CAAC,0BAA0B,EAAE,EAAE;gBACvC,OAAO,IAAI,eAAe,EAAE,CAAC;aAC9B;YACD,OAAO,kBAAkB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QACjD,CAAC,CAAA;QAED,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;QAC9B,KAAK,CAAC,OAAO,CAAC,CAAC;QAEhB,qHAAqH;QACrH,gEAAgE;QAChE,IAAI,MAAM,EAAE;YACV,sEAAsE;YACtE,MAAM,CAAC,UAAU,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;SACvC;aAAM;YACL,mDAAmD;YACnD,SAAS,CAAC,cAAc,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;SAC9C;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/js/client.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAGxF,OAAO,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AAK,CAAC,CAAC;IACnE,CAAC;IAED;;OAEG;IACI,gBAAgB,CAAC,QAAgB,EAAE,MAAsB,EAAE,KAAiB;QACjF,OAAO,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACvE,CAAC;IAED;;;OAGG;IACI,WAAW;QAChB,MAAM,CAAC,WAAW,EAAE,CAAC;IACvB,CAAC;IAED;;OAEG;IACI,KAAK;QACV,oGAAoG;QACpG,OAAO,KAAK,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC,MAAe,EAAE,EAAE;YAC5C,OAAO,MAAM,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAyB,CAAC;QAC5E,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;KAEC;IACa,cAAc;;;YAC1B,IAAI,iBAAiB,GAAG,KAAK,CAAC;YAE9B,IAAI;gBACF,iBAAiB,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC/D;YAAC,OAAO,CAAC,EAAE;gBACV,IAAI,CAAC,wBAAwB,EAAE,CAAC;gBAEhC,MAAA,MAAA,IAAI,CAAC,QAAQ,EAAC,OAAO,mDAAG,EAAE,iBAAiB,EAAE,KAAK,EAAE,EAAE;gBAEtD,OAAO;aACR;YACD,MAAA,MAAA,IAAI,CAAC,QAAQ,EAAC,OAAO,mDAAG,EAAE,iBAAiB,EAAE,EAAE;;KAChD;IAED;;OAEG;IACK,wBAAwB;QAC9B,IAAI,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,kBAAkB,EAAE;YAC/C,KAAK,CAAC,KAAK,CACT,QAAQ,EACR,qOAAqO,CACtO,CAAC;SACH;IACH,CAAC;CACF","sourcesContent":["import { BrowserClient, defaultStackParser, makeFetchTransport } from '@sentry/browser';\nimport { BrowserTransportOptions } from '@sentry/browser/types/transports/types';\nimport { FetchImpl } from '@sentry/browser/types/transports/utils';\nimport { BaseClient } from '@sentry/core';\nimport { Event, EventHint, SeverityLevel, Transport } from '@sentry/types';\n// @ts-ignore LogBox introduced in RN 0.63\nimport { Alert, LogBox, YellowBox } from 'react-native';\n\nimport { ReactNativeClientOptions } from './options';\nimport { NativeTransport } from './transports/native';\nimport { NATIVE } from './wrapper';\n\n/**\n * The Sentry React Native SDK Client.\n *\n * @see ReactNativeClientOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class ReactNativeClient extends BaseClient<ReactNativeClientOptions> {\n\n private readonly _browserClient: BrowserClient;\n\n /**\n * Creates a new React Native SDK instance.\n * @param options Configuration options for this SDK.\n */\n public constructor(options: ReactNativeClientOptions) {\n const transport = (options: BrowserTransportOptions, nativeFetch?: FetchImpl): Transport => {\n if (NATIVE.isNativeTransportAvailable()) {\n return new NativeTransport();\n }\n return makeFetchTransport(options, nativeFetch);\n }\n\n options.transport = transport;\n super(options);\n\n // This is a workaround for now using fetch on RN, this is a known issue in react-native and only generates a warning\n // YellowBox deprecated and replaced with with LogBox in RN 0.63\n if (LogBox) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n LogBox.ignoreLogs(['Require cycle:']);\n } else {\n // eslint-disable-next-line deprecation/deprecation\n YellowBox.ignoreWarnings(['Require cycle:']);\n }\n\n this._browserClient = new BrowserClient({\n dsn: options.dsn,\n transport: options.transport,\n stackParser: options.stackParser || defaultStackParser,\n integrations: [],\n });\n\n void this._initNativeSdk();\n }\n\n\n /**\n * @inheritDoc\n */\n public eventFromException(_exception: unknown, _hint?: EventHint): PromiseLike<Event> {\n return this._browserClient.eventFromException(_exception, _hint);\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(_message: string, _level?: SeverityLevel, _hint?: EventHint): PromiseLike<Event> {\n return this._browserClient.eventFromMessage(_message, _level, _hint);\n }\n\n /**\n * If native client is available it will trigger a native crash.\n * Use this only for testing purposes.\n */\n public nativeCrash(): void {\n NATIVE.nativeCrash();\n }\n\n /**\n * @inheritDoc\n */\n public close(): PromiseLike<boolean> {\n // As super.close() flushes queued events, we wait for that to finish before closing the native SDK.\n return super.close().then((result: boolean) => {\n return NATIVE.closeNativeSdk().then(() => result) as PromiseLike<boolean>;\n });\n }\n\n /**\n * Starts native client with dsn and options\n */\n private async _initNativeSdk(): Promise<void> {\n let didCallNativeInit = false;\n\n try {\n didCallNativeInit = await NATIVE.initNativeSdk(this._options);\n } catch (_) {\n this._showCannotConnectDialog();\n\n this._options.onReady?.({ didCallNativeInit: false });\n\n return;\n }\n this._options.onReady?.({ didCallNativeInit });\n }\n\n /**\n * If the user is in development mode, and the native nagger is enabled then it will show an alert.\n */\n private _showCannotConnectDialog(): void {\n if (__DEV__ && this._options.enableNativeNagger) {\n Alert.alert(\n 'Sentry',\n 'Warning, could not connect to Sentry native SDK.\\nIf you do not want to use the native component please pass `enableNative: false` in the options.\\nVisit: https://docs.sentry.io/platforms/react-native/#linking for more details.'\n );\n }\n }\n}\n"]}
|
package/dist/js/version.d.ts
CHANGED
package/dist/js/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,mCAAmC,CAAC;AACzD,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,mCAAmC,CAAC;AACzD,eAAO,MAAM,WAAW,UAAU,CAAC"}
|
package/dist/js/version.js
CHANGED
package/dist/js/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AACzD,MAAM,CAAC,MAAM,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AACzD,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC","sourcesContent":["export const SDK_NAME = 'sentry.javascript.react-native';\nexport const SDK_VERSION = '4.0.0';\n"]}
|
package/ios/RNSentry.m
CHANGED
|
@@ -273,7 +273,7 @@ RCT_EXPORT_METHOD(captureEnvelope:(NSDictionary * _Nonnull)envelopeDict
|
|
|
273
273
|
if ([NSJSONSerialization isValidJSONObject:envelopeDict]) {
|
|
274
274
|
SentrySdkInfo *sdkInfo = [[SentrySdkInfo alloc] initWithDict:envelopeDict[@"header"]];
|
|
275
275
|
SentryId *eventId = [[SentryId alloc] initWithUUIDString:envelopeDict[@"header"][@"event_id"]];
|
|
276
|
-
SentryEnvelopeHeader *envelopeHeader = [[SentryEnvelopeHeader alloc] initWithId:eventId sdkInfo:sdkInfo
|
|
276
|
+
SentryEnvelopeHeader *envelopeHeader = [[SentryEnvelopeHeader alloc] initWithId:eventId sdkInfo:sdkInfo traceContext:nil];
|
|
277
277
|
|
|
278
278
|
NSError *error;
|
|
279
279
|
NSData *envelopeItemData = [NSJSONSerialization dataWithJSONObject:envelopeDict[@"payload"] options:0 error:&error];
|
|
@@ -293,13 +293,13 @@ RCT_EXPORT_METHOD(captureEnvelope:(NSDictionary * _Nonnull)envelopeDict
|
|
|
293
293
|
SentryEnvelope *envelope = [[SentryEnvelope alloc] initWithHeader:envelopeHeader singleItem:envelopeItem];
|
|
294
294
|
|
|
295
295
|
#if DEBUG
|
|
296
|
-
[
|
|
296
|
+
[PrivateSentrySDKOnly captureEnvelope:envelope];
|
|
297
297
|
#else
|
|
298
298
|
if ([envelopeDict[@"payload"][@"level"] isEqualToString:@"fatal"]) {
|
|
299
299
|
// Storing to disk happens asynchronously with captureEnvelope
|
|
300
|
-
[
|
|
300
|
+
[PrivateSentrySDKOnly storeEnvelope:envelope];
|
|
301
301
|
} else {
|
|
302
|
-
[
|
|
302
|
+
[PrivateSentrySDKOnly captureEnvelope:envelope];
|
|
303
303
|
}
|
|
304
304
|
#endif
|
|
305
305
|
resolve(@YES);
|
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": "4.0.0
|
|
5
|
+
"version": "4.0.0",
|
|
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",
|