Skip to content

Commit

Permalink
fix(serverless): Explicitly export node package exports
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhiPrasad committed Mar 14, 2023
1 parent 8343eb0 commit f79c7a7
Showing 1 changed file with 44 additions and 2 deletions.
46 changes: 44 additions & 2 deletions packages/serverless/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,47 @@ import * as AWSLambda from './awslambda';
import * as GCPFunction from './gcpfunction';
export { AWSLambda, GCPFunction };

export * from './awsservices';
export * from '@sentry/node';
export { AWSServices } from './awsservices';

// TODO(v8): We have to explicitly export these because of the namespace exports
// above. This is because just doing `export * from '@sentry/node'` will not
// work with Node native esm while we also have namespace exports in a package.
// What we should do is get rid of the namespace exports.
export {
Hub,
SDK_VERSION,
Scope,
addBreadcrumb,
addGlobalEventProcessor,
captureEvent,
captureException,
captureMessage,
configureScope,
createTransport,
getCurrentHub,
getHubFromCarrier,
makeMain,
setContext,
setExtra,
setExtras,
setTag,
setTags,
setUser,
startTransaction,
withScope,
NodeClient,
makeNodeTransport,
close,
defaultIntegrations,
defaultStackParser,
flush,
getSentryRelease,
init,
lastEventId,
DEFAULT_USER_INCLUDES,
addRequestDataToEvent,
extractRequestData,
deepReadDirSync,
Handlers,
Integrations,
} from '@sentry/node';

0 comments on commit f79c7a7

Please sign in to comment.