From 6d006bfb025ec9029387f25768e0964c42833b01 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Wed, 18 Dec 2024 14:04:02 -0500 Subject: [PATCH] feat(core)!: Remove `BAGGAGE_HEADER_NAME` export (#14785) ref: https://github.com/getsentry/sentry-javascript/issues/14268 Deprecation PR: https://github.com/getsentry/sentry-javascript/pull/14434 Removes `BAGGAGE_HEADER_NAME`. Use `"baggage"` string constant directly instead. --- docs/migration/v8-to-v9.md | 3 ++- packages/core/src/utils-hoist/baggage.ts | 5 ----- packages/core/src/utils-hoist/index.ts | 2 -- packages/utils/src/index.ts | 5 ----- 4 files changed, 2 insertions(+), 13 deletions(-) diff --git a/docs/migration/v8-to-v9.md b/docs/migration/v8-to-v9.md index 817b388c0dc2..775ea5c8fc3a 100644 --- a/docs/migration/v8-to-v9.md +++ b/docs/migration/v8-to-v9.md @@ -108,6 +108,7 @@ It will be removed in a future major version. - The `validSeverityLevels` export has been removed. There is no replacement. - The `makeFifoCache` method has been removed. There is no replacement. - The `arrayify` export has been removed. There is no replacement. +- The `BAGGAGE_HEADER_NAME` export has been removed. Use `"baggage"` string constant directly instead. - The `flatten` export has been removed. There is no replacement. - The `urlEncode` method has been removed. There is no replacement. @@ -199,7 +200,7 @@ The Sentry metrics beta has ended and the metrics API has been removed from the - Deprecated `arrayify`. No replacements. - Deprecated `memoBuilder`. No replacements. - Deprecated `getNumberOfUrlSegments`. No replacements. -- Deprecated `BAGGAGE_HEADER_NAME`. No replacements. +- Deprecated `BAGGAGE_HEADER_NAME`. Use `"baggage"` string constant directly instead. - Deprecated `makeFifoCache`. No replacements. - Deprecated `dynamicRequire`. No replacements. - Deprecated `flatten`. No replacements. diff --git a/packages/core/src/utils-hoist/baggage.ts b/packages/core/src/utils-hoist/baggage.ts index 5fb60af8a203..075dbf4389df 100644 --- a/packages/core/src/utils-hoist/baggage.ts +++ b/packages/core/src/utils-hoist/baggage.ts @@ -4,11 +4,6 @@ import { DEBUG_BUILD } from './debug-build'; import { isString } from './is'; import { logger } from './logger'; -/** - * @deprecated Use a `"baggage"` string directly - */ -export const BAGGAGE_HEADER_NAME = 'baggage'; - export const SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-'; export const SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/; diff --git a/packages/core/src/utils-hoist/index.ts b/packages/core/src/utils-hoist/index.ts index 44ad277225aa..fb47fb6ee75c 100644 --- a/packages/core/src/utils-hoist/index.ts +++ b/packages/core/src/utils-hoist/index.ts @@ -145,8 +145,6 @@ export { } from './ratelimit'; export type { RateLimits } from './ratelimit'; export { - // eslint-disable-next-line deprecation/deprecation - BAGGAGE_HEADER_NAME, MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, diff --git a/packages/utils/src/index.ts b/packages/utils/src/index.ts index f99d69286bc1..5724c8e41213 100644 --- a/packages/utils/src/index.ts +++ b/packages/utils/src/index.ts @@ -1,6 +1,5 @@ /* eslint-disable max-lines */ import { - BAGGAGE_HEADER_NAME as BAGGAGE_HEADER_NAME_imported, CONSOLE_LEVELS as CONSOLE_LEVELS_imported, DEFAULT_RETRY_AFTER as DEFAULT_RETRY_AFTER_imported, DEFAULT_USER_INCLUDES as DEFAULT_USER_INCLUDES_imported, @@ -618,10 +617,6 @@ export const extractRequestData = extractRequestData_imported; // eslint-disable-next-line deprecation/deprecation export const addRequestDataToEvent = addRequestDataToEvent_imported; -/** @deprecated Import from `@sentry/core` instead. */ -// eslint-disable-next-line deprecation/deprecation -export const BAGGAGE_HEADER_NAME = BAGGAGE_HEADER_NAME_imported; - /** @deprecated Import from `@sentry/core` instead. */ export const getSanitizedUrlString = getSanitizedUrlString_imported;