Skip to content

Commit 441dd5e

Browse files
author
Luca Forstner
committed
deprecations
1 parent 7a77f18 commit 441dd5e

File tree

18 files changed

+58
-2
lines changed

18 files changed

+58
-2
lines changed

MIGRATION.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,8 @@ If you are using the `Hub` right now, see the following table on how to migrate
285285
| endSession() | `Sentry.endSession()` |
286286
| shouldSendDefaultPii() | REMOVED - The closest equivalent is `Sentry.getClient().getOptions().sendDefaultPii` |
287287

288-
The `Hub` constructor is also gonna be deprecated. If you are creating Hubs for multi-client use like so:
288+
The `Hub` constructor is also gonna be deprecated and will be removed in the next major version. If you are creating
289+
Hubs for multi-client use like so:
289290

290291
```
291292
// OLD

packages/bun/test/integrations/bunserver.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ describe('Bun Serve Integration', () => {
1919
beforeEach(() => {
2020
const options = getDefaultBunClientOptions({ tracesSampleRate: 1, debug: true });
2121
client = new BunClient(options);
22+
// eslint-disable-next-line deprecation/deprecation
2223
hub = new Hub(client);
2324
// eslint-disable-next-line deprecation/deprecation
2425
makeMain(hub);

packages/core/src/hub.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ function createHub(...options: ConstructorParameters<typeof Hub>): Hub {
110110
return sentry.createHub(...options);
111111
}
112112

113+
// eslint-disable-next-line deprecation/deprecation
113114
return new Hub(...options);
114115
}
115116

packages/core/test/lib/base.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ describe('BaseClient', () => {
119119
const options = getDefaultTestClientOptions({});
120120
const client = new TestClient(options);
121121
const scope = new Scope();
122+
// eslint-disable-next-line deprecation/deprecation
122123
const hub = new Hub(client, scope);
123124

124125
scope.addBreadcrumb({ message: 'hello' }, 100);
@@ -134,6 +135,7 @@ describe('BaseClient', () => {
134135
const options = getDefaultTestClientOptions({});
135136
const client = new TestClient(options);
136137
const scope = new Scope();
138+
// eslint-disable-next-line deprecation/deprecation
137139
const hub = new Hub(client, scope);
138140

139141
scope.addBreadcrumb({ message: 'hello' }, 100);
@@ -149,6 +151,7 @@ describe('BaseClient', () => {
149151
const options = getDefaultTestClientOptions({ maxBreadcrumbs: 1 });
150152
const client = new TestClient(options);
151153
const scope = new Scope();
154+
// eslint-disable-next-line deprecation/deprecation
152155
const hub = new Hub(client, scope);
153156

154157
scope.addBreadcrumb({ message: 'hello' }, 100);
@@ -165,6 +168,7 @@ describe('BaseClient', () => {
165168
const options = getDefaultTestClientOptions({});
166169
const client = new TestClient(options);
167170
const scope = new Scope();
171+
// eslint-disable-next-line deprecation/deprecation
168172
const hub = new Hub(client, scope);
169173

170174
scope.addBreadcrumb({ message: 'hello' });
@@ -181,6 +185,7 @@ describe('BaseClient', () => {
181185
const options = getDefaultTestClientOptions({ beforeBreadcrumb });
182186
const client = new TestClient(options);
183187
const scope = new Scope();
188+
// eslint-disable-next-line deprecation/deprecation
184189
const hub = new Hub(client, scope);
185190

186191
// eslint-disable-next-line deprecation/deprecation
@@ -196,6 +201,7 @@ describe('BaseClient', () => {
196201
const options = getDefaultTestClientOptions({ beforeBreadcrumb });
197202
const client = new TestClient(options);
198203
const scope = new Scope();
204+
// eslint-disable-next-line deprecation/deprecation
199205
const hub = new Hub(client, scope);
200206

201207
// eslint-disable-next-line deprecation/deprecation
@@ -211,6 +217,7 @@ describe('BaseClient', () => {
211217
const options = getDefaultTestClientOptions({ beforeBreadcrumb });
212218
const client = new TestClient(options);
213219
const scope = new Scope();
220+
// eslint-disable-next-line deprecation/deprecation
214221
const hub = new Hub(client, scope);
215222

216223
// eslint-disable-next-line deprecation/deprecation
@@ -226,6 +233,7 @@ describe('BaseClient', () => {
226233
const options = getDefaultTestClientOptions({ beforeBreadcrumb });
227234
const client = new TestClient(options);
228235
const scope = new Scope();
236+
// eslint-disable-next-line deprecation/deprecation
229237
const hub = new Hub(client, scope);
230238

231239
// eslint-disable-next-line deprecation/deprecation
@@ -620,6 +628,7 @@ describe('BaseClient', () => {
620628
const options = getDefaultTestClientOptions({ dsn: PUBLIC_DSN, maxBreadcrumbs: 1 });
621629
const client = new TestClient(options);
622630
const scope = new Scope();
631+
// eslint-disable-next-line deprecation/deprecation
623632
const hub = new Hub(client, scope);
624633
// eslint-disable-next-line deprecation/deprecation
625634
hub.addBreadcrumb({ message: '1' });

packages/core/test/lib/exports.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ function getTestClient(): TestClient {
3131
describe('withScope', () => {
3232
beforeEach(() => {
3333
const client = getTestClient();
34+
// eslint-disable-next-line deprecation/deprecation
3435
const hub = new Hub(client);
3536
// eslint-disable-next-line deprecation/deprecation
3637
makeMain(hub);
@@ -173,6 +174,7 @@ describe('withScope', () => {
173174
describe('session APIs', () => {
174175
beforeEach(() => {
175176
const client = getTestClient();
177+
// eslint-disable-next-line deprecation/deprecation
176178
const hub = new Hub(client);
177179
// eslint-disable-next-line deprecation/deprecation
178180
makeMain(hub);
@@ -326,6 +328,7 @@ describe('isInitialized', () => {
326328

327329
it('returns true if client is setup', () => {
328330
const client = getTestClient();
331+
// eslint-disable-next-line deprecation/deprecation
329332
const hub = new Hub(client);
330333
// eslint-disable-next-line deprecation/deprecation
331334
makeMain(hub);

packages/core/test/lib/integration.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,7 @@ describe('addIntegration', () => {
617617
}
618618

619619
const client = getTestClient();
620+
// eslint-disable-next-line deprecation/deprecation
620621
const hub = new Hub(client);
621622
// eslint-disable-next-line deprecation/deprecation
622623
makeMain(hub);
@@ -635,6 +636,7 @@ describe('addIntegration', () => {
635636
setupOnce = jest.fn();
636637
}
637638

639+
// eslint-disable-next-line deprecation/deprecation
638640
const hub = new Hub();
639641
// eslint-disable-next-line deprecation/deprecation
640642
makeMain(hub);
@@ -660,6 +662,7 @@ describe('addIntegration', () => {
660662
}
661663

662664
const client = getTestClient();
665+
// eslint-disable-next-line deprecation/deprecation
663666
const hub = new Hub(client);
664667
// eslint-disable-next-line deprecation/deprecation
665668
makeMain(hub);
@@ -683,6 +686,7 @@ describe('addIntegration', () => {
683686
}
684687

685688
const client = getTestClient();
689+
// eslint-disable-next-line deprecation/deprecation
686690
const hub = new Hub(client);
687691
// eslint-disable-next-line deprecation/deprecation
688692
makeMain(hub);

packages/core/test/lib/scope.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ describe('withActiveSpan()', () => {
522522
const options = getDefaultTestClientOptions({ enableTracing: true });
523523
const client = new TestClient(options);
524524
const scope = new Scope();
525+
// eslint-disable-next-line deprecation/deprecation
525526
const hub = new Hub(client, scope);
526527
makeMain(hub); // eslint-disable-line deprecation/deprecation
527528
});

packages/core/test/lib/sdk.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ describe('SDK', () => {
8787

8888
describe('captureCheckIn', () => {
8989
afterEach(function () {
90+
// eslint-disable-next-line deprecation/deprecation
9091
const hub = new Hub();
9192
// eslint-disable-next-line deprecation/deprecation
9293
makeMain(hub);

packages/core/test/lib/tracing/dynamicSamplingContext.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ describe('getDynamicSamplingContextFromSpan', () => {
99
beforeEach(() => {
1010
const options = getDefaultTestClientOptions({ tracesSampleRate: 1.0, release: '1.0.1' });
1111
const client = new TestClient(options);
12+
// eslint-disable-next-line deprecation/deprecation
1213
hub = new Hub(client);
1314
// eslint-disable-next-line deprecation/deprecation
1415
makeMain(hub);

packages/core/test/lib/tracing/errors.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ describe('registerErrorHandlers()', () => {
3434
mockAddGlobalErrorInstrumentationHandler.mockClear();
3535
mockAddGlobalUnhandledRejectionInstrumentationHandler.mockClear();
3636
const options = getDefaultBrowserClientOptions({ enableTracing: true });
37+
// eslint-disable-next-line deprecation/deprecation
3738
const hub = new Hub(new BrowserClient(options));
3839
// eslint-disable-next-line deprecation/deprecation
3940
makeMain(hub);

0 commit comments

Comments
 (0)