From b3f16f186f6302318375223fae323b574f274db3 Mon Sep 17 00:00:00 2001 From: Tyagiquamar Date: Sun, 13 Sep 2026 20:12:10 +0530 Subject: [PATCH] fix(nitro): import from nitro/h3 instead of h3 --- packages/nitro/package.json | 3 +-- packages/nitro/src/runtime/hooks/captureErrorHook.ts | 2 +- packages/nitro/src/runtime/hooks/captureTracingEvents.ts | 2 +- packages/nitro/src/runtime/hooks/setServerTimingHeaders.ts | 2 +- packages/nitro/test/runtime/hooks/captureErrorHook.test.ts | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/nitro/package.json b/packages/nitro/package.json index c81f247e032c..3bdd6f57243c 100644 --- a/packages/nitro/package.json +++ b/packages/nitro/package.json @@ -43,8 +43,7 @@ "@sentry/server-utils": "10.67.0" }, "devDependencies": { - "nitro": "^3.0.260415-beta", - "h3": "^2.0.1-rc.22" + "nitro": "^3.0.260415-beta" }, "scripts": { "build": "run-p build:transpile build:types", diff --git a/packages/nitro/src/runtime/hooks/captureErrorHook.ts b/packages/nitro/src/runtime/hooks/captureErrorHook.ts index 2f7a602f3af1..d07bad842ea0 100644 --- a/packages/nitro/src/runtime/hooks/captureErrorHook.ts +++ b/packages/nitro/src/runtime/hooks/captureErrorHook.ts @@ -1,6 +1,6 @@ import { captureException, getClient, parseUrl } from '@sentry/core'; import { flushIfServerless } from '@sentry/core/server'; -import { HTTPError } from 'h3'; +import { HTTPError } from 'nitro/h3'; import type { CapturedErrorContext } from 'nitro/types'; /** diff --git a/packages/nitro/src/runtime/hooks/captureTracingEvents.ts b/packages/nitro/src/runtime/hooks/captureTracingEvents.ts index b34a5bf7225d..63468b44e80b 100644 --- a/packages/nitro/src/runtime/hooks/captureTracingEvents.ts +++ b/packages/nitro/src/runtime/hooks/captureTracingEvents.ts @@ -22,7 +22,7 @@ import { setHttpServerSpanRouteAttribute, type TracingChannelPayloadWithSpan, } from '@sentry/server-utils'; -import type { TracingRequestEvent as H3TracingRequestEvent } from 'h3/tracing'; +import type { TracingRequestEvent as H3TracingRequestEvent } from 'nitro/h3/tracing'; import type { RequestEvent as SrvxRequestEvent } from 'srvx/tracing'; import { setServerTimingHeaders } from './setServerTimingHeaders'; diff --git a/packages/nitro/src/runtime/hooks/setServerTimingHeaders.ts b/packages/nitro/src/runtime/hooks/setServerTimingHeaders.ts index 4573f8171c19..70ef8f1452d5 100644 --- a/packages/nitro/src/runtime/hooks/setServerTimingHeaders.ts +++ b/packages/nitro/src/runtime/hooks/setServerTimingHeaders.ts @@ -1,5 +1,5 @@ import { getTraceData } from '@sentry/core'; -import type { TracingRequestEvent as H3TracingRequestEvent } from 'h3/tracing'; +import type { TracingRequestEvent as H3TracingRequestEvent } from 'nitro/h3/tracing'; /** * Sets Server-Timing response headers for trace propagation to the client. diff --git a/packages/nitro/test/runtime/hooks/captureErrorHook.test.ts b/packages/nitro/test/runtime/hooks/captureErrorHook.test.ts index f83395b6c7db..7ff08f489a0d 100644 --- a/packages/nitro/test/runtime/hooks/captureErrorHook.test.ts +++ b/packages/nitro/test/runtime/hooks/captureErrorHook.test.ts @@ -1,6 +1,6 @@ import * as SentryCore from '@sentry/core'; import * as SentryCoreServer from '@sentry/core/server'; -import { HTTPError } from 'h3'; +import { HTTPError } from 'nitro/h3'; import { beforeEach, describe, expect, it, vi } from 'vitest'; import { captureErrorHook } from '../../../src/runtime/hooks/captureErrorHook';