Skip to content

Commit b6537ef

Browse files
committed
deprecate @sentry/hub exports
1 parent 42a1adb commit b6537ef

File tree

1 file changed

+168
-13
lines changed

1 file changed

+168
-13
lines changed

packages/hub/src/index.ts

+168-13
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,184 @@
1+
/* eslint-disable deprecation/deprecation */
2+
13
export type { Carrier, Layer } from '@sentry/core';
24

5+
import {
6+
addBreadcrumb as addBreadcrumbCore,
7+
addGlobalEventProcessor as addGlobalEventProcessorCore,
8+
captureEvent as captureEventCore,
9+
captureException as captureExceptionCore,
10+
captureMessage as captureMessageCore,
11+
closeSession as closeSessionCore,
12+
configureScope as configureScopeCore,
13+
getCurrentHub as getCurrentHubCore,
14+
getHubFromCarrier as getHubFromCarrierCore,
15+
getMainCarrier as getMainCarrierCore,
16+
Hub as HubCore,
17+
makeMain as makeMainCore,
18+
makeSession as makeSessionCore,
19+
Scope as ScopeCore,
20+
SessionFlusher as SessionFlusherCore,
21+
setContext as setContextCore,
22+
setExtra as setExtraCore,
23+
setExtras as setExtrasCore,
24+
setHubOnCarrier as setHubOnCarrierCore,
25+
setTag as setTagCore,
26+
setTags as setTagsCore,
27+
setUser as setUserCore,
28+
startTransaction as startTransactionCore,
29+
updateSession as updateSessionCore,
30+
withScope as withScopeCore,
31+
} from '@sentry/core';
32+
33+
/**
34+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
35+
*/
36+
const getCurrentHub = getCurrentHubCore;
37+
38+
/**
39+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
40+
*/
41+
const addGlobalEventProcessor = addGlobalEventProcessorCore;
42+
43+
/**
44+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
45+
*/
46+
const Scope = ScopeCore;
47+
48+
/**
49+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
50+
*/
51+
const getHubFromCarrier = getHubFromCarrierCore;
52+
53+
/**
54+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
55+
*/
56+
const getMainCarrier = getMainCarrierCore;
57+
58+
/**
59+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
60+
*/
61+
const Hub = HubCore;
62+
63+
/**
64+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
65+
*/
66+
const makeMain = makeMainCore;
67+
68+
/**
69+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
70+
*/
71+
const setHubOnCarrier = setHubOnCarrierCore;
72+
73+
/**
74+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
75+
*/
76+
const SessionFlusher = SessionFlusherCore;
77+
78+
/**
79+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
80+
*/
81+
const closeSession = closeSessionCore;
82+
83+
/**
84+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
85+
*/
86+
const makeSession = makeSessionCore;
87+
88+
/**
89+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
90+
*/
91+
const updateSession = updateSessionCore;
92+
93+
/**
94+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
95+
*/
96+
const addBreadcrumb = addBreadcrumbCore;
97+
98+
/**
99+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
100+
*/
101+
const captureException = captureExceptionCore;
102+
103+
/**
104+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
105+
*/
106+
const captureEvent = captureEventCore;
107+
108+
/**
109+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
110+
*/
111+
const captureMessage = captureMessageCore;
112+
113+
/**
114+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
115+
*/
116+
const configureScope = configureScopeCore;
117+
118+
/**
119+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
120+
*/
121+
const startTransaction = startTransactionCore;
122+
123+
/**
124+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
125+
*/
126+
const setContext = setContextCore;
127+
128+
/**
129+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
130+
*/
131+
const setExtra = setExtraCore;
132+
133+
/**
134+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
135+
*/
136+
const setExtras = setExtrasCore;
137+
138+
/**
139+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
140+
*/
141+
const setTag = setTagCore;
142+
143+
/**
144+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
145+
*/
146+
const setTags = setTagsCore;
147+
148+
/**
149+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
150+
*/
151+
const setUser = setUserCore;
152+
153+
/**
154+
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8.
155+
*/
156+
const withScope = withScopeCore;
157+
3158
export {
4-
getCurrentHub,
159+
addBreadcrumb,
5160
addGlobalEventProcessor,
6-
Scope,
161+
captureEvent,
162+
captureException,
163+
captureMessage,
164+
closeSession,
165+
configureScope,
166+
getCurrentHub,
7167
getHubFromCarrier,
8168
getMainCarrier,
9169
Hub,
10170
makeMain,
11-
setHubOnCarrier,
12-
SessionFlusher,
13-
closeSession,
14171
makeSession,
15-
updateSession,
16-
addBreadcrumb,
17-
captureException,
18-
captureEvent,
19-
captureMessage,
20-
configureScope,
21-
startTransaction,
172+
Scope,
173+
SessionFlusher,
22174
setContext,
23175
setExtra,
24176
setExtras,
177+
setHubOnCarrier,
25178
setTag,
26179
setTags,
27180
setUser,
181+
startTransaction,
182+
updateSession,
28183
withScope,
29-
} from '@sentry/core';
184+
};

0 commit comments

Comments
 (0)