8000 meta: Remove deprecations · DanielGibbsNZ/sentry-javascript@2b84aed · GitHub
[go: up one dir, main page]

Skip to content

Commit 2b84aed

Browse files
committed
meta: Remove deprecations
1 parent cb00da2 commit 2b84aed

File tree

5 files changed

+19
-50
lines changed

5 files changed

+19
-50
lines changed

packages/core/src/integration.ts

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,25 +47,11 @@ export function getIntegrationsToSetup(options: Options): Integration[] {
4747
}
4848

4949
/** Setup given integration */
50-
export function setupIntegration(integration: Integration, options: Options): void {
50+
export function setupIntegration(integration: Integration): void {
5151
if (installedIntegrations.indexOf(getIntegrationName(integration)) !== -1) {
5252
return;
5353
}
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();
6955
installedIntegrations.push(getIntegrationName(integration));
7056
logger.log(`Integration installed: ${getIntegrationName(integration)}`);
7157
}
@@ -80,7 +66,7 @@ export function setupIntegrations<O extends Options>(options: O): IntegrationInd
8066
const integrations: IntegrationIndex = {};
8167
getIntegrationsToSetup(options).forEach(integration => {
8268
integrations[getIntegrationName(integration)] = integration;
83-
setupIntegration(integration, options);
69+
setupIntegration(integration);
8470
});
8571
return integrations;
8672
}

packages/core/src/integrations/sdkinformation.ts

Lines changed: 0 additions & 24 deletions
This file was deleted.

packages/node/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export {
2727
withScope,
2828
} from '@sentry/core';
2929

30-
export { NodeBackend, NodeOptions } from './backend';
30+
export { NodeOptions } from './backend';
3131
export { NodeClient } from './client';
3232
export { defaultIntegrations, init } from './sdk';
3333
export { SDK_NAME, SDK_VERSION } from './version';

packages/types/src/index.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,9 @@ export interface Integration {
199199
* Returns {@link IntegrationClass.id}
200200
*/
201201
name: string;
202-
// TODO: Remove with v5
203-
/** @deprecated */
204-
install?(options?: object): void;
205202

206203
// This takes no options on purpose, options should be passed in the constructor
207-
setupOnce(): void; // TODO: make not optional
204+
setupOnce(): void;
208205
}
209206

210207
/** Integration Class Interface */
@@ -253,10 +250,6 @@ export interface Transport {
253250
* @param timeout Number time in ms to wait until the buffer is drained.
254251
*/
255252
close(timeout?: number): Promise<boolean>;
256-
257 E864 -
// TODO: Remove with v5
258-
/** @deprecated Implement sendEvent instead */
259-
captureEvent?(event: SentryEvent): Promise<SentryResponse>;
260253
}
261254

262255
/** JSDoc */

packages/utils/test/syncpromise.test.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,20 @@ describe('SyncPromise', () => {
1111
});
1212
});
1313

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+
1428
test('simple static', () => {
1529
expect.assertions(1);
1630

0 commit comments

Comments
 (0)
0