@commercetools-frontend/sentry 24.7.1 → 24.8.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.
@@ -1,2 +1,2 @@
1
- export * from "./declarations/src/index";
2
- //# sourceMappingURL=commercetools-frontend-sentry.cjs.d.ts.map
1
+ export * from "./declarations/src/index.js";
2
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWVyY2V0b29scy1mcm9udGVuZC1zZW50cnkuY2pzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuL2RlY2xhcmF0aW9ucy9zcmMvaW5kZXguZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9
@@ -11,10 +11,9 @@ var history = require('@commercetools-frontend/browser-history');
11
11
  var _Reflect$construct = require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
12
12
  var _classCallCheck = require('@babel/runtime-corejs3/helpers/classCallCheck');
13
13
  var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
14
- var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
15
14
  var _possibleConstructorReturn = require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
16
15
  var _getPrototypeOf = require('@babel/runtime-corejs3/helpers/getPrototypeOf');
17
- var _pt = require('prop-types');
16
+ var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
18
17
  var react = require('react');
19
18
 
20
19
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
@@ -43,10 +42,9 @@ var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
43
42
  var Sentry__namespace = /*#__PURE__*/_interopNamespace(Sentry);
44
43
  var history__default = /*#__PURE__*/_interopDefault(history);
45
44
  var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construct);
46
- var _pt__default = /*#__PURE__*/_interopDefault(_pt);
47
45
 
48
46
  // NOTE: This string will be replaced on build time with the package version.
49
- var version = "24.7.1";
47
+ var version = "24.8.0";
50
48
 
