Skip to content

Commit c801e84

Browse files
committed
fix makeMain
1 parent 5850685 commit c801e84

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

packages/node-experimental/src/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ export { hapiIntegration, setupHapiErrorHandler } from './integrations/tracing/h
2424

2525
export { init, getDefaultIntegrations } from './sdk/init';
2626
export { getAutoPerformanceIntegrations } from './integrations/tracing';
27-
export { getClient, getSentryRelease, defaultStackParser } from './sdk/api';
27+
export {
28+
getClient,
29+
getSentryRelease,
30+
defaultStackParser,
31+
// eslint-disable-next-line deprecation/deprecation
32+
makeMain,
33+
} from './sdk/api';
2834
export { createGetModuleFromFilename } from './utils/module';
2935
export { makeNodeTransport } from './transports';
3036
export { NodeClient } from './sdk/client';

packages/node-experimental/src/sdk/api.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import { getCurrentScope } from '@sentry/core';
44
import type { Client, StackParser } from '@sentry/types';
5+
import type { Hub } from '@sentry/types';
56
import { GLOBAL_OBJ, createStackParser, nodeStackLineParser } from '@sentry/utils';
67
import { createGetModuleFromFilename } from '../utils/module';
78

@@ -54,3 +55,14 @@ export function getSentryRelease(fallback?: string): string | undefined {
5455

5556
/** Node.js stack parser */
5657
export const defaultStackParser: StackParser = createStackParser(nodeStackLineParser(createGetModuleFromFilename()));
58+
59+
/**
60+
* This method is a noop and only here to ensure vite-plugin v0.6.0 (which is used by Sveltekit) still works,
61+
* as that uses this.
62+
*
63+
* @deprecated This will be removed before v8 is finalized.
64+
*/
65+
export function makeMain(hub: Hub): Hub {
66+
// noop
67+
return hub;
68+
}

0 commit comments

Comments
 (0)