File tree Expand file tree Collapse file tree 5 files changed +19
-50
lines changed Expand file tree Collapse file tree 5 files changed +19
-50
lines changed Original file line number Diff line number Diff line change @@ -47,25 +47,11 @@ export function getIntegrationsToSetup(options: Options): Integration[] {
47
47
}
48
48
49
49
/** Setup given integration */
50
- export function setupIntegration ( integration : Integration , options : Options ) : void {
50
+ export function setupIntegration ( integration : Integration ) : void {
51
51
if ( installedIntegrations . indexOf ( getIntegrationName ( integration ) ) !== - 1 ) {
52
52
return ;
53
53
}
54
-
55
- try {
56
- integration . setupOnce ( ) ;
57
- } catch ( _Oo ) {
58
- /** @deprecated */
59
- // TODO: Remove in v5
60
-
61
- // tslint:disable:deprecation
62
- if ( integration . install ) {
63
- logger . warn ( `Integration ${ getIntegrationName ( integration ) } : The install method is deprecated. Use "setupOnce".` ) ;
64
- integration . install ( options ) ;
65
- }
66
- // tslint:enable:deprecation
67
- }
68
-
54
+ integration . setupOnce ( ) ;
69
55
installedIntegrations . push ( getIntegrationName ( integration ) ) ;
70
56
logger . log ( `Integration installed: ${ getIntegrationName ( integration ) } ` ) ;
71
57
}
@@ -80,7 +66,7 @@ export function setupIntegrations<O extends Options>(options: O): IntegrationInd
80
66
const integrations : IntegrationIndex = { } ;
81
67
getIntegrationsToSetup ( options ) . forEach ( integration => {
82
68
integrations [ getIntegrationName ( integration ) ] = integration ;
83
- setupIntegration ( integration , options ) ;
69
+ setupIntegration ( integration ) ;
84
70
} ) ;
85
71
return integrations ;
86
72
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export {
27
27
withScope ,
28
28
} from '@sentry/core' ;
29
29
30
- export { NodeBackend , NodeOptions } from './backend' ;
30
+ export { NodeOptions } from './backend' ;
31
31
export { NodeClient } from './client' ;
32
32
export { defaultIntegrations , init } from './sdk' ;
33
33
export { SDK_NAME , SDK_VERSION } from './version' ;
Original file line number Diff line number Diff line change @@ -199,12 +199,9 @@ export interface Integration {
199
199
* Returns {@link IntegrationClass.id}
200
200
*/
201
201
name : string ;
202
- // TODO: Remove with v5
203
- /** @deprecated */
204
- install ?( options ?: object ) : void ;
205
202
206
203
// This takes no options on purpose, options should be passed in the constructor
207
- setupOnce ( ) : void ; // TODO: make not optional
204
+ setupOnce ( ) : void ;
208
205
}
209
206
210
207
/** Integration Class Interface */
@@ -253,10 +250,6 @@ export interface Transport {
253
250
* @param timeout Number time in ms to wait until the buffer is drained.
254
251
*/
255
252
close ( timeout ?: number ) : Promise < boolean > ;
256
-
257
E864
- // TODO: Remove with v5
258
- /** @deprecated Implement sendEvent instead */
259
- captureEvent ?( event : SentryEvent ) : Promise < SentryResponse > ;
260
253
}
261
254
262
255
/** JSDoc */
Original file line number Diff line number Diff line change @@ -11,6 +11,20 @@ describe('SyncPromise', () => {
11
11
} ) ;
12
12
} ) ;
13
13
14
+ test ( 'simple chaining' , ( ) => {
15
+ expect . assertions ( 1 ) ;
16
+
17
+ return new SyncPromise < number > ( resolve => {
18
+ resolve ( 42 ) ;
19
+ } )
20
+ . then ( _ => SyncPromise . resolve ( 'a' ) )
21
+ . then ( _ => SyncPromise . resolve ( 0.1 ) )
22
+ . then ( _ => SyncPromise . resolve ( false ) )
23
+ . then ( val => {
24
+ expect ( val ) . toBe ( false ) ;
25
+ } ) ;
26
+ } ) ;
27
+
14
28
test ( 'simple static' , ( ) => {
15
29
expect . assertions ( 1 ) ;
16
30
You can’t perform that action at this time.
0 commit comments