fix: resolve skipLibCheck-masked dangling .d.ts imports (+ test:dts guardrail) #924
Merged
tombeckenhammerged 2 commits into
main fromrefs/pull/924/head·merged by tombeckenham View on GitHubSummary#
- Fix directory-barrel imports that emit as dangling
../utils.js/../tools.js/../middleware.jsin published.d.ts(no/indexfallback under bundler/node16/nodenext). Under consumerskipLibCheckthose symbols silently becameany— same root cause as #919, swept across 10 packages including the Gemini experimental adapter #919 missed. - Add
pnpm test:dts(scripts/scan-dangling-dts.mjs) and wire it intotest:pr/test:ciso regressions fail on the producer side. - Fix remaining
@arethetypeswrong/cliInternalResolutionErrors under--profile esm-only: bare'.'(anthropic), extensionlessmodel-catalog.generated(bedrock), version-dot meta basenames likemodel-meta-llama3.1(ollama).
Closes #920
Test plan#
-
pnpm test:dtsclean afterbuild:all(692.d.tsfiles) -
test:typesgreen on affected packages -
attw --pack --profile esm-onlyexit 0 for ai-anthropic, ai-bedrock, ai-ollama, ai-fal, ai-gemini - CI
test:pr/ full PR checks green
Summary by CodeRabbit#
Bug Fixes
- Fixed published TypeScript declarations so imports resolve correctly in Node ESM and modern bundlers.
- Prevented unresolved type references from being incorrectly treated as
any. - Improved module compatibility across Anthropic, Bedrock, and Ollama integrations.
Tests
- Added automated validation to detect unresolved imports in generated declaration files before release.
- Enhanced checks for common TypeScript and ESM resolution patterns.
- 1
AlemTuzlak approved these changes
🚀 Changeset Version Preview#
13 package(s) bumped directly, 32 bumped as dependents.
🟥 Major bumps#
Package Version Reason @tanstack/ai-anthropic0.16.1 → 1.0.0 Changeset @tanstack/ai-bedrock0.1.2 → 1.0.0 Changeset @tanstack/ai-fal0.9.10 → 1.0.0 Changeset @tanstack/ai-gemini0.19.1 → 1.0.0 Changeset @tanstack/ai-grok0.14.7 → 1.0.0 Changeset @tanstack/ai-groq0.5.1 → 1.0.0 Changeset @tanstack/ai-mistral0.2.1 → 1.0.0 Changeset @tanstack/ai-ollama0.8.14 → 1.0.0 Changeset @tanstack/ai-openai0.16.0 → 1.0.0 Changeset @tanstack/ai-openrouter0.15.8 → 1.0.0 Changeset @tanstack/ai-react0.16.4 → 1.0.0 Changeset @tanstack/ai-acp0.2.1 → 1.0.0 Dependent @tanstack/ai-angular0.2.3 → 1.0.0 Dependent @tanstack/ai-claude-code0.2.1 → 1.0.0 Dependent @tanstack/ai-code-mode0.3.6 → 1.0.0 Dependent @tanstack/ai-code-mode-skills0.3.9 → 1.0.0 Dependent @tanstack/ai-codex0.2.1 → 1.0.0 Dependent @tanstack/ai-elevenlabs0.2.32 → 1.0.0 Dependent @tanstack/ai-grok-build0.2.1 → 1.0.0 Dependent @tanstack/ai-isolate-node0.1.45 → 1.0.0 Dependent @tanstack/ai-isolate-quickjs0.1.45 → 1.0.0 Dependent @tanstack/ai-opencode0.2.1 → 1.0.0 Dependent @tanstack/ai-preact0.10.3 → 1.0.0 Dependent @tanstack/ai-react-ui0.8.13 → 1.0.0 Dependent @tanstack/ai-sandbox0.2.2 → 1.0.0 Dependent @tanstack/ai-sandbox-cloudflare0.2.2 → 1.0.0 Dependent @tanstack/ai-sandbox-daytona0.2.0 → 1.0.0 Dependent @tanstack/ai-sandbox-docker0.2.0 → 1.0.0 Dependent @tanstack/ai-sandbox-local-process0.2.0 → 1.0.0 Dependent @tanstack/ai-sandbox-sprites0.2.1 → 1.0.0 Dependent @tanstack/ai-sandbox-vercel0.2.0 → 1.0.0 Dependent @tanstack/ai-solid0.14.3 → 1.0.0 Dependent @tanstack/ai-solid-ui0.7.12 → 1.0.0 Dependent @tanstack/ai-svelte0.14.3 → 1.0.0 Dependent @tanstack/ai-vue0.14.3 → 1.0.0 Dependent @tanstack/openai-base0.9.7 → 1.0.0 Dependent 🟨 Minor bumps#
Package Version Reason @tanstack/ai0.40.0 → 0.41.0 Changeset @tanstack/ai-client0.20.0 → 0.21.0 Changeset 🟩 Patch bumps#
Package Version Reason @tanstack/ai-devtools-core0.4.22 → 0.4.23 Dependent @tanstack/ai-isolate-cloudflare0.2.36 → 0.2.37 Dependent @tanstack/ai-mcp0.2.3 → 0.2.4 Dependent @tanstack/ai-vue-ui0.2.31 → 0.2.32 Dependent @tanstack/preact-ai-devtools0.1.65 → 0.1.66 Dependent @tanstack/react-ai-devtools0.2.65 → 0.2.66 Dependent @tanstack/solid-ai-devtools0.2.65 → 0.2.66 Dependent View your CI Pipeline Execution ↗ for commit 569e768cadbcc8aae7e965665fa440618e70169c
Command Status Duration Result nx affected --targets=test:sherif,test:knip,tes...✅ Succeeded 4s View ↗
☁️ Nx Cloud last updated this comment at
2026-07-10 11:00:15UTC@tanstack/ai
npm i https://pkg.pr.new/@tanstack/ai@924@tanstack/ai-acp
npm i https://pkg.pr.new/@tanstack/ai-acp@924@tanstack/ai-angular
npm i https://pkg.pr.new/@tanstack/ai-angular@924@tanstack/ai-anthropic
npm i https://pkg.pr.new/@tanstack/ai-anthropic@924@tanstack/ai-bedrock
npm i https://pkg.pr.new/@tanstack/ai-bedrock@924@tanstack/ai-claude-code
npm i https://pkg.pr.new/@tanstack/ai-claude-code@924@tanstack/ai-client
npm i https://pkg.pr.new/@tanstack/ai-client@924@tanstack/ai-code-mode
npm i https://pkg.pr.new/@tanstack/ai-code-mode@924@tanstack/ai-code-mode-skills
npm i https://pkg.pr.new/@tanstack/ai-code-mode-skills@924@tanstack/ai-codex
npm i https://pkg.pr.new/@tanstack/ai-codex@924@tanstack/ai-devtools-core
npm i https://pkg.pr.new/@tanstack/ai-devtools-core@924@tanstack/ai-elevenlabs
npm i https://pkg.pr.new/@tanstack/ai-elevenlabs@924@tanstack/ai-event-client
npm i https://pkg.pr.new/@tanstack/ai-event-client@924@tanstack/ai-fal
npm i https://pkg.pr.new/@tanstack/ai-fal@924@tanstack/ai-gemini
npm i https://pkg.pr.new/@tanstack/ai-gemini@924@tanstack/ai-grok
npm i https://pkg.pr.new/@tanstack/ai-grok@924@tanstack/ai-grok-build
npm i https://pkg.pr.new/@tanstack/ai-grok-build@924@tanstack/ai-groq
npm i https://pkg.pr.new/@tanstack/ai-groq@924@tanstack/ai-isolate-cloudflare
npm i https://pkg.pr.new/@tanstack/ai-isolate-cloudflare@924@tanstack/ai-isolate-node
npm i https://pkg.pr.new/@tanstack/ai-isolate-node@924@tanstack/ai-isolate-quickjs
npm i https://pkg.pr.new/@tanstack/ai-isolate-quickjs@924@tanstack/ai-mcp
npm i https://pkg.pr.new/@tanstack/ai-mcp@924@tanstack/ai-mistral
npm i https://pkg.pr.new/@tanstack/ai-mistral@924@tanstack/ai-ollama
npm i https://pkg.pr.new/@tanstack/ai-ollama@924@tanstack/ai-openai
npm i https://pkg.pr.new/@tanstack/ai-openai@924@tanstack/ai-opencode
npm i https://pkg.pr.new/@tanstack/ai-opencode@924@tanstack/ai-openrouter
npm i https://pkg.pr.new/@tanstack/ai-openrouter@924@tanstack/ai-preact
npm i https://pkg.pr.new/@tanstack/ai-preact@924@tanstack/ai-react
npm i https://pkg.pr.new/@tanstack/ai-react@924@tanstack/ai-react-ui
npm i https://pkg.pr.new/@tanstack/ai-react-ui@924@tanstack/ai-sandbox
npm i https://pkg.pr.new/@tanstack/ai-sandbox@924@tanstack/ai-sandbox-cloudflare
npm i https://pkg.pr.new/@tanstack/ai-sandbox-cloudflare@924@tanstack/ai-sandbox-daytona
npm i https://pkg.pr.new/@tanstack/ai-sandbox-daytona@924@tanstack/ai-sandbox-docker
npm i https://pkg.pr.new/@tanstack/ai-sandbox-docker@924@tanstack/ai-sandbox-local-process
npm i https://pkg.pr.new/@tanstack/ai-sandbox-local-process@924@tanstack/ai-sandbox-sprites
npm i https://pkg.pr.new/@tanstack/ai-sandbox-sprites@924@tanstack/ai-sandbox-vercel
npm i https://pkg.pr.new/@tanstack/ai-sandbox-vercel@924@tanstack/ai-solid
npm i https://pkg.pr.new/@tanstack/ai-solid@924@tanstack/ai-solid-ui
npm i https://pkg.pr.new/@tanstack/ai-solid-ui@924@tanstack/ai-svelte
npm i https://pkg.pr.new/@tanstack/ai-svelte@924@tanstack/ai-utils
npm i https://pkg.pr.new/@tanstack/ai-utils@924@tanstack/ai-vue
npm i https://pkg.pr.new/@tanstack/ai-vue@924@tanstack/ai-vue-ui
npm i https://pkg.pr.new/@tanstack/ai-vue-ui@924@tanstack/openai-base
npm i https://pkg.pr.new/@tanstack/openai-base@924@tanstack/preact-ai-devtools
npm i https://pkg.pr.new/@tanstack/preact-ai-devtools@924@tanstack/react-ai-devtools
npm i https://pkg.pr.new/@tanstack/react-ai-devtools@924@tanstack/solid-ai-devtools
npm i https://pkg.pr.new/@tanstack/solid-ai-devtools@924commit:
569e768tombeckenham merged this5fcaf90
tombeckenham closed this
Sign in to join this conversation.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID:
7183cada-d892-484b-ba43-23eac2719225📥 Commits
Reviewing files that changed from the base of the PR and between d2b1e5fce7ab70ac11c243dff90aee0a2d4723d5 and 569e768cadbcc8aae7e965665fa440618e70169c.
📒 Files selected for processing (6)
.changeset/fix-dangling-dts-barrel-imports.mdnx.jsonpackages/ai-anthropic/src/tools/tool-converter.tspackages/ai-bedrock/src/model-meta.tspackages/ai-ollama/src/model-meta.tsscripts/scan-dangling-dts.mjs✅ Files skipped from review due to trivial changes (3)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 Walkthrough
Walkthrough#
Provider package imports now use resolvable ESM and declaration paths. A recursive scanner validates built
.d.tsimports, and Nx caches the newtest:dtstarget. A Changesets entry records patch releases for the affected packages.Changes#
DTS resolution cleanup
packages/ai-anthropic/src/tools/tool-converter.ts,packages/ai-bedrock/src/model-meta.ts,packages/ai-ollama/src/model-meta.ts./indexor.jsmodule paths for generated models and model metadata types.scripts/scan-dangling-dts.mjs,nx.jsontest:dtstarget..changeset/fix-dangling-dts-barrel-imports.mdEstimated code review effort: 3 (Moderate) | ~20 minutes
Possibly related PRs
test:dtsverification.Suggested reviewers:
AlemTuzlak,KevinVandy🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 inconclusive)#
✅ Passed checks (4 passed)
✨ Finishing Touches
📝 Generate docstrings
🧪 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.
❤️ Share