Skip to content

Commit d06af96

Browse files
authored
feat(v8): Remove makeMain export (#11278)
ref #10100 Goodbye `makeMain`
1 parent 902c93e commit d06af96

File tree

8 files changed

+1
-31
lines changed

8 files changed

+1
-31
lines changed

dev-packages/e2e-tests/test-applications/node-exports-test-app/scripts/consistentExports.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ const DEPENDENTS: Dependent[] = [
5858
ignoreExports: [
5959
// not supported in bun:
6060
'NodeClient',
61-
// legacy, to be removed...
62-
'makeMain',
6361
],
6462
},
6563
{
@@ -79,8 +77,6 @@ const DEPENDENTS: Dependent[] = [
7977
compareWith: nodeExports,
8078
exports: Object.keys(SentryAWS),
8179
ignoreExports: [
82-
// legacy, to be removed...
83-
'makeMain',
8480
// Not needed for Serverless
8581
'setupFastifyErrorHandler',
8682
],
@@ -90,8 +86,6 @@ const DEPENDENTS: Dependent[] = [
9086
compareWith: nodeExports,
9187
exports: Object.keys(SentryGoogleCloud),
9288
ignoreExports: [
93-
// legacy, to be removed...
94-
'makeMain',
9589
// Not needed for Serverless
9690
'setupFastifyErrorHandler',
9791
],

packages/astro/src/index.types.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ export declare const defaultStackParser: StackParser;
2222
export declare function close(timeout?: number | undefined): PromiseLike<boolean>;
2323
export declare function flush(timeout?: number | undefined): PromiseLike<boolean>;
2424

25-
// eslint-disable-next-line deprecation/deprecation
26-
export declare const makeMain: typeof clientSdk.makeMain;
2725
// eslint-disable-next-line deprecation/deprecation
2826
export declare const getCurrentHub: typeof clientSdk.getCurrentHub;
2927
export declare const getClient: typeof clientSdk.getClient;

packages/browser/src/exports.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ export {
3737
getIsolationScope,
3838
getGlobalScope,
3939
Hub,
40-
// eslint-disable-next-line deprecation/deprecation
41-
makeMain,
4240
setCurrentClient,
4341
Scope,
4442
continueTrace,

packages/core/src/hub.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -529,18 +529,6 @@ export class Hub implements HubInterface {
529529
}
530530
}
531531

532-
/**
533-
* Replaces the current main hub with the passed one on the global object
534-
*
535-
* @returns The old replaced hub
536-
*
537-
* @deprecated Use `setCurrentClient()` instead.
538-
*/
539-
export function makeMain(hub: HubInterface): HubInterface {
540-
// noop!
541-
return hub;
542-
}
543-
544532
/**
545533
* Returns the default hub instance.
546534
*

packages/core/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ export {
3333
// eslint-disable-next-line deprecation/deprecation
3434
getCurrentHub,
3535
Hub,
36-
// eslint-disable-next-line deprecation/deprecation
37-
makeMain,
3836
getGlobalHub,
3937
getDefaultCurrentScope,
4038
getDefaultIsolationScope,

packages/node/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ export {
4040
getGlobalScope,
4141
getIsolationScope,
4242
Hub,
43-
// eslint-disable-next-line deprecation/deprecation
44-
makeMain,
4543
setCurrentClient,
4644
Scope,
4745
SDK_VERSION,

packages/node/test/integrations/http.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as http from 'http';
22
import * as https from 'https';
3-
import { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, getSpanDescendants, makeMain, startSpan } from '@sentry/core';
3+
import { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, getSpanDescendants, startSpan } from '@sentry/core';
44
import { getCurrentHub, getIsolationScope, setCurrentClient } from '@sentry/core';
55
import { Transaction } from '@sentry/core';
66
import { getCurrentScope, setUser, spanToJSON, startInactiveSpan } from '@sentry/core';
@@ -346,8 +346,6 @@ describe('tracing', () => {
346346
client.init();
347347
// eslint-disable-next-line deprecation/deprecation
348348
const hub = getCurrentHub();
349-
// eslint-disable-next-line deprecation/deprecation
350-
makeMain(hub);
351349

352350
return hub;
353351
}

packages/remix/src/index.types.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ export declare const defaultStackParser: StackParser;
2727
// methods from `@sentry/core`.
2828
declare const runtime: 'client' | 'server';
2929

30-
// eslint-disable-next-line deprecation/deprecation
31-
export declare const makeMain: typeof clientSdk.makeMain;
3230
// eslint-disable-next-line deprecation/deprecation
3331
export declare const getCurrentHub: typeof clientSdk.getCurrentHub;
3432
export declare const getClient: typeof clientSdk.getClient;

0 commit comments

Comments
 (0)