Files
Tyler Slaton fcac2e9911 fix(build): add types condition to package.json exports maps (#3324)
Under moduleResolution bundler/node16/nodenext, TypeScript ignores the
top-level "types" field once an "exports" map exists, so strict-exports
tooling (e.g. the Backstage CLI) resolves no type declarations and reports
every named export as "has no exported member". tsdown does not emit a
types condition in the exports map it generates.

Add one — first, per import/require, ESM to .d.mts and CJS to .d.cts — via
a shared withTypesConditions helper (scripts/tsdown-exports.ts) wired into
each tsdown config, and directly in the hand-maintained react-native map.

Add a regression guard, since attw and publint do NOT catch this (TS's
adjacent-file fallback masks it): scripts/validate-package-exports-types.ts,
unit + all-package tests, a validate:exports npm script, and a CI workflow
that fail if any publishable package's exports map lacks a types condition.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-09 20:38:10 -07:00

55 lines
1.3 KiB
JSON

{
"name": "@copilotkit/agentcore-runner",
"version": "1.62.3",
"description": "AWS Bedrock AgentCore-compatible agent runner for CopilotKit2",
"repository": {
"type": "git",
"url": "https://github.com/CopilotKit/CopilotKit.git"
},
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.cts",
"exports": {
".": {
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"./package.json": "./package.json"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "tsdown",
"dev": "tsdown --watch",
"check-types": "tsc --noEmit",
"test": "vitest run",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage",
"publint": "publint .",
"attw": "attw --pack . --profile node16"
},
"dependencies": {
"@ag-ui/client": "0.0.57",
"@copilotkit/runtime": "workspace:*",
"rxjs": "7.8.1"
},
"devDependencies": {
"@copilotkit/typescript-config": "workspace:*",
"@types/node": "^22.15.3",
"tsdown": "^0.20.3",
"typescript": "5.8.2",
"vitest": "^3.0.5"
},
"engines": {
"node": ">=18"
}
}