fix: resolve dangling .d.ts imports across packages (#920)#922
Conversation
Switch directory-barrel imports (`../utils`, `../tools`, `../middleware`) to concrete module paths so published declaration files resolve under bundler/node16/nodenext. Remove orphaned barrel index files, add a `test:dts` scanner guardrail, and run `verify-links` via tsx.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (36)
💤 Files with no reviewable changes (5)
📝 WalkthroughWalkthroughMultiple ChangesDangling .d.ts import path fixes and scanner guardrail
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit 1f9a170
☁️ Nx Cloud last updated this comment at |
@tanstack/ai
@tanstack/ai-acp
@tanstack/ai-angular
@tanstack/ai-anthropic
@tanstack/ai-bedrock
@tanstack/ai-claude-code
@tanstack/ai-client
@tanstack/ai-code-mode
@tanstack/ai-code-mode-skills
@tanstack/ai-codex
@tanstack/ai-devtools-core
@tanstack/ai-elevenlabs
@tanstack/ai-event-client
@tanstack/ai-fal
@tanstack/ai-gemini
@tanstack/ai-grok
@tanstack/ai-grok-build
@tanstack/ai-groq
@tanstack/ai-isolate-cloudflare
@tanstack/ai-isolate-node
@tanstack/ai-isolate-quickjs
@tanstack/ai-mcp
@tanstack/ai-mistral
@tanstack/ai-ollama
@tanstack/ai-openai
@tanstack/ai-opencode
@tanstack/ai-openrouter
@tanstack/ai-preact
@tanstack/ai-react
@tanstack/ai-react-ui
@tanstack/ai-sandbox
@tanstack/ai-sandbox-cloudflare
@tanstack/ai-sandbox-daytona
@tanstack/ai-sandbox-docker
@tanstack/ai-sandbox-local-process
@tanstack/ai-sandbox-sprites
@tanstack/ai-sandbox-vercel
@tanstack/ai-solid
@tanstack/ai-solid-ui
@tanstack/ai-svelte
@tanstack/ai-utils
@tanstack/ai-vue
@tanstack/ai-vue-ui
@tanstack/openai-base
@tanstack/preact-ai-devtools
@tanstack/react-ai-devtools
@tanstack/solid-ai-devtools
commit: |
Fixes #920.
Published packages were emitting dangling relative imports in dist/**/*.d.ts (e.g. '../utils.js' for a directory barrel that builds to utils/index.js). Under bundler / node16 / nodenext resolution, those specifiers don't resolve, and with skipLibCheck: true consumer types silently degrade to any.
This PR:
Fixes 29 dangling declaration imports across 10 packages by switching barrel imports to concrete module paths (matching the ai-openai pattern: ../utils/client, ../middleware/run, ./tools/index, etc.)
Adds scripts/scan-dangling-dts.mjs and wires pnpm test:dts into test:pr / test:ci so this can't regress
Removes 5 orphaned barrel index.ts files left unused after the import cleanup (knip)
Runs verify-links via tsx instead of node (TypeScript script)
Packages touched
@tanstack/ai, @tanstack/ai-anthropic, @tanstack/ai-bedrock, @tanstack/ai-fal, @tanstack/ai-gemini, @tanstack/ai-grok, @tanstack/ai-groq, @tanstack/ai-mistral, @tanstack/ai-ollama, @tanstack/ai-openrouter
✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit