@sentry/svelte 8.36.0 → 8.37.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.
package/build/cjs/sdk.js CHANGED
@@ -50,7 +50,7 @@ function detectAndReportSvelteKit() {
50
50
 
51
51
  /**
52
52
  * To actually detect a SvelteKit frontend, we search the DOM for a special
53
- * div that's inserted by SvelteKit when the page is rendered. It's identifyed
53
+ * div that's inserted by SvelteKit when the page is rendered. It's identified
54
54
  * by its id, 'svelte-announcer', and it's used to improve page accessibility.
55
55
  * This div is not present when only using Svelte without SvelteKit.
56
56
  *
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","sources":["../../src/sdk.ts"],"sourcesContent":["import type { BrowserOptions } from '@sentry/browser';\nimport { addEventProcessor, init as browserInit } from '@sentry/browser';\nimport { applySdkMetadata } from '@sentry/core';\nimport type { Client, EventProcessor } from '@sentry/types';\nimport { getDomElement } from '@sentry/utils';\n/**\n * Inits the Svelte SDK\n */\nexport function init(options: BrowserOptions): Client | undefined {\n const opts = {\n ...options,\n };\n\n applySdkMetadata(opts, 'svelte');\n\n const client = browserInit(opts);\n\n detectAndReportSvelteKit();\n\n return client;\n}\n\n/**\n * Adds a global event processor to detect if the SDK is initialized in a SvelteKit frontend,\n * in which case we add SvelteKit an event.modules entry to outgoing events.\n * SvelteKit detection is performed only once, when the event processor is called for the\n * first time. We cannot perform this check upfront (directly when init is called) because\n * at this time, the HTML element might not yet be accessible.\n */\nexport function detectAndReportSvelteKit(): void {\n let detectedSvelteKit: boolean | undefined = undefined;\n\n const svelteKitProcessor: EventProcessor = event => {\n if (detectedSvelteKit === undefined) {\n detectedSvelteKit = isSvelteKitApp();\n }\n if (detectedSvelteKit) {\n event.modules = {\n svelteKit: 'latest',\n ...event.modules,\n };\n }\n return event;\n };\n svelteKitProcessor.id = 'svelteKitProcessor';\n\n addEventProcessor(svelteKitProcessor);\n}\n\n/**\n * To actually detect a SvelteKit frontend, we search the DOM for a special\n * div that's inserted by SvelteKit when the page is rendered. It's identifyed\n * by its id, 'svelte-announcer', and it's used to improve page accessibility.\n * This div is not present when only using Svelte without SvelteKit.\n *\n * @see https://github.com/sveltejs/kit/issues/307 for more information\n */\nexport function isSvelteKitApp(): boolean {\n return getDomElement('div#svelte-announcer') !== null;\n}\n"],"names":["applySdkMetadata","browserInit","addEventProcessor","getDomElement"],"mappings":";;;;;;AAKA;AACA;AACA;AACO,SAAS,IAAI,CAAC,OAAO,EAAsC;AAClE,EAAE,MAAM,OAAO;AACf,IAAI,GAAG,OAAO;AACd,GAAG;;AAEH,EAAEA,qBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC;;AAElC,EAAE,MAAM,MAAO,GAAEC,YAAW,CAAC,IAAI,CAAC;;AAElC,EAAE,wBAAwB,EAAE;;AAE5B,EAAE,OAAO,MAAM;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,wBAAwB,GAAS;AACjD,EAAE,IAAI,iBAAiB,GAAwB,SAAS;;AAExD,EAAE,MAAM,kBAAkB,GAAmB,SAAS;AACtD,IAAI,IAAI,iBAAkB,KAAI,SAAS,EAAE;AACzC,MAAM,iBAAkB,GAAE,cAAc,EAAE;AAC1C;AACA,IAAI,IAAI,iBAAiB,EAAE;AAC3B,MAAM,KAAK,CAAC,OAAA,GAAU;AACtB,QAAQ,SAAS,EAAE,QAAQ;AAC3B,QAAQ,GAAG,KAAK,CAAC,OAAO;AACxB,OAAO;AACP;AACA,IAAI,OAAO,KAAK;AAChB,GAAG;AACH,EAAE,kBAAkB,CAAC,EAAG,GAAE,oBAAoB;;AAE9C,EAAEC,yBAAiB,CAAC,kBAAkB,CAAC;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,cAAc,GAAY;AAC1C,EAAE,OAAOC,mBAAa,CAAC,sBAAsB,CAAA,KAAM,IAAI;AACvD;;;;;;"}
1
+ {"version":3,"file":"sdk.js","sources":["../../src/sdk.ts"],"sourcesContent":["import type { BrowserOptions } from '@sentry/browser';\nimport { addEventProcessor, init as browserInit } from '@sentry/browser';\nimport { applySdkMetadata } from '@sentry/core';\nimport type { Client, EventProcessor } from '@sentry/types';\nimport { getDomElement } from '@sentry/utils';\n/**\n * Inits the Svelte SDK\n */\nexport function init(options: BrowserOptions): Client | undefined {\n const opts = {\n ...options,\n };\n\n applySdkMetadata(opts, 'svelte');\n\n const client = browserInit(opts);\n\n detectAndReportSvelteKit();\n\n return client;\n}\n\n/**\n * Adds a global event processor to detect if the SDK is initialized in a SvelteKit frontend,\n * in which case we add SvelteKit an event.modules entry to outgoing events.\n * SvelteKit detection is performed only once, when the event processor is called for the\n * first time. We cannot perform this check upfront (directly when init is called) because\n * at this time, the HTML element might not yet be accessible.\n */\nexport function detectAndReportSvelteKit(): void {\n let detectedSvelteKit: boolean | undefined = undefined;\n\n const svelteKitProcessor: EventProcessor = event => {\n if (detectedSvelteKit === undefined) {\n detectedSvelteKit = isSvelteKitApp();\n }\n if (detectedSvelteKit) {\n event.modules = {\n svelteKit: 'latest',\n ...event.modules,\n };\n }\n return event;\n };\n svelteKitProcessor.id = 'svelteKitProcessor';\n\n addEventProcessor(svelteKitProcessor);\n}\n\n/**\n * To actually detect a SvelteKit frontend, we search the DOM for a special\n * div that's inserted by SvelteKit when the page is rendered. It's identified\n * by its id, 'svelte-announcer', and it's used to improve page accessibility.\n * This div is not present when only using Svelte without SvelteKit.\n *\n * @see https://github.com/sveltejs/kit/issues/307 for more information\n */\nexport function isSvelteKitApp(): boolean {\n return getDomElement('div#svelte-announcer') !== null;\n}\n"],"names":["applySdkMetadata","browserInit","addEventProcessor","getDomElement"],"mappings":";;;;;;AAKA;AACA;AACA;AACO,SAAS,IAAI,CAAC,OAAO,EAAsC;AAClE,EAAE,MAAM,OAAO;AACf,IAAI,GAAG,OAAO;AACd,GAAG;;AAEH,EAAEA,qBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC;;AAElC,EAAE,MAAM,MAAO,GAAEC,YAAW,CAAC,IAAI,CAAC;;AAElC,EAAE,wBAAwB,EAAE;;AAE5B,EAAE,OAAO,MAAM;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,wBAAwB,GAAS;AACjD,EAAE,IAAI,iBAAiB,GAAwB,SAAS;;AAExD,EAAE,MAAM,kBAAkB,GAAmB,SAAS;AACtD,IAAI,IAAI,iBAAkB,KAAI,SAAS,EAAE;AACzC,MAAM,iBAAkB,GAAE,cAAc,EAAE;AAC1C;AACA,IAAI,IAAI,iBAAiB,EAAE;AAC3B,MAAM,KAAK,CAAC,OAAA,GAAU;AACtB,QAAQ,SAAS,EAAE,QAAQ;AAC3B,QAAQ,GAAG,KAAK,CAAC,OAAO;AACxB,OAAO;AACP;AACA,IAAI,OAAO,KAAK;AAChB,GAAG;AACH,EAAE,kBAAkB,CAAC,EAAG,GAAE,oBAAoB;;AAE9C,EAAEC,yBAAiB,CAAC,kBAAkB,CAAC;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,cAAc,GAAY;AAC1C,EAAE,OAAOC,mBAAa,CAAC,sBAAsB,CAAA,KAAM,IAAI;AACvD;;;;;;"}
@@ -1 +1 @@
1
- {"type":"module","version":"8.36.0","sideEffects":false}
1
+ {"type":"module","version":"8.37.0","sideEffects":false}
package/build/esm/sdk.js CHANGED
@@ -48,7 +48,7 @@ function detectAndReportSvelteKit() {
48
48
 
49
49
  /**
50
50
  * To actually detect a SvelteKit frontend, we search the DOM for a special
51
- * div that's inserted by SvelteKit when the page is rendered. It's identifyed
51
+ * div that's inserted by SvelteKit when the page is rendered. It's identified
52
52
  * by its id, 'svelte-announcer', and it's used to improve page accessibility.
53
53
  * This div is not present when only using Svelte without SvelteKit.
54
54
  *
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","sources":["../../src/sdk.ts"],"sourcesContent":["import type { BrowserOptions } from '@sentry/browser';\nimport { addEventProcessor, init as browserInit } from '@sentry/browser';\nimport { applySdkMetadata } from '@sentry/core';\nimport type { Client, EventProcessor } from '@sentry/types';\nimport { getDomElement } from '@sentry/utils';\n/**\n * Inits the Svelte SDK\n */\nexport function init(options: BrowserOptions): Client | undefined {\n const opts = {\n ...options,\n };\n\n applySdkMetadata(opts, 'svelte');\n\n const client = browserInit(opts);\n\n detectAndReportSvelteKit();\n\n return client;\n}\n\n/**\n * Adds a global event processor to detect if the SDK is initialized in a SvelteKit frontend,\n * in which case we add SvelteKit an event.modules entry to outgoing events.\n * SvelteKit detection is performed only once, when the event processor is called for the\n * first time. We cannot perform this check upfront (directly when init is called) because\n * at this time, the HTML element might not yet be accessible.\n */\nexport function detectAndReportSvelteKit(): void {\n let detectedSvelteKit: boolean | undefined = undefined;\n\n const svelteKitProcessor: EventProcessor = event => {\n if (detectedSvelteKit === undefined) {\n detectedSvelteKit = isSvelteKitApp();\n }\n if (detectedSvelteKit) {\n event.modules = {\n svelteKit: 'latest',\n ...event.modules,\n };\n }\n return event;\n };\n svelteKitProcessor.id = 'svelteKitProcessor';\n\n addEventProcessor(svelteKitProcessor);\n}\n\n/**\n * To actually detect a SvelteKit frontend, we search the DOM for a special\n * div that's inserted by SvelteKit when the page is rendered. It's identifyed\n * by its id, 'svelte-announcer', and it's used to improve page accessibility.\n * This div is not present when only using Svelte without SvelteKit.\n *\n * @see https://github.com/sveltejs/kit/issues/307 for more information\n */\nexport function isSvelteKitApp(): boolean {\n return getDomElement('div#svelte-announcer') !== null;\n}\n"],"names":["browserInit"],"mappings":";;;;AAKA;AACA;AACA;AACO,SAAS,IAAI,CAAC,OAAO,EAAsC;AAClE,EAAE,MAAM,OAAO;AACf,IAAI,GAAG,OAAO;AACd,GAAG;;AAEH,EAAE,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC;;AAElC,EAAE,MAAM,MAAO,GAAEA,MAAW,CAAC,IAAI,CAAC;;AAElC,EAAE,wBAAwB,EAAE;;AAE5B,EAAE,OAAO,MAAM;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,wBAAwB,GAAS;AACjD,EAAE,IAAI,iBAAiB,GAAwB,SAAS;;AAExD,EAAE,MAAM,kBAAkB,GAAmB,SAAS;AACtD,IAAI,IAAI,iBAAkB,KAAI,SAAS,EAAE;AACzC,MAAM,iBAAkB,GAAE,cAAc,EAAE;AAC1C;AACA,IAAI,IAAI,iBAAiB,EAAE;AAC3B,MAAM,KAAK,CAAC,OAAA,GAAU;AACtB,QAAQ,SAAS,EAAE,QAAQ;AAC3B,QAAQ,GAAG,KAAK,CAAC,OAAO;AACxB,OAAO;AACP;AACA,IAAI,OAAO,KAAK;AAChB,GAAG;AACH,EAAE,kBAAkB,CAAC,EAAG,GAAE,oBAAoB;;AAE9C,EAAE,iBAAiB,CAAC,kBAAkB,CAAC;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,cAAc,GAAY;AAC1C,EAAE,OAAO,aAAa,CAAC,sBAAsB,CAAA,KAAM,IAAI;AACvD;;;;"}
1
+ {"version":3,"file":"sdk.js","sources":["../../src/sdk.ts"],"sourcesContent":["import type { BrowserOptions } from '@sentry/browser';\nimport { addEventProcessor, init as browserInit } from '@sentry/browser';\nimport { applySdkMetadata } from '@sentry/core';\nimport type { Client, EventProcessor } from '@sentry/types';\nimport { getDomElement } from '@sentry/utils';\n/**\n * Inits the Svelte SDK\n */\nexport function init(options: BrowserOptions): Client | undefined {\n const opts = {\n ...options,\n };\n\n applySdkMetadata(opts, 'svelte');\n\n const client = browserInit(opts);\n\n detectAndReportSvelteKit();\n\n return client;\n}\n\n/**\n * Adds a global event processor to detect if the SDK is initialized in a SvelteKit frontend,\n * in which case we add SvelteKit an event.modules entry to outgoing events.\n * SvelteKit detection is performed only once, when the event processor is called for the\n * first time. We cannot perform this check upfront (directly when init is called) because\n * at this time, the HTML element might not yet be accessible.\n */\nexport function detectAndReportSvelteKit(): void {\n let detectedSvelteKit: boolean | undefined = undefined;\n\n const svelteKitProcessor: EventProcessor = event => {\n if (detectedSvelteKit === undefined) {\n detectedSvelteKit = isSvelteKitApp();\n }\n if (detectedSvelteKit) {\n event.modules = {\n svelteKit: 'latest',\n ...event.modules,\n };\n }\n return event;\n };\n svelteKitProcessor.id = 'svelteKitProcessor';\n\n addEventProcessor(svelteKitProcessor);\n}\n\n/**\n * To actually detect a SvelteKit frontend, we search the DOM for a special\n * div that's inserted by SvelteKit when the page is rendered. It's identified\n * by its id, 'svelte-announcer', and it's used to improve page accessibility.\n * This div is not present when only using Svelte without SvelteKit.\n *\n * @see https://github.com/sveltejs/kit/issues/307 for more information\n */\nexport function isSvelteKitApp(): boolean {\n return getDomElement('div#svelte-announcer') !== null;\n}\n"],"names":["browserInit"],"mappings":";;;;AAKA;AACA;AACA;AACO,SAAS,IAAI,CAAC,OAAO,EAAsC;AAClE,EAAE,MAAM,OAAO;AACf,IAAI,GAAG,OAAO;AACd,GAAG;;AAEH,EAAE,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC;;AAElC,EAAE,MAAM,MAAO,GAAEA,MAAW,CAAC,IAAI,CAAC;;AAElC,EAAE,wBAAwB,EAAE;;AAE5B,EAAE,OAAO,MAAM;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,wBAAwB,GAAS;AACjD,EAAE,IAAI,iBAAiB,GAAwB,SAAS;;AAExD,EAAE,MAAM,kBAAkB,GAAmB,SAAS;AACtD,IAAI,IAAI,iBAAkB,KAAI,SAAS,EAAE;AACzC,MAAM,iBAAkB,GAAE,cAAc,EAAE;AAC1C;AACA,IAAI,IAAI,iBAAiB,EAAE;AAC3B,MAAM,KAAK,CAAC,OAAA,GAAU;AACtB,QAAQ,SAAS,EAAE,QAAQ;AAC3B,QAAQ,GAAG,KAAK,CAAC,OAAO;AACxB,OAAO;AACP;AACA,IAAI,OAAO,KAAK;AAChB,GAAG;AACH,EAAE,kBAAkB,CAAC,EAAG,GAAE,oBAAoB;;AAE9C,EAAE,iBAAiB,CAAC,kBAAkB,CAAC;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,cAAc,GAAY;AAC1C,EAAE,OAAO,aAAa,CAAC,sBAAsB,CAAA,KAAM,IAAI;AACvD;;;;"}
@@ -14,7 +14,7 @@ export declare function init(options: BrowserOptions): Client | undefined;
14
14
  export declare function detectAndReportSvelteKit(): void;
15
15
  /**
16
16
  * To actually detect a SvelteKit frontend, we search the DOM for a special
17
- * div that's inserted by SvelteKit when the page is rendered. It's identifyed
17
+ * div that's inserted by SvelteKit when the page is rendered. It's identified
18
18
  * by its id, 'svelte-announcer', and it's used to improve page accessibility.
19
19
  * This div is not present when only using Svelte without SvelteKit.
20
20
  *
@@ -19,7 +19,7 @@ export type SentrySvelteConfigOptions = {
19
19
  };
20
20
  export type SpanOptions = {
21
21
  /**
22
- * If true, a span is recorded between a component's intialization and its
22
+ * If true, a span is recorded between a component's initialization and its
23
23
  * onMount lifecycle hook. This span tells how long it takes a component
24
24
  * to be created and inserted into the DOM.
25
25
  *
@@ -14,7 +14,7 @@ export declare function init(options: BrowserOptions): Client | undefined;
14
14
  export declare function detectAndReportSvelteKit(): void;
15
15
  /**
16
16
  * To actually detect a SvelteKit frontend, we search the DOM for a special
17
- * div that's inserted by SvelteKit when the page is rendered. It's identifyed
17
+ * div that's inserted by SvelteKit when the page is rendered. It's identified
18
18
  * by its id, 'svelte-announcer', and it's used to improve page accessibility.
19
19
  * This div is not present when only using Svelte without SvelteKit.
20
20
  *
@@ -19,7 +19,7 @@ export type SentrySvelteConfigOptions = {
19
19
  };
20
20
  export type SpanOptions = {
21
21
  /**
22
- * If true, a span is recorded between a component's intialization and its
22
+ * If true, a span is recorded between a component's initialization and its
23
23
  * onMount lifecycle hook. This span tells how long it takes a component
24
24
  * to be created and inserted into the DOM.
25
25
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/svelte",
3
- "version": "8.36.0",
3
+ "version": "8.37.0",
4
4
  "description": "Official Sentry SDK for Svelte",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/svelte",
@@ -39,10 +39,10 @@
39
39
  "access": "public"
40
40
  },
41
41
  "dependencies": {
42
- "@sentry/browser": "8.36.0",
43
- "@sentry/core": "8.36.0",
44
- "@sentry/types": "8.36.0",
45
- "@sentry/utils": "8.36.0",
42
+ "@sentry/browser": "8.37.0",
43
+ "@sentry/core": "8.37.0",
44
+ "@sentry/types": "8.37.0",
45
+ "@sentry/utils": "8.37.0",
46
46
  "magic-string": "^0.30.0"
47
47
  },
48
48
  "peerDependencies": {