@commercetools-frontend/sentry 27.9.0 → 27.9.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.
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
6
6
  var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
7
7
  var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
8
+ var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
8
9
  var Sentry = require('@sentry/react');
9
10
  var browser = require('@sentry/browser');
10
11
  var history = require('@commercetools-frontend/browser-history');
@@ -39,12 +40,13 @@ function _interopNamespace(e) {
39
40
  var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
40
41
  var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
41
42
  var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
43
+ var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
42
44
  var Sentry__namespace = /*#__PURE__*/_interopNamespace(Sentry);
43
45
  var history__default = /*#__PURE__*/_interopDefault(history);
44
46
  var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construct);
45
47
 
46
48
  // NOTE: This string will be replaced on build time with the package version.
47
- var version = "27.9.0";
49
+ var version = "27.9.1";
48
50
 
49
51
  const makeErrorToCapture = error => {
50
52
  if (error instanceof Error) return error;
@@ -91,10 +93,11 @@ const redactUnsafeEventFields = event => {
91
93
  };
92
94
  const boot = () => {
93
95
  if (window.app.trackingSentry && window.app.trackingSentry !== 'null') {
96
+ var _context2;
94
97
  Sentry__namespace.init({
95
98
  dsn: window.app.trackingSentry,
96
99
  release: window.app.revision,
97
- environment: `${window.app.env}-${window.app.location}`,
100
+ environment: _concatInstanceProperty__default["default"](_context2 = "".concat(window.app.env, "-")).call(_context2, window.app.location),
98
101
  // In order to reduce the noise in sentry we only track errors that come
99
102
  // from our code and ignore errors that come from other services
100
103
  // https://blog.sentry.io/2017/03/27/tips-for-reducing-javascript-error-noise.html
@@ -123,7 +126,7 @@ const boot = () => {
123
126
  const sentryScope = Sentry__namespace.getCurrentScope();
124
127
  sentryScope.setTag('role', 'frontend');
125
128
  sentryScope.setTag('applicationName', window.app.applicationName);
126
- sentryScope.setTag('service', `merchant-center-frontend-${window.app.applicationName}`);
129
+ sentryScope.setTag('service', "merchant-center-frontend-".concat(window.app.applicationName));
127
130
  }
128
131
  };
129
132
  const isExtraAsObject = extrasOrExtra => typeof extrasOrExtra === 'object';
@@ -133,7 +136,7 @@ const reportErrorToSentry = (error, extraInfo, getIsEnabled) => {
133
136
  console.warn('[SENTRY]: You called "reportErrorToSentry" with a string argument. ' + '"Error" objects should be preferred so that a stack-trace can be made available in Sentry. ' + 'See: https://docs.sentry.io/clients/javascript/usage/#try-catch');
134
137
  }
135
138
  if (isEnabled) {
136
- if (extraInfo?.extra) {
139
+ if (extraInfo !== null && extraInfo !== void 0 && extraInfo.extra) {
137
140
  if (isExtraAsObject(extraInfo.extra)) {
138
141
  // See https://docs.sentry.io/platforms/javascript/react/
139
142
  Sentry__namespace.setExtras(extraInfo.extra);
@@ -154,7 +157,7 @@ const reportErrorToSentry = (error, extraInfo, getIsEnabled) => {
154
157
  // The error stack should be available in Sentry, so there is no
155
158
  // need to print it in the console as well.
156
159
  // We just notify that an error occurred and provide the error ID.
157
- console.error(`[SENTRY]: An error occurred (ID: ${errorId}).`);
160
+ console.error("[SENTRY]: An error occurred (ID: ".concat(errorId, ")."));
158
161
  return errorId;
159
162
  }
160
163
  console.error('[SENTRY]:', error);
@@ -181,7 +184,7 @@ let SentryUserTracker = /*#__PURE__*/function (_PureComponent) {
181
184
  // by only sending the domain part or the email
182
185
  const emailTld = _this.props.user.email.split('@')[1];
183
186
  Sentry__namespace.setUser({
184
- email: `xxx@${emailTld}`,
187
+ email: "xxx@".concat(emailTld),
185
188
  id: _this.props.user.id
186
189
  });
187
190
  }
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
6
6
  var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
7
7
  var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
8
+ var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
8
9
  var Sentry = require('@sentry/react');
9
10
  var browser = require('@sentry/browser');
10
11
  var history = require('@commercetools-frontend/browser-history');
@@ -39,12 +40,13 @@ function _interopNamespace(e) {
39
40
  var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
40
41
  var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
41
42
  var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
43
+ var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
42
44
  var Sentry__namespace = /*#__PURE__*/_interopNamespace(Sentry);
43
45
  var history__default = /*#__PURE__*/_interopDefault(history);
44
46
  var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construct);
45
47
 
46
48
  // NOTE: This string will be replaced on build time with the package version.
47
- var version = "27.9.0";
49
+ var version = "27.9.1";
48
50
 
49
51
  const makeErrorToCapture = error => {
50
52
  if (error instanceof Error) return error;
@@ -91,10 +93,11 @@ const redactUnsafeEventFields = event => {
91
93
  };
92
94
  const boot = () => {
93
95
  if (window.app.trackingSentry && window.app.trackingSentry !== 'null') {
96
+ var _context2;
94
97
  Sentry__namespace.init({
95
98
  dsn: window.app.trackingSentry,
96
99
  release: window.app.revision,
97
- environment: `${window.app.env}-${window.app.location}`,
100
+ environment: _concatInstanceProperty__default["default"](_context2 = "".concat(window.app.env, "-")).call(_context2, window.app.location),
98
101
  // In order to reduce the noise in sentry we only track errors that come
99
102
  // from our code and ignore errors that come from other services
100
103
  // https://blog.sentry.io/2017/03/27/tips-for-reducing-javascript-error-noise.html
@@ -123,7 +126,7 @@ const boot = () => {
123
126
  const sentryScope = Sentry__namespace.getCurrentScope();
124
127
  sentryScope.setTag('role', 'frontend');
125
128
  sentryScope.setTag('applicationName', window.app.applicationName);
126
- sentryScope.setTag('service', `merchant-center-frontend-${window.app.applicationName}`);
129
+ sentryScope.setTag('service', "merchant-center-frontend-".concat(window.app.applicationName));
127
130
  }
128
131
  };
129
132
  const isExtraAsObject = extrasOrExtra => typeof extrasOrExtra === 'object';
@@ -133,7 +136,7 @@ const reportErrorToSentry = (error, extraInfo, getIsEnabled) => {
133
136
  console.warn('[SENTRY]: You called "reportErrorToSentry" with a string argument. ' + '"Error" objects should be preferred so that a stack-trace can be made available in Sentry. ' + 'See: https://docs.sentry.io/clients/javascript/usage/#try-catch');
134
137
  }
135
138
  if (isEnabled) {
136
- if (extraInfo?.extra) {
139
+ if (extraInfo !== null && extraInfo !== void 0 && extraInfo.extra) {
137
140
  if (isExtraAsObject(extraInfo.extra)) {
138
141
  // See https://docs.sentry.io/platforms/javascript/react/
139
142
  Sentry__namespace.setExtras(extraInfo.extra);
@@ -154,7 +157,7 @@ const reportErrorToSentry = (error, extraInfo, getIsEnabled) => {
154
157
  // The error stack should be available in Sentry, so there is no
155
158
  // need to print it in the console as well.
156
159
  // We just notify that an error occurred and provide the error ID.
157
- console.error(`[SENTRY]: An error occurred (ID: ${errorId}).`);
160
+ console.error("[SENTRY]: An error occurred (ID: ".concat(errorId, ")."));
158
161
  return errorId;
159
162
  }
160
163
  console.error('[SENTRY]:', error);
@@ -181,7 +184,7 @@ let SentryUserTracker = /*#__PURE__*/function (_PureComponent) {
181
184
  // by only sending the domain part or the email
182
185
  const emailTld = _this.props.user.email.split('@')[1];
183
186
  Sentry__namespace.setUser({
184
- email: `xxx@${emailTld}`,
187
+ email: "xxx@".concat(emailTld),
185
188
  id: _this.props.user.id
186
189
  });
187
190
  }
@@ -1,6 +1,7 @@
1
1
  import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringify';
2
2
  import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
3
3
  import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
4
+ import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
4
5
  import * as Sentry from '@sentry/react';
5
6
  import { globalHandlersIntegration } from '@sentry/browser';
6
7
  import history from '@commercetools-frontend/browser-history';
@@ -13,7 +14,7 @@ import _inherits from '@babel/runtime-corejs3/helpers/esm/inherits';
13
14
  import { PureComponent, Component } from 'react';
14
15
 
15
16
  // NOTE: This string will be replaced on build time with the package version.
16
- var version = "27.9.0";
17
+ var version = "27.9.1";
17
18
 
18
19
  const makeErrorToCapture = error => {
19
20
  if (error instanceof Error) return error;
@@ -60,10 +61,11 @@ const redactUnsafeEventFields = event => {
60
61
  };
61
62
  const boot = () => {
62
63
  if (window.app.trackingSentry && window.app.trackingSentry !== 'null') {
64
+ var _context2;
63
65
  Sentry.init({
64
66
  dsn: window.app.trackingSentry,
65
67
  release: window.app.revision,
66
- environment: `${window.app.env}-${window.app.location}`,
68
+ environment: _concatInstanceProperty(_context2 = "".concat(window.app.env, "-")).call(_context2, window.app.location),
67
69
  // In order to reduce the noise in sentry we only track errors that come
68
70
  // from our code and ignore errors that come from other services
69
71
  // https://blog.sentry.io/2017/03/27/tips-for-reducing-javascript-error-noise.html
@@ -92,7 +94,7 @@ const boot = () => {
92
94
  const sentryScope = Sentry.getCurrentScope();
93
95
  sentryScope.setTag('role', 'frontend');
94
96
  sentryScope.setTag('applicationName', window.app.applicationName);
95
- sentryScope.setTag('service', `merchant-center-frontend-${window.app.applicationName}`);
97
+ sentryScope.setTag('service', "merchant-center-frontend-".concat(window.app.applicationName));
96
98
  }
97
99
  };
98
100
  const isExtraAsObject = extrasOrExtra => typeof extrasOrExtra === 'object';
@@ -102,7 +104,7 @@ const reportErrorToSentry = (error, extraInfo, getIsEnabled) => {
102
104
  console.warn('[SENTRY]: You called "reportErrorToSentry" with a string argument. ' + '"Error" objects should be preferred so that a stack-trace can be made available in Sentry. ' + 'See: https://docs.sentry.io/clients/javascript/usage/#try-catch');
103
105
  }
104
106
  if (isEnabled) {
105
- if (extraInfo?.extra) {
107
+ if (extraInfo !== null && extraInfo !== void 0 && extraInfo.extra) {
106
108
  if (isExtraAsObject(extraInfo.extra)) {
107
109
  // See https://docs.sentry.io/platforms/javascript/react/
108
110
  Sentry.setExtras(extraInfo.extra);
@@ -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 occurred (ID: ${errorId}).`);
128
+ console.error("[SENTRY]: An error occurred (ID: ".concat(errorId, ")."));
127
129
  return errorId;
128
130
  }
129
131
  console.error('[SENTRY]:', error);
@@ -150,7 +152,7 @@ let SentryUserTracker = /*#__PURE__*/function (_PureComponent) {
150
152
  // by only sending the domain part or the email
151
153
  const emailTld = _this.props.user.email.split('@')[1];
152
154
  Sentry.setUser({
153
- email: `xxx@${emailTld}`,
155
+ email: "xxx@".concat(emailTld),
154
156
  id: _this.props.user.id
155
157
  });
156
158
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/sentry",
3
- "version": "27.9.0",
3
+ "version": "27.9.1",
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,22 +30,22 @@
30
30
  "dependencies": {
31
31
  "@babel/runtime": "^7.22.15",
32
32
  "@babel/runtime-corejs3": "^7.22.15",
33
- "@sentry/browser": "8.55.0",
34
- "@sentry/react": "8.55.0",
35
- "@sentry/types": "8.55.0",
33
+ "@sentry/browser": "8.55.2",
34
+ "@sentry/react": "8.55.2",
35
+ "@sentry/types": "8.55.2",
36
36
  "@types/prop-types": "^15.7.5",
37
37
  "@types/react": "^19.0.3",
38
38
  "prop-types": "15.8.1",
39
- "@commercetools-frontend/browser-history": "^27.9.0",
40
- "@commercetools-frontend/constants": "^27.9.0"
39
+ "@commercetools-frontend/browser-history": "^27.9.1",
40
+ "@commercetools-frontend/constants": "^27.9.1"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@emotion/react": "^11.14.0",
44
44
  "@types/jest": "^29.5.14",
45
45
  "jest": "30.2.0",
46
- "react": "19.0.0",
47
- "sentry-testkit": "6.2.2",
48
- "wait-for-expect": "3.0.2"
46
+ "react": "19.2.8",
47
+ "sentry-testkit": "6.4.1",
48
+ "wait-for-expect": "4.0.0"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "react": "19.x"