From b132addf86d85c21a192de44fca746ed1cf41aae Mon Sep 17 00:00:00 2001 From: Matt Date: Mon, 18 May 2026 10:56:22 -0500 Subject: [PATCH] fix(types): declare types condition in exports for ESM consumers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add `types` condition to the `.` exports entry in both `openapi-fetch` and `openapi-typescript` packages so that modern TypeScript / tsgo (Go-rewritten compiler) can resolve types deterministically from the `dist/index.d.ts` files the packages already ship. Without an explicit `types` condition, packages with `"type": "module"` fall back to the legacy sibling-`.d.ts` resolver, which tsgo is tightening against. No behavioral change — pure manifest fix, two lines per package. --- packages/openapi-fetch/package.json | 1 + packages/openapi-typescript/package.json | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/openapi-fetch/package.json b/packages/openapi-fetch/package.json index 3ed673fe6..9cedf29e3 100644 --- a/packages/openapi-fetch/package.json +++ b/packages/openapi-fetch/package.json @@ -11,6 +11,7 @@ "main": "./dist/index.mjs", "exports": { ".": { + "types": "./dist/index.d.ts", "import": "./dist/index.mjs", "require": "./dist/index.cjs", "default": "./dist/index.mjs" diff --git a/packages/openapi-typescript/package.json b/packages/openapi-typescript/package.json index 2b322a039..9d74602ec 100644 --- a/packages/openapi-typescript/package.json +++ b/packages/openapi-typescript/package.json @@ -14,6 +14,7 @@ "main": "./dist/index.mjs", "exports": { ".": { + "types": "./dist/index.d.ts", "import": "./dist/index.mjs", "require": "./dist/index.cjs", "default": "./dist/index.mjs"