mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
fcac2e9911
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>
1.5 KiB
1.5 KiB