@@ -24,14 +24,12 @@ function makeClientWithoutHooks(): [Sentry.NodeClient, Transport] {
2424 integrations : [ integration ] ,
2525 transport : _opts => transport ,
2626 } ) ;
27- // eslint-disable-next-line deprecation/deprecation
2827 client . setupIntegrations = ( ) => {
2928 integration . setupOnce (
3029 cb => {
3130 // @ts -expect-error __SENTRY__ is a private property
3231 getMainCarrier ( ) . __SENTRY__ . globalEventProcessors = [ cb ] ;
3332 } ,
34- // eslint-disable-next-line deprecation/deprecation
3533 ( ) => Sentry . getCurrentHub ( ) ,
3634 ) ;
3735 } ;
@@ -59,14 +57,12 @@ function makeClientWithHooks(): [Sentry.NodeClient, Transport] {
5957 } ) ,
6058 } ) ;
6159
62- // eslint-disable-next-line deprecation/deprecation
6360 client . setupIntegrations = ( ) => {
6461 integration . setupOnce (
6562 cb => {
6663 // @ts -expect-error __SENTRY__ is a private property
6764 getMainCarrier ( ) . __SENTRY__ . globalEventProcessors = [ cb ] ;
6865 } ,
69- // eslint-disable-next-line deprecation/deprecation
7066 ( ) => Sentry . getCurrentHub ( ) ,
7167 ) ;
7268 } ;
@@ -91,17 +87,14 @@ describe('hubextensions', () => {
9187
9288 it ( 'pulls environment from sdk init' , async ( ) => {
9389 const [ client , transport ] = makeClientWithoutHooks ( ) ;
94- // eslint-disable-next-line deprecation/deprecation
9590 const hub = Sentry . getCurrentHub ( ) ;
96- // eslint-disable-next-line deprecation/deprecation
9791 hub . bindClient ( client ) ;
9892
9993 const transportSpy = jest . spyOn ( transport , 'send' ) . mockReturnValue ( Promise . resolve ( ) ) ;
10094
10195 // eslint-disable-next-line deprecation/deprecation
10296 const transaction = Sentry . getCurrentHub ( ) . startTransaction ( { name : 'profile_hub' } ) ;
10397 await wait ( 500 ) ;
104- // eslint-disable-next-line deprecation/deprecation
10598 transaction . finish ( ) ;
10699
107100 await Sentry . flush ( 1000 ) ;
@@ -112,9 +105,7 @@ describe('hubextensions', () => {
112105 const logSpy = jest . spyOn ( logger , 'log' ) ;
113106
114107 const [ client , transport ] = makeClientWithoutHooks ( ) ;
115- // eslint-disable-next-line deprecation/deprecation
116108 const hub = Sentry . getCurrentHub ( ) ;
117- // eslint-disable-next-line deprecation/deprecation
118109 hub . bindClient ( client ) ;
119110
120111 jest . spyOn ( CpuProfilerBindings , 'stopProfiling' ) . mockImplementation ( ( ) => {
@@ -138,7 +129,6 @@ describe('hubextensions', () => {
138129
139130 // eslint-disable-next-line deprecation/deprecation
140131 const transaction = Sentry . getCurrentHub ( ) . startTransaction ( { name : 'profile_hub' } ) ;
141- // eslint-disable-next-line deprecation/deprecation
142132 transaction . finish ( ) ;
143133
144134 await Sentry . flush ( 1000 ) ;
@@ -156,9 +146,7 @@ describe('hubextensions', () => {
156146 const logSpy = jest . spyOn ( logger , 'log' ) ;
157147
158148 const [ client , transport ] = makeClientWithoutHooks ( ) ;
159- // eslint-disable-next-line deprecation/deprecation
160149 const hub = Sentry . getCurrentHub ( ) ;
161- // eslint-disable-next-line deprecation/deprecation
162150 hub . bindClient ( client ) ;
163151
164152 jest . spyOn ( CpuProfilerBindings , 'stopProfiling' ) . mockImplementation ( ( ) => {
@@ -188,7 +176,6 @@ describe('hubextensions', () => {
188176 // eslint-disable-next-line deprecation/deprecation
189177 const transaction = Sentry . getCurrentHub ( ) . startTransaction ( { name : 'profile_hub' , traceId : 'boop' } ) ;
190178 await wait ( 500 ) ;
191- // eslint-disable-next-line deprecation/deprecation
192179 transaction . finish ( ) ;
193180
194181 await Sentry . flush ( 1000 ) ;
@@ -198,9 +185,7 @@ describe('hubextensions', () => {
198185 describe ( 'with hooks' , ( ) => {
199186 it ( 'calls profiler when transaction is started/stopped' , async ( ) => {
200187 const [ client , transport ] = makeClientWithHooks ( ) ;
201- // eslint-disable-next-line deprecation/deprecation
202188 const hub = Sentry . getCurrentHub ( ) ;
203- // eslint-disable-next-line deprecation/deprecation
204189 hub . bindClient ( client ) ;
205190
206191 const startProfilingSpy = jest . spyOn ( CpuProfilerBindings , 'startProfiling' ) ;
@@ -211,7 +196,6 @@ describe('hubextensions', () => {
211196 // eslint-disable-next-line deprecation/deprecation
212197 const transaction = hub . startTransaction ( { name : 'profile_hub' } ) ;
213198 await wait ( 500 ) ;
214- // eslint-disable-next-line deprecation/deprecation
215199 transaction . finish ( ) ;
216200
217201 await Sentry . flush ( 1000 ) ;
@@ -222,17 +206,14 @@ describe('hubextensions', () => {
222206
223207 it ( 'sends profile in the same envelope as transaction' , async ( ) => {
224208 const [ client , transport ] = makeClientWithHooks ( ) ;
225- // eslint-disable-next-line deprecation/deprecation
226209 const hub = Sentry . getCurrentHub ( ) ;
227- // eslint-disable-next-line deprecation/deprecation
228210 hub . bindClient ( client ) ;
229211
230212 const transportSpy = jest . spyOn ( transport , 'send' ) . mockReturnValue ( Promise . resolve ( ) ) ;
231213
232214 // eslint-disable-next-line deprecation/deprecation
233215 const transaction = hub . startTransaction ( { name : 'profile_hub' } ) ;
234216 await wait ( 500 ) ;
235- // eslint-disable-next-line deprecation/deprecation
236217 transaction . finish ( ) ;
237218
238219 await Sentry . flush ( 1000 ) ;
@@ -244,9 +225,7 @@ describe('hubextensions', () => {
244225
245226 it ( 'does not crash if transaction has no profile context or it is invalid' , async ( ) => {
246227 const [ client ] = makeClientWithHooks ( ) ;
247- // eslint-disable-next-line deprecation/deprecation
248228 const hub = Sentry . getCurrentHub ( ) ;
249- // eslint-disable-next-line deprecation/deprecation
250229 hub . bindClient ( client ) ;
251230
252231 // @ts -expect-error transaction is partial
@@ -270,9 +249,7 @@ describe('hubextensions', () => {
270249
271250 it ( 'if transaction was profiled, but profiler returned null' , async ( ) => {
272251 const [ client , transport ] = makeClientWithHooks ( ) ;
273- // eslint-disable-next-line deprecation/deprecation
274252 const hub = Sentry . getCurrentHub ( ) ;
275- // eslint-disable-next-line deprecation/deprecation
276253 hub . bindClient ( client ) ;
277254
278255 jest . spyOn ( CpuProfilerBindings , 'stopProfiling' ) . mockReturnValue ( null ) ;
@@ -285,7 +262,6 @@ describe('hubextensions', () => {
285262 // eslint-disable-next-line deprecation/deprecation
286263 const transaction = hub . startTransaction ( { name : 'profile_hub' } ) ;
287264 await wait ( 500 ) ;
288- // eslint-disable-next-line deprecation/deprecation
289265 transaction . finish ( ) ;
290266
291267 await Sentry . flush ( 1000 ) ;
@@ -297,9 +273,7 @@ describe('hubextensions', () => {
297273
298274 it ( 'emits preprocessEvent for profile' , async ( ) => {
299275 const [ client ] = makeClientWithHooks ( ) ;
300- // eslint-disable-next-line deprecation/deprecation
301276 const hub = Sentry . getCurrentHub ( ) ;
302- // eslint-disable-next-line deprecation/deprecation
303277 hub . bindClient ( client ) ;
304278 const onPreprocessEvent = jest . fn ( ) ;
305279
@@ -308,7 +282,6 @@ describe('hubextensions', () => {
308282 // eslint-disable-next-line deprecation/deprecation
309283 const transaction = hub . startTransaction ( { name : 'profile_hub' } ) ;
310284 await wait ( 500 ) ;
311- // eslint-disable-next-line deprecation/deprecation
312285 transaction . finish ( ) ;
313286
314287 await Sentry . flush ( 1000 ) ;
@@ -325,9 +298,7 @@ describe('hubextensions', () => {
325298 describe ( 'without hooks' , ( ) => {
326299 it ( 'calls profiler when transaction is started/stopped' , async ( ) => {
327300 const [ client ] = makeClientWithoutHooks ( ) ;
328- // eslint-disable-next-line deprecation/deprecation
329301 const hub = Sentry . getCurrentHub ( ) ;
330- // eslint-disable-next-line deprecation/deprecation
331302 hub . bindClient ( client ) ;
332303
333304 const startProfilingSpy = jest . spyOn ( CpuProfilerBindings , 'startProfiling' ) ;
@@ -336,7 +307,6 @@ describe('hubextensions', () => {
336307 // eslint-disable-next-line deprecation/deprecation
337308 const transaction = hub . startTransaction ( { name : 'profile_hub' } ) ;
338309 await wait ( 500 ) ;
339- // eslint-disable-next-line deprecation/deprecation
340310 transaction . finish ( ) ;
341311
342312 await Sentry . flush ( 1000 ) ;
@@ -347,9 +317,7 @@ describe('hubextensions', () => {
347317
348318 it ( 'sends profile in separate envelope' , async ( ) => {
349319 const [ client , transport ] = makeClientWithoutHooks ( ) ;
350- // eslint-disable-next-line deprecation/deprecation
351320 const hub = Sentry . getCurrentHub ( ) ;
352- // eslint-disable-next-line deprecation/deprecation
353321 hub . bindClient ( client ) ;
354322
355323 const transportSpy = jest . spyOn ( transport , 'send' ) . mockImplementation ( ( ) => {
@@ -360,7 +328,6 @@ describe('hubextensions', () => {
360328 // eslint-disable-next-line deprecation/deprecation
361329 const transaction = hub . startTransaction ( { name : 'profile_hub' } ) ;
362330 await wait ( 500 ) ;
363- // eslint-disable-next-line deprecation/deprecation
364331 transaction . finish ( ) ;
365332
366333 await Sentry . flush ( 1000 ) ;
@@ -379,9 +346,7 @@ describe('hubextensions', () => {
379346 const stopProfilingSpy = jest . spyOn ( CpuProfilerBindings , 'stopProfiling' ) ;
380347
381348 const [ client ] = makeClientWithoutHooks ( ) ;
382- // eslint-disable-next-line deprecation/deprecation
383349 const hub = Sentry . getCurrentHub ( ) ;
384- // eslint-disable-next-line deprecation/deprecation
385350 hub . bindClient ( client ) ;
386351
387352 // eslint-disable-next-line deprecation/deprecation
@@ -392,7 +357,6 @@ describe('hubextensions', () => {
392357 expect ( stopProfilingSpy ) . toHaveBeenCalledTimes ( 1 ) ;
393358 expect ( ( stopProfilingSpy . mock . calls [ startProfilingSpy . mock . calls . length - 1 ] ?. [ 0 ] as string ) . length ) . toBe ( 32 ) ;
394359
395- // eslint-disable-next-line deprecation/deprecation
396360 transaction . finish ( ) ;
397361 expect ( stopProfilingSpy ) . toHaveBeenCalledTimes ( 1 ) ;
398362 } ) ;
@@ -402,16 +366,12 @@ describe('hubextensions', () => {
402366 const stopProfilingSpy = jest . spyOn ( CpuProfilerBindings , 'stopProfiling' ) ;
403367
404368 const [ client ] = makeClientWithoutHooks ( ) ;
405- // eslint-disable-next-line deprecation/deprecation
406369 const hub = Sentry . getCurrentHub ( ) ;
407- // eslint-disable-next-line deprecation/deprecation
408370 hub . bindClient ( client ) ;
409371
410372 // eslint-disable-next-line deprecation/deprecation
411373 const transaction = Sentry . getCurrentHub ( ) . startTransaction ( { name : 'txn' } ) ;
412- // eslint-disable-next-line deprecation/deprecation
413374 transaction . finish ( ) ;
414- // eslint-disable-next-line deprecation/deprecation
415375 transaction . finish ( ) ;
416376 expect ( stopProfilingSpy ) . toHaveBeenCalledTimes ( 1 ) ;
417377 } ) ;
@@ -446,17 +406,14 @@ describe('hubextensions', () => {
446406 } ) ;
447407
448408 const [ client , transport ] = makeClientWithHooks ( ) ;
449- // eslint-disable-next-line deprecation/deprecation
450409 const hub = Sentry . getCurrentHub ( ) ;
451- // eslint-disable-next-line deprecation/deprecation
452410 hub . bindClient ( client ) ;
453411
454412 const transportSpy = jest . spyOn ( transport , 'send' ) . mockReturnValue ( Promise . resolve ( ) ) ;
455413
456414 // eslint-disable-next-line deprecation/deprecation
457415 const transaction = hub . startTransaction ( { name : 'profile_hub' } ) ;
458416 await wait ( 500 ) ;
459- // eslint-disable-next-line deprecation/deprecation
460417 transaction . finish ( ) ;
461418
462419 await Sentry . flush ( 1000 ) ;
0 commit comments