@sentry/gatsby 7.44.2 → 7.45.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/cjs/index.js +0 -2
- package/cjs/index.js.map +1 -1
- package/cjs/utils/integrations.js +3 -6
- package/cjs/utils/integrations.js.map +1 -1
- package/esm/index.js +0 -1
- package/esm/index.js.map +1 -1
- package/esm/utils/integrations.js +3 -6
- package/esm/utils/integrations.js.map +1 -1
- package/package.json +5 -6
- package/types/index.d.ts +0 -1
- package/types/index.d.ts.map +1 -1
package/cjs/index.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
|
|
3
3
|
const react = require('@sentry/react');
|
|
4
|
-
const Tracing = require('@sentry/tracing');
|
|
5
4
|
const sdk = require('./sdk.js');
|
|
6
5
|
|
|
7
6
|
|
|
8
7
|
|
|
9
|
-
exports.Integrations = Tracing.Integrations;
|
|
10
8
|
exports.init = sdk.init;
|
|
11
9
|
for (const k in react) {
|
|
12
10
|
if (k !== 'default' && !exports.hasOwnProperty(k)) exports[k] = react[k];
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
|
|
3
3
|
const core = require('@sentry/core');
|
|
4
|
-
const
|
|
4
|
+
const react = require('@sentry/react');
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Returns the integrations to add to the SDK.
|
|
@@ -27,11 +27,8 @@ function getIntegrationsFromOptions(options) {
|
|
|
27
27
|
* @param isTracingEnabled Whether the user has enabled tracing.
|
|
28
28
|
*/
|
|
29
29
|
function getIntegrationsFromArray(userIntegrations, isTracingEnabled) {
|
|
30
|
-
if (
|
|
31
|
-
|
|
32
|
-
!userIntegrations.some(integration => integration.name === Tracing.Integrations.BrowserTracing.name)
|
|
33
|
-
) {
|
|
34
|
-
userIntegrations.push(new Tracing.Integrations.BrowserTracing());
|
|
30
|
+
if (isTracingEnabled && !userIntegrations.some(integration => integration.name === react.BrowserTracing.name)) {
|
|
31
|
+
userIntegrations.push(new react.BrowserTracing());
|
|
35
32
|
}
|
|
36
33
|
return userIntegrations;
|
|
37
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.js","sources":["../../../src/utils/integrations.ts"],"sourcesContent":["import { hasTracingEnabled } from '@sentry/core';\nimport
|
|
1
|
+
{"version":3,"file":"integrations.js","sources":["../../../src/utils/integrations.ts"],"sourcesContent":["import { hasTracingEnabled } from '@sentry/core';\nimport { BrowserTracing } from '@sentry/react';\nimport type { Integration } from '@sentry/types';\n\nimport type { GatsbyOptions } from './types';\n\ntype UserFnIntegrations = (integrations: Integration[]) => Integration[];\nexport type UserIntegrations = Integration[] | UserFnIntegrations;\n\n/**\n * Returns the integrations to add to the SDK.\n * If tracing is enabled, `BrowserTracing` is always present.\n *\n * @param options The options users have defined.\n */\nexport function getIntegrationsFromOptions(options: GatsbyOptions): UserIntegrations {\n const isTracingEnabled = hasTracingEnabled(options);\n if (options.integrations === undefined) {\n return getIntegrationsFromArray([], isTracingEnabled);\n } else if (Array.isArray(options.integrations)) {\n return getIntegrationsFromArray(options.integrations, isTracingEnabled);\n } else {\n return getIntegrationsFromFunction(options.integrations, isTracingEnabled);\n }\n}\n\n/**\n * Returns the integrations to add to the SDK, from the given integrations array.\n *\n * @param userIntegrations Array of user's integrations.\n * @param isTracingEnabled Whether the user has enabled tracing.\n */\nfunction getIntegrationsFromArray(userIntegrations: Integration[], isTracingEnabled: boolean): Integration[] {\n if (isTracingEnabled && !userIntegrations.some(integration => integration.name === BrowserTracing.name)) {\n userIntegrations.push(new BrowserTracing());\n }\n return userIntegrations;\n}\n\n/**\n * Returns the integrations to add to the SDK, from the given function.\n *\n * @param userIntegrations Function returning the user's integrations.\n * @param isTracingEnabled Whether the user has enabled tracing.\n */\nfunction getIntegrationsFromFunction(\n userIntegrations: UserFnIntegrations,\n isTracingEnabled: boolean,\n): UserFnIntegrations {\n const wrapper: UserFnIntegrations = (defaultIntegrations: Integration[]) => {\n return getIntegrationsFromArray(userIntegrations(defaultIntegrations), isTracingEnabled);\n };\n return wrapper;\n}\n"],"names":["hasTracingEnabled","BrowserTracing"],"mappings":";;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,0BAAA,CAAA,OAAA,EAAA;AACA,EAAA,MAAA,gBAAA,GAAAA,sBAAA,CAAA,OAAA,CAAA,CAAA;AACA,EAAA,IAAA,OAAA,CAAA,YAAA,KAAA,SAAA,EAAA;AACA,IAAA,OAAA,wBAAA,CAAA,EAAA,EAAA,gBAAA,CAAA,CAAA;AACA,GAAA,MAAA,IAAA,KAAA,CAAA,OAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA;AACA,IAAA,OAAA,wBAAA,CAAA,OAAA,CAAA,YAAA,EAAA,gBAAA,CAAA,CAAA;AACA,GAAA,MAAA;AACA,IAAA,OAAA,2BAAA,CAAA,OAAA,CAAA,YAAA,EAAA,gBAAA,CAAA,CAAA;AACA,GAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,wBAAA,CAAA,gBAAA,EAAA,gBAAA,EAAA;AACA,EAAA,IAAA,gBAAA,IAAA,CAAA,gBAAA,CAAA,IAAA,CAAA,WAAA,IAAA,WAAA,CAAA,IAAA,KAAAC,oBAAA,CAAA,IAAA,CAAA,EAAA;AACA,IAAA,gBAAA,CAAA,IAAA,CAAA,IAAAA,oBAAA,EAAA,CAAA,CAAA;AACA,GAAA;AACA,EAAA,OAAA,gBAAA,CAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,2BAAA;AACA,EAAA,gBAAA;AACA,EAAA,gBAAA;AACA,EAAA;AACA,EAAA,MAAA,OAAA,GAAA,CAAA,mBAAA,KAAA;AACA,IAAA,OAAA,wBAAA,CAAA,gBAAA,CAAA,mBAAA,CAAA,EAAA,gBAAA,CAAA,CAAA;AACA,GAAA,CAAA;AACA,EAAA,OAAA,OAAA,CAAA;AACA;;;;"}
|
package/esm/index.js
CHANGED
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { hasTracingEnabled } from '@sentry/core';
|
|
2
|
-
import
|
|
2
|
+
import { BrowserTracing } from '@sentry/react';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Returns the integrations to add to the SDK.
|
|
@@ -25,11 +25,8 @@ function getIntegrationsFromOptions(options) {
|
|
|
25
25
|
* @param isTracingEnabled Whether the user has enabled tracing.
|
|
26
26
|
*/
|
|
27
27
|
function getIntegrationsFromArray(userIntegrations, isTracingEnabled) {
|
|
28
|
-
if (
|
|
29
|
-
|
|
30
|
-
!userIntegrations.some(integration => integration.name === Tracing.Integrations.BrowserTracing.name)
|
|
31
|
-
) {
|
|
32
|
-
userIntegrations.push(new Tracing.Integrations.BrowserTracing());
|
|
28
|
+
if (isTracingEnabled && !userIntegrations.some(integration => integration.name === BrowserTracing.name)) {
|
|
29
|
+
userIntegrations.push(new BrowserTracing());
|
|
33
30
|
}
|
|
34
31
|
return userIntegrations;
|
|
35
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.js","sources":["../../../src/utils/integrations.ts"],"sourcesContent":["import { hasTracingEnabled } from '@sentry/core';\nimport
|
|
1
|
+
{"version":3,"file":"integrations.js","sources":["../../../src/utils/integrations.ts"],"sourcesContent":["import { hasTracingEnabled } from '@sentry/core';\nimport { BrowserTracing } from '@sentry/react';\nimport type { Integration } from '@sentry/types';\n\nimport type { GatsbyOptions } from './types';\n\ntype UserFnIntegrations = (integrations: Integration[]) => Integration[];\nexport type UserIntegrations = Integration[] | UserFnIntegrations;\n\n/**\n * Returns the integrations to add to the SDK.\n * If tracing is enabled, `BrowserTracing` is always present.\n *\n * @param options The options users have defined.\n */\nexport function getIntegrationsFromOptions(options: GatsbyOptions): UserIntegrations {\n const isTracingEnabled = hasTracingEnabled(options);\n if (options.integrations === undefined) {\n return getIntegrationsFromArray([], isTracingEnabled);\n } else if (Array.isArray(options.integrations)) {\n return getIntegrationsFromArray(options.integrations, isTracingEnabled);\n } else {\n return getIntegrationsFromFunction(options.integrations, isTracingEnabled);\n }\n}\n\n/**\n * Returns the integrations to add to the SDK, from the given integrations array.\n *\n * @param userIntegrations Array of user's integrations.\n * @param isTracingEnabled Whether the user has enabled tracing.\n */\nfunction getIntegrationsFromArray(userIntegrations: Integration[], isTracingEnabled: boolean): Integration[] {\n if (isTracingEnabled && !userIntegrations.some(integration => integration.name === BrowserTracing.name)) {\n userIntegrations.push(new BrowserTracing());\n }\n return userIntegrations;\n}\n\n/**\n * Returns the integrations to add to the SDK, from the given function.\n *\n * @param userIntegrations Function returning the user's integrations.\n * @param isTracingEnabled Whether the user has enabled tracing.\n */\nfunction getIntegrationsFromFunction(\n userIntegrations: UserFnIntegrations,\n isTracingEnabled: boolean,\n): UserFnIntegrations {\n const wrapper: UserFnIntegrations = (defaultIntegrations: Integration[]) => {\n return getIntegrationsFromArray(userIntegrations(defaultIntegrations), isTracingEnabled);\n };\n return wrapper;\n}\n"],"names":[],"mappings":";;;AASA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,0BAAA,CAAA,OAAA,EAAA;AACA,EAAA,MAAA,gBAAA,GAAA,iBAAA,CAAA,OAAA,CAAA,CAAA;AACA,EAAA,IAAA,OAAA,CAAA,YAAA,KAAA,SAAA,EAAA;AACA,IAAA,OAAA,wBAAA,CAAA,EAAA,EAAA,gBAAA,CAAA,CAAA;AACA,GAAA,MAAA,IAAA,KAAA,CAAA,OAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA;AACA,IAAA,OAAA,wBAAA,CAAA,OAAA,CAAA,YAAA,EAAA,gBAAA,CAAA,CAAA;AACA,GAAA,MAAA;AACA,IAAA,OAAA,2BAAA,CAAA,OAAA,CAAA,YAAA,EAAA,gBAAA,CAAA,CAAA;AACA,GAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,wBAAA,CAAA,gBAAA,EAAA,gBAAA,EAAA;AACA,EAAA,IAAA,gBAAA,IAAA,CAAA,gBAAA,CAAA,IAAA,CAAA,WAAA,IAAA,WAAA,CAAA,IAAA,KAAA,cAAA,CAAA,IAAA,CAAA,EAAA;AACA,IAAA,gBAAA,CAAA,IAAA,CAAA,IAAA,cAAA,EAAA,CAAA,CAAA;AACA,GAAA;AACA,EAAA,OAAA,gBAAA,CAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,2BAAA;AACA,EAAA,gBAAA;AACA,EAAA,gBAAA;AACA,EAAA;AACA,EAAA,MAAA,OAAA,GAAA,CAAA,mBAAA,KAAA;AACA,IAAA,OAAA,wBAAA,CAAA,gBAAA,CAAA,mBAAA,CAAA,EAAA,gBAAA,CAAA,CAAA;AACA,GAAA,CAAA;AACA,EAAA,OAAA,OAAA,CAAA;AACA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/gatsby",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.45.0",
|
|
4
4
|
"description": "Official Sentry SDK for Gatsby.js",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/gatsby",
|
|
@@ -20,11 +20,10 @@
|
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@sentry/core": "7.
|
|
24
|
-
"@sentry/react": "7.
|
|
25
|
-
"@sentry/
|
|
26
|
-
"@sentry/
|
|
27
|
-
"@sentry/utils": "7.44.2",
|
|
23
|
+
"@sentry/core": "7.45.0",
|
|
24
|
+
"@sentry/react": "7.45.0",
|
|
25
|
+
"@sentry/types": "7.45.0",
|
|
26
|
+
"@sentry/utils": "7.45.0",
|
|
28
27
|
"@sentry/webpack-plugin": "1.19.0"
|
|
29
28
|
},
|
|
30
29
|
"peerDependencies": {
|
package/types/index.d.ts
CHANGED
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAE9B,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC"}
|