Skip to content

Commit da5ba09

Browse files
authored
feat: Export pluggable integrations from SDK packages (#11723)
This exports the functional integrations from `@sentry/integrations` from each package. In v8, the `@sentry/integrations` package will be gone, and the migration path is to just use it from the SDK package itself.
1 parent 8be252e commit da5ba09

File tree

20 files changed

+97
-3
lines changed

20 files changed

+97
-3
lines changed

packages/astro/src/index.server.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ export {
8383
functionToStringIntegration,
8484
inboundFiltersIntegration,
8585
linkedErrorsIntegration,
86+
captureConsoleIntegration,
87+
dedupeIntegration,
88+
debugIntegration,
89+
extraErrorDataIntegration,
90+
reportingObserverIntegration,
91+
rewriteFramesIntegration,
92+
sessionTimingIntegration,
93+
httpClientIntegration,
8694
Handlers,
8795
trpcMiddleware,
8896
setMeasurement,

packages/astro/src/index.types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export declare function init(options: Options | clientSdk.BrowserOptions | serve
1818
export declare const Integrations: typeof clientSdk.Integrations & typeof serverSdk.Integrations;
1919

2020
export declare const linkedErrorsIntegration: typeof clientSdk.linkedErrorsIntegration;
21+
export declare const contextLinesIntegration: typeof clientSdk.contextLinesIntegration;
2122

2223
export declare const defaultIntegrations: Integration[];
2324
export declare const getDefaultIntegrations: (options: Options) => Integration[];

packages/browser/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"@sentry-internal/replay-canvas": "7.111.0",
3434
"@sentry-internal/tracing": "7.111.0",
3535
"@sentry/core": "7.111.0",
36+
"@sentry/integrations": "7.111.0",
3637
"@sentry/replay": "7.111.0",
3738
"@sentry/types": "7.111.0",
3839
"@sentry/utils": "7.111.0"

packages/browser/src/index.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,18 @@ export {
5454
sendFeedback,
5555
} from '@sentry-internal/feedback';
5656

57+
export {
58+
captureConsoleIntegration,
59+
dedupeIntegration,
60+
debugIntegration,
61+
extraErrorDataIntegration,
62+
reportingObserverIntegration,
63+
rewriteFramesIntegration,
64+
sessionTimingIntegration,
65+
httpClientIntegration,
66+
contextLinesIntegration,
67+
} from '@sentry/integrations';
68+
5769
export {
5870
// eslint-disable-next-line deprecation/deprecation
5971
BrowserTracing,

packages/bun/src/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,14 @@ export {
122122
onUncaughtExceptionIntegration,
123123
onUnhandledRejectionIntegration,
124124
spotlightIntegration,
125+
captureConsoleIntegration,
126+
dedupeIntegration,
127+
debugIntegration,
128+
extraErrorDataIntegration,
129+
reportingObserverIntegration,
130+
rewriteFramesIntegration,
131+
sessionTimingIntegration,
132+
httpClientIntegration,
125133
SEMANTIC_ATTRIBUTE_SENTRY_OP,
126134
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
127135
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,

packages/deno/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"dependencies": {
2020
"@sentry/browser": "7.111.0",
2121
"@sentry/core": "7.111.0",
22+
"@sentry/integrations": "7.111.0",
2223
"@sentry/types": "7.111.0",
2324
"@sentry/utils": "7.111.0"
2425
},

packages/deno/src/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,16 @@ export {
109109
export { breadcrumbsIntegration, dedupeIntegration } from '@sentry/browser';
110110
import { Integrations as CoreIntegrations } from '@sentry/core';
111111

112+
export {
113+
captureConsoleIntegration,
114+
debugIntegration,
115+
extraErrorDataIntegration,
116+
reportingObserverIntegration,
117+
rewriteFramesIntegration,
118+
sessionTimingIntegration,
119+
httpClientIntegration,
120+
} from '@sentry/integrations';
121+
112122
export { denoContextIntegration } from './integrations/context';
113123
export { globalHandlersIntegration } from './integrations/globalhandlers';
114124
export { normalizePathsIntegration } from './integrations/normalizepaths';

packages/integrations/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
"localforage": "^1.8.1"
3636
},
3737
"devDependencies": {
38-
"@sentry/browser": "7.111.0",
3938
"chai": "^4.1.2"
4039
},
4140
"scripts": {

packages/integrations/src/offline.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/* eslint-disable deprecation/deprecation */
44
import type { Event, EventProcessor, Hub, Integration } from '@sentry/types';
55
import { GLOBAL_OBJ, logger, normalize, uuid4 } from '@sentry/utils';
6-
import localForage from 'localforage';
6+
import * as localForage from 'localforage';
77

88
import { DEBUG_BUILD } from './debug-build';
99

packages/integrations/test/offline.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
/* eslint-disable deprecation/deprecation */
2-
import { WINDOW } from '@sentry/browser';
32
import type { Event, EventProcessor, Hub, Integration, IntegrationClass } from '@sentry/types';
3+
import { GLOBAL_OBJ } from '@sentry/utils';
44

55
import type { Item } from '../src/offline';
66
import { Offline } from '../src/offline';
77

8+
const WINDOW = GLOBAL_OBJ as typeof GLOBAL_OBJ & Window;
9+
810
// mock localforage methods
911
jest.mock('localforage', () => ({
1012
createInstance(_options: { name: string }): any {

0 commit comments

Comments
 (0)