File tree Expand file tree Collapse file tree 4 files changed +11
-14
lines changed Expand file tree Collapse file tree 4 files changed +11
-14
lines changed Original file line number Diff line number Diff line change 1
1
import { Client } from '@sentry/types' ;
2
- import * as domain from 'domain' ;
3
2
4
3
import { Hub } from './hub' ;
5
4
import { Scope } from './scope' ;
@@ -25,13 +24,8 @@ export interface Carrier {
25
24
*/
26
25
extensions ?: {
27
26
/** Hack to prevent bundlers from breaking our usage of the domain package in the cross-platform Hub package */
28
- domain ?: typeof domain & {
29
- /**
30
- * The currently active domain. This is part of the domain package, but for some reason not declared in the
31
- * package's typedef.
32
- */
33
- active ?: domain . Domain ;
34
- } ;
27
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
28
+ domain ?: { [ key : string ] : any } ;
35
29
} & {
36
30
/** Extension methods for the hub, which are bound to the current Hub instance */
37
31
// eslint-disable-next-line @typescript-eslint/ban-types
@@ -40,4 +34,7 @@ export interface Carrier {
40
34
} ;
41
35
}
42
36
43
- export interface DomainAsCarrier extends domain . Domain , Carrier { }
37
+ export interface DomainAsCarrier extends Carrier {
38
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
39
+ members : { [ key : string ] : any } [ ] ;
40
+ }
Original file line number Diff line number Diff line change @@ -477,10 +477,12 @@ export class Scope implements ScopeInterface {
477
477
* Retruns the global event processors.
478
478
*/
479
479
function getGlobalEventProcessors ( ) : EventProcessor [ ] {
480
- const global = getGlobalObject < Window | NodeJS . Global > ( ) ;
480
+ /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */
481
+ const global = getGlobalObject < any > ( ) ;
481
482
global . __SENTRY__ = global . __SENTRY__ || { } ;
482
483
global . __SENTRY__ . globalEventProcessors = global . __SENTRY__ . globalEventProcessors || [ ] ;
483
484
return global . __SENTRY__ . globalEventProcessors ;
485
+ /* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */
484
486
}
485
487
486
488
/**
Original file line number Diff line number Diff line change 4
4
"exclude" : [" dist" ],
5
5
"compilerOptions" : {
6
6
"rootDir" : " ." ,
7
- "types" : [" node " , " jest" ]
7
+ "types" : [" jest" ]
8
8
}
9
9
}
Original file line number Diff line number Diff line change @@ -140,9 +140,7 @@ function getDefaultSamplingContext(transactionContext: TransactionContext): Samp
140
140
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
141
141
const requestType = nodeHttpModule . IncomingMessage ;
142
142
143
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
144
- const request = domain . members . find ( ( member : any ) => isInstanceOf ( member , requestType ) ) ;
145
-
143
+ const request = domain . members . find ( member => isInstanceOf ( member , requestType ) ) ;
146
144
if ( request ) {
147
145
defaultSamplingContext . request = extractNodeRequestData ( request ) ;
148
146
}
You can’t perform that action at this time.
0 commit comments