Skip to content

Commit 98c93ec

Browse files
committed
add deprecations after rebase
1 parent 7ea5aaa commit 98c93ec

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

packages/core/src/getCurrentHubShim.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@ import {
1616
/**
1717
* This is for legacy reasons, and returns a proxy object instead of a hub to be used.
1818
*
19-
* @deprecated Use the methods directly.
19+
* @deprecated Use the methods directly from the top level Sentry API (e.g. `Sentry.withScope`)
20+
* For more information see our migration guide for
21+
* [replacing `getCurrentHub` and `Hub`](https://github.com/getsentry/sentry-javascript/blob/develop/MIGRATION.md#deprecate-hub)
22+
* usage
2023
*/
24+
// eslint-disable-next-line deprecation/deprecation
2125
export function getCurrentHubShim(): Hub {
2226
return {
2327
bindClient(client: Client): void {

packages/opentelemetry/src/asyncContextStrategy.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export function setOpenTelemetryContextAsyncContextStrategy(): void {
4040
};
4141
}
4242

43+
// eslint-disable-next-line deprecation/deprecation
4344
function getCurrentHub(): Hub {
4445
// eslint-disable-next-line deprecation/deprecation
4546
const hub = getCurrentHubShim();

packages/vercel-edge/src/async.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export function setAsyncLocalStorageAsyncContextStrategy(): void {
5151
};
5252
}
5353

54+
// eslint-disable-next-line deprecation/deprecation
5455
function getCurrentHub(): Hub {
5556
// eslint-disable-next-line deprecation/deprecation
5657
const hub = getCurrentHubShim();

0 commit comments

Comments
 (0)