diff --git a/packages/core/src/scope.ts b/packages/core/src/scope.ts index a86bbfafcc8f..d75cd521cf9f 100644 --- a/packages/core/src/scope.ts +++ b/packages/core/src/scope.ts @@ -112,14 +112,6 @@ export class Scope implements ScopeInterface { this._propagationContext = generatePropagationContext(); } - /** - * Inherit values from the parent scope. - * @deprecated Use `scope.clone()` and `new Scope()` instead. - */ - public static clone(scope?: Scope): Scope { - return scope ? scope.clone() : new Scope(); - } - /** * @inheritDoc */ @@ -469,16 +461,6 @@ export class Scope implements ScopeInterface { return this; } - /** - * @inheritDoc - * @deprecated Use `getScopeData()` instead. - */ - public getAttachments(): Attachment[] { - const data = this.getScopeData(); - - return data.attachments; - } - /** * @inheritDoc */ diff --git a/packages/core/test/lib/scope.test.ts b/packages/core/test/lib/scope.test.ts index 267053e6a9b0..bbd40af742d1 100644 --- a/packages/core/test/lib/scope.test.ts +++ b/packages/core/test/lib/scope.test.ts @@ -1,4 +1,4 @@ -import type { Attachment, Breadcrumb, Client, Event, RequestSessionStatus } from '@sentry/types'; +import type { Breadcrumb, Client, Event, RequestSessionStatus } from '@sentry/types'; import { applyScopeDataToEvent, getCurrentScope, @@ -543,29 +543,6 @@ describe('Scope', () => { }); }); - describe('getAttachments', () => { - /* eslint-disable deprecation/deprecation */ - it('works without any data', async () => { - const scope = new Scope(); - - const actual = scope.getAttachments(); - expect(actual).toEqual([]); - }); - - it('works with attachments', async () => { - const attachment1 = { filename: '1' } as Attachment; - const attachment2 = { filename: '2' } as Attachment; - - const scope = new Scope(); - scope.addAttachment(attachment1); - scope.addAttachment(attachment2); - - const actual = scope.getAttachments(); - expect(actual).toEqual([attachment1, attachment2]); - }); - /* eslint-enable deprecation/deprecation */ - }); - describe('setClient() and getClient()', () => { it('allows storing and retrieving client objects', () => { const fakeClient = {} as Client; diff --git a/packages/types/src/scope.ts b/packages/types/src/scope.ts index 641a77dd080c..b3b43b95439e 100644 --- a/packages/types/src/scope.ts +++ b/packages/types/src/scope.ts @@ -206,11 +206,6 @@ export interface Scope { */ addAttachment(attachment: Attachment): this; - /** - * Returns an array of attachments on the scope - */ - getAttachments(): Attachment[]; - /** * Clears attachments from the scope */