Skip to content

Commit aeb4922

Browse files
committed
delete sentry/integration deps
1 parent 6eb9214 commit aeb4922

File tree

36 files changed

+57
-50
lines changed

36 files changed

+57
-50
lines changed

.craft.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ targets:
7070
- name: npm
7171
id: '@sentry/wasm'
7272
includeNames: /^sentry-wasm-\d.*\.tgz$/
73-
- name: npm
74-
id: '@sentry/integrations'
75-
includeNames: /^sentry-integrations-\d.*\.tgz$/
7673

7774
## 4. WinterCG Packages
7875
- name: npm

.github/workflows/build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ jobs:
101101
- 'packages/tracing-internal/**'
102102
- 'packages/utils/**'
103103
- 'packages/types/**'
104-
- 'packages/integrations/**'
105104
browser: &browser
106105
- *shared
107106
- 'packages/browser/**'
@@ -424,7 +423,6 @@ jobs:
424423
name: ${{ github.sha }}
425424
path: |
426425
${{ github.workspace }}/packages/browser/build/bundles/**
427-
${{ github.workspace }}/packages/integrations/build/bundles/**
428426
${{ github.workspace }}/packages/replay/build/bundles/**
429427
${{ github.workspace }}/packages/replay-canvas/build/bundles/**
430428
${{ github.workspace }}/packages/**/*.tgz

MIGRATION.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,23 @@ Sentry SDK requires the fetch API to be available in the environment.
112112
[`error.cause`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause) by
113113
default.
114114

115+
## Integrations
116+
117+
We moved optional integrations from their own package (`@sentry/integrations`) to `@sentry/browser` and `@sentry/node`.
118+
119+
Integrations that are now exported from `@sentry/browser` :
120+
- httpClientIntegration
121+
- contextLinesIntegration
122+
- reportingObserverIntegration
123+
124+
Integrations that are now exported from `@sentry/node` and `@sentry/browser` (or framework-specific packages like `@sentry/react`):
125+
- captureConsoleIntegration
126+
- debugIntegration
127+
- dedupeIntegration
128+
- extraErrorDataIntegration
129+
- rewriteFramesIntegration
130+
- sessionTimingIntegration
131+
115132
# Deprecations in 7.x
116133

