Skip to content

Commit cbc4d5d

Browse files
committed
fix(sveltekit): Explicitly export Node SDK exports
1 parent 3a91a62 commit cbc4d5d

File tree

3 files changed

+49
-14
lines changed

3 files changed

+49
-14
lines changed
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
11
export * from './client';
2-
3-
/**
4-
* This const serves no purpose besides being an identifier for this file that the SDK multiplexer loader can use to
5-
* determine that this is in fact a file that wants to be multiplexed.
6-
*/
7-
export const _SENTRY_SDK_MULTIPLEXER = true;
Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,2 @@
11
export * from './server';
22
export * from './config';
3-
4-
// This file is the main entrypoint on the server and/or when the package is `require`d
5-
6-
/**
7-
* This const serves no purpose besides being an identifier for this file that the SDK multiplexer loader can use to
8-
* determine that this is in fact a file that wants to be multiplexed.
9-
*/
10-
export const _SENTRY_SDK_MULTIPLEXER = true;

packages/sveltekit/src/server/index.ts

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,54 @@
1+
// Node SDK exports
2+
// Unfortunately, we cannot `exprt * from '@sentry/node'` because our CJS output mistakenly
3+
// puts these exports into a `default` rather than on the top-level namespace.
4+
// Hence, we export everything from the Node SDK explicitly:
5+
export {
6+
addGlobalEventProcessor,
7+
addBreadcrumb,
8+
captureException,
9+
captureEvent,
10+
captureMessage,
11+
configureScope,
12+
createTransport,
13+
extractTraceparentData,
14+
getActiveTransaction,
15+
getHubFromCarrier,
16+
getCurrentHub,
17+
Hub,
18+
makeMain,
19+
Scope,
20+
startTransaction,
21+
SDK_VERSION,
22+
setContext,
23+
setExtra,
24+
setExtras,
25+
setTag,
26+
setTags,
27+
setUser,
28+
spanStatusfromHttpCode,
29+
trace,
30+
withScope,
31+
autoDiscoverNodePerformanceMonitoringIntegrations,
32+
makeNodeTransport,
33+
defaultIntegrations,
34+
defaultStackParser,
35+
lastEventId,
36+
flush,
37+
close,
38+
getSentryRelease,
39+
addRequestDataToEvent,
40+
DEFAULT_USER_INCLUDES,
41+
extractRequestData,
42+
deepReadDirSync,
43+
Integrations,
44+
Handlers,
45+
} from '@sentry/node';
46+
47+
// We can still leave this for the carrier init and type exports
148
export * from '@sentry/node';
249

50+
// -------------------------
51+
// SvelteKit SDK exports:
352
export { init } from './sdk';
453
export { handleErrorWithSentry } from './handleError';
554
export { wrapLoadWithSentry } from './load';

0 commit comments

Comments
 (0)