@sentry/browser 8.53.0 → 8.55.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.
@@ -33,6 +33,7 @@ const featureFlagsIntegration = require('./integrations/featureFlags/featureFlag
33
33
  const integration$1 = require('./integrations/featureFlags/launchdarkly/integration.js');
34
34
  const integration$2 = require('./integrations/featureFlags/openfeature/integration.js');
35
35
  const integration$3 = require('./integrations/featureFlags/unleash/integration.js');
36
+ const integration$4 = require('./integrations/featureFlags/statsig/integration.js');
36
37
 
37
38
 
38
39
 
@@ -156,4 +157,5 @@ exports.launchDarklyIntegration = integration$1.launchDarklyIntegration;
156
157
  exports.OpenFeatureIntegrationHook = integration$2.OpenFeatureIntegrationHook;
157
158
  exports.openFeatureIntegration = integration$2.openFeatureIntegration;
158
159
  exports.unleashIntegration = integration$3.unleashIntegration;
160
+ exports.statsigIntegration = integration$4.statsigIntegration;
159
161
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,48 @@
1
+ Object.defineProperty(exports, '__esModule', { value: true });
2
+
3
+ const core = require('@sentry/core');
4
+ const featureFlags = require('../../../utils/featureFlags.js');
5
+
6
+ /**
7
+ * Sentry integration for capturing feature flag evaluations from the Statsig js-client SDK.
8
+ *
9
+ * See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags) for more information.
10
+ *
11
+ * @example
12
+ * ```
13
+ * import { StatsigClient } from '@statsig/js-client';
14
+ * import * as Sentry from '@sentry/browser';
15
+ *
16
+ * const statsigClient = new StatsigClient();
17
+ *
18
+ * Sentry.init({
19
+ * dsn: '___PUBLIC_DSN___',
20
+ * integrations: [Sentry.statsigIntegration({featureFlagClient: statsigClient})],
21
+ * });
22
+ *
23
+ * await statsigClient.initializeAsync(); // or statsigClient.initializeSync();
24
+ *
25
+ * const result = statsigClient.checkGate('my-feature-gate');
26
+ * Sentry.captureException(new Error('something went wrong'));
27
+ * ```
28
+ */
29
+ const statsigIntegration = core.defineIntegration(
30
+ ({ featureFlagClient: statsigClient }) => {
31
+ return {
32
+ name: 'Statsig',
33
+
34
+ processEvent(event, _hint, _client) {
35
+ return featureFlags.copyFlagsFromScopeToEvent(event);
36
+ },
37
+
38
+ setup() {
39
+ statsigClient.on('gate_evaluation', (event) => {
40
+ featureFlags.insertFlagToScope(event.gate.name, event.gate.value);
41
+ });
42
+ },
43
+ };
44
+ },
45
+ ) ;
46
+
47
+ exports.statsigIntegration = statsigIntegration;
48
+ //# sourceMappingURL=integration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration.js","sources":["../../../../../../src/integrations/featureFlags/statsig/integration.ts"],"sourcesContent":["import type { Client, Event, EventHint, IntegrationFn } from '@sentry/core';\n\nimport { defineIntegration } from '@sentry/core';\nimport { copyFlagsFromScopeToEvent, insertFlagToScope } from '../../../utils/featureFlags';\nimport type { FeatureGate, StatsigClient } from './types';\n\n/**\n * Sentry integration for capturing feature flag evaluations from the Statsig js-client SDK.\n *\n * See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags) for more information.\n *\n * @example\n * ```\n * import { StatsigClient } from '@statsig/js-client';\n * import * as Sentry from '@sentry/browser';\n *\n * const statsigClient = new StatsigClient();\n *\n * Sentry.init({\n * dsn: '___PUBLIC_DSN___',\n * integrations: [Sentry.statsigIntegration({featureFlagClient: statsigClient})],\n * });\n *\n * await statsigClient.initializeAsync(); // or statsigClient.initializeSync();\n *\n * const result = statsigClient.checkGate('my-feature-gate');\n * Sentry.captureException(new Error('something went wrong'));\n * ```\n */\nexport const statsigIntegration = defineIntegration(\n ({ featureFlagClient: statsigClient }: { featureFlagClient: StatsigClient }) => {\n return {\n name: 'Statsig',\n\n processEvent(event: Event, _hint: EventHint, _client: Client): Event {\n return copyFlagsFromScopeToEvent(event);\n },\n\n setup() {\n statsigClient.on('gate_evaluation', (event: { gate: FeatureGate }) => {\n insertFlagToScope(event.gate.name, event.gate.value);\n });\n },\n };\n },\n) satisfies IntegrationFn;\n"],"names":["defineIntegration","copyFlagsFromScopeToEvent","insertFlagToScope"],"mappings":";;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,kBAAmB,GAAEA,sBAAiB;AACnD,EAAE,CAAC,EAAE,iBAAiB,EAAE,aAAc,EAAC,KAA2C;AAClF,IAAI,OAAO;AACX,MAAM,IAAI,EAAE,SAAS;;AAErB,MAAM,YAAY,CAAC,KAAK,EAAS,KAAK,EAAa,OAAO,EAAiB;AAC3E,QAAQ,OAAOC,sCAAyB,CAAC,KAAK,CAAC;AAC/C,OAAO;;AAEP,MAAM,KAAK,GAAG;AACd,QAAQ,aAAa,CAAC,EAAE,CAAC,iBAAiB,EAAE,CAAC,KAAK,KAA4B;AAC9E,UAAUC,8BAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;AAC9D,SAAS,CAAC;AACV,OAAO;AACP,KAAK;AACL,GAAG;AACH,CAAE;;;;"}
@@ -31,4 +31,5 @@ export { featureFlagsIntegration } from './integrations/featureFlags/featureFlag
31
31
  export { buildLaunchDarklyFlagUsedHandler, launchDarklyIntegration } from './integrations/featureFlags/launchdarkly/integration.js';
32
32
  export { OpenFeatureIntegrationHook, openFeatureIntegration } from './integrations/featureFlags/openfeature/integration.js';
33
33
  export { unleashIntegration } from './integrations/featureFlags/unleash/integration.js';
34
+ export { statsigIntegration } from './integrations/featureFlags/statsig/integration.js';
34
35
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,46 @@
1
+ import { defineIntegration } from '@sentry/core';
2
+ import { copyFlagsFromScopeToEvent, insertFlagToScope } from '../../../utils/featureFlags.js';
3
+
4
+ /**
5
+ * Sentry integration for capturing feature flag evaluations from the Statsig js-client SDK.
6
+ *
7
+ * See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags) for more information.
8
+ *
9
+ * @example
10
+ * ```
11
+ * import { StatsigClient } from '@statsig/js-client';
12
+ * import * as Sentry from '@sentry/browser';
13
+ *
14
+ * const statsigClient = new StatsigClient();
15
+ *
16
+ * Sentry.init({
17
+ * dsn: '___PUBLIC_DSN___',
18
+ * integrations: [Sentry.statsigIntegration({featureFlagClient: statsigClient})],
19
+ * });
20
+ *
21
+ * await statsigClient.initializeAsync(); // or statsigClient.initializeSync();
22
+ *
23
+ * const result = statsigClient.checkGate('my-feature-gate');
24
+ * Sentry.captureException(new Error('something went wrong'));
25
+ * ```
26
+ */
27
+ const statsigIntegration = defineIntegration(
28
+ ({ featureFlagClient: statsigClient }) => {
29
+ return {
30
+ name: 'Statsig',
31
+
32
+ processEvent(event, _hint, _client) {
33
+ return copyFlagsFromScopeToEvent(event);
34
+ },
35
+
36
+ setup() {
37
+ statsigClient.on('gate_evaluation', (event) => {
38
+ insertFlagToScope(event.gate.name, event.gate.value);
39
+ });
40
+ },
41
+ };
42
+ },
43
+ ) ;
44
+
45
+ export { statsigIntegration };
46
+ //# sourceMappingURL=integration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration.js","sources":["../../../../../../src/integrations/featureFlags/statsig/integration.ts"],"sourcesContent":["import type { Client, Event, EventHint, IntegrationFn } from '@sentry/core';\n\nimport { defineIntegration } from '@sentry/core';\nimport { copyFlagsFromScopeToEvent, insertFlagToScope } from '../../../utils/featureFlags';\nimport type { FeatureGate, StatsigClient } from './types';\n\n/**\n * Sentry integration for capturing feature flag evaluations from the Statsig js-client SDK.\n *\n * See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags) for more information.\n *\n * @example\n * ```\n * import { StatsigClient } from '@statsig/js-client';\n * import * as Sentry from '@sentry/browser';\n *\n * const statsigClient = new StatsigClient();\n *\n * Sentry.init({\n * dsn: '___PUBLIC_DSN___',\n * integrations: [Sentry.statsigIntegration({featureFlagClient: statsigClient})],\n * });\n *\n * await statsigClient.initializeAsync(); // or statsigClient.initializeSync();\n *\n * const result = statsigClient.checkGate('my-feature-gate');\n * Sentry.captureException(new Error('something went wrong'));\n * ```\n */\nexport const statsigIntegration = defineIntegration(\n ({ featureFlagClient: statsigClient }: { featureFlagClient: StatsigClient }) => {\n return {\n name: 'Statsig',\n\n processEvent(event: Event, _hint: EventHint, _client: Client): Event {\n return copyFlagsFromScopeToEvent(event);\n },\n\n setup() {\n statsigClient.on('gate_evaluation', (event: { gate: FeatureGate }) => {\n insertFlagToScope(event.gate.name, event.gate.value);\n });\n },\n };\n },\n) satisfies IntegrationFn;\n"],"names":[],"mappings":";;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,kBAAmB,GAAE,iBAAiB;AACnD,EAAE,CAAC,EAAE,iBAAiB,EAAE,aAAc,EAAC,KAA2C;AAClF,IAAI,OAAO;AACX,MAAM,IAAI,EAAE,SAAS;;AAErB,MAAM,YAAY,CAAC,KAAK,EAAS,KAAK,EAAa,OAAO,EAAiB;AAC3E,QAAQ,OAAO,yBAAyB,CAAC,KAAK,CAAC;AAC/C,OAAO;;AAEP,MAAM,KAAK,GAAG;AACd,QAAQ,aAAa,CAAC,EAAE,CAAC,iBAAiB,EAAE,CAAC,KAAK,KAA4B;AAC9E,UAAU,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;AAC9D,SAAS,CAAC;AACV,OAAO;AACP,KAAK;AACL,GAAG;AACH,CAAE;;;;"}
@@ -1 +1 @@
1
- {"type":"module","version":"8.53.0","sideEffects":false}
1
+ {"type":"module","version":"8.55.0","sideEffects":false}
@@ -24,4 +24,5 @@ export { featureFlagsIntegration, type FeatureFlagsIntegration, } from './integr
24
24
  export { launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler } from './integrations/featureFlags/launchdarkly';
25
25
  export { openFeatureIntegration, OpenFeatureIntegrationHook } from './integrations/featureFlags/openfeature';
26
26
  export { unleashIntegration } from './integrations/featureFlags/unleash';
27
+ export { statsigIntegration } from './integrations/featureFlags/statsig';
27
28
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAE1B,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,OAAO,EACL,yBAAyB,EAEzB,gBAAgB,EAChB,yBAAyB,EACzB,wBAAwB,EAExB,wBAAwB,EACxB,eA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,CAAC;AAEtE,cAAc,WAAW,CAAC;AAE1B,OAAO,EAAE,oCAAoC,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AACrG,OAAO,EACL,yBAAyB,EACzB,iCAAiC,EACjC,+BAA+B,GAChC,MAAM,qCAAqC,CAAC;AAC7C,YAAY,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAEL,oBAAoB,EACpB,gCAAgC,EAChC,aAAa,EACb,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,yBAAyB,EACzB,aAAa,EACb,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,gCAAgC,GACjC,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EACL,uBAAuB,EACvB,KAAK,uBAAuB,GAC7B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AACrH,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAC7G,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { statsigIntegration } from './integration';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/featureFlags/statsig/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,28 @@
1
+ import type { StatsigClient } from './types';
2
+ /**
3
+ * Sentry integration for capturing feature flag evaluations from the Statsig js-client SDK.
4
+ *
5
+ * See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags) for more information.
6
+ *
7
+ * @example
8
+ * ```
9
+ * import { StatsigClient } from '@statsig/js-client';
10
+ * import * as Sentry from '@sentry/browser';
11
+ *
12
+ * const statsigClient = new StatsigClient();
13
+ *
14
+ * Sentry.init({
15
+ * dsn: '___PUBLIC_DSN___',
16
+ * integrations: [Sentry.statsigIntegration({featureFlagClient: statsigClient})],
17
+ * });
18
+ *
19
+ * await statsigClient.initializeAsync(); // or statsigClient.initializeSync();
20
+ *
21
+ * const result = statsigClient.checkGate('my-feature-gate');
22
+ * Sentry.captureException(new Error('something went wrong'));
23
+ * ```
24
+ */
25
+ export declare const statsigIntegration: (args_0: {
26
+ featureFlagClient: StatsigClient;
27
+ }) => import("@sentry/core").Integration;
28
+ //# sourceMappingURL=integration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/featureFlags/statsig/integration.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAe,aAAa,EAAE,MAAM,SAAS,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,kBAAkB;uBAC+B,aAAa;wCAelD,CAAC"}
@@ -0,0 +1,14 @@
1
+ export type FeatureGate = {
2
+ readonly name: string;
3
+ readonly value: boolean;
4
+ };
5
+ type EventNameToEventDataMap = {
6
+ gate_evaluation: {
7
+ gate: FeatureGate;
8
+ };
9
+ };
10
+ export interface StatsigClient {
11
+ on(event: keyof EventNameToEventDataMap, callback: (data: EventNameToEventDataMap[keyof EventNameToEventDataMap]) => void): void;
12
+ }
13
+ export {};
14
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/featureFlags/statsig/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,KAAK,uBAAuB,GAAG;IAC7B,eAAe,EAAE;QAAE,IAAI,EAAE,WAAW,CAAA;KAAE,CAAC;CACxC,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,EAAE,CACA,KAAK,EAAE,MAAM,uBAAuB,EACpC,QAAQ,EAAE,CAAC,IAAI,EAAE,uBAAuB,CAAC,MAAM,uBAAuB,CAAC,KAAK,IAAI,GAC/E,IAAI,CAAC;CACT"}
@@ -24,4 +24,5 @@ export { featureFlagsIntegration, FeatureFlagsIntegration } from './integrations
24
24
  export { launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler } from './integrations/featureFlags/launchdarkly';
25
25
  export { openFeatureIntegration, OpenFeatureIntegrationHook } from './integrations/featureFlags/openfeature';
26
26
  export { unleashIntegration } from './integrations/featureFlags/unleash';
27
+ export { statsigIntegration } from './integrations/featureFlags/statsig';
27
28
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,2 @@
1
+ export { statsigIntegration } from './integration';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,28 @@
1
+ import { StatsigClient } from './types';
2
+ /**
3
+ * Sentry integration for capturing feature flag evaluations from the Statsig js-client SDK.
4
+ *
5
+ * See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags) for more information.
6
+ *
7
+ * @example
8
+ * ```
9
+ * import { StatsigClient } from '@statsig/js-client';
10
+ * import * as Sentry from '@sentry/browser';
11
+ *
12
+ * const statsigClient = new StatsigClient();
13
+ *
14
+ * Sentry.init({
15
+ * dsn: '___PUBLIC_DSN___',
16
+ * integrations: [Sentry.statsigIntegration({featureFlagClient: statsigClient})],
17
+ * });
18
+ *
19
+ * await statsigClient.initializeAsync(); // or statsigClient.initializeSync();
20
+ *
21
+ * const result = statsigClient.checkGate('my-feature-gate');
22
+ * Sentry.captureException(new Error('something went wrong'));
23
+ * ```
24
+ */
25
+ export declare const statsigIntegration: (args_0: {
26
+ featureFlagClient: StatsigClient;
27
+ }) => import("@sentry/core").Integration;
28
+ //# sourceMappingURL=integration.d.ts.map
@@ -0,0 +1,14 @@
1
+ export type FeatureGate = {
2
+ readonly name: string;
3
+ readonly value: boolean;
4
+ };
5
+ type EventNameToEventDataMap = {
6
+ gate_evaluation: {
7
+ gate: FeatureGate;
8
+ };
9
+ };
10
+ export interface StatsigClient {
11
+ on(event: keyof EventNameToEventDataMap, callback: (data: EventNameToEventDataMap[keyof EventNameToEventDataMap]) => void): void;
12
+ }
13
+ export {};
14
+ //# sourceMappingURL=types.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/browser",
3
- "version": "8.53.0",
3
+ "version": "8.55.0",
4
4
  "description": "Official Sentry SDK for browsers",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser",
@@ -36,17 +36,18 @@
36
36
  }
37
37
  },
38
38
  "publishConfig": {
39
- "access": "public"
39
+ "access": "public",
40
+ "tag": "v8"
40
41
  },
41
42
  "dependencies": {
42
- "@sentry-internal/browser-utils": "8.53.0",
43
- "@sentry-internal/feedback": "8.53.0",
44
- "@sentry-internal/replay": "8.53.0",
45
- "@sentry-internal/replay-canvas": "8.53.0",
46
- "@sentry/core": "8.53.0"
43
+ "@sentry-internal/browser-utils": "8.55.0",
44
+ "@sentry-internal/feedback": "8.55.0",
45
+ "@sentry-internal/replay": "8.55.0",
46
+ "@sentry-internal/replay-canvas": "8.55.0",
47
+ "@sentry/core": "8.55.0"
47
48
  },
48
49
  "devDependencies": {
49
- "@sentry-internal/integration-shims": "8.53.0",
50
+ "@sentry-internal/integration-shims": "8.55.0",
50
51
  "fake-indexeddb": "^4.0.1"
51
52
  },
52
53
  "scripts": {