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>
94 lines
2.5 KiB
JSON
94 lines
2.5 KiB
JSON
{
|
|
"name": "@copilotkit/react-ui",
|
|
"version": "1.62.3",
|
|
"private": false,
|
|
"keywords": [
|
|
"ai",
|
|
"assistant",
|
|
"automation",
|
|
"copilot",
|
|
"copilotkit",
|
|
"javascript",
|
|
"nextjs",
|
|
"nodejs",
|
|
"react",
|
|
"textarea"
|
|
],
|
|
"homepage": "https://github.com/CopilotKit/CopilotKit",
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/CopilotKit/CopilotKit.git"
|
|
},
|
|
"type": "module",
|
|
"sideEffects": [
|
|
"**/*.css"
|
|
],
|
|
"main": "./dist/index.cjs",
|
|
"module": "./dist/index.mjs",
|
|
"types": "./dist/index.d.cts",
|
|
"unpkg": "./dist/index.umd.js",
|
|
"jsdelivr": "./dist/index.umd.js",
|
|
"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",
|
|
"./styles.css": "./dist/index.css",
|
|
"./v2/styles.css": "./dist/v2/index.css"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public"
|
|
},
|
|
"scripts": {
|
|
"build:css": "node -e \"const fs=require('fs');fs.mkdirSync('./dist/v2',{recursive:true});fs.cpSync('./src/v2/styles.css','./dist/v2/index.css')\"",
|
|
"build": "tsdown && pnpm run build:css",
|
|
"size": "size-limit",
|
|
"compat-check": "es-check es2022 --module 'dist/**/!(*.umd).{mjs,cjs,js}' && es-check es2018 'dist/**/*.umd.js'",
|
|
"dev": "tsdown --watch",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"check-types": "tsc --noEmit",
|
|
"link:global": "pnpm link --global",
|
|
"unlink:global": "pnpm unlink --global",
|
|
"publint": "publint .",
|
|
"attw": "attw --pack . --profile node16"
|
|
},
|
|
"dependencies": {
|
|
"@copilotkit/react-core": "workspace:*",
|
|
"@copilotkit/runtime-client-gql": "workspace:*",
|
|
"@copilotkit/shared": "workspace:*",
|
|
"@headlessui/react": "^2.2.9",
|
|
"react-markdown": "^10.1.0",
|
|
"react-syntax-highlighter": "^15.6.1",
|
|
"rehype-raw": "^7.0.0",
|
|
"rehype-sanitize": "^6.0.0",
|
|
"remark-gfm": "^4.0.1",
|
|
"remark-math": "^6.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/react": "^19.1.0",
|
|
"@types/react-syntax-highlighter": "^15.5.7",
|
|
"eslint": "^8.56.0",
|
|
"postcss": "^8.4.20",
|
|
"react": "^18.2.0",
|
|
"react-dom": "^19.2.0",
|
|
"tailwind-config": "workspace:*",
|
|
"tailwindcss": "^3.3.0",
|
|
"tsconfig": "workspace:*",
|
|
"tsdown": "^0.20.3",
|
|
"typescript": "^5.2.3",
|
|
"vitest": "^3.2.4"
|
|
},
|
|
"peerDependencies": {
|
|
"react": "^18 || ^19 || ^19.0.0-rc"
|
|
}
|
|
}
|