@@ -24,14 +24,12 @@ function makeClientWithoutHooks(): [Sentry.NodeClient, Transport] {
24
24
integrations : [ integration ] ,
25
25
transport : _opts => transport ,
26
26
} ) ;
27
- // eslint-disable-next-line deprecation/deprecation
28
27
client . setupIntegrations = ( ) => {
29
28
integration . setupOnce (
30
29
cb => {
31
30
// @ts -expect-error __SENTRY__ is a private property
32
31
getMainCarrier ( ) . __SENTRY__ . globalEventProcessors = [ cb ] ;
33
32
} ,
34
- // eslint-disable-next-line deprecation/deprecation
35
33
( ) => Sentry . getCurrentHub ( ) ,
36
34
) ;
37
35
} ;
@@ -59,14 +57,12 @@ function makeClientWithHooks(): [Sentry.NodeClient, Transport] {
59
57
} ) ,
60
58
} ) ;
61
59
62
- // eslint-disable-next-line deprecation/deprecation
63
60
client . setupIntegrations = ( ) => {
64
61
integration . setupOnce (
65
62
cb => {
66
63
// @ts -expect-error __SENTRY__ is a private property
67
64
getMainCarrier ( ) . __SENTRY__ . globalEventProcessors = [ cb ] ;
68
65
} ,
69
- // eslint-disable-next-line deprecation/deprecation
70
66
( ) => Sentry . getCurrentHub ( ) ,
71
67
) ;
72
68
} ;
@@ -91,17 +87,14 @@ describe('hubextensions', () => {
91
87
92
88
it ( 'pulls environment from sdk init' , async ( ) => {
93
89
const [ client , transport ] = makeClientWithoutHooks ( ) ;
94
- // eslint-disable-next-line deprecation/deprecation
95
90
const hub = Sentry . getCurrentHub ( ) ;
96
- // eslint-disable-next-line deprecation/deprecation
97
91
hub . bindClient ( client ) ;
98
92
99
93
const transportSpy = jest . spyOn ( transport , 'send' ) . mockReturnValue ( Promise . resolve ( ) ) ;
100
94
101
95
// eslint-disable-next-line deprecation/deprecation
102
96
const transaction = Sentry . getCurrentHub ( ) . startTransaction ( { name : 'profile_hub' } ) ;
103
97
await wait ( 500 ) ;
104
- // eslint-disable-next-line deprecation/deprecation
105
98
transaction . finish ( ) ;
106
99
107
100
await Sentry . flush ( 1000 ) ;
@@ -112,9 +105,7 @@ describe('hubextensions', () => {
112
105
const logSpy = jest . spyOn ( logger , 'log' ) ;
113
106
114
107
const [ client , transport ] = makeClientWithoutHooks ( ) ;
115
- // eslint-disable-next-line deprecation/deprecation
116
108
const hub = Sentry . getCurrentHub ( ) ;
117
- // eslint-disable-next-line deprecation/deprecation
118
109
hub . bindClient ( client ) ;
119
110
120
111
jest . spyOn ( CpuProfilerBindings , 'stopProfiling' ) . mockImplementation ( ( ) => {
@@ -138,7 +129,6 @@ describe('hubextensions', () => {
138
129
139
130
// eslint-disable-next-line deprecation/deprecation
140
131
const transaction = Sentry . getCurrentHub ( ) . startTransaction ( { name : 'profile_hub' } ) ;
141
- // eslint-disable-next-line deprecation/deprecation
142
132
transaction . finish ( ) ;
143
133
144
134
await Sentry . flush ( 1000 ) ;
@@ -156,9 +146,7 @@ describe('hubextensions', () => {
156
146
const logSpy = jest . spyOn ( logger , 'log' ) ;
157
147
158
148
const [ client , transport ] = makeClientWithoutHooks ( ) ;
159
- // eslint-disable-next-line deprecation/deprecation
160
149
const hub = Sentry . getCurrentHub ( ) ;
161
- // eslint-disable-next-line deprecation/deprecation
162
150
hub . bindClient ( client ) ;
163
151
164
152
jest . spyOn ( CpuProfilerBindings , 'stopProfiling' ) . mockImplementation ( ( ) => {
@@ -188,7 +176,6 @@ describe('hubextensions', () => {
188
176
// eslint-disable-next-line deprecation/deprecation
189
177
const transaction = Sentry . getCurrentHub ( ) . startTransaction ( { name : 'profile_hub' , traceId : 'boop' } ) ;
190
178
await wait ( 500 ) ;
191
- // eslint-disable-next-line deprecation/deprecation
192
179
transaction . finish ( ) ;
193
180
194
181
await Sentry . flush ( 1000 ) ;
@@ -198,9 +185,7 @@ describe('hubextensions', () => {
198
185
describe ( 'with hooks' , ( ) => {
199
186
it ( 'calls profiler when transaction is started/stopped' , async ( ) => {
200
187
const [ client , transport ] = makeClientWithHooks ( ) ;
201
- // eslint-disable-next-line deprecation/deprecation
202
188
const hub = Sentry . getCurrentHub ( ) ;
203
- // eslint-disable-next-line deprecation/deprecation
204
189
hub . bindClient ( client ) ;
205
190
206
191
const startProfilingSpy = jest . spyOn ( CpuProfilerBindings , 'startProfiling' ) ;
@@ -211,7 +196,6 @@ describe('hubextensions', () => {
211
196
// eslint-disable-next-line deprecation/deprecation
212
197
const transaction = hub . startTransaction ( { name : 'profile_hub' } ) ;
213
198
await wait ( 500 ) ;
214
- // eslint-disable-next-line deprecation/deprecation
215
199
transaction . finish ( ) ;
216
200
217
201
await Sentry . flush ( 1000 ) ;
@@ -222,17 +206,14 @@ describe('hubextensions', () => {
222
206
223
207
it ( 'sends profile in the same envelope as transaction' , async ( ) => {
224
208
const [ client , transport ] = makeClientWithHooks ( ) ;
225
- // eslint-disable-next-line deprecation/deprecation
226
209
const hub = Sentry . getCurrentHub ( ) ;
227
- // eslint-disable-next-line deprecation/deprecation
228
210
hub . bindClient ( client ) ;
229
211
230
212
const transportSpy = jest . spyOn ( transport , 'send' ) . mockReturnValue ( Promise . resolve ( ) ) ;
231
213
232
214
// eslint-disable-next-line deprecation/deprecation
233
215
const transaction = hub . startTransaction ( { name : 'profile_hub' } ) ;
234
216
await wait ( 500 ) ;
235
- // eslint-disable-next-line deprecation/deprecation
236
217
transaction . finish ( ) ;
237
218
238
219
await Sentry . flush ( 1000 ) ;
@@ -244,9 +225,7 @@ describe('hubextensions', () => {
244
225
245
226
it ( 'does not crash if transaction has no profile context or it is invalid' , async ( ) => {
246
227
const [ client ] = makeClientWithHooks ( ) ;
247
- // eslint-disable-next-line deprecation/deprecation
248
228
const hub = Sentry . getCurrentHub ( ) ;
249
- // eslint-disable-next-line deprecation/deprecation
250
229
hub . bindClient ( client ) ;
251
230
252
231
// @ts -expect-error transaction is partial
@@ -270,9 +249,7 @@ describe('hubextensions', () => {
270
249
271
250
it ( 'if transaction was profiled, but profiler returned null' , async ( ) => {
272
251
const [ client , transport ] = makeClientWithHooks ( ) ;
273
- // eslint-disable-next-line deprecation/deprecation
274
252
const hub = Sentry . getCurrentHub ( ) ;
275
- // eslint-disable-next-line deprecation/deprecation
276
253
hub . bindClient ( client ) ;
277
254
278
255
jest . spyOn ( CpuProfilerBindings , 'stopProfiling' ) . mockReturnValue ( null ) ;
@@ -285,7 +262,6 @@ describe('hubextensions', () => {
285
262
// eslint-disable-next-line deprecation/deprecation
286
263
const transaction = hub . startTransaction ( { name : 'profile_hub' } ) ;
287
264
await wait ( 500 ) ;
288
- // eslint-disable-next-line deprecation/deprecation
289
265
transaction . finish ( ) ;
290
266
291
267
await Sentry . flush ( 1000 ) ;
@@ -297,9 +273,7 @@ describe('hubextensions', () => {
297
273
298
274
it ( 'emits preprocessEvent for profile' , async ( ) => {
299
275
const [ client ] = makeClientWithHooks ( ) ;
300
- // eslint-disable-next-line deprecation/deprecation
301
276
const hub = Sentry . getCurrentHub ( ) ;
302
- // eslint-disable-next-line deprecation/deprecation
303
277
hub . bindClient ( client ) ;
304
278
const onPreprocessEvent = jest . fn ( ) ;
305
279
@@ -308,7 +282,6 @@ describe('hubextensions', () => {
308
282
// eslint-disable-next-line deprecation/deprecation
309
283
const transaction = hub . startTransaction ( { name : 'profile_hub' } ) ;
310
284
await wait ( 500 ) ;
311
- // eslint-disable-next-line deprecation/deprecation
312
285
transaction . finish ( ) ;
313
286
314
287
await Sentry . flush ( 1000 ) ;
@@ -325,9 +298,7 @@ describe('hubextensions', () => {
325
298
describe ( 'without hooks' , ( ) => {
326
299
it ( 'calls profiler when transaction is started/stopped' , async ( ) => {
327
300
const [ client ] = makeClientWithoutHooks ( ) ;
328
- // eslint-disable-next-line deprecation/deprecation
329
301
const hub = Sentry . getCurrentHub ( ) ;
330
- // eslint-disable-next-line deprecation/deprecation
331
302
hub . bindClient ( client ) ;
332
303
333
304
const startProfilingSpy = jest . spyOn ( CpuProfilerBindings , 'startProfiling' ) ;
@@ -336,7 +307,6 @@ describe('hubextensions', () => {
336
307
// eslint-disable-next-line deprecation/deprecation
337
308
const transaction = hub . startTransaction ( { name : 'profile_hub' } ) ;
338
309
await wait ( 500 ) ;
339
- // eslint-disable-next-line deprecation/deprecation
340
310
transaction . finish ( ) ;
341
311
342
312
await Sentry . flush ( 1000 ) ;
@@ -347,9 +317,7 @@ describe('hubextensions', () => {
347
317
348
318
it ( 'sends profile in separate envelope' , async ( ) => {
349
319
const [ client , transport ] = makeClientWithoutHooks ( ) ;
350
- // eslint-disable-next-line deprecation/deprecation
351
320
const hub = Sentry . getCurrentHub ( ) ;
352
- // eslint-disable-next-line deprecation/deprecation
353
321
hub . bindClient ( client ) ;
354
322
355
323
const transportSpy = jest . spyOn ( transport , 'send' ) . mockImplementation ( ( ) => {
@@ -360,7 +328,6 @@ describe('hubextensions', () => {
360
328
// eslint-disable-next-line deprecation/deprecation
361
329
const transaction = hub . startTransaction ( { name : 'profile_hub' } ) ;
362
330
await wait ( 500 ) ;
363
- // eslint-disable-next-line deprecation/deprecation
364
331
transaction . finish ( ) ;
365
332
366
333
await Sentry . flush ( 1000 ) ;
@@ -379,9 +346,7 @@ describe('hubextensions', () => {
379
346
const stopProfilingSpy = jest . spyOn ( CpuProfilerBindings , 'stopProfiling' ) ;
380
347
381
348
const [ client ] = makeClientWithoutHooks ( ) ;
382
- // eslint-disable-next-line deprecation/deprecation
383
349
const hub = Sentry . getCurrentHub ( ) ;
384
- // eslint-disable-next-line deprecation/deprecation
385
350
hub . bindClient ( client ) ;
386
351
387
352
// eslint-disable-next-line deprecation/deprecation
@@ -392,7 +357,6 @@ describe('hubextensions', () => {
392
357
expect ( stopProfilingSpy ) . toHaveBeenCalledTimes ( 1 ) ;
393
358
expect ( ( stopProfilingSpy . mock . calls [ startProfilingSpy . mock . calls . length - 1 ] ?. [ 0 ] as string ) . length ) . toBe ( 32 ) ;
394
359
395
- // eslint-disable-next-line deprecation/deprecation
396
360
transaction . finish ( ) ;
397
361
expect ( stopProfilingSpy ) . toHaveBeenCalledTimes ( 1 ) ;
398
362
} ) ;
@@ -402,16 +366,12 @@ describe('hubextensions', () => {
402
366
const stopProfilingSpy = jest . spyOn ( CpuProfilerBindings , 'stopProfiling' ) ;
403
367
404
368
const [ client ] = makeClientWithoutHooks ( ) ;
405
- // eslint-disable-next-line deprecation/deprecation
406
369
const hub = Sentry . getCurrentHub ( ) ;
407
- // eslint-disable-next-line deprecation/deprecation
408
370
hub . bindClient ( client ) ;
409
371
410
372
// eslint-disable-next-line deprecation/deprecation
411
373
const transaction = Sentry . getCurrentHub ( ) . startTransaction ( { name : 'txn' } ) ;
412
- // eslint-disable-next-line deprecation/deprecation
413
374
transaction . finish ( ) ;
414
- // eslint-disable-next-line deprecation/deprecation
415
375
transaction . finish ( ) ;
416
376
expect ( stopProfilingSpy ) . toHaveBeenCalledTimes ( 1 ) ;
417
377
} ) ;
@@ -446,17 +406,14 @@ describe('hubextensions', () => {
446
406
} ) ;
447
407
448
408
const [ client , transport ] = makeClientWithHooks ( ) ;
449
- // eslint-disable-next-line deprecation/deprecation
450
409
const hub = Sentry . getCurrentHub ( ) ;
451
- // eslint-disable-next-line deprecation/deprecation
452
410
hub . bindClient ( client ) ;
453
411
454
412
const transportSpy = jest . spyOn ( transport , 'send' ) . mockReturnValue ( Promise . resolve ( ) ) ;
455
413
456
414
// eslint-disable-next-line deprecation/deprecation
457
415
const transaction = hub . startTransaction ( { name : 'profile_hub' } ) ;
458
416
await wait ( 500 ) ;
459
- // eslint-disable-next-line deprecation/deprecation
460
417
transaction . finish ( ) ;
461
418
462
419
await Sentry . flush ( 1000 ) ;
0 commit comments