Skip to content

Commit f79c7a7

Browse files
committed
fix(serverless): Explicitly export node package exports
1 parent 8343eb0 commit f79c7a7

File tree

1 file changed

+44
-2
lines changed

1 file changed

+44
-2
lines changed

packages/serverless/src/index.ts

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,47 @@ import * as AWSLambda from './awslambda';
33
import * as GCPFunction from './gcpfunction';
44
export { AWSLambda, GCPFunction };
55

6-
export * from './awsservices';
7-
export * from '@sentry/node';
6+
export { AWSServices } from './awsservices';
7+
8+
// TODO(v8): We have to explicitly export these because of the namespace exports
9+
// above. This is because just doing `export * from '@sentry/node'` will not
10+
// work with Node native esm while we also have namespace exports in a package.
11+
// What we should do is get rid of the namespace exports.
12+
export {
13+
Hub,
14+
SDK_VERSION,
15+
Scope,
16+
addBreadcrumb,
17+
addGlobalEventProcessor,
18+
captureEvent,
19+
captureException,
20+
captureMessage,
21+
configureScope,
22+
createTransport,
23+
getCurrentHub,
24+
getHubFromCarrier,
25+
makeMain,
26+
setContext,
27+
setExtra,
28+
setExtras,
29+
setTag,
30+
setTags,
31+
setUser,
32+
startTransaction,
33+
withScope,
34+
NodeClient,
35+
makeNodeTransport,
36+
close,
37+
defaultIntegrations,
38+
defaultStackParser,
39+
flush,
40+
getSentryRelease,
41+
init,
42+
lastEventId,
43+
DEFAULT_USER_INCLUDES,
44+
addRequestDataToEvent,
45+
extractRequestData,
46+
deepReadDirSync,
47+
Handlers,
48+
Integrations,
49+
} from '@sentry/node';

0 commit comments

Comments
 (0)