@tramvai/module-micro-sentry 5.10.0 → 5.14.10

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.
@@ -34,7 +34,7 @@ const browserProviders = [
34
34
  release: envManager.get('SENTRY_RELEASE'),
35
35
  dsn: envManager.get('SENTRY_DSN'),
36
36
  };
37
- const options = (microSentryOptions !== null && microSentryOptions !== void 0 ? microSentryOptions : []).reduce((previousOptions, microSentryOptionsItem) => {
37
+ const options = (microSentryOptions ?? []).reduce((previousOptions, microSentryOptionsItem) => {
38
38
  return {
39
39
  ...previousOptions,
40
40
  ...microSentryOptionsItem,
@@ -51,12 +51,11 @@ const browserProviders = [
51
51
  provide: commandLineListTokens.init,
52
52
  useFactory: ({ microSentry, microSentryInlineErrorInterceptorKey }) => {
53
53
  return function initMicroSentry() {
54
- var _a;
55
54
  const errorInterceptor = window[microSentryInlineErrorInterceptorKey];
56
55
  errorInterceptor.onError = (error) => {
57
- microSentry === null || microSentry === void 0 ? void 0 : microSentry.report(error);
56
+ microSentry?.report(error);
58
57
  };
59
- while ((_a = errorInterceptor === null || errorInterceptor === void 0 ? void 0 : errorInterceptor.errorsQueue) === null || _a === void 0 ? void 0 : _a.length) {
58
+ while (errorInterceptor?.errorsQueue?.length) {
60
59
  const error = errorInterceptor.errorsQueue.pop();
61
60
  errorInterceptor.onError(error);
62
61
  }
@@ -34,7 +34,7 @@ const sharedProviders = [
34
34
  release: envManager.get('SENTRY_RELEASE'),
35
35
  dsn: envManager.get('SENTRY_DSN'),
36
36
  };
37
- const options = (microSentryOptions !== null && microSentryOptions !== void 0 ? microSentryOptions : []).reduce((previousOptions, microSentryOptionsItem) => {
37
+ const options = (microSentryOptions ?? []).reduce((previousOptions, microSentryOptionsItem) => {
38
38
  return {
39
39
  ...previousOptions,
40
40
  ...microSentryOptionsItem,
@@ -51,12 +51,11 @@ const sharedProviders = [
51
51
  provide: commandLineListTokens.init,
52
52
  useFactory: ({ microSentry, microSentryInlineErrorInterceptorKey }) => {
53
53
  return function initMicroSentry() {
54
- var _a;
55
54
  const errorInterceptor = window[microSentryInlineErrorInterceptorKey];
56
55
  errorInterceptor.onError = (error) => {
57
- microSentry === null || microSentry === void 0 ? void 0 : microSentry.report(error);
56
+ microSentry?.report(error);
58
57
  };
59
- while ((_a = errorInterceptor === null || errorInterceptor === void 0 ? void 0 : errorInterceptor.errorsQueue) === null || _a === void 0 ? void 0 : _a.length) {
58
+ while (errorInterceptor?.errorsQueue?.length) {
60
59
  const error = errorInterceptor.errorsQueue.pop();
61
60
  errorInterceptor.onError(error);
62
61
  }
package/lib/providers.js CHANGED
@@ -38,7 +38,7 @@ const sharedProviders = [
38
38
  release: envManager.get('SENTRY_RELEASE'),
39
39
  dsn: envManager.get('SENTRY_DSN'),
40
40
  };
41
- const options = (microSentryOptions !== null && microSentryOptions !== void 0 ? microSentryOptions : []).reduce((previousOptions, microSentryOptionsItem) => {
41
+ const options = (microSentryOptions ?? []).reduce((previousOptions, microSentryOptionsItem) => {
42
42
  return {
43
43
  ...previousOptions,
44
44
  ...microSentryOptionsItem,
@@ -55,12 +55,11 @@ const sharedProviders = [
55
55
  provide: core.commandLineListTokens.init,
56
56
  useFactory: ({ microSentry, microSentryInlineErrorInterceptorKey }) => {
57
57
  return function initMicroSentry() {
58
- var _a;
59
58
  const errorInterceptor = window[microSentryInlineErrorInterceptorKey];
60
59
  errorInterceptor.onError = (error) => {
61
- microSentry === null || microSentry === void 0 ? void 0 : microSentry.report(error);
60
+ microSentry?.report(error);
62
61
  };
63
- while ((_a = errorInterceptor === null || errorInterceptor === void 0 ? void 0 : errorInterceptor.errorsQueue) === null || _a === void 0 ? void 0 : _a.length) {
62
+ while (errorInterceptor?.errorsQueue?.length) {
64
63
  const error = errorInterceptor.errorsQueue.pop();
65
64
  errorInterceptor.onError(error);
66
65
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/module-micro-sentry",
3
- "version": "5.10.0",
3
+ "version": "5.14.10",
4
4
  "description": "Micro-sentry module",
5
5
  "browser": "lib/browser.js",
6
6
  "main": "lib/server.js",
@@ -23,9 +23,9 @@
23
23
  "@micro-sentry/browser": "^7.0.1"
24
24
  },
25
25
  "peerDependencies": {
26
- "@tramvai/tokens-render": "5.10.0",
27
- "@tramvai/core": "5.10.0",
28
- "@tramvai/module-common": "5.10.0"
26
+ "@tramvai/tokens-render": "5.14.10",
27
+ "@tramvai/core": "5.14.10",
28
+ "@tramvai/module-common": "5.14.10"
29
29
  },
30
30
  "module": "lib/server.es.js"
31
31
  }