From 9189c61762509afbefb1c8ccddf6bed56a7cb34d Mon Sep 17 00:00:00 2001 From: Charly Gomez Date: Tue, 17 Dec 2024 17:19:20 +0100 Subject: [PATCH 1/3] remove withSentry decorator --- packages/nestjs/README.md | 2 +- packages/nestjs/src/decorators.ts | 7 ------- packages/nestjs/src/index.ts | 10 ++-------- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/packages/nestjs/README.md b/packages/nestjs/README.md index 1a3ae775b7fd..ae2c35c4c2ab 100644 --- a/packages/nestjs/README.md +++ b/packages/nestjs/README.md @@ -74,7 +74,7 @@ decorator will report all unexpected errors that are received by your global err ```typescript import { Catch, ExceptionFilter } from '@nestjs/common'; -import { WithSentry } from '@sentry/nestjs'; +import { SentryExceptionCaptured } from '@sentry/nestjs'; @Catch() export class YourCatchAllExceptionFilter implements ExceptionFilter { diff --git a/packages/nestjs/src/decorators.ts b/packages/nestjs/src/decorators.ts index 89e82588cd7a..42592e62d553 100644 --- a/packages/nestjs/src/decorators.ts +++ b/packages/nestjs/src/decorators.ts @@ -74,10 +74,3 @@ export function SentryExceptionCaptured() { return descriptor; }; } - -/** - * A decorator to wrap user-defined exception filters and add Sentry error reporting. - * - * @deprecated This decorator was renamed and will be removed in a future major version. Use `SentryExceptionCaptured` instead. - */ -export const WithSentry = SentryExceptionCaptured; diff --git a/packages/nestjs/src/index.ts b/packages/nestjs/src/index.ts index dc8815477910..f22ce71ea89d 100644 --- a/packages/nestjs/src/index.ts +++ b/packages/nestjs/src/index.ts @@ -2,12 +2,6 @@ export * from '@sentry/node'; export { nestIntegration } from './integrations/nest'; -export { init, getDefaultIntegrations } from './sdk'; +export { getDefaultIntegrations, init } from './sdk'; -export { - SentryTraced, - SentryCron, - // eslint-disable-next-line deprecation/deprecation - WithSentry, - SentryExceptionCaptured, -} from './decorators'; +export { SentryCron, SentryExceptionCaptured, SentryTraced } from './decorators'; From 8e8b5a5596159d29ad45132625e73b08fa38b637 Mon Sep 17 00:00:00 2001 From: Charly Gomez Date: Tue, 17 Dec 2024 17:39:17 +0100 Subject: [PATCH 2/3] add removal entry --- docs/migration/v8-to-v9.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/migration/v8-to-v9.md b/docs/migration/v8-to-v9.md index 783698c7ac76..c8216fe1ac8a 100644 --- a/docs/migration/v8-to-v9.md +++ b/docs/migration/v8-to-v9.md @@ -106,6 +106,10 @@ It will be removed in a future major version. - The `getNumberOfUrlSegments` method has been removed. There are no replacements. +### `@sentry/nestjs` + +- The `WithSentry` decorator has been removed. Use `SentryExceptionCaptured` instead. + ## 5. Build Changes Previously the CJS versions of the SDK code (wrongfully) contained compatibility statements for default exports in ESM: From cb7c35249e0125a369ba600770ad120985d28300 Mon Sep 17 00:00:00 2001 From: Charly Gomez Date: Wed, 18 Dec 2024 11:33:31 +0100 Subject: [PATCH 3/3] prettier --- docs/migration/v8-to-v9.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/migration/v8-to-v9.md b/docs/migration/v8-to-v9.md index b85680e95da4..2c297762c967 100644 --- a/docs/migration/v8-to-v9.md +++ b/docs/migration/v8-to-v9.md @@ -122,7 +122,6 @@ It will be removed in a future major version. Use the `SentryGlobalFilter` instead. The `SentryGlobalFilter` is a drop-in replacement. - ## 5. Build Changes Previously the CJS versions of the SDK code (wrongfully) contained compatibility statements for default exports in ESM: