@sentry/react-native 5.0.0-beta.2 → 5.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 +73 -6
- package/README.md +5 -8
- package/android/build.gradle +1 -1
- package/dist/js/integrations/reactnativeerrorhandlers.d.ts.map +1 -1
- package/dist/js/integrations/reactnativeerrorhandlers.js +7 -2
- package/dist/js/integrations/reactnativeerrorhandlers.js.map +1 -1
- package/dist/js/utils/ignorerequirecyclelogs.d.ts +1 -2
- package/dist/js/utils/ignorerequirecyclelogs.d.ts.map +1 -1
- package/dist/js/utils/ignorerequirecyclelogs.js +3 -10
- package/dist/js/utils/ignorerequirecyclelogs.js.map +1 -1
- package/dist/js/utils/worldwide.d.ts +2 -0
- package/dist/js/utils/worldwide.d.ts.map +1 -1
- package/dist/js/utils/worldwide.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/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,72 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.0.0
|
|
4
|
+
|
|
5
|
+
The React Native SDK version 5 supports both Legacy (from RN 0.65 and above) and New Architecture (from RN 0.69 and above) as well as the new React Native Gradle Plugin (introduced in RN 0.71). For detailed [migration guide visit our docs](https://docs.sentry.io/platforms/react-native/migration/#from-4x-to-5x).
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
- Add support for the RN New Architecture, backwards compatible RNSentry Turbo Module ([#2522](https://github.com/getsentry/sentry-react-native/pull/2522))
|
|
10
|
+
- Add View Hierarchy to the crashed/errored events ([#2708](https://github.com/getsentry/sentry-react-native/pull/2708))
|
|
11
|
+
- Send react native js engine, turbo module, fabric flags and component stack in Event contexts ([#2552](https://github.com/getsentry/sentry-react-native/pull/2552))
|
|
12
|
+
- Sync `tags`, `extra`, `fingerprint`, `level`, `environment` and `breadcrumbs` from `sentry-cocoa` during event processing. ([#2713](https://github.com/getsentry/sentry-react-native/pull/2713))
|
|
13
|
+
- `breadcrumb.level` value `log` is transformed to `debug` when syncing with native layers.
|
|
14
|
+
- Remove `breadcrumb.level` value `critical` transformation to `fatal`.
|
|
15
|
+
- Default `breadcrumb.level` is `info`
|
|
16
|
+
|
|
17
|
+
### Breaking changes
|
|
18
|
+
|
|
19
|
+
- Option `enableAutoPerformanceTracking` renamed to `enableAutoPerformanceTracing`
|
|
20
|
+
- Option `enableOutOfMemoryTracking` renamed to `enableWatchdogTerminationTracking`
|
|
21
|
+
- Remove link hooks (RN 0.68 and older) ([#2332](https://github.com/getsentry/sentry-react-native/pull/2332))
|
|
22
|
+
- iOS min target 11, Android API min 21, min React Native version 0.65 ([#2522](https://github.com/getsentry/sentry-react-native/pull/2522), [#2687](https://github.com/getsentry/sentry-react-native/pull/2687))
|
|
23
|
+
- New ReactNativeTracingOptions ([#2481](https://github.com/getsentry/sentry-react-native/pull/2481))
|
|
24
|
+
- `idleTimeout` renamed to `idleTimeoutMs`
|
|
25
|
+
- `maxTransactionDuration` renamed to `finalTimeoutMs`
|
|
26
|
+
- `touchEventBoundaryProps.labelName` property instead of default `accessibilityLabel` fallback ([#2712](https://github.com/getsentry/sentry-react-native/pull/2712))
|
|
27
|
+
- Message event current stack trace moved from `exception` to `threads` ([#2694](https://github.com/getsentry/sentry-react-native/pull/2694))
|
|
28
|
+
|
|
29
|
+
### Fixes
|
|
30
|
+
|
|
31
|
+
- Unreachable fallback to fetch transport if native is not available ([#2695](https://github.com/getsentry/sentry-react-native/pull/2695))
|
|
32
|
+
|
|
33
|
+
### Dependencies
|
|
34
|
+
|
|
35
|
+
- Bump Cocoa SDK from v7.31.5 to v8.0.0 ([#2756](https://github.com/getsentry/sentry-react-native/pull/2756))
|
|
36
|
+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#800)
|
|
37
|
+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/7.31.5...8.0.0)
|
|
38
|
+
- Bump CLI from v1.74.4 to v2.10.0 ([#2669](https://github.com/getsentry/sentry-react-native/pull/2669))
|
|
39
|
+
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2100)
|
|
40
|
+
- [diff](https://github.com/getsentry/sentry-cli/compare/1.74.4...2.10.0)
|
|
41
|
+
|
|
42
|
+
## 4.15.0
|
|
43
|
+
|
|
44
|
+
### Features
|
|
45
|
+
|
|
46
|
+
- Collect modules script for XCode builds supports NODE_BINARY to set path to node executable ([#2805](https://github.com/getsentry/sentry-react-native/pull/2805))
|
|
47
|
+
|
|
48
|
+
### Fixes
|
|
49
|
+
|
|
50
|
+
- React Native Error Handlers Integration doesn't crash if ErrorUtils are not available ([#2808](https://github.com/getsentry/sentry-react-native/pull/2808))
|
|
51
|
+
|
|
52
|
+
### Dependencies
|
|
53
|
+
|
|
54
|
+
- Bump Android SDK from v6.12.1 to v6.14.0 ([#2790](https://github.com/getsentry/sentry-react-native/pull/2790), [#2809](https://github.com/getsentry/sentry-react-native/pull/2809), [#2828](https://github.com/getsentry/sentry-react-native/pull/2828))
|
|
55
|
+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#6140)
|
|
56
|
+
- [diff](https://github.com/getsentry/sentry-java/compare/6.12.1...6.14.0)
|
|
57
|
+
- Bump Sample React Native from v0.71.0 to v0.71.1 ([#2767](https://github.com/getsentry/sentry-react-native/pull/2767))
|
|
58
|
+
- [changelog](https://github.com/facebook/react-native/blob/main/CHANGELOG.md#v0711)
|
|
59
|
+
- [diff](https://github.com/facebook/react-native/compare/v0.71.0...v0.71.1)
|
|
60
|
+
- Bump JavaScript SDK from v7.32.1 to v7.37.2 ([#2785](https://github.com/getsentry/sentry-react-native/pull/2785), [#2799](https://github.com/getsentry/sentry-react-native/pull/2799), [#2818](https://github.com/getsentry/sentry-react-native/pull/2818))
|
|
61
|
+
- [changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md#7372)
|
|
62
|
+
- [diff](https://github.com/getsentry/sentry-javascript/compare/7.32.1...7.37.2)
|
|
63
|
+
|
|
64
|
+
## 5.0.0-rc.1
|
|
65
|
+
|
|
66
|
+
### Fixes
|
|
67
|
+
|
|
68
|
+
- React Native Error Handlers Integration doesn't crash if ErrorUtils are not available ([#2808](https://github.com/getsentry/sentry-react-native/pull/2808))
|
|
69
|
+
|
|
3
70
|
## 5.0.0-beta.2
|
|
4
71
|
|
|
5
72
|
### Features
|
|
@@ -9,15 +76,15 @@
|
|
|
9
76
|
|
|
10
77
|
### Dependencies
|
|
11
78
|
|
|
12
|
-
- Bump Android SDK from v6.12.1 to v6.
|
|
13
|
-
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#
|
|
14
|
-
- [diff](https://github.com/getsentry/sentry-java/compare/6.12.1...6.
|
|
79
|
+
- Bump Android SDK from v6.12.1 to v6.14.0 ([#2790](https://github.com/getsentry/sentry-react-native/pull/2790), [#2809](https://github.com/getsentry/sentry-react-native/pull/2809), [#2828](https://github.com/getsentry/sentry-react-native/pull/2828))
|
|
80
|
+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#6140)
|
|
81
|
+
- [diff](https://github.com/getsentry/sentry-java/compare/6.12.1...6.14.0)
|
|
15
82
|
- Bump Sample React Native from v0.71.0 to v0.71.1 ([#2767](https://github.com/getsentry/sentry-react-native/pull/2767))
|
|
16
83
|
- [changelog](https://github.com/facebook/react-native/blob/main/CHANGELOG.md#v0711)
|
|
17
84
|
- [diff](https://github.com/facebook/react-native/compare/v0.71.0...v0.71.1)
|
|
18
|
-
- Bump JavaScript SDK from v7.32.1 to v7.
|
|
19
|
-
- [changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md#
|
|
20
|
-
- [diff](https://github.com/getsentry/sentry-javascript/compare/7.32.1...7.
|
|
85
|
+
- Bump JavaScript SDK from v7.32.1 to v7.37.2 ([#2785](https://github.com/getsentry/sentry-react-native/pull/2785), [#2799](https://github.com/getsentry/sentry-react-native/pull/2799), [#2818](https://github.com/getsentry/sentry-react-native/pull/2818))
|
|
86
|
+
- [changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md#7372)
|
|
87
|
+
- [diff](https://github.com/getsentry/sentry-javascript/compare/7.32.1...7.37.2)
|
|
21
88
|
|
|
22
89
|
## 5.0.0-beta.1
|
|
23
90
|
|
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ _Bad software is everywhere, and we're tired of it. Sentry is on a mission to he
|
|
|
21
21
|
|
|
22
22
|
## Requirements
|
|
23
23
|
|
|
24
|
-
- `react-native >= 0.
|
|
24
|
+
- `react-native >= 0.65.0`
|
|
25
25
|
|
|
26
26
|
## Features
|
|
27
27
|
|
|
@@ -34,6 +34,7 @@ _Bad software is everywhere, and we're tired of it. Sentry is on a mission to he
|
|
|
34
34
|
- RAM bundle support
|
|
35
35
|
- Hermes support
|
|
36
36
|
- Expo support ([sentry-expo](https://github.com/expo/sentry-expo))
|
|
37
|
+
- RN New Architecture support
|
|
37
38
|
|
|
38
39
|
## Installation and Usage
|
|
39
40
|
|
|
@@ -43,14 +44,10 @@ To install the package:
|
|
|
43
44
|
npm install --save @sentry/react-native
|
|
44
45
|
# OR
|
|
45
46
|
yarn add @sentry/react-native
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
If you are using a version of React Native <= 0.60.x link the package using `react-native`.
|
|
49
47
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
SENTRY_WIZARD_URL=http://sentry.acme.com/ react-native link @sentry/react-native
|
|
48
|
+
# AND
|
|
49
|
+
npx @sentry/wizard -i reactNative -p ios android
|
|
50
|
+
npx pod-install
|
|
54
51
|
```
|
|
55
52
|
|
|
56
53
|
How to use it:
|
package/android/build.gradle
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactnativeerrorhandlers.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/reactnativeerrorhandlers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAa,WAAW,EAAiB,MAAM,eAAe,CAAC;AAM3E,uCAAuC;AACvC,UAAU,+BAA+B;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAOD,2CAA2C;AAC3C,qBAAa,wBAAyB,YAAW,WAAW;IAC1D;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAA8B;IAEtD;;OAEG;IACI,IAAI,EAAE,MAAM,CAA+B;IAElD,yBAAyB;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkC;IAE3D,kBAAkB;gBACC,OAAO,CAAC,EAAE,OAAO,CAAC,+BAA+B,CAAC;IASrE;;OAEG;IACI,SAAS,IAAI,IAAI;IAKxB;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAUlC;;;;;;;;OAQG;IACH,OAAO,CAAC,gBAAgB;IAgBxB;;OAEG;IACH,OAAO,CAAC,gCAAgC;IAyCxC;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAmB5B;;OAEG;IACH,OAAO,CAAC,cAAc;
|
|
1
|
+
{"version":3,"file":"reactnativeerrorhandlers.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/reactnativeerrorhandlers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAa,WAAW,EAAiB,MAAM,eAAe,CAAC;AAM3E,uCAAuC;AACvC,UAAU,+BAA+B;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAOD,2CAA2C;AAC3C,qBAAa,wBAAyB,YAAW,WAAW;IAC1D;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAA8B;IAEtD;;OAEG;IACI,IAAI,EAAE,MAAM,CAA+B;IAElD,yBAAyB;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkC;IAE3D,kBAAkB;gBACC,OAAO,CAAC,EAAE,OAAO,CAAC,+BAA+B,CAAC;IASrE;;OAEG;IACI,SAAS,IAAI,IAAI;IAKxB;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAUlC;;;;;;;;OAQG;IACH,OAAO,CAAC,gBAAgB;IAgBxB;;OAEG;IACH,OAAO,CAAC,gCAAgC;IAyCxC;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAmB5B;;OAEG;IACH,OAAO,CAAC,cAAc;CA2EvB"}
|
|
@@ -109,9 +109,14 @@ export class ReactNativeErrorHandlers {
|
|
|
109
109
|
_handleOnError() {
|
|
110
110
|
if (this._options.onerror) {
|
|
111
111
|
let handlingFatal = false;
|
|
112
|
-
const
|
|
112
|
+
const errorUtils = RN_GLOBAL_OBJ.ErrorUtils;
|
|
113
|
+
if (!errorUtils) {
|
|
114
|
+
logger.warn('ErrorUtils not found. Can be caused by different environment for example react-native-web.');
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const defaultHandler = errorUtils.getGlobalHandler && errorUtils.getGlobalHandler();
|
|
113
118
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
114
|
-
|
|
119
|
+
errorUtils.setGlobalHandler((error, isFatal) => __awaiter(this, void 0, void 0, function* () {
|
|
115
120
|
// We want to handle fatals, but only in production mode.
|
|
116
121
|
const shouldHandleFatal = isFatal && !__DEV__;
|
|
117
122
|
if (shouldHandleFatal) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactnativeerrorhandlers.js","sourceRoot":"","sources":["../../../src/js/integrations/reactnativeerrorhandlers.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAG9D,OAAO,EAAE,aAAa,EA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BAED,UAAU,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;gBAErC,IAAI,CAAC,OAAO,EAAE;oBACZ,KAAK,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;wBAC3D,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;oBACjC,CAAC,CAAC,CAAC;iBACJ;qBAAM;oBACL,gFAAgF;oBAChF,mCAAmC;oBACnC,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;iBAChC;YACH,CAAC,CAAA,CAAC,CAAC;SACJ;IACH,CAAC;;AA9MD;;GAEG;AACW,2BAAE,GAAW,0BAA0B,CAAC","sourcesContent":["import { getCurrentHub } from '@sentry/core';\nimport type { EventHint, Integration, SeverityLevel } from '@sentry/types';\nimport { addExceptionMechanism, logger } from '@sentry/utils';\n\nimport type { ReactNativeClient } from '../client';\nimport { RN_GLOBAL_OBJ } from '../utils/worldwide';\n\n/** ReactNativeErrorHandlers Options */\ninterface ReactNativeErrorHandlersOptions {\n onerror: boolean;\n onunhandledrejection: boolean;\n patchGlobalPromise: boolean;\n}\n\ninterface PromiseRejectionTrackingOptions {\n onUnhandled: (id: string, error: unknown) => void;\n onHandled: (id: string) => void;\n}\n\n/** ReactNativeErrorHandlers Integration */\nexport class ReactNativeErrorHandlers implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'ReactNativeErrorHandlers';\n\n /**\n * @inheritDoc\n */\n public name: string = ReactNativeErrorHandlers.id;\n\n /** ReactNativeOptions */\n private readonly _options: ReactNativeErrorHandlersOptions;\n\n /** Constructor */\n public constructor(options?: Partial<ReactNativeErrorHandlersOptions>) {\n this._options = {\n onerror: true,\n onunhandledrejection: true,\n patchGlobalPromise: true,\n ...options,\n };\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n this._handleUnhandledRejections();\n this._handleOnError();\n }\n\n /**\n * Handle Promises\n */\n private _handleUnhandledRejections(): void {\n if (this._options.onunhandledrejection) {\n if (this._options.patchGlobalPromise) {\n this._polyfillPromise();\n }\n\n this._attachUnhandledRejectionHandler();\n this._checkPromiseAndWarn();\n }\n }\n /**\n * Polyfill the global promise instance with one we can be sure that we can attach the tracking to.\n *\n * In newer RN versions >=0.63, the global promise is not the same reference as the one imported from the promise library.\n * This is due to a version mismatch between promise versions.\n * Originally we tried a solution where we would have you put a package resolution to ensure the promise instances match. However,\n * - Using a package resolution requires the you to manually troubleshoot.\n * - The package resolution fix no longer works with 0.67 on iOS Hermes.\n */\n private _polyfillPromise(): void {\n /* eslint-disable import/no-extraneous-dependencies,@typescript-eslint/no-var-requires */\n const {\n polyfillGlobal,\n } = require('react-native/Libraries/Utilities/PolyfillFunctions');\n\n // Below, we follow the exact way React Native initializes its promise library, and we globally replace it.\n const Promise = require('promise/setimmediate/es6-extensions');\n\n // As of RN 0.67 only done and finally are used\n require('promise/setimmediate/done');\n require('promise/setimmediate/finally');\n\n polyfillGlobal('Promise', () => Promise);\n /* eslint-enable import/no-extraneous-dependencies,@typescript-eslint/no-var-requires */\n }\n /**\n * Attach the unhandled rejection handler\n */\n private _attachUnhandledRejectionHandler(): void {\n const tracking: {\n disable: () => void;\n enable: (arg: unknown) => void;\n // eslint-disable-next-line import/no-extraneous-dependencies,@typescript-eslint/no-var-requires\n } = require('promise/setimmediate/rejection-tracking');\n\n const promiseRejectionTrackingOptions: PromiseRejectionTrackingOptions = {\n onUnhandled: (id, rejection = {}) => {\n // eslint-disable-next-line no-console\n console.warn(\n `Possible Unhandled Promise Rejection (id: ${id}):\\n${rejection}`\n );\n },\n onHandled: (id) => {\n // eslint-disable-next-line no-console\n console.warn(\n `Promise Rejection Handled (id: ${id})\\n` +\n 'This means you can ignore any previous messages of the form ' +\n `\"Possible Unhandled Promise Rejection (id: ${id}):\"`\n );\n },\n };\n\n tracking.enable({\n allRejections: true,\n onUnhandled: (id: string, error: Error) => {\n if (__DEV__) {\n promiseRejectionTrackingOptions.onUnhandled(id, error);\n }\n\n getCurrentHub().captureException(error, {\n data: { id },\n originalException: error,\n });\n },\n onHandled: (id: string) => {\n promiseRejectionTrackingOptions.onHandled(id);\n },\n });\n }\n /**\n * Checks if the promise is the same one or not, if not it will warn the user\n */\n private _checkPromiseAndWarn(): void {\n try {\n // eslint-disable-next-line @typescript-eslint/no-var-requires,import/no-extraneous-dependencies\n const Promise = require('promise/setimmediate/es6-extensions');\n\n if (Promise !== RN_GLOBAL_OBJ.Promise) {\n logger.warn(\n 'Unhandled promise rejections will not be caught by Sentry. Read about how to fix this on our troubleshooting page.'\n );\n } else {\n logger.log('Unhandled promise rejections will be caught by Sentry.');\n }\n } catch (e) {\n // Do Nothing\n logger.warn(\n 'Unhandled promise rejections will not be caught by Sentry. Read about how to fix this on our troubleshooting page.'\n );\n }\n }\n /**\n * Handle errors\n */\n private _handleOnError(): void {\n if (this._options.onerror) {\n let handlingFatal = false;\n\n const defaultHandler =\n ErrorUtils.getGlobalHandler && ErrorUtils.getGlobalHandler();\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ErrorUtils.setGlobalHandler(async (error: any, isFatal?: boolean) => {\n // We want to handle fatals, but only in production mode.\n const shouldHandleFatal = isFatal && !__DEV__;\n if (shouldHandleFatal) {\n if (handlingFatal) {\n logger.log(\n 'Encountered multiple fatals in a row. The latest:',\n error\n );\n return;\n }\n handlingFatal = true;\n }\n\n const currentHub = getCurrentHub();\n const client = currentHub.getClient<ReactNativeClient>();\n const scope = currentHub.getScope();\n\n if (!client) {\n logger.error(\n 'Sentry client is missing, the error event might be lost.',\n error\n );\n\n // If there is no client something is fishy, anyway we call the default handler\n defaultHandler(error, isFatal);\n\n return;\n }\n\n const options = client.getOptions();\n\n const hint: EventHint = {\n originalException: error,\n attachments: scope?.getAttachments(),\n };\n const event = await client.eventFromException(error, hint);\n\n if (isFatal) {\n event.level = 'fatal' as SeverityLevel;\n\n addExceptionMechanism(event, {\n handled: false,\n type: 'onerror',\n });\n }\n\n currentHub.captureEvent(event, hint);\n\n if (!__DEV__) {\n void client.flush(options.shutdownTimeout || 2000).then(() => {\n defaultHandler(error, isFatal);\n });\n } else {\n // If in dev, we call the default handler anyway and hope the error will be sent\n // Just for a better dev experience\n defaultHandler(error, isFatal);\n }\n });\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"reactnativeerrorhandlers.js","sourceRoot":"","sources":["../../../src/js/integrations/reactnativeerrorhandlers.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAG9D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAcnD,2CAA2C;AAC3C,MAAM,OAAO,wBAAwB;IAcnC,kBAAkB;IAClB,YAAmB,OAAkD;QATrE;;WAEG;QACI,SAAI,GAAW,wBAAwB,CAAC,EAAE,CAAC;QAOhD,IAAI,CAAC,QAAQ,mBACX,OAAO,EAAE,IAAI,EACb,oBAAoB,EAAE,IAAI,EAC1B,kBAAkB,EAAE,IAAI,IACrB,OAAO,CACX,CAAC;IACJ,CAAC;IAED;;OAEG;IACI,SAAS;QACd,IAAI,CAAC,0BAA0B,EAAE,CAAC;QAClC,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IAED;;OAEG;IACK,0BAA0B;QAChC,IAAI,IAAI,CAAC,QAAQ,CAAC,oBAAoB,EAAE;YACtC,IAAI,IAAI,CAAC,QAAQ,CAAC,kBAAkB,EAAE;gBACpC,IAAI,CAAC,gBAAgB,EAAE,CAAC;aACzB;YAED,IAAI,CAAC,gCAAgC,EAAE,CAAC;YACxC,IAAI,CAAC,oBAAoB,EAAE,CAAC;SAC7B;IACH,CAAC;IACD;;;;;;;;OAQG;IACK,gBAAgB;QACtB,yFAAyF;QACzF,MAAM,EACJ,cAAc,GACf,GAAG,OAAO,CAAC,oDAAoD,CAAC,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,CAAC,KAAK,CACV,0DAA0D,EAC1D,KAAK,CACN,CAAC;oBAEF,+EAA+E;oBAC/E,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;oBAE/B,OAAO;iBACR;gBAED,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;gBAEpC,MAAM,IAAI,GAAc;oBACtB,iBAAiB,EAAE,KAAK;oBACxB,WAAW,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,cAAc,EAAE;iBACrC,CAAC;gBACF,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;gBAE3D,IAAI,OAAO,EAAE;oBACX,KAAK,CAAC,KAAK,GAAG,OAAwB,CAAC;oBAEvC,qBAAqB,CAAC,KAAK,EAAE;wBAC3B,OAAO,EAAE,KAAK;wBACd,IAAI,EAAE,SAAS;qBAChB,CAAC,CAAC;iBACJ;gBAED,UAAU,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;gBAErC,IAAI,CAAC,OAAO,EAAE;oBACZ,KAAK,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;wBAC3D,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;oBACjC,CAAC,CAAC,CAAC;iBACJ;qBAAM;oBACL,gFAAgF;oBAChF,mCAAmC;oBACnC,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;iBAChC;YACH,CAAC,CAAA,CAAC,CAAC;SACJ;IACH,CAAC;;AApND;;GAEG;AACW,2BAAE,GAAW,0BAA0B,CAAC","sourcesContent":["import { getCurrentHub } from '@sentry/core';\nimport type { EventHint, Integration, SeverityLevel } from '@sentry/types';\nimport { addExceptionMechanism, logger } from '@sentry/utils';\n\nimport type { ReactNativeClient } from '../client';\nimport { RN_GLOBAL_OBJ } from '../utils/worldwide';\n\n/** ReactNativeErrorHandlers Options */\ninterface ReactNativeErrorHandlersOptions {\n onerror: boolean;\n onunhandledrejection: boolean;\n patchGlobalPromise: boolean;\n}\n\ninterface PromiseRejectionTrackingOptions {\n onUnhandled: (id: string, error: unknown) => void;\n onHandled: (id: string) => void;\n}\n\n/** ReactNativeErrorHandlers Integration */\nexport class ReactNativeErrorHandlers implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'ReactNativeErrorHandlers';\n\n /**\n * @inheritDoc\n */\n public name: string = ReactNativeErrorHandlers.id;\n\n /** ReactNativeOptions */\n private readonly _options: ReactNativeErrorHandlersOptions;\n\n /** Constructor */\n public constructor(options?: Partial<ReactNativeErrorHandlersOptions>) {\n this._options = {\n onerror: true,\n onunhandledrejection: true,\n patchGlobalPromise: true,\n ...options,\n };\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n this._handleUnhandledRejections();\n this._handleOnError();\n }\n\n /**\n * Handle Promises\n */\n private _handleUnhandledRejections(): void {\n if (this._options.onunhandledrejection) {\n if (this._options.patchGlobalPromise) {\n this._polyfillPromise();\n }\n\n this._attachUnhandledRejectionHandler();\n this._checkPromiseAndWarn();\n }\n }\n /**\n * Polyfill the global promise instance with one we can be sure that we can attach the tracking to.\n *\n * In newer RN versions >=0.63, the global promise is not the same reference as the one imported from the promise library.\n * This is due to a version mismatch between promise versions.\n * Originally we tried a solution where we would have you put a package resolution to ensure the promise instances match. However,\n * - Using a package resolution requires the you to manually troubleshoot.\n * - The package resolution fix no longer works with 0.67 on iOS Hermes.\n */\n private _polyfillPromise(): void {\n /* eslint-disable import/no-extraneous-dependencies,@typescript-eslint/no-var-requires */\n const {\n polyfillGlobal,\n } = require('react-native/Libraries/Utilities/PolyfillFunctions');\n\n // Below, we follow the exact way React Native initializes its promise library, and we globally replace it.\n const Promise = require('promise/setimmediate/es6-extensions');\n\n // As of RN 0.67 only done and finally are used\n require('promise/setimmediate/done');\n require('promise/setimmediate/finally');\n\n polyfillGlobal('Promise', () => Promise);\n /* eslint-enable import/no-extraneous-dependencies,@typescript-eslint/no-var-requires */\n }\n /**\n * Attach the unhandled rejection handler\n */\n private _attachUnhandledRejectionHandler(): void {\n const tracking: {\n disable: () => void;\n enable: (arg: unknown) => void;\n // eslint-disable-next-line import/no-extraneous-dependencies,@typescript-eslint/no-var-requires\n } = require('promise/setimmediate/rejection-tracking');\n\n const promiseRejectionTrackingOptions: PromiseRejectionTrackingOptions = {\n onUnhandled: (id, rejection = {}) => {\n // eslint-disable-next-line no-console\n console.warn(\n `Possible Unhandled Promise Rejection (id: ${id}):\\n${rejection}`\n );\n },\n onHandled: (id) => {\n // eslint-disable-next-line no-console\n console.warn(\n `Promise Rejection Handled (id: ${id})\\n` +\n 'This means you can ignore any previous messages of the form ' +\n `\"Possible Unhandled Promise Rejection (id: ${id}):\"`\n );\n },\n };\n\n tracking.enable({\n allRejections: true,\n onUnhandled: (id: string, error: Error) => {\n if (__DEV__) {\n promiseRejectionTrackingOptions.onUnhandled(id, error);\n }\n\n getCurrentHub().captureException(error, {\n data: { id },\n originalException: error,\n });\n },\n onHandled: (id: string) => {\n promiseRejectionTrackingOptions.onHandled(id);\n },\n });\n }\n /**\n * Checks if the promise is the same one or not, if not it will warn the user\n */\n private _checkPromiseAndWarn(): void {\n try {\n // eslint-disable-next-line @typescript-eslint/no-var-requires,import/no-extraneous-dependencies\n const Promise = require('promise/setimmediate/es6-extensions');\n\n if (Promise !== RN_GLOBAL_OBJ.Promise) {\n logger.warn(\n 'Unhandled promise rejections will not be caught by Sentry. Read about how to fix this on our troubleshooting page.'\n );\n } else {\n logger.log('Unhandled promise rejections will be caught by Sentry.');\n }\n } catch (e) {\n // Do Nothing\n logger.warn(\n 'Unhandled promise rejections will not be caught by Sentry. Read about how to fix this on our troubleshooting page.'\n );\n }\n }\n /**\n * Handle errors\n */\n private _handleOnError(): void {\n if (this._options.onerror) {\n let handlingFatal = false;\n\n const errorUtils = RN_GLOBAL_OBJ.ErrorUtils;\n if (!errorUtils) {\n logger.warn('ErrorUtils not found. Can be caused by different environment for example react-native-web.');\n return;\n }\n\n const defaultHandler =\n errorUtils.getGlobalHandler && errorUtils.getGlobalHandler();\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n errorUtils.setGlobalHandler(async (error: any, isFatal?: boolean) => {\n // We want to handle fatals, but only in production mode.\n const shouldHandleFatal = isFatal && !__DEV__;\n if (shouldHandleFatal) {\n if (handlingFatal) {\n logger.log(\n 'Encountered multiple fatals in a row. The latest:',\n error\n );\n return;\n }\n handlingFatal = true;\n }\n\n const currentHub = getCurrentHub();\n const client = currentHub.getClient<ReactNativeClient>();\n const scope = currentHub.getScope();\n\n if (!client) {\n logger.error(\n 'Sentry client is missing, the error event might be lost.',\n error\n );\n\n // If there is no client something is fishy, anyway we call the default handler\n defaultHandler(error, isFatal);\n\n return;\n }\n\n const options = client.getOptions();\n\n const hint: EventHint = {\n originalException: error,\n attachments: scope?.getAttachments(),\n };\n const event = await client.eventFromException(error, hint);\n\n if (isFatal) {\n event.level = 'fatal' as SeverityLevel;\n\n addExceptionMechanism(event, {\n handled: false,\n type: 'onerror',\n });\n }\n\n currentHub.captureEvent(event, hint);\n\n if (!__DEV__) {\n void client.flush(options.shutdownTimeout || 2000).then(() => {\n defaultHandler(error, isFatal);\n });\n } else {\n // If in dev, we call the default handler anyway and hope the error will be sent\n // Just for a better dev experience\n defaultHandler(error, isFatal);\n }\n });\n }\n }\n}\n"]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This is a workaround for
|
|
3
|
-
* YellowBox deprecated and replaced with with LogBox in RN 0.63
|
|
2
|
+
* This is a workaround for using fetch on RN, this is a known issue in react-native and only generates a warning.
|
|
4
3
|
*/
|
|
5
4
|
export declare function ignoreRequireCycleLogs(): void;
|
|
6
5
|
//# sourceMappingURL=ignorerequirecyclelogs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ignorerequirecyclelogs.d.ts","sourceRoot":"","sources":["../../../src/js/utils/ignorerequirecyclelogs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ignorerequirecyclelogs.d.ts","sourceRoot":"","sources":["../../../src/js/utils/ignorerequirecyclelogs.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAE7C"}
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import { LogBox, YellowBox } from 'react-native';
|
|
1
|
+
import { LogBox } from 'react-native';
|
|
3
2
|
/**
|
|
4
|
-
* This is a workaround for
|
|
5
|
-
* YellowBox deprecated and replaced with with LogBox in RN 0.63
|
|
3
|
+
* This is a workaround for using fetch on RN, this is a known issue in react-native and only generates a warning.
|
|
6
4
|
*/
|
|
7
5
|
export function ignoreRequireCycleLogs() {
|
|
8
|
-
|
|
9
|
-
LogBox.ignoreLogs(['Require cycle:']);
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
YellowBox.ignoreWarnings(['Require cycle:']);
|
|
13
|
-
}
|
|
6
|
+
LogBox.ignoreLogs(['Require cycle:']);
|
|
14
7
|
}
|
|
15
8
|
//# sourceMappingURL=ignorerequirecyclelogs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ignorerequirecyclelogs.js","sourceRoot":"","sources":["../../../src/js/utils/ignorerequirecyclelogs.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"ignorerequirecyclelogs.js","sourceRoot":"","sources":["../../../src/js/utils/ignorerequirecyclelogs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACpC,MAAM,CAAC,UAAU,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;AACxC,CAAC","sourcesContent":["import { LogBox } from 'react-native';\n\n/**\n * This is a workaround for using fetch on RN, this is a known issue in react-native and only generates a warning.\n */\nexport function ignoreRequireCycleLogs(): void {\n LogBox.ignoreLogs(['Require cycle:']);\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { InternalGlobal } from '@sentry/utils';
|
|
2
|
+
import type { ErrorUtils } from 'react-native/types';
|
|
2
3
|
/** Internal Global object interface with common and Sentry specific properties */
|
|
3
4
|
export interface ReactNativeInternalGlobal extends InternalGlobal {
|
|
4
5
|
__sentry_rn_v4_registered?: boolean;
|
|
@@ -7,6 +8,7 @@ export interface ReactNativeInternalGlobal extends InternalGlobal {
|
|
|
7
8
|
Promise: unknown;
|
|
8
9
|
__turboModuleProxy: unknown;
|
|
9
10
|
nativeFabricUIManager: unknown;
|
|
11
|
+
ErrorUtils?: ErrorUtils;
|
|
10
12
|
}
|
|
11
13
|
/** Get's the global object for the current JavaScript runtime */
|
|
12
14
|
export declare const RN_GLOBAL_OBJ: ReactNativeInternalGlobal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worldwide.d.ts","sourceRoot":"","sources":["../../../src/js/utils/worldwide.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"worldwide.d.ts","sourceRoot":"","sources":["../../../src/js/utils/worldwide.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,kFAAkF;AAClF,MAAM,WAAW,yBAA0B,SAAQ,cAAc;IAC/D,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,iEAAiE;AACjE,eAAO,MAAM,aAAa,2BAA0C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worldwide.js","sourceRoot":"","sources":["../../../src/js/utils/worldwide.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"worldwide.js","sourceRoot":"","sources":["../../../src/js/utils/worldwide.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAc3C,iEAAiE;AACjE,MAAM,CAAC,MAAM,aAAa,GAAG,UAAuC,CAAC","sourcesContent":["import type { InternalGlobal } from '@sentry/utils';\nimport { GLOBAL_OBJ } from '@sentry/utils';\nimport type { ErrorUtils } from 'react-native/types';\n\n/** Internal Global object interface with common and Sentry specific properties */\nexport interface ReactNativeInternalGlobal extends InternalGlobal {\n __sentry_rn_v4_registered?: boolean;\n __sentry_rn_v5_registered?: boolean;\n HermesInternal: unknown;\n Promise: unknown;\n __turboModuleProxy: unknown;\n nativeFabricUIManager: unknown;\n ErrorUtils?: ErrorUtils;\n}\n\n/** Get's the global object for the current JavaScript runtime */\nexport const RN_GLOBAL_OBJ = GLOBAL_OBJ as ReactNativeInternalGlobal;\n"]}
|
package/dist/js/version.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const SDK_PACKAGE_NAME = "npm:@sentry/react-native";
|
|
2
2
|
export declare const SDK_NAME = "sentry.javascript.react-native";
|
|
3
|
-
export declare const SDK_VERSION = "5.0.0
|
|
3
|
+
export declare const SDK_VERSION = "5.0.0";
|
|
4
4
|
//# sourceMappingURL=version.d.ts.map
|
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,gBAAgB,6BAA6B,CAAC;AAC3D,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,gBAAgB,6BAA6B,CAAC;AAC3D,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,gBAAgB,GAAG,0BAA0B,CAAC;AAC3D,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,gBAAgB,GAAG,0BAA0B,CAAC;AAC3D,MAAM,CAAC,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AACzD,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC","sourcesContent":["export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';\nexport const SDK_NAME = 'sentry.javascript.react-native';\nexport const SDK_VERSION = '5.0.0';\n"]}
|
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
|
|
5
|
+
"version": "5.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",
|
|
@@ -42,19 +42,19 @@
|
|
|
42
42
|
"react-native": ">=0.65.0"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@sentry/browser": "7.
|
|
45
|
+
"@sentry/browser": "7.37.2",
|
|
46
46
|
"@sentry/cli": "2.10.0",
|
|
47
|
-
"@sentry/core": "7.
|
|
48
|
-
"@sentry/hub": "7.
|
|
49
|
-
"@sentry/integrations": "7.
|
|
50
|
-
"@sentry/react": "7.
|
|
51
|
-
"@sentry/tracing": "7.
|
|
52
|
-
"@sentry/types": "7.
|
|
53
|
-
"@sentry/utils": "7.
|
|
47
|
+
"@sentry/core": "7.37.2",
|
|
48
|
+
"@sentry/hub": "7.37.2",
|
|
49
|
+
"@sentry/integrations": "7.37.2",
|
|
50
|
+
"@sentry/react": "7.37.2",
|
|
51
|
+
"@sentry/tracing": "7.37.2",
|
|
52
|
+
"@sentry/types": "7.37.2",
|
|
53
|
+
"@sentry/utils": "7.37.2"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@sentry-internal/eslint-config-sdk": "7.
|
|
57
|
-
"@sentry-internal/eslint-plugin-sdk": "7.
|
|
56
|
+
"@sentry-internal/eslint-config-sdk": "7.37.2",
|
|
57
|
+
"@sentry-internal/eslint-plugin-sdk": "7.37.2",
|
|
58
58
|
"@sentry/typescript": "^5.20.1",
|
|
59
59
|
"@sentry/wizard": "2.2.0",
|
|
60
60
|
"@types/jest": "^29.2.5",
|