Skip to content

feat(remix): Add more missing @sentry/node re-exports #10391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ const NODE_EXPORTS_IGNORE = [
'DebugSession',
'AnrIntegrationOptions',
'LocalVariablesIntegrationOptions',
// deprecated
'spanStatusfromHttpCode',
];

type Dependent = {
Expand All @@ -43,13 +41,10 @@ const DEPENDENTS: Dependent[] = [
// Next.js doesn't require explicit exports, so we can just merge top level and `default` exports:
// @ts-expect-error: `default` is not in the type definition but it's defined
exports: Object.keys({ ...SentryNextJs, ...SentryNextJs.default }),
ignoreExports: ['withSentryConfig'],
},
{
package: '@sentry/remix',
exports: Object.keys(SentryRemix),
// TODO: Fix exports in remix
skip: true,
},
{
package: '@sentry/serverless',
Expand All @@ -58,9 +53,9 @@ const DEPENDENTS: Dependent[] = [
// Deprecated, no need to add this now to serverless
'extractTraceparentData',
'getModuleFromFilename',
'enableAnrDetection',
// TODO: Should these be exported from serverless?
'cron',
'enableAnrDetection',
'runWithAsyncContext',
'hapiErrorPlugin',
],
Expand Down
13 changes: 13 additions & 0 deletions packages/remix/src/index.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export {
// eslint-disable-next-line deprecation/deprecation
makeMain,
setCurrentClient,
NodeClient,
Scope,
// eslint-disable-next-line deprecation/deprecation
startTransaction,
Expand Down Expand Up @@ -83,6 +84,18 @@ export {
isInitialized,
cron,
parameterize,
metrics,
// eslint-disable-next-line deprecation/deprecation
getModuleFromFilename,
createGetModuleFromFilename,
functionToStringIntegration,
hapiErrorPlugin,
inboundFiltersIntegration,
linkedErrorsIntegration,
requestDataIntegration,
runWithAsyncContext,
// eslint-disable-next-line deprecation/deprecation
enableAnrDetection,
} from '@sentry/node';

// Keeping the `*` exports for backwards compatibility and types
Expand Down