@commercetools-frontend/sentry 24.12.0 → 25.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.
|
@@ -46,7 +46,7 @@ var history__default = /*#__PURE__*/_interopDefault(history);
|
|
|
46
46
|
var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construct);
|
|
47
47
|
|
|
48
48
|
// NOTE: This string will be replaced on build time with the package version.
|
|
49
|
-
var version = "
|
|
49
|
+
var version = "25.0.0";
|
|
50
50
|
|
|
51
51
|
const makeErrorToCapture = error => {
|
|
52
52
|
if (error instanceof Error) return error;
|
|
@@ -117,7 +117,9 @@ const boot = () => {
|
|
|
117
117
|
// we can implement the `tracesSampler` function.
|
|
118
118
|
// https://docs.sentry.io/platforms/javascript/guides/react/configuration/sampling/#sampling-transaction-events
|
|
119
119
|
tracesSampleRate: 0.05,
|
|
120
|
-
|
|
120
|
+
// v8 requires the hint parameter which provides additional error context.
|
|
121
|
+
// We only redact PII from event fields, so hint is unused for now.
|
|
122
|
+
beforeSend(event, _hint) {
|
|
121
123
|
return redactUnsafeEventFields(event);
|
|
122
124
|
}
|
|
123
125
|
});
|
|
@@ -155,7 +157,7 @@ const reportErrorToSentry = (error, extraInfo, getIsEnabled) => {
|
|
|
155
157
|
// The error stack should be available in Sentry, so there is no
|
|
156
158
|
// need to print it in the console as well.
|
|
157
159
|
// We just notify that an error occurred and provide the error ID.
|
|
158
|
-
console.error("[SENTRY]: An error
|
|
160
|
+
console.error("[SENTRY]: An error occurred (ID: ".concat(errorId, ")."));
|
|
159
161
|
return errorId;
|
|
160
162
|
}
|
|
161
163
|
console.error('[SENTRY]:', error);
|
|
@@ -225,9 +227,7 @@ let SentryUserLogoutTracker = /*#__PURE__*/function (_Component) {
|
|
|
225
227
|
// When the user is not logged in anymore (e.g. on logout) we still track
|
|
226
228
|
// errors but without the user data in context.
|
|
227
229
|
if (window.app.trackingSentry) {
|
|
228
|
-
Sentry__namespace.
|
|
229
|
-
scope.clear();
|
|
230
|
-
});
|
|
230
|
+
Sentry__namespace.getCurrentScope().clear();
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
}, {
|
|
@@ -46,7 +46,7 @@ var history__default = /*#__PURE__*/_interopDefault(history);
|
|
|
46
46
|
var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construct);
|
|
47
47
|
|
|
48
48
|
// NOTE: This string will be replaced on build time with the package version.
|
|
49
|
-
var version = "
|
|
49
|
+
var version = "25.0.0";
|
|
50
50
|
|
|
51
51
|
const makeErrorToCapture = error => {
|
|
52
52
|
if (error instanceof Error) return error;
|
|
@@ -117,7 +117,9 @@ const boot = () => {
|
|
|
117
117
|
// we can implement the `tracesSampler` function.
|
|
118
118
|
// https://docs.sentry.io/platforms/javascript/guides/react/configuration/sampling/#sampling-transaction-events
|
|
119
119
|
tracesSampleRate: 0.05,
|
|
120
|
-
|
|
120
|
+
// v8 requires the hint parameter which provides additional error context.
|
|
121
|
+
// We only redact PII from event fields, so hint is unused for now.
|
|
122
|
+
beforeSend(event, _hint) {
|
|
121
123
|
return redactUnsafeEventFields(event);
|
|
122
124
|
}
|
|
123
125
|
});
|
|
@@ -155,7 +157,7 @@ const reportErrorToSentry = (error, extraInfo, getIsEnabled) => {
|
|
|
155
157
|
// The error stack should be available in Sentry, so there is no
|
|
156
158
|
// need to print it in the console as well.
|
|
157
159
|
// We just notify that an error occurred and provide the error ID.
|
|
158
|
-
console.error("[SENTRY]: An error
|
|
160
|
+
console.error("[SENTRY]: An error occurred (ID: ".concat(errorId, ")."));
|
|
159
161
|
return errorId;
|
|
160
162
|
}
|
|
161
163
|
console.error('[SENTRY]:', error);
|
|
@@ -225,9 +227,7 @@ let SentryUserLogoutTracker = /*#__PURE__*/function (_Component) {
|
|
|
225
227
|
// When the user is not logged in anymore (e.g. on logout) we still track
|
|
226
228
|
// errors but without the user data in context.
|
|
227
229
|
if (window.app.trackingSentry) {
|
|
228
|
-
Sentry__namespace.
|
|
229
|
-
scope.clear();
|
|
230
|
-
});
|
|
230
|
+
Sentry__namespace.getCurrentScope().clear();
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
}, {
|
|
@@ -14,7 +14,7 @@ import _inherits from '@babel/runtime-corejs3/helpers/esm/inherits';
|
|
|
14
14
|
import { PureComponent, Component } from 'react';
|
|
15
15
|
|
|
16
16
|
// NOTE: This string will be replaced on build time with the package version.
|
|
17
|
-
var version = "
|
|
17
|
+
var version = "25.0.0";
|
|
18
18
|
|
|
19
19
|
const makeErrorToCapture = error => {
|
|
20
20
|
if (error instanceof Error) return error;
|
|
@@ -85,7 +85,9 @@ const boot = () => {
|
|
|
85
85
|
// we can implement the `tracesSampler` function.
|
|
86
86
|
// https://docs.sentry.io/platforms/javascript/guides/react/configuration/sampling/#sampling-transaction-events
|
|
87
87
|
tracesSampleRate: 0.05,
|
|
88
|
-
|
|
88
|
+
// v8 requires the hint parameter which provides additional error context.
|
|
89
|
+
// We only redact PII from event fields, so hint is unused for now.
|
|
90
|
+
beforeSend(event, _hint) {
|
|
89
91
|
return redactUnsafeEventFields(event);
|
|
90
92
|
}
|
|
91
93
|
});
|
|
@@ -123,7 +125,7 @@ const reportErrorToSentry = (error, extraInfo, getIsEnabled) => {
|
|
|
123
125
|
// The error stack should be available in Sentry, so there is no
|
|
124
126
|
// need to print it in the console as well.
|
|
125
127
|
// We just notify that an error occurred and provide the error ID.
|
|
126
|
-
console.error("[SENTRY]: An error
|
|
128
|
+
console.error("[SENTRY]: An error occurred (ID: ".concat(errorId, ")."));
|
|
127
129
|
return errorId;
|
|
128
130
|
}
|
|
129
131
|
console.error('[SENTRY]:', error);
|
|
@@ -193,9 +195,7 @@ let SentryUserLogoutTracker = /*#__PURE__*/function (_Component) {
|
|
|
193
195
|
// When the user is not logged in anymore (e.g. on logout) we still track
|
|
194
196
|
// errors but without the user data in context.
|
|
195
197
|
if (window.app.trackingSentry) {
|
|
196
|
-
Sentry.
|
|
197
|
-
scope.clear();
|
|
198
|
-
});
|
|
198
|
+
Sentry.getCurrentScope().clear();
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
}, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/sentry",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.0.0",
|
|
4
4
|
"description": "Components to set up Sentry for a MC application",
|
|
5
5
|
"bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
6
6
|
"repository": {
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@babel/runtime": "^7.22.15",
|
|
32
32
|
"@babel/runtime-corejs3": "^7.22.15",
|
|
33
|
-
"@commercetools-frontend/browser-history": "
|
|
34
|
-
"@commercetools-frontend/constants": "
|
|
35
|
-
"@sentry/browser": "
|
|
36
|
-
"@sentry/react": "
|
|
37
|
-
"@sentry/types": "
|
|
33
|
+
"@commercetools-frontend/browser-history": "25.0.0",
|
|
34
|
+
"@commercetools-frontend/constants": "25.0.0",
|
|
35
|
+
"@sentry/browser": "8.55.0",
|
|
36
|
+
"@sentry/react": "8.55.0",
|
|
37
|
+
"@sentry/types": "8.55.0",
|
|
38
38
|
"@types/prop-types": "^15.7.5",
|
|
39
39
|
"@types/react": "^19.0.3",
|
|
40
40
|
"prop-types": "15.8.1"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@emotion/react": "^11.14.0",
|
|
44
44
|
"@types/jest": "^29.5.14",
|
|
45
|
-
"jest": "
|
|
45
|
+
"jest": "30.2.0",
|
|
46
46
|
"react": "19.0.0",
|
|
47
47
|
"sentry-testkit": "5.0.10",
|
|
48
48
|
"wait-for-expect": "3.0.2"
|