51
49
  const makeErrorToCapture = error => {
52
50
  if (error instanceof Error) return error;
@@ -161,22 +159,20 @@ const reportErrorToSentry = (error, extraInfo, getIsEnabled) => {
161
159
  return undefined;
162
160
  };
163
161
 
164
- function _createSuper$1(t) { var r = _isNativeReflectConstruct$1(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = _Reflect$construct__default["default"](o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
162
+ function _callSuper$1(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
165
163
  function _isNativeReflectConstruct$1() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$1 = function () { return !!t; })(); }
166
164
  /**
167
165
  * This component will let sentry know if any information about the user has
168
166
  * changed.
169
167
  */
170
168
  let SentryUserTracker = /*#__PURE__*/function (_PureComponent) {
171
- _inherits(SentryUserTracker, _PureComponent);
172
- var _super = _createSuper$1(SentryUserTracker);
173
169
  function SentryUserTracker() {
174
170
  var _this;
175
171
  _classCallCheck(this, SentryUserTracker);
176
172
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
177
173
  args[_key] = arguments[_key];
178
174
  }
179
- _this = _super.call(this, ...args);
175
+ _this = _callSuper$1(this, SentryUserTracker, [...args]);
180
176
  _this.syncUser = () => {
181
177
  if (_this.props.user && window.app.trackingSentry) {
182
178
  // to avoid sending personal data to sentry we anonymize the email address
@@ -190,7 +186,8 @@ let SentryUserTracker = /*#__PURE__*/function (_PureComponent) {
190
186
  };
191
187
  return _this;
192
188
  }
193
- _createClass(SentryUserTracker, [{
189
+ _inherits(SentryUserTracker, _PureComponent);
190
+ return _createClass(SentryUserTracker, [{
194
191
  key: "componentDidMount",
195
192
  value: function componentDidMount() {
196
193
  // since the user and project could have been loaded from the apollo cache
@@ -208,26 +205,18 @@ let SentryUserTracker = /*#__PURE__*/function (_PureComponent) {
208
205
  return null;
209
206
  }
210
207
  }]);
211
- return SentryUserTracker;
212
208
  }(react.PureComponent);
213
209
  SentryUserTracker.displayName = 'SentryUserTracker';
214
- SentryUserTracker.propTypes = process.env.NODE_ENV !== "production" ? {
215
- user: _pt__default["default"].shape({
216
- id: _pt__default["default"].string.isRequired,
217
- email: _pt__default["default"].string.isRequired
218
- })
219
- } : {};
220
210
 
221
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = _Reflect$construct__default["default"](o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
211
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
222
212
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
223
213
  let SentryUserLogoutTracker = /*#__PURE__*/function (_Component) {
224
- _inherits(SentryUserLogoutTracker, _Component);
225
- var _super = _createSuper(SentryUserLogoutTracker);
226
214
  function SentryUserLogoutTracker() {
227
215
  _classCallCheck(this, SentryUserLogoutTracker);
228
- return _super.apply(this, arguments);
216
+ return _callSuper(this, SentryUserLogoutTracker, arguments);
229
217
  }
230
- _createClass(SentryUserLogoutTracker, [{
218
+ _inherits(SentryUserLogoutTracker, _Component);
219
+ return _createClass(SentryUserLogoutTracker, [{
231
220
  key: "componentDidMount",
232
221
  value: function componentDidMount() {
233
222
  // When the user is not logged in anymore (e.g. on logout) we still track
@@ -244,7 +233,6 @@ let SentryUserLogoutTracker = /*#__PURE__*/function (_Component) {
244
233
  return null;
245
234
  }
246
235
  }]);
247
- return SentryUserLogoutTracker;
248
236
  }(react.Component);
249
237
  SentryUserLogoutTracker.displayName = 'SentryUserLogoutTracker';
250
238
 
@@ -11,10 +11,9 @@ var history = require('@commercetools-frontend/browser-history');
11
11
  var _Reflect$construct = require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
12
12
  var _classCallCheck = require('@babel/runtime-corejs3/helpers/classCallCheck');
13
13
  var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
14
- var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
15
14
  var _possibleConstructorReturn = require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
16
15
  var _getPrototypeOf = require('@babel/runtime-corejs3/helpers/getPrototypeOf');
17
- require('prop-types');
16
+ var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
18
17
  var react = require('react');
19
18
 
20
19
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
@@ -45,7 +44,7 @@ var history__default = /*#__PURE__*/_interopDefault(history);
45
44
  var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construct);
46
45
 
47
46
  // NOTE: This string will be replaced on build time with the package version.
48
- var version = "24.7.1";
47
+ var version = "24.8.0";
49
48
 
50
49
  const makeErrorToCapture = error => {
51
50
  if (error instanceof Error) return error;
@@ -160,22 +159,20 @@ const reportErrorToSentry = (error, extraInfo, getIsEnabled) => {
160
159
  return undefined;
161
160
  };
162
161
 
163
- function _createSuper$1(t) { var r = _isNativeReflectConstruct$1(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = _Reflect$construct__default["default"](o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
162
+ function _callSuper$1(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
164
163
  function _isNativeReflectConstruct$1() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$1 = function () { return !!t; })(); }
165
164
  /**
166
165
  * This component will let sentry know if any information about the user has
167
166
  * changed.
168
167
  */
169
168
  let SentryUserTracker = /*#__PURE__*/function (_PureComponent) {
170
- _inherits(SentryUserTracker, _PureComponent);
171
- var _super = _createSuper$1(SentryUserTracker);
172
169
  function SentryUserTracker() {
173
170
  var _this;
174
171
  _classCallCheck(this, SentryUserTracker);
175
172
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
176
173
  args[_key] = arguments[_key];
177
174
  }
178
- _this = _super.call(this, ...args);
175
+ _this = _callSuper$1(this, SentryUserTracker, [...args]);
179
176
  _this.syncUser = () => {
180
177
  if (_this.props.user && window.app.trackingSentry) {
181
178
  // to avoid sending personal data to sentry we anonymize the email address
@@ -189,7 +186,8 @@ let SentryUserTracker = /*#__PURE__*/function (_PureComponent) {
189
186
  };
190
187
  return _this;
191
188
  }
192
- _createClass(SentryUserTracker, [{
189
+ _inherits(SentryUserTracker, _PureComponent);
190
+ return _createClass(SentryUserTracker, [{
193
191
  key: "componentDidMount",
194
192
  value: function componentDidMount() {
195
193
  // since the user and project could have been loaded from the apollo cache
@@ -207,21 +205,18 @@ let SentryUserTracker = /*#__PURE__*/function (_PureComponent) {
207
205
  return null;
208
206
  }
209
207
  }]);
210
- return SentryUserTracker;
211
208
  }(react.PureComponent);
212
209
  SentryUserTracker.displayName = 'SentryUserTracker';
213
- SentryUserTracker.propTypes = {};
214
210
 
215
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = _Reflect$construct__default["default"](o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
211
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
216
212
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
217
213
  let SentryUserLogoutTracker = /*#__PURE__*/function (_Component) {
218
- _inherits(SentryUserLogoutTracker, _Component);
219
- var _super = _createSuper(SentryUserLogoutTracker);
220
214
  function SentryUserLogoutTracker() {
221
215
  _classCallCheck(this, SentryUserLogoutTracker);
222
- return _super.apply(this, arguments);
216
+ return _callSuper(this, SentryUserLogoutTracker, arguments);
223
217
  }
224
- _createClass(SentryUserLogoutTracker, [{
218
+ _inherits(SentryUserLogoutTracker, _Component);
219
+ return _createClass(SentryUserLogoutTracker, [{
225
220
  key: "componentDidMount",
226
221
  value: function componentDidMount() {
227
222
  // When the user is not logged in anymore (e.g. on logout) we still track
@@ -238,7 +233,6 @@ let SentryUserLogoutTracker = /*#__PURE__*/function (_Component) {
238
233
  return null;
239
234
  }
240
235
  }]);
241
- return SentryUserLogoutTracker;
242
236
  }(react.Component);
243
237
  SentryUserLogoutTracker.displayName = 'SentryUserLogoutTracker';
244
238
 
@@ -7,14 +7,13 @@ import history from '@commercetools-frontend/browser-history';
7
7
  import _Reflect$construct from '@babel/runtime-corejs3/core-js-stable/reflect/construct';
8
8
  import _classCallCheck from '@babel/runtime-corejs3/helpers/esm/classCallCheck';
9
9
  import _createClass from '@babel/runtime-corejs3/helpers/esm/createClass';
10
- import _inherits from '@babel/runtime-corejs3/helpers/esm/inherits';
11
10
  import _possibleConstructorReturn from '@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn';
12
11
  import _getPrototypeOf from '@babel/runtime-corejs3/helpers/esm/getPrototypeOf';
13
- import _pt from 'prop-types';
12
+ import _inherits from '@babel/runtime-corejs3/helpers/esm/inherits';
14
13
  import { PureComponent, Component } from 'react';
15
14
 
16
15
  // NOTE: This string will be replaced on build time with the package version.
17
- var version = "24.7.1";
16
+ var version = "24.8.0";
18
17
 
19
18
  const makeErrorToCapture = error => {
20
19
  if (error instanceof Error) return error;
@@ -129,22 +128,20 @@ const reportErrorToSentry = (error, extraInfo, getIsEnabled) => {
129
128
  return undefined;
130
129
  };
131
130
 
132
- function _createSuper$1(t) { var r = _isNativeReflectConstruct$1(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = _Reflect$construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
131
+ function _callSuper$1(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
133
132
  function _isNativeReflectConstruct$1() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$1 = function () { return !!t; })(); }
134
133
  /**
135
134
  * This component will let sentry know if any information about the user has
136
135
  * changed.
137
136
  */
138
137
  let SentryUserTracker = /*#__PURE__*/function (_PureComponent) {
139
- _inherits(SentryUserTracker, _PureComponent);
140
- var _super = _createSuper$1(SentryUserTracker);
141
138
  function SentryUserTracker() {
142
139
  var _this;
143
140
  _classCallCheck(this, SentryUserTracker);
144
141
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
145
142
  args[_key] = arguments[_key];
146
143
  }
147
- _this = _super.call(this, ...args);
144
+ _this = _callSuper$1(this, SentryUserTracker, [...args]);
148
145
  _this.syncUser = () => {
149
146
  if (_this.props.user && window.app.trackingSentry) {
150
147
  // to avoid sending personal data to sentry we anonymize the email address
@@ -158,7 +155,8 @@ let SentryUserTracker = /*#__PURE__*/function (_PureComponent) {
158
155
  };
159
156
  return _this;
160
157
  }
161
- _createClass(SentryUserTracker, [{
158
+ _inherits(SentryUserTracker, _PureComponent);
159
+ return _createClass(SentryUserTracker, [{
162
160
  key: "componentDidMount",
163
161
  value: function componentDidMount() {
164
162
  // since the user and project could have been loaded from the apollo cache
@@ -176,26 +174,18 @@ let SentryUserTracker = /*#__PURE__*/function (_PureComponent) {
176
174
  return null;
177
175
  }
178
176
  }]);
179
- return SentryUserTracker;
180
177
  }(PureComponent);
181
178
  SentryUserTracker.displayName = 'SentryUserTracker';
182
- SentryUserTracker.propTypes = process.env.NODE_ENV !== "production" ? {
183
- user: _pt.shape({
184
- id: _pt.string.isRequired,
185
- email: _pt.string.isRequired
186
- })
187
- } : {};
188
179
 
189
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = _Reflect$construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
180
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
190
181
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
191
182
  let SentryUserLogoutTracker = /*#__PURE__*/function (_Component) {
192
- _inherits(SentryUserLogoutTracker, _Component);
193
- var _super = _createSuper(SentryUserLogoutTracker);
194
183
  function SentryUserLogoutTracker() {
195
184
  _classCallCheck(this, SentryUserLogoutTracker);
196
- return _super.apply(this, arguments);
185
+ return _callSuper(this, SentryUserLogoutTracker, arguments);
197
186
  }
198
- _createClass(SentryUserLogoutTracker, [{
187
+ _inherits(SentryUserLogoutTracker, _Component);
188
+ return _createClass(SentryUserLogoutTracker, [{
199
189
  key: "componentDidMount",
200
190
  value: function componentDidMount() {
201
191
  // When the user is not logged in anymore (e.g. on logout) we still track
@@ -212,7 +202,6 @@ let SentryUserLogoutTracker = /*#__PURE__*/function (_Component) {
212
202
  return null;
213
203
  }
214
204
  }]);
215
- return SentryUserLogoutTracker;
216
205
  }(Component);
217
206
  SentryUserLogoutTracker.displayName = 'SentryUserLogoutTracker';
218
207
 
@@ -1,4 +1,4 @@
1
- export { default as version } from './version';
2
- export * from './sentry';
3
- export { default as SentryUserTracker } from './sentry-user-tracker';
4
- export { default as SentryUserLogoutTracker } from './sentry-user-logout-tracker';
1
+ export { default as version } from "./version.js";
2
+ export * from "./sentry.js";
3
+ export { default as SentryUserTracker } from "./sentry-user-tracker/index.js";
4
+ export { default as SentryUserLogoutTracker } from "./sentry-user-logout-tracker/index.js";
@@ -1 +1 @@
1
- export { default } from './sentry-user-logout-tracker';
1
+ export { default } from "./sentry-user-logout-tracker.js";
@@ -1 +1 @@
1
- export { default } from './sentry-user-tracker';
1
+ export { default } from "./sentry-user-tracker.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/sentry",
3
- "version": "24.7.1",
3
+ "version": "24.8.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,21 +30,21 @@
30
30
  "dependencies": {
31
31
  "@babel/runtime": "^7.22.15",
32
32
  "@babel/runtime-corejs3": "^7.22.15",
33
- "@commercetools-frontend/browser-history": "24.7.1",
34
- "@commercetools-frontend/constants": "24.7.1",
35
- "@sentry/browser": "7.119.1",
36
- "@sentry/react": "7.117.0",
37
- "@sentry/types": "7.117.0",
33
+ "@commercetools-frontend/browser-history": "24.8.0",
34
+ "@commercetools-frontend/constants": "24.8.0",
35
+ "@sentry/browser": "7.120.4",
36
+ "@sentry/react": "7.120.4",
37
+ "@sentry/types": "7.120.4",
38
38
  "@types/prop-types": "^15.7.5",
39
39
  "@types/react": "^19.0.3",
40
40
  "prop-types": "15.8.1"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@emotion/react": "^11.14.0",
44
- "@types/jest": "^29.5.4",
44
+ "@types/jest": "^29.5.14",
45
45
  "jest": "29.7.0",
46
46
  "react": "19.0.0",
47
- "sentry-testkit": "5.0.9",
47
+ "sentry-testkit": "5.0.10",
48
48
  "wait-for-expect": "3.0.2"
49
49
  },
50
50
  "peerDependencies": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"commercetools-frontend-sentry.cjs.d.ts","sourceRoot":"","sources":["./declarations/src/index.d.ts"],"names":[],"mappings":"AAAA"}