117134
You can use the **Experimental** [@sentry/migr8](https://www.npmjs.com/package/@sentry/migr8) to automatically update

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ package. Please refer to the README and instructions of those SDKs for more deta
5757
- [`@sentry/gatsby`](https://github.com/getsentry/sentry-javascript/tree/master/packages/gatsby): SDK for Gatsby
5858
- [`@sentry/nextjs`](https://github.com/getsentry/sentry-javascript/tree/master/packages/nextjs): SDK for Next.js
5959
- [`@sentry/remix`](https://github.com/getsentry/sentry-javascript/tree/master/packages/remix): SDK for Remix
60-
- [`@sentry/integrations`](https://github.com/getsentry/sentry-javascript/tree/master/packages/integrations): Pluggable
61-
integrations that can be used to enhance JS SDKs
6260
- [`@sentry/serverless`](https://github.com/getsentry/sentry-javascript/tree/master/packages/serverless): SDK for
6361
Serverless Platforms (AWS, GCP)
6462
- [`@sentry/electron`](https://github.com/getsentry/sentry-electron): SDK for Electron with support for native crashes
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import * as Sentry from '@sentry/browser';
2-
import { contextLinesIntegration } from '@sentry/integrations';
32

43
window.Sentry = Sentry;
54

65
Sentry.init({
76
dsn: 'https://[email protected]/1337',
8-
integrations: [contextLinesIntegration()],
7+
integrations: [Sentry.contextLinesIntegration()],
98
});
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import * as Sentry from '@sentry/browser';
2-
import { httpClientIntegration } from '@sentry/integrations';
32

43
window.Sentry = Sentry;
54

65
Sentry.init({
76
dsn: 'https://[email protected]/1337',
8-
integrations: [httpClientIntegration()],
7+
integrations: [Sentry.httpClientIntegration()],
98
tracesSampleRate: 1,
109
sendDefaultPii: true,
1110
});
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import * as Sentry from '@sentry/browser';
2-
import { httpClientIntegration } from '@sentry/integrations';
32

43
window.Sentry = Sentry;
54

65
Sentry.init({
76
dsn: 'https://[email protected]/1337',
8-
integrations: [httpClientIntegration()],
7+
integrations: [Sentry.httpClientIntegration()],
98
tracesSampleRate: 1,
109
sendDefaultPii: true,
1110
});
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import * as Sentry from '@sentry/browser';
2-
import { httpClientIntegration } from '@sentry/integrations';
32

43
window.Sentry = Sentry;
54

65
Sentry.init({
76
dsn: 'https://[email protected]/1337',
8-
integrations: [httpClientIntegration()],
7+
integrations: [Sentry.httpClientIntegration()],
98
tracesSampleRate: 1,
109
sendDefaultPii: true,
1110
});

dev-packages/browser-integration-tests/utils/generatePlugin.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ class SentryScenarioGenerationPlugin {
169169
// To help Webpack resolve Sentry modules in `import` statements in cases where they're provided in bundles rather than in `node_modules`
170170
'@sentry/browser': 'Sentry',
171171
'@sentry/replay': 'Sentry',
172-
'@sentry/integrations': 'Sentry',
173172
'@sentry/wasm': 'Sentry',
174173
}
175174
: {};

dev-packages/e2e-tests/test-applications/generic-ts3.8/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import * as _SentryBrowser from '@sentry/browser';
33
// biome-ignore lint/nursery/noUnusedImports:
44
import * as _SentryCore from '@sentry/core';
55
// biome-ignore lint/nursery/noUnusedImports:
6-
import * as _SentryIntegrations from '@sentry/integrations';
7-
// biome-ignore lint/nursery/noUnusedImports:
86
import * as _SentryNode from '@sentry/node';
97
// biome-ignore lint/nursery/noUnusedImports:
108
import * as _SentryOpentelemetry from '@sentry/opentelemetry-node';

dev-packages/e2e-tests/test-applications/generic-ts3.8/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"dependencies": {
1616
"@sentry/browser": "latest || *",
1717
"@sentry/core": "latest || *",
18-
"@sentry/integrations": "latest || *",
1918
"@sentry/node": "latest || *",
2019
"@sentry/opentelemetry-node": "latest || *",
2120
"@sentry/replay": "latest || *",

dev-packages/e2e-tests/test-applications/node-express-app/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"test:assert": "pnpm test"
1212
},
1313
"dependencies": {
14-
"@sentry/integrations": "latest || *",
1514
"@sentry/node": "latest || *",
1615
"@sentry/types": "latest || *",
1716
"express": "4.18.2",

dev-packages/e2e-tests/test-applications/node-express-app/src/app.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { httpClientIntegration } from '@sentry/integrations';
21
import * as Sentry from '@sentry/node';
32
import express from 'express';
43

@@ -12,7 +11,6 @@ Sentry.init({
1211
environment: 'qa', // dynamic sampling bias to keep transactions
1312
dsn: process.env.E2E_TEST_DSN,
1413
includeLocalVariables: true,
15-
integrations: [httpClientIntegration()],
1614
debug: true,
1715
tunnel: `http://localhost:3031/`, // proxy server
1816
tracesSampleRate: 1,

dev-packages/e2e-tests/test-applications/node-hapi-app/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
},
1313
"dependencies": {
1414
"@hapi/hapi": "21.3.2",
15-
"@sentry/integrations": "latest || *",
1615
"@sentry/node": "latest || *",
1716
"@sentry/types": "latest || *",
1817
"@types/node": "18.15.1",

dev-packages/e2e-tests/verdaccio-config/config.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,6 @@ packages:
8686
unpublish: $all
8787
# proxy: npmjs # Don't proxy for E2E tests!
8888

89-
'@sentry/integrations':
90-
access: $all
91-
publish: $all
92-
unpublish: $all
93-
# proxy: npmjs # Don't proxy for E2E tests!
94-
9589
'@sentry/nextjs':
9690
access: $all
9791
publish: $all

dev-packages/rollup-utils/bundleHelpers.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export function makeBaseBundleConfig(options) {
5959
plugins: [rrwebBuildPlugin, markAsBrowserBuildPlugin],
6060
};
6161

62-
// used by `@sentry/integrations` and `@sentry/wasm` (bundles which need to be combined with a stand-alone SDK bundle)
62+
// used by `@sentry/wasm` (bundles which need to be combined with a stand-alone SDK bundle)
6363
const addOnBundleConfig = {
6464
// These output settings are designed to mimic an IIFE. We don't use Rollup's `iife` format because we don't want to
6565
// attach this code to a new global variable, but rather inject it into the existing SDK's `Integrations` object.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
"packages/eslint-plugin-sdk",
5858
"packages/feedback",
5959
"packages/gatsby",
60-
"packages/integrations",
6160
"packages/integration-shims",
6261
"packages/nextjs",
6362
"packages/node",

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 serverSdk.Integrations;
1919

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

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

packages/core/src/integrations/requestdata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ const _requestDataIntegration = ((options: RequestDataIntegrationOptions = {}) =
130130
export const requestDataIntegration = defineIntegration(_requestDataIntegration);
131131

132132
/**
133-
* Add data about a request to an event. Primarily for use in Node-based SDKs, but included in `@sentry/integrations`
133+
* Add data about a request to an event. Primarily for use in Node-based SDKs, but included in `@sentry/core`
134134
* so it can be used in cross-platform SDKs like `@sentry/nextjs`.
135135
* @deprecated Use `requestDataIntegration()` instead.
136136
*/

packages/core/test/lib/integrations/captureconsole.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
/* eslint-disable @typescript-eslint/unbound-method */
22

33
import type { Client, ConsoleLevel, Event } from '@sentry/types';
4-
import { CONSOLE_LEVELS, GLOBAL_OBJ, originalConsoleMethods, resetInstrumentationHandlers } from '@sentry/utils';
4+
import {
5+
CONSOLE_LEVELS,
6+
GLOBAL_OBJ,
7+
addConsoleInstrumentationHandler,
8+
originalConsoleMethods,
9+
resetInstrumentationHandlers,
10+
} from '@sentry/utils';
511
import * as CurrentScopes from '../../../src/currentscopes';
612
import * as SentryCore from '../../../src/exports';
713

@@ -19,7 +25,7 @@ const mockConsole: { [key in ConsoleLevel]: jest.Mock<any> } = {
1925

2026
describe('CaptureConsole setup', () => {
2127
// Ensure we've initialized the instrumentation so we can get the original one
22-
// addConsoleInstrumentationHandler(() => {});
28+
addConsoleInstrumentationHandler(() => {});
2329
const _originalConsoleMethods = Object.assign({}, originalConsoleMethods);
2430

2531
let mockClient: Client;

packages/nextjs/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"dependencies": {
2727
"@rollup/plugin-commonjs": "24.0.0",
2828
"@sentry/core": "7.100.0",
29-
"@sentry/integrations": "7.100.0",
3029
"@sentry/node-experimental": "7.100.0",
3130
"@sentry/react": "7.100.0",
3231
"@sentry/types": "7.100.0",

packages/nextjs/src/client/clientNormalizationIntegration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { rewriteFramesIntegration } from '@sentry/browser';
12
import { defineIntegration } from '@sentry/core';
2-
import { rewriteFramesIntegration } from '@sentry/integrations';
33

44
export const nextjsClientStackFrameNormalizationIntegration = defineIntegration(
55
({ assetPrefixPath }: { assetPrefixPath: string }) => {

packages/nextjs/src/edge/distDirRewriteFramesIntegration.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { defineIntegration } from '@sentry/core';
2-
import { rewriteFramesIntegration } from '@sentry/integrations';
1+
import { defineIntegration, rewriteFramesIntegration } from '@sentry/core';
32
import { escapeStringForRegex } from '@sentry/utils';
43

54
export const distDirRewriteFramesIntegration = defineIntegration(({ distDirName }: { distDirName: string }) => {

packages/nextjs/src/edge/rewriteFramesIntegration.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { defineIntegration } from '@sentry/core';
2-
import { rewriteFramesIntegration as originalRewriteFramesIntegration } from '@sentry/integrations';
1+
import { defineIntegration, rewriteFramesIntegration as originalRewriteFramesIntegration } from '@sentry/core';
32
import type { IntegrationFn, StackFrame } from '@sentry/types';
43
import { GLOBAL_OBJ, escapeStringForRegex } from '@sentry/utils';
54

packages/nextjs/src/index.types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export declare function init(
2222
export declare const Integrations: undefined; // TODO(v8): Remove this line. Can only be done when dependencies don't export `Integrations` anymore.
2323

2424
export declare const linkedErrorsIntegration: typeof clientSdk.linkedErrorsIntegration;
25+
export declare const contextLinesIntegration: typeof clientSdk.contextLinesIntegration;
2526

2627
export declare const getDefaultIntegrations: (options: Options) => Integration[];
2728
export declare const defaultStackParser: StackParser;

packages/nextjs/src/server/distDirRewriteFramesIntegration.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as path from 'path';
2-
import { defineIntegration } from '@sentry/core';
3-
import { rewriteFramesIntegration } from '@sentry/integrations';
2+
import { defineIntegration, rewriteFramesIntegration } from '@sentry/core';
43
import { escapeStringForRegex } from '@sentry/utils';
54

65
export const distDirRewriteFramesIntegration = defineIntegration(({ distDirName }: { distDirName: string }) => {

packages/nextjs/src/server/rewriteFramesIntegration.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as path from 'path';
2-
import { defineIntegration } from '@sentry/core';
3-
import { rewriteFramesIntegration as originalRewriteFramesIntegration } from '@sentry/integrations';
2+
import { defineIntegration, rewriteFramesIntegration as originalRewriteFramesIntegration } from '@sentry/core';
43
import type { IntegrationFn, StackFrame } from '@sentry/types';
54
import { escapeStringForRegex } from '@sentry/utils';
65

packages/nextjs/test/integration/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"resolutions": {
2828
"@sentry/browser": "file:../../../browser",
2929
"@sentry/core": "file:../../../core",
30-
"@sentry/integrations": "file:../../../integrations",
3130
"@sentry/node": "file:../../../node-experimental",
3231
"@sentry/node-experimental": "file:../../../node",
3332
"@sentry/react": "file:../../../react",

packages/node-experimental/src/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ export {
8484
captureException,
8585
captureEvent,
8686
captureMessage,
87+
captureConsoleIntegration,
88+
debugIntegration,
89+
dedupeIntegration,
90+
extraErrorDataIntegration,
91+
rewriteFramesIntegration,
92+
sessionTimingIntegration,
8793
} from '@sentry/core';
8894

8995
export type {

packages/node/src/integrations/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,12 @@ export { RequestData } from '@sentry/core';
1010
export { Undici } from './undici';
1111
export { Spotlight } from './spotlight';
1212
export { Hapi } from './hapi';
13+
14+
export {
15+
captureConsoleIntegration,
16+
debugIntegration,
17+
dedupeIntegration,
18+
extraErrorDataIntegration,
19+
rewriteFramesIntegration,
20+
sessionTimingIntegration,
21+
} from '@sentry/core';

packages/remix/src/index.types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export declare function init(options: RemixOptions): void;
1717
export declare const Integrations: typeof clientSdk.Integrations & typeof serverSdk.Integrations;
1818

1919
export declare const linkedErrorsIntegration: typeof clientSdk.linkedErrorsIntegration;
20+
export declare const contextLinesIntegration: typeof clientSdk.contextLinesIntegration;
2021

2122
export declare const getDefaultIntegrations: (options: Options) => Integration[];
2223
export declare const defaultStackParser: StackParser;

packages/remix/test/integration/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"resolutions": {
2626
"@sentry/browser": "file:../../../browser",
2727
"@sentry/core": "file:../../../core",
28-
"@sentry/integrations": "file:../../../integrations",
2928
"@sentry/node": "file:../../../node-experimental",
3029
"@sentry/node-experimental": "file:../../../node",
3130
"@sentry/react": "file:../../../react",

packages/sveltekit/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
"dependencies": {
4040
"@sentry-internal/tracing": "7.100.0",
4141
"@sentry/core": "7.100.0",
42-
"@sentry/integrations": "7.100.0",
4342
"@sentry/node-experimental": "7.100.0",
4443
"@sentry/svelte": "7.100.0",
4544
"@sentry/types": "7.100.0",

packages/sveltekit/src/index.types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export declare function wrapLoadWithSentry<T extends (...args: any) => any>(orig
4141
export declare const Integrations: typeof clientSdk.Integrations & typeof serverSdk.Integrations;
4242

4343
export declare const linkedErrorsIntegration: typeof clientSdk.linkedErrorsIntegration;
44+
export declare const contextLinesIntegration: typeof clientSdk.contextLinesIntegration;
4445

4546
export declare const getDefaultIntegrations: (options: Options) => Integration[];
4647
export declare const defaultStackParser: StackParser;

packages/sveltekit/src/server/rewriteFramesIntegration.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { defineIntegration } from '@sentry/core';
2-
import { rewriteFramesIntegration as originalRewriteFramesIntegration } from '@sentry/integrations';
1+
import { defineIntegration, rewriteFramesIntegration as originalRewriteFramesIntegration } from '@sentry/core';
32
import type { IntegrationFn, StackFrame } from '@sentry/types';
43
import { GLOBAL_OBJ, basename, escapeStringForRegex, join } from '@sentry/utils';
54
import { WRAPPED_MODULE_SUFFIX } from '../vite/autoInstrument';

packages/sveltekit/test/server/rewriteFramesIntegration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { rewriteFramesIntegration } from '@sentry/integrations';
1+
import { rewriteFramesIntegration } from '@sentry/browser';
22
import type { Event, StackFrame } from '@sentry/types';
33
import { basename } from '@sentry/utils';
44

0 commit comments

Comments
 (0)