@sentry/browser 6.17.9 → 6.18.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,4 +1,4 @@
1
- /*! @sentry/browser 6.17.9 (4ef06bf) | https://github.com/getsentry/sentry-javascript */
1
+ /*! @sentry/browser 6.18.0 (70c1d77) | https://github.com/getsentry/sentry-javascript */
2
2
  var Sentry = (function (exports) {
3
3
 
4
4
  /**
@@ -2842,7 +2842,7 @@ var Sentry = (function (exports) {
2842
2842
  */
2843
2843
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
2844
2844
  captureException(exception, hint) {
2845
- const eventId = (this._lastEventId = uuid4());
2845
+ const eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());
2846
2846
  let finalHint = hint;
2847
2847
  // If there's no explicit hint provided, mimic the same thing that would happen
2848
2848
  // in the minimal itself to create a consistent behavior.
@@ -2868,7 +2868,7 @@ var Sentry = (function (exports) {
2868
2868
  * @inheritDoc
2869
2869
  */
2870
2870
  captureMessage(message, level, hint) {
2871
- const eventId = (this._lastEventId = uuid4());
2871
+ const eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());
2872
2872
  let finalHint = hint;
2873
2873
  // If there's no explicit hint provided, mimic the same thing that would happen
2874
2874
  // in the minimal itself to create a consistent behavior.
@@ -2894,7 +2894,7 @@ var Sentry = (function (exports) {
2894
2894
  * @inheritDoc
2895
2895
  */
2896
2896
  captureEvent(event, hint) {
2897
- const eventId = uuid4();
2897
+ const eventId = hint && hint.event_id ? hint.event_id : uuid4();
2898
2898
  if (event.type !== 'transaction') {
2899
2899
  this._lastEventId = eventId;
2900
2900
  }
@@ -4244,7 +4244,7 @@ var Sentry = (function (exports) {
4244
4244
  hub.bindClient(client);
4245
4245
  }
4246
4246
 
4247
- const SDK_VERSION = '6.17.9';
4247
+ const SDK_VERSION = '6.18.0';
4248
4248
 
4249
4249
  let originalFunctionToString;
4250
4250
  /** Patch toString calls to return proper name for wrapped functions */
@@ -4625,9 +4625,10 @@ var Sentry = (function (exports) {
4625
4625
  },
4626
4626
  };
4627
4627
  if (syntheticException) {
4628
- event.stacktrace = {
4629
- frames: parseStackFrames(syntheticException),
4630
- };
4628
+ const frames = parseStackFrames(syntheticException);
4629
+ if (frames.length) {
4630
+ event.stacktrace = { frames };
4631
+ }
4631
4632
  }
4632
4633
  return event;
4633
4634
  }
@@ -4790,9 +4791,10 @@ var Sentry = (function (exports) {
4790
4791
  message: input,
4791
4792
  };
4792
4793
  if (options.attachStacktrace && syntheticException) {
4793
- event.stacktrace = {
4794
- frames: parseStackFrames(syntheticException),
4795
- };
4794
+ const frames = parseStackFrames(syntheticException);
4795
+ if (frames.length) {
4796
+ event.stacktrace = { frames };
4797
+ }
4796
4798
  }
4797
4799
  return event;
4798
4800
  }