Skip to content

feat(v8): Remove makeMain export #11278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ const DEPENDENTS: Dependent[] = [
ignoreExports: [
// not supported in bun:
'NodeClient',
// legacy, to be removed...
'makeMain',
],
},
{
Expand All @@ -79,8 +77,6 @@ const DEPENDENTS: Dependent[] = [
compareWith: nodeExports,
exports: Object.keys(SentryAWS),
ignoreExports: [
// legacy, to be removed...
'makeMain',
// Not needed for Serverless
'setupFastifyErrorHandler',
],
Expand All @@ -90,8 +86,6 @@ const DEPENDENTS: Dependent[] = [
compareWith: nodeExports,
exports: Object.keys(SentryGoogleCloud),
ignoreExports: [
// legacy, to be removed...
'makeMain',
// Not needed for Serverless
'setupFastifyErrorHandler',
],
Expand Down
2 changes: 0 additions & 2 deletions packages/astro/src/index.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ export declare const defaultStackParser: StackParser;
export declare function close(timeout?: number | undefined): PromiseLike<boolean>;
export declare function flush(timeout?: number | undefined): PromiseLike<boolean>;

// eslint-disable-next-line deprecation/deprecation
export declare const makeMain: typeof clientSdk.makeMain;
// eslint-disable-next-line deprecation/deprecation
export declare const getCurrentHub: typeof clientSdk.getCurrentHub;
export declare const getClient: typeof clientSdk.getClient;
Expand Down
2 changes: 0 additions & 2 deletions packages/browser/src/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ export {
getIsolationScope,
getGlobalScope,
Hub,
// eslint-disable-next-line deprecation/deprecation
makeMain,
setCurrentClient,
Scope,
continueTrace,
Expand Down
12 changes: 0 additions & 12 deletions packages/core/src/hub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -529,18 +529,6 @@ export class Hub implements HubInterface {
}
}

/**
* Replaces the current main hub with the passed one on the global object
*
* @returns The old replaced hub
*
* @deprecated Use `setCurrentClient()` instead.
*/
export function makeMain(hub: HubInterface): HubInterface {
// noop!
return hub;
}

/**
* Returns the default hub instance.
*
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ export {
// eslint-disable-next-line deprecation/deprecation
getCurrentHub,
Hub,
// eslint-disable-next-line deprecation/deprecation
makeMain,
getGlobalHub,
getDefaultCurrentScope,
getDefaultIsolationScope,
Expand Down
2 changes: 0 additions & 2 deletions packages/node/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ export {
getGlobalScope,
getIsolationScope,
Hub,
// eslint-disable-next-line deprecation/deprecation
makeMain,
setCurrentClient,
Scope,
SDK_VERSION,
Expand Down
4 changes: 1 addition & 3 deletions packages/node/test/integrations/http.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as http from 'http';
import * as https from 'https';
import { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, getSpanDescendants, makeMain, startSpan } from '@sentry/core';
import { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, getSpanDescendants, startSpan } from '@sentry/core';
import { getCurrentHub, getIsolationScope, setCurrentClient } from '@sentry/core';
import { Transaction } from '@sentry/core';
import { getCurrentScope, setUser, spanToJSON, startInactiveSpan } from '@sentry/core';
Expand Down Expand Up @@ -346,8 +346,6 @@ describe('tracing', () => {
client.init();
// eslint-disable-next-line deprecation/deprecation
const hub = getCurrentHub();
// eslint-disable-next-line deprecation/deprecation
makeMain(hub);

return hub;
}
Expand Down
2 changes: 0 additions & 2 deletions packages/remix/src/index.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ export declare const defaultStackParser: StackParser;
// methods from `@sentry/core`.
declare const runtime: 'client' | 'server';

// eslint-disable-next-line deprecation/deprecation
export declare const makeMain: typeof clientSdk.makeMain;
// eslint-disable-next-line deprecation/deprecation
export declare const getCurrentHub: typeof clientSdk.getCurrentHub;
export declare const getClient: typeof clientSdk.getClient;
Expand Down