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

108 lines
2.8 KiB
JSON

{
"name": "@copilotkit/react-textarea",
"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"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "tsdown",
"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:*",
"@emotion/css": "^11.11.2",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/material": "^5.14.11",
"@radix-ui/react-dialog": "^1.1.1",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-separator": "^1.0.3",
"@radix-ui/react-slot": "^1.0.2",
"class-variance-authority": "^0.6.1",
"clsx": "^1.2.1",
"cmdk": "^0.2.0",
"lodash.merge": "^4.6.2",
"lucide-react": "^0.274.0",
"material-icons": "^1.13.10",
"slate": "^0.94.1",
"slate-history": "^0.93.0",
"slate-react": "^0.98.1",
"tailwind-merge": "^1.13.2"
},
"devDependencies": {
"@types/lodash.merge": "^4.6.7",
"@types/react": "^19.1.0",
"@types/react-dom": "^19.0.2",
"@types/react-syntax-highlighter": "^15.5.7",
"autoprefixer": "^10.4.24",
"eslint": "^8.56.0",
"postcss": "^8.4.20",
"postcss-prefix-selector": "^1.16.1",
"react": "^18.2.0",
"react-dom": "^18.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",
"react-dom": "^18 || ^19 || ^19.0.0-rc"
}
}