From 494334cf45a11683bbeb997181410cd7b408daa2 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 24 Oct 2026 13:25:32 +0000 Subject: [PATCH] fix: export classes and namespaces that were re-exported with `export type` `ProcedureContract` (@orpc/server), `AsyncIteratorClass` (@orpc/contract, @orpc/publisher) and `OpenAPIV3_0`/`OpenAPIV3_1`/`OpenAPIV3_2` (@orpc/openapi) were re-exported with `export type`. The bundled .d.mts drops the `type` modifier and declares them as value exports, while the runtime modules did not export them. A value import (an import without `type` under `verbatimModuleSyntax`, `instanceof`, ...) type-checked and then failed at load with "does not provide an export named ...". Re-export them as values so the runtime matches the declarations. The classes are already value exports of @orpc/contract, @orpc/client and @orpc/server, and the @openapi-spec/types modules are empty at runtime. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01U63hBfpeESmJiHXznRFzjN --- packages/contract/src/index.ts | 5 ++++- packages/openapi/src/types.ts | 12 ++++++------ packages/publisher/src/index.ts | 2 +- packages/server/src/index.ts | 2 +- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/packages/contract/src/index.ts b/packages/contract/src/index.ts index ec469c0589..f27a215a3e 100644 --- a/packages/contract/src/index.ts +++ b/packages/contract/src/index.ts @@ -71,8 +71,11 @@ export type { } from '@orpc/client' export type { - AsyncIteratorClass, PromiseWithError, Registry, ThrowableError, } from '@orpc/shared' + +export { + AsyncIteratorClass, +} from '@orpc/shared' diff --git a/packages/openapi/src/types.ts b/packages/openapi/src/types.ts index 19b88a910d..d5803d88b5 100644 --- a/packages/openapi/src/types.ts +++ b/packages/openapi/src/types.ts @@ -1,13 +1,13 @@ +import type { AnyNestedClient, Client, ORPCError } from '@orpc/client' +import type { AsyncIteratorClass } from '@orpc/shared' // eslint-disable-next-line no-restricted-imports -import type * as OpenAPIV3_0 from '@openapi-spec/types/v3.0' +import * as OpenAPIV3_0 from '@openapi-spec/types/v3.0' // eslint-disable-next-line no-restricted-imports -import type * as OpenAPIV3_1 from '@openapi-spec/types/v3.1' +import * as OpenAPIV3_1 from '@openapi-spec/types/v3.1' // eslint-disable-next-line no-restricted-imports -import type * as OpenAPIV3_2 from '@openapi-spec/types/v3.2' -import type { AnyNestedClient, Client, ORPCError } from '@orpc/client' -import type { AsyncIteratorClass } from '@orpc/shared' +import * as OpenAPIV3_2 from '@openapi-spec/types/v3.2' -export type { OpenAPIV3_0, OpenAPIV3_1, OpenAPIV3_2 } +export { OpenAPIV3_0, OpenAPIV3_1, OpenAPIV3_2 } /** * An OpenAPI version `OpenAPIGenerator` can target: any `3.0.x`, `3.1.x`, or `3.2.x` value. diff --git a/packages/publisher/src/index.ts b/packages/publisher/src/index.ts index cbf944cc89..e49c07cfa7 100644 --- a/packages/publisher/src/index.ts +++ b/packages/publisher/src/index.ts @@ -1,5 +1,5 @@ export * from './publisher' -export type { +export { AsyncIteratorClass, } from '@orpc/shared' diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts index 5215f4ae25..867cbb51a4 100644 --- a/packages/server/src/index.ts +++ b/packages/server/src/index.ts @@ -74,7 +74,6 @@ export type { ORPCErrorFactory, ORPCErrorFactoryOptions, ORPCErrorFromErrorMap, - ProcedureContract, ProcedureContractDefinition, RouterContract, Schema, @@ -85,6 +84,7 @@ export { defineMeta, error, eventIterator, + ProcedureContract, reconcileORPCError, type, ValidationError,