chore: migrate toolchain to oxc + TypeScript 7 + vite 8#949
Conversation
Replace ESLint/Prettier with the oxc toolchain, upgrade the type checker to TypeScript 7 (native Go compiler), and move the build stack to vite 8 (Rolldown). Framework tooling that can't run TS7/vite8 yet is pinned back via the @typescript/typescript6 shim and per-package vite pins. Formatter - Prettier -> oxfmt (.oxfmtrc.json migrated from prettier config). oxfmt formats .svelte natively, so prettier + prettier-plugin-svelte are removed. `format` -> `oxfmt .`. Linter - ESLint -> oxlint, untyped + type-aware (oxlint-tsgolint). The custom `as unknown as` ban is ported via oxlint-plugin-eslint; unused-imports and @Stylistic run through oxlint's JS-plugin layer. ESLint and @tanstack/eslint-config removed. `test:eslint` -> `test:oxlint`. TypeScript 7 - Root typescript -> 7.0.2 (tsc is the native Go compiler). types now defaults to [], so tsconfig.base sets `"types": ["node"]`. - JS-Compiler-API consumers use the @typescript/typescript6 (6.0.2) shim: vite-plugin-dts (built-in fallback), @sveltejs/package, svelte-check, vue-tsc, kiira, knip (packageExtensions); @analogjs/vite-plugin-angular pinned to 5.9.3. Framework packages (angular/vue/solid/svelte) stay on 5.9.3. - Fixes: ai-acp Uint8Array->BufferSource (TS 5.7 typed-array generics); ai-react/ai-preact rootDir "../.." (TS7 rootDir default + cross-package test fixtures); one ai-client @ts-expect-error reposition. Build (vite 8 / Rolldown) - vite -> 8.1.4, vitest -> 4.1.10. @tanstack/vite-config bumped to 0.5.2 and patched: outDir->outDirs (vite-plugin-dts 5.x) and an added rollupOptions.preserveModules mirror so multi-entry output holds on both vite 7 and 8. - ai-solid-ui stays on vite 7: Solid JSX has no vite 8/Rolldown support yet (solidjs/solid-start#2075). Also: nx 22->23, knip 5->6. sherif ignores typescript+vite (intentional multi-version). CLAUDE.md updated for the new commands/tooling.
|
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 (2)
📝 WalkthroughWalkthroughThe repository migrates linting and formatting from ESLint and Prettier to Oxlint and Oxfmt, updates TypeScript compatibility and workspace configuration, rewires package scripts, refreshes lint suppressions, and applies formatting-only changes across documentation and examples. ChangesRepository toolchain migration
Estimated code review effort: 3 (Moderate) | ~30 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 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. Comment |
🚀 Changeset Version Preview19 package(s) bumped directly, 26 bumped as dependents. 🟥 Major bumps
🟨 Minor bumps
🟩 Patch bumps
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
|
View your CI Pipeline Execution ↗ for commit d6a0168
☁️ 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: |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CLAUDE.md`:
- Around line 13-18: Update the TypeScript compatibility documentation in
CLAUDE.md to match the current pnpm-workspace.yaml configuration: remove
vite-plugin-dts and ng-packagr from the TypeScript 6 shim list, and add knip and
`@analogjs/vite-plugin-angular`. Verify ng-packagr’s actual usage/configuration in
pnpm-workspace.yaml and preserve or correct its setup as needed so it does not
fail if still used.
In `@knip.json`:
- Around line 3-8: Update the schema URL in knip.json from the Knip 5 schema to
the Knip 6 schema, matching the repository’s knip@^6.26.0 dependency; leave the
ignoreDependencies and ignoreBinaries configuration unchanged.
In `@package.json`:
- Around line 17-19: Update the test:pr and test:ci Nx invocations so the
test:oxlint target excludes examples/** and testing/**, matching the exclusions
in the test:oxlint script. Preserve all other targets and existing command
sequencing.
In `@packages/solid-ai-devtools/package.json`:
- Line 72: Remove the trailing comma after the final vite dependency entry in
the package.json dependencies object so the file remains valid JSON and the
build can parse it.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 992fee55-2768-4b50-b28c-9be7cdb92292
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (114)
.agent/self-learning/INDEX.md.oxfmtrc.json.oxlintrc.json.prettierignore.vscode/extensions.jsonCLAUDE.mdcodemods/package.jsoneslint.config.jsexamples/sandbox-cloudflare/package.jsonexamples/sandbox-cloudflare/worker-configuration.d.tsexamples/sandbox-web/package.jsonexamples/ts-angular-chat/package.jsonexamples/ts-code-mode-web/package.jsonexamples/ts-group-chat/package.jsonexamples/ts-react-chat/package.jsonexamples/ts-react-media/package.jsonexamples/ts-react-search/package.jsonexamples/ts-solid-chat/package.jsonexamples/ts-svelte-chat/package.jsonexamples/ts-svelte-chat/src/lib/components/ChatInput.svelteexamples/ts-vue-chat/package.jsonexamples/vanilla-chat/package.jsonknip.jsonnx.jsonpackage.jsonpackages/ai-acp/package.jsonpackages/ai-acp/src/transport/websocket.tspackages/ai-angular/eslint.config.jspackages/ai-angular/package.jsonpackages/ai-angular/src/inject-chat.tspackages/ai-anthropic/package.jsonpackages/ai-bedrock/package.jsonpackages/ai-claude-code/package.jsonpackages/ai-client/package.jsonpackages/ai-client/src/devtools-noop.tspackages/ai-client/src/devtools.tspackages/ai-client/src/generation-client.tspackages/ai-client/src/video-generation-client.tspackages/ai-client/tests/tool-types.test.tspackages/ai-code-mode-skills/package.jsonpackages/ai-code-mode/package.jsonpackages/ai-codex/package.jsonpackages/ai-devtools/package.jsonpackages/ai-elevenlabs/package.jsonpackages/ai-elevenlabs/src/adapters/transcription.tspackages/ai-event-client/package.jsonpackages/ai-fal/CHANGELOG.mdpackages/ai-fal/package.jsonpackages/ai-gemini/CHANGELOG.mdpackages/ai-gemini/package.jsonpackages/ai-grok-build/package.jsonpackages/ai-grok/CHANGELOG.mdpackages/ai-grok/package.jsonpackages/ai-grok/src/realtime/adapter.tspackages/ai-grok/src/utils/audio.tspackages/ai-groq/package.jsonpackages/ai-isolate-cloudflare/package.jsonpackages/ai-isolate-node/package.jsonpackages/ai-isolate-quickjs/package.jsonpackages/ai-mcp/package.jsonpackages/ai-mcp/src/pool.tspackages/ai-mistral/package.jsonpackages/ai-mistral/src/adapters/text.tspackages/ai-mistral/src/utils/schema-converter.tspackages/ai-ollama/package.jsonpackages/ai-openai/CHANGELOG.mdpackages/ai-openai/package.jsonpackages/ai-openai/src/model-meta.tspackages/ai-opencode/package.jsonpackages/ai-openrouter/CHANGELOG.mdpackages/ai-openrouter/package.jsonpackages/ai-openrouter/src/adapters/responses-text.tspackages/ai-preact/package.jsonpackages/ai-preact/tsconfig.jsonpackages/ai-react-ui/package.jsonpackages/ai-react/package.jsonpackages/ai-react/src/use-chat.tspackages/ai-react/tsconfig.jsonpackages/ai-sandbox-cloudflare/package.jsonpackages/ai-sandbox-daytona/package.jsonpackages/ai-sandbox-docker/package.jsonpackages/ai-sandbox-local-process/package.jsonpackages/ai-sandbox-sprites/package.jsonpackages/ai-sandbox-sprites/src/client.tspackages/ai-sandbox-vercel/package.jsonpackages/ai-sandbox/package.jsonpackages/ai-solid-ui/package.jsonpackages/ai-solid/package.jsonpackages/ai-solid/src/use-chat.tspackages/ai-svelte/package.jsonpackages/ai-svelte/src/create-chat.svelte.tspackages/ai-utils/package.jsonpackages/ai-utils/src/base64.tspackages/ai-vue-ui/package.jsonpackages/ai-vue/package.jsonpackages/ai-vue/src/use-chat.tspackages/ai/CHANGELOG.mdpackages/ai/package.jsonpackages/ai/skills/ai-core/adapter-configuration/references/anthropic-adapter.mdpackages/ai/skills/ai-core/adapter-configuration/references/gemini-adapter.mdpackages/ai/skills/ai-core/adapter-configuration/references/groq-adapter.mdpackages/ai/skills/ai-core/adapter-configuration/references/openai-adapter.mdpackages/ai/src/activities/chat/index.tspackages/ai/src/activities/chat/middleware/builder.tspackages/openai-base/package.jsonpackages/preact-ai-devtools/package.jsonpackages/react-ai-devtools/package.jsonpackages/solid-ai-devtools/package.jsonpatches/@tanstack__vite-config@0.5.2.patchpnpm-workspace.yamlprettier.config.jstesting/e2e/package.jsontesting/panel/package.jsontsconfig.base.json
💤 Files with no reviewable changes (5)
- .prettierignore
- prettier.config.js
- eslint.config.js
- packages/ai-client/tests/tool-types.test.ts
- packages/ai-angular/eslint.config.js
| - **TypeScript**: 7.0.2 (native Go compiler). Framework build/typecheck tools | ||
| that still need the pre-7 JS Compiler API (svelte-package, svelte-check, | ||
| vue-tsc, ng-packagr, kiira, vite-plugin-dts) run against the | ||
| `@typescript/typescript6` (6.0.2) shim via `pnpm-workspace.yaml` | ||
| overrides/packageExtensions; the framework packages themselves stay pinned | ||
| to 5.9.3. See that file's comments. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Update documentation to accurately reflect pnpm-workspace.yaml changes.
The list of framework tools requiring the TypeScript 6 shim in this documentation is out of sync with pnpm-workspace.yaml:
vite-plugin-dtsis listed as needing the shim, but it was upgraded to5.0.3to support TS7 natively.ng-packagris listed but completely missing from thepackageExtensionsconfiguration.knipand@analogjs/vite-plugin-angularare configured for shimming/pinning but omitted from this documentation.
Please update the documentation to match the code, and ensure ng-packagr isn't inadvertently failing if it's still being used.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@CLAUDE.md` around lines 13 - 18, Update the TypeScript compatibility
documentation in CLAUDE.md to match the current pnpm-workspace.yaml
configuration: remove vite-plugin-dts and ng-packagr from the TypeScript 6 shim
list, and add knip and `@analogjs/vite-plugin-angular`. Verify ng-packagr’s actual
usage/configuration in pnpm-workspace.yaml and preserve or correct its setup as
needed so it does not fail if still used.
| "ignoreDependencies": [ | ||
| "@faker-js/faker", | ||
| "@aws-sdk/client-bedrock", | ||
| "@typescript/typescript6" | ||
| ], | ||
| "ignoreBinaries": ["taskkill"], |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo '--- knip.json ---'
cat -n knip.json
echo
echo '--- package.json / workspace version refs ---'
rg -n '"knip"|knip@|schema\.json' package.json . -g '!**/node_modules/**' -g '!**/dist/**' -g '!**/build/**' || trueRepository: TanStack/ai
Length of output: 3375
🏁 Script executed:
#!/bin/bash
set -euo pipefail
sed -n '1,20p' knip.json
printf '\n'
sed -n '1,120p' package.jsonRepository: TanStack/ai
Length of output: 4720
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Show any Knip-related files and the schema reference, if present.
git ls-files | rg '(^|/)(knip\.json|package\.json|pnpm-lock\.yaml|.*knip.*)$' || true
printf '\n'
rg -n 'knip@|schema\.json|`@knip`' . -g '!**/node_modules/**' -g '!**/dist/**' -g '!**/build/**' || trueRepository: TanStack/ai
Length of output: 3254
Update the Knip schema URL in knip.json.
It still targets knip@5/schema.json while the repo depends on Knip 6 (knip@^6.26.0), so editor/schema validation is out of date.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@knip.json` around lines 3 - 8, Update the schema URL in knip.json from the
Knip 5 schema to the Knip 6 schema, matching the repository’s knip@^6.26.0
dependency; leave the ignoreDependencies and ignoreBinaries configuration
unchanged.
| "test:pr": "pnpm run test:react-native && nx affected --targets=test:sherif,test:knip,test:docs,test:kiira,test:oxlint,test:lib,test:types,test:build,build && pnpm test:dts", | ||
| "test:ci": "pnpm run test:react-native && nx run-many --targets=test:sherif,test:knip,test:docs,test:kiira,test:oxlint,test:lib,test:types,test:build,build && pnpm test:dts", | ||
| "test:oxlint": "nx affected --target=test:oxlint --exclude=examples/**,testing/**", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Exclusions for test:oxlint are bypassed in PR and CI scripts.
The test:oxlint script explicitly excludes examples/** and testing/**. However, test:pr and test:ci invoke nx affected --targets=...,test:oxlint,... directly. This bypasses the exclusions defined in the test:oxlint root script, as Nx will directly execute the test:oxlint target defined within each affected package. If the examples and testing packages aren't fully compliant, CI checks may fail.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@package.json` around lines 17 - 19, Update the test:pr and test:ci Nx
invocations so the test:oxlint target excludes examples/** and testing/**,
matching the exclusions in the test:oxlint script. Preserve all other targets
and existing command sequencing.
| "@vitest/coverage-v8": "4.0.14", | ||
| "solid-js": "^1.9.10", | ||
| "vite": "^7.3.3", | ||
| "vite": "^8.1.4", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win
Remove trailing comma to fix JSON syntax.
JSON does not support trailing commas. Since vite is the final property in this object, the trailing comma will cause a syntax error and break the build.
🐛 Proposed fix
- "vite": "^8.1.4",
+ "vite": "^8.1.4"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "vite": "^8.1.4", | |
| "vite": "^8.1.4" |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/solid-ai-devtools/package.json` at line 72, Remove the trailing
comma after the final vite dependency entry in the package.json dependencies
object so the file remains valid JSON and the build can parse it.
The TanStack Start example apps (Start + nitro + framework plugins) don't build under vite 8 / Rolldown yet — ts-solid-chat and ts-react-chat fail in the Start server-fn compiler / nitro server build. Keep the library packages on vite 8 and hold the dev-only example apps on vite 7 until Start/nitro support vite 8.
- ai/realtime: drop the literal `createServerFn()` from the JSDoc example. The vite 8/Rolldown build preserves JSDoc in the emitted .js (vite 7 stripped it), and TanStack Start's server-fn plugin string-matches `createServerFn`, so it tried to compile @tanstack/ai's realtime dist and resolve the framework runtime (@tanstack/solid-start) from ai's package, failing ts-solid-chat's build. The example still shows realtimeToken usage. - ai-mcp: raise vitest testTimeout to 30s. The client/server handshake tests absorb ~20s+ cold module-import cost on CI, tipping the first test over the 5s default (flaky timeout).
🎯 Changes
Migrates the toolchain to the oxc stack, TypeScript 7 (native Go compiler), and vite 8 (Rolldown). Framework tooling that can't run TS7/vite 8 yet is pinned back via the
@typescript/typescript6shim and per-packagevitepins, so the whole workspace stays green.Formatter: Prettier → oxfmt
.oxfmtrc.jsonmigrated from the Prettier config. oxfmt formats.sveltenatively, soprettier+prettier-plugin-svelteare removed.format→oxfmt ..Linter: ESLint → oxlint (untyped + type-aware)
.oxlintrc.jsongenerated via@oxlint/migrate. Type-aware rules (no-floating-promises,no-misused-promises,await-thenable,switch-exhaustiveness-check,consistent-type-exports,prefer-readonly) run viaoxlint-tsgolint.as unknown asban is ported throughoxlint-plugin-eslint;unused-imports+@stylisticrun through oxlint's JS-plugin layer. ESLint +@tanstack/eslint-configremoved.test:eslint→test:oxlint.TypeScript 7.0.2
tsc.typesnow defaults to[], sotsconfig.basesets"types": ["node"].@typescript/typescript6(6.0.2) shim (viapnpm-workspace.yamloverrides/packageExtensions):vite-plugin-dts,@sveltejs/package,svelte-check,vue-tsc,kiira,knip;@analogjs/vite-plugin-angularpinned to 5.9.3. Framework packages (angular/vue/solid/svelte) stay on TS 5.9.3 — Microsoft's TS7 guidance is that these frameworks stay on TS 6 until 7.1 (~Oct 2026).ai-acpUint8Array→BufferSource(TS 5.7 typed-array generics);ai-react/ai-preactrootDir: "../.."(TS7 rootDir default + cross-package test fixtures); oneai-client@ts-expect-errorreposition.Build: vite 8 / Rolldown
vite→ 8.1.4,vitest→ 4.1.10.@tanstack/vite-configbumped to 0.5.2 and patched:outDir→outDirs(vite-plugin-dts 5.x API rename) plus an addedrollupOptions.preserveModulesmirror so multi-entry output holds on both vite 7 and 8.ai-solid-uistays on vite 7: Solid JSX has no vite 8/Rolldown support yet ([Feature]: Vite 8 / Rolldown Compatibility solidjs/solid-start#2075, [Vite 8] Dependency scanner fails with react/jsx-dev-runtime when scanning .tsx entry from node_modules in non-React projects vitejs/vite#22057).Also
nx22 → 23,knip5 → 6.sherifignorestypescript+vite(intentional multi-version).CLAUDE.mdupdated for the new commands/tooling.Rough before/after (local, single cold runs — ratios are the signal)
src, type-aware)tsc(@tanstack/ai)nx build, 47 pkgs, cold)✅ Checklist
pnpm run test:pr.test:types,test:oxlinttype-aware,test:build/publint,test:knip,test:kiira,test:sherif,test:dts,test:docs,test:lib). The single end-to-endtest:prrun was not executed locally — relying on CI for that.test:libhad two Windows-only flakes (ai-sandbox/tmpvs\tmppath assertion,ai-acpEBUSYtemp-dir lock) that are green on Linux; the example apps +testing/**were not separately re-verified under vite 8.🚀 Release Impact
Summary by CodeRabbit
test:oxlinttask; CI/PR checks now use oxlint.