diff --git a/.changeset/fix-publishconfig-types.md b/.changeset/fix-publishconfig-types.md new file mode 100644 index 00000000..94289d2e --- /dev/null +++ b/.changeset/fix-publishconfig-types.md @@ -0,0 +1,29 @@ +--- +"@perstack/core": patch +"@perstack/react": patch +"@perstack/api-client": patch +--- + +Fixed `publishConfig.types` format in package.json files + +The `types` field was incorrectly specified as an object (`{ ".": "./dist/src/index.d.ts" }`) instead of being included in the `exports` field. This caused TypeScript to fail to resolve type definitions for published packages. + +Changed from: +```json +"publishConfig": { + "exports": { ".": "./dist/src/index.js" }, + "types": { ".": "./dist/src/index.d.ts" } +} +``` + +To: +```json +"publishConfig": { + "exports": { + ".": { + "types": "./dist/src/index.d.ts", + "import": "./dist/src/index.js" + } + } +} +``` diff --git a/packages/api-client/package.json b/packages/api-client/package.json index c891e204..caec8486 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -11,10 +11,10 @@ "publishConfig": { "access": "public", "exports": { - ".": "./dist/index.js" - }, - "types": { - ".": "./dist/index.d.ts" + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js" + } } }, "files": [ diff --git a/packages/core/package.json b/packages/core/package.json index c4355c3d..5ed821fe 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -11,10 +11,10 @@ "publishConfig": { "access": "public", "exports": { - ".": "./dist/src/index.js" - }, - "types": { - ".": "./dist/src/index.d.ts" + ".": { + "types": "./dist/src/index.d.ts", + "import": "./dist/src/index.js" + } } }, "files": [ diff --git a/packages/mock/package.json b/packages/mock/package.json index 102f9a9e..aefb6519 100644 --- a/packages/mock/package.json +++ b/packages/mock/package.json @@ -12,10 +12,10 @@ "publishConfig": { "access": "public", "exports": { - ".": "./dist/src/index.js" - }, - "types": { - ".": "./dist/src/index.d.ts" + ".": { + "types": "./dist/src/index.d.ts", + "import": "./dist/src/index.js" + } } }, "files": [ diff --git a/packages/providers/anthropic/package.json b/packages/providers/anthropic/package.json index 8457ff0f..6dafd463 100644 --- a/packages/providers/anthropic/package.json +++ b/packages/providers/anthropic/package.json @@ -11,10 +11,10 @@ }, "publishConfig": { "exports": { - ".": "./dist/src/index.js" - }, - "types": { - ".": "./dist/src/index.d.ts" + ".": { + "types": "./dist/src/index.d.ts", + "import": "./dist/src/index.js" + } } }, "files": [ diff --git a/packages/providers/azure-openai/package.json b/packages/providers/azure-openai/package.json index a86f6caa..b2826d81 100644 --- a/packages/providers/azure-openai/package.json +++ b/packages/providers/azure-openai/package.json @@ -11,10 +11,10 @@ }, "publishConfig": { "exports": { - ".": "./dist/src/index.js" - }, - "types": { - ".": "./dist/src/index.d.ts" + ".": { + "types": "./dist/src/index.d.ts", + "import": "./dist/src/index.js" + } } }, "files": [ diff --git a/packages/providers/bedrock/package.json b/packages/providers/bedrock/package.json index ca0960e9..2c85cbc0 100644 --- a/packages/providers/bedrock/package.json +++ b/packages/providers/bedrock/package.json @@ -11,10 +11,10 @@ }, "publishConfig": { "exports": { - ".": "./dist/src/index.js" - }, - "types": { - ".": "./dist/src/index.d.ts" + ".": { + "types": "./dist/src/index.d.ts", + "import": "./dist/src/index.js" + } } }, "files": [ diff --git a/packages/providers/deepseek/package.json b/packages/providers/deepseek/package.json index 93ae2407..16cdda00 100644 --- a/packages/providers/deepseek/package.json +++ b/packages/providers/deepseek/package.json @@ -11,10 +11,10 @@ }, "publishConfig": { "exports": { - ".": "./dist/src/index.js" - }, - "types": { - ".": "./dist/src/index.d.ts" + ".": { + "types": "./dist/src/index.d.ts", + "import": "./dist/src/index.js" + } } }, "files": [ diff --git a/packages/providers/google/package.json b/packages/providers/google/package.json index 9273d851..f73e235f 100644 --- a/packages/providers/google/package.json +++ b/packages/providers/google/package.json @@ -11,10 +11,10 @@ }, "publishConfig": { "exports": { - ".": "./dist/src/index.js" - }, - "types": { - ".": "./dist/src/index.d.ts" + ".": { + "types": "./dist/src/index.d.ts", + "import": "./dist/src/index.js" + } } }, "files": [ diff --git a/packages/providers/ollama/package.json b/packages/providers/ollama/package.json index bdcdadf9..e69f214a 100644 --- a/packages/providers/ollama/package.json +++ b/packages/providers/ollama/package.json @@ -11,10 +11,10 @@ }, "publishConfig": { "exports": { - ".": "./dist/src/index.js" - }, - "types": { - ".": "./dist/src/index.d.ts" + ".": { + "types": "./dist/src/index.d.ts", + "import": "./dist/src/index.js" + } } }, "files": [ diff --git a/packages/providers/openai/package.json b/packages/providers/openai/package.json index 82c4148d..80e9033b 100644 --- a/packages/providers/openai/package.json +++ b/packages/providers/openai/package.json @@ -11,10 +11,10 @@ }, "publishConfig": { "exports": { - ".": "./dist/src/index.js" - }, - "types": { - ".": "./dist/src/index.d.ts" + ".": { + "types": "./dist/src/index.d.ts", + "import": "./dist/src/index.js" + } } }, "files": [ diff --git a/packages/providers/vertex/package.json b/packages/providers/vertex/package.json index f3ec0870..affc2095 100644 --- a/packages/providers/vertex/package.json +++ b/packages/providers/vertex/package.json @@ -11,10 +11,10 @@ }, "publishConfig": { "exports": { - ".": "./dist/src/index.js" - }, - "types": { - ".": "./dist/src/index.d.ts" + ".": { + "types": "./dist/src/index.d.ts", + "import": "./dist/src/index.js" + } } }, "files": [ diff --git a/packages/react/package.json b/packages/react/package.json index f3f91376..8ba5bd2d 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -11,10 +11,10 @@ "publishConfig": { "access": "public", "exports": { - ".": "./dist/src/index.js" - }, - "types": { - ".": "./dist/src/index.d.ts" + ".": { + "types": "./dist/src/index.d.ts", + "import": "./dist/src/index.js" + } } }, "files": [ diff --git a/packages/runner/package.json b/packages/runner/package.json index 66c3f52b..9c0ba644 100644 --- a/packages/runner/package.json +++ b/packages/runner/package.json @@ -12,10 +12,10 @@ "publishConfig": { "access": "public", "exports": { - ".": "./dist/src/index.js" - }, - "types": { - ".": "./dist/src/index.d.ts" + ".": { + "types": "./dist/src/index.d.ts", + "import": "./dist/src/index.js" + } } }, "files": [ diff --git a/packages/runtimes/claude-code/package.json b/packages/runtimes/claude-code/package.json index 468aaae2..88ba17c9 100644 --- a/packages/runtimes/claude-code/package.json +++ b/packages/runtimes/claude-code/package.json @@ -12,10 +12,10 @@ "publishConfig": { "access": "public", "exports": { - ".": "./dist/src/index.js" - }, - "types": { - ".": "./dist/src/index.d.ts" + ".": { + "types": "./dist/src/index.d.ts", + "import": "./dist/src/index.js" + } } }, "files": [ diff --git a/packages/runtimes/cursor/package.json b/packages/runtimes/cursor/package.json index 7124ff94..c957a117 100644 --- a/packages/runtimes/cursor/package.json +++ b/packages/runtimes/cursor/package.json @@ -12,10 +12,10 @@ "publishConfig": { "access": "public", "exports": { - ".": "./dist/src/index.js" - }, - "types": { - ".": "./dist/src/index.d.ts" + ".": { + "types": "./dist/src/index.d.ts", + "import": "./dist/src/index.js" + } } }, "files": [ diff --git a/packages/runtimes/docker/package.json b/packages/runtimes/docker/package.json index d6778970..45886bac 100644 --- a/packages/runtimes/docker/package.json +++ b/packages/runtimes/docker/package.json @@ -12,10 +12,10 @@ "publishConfig": { "access": "public", "exports": { - ".": "./dist/src/index.js" - }, - "types": { - ".": "./dist/src/index.d.ts" + ".": { + "types": "./dist/src/index.d.ts", + "import": "./dist/src/index.js" + } } }, "files": [ diff --git a/packages/runtimes/gemini/package.json b/packages/runtimes/gemini/package.json index 5a0aaedf..9aa1ed4e 100644 --- a/packages/runtimes/gemini/package.json +++ b/packages/runtimes/gemini/package.json @@ -12,10 +12,10 @@ "publishConfig": { "access": "public", "exports": { - ".": "./dist/src/index.js" - }, - "types": { - ".": "./dist/src/index.d.ts" + ".": { + "types": "./dist/src/index.d.ts", + "import": "./dist/src/index.js" + } } }, "files": [ diff --git a/packages/storages/aws-s3/package.json b/packages/storages/aws-s3/package.json index 40654a1f..616a65f5 100644 --- a/packages/storages/aws-s3/package.json +++ b/packages/storages/aws-s3/package.json @@ -12,10 +12,10 @@ "publishConfig": { "access": "public", "exports": { - ".": "./dist/src/index.js" - }, - "types": { - ".": "./dist/src/index.d.ts" + ".": { + "types": "./dist/src/index.d.ts", + "import": "./dist/src/index.js" + } } }, "files": [ diff --git a/packages/storages/cloudflare-r2/package.json b/packages/storages/cloudflare-r2/package.json index d8dedabb..e9429fe7 100644 --- a/packages/storages/cloudflare-r2/package.json +++ b/packages/storages/cloudflare-r2/package.json @@ -12,10 +12,10 @@ "publishConfig": { "access": "public", "exports": { - ".": "./dist/src/index.js" - }, - "types": { - ".": "./dist/src/index.d.ts" + ".": { + "types": "./dist/src/index.d.ts", + "import": "./dist/src/index.js" + } } }, "files": [ diff --git a/packages/storages/filesystem/package.json b/packages/storages/filesystem/package.json index 0fed29ed..f69610ee 100644 --- a/packages/storages/filesystem/package.json +++ b/packages/storages/filesystem/package.json @@ -12,10 +12,10 @@ "publishConfig": { "access": "public", "exports": { - ".": "./dist/src/index.js" - }, - "types": { - ".": "./dist/src/index.d.ts" + ".": { + "types": "./dist/src/index.d.ts", + "import": "./dist/src/index.js" + } } }, "files": [ diff --git a/packages/storages/s3-compatible/package.json b/packages/storages/s3-compatible/package.json index c7ade0aa..abce97aa 100644 --- a/packages/storages/s3-compatible/package.json +++ b/packages/storages/s3-compatible/package.json @@ -12,10 +12,10 @@ "publishConfig": { "access": "public", "exports": { - ".": "./dist/src/index.js" - }, - "types": { - ".": "./dist/src/index.d.ts" + ".": { + "types": "./dist/src/index.d.ts", + "import": "./dist/src/index.js" + } } }, "files": [ diff --git a/packages/tui-components/package.json b/packages/tui-components/package.json index 5be87f17..56e1688c 100644 --- a/packages/tui-components/package.json +++ b/packages/tui-components/package.json @@ -12,10 +12,10 @@ "publishConfig": { "access": "public", "exports": { - ".": "./dist/src/index.js" - }, - "types": { - ".": "./dist/src/index.d.ts" + ".": { + "types": "./dist/src/index.d.ts", + "import": "./dist/src/index.js" + } } }, "files": [