Skip to content

Commit dabdfba

Browse files
mydeaclaude
andcommitted
ref(node): Move eveConversationHook to @sentry/server-utils and re-export from every runtime SDK
The helper only needs `setConversationId` from core, so `@sentry/server-utils` is its natural home — a framework-agnostic shared layer already re-exported by the runtime SDKs — rather than living in `@sentry/node`. - `@sentry/node` now re-exports it from `@sentry/server-utils` (like the other shared server helpers), so every node-based SDK that does `export * from '@sentry/node'` (astro, nitro — eve's own base —, nestjs, hono, effect) surfaces it automatically. - Added to the explicit `@sentry/node` re-export blocks of `@sentry/bun`, `@sentry/aws-serverless` and `@sentry/google-cloud-serverless`. - Added to the `@sentry/server-utils` re-export blocks of `@sentry/deno` and `@sentry/cloudflare`, which build on server-utils rather than node. The unit test moves alongside the implementation into `@sentry/server-utils`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent ac90610 commit dabdfba

9 files changed

Lines changed: 14 additions & 3 deletions

File tree

‎packages/aws-serverless/src/index.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ export {
170170
withStaticSpan,
171171
// oxlint-disable-next-line typescript/no-deprecated
172172
withStreamedSpan,
173+
eveConversationHook,
174+
type EveConversationHookOptions,
173175
} from '@sentry/node';
174176

175177
export {

‎packages/bun/src/index.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ export {
187187
withStaticSpan,
188188
// oxlint-disable-next-line typescript/no-deprecated
189189
withStreamedSpan,
190+
eveConversationHook,
191+
type EveConversationHookOptions,
190192
} from '@sentry/node';
191193

192194
export {

‎packages/cloudflare/src/index.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ export {
134134
instrumentStateGraph,
135135
instrumentCreateReactAgent,
136136
vercelAIIntegration,
137+
eveConversationHook,
138+
type EveConversationHookOptions,
137139
} from '@sentry/server-utils';
138140

139141
export { instrumentWorkflowWithSentry } from './workflows';

‎packages/deno/src/index.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ export {
144144
postgresIntegration,
145145
postgresJsIntegration,
146146
tediousIntegration,
147+
eveConversationHook,
148+
type EveConversationHookOptions,
147149
} from '@sentry/server-utils';
148150
export { openTelemetryIntegration, getOtlpTracesEndpoint } from '@sentry/server-utils/no-diagnostic-channels';
149151
// Deprecated aliases kept for back-compat. Each forwards to the shared

‎packages/google-cloud-serverless/src/index.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ export {
170170
withStaticSpan,
171171
// oxlint-disable-next-line typescript/no-deprecated
172172
withStreamedSpan,
173+
eveConversationHook,
174+
type EveConversationHookOptions,
173175
} from '@sentry/node';
174176

175177
export {

‎packages/node/src/index.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export { makeNodeTransport } from './transports';
216216
export { createGetModuleFromFilename } from './utils/module';
217217

218218
export { SENTRY_SEGMENT_NAME_SOURCE } from '@sentry/conventions/attributes';
219-
export { eveConversationHook, type EveConversationHookOptions } from './eve';
219+
export { eveConversationHook, type EveConversationHookOptions } from '@sentry/server-utils';
220220
export { httpServerIntegration } from './integrations/http/httpServerIntegration';
221221
export { httpServerSpansIntegration } from './integrations/http/httpServerSpansIntegration';
222222
export { processSessionIntegration } from './integrations/processSession';
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { setConversationId } from '@sentry/core';
22

33
/**
44
* The subset of eve's hook context (`HookContext` from `eve/hooks`) this helper reads. Typed
5-
* structurally rather than importing from `eve`, so `@sentry/node` carries no dependency on the
6-
* framework — the shape is checked at the `defineHook(...)` call site in the user's app instead.
5+
* structurally rather than importing from `eve`, so the SDK carries no dependency on the framework —
6+
* the shape is checked at the `defineHook(...)` call site in the user's app instead.
77
*/
88
interface EveHookContext {
99
session: { id: string };

‎packages/server-utils/src/index.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export type { InstrumentationConfig } from './orchestrion/apmTypes';
1313
// `orchestrion/bundler/moduleInjectedTransform.ts`); it is a plain runtime
1414
// helper with no orchestrion build-time dependency.
1515
export { orchestrionModuleInjected } from './utils/moduleInjected';
16+
export { eveConversationHook, type EveConversationHookOptions } from './eve';
1617
export {
1718
fastifyIntegration,
1819
// oxlint-disable-next-line typescript/no-deprecated

0 commit comments

Comments
 (0)