chore: update to TS6.0, fix deprecated tsconfig options#421
chore: update to TS6.0, fix deprecated tsconfig options#421camc314 wants to merge 2 commits intoTanStack:mainfrom
Conversation
📝 WalkthroughWalkthroughThis pull request upgrades TypeScript from version 5.x to 6.0.2 across the entire monorepo and updates TypeScript compiler options to use Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
examples/custom-cli/create-rwsdk/project/base/package.json.ejs (1)
39-39: Consider using semver range constraint for consistency.This file uses an exact version
"6.0.2"while all other package.json files in this PR use the caret constraint"^6.0.2". Using the caret allows automatic patch updates (e.g., 6.0.3, 6.0.4) which is beneficial for receiving bug fixes and security patches without manual intervention.Proposed fix for consistency
- "typescript": "6.0.2", + "typescript": "^6.0.2",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@examples/custom-cli/create-rwsdk/project/base/package.json.ejs` at line 39, Change the exact dependency version for "typescript" from "6.0.2" to a caret semver range (e.g., "^6.0.2") so it matches other package.json files and allows automatic compatible patch/minor updates; locate the "typescript" entry in the package.json template and update the version string accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@examples/custom-cli/create-qwik-app/project/base/package.json`:
- Line 35: The TypeScript dependency in
examples/custom-cli/create-qwik-app/project/base/package.json is pinned to an
exact version ("typescript": "6.0.2"); change it to a caret range ("^6.0.2") so
it matches other package.json files—locate the "typescript" entry in that
package.json and update the version string to include the caret.
In `@packages/create/package.json`:
- Line 50: The package.json bump to "typescript": "^6.0.2" requires updating
tsconfig.json to opt into or mitigate TS6 defaults: open tsconfig.json and
explicitly set compilerOptions.strict (true/false per project policy),
compilerOptions.types to include "node" (or an empty array if you need none),
compilerOptions.module and compilerOptions.target to your intended values (e.g.,
"commonjs"/"es2019"), and set compilerOptions.noUncheckedSideEffectImports to
false if you need previous behavior; if you want a temporary suppression, add
"ignoreDeprecations": "6.0" at the top-level of tsconfig.json. Ensure these keys
(strict, types, module, target, noUncheckedSideEffectImports,
ignoreDeprecations) are present and consistent with the repo's build/test setup
after upgrading the "typescript" entry in package.json.
---
Nitpick comments:
In `@examples/custom-cli/create-rwsdk/project/base/package.json.ejs`:
- Line 39: Change the exact dependency version for "typescript" from "6.0.2" to
a caret semver range (e.g., "^6.0.2") so it matches other package.json files and
allows automatic compatible patch/minor updates; locate the "typescript" entry
in the package.json template and update the version string accordingly.
🪄 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: 52405fbb-ef60-497e-84f0-e8ce487448cc
⛔ Files ignored due to path filters (3)
examples/react/ecommerce/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlexamples/react/resume/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlpnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (51)
cli-aliases/create-start-app/package.jsoncli-aliases/create-start-app/tsconfig.jsoncli-aliases/create-tanstack-app/package.jsoncli-aliases/create-tanstack-app/tsconfig.jsoncli-aliases/create-tanstack/package.jsoncli-aliases/create-tanstack/tsconfig.jsoncli-aliases/create-tsrouter-app/package.jsoncli-aliases/create-tsrouter-app/tsconfig.jsoncli-aliases/ts-create-start/package.jsoncli-aliases/ts-create-start/tsconfig.jsonexamples/custom-cli/create-qwik-app/package.jsonexamples/custom-cli/create-qwik-app/project/base/package.jsonexamples/custom-cli/create-qwik-app/project/packages.jsonexamples/custom-cli/create-qwik-app/tsconfig.jsonexamples/custom-cli/create-rwsdk/package.jsonexamples/custom-cli/create-rwsdk/project/base/package.json.ejsexamples/custom-cli/create-rwsdk/tsconfig.jsonexamples/custom-cli/customized-react/package.jsonexamples/custom-cli/customized-react/tsconfig.jsonexamples/react/blog/package.jsonexamples/react/blog/starter.jsonexamples/react/blog/template.jsonexamples/react/blog/tsconfig.jsonexamples/react/ecommerce/package.jsonexamples/react/ecommerce/starter.jsonexamples/react/ecommerce/template.jsonexamples/react/ecommerce/tsconfig.jsonexamples/react/resume/package.jsonexamples/react/resume/starter.jsonexamples/react/resume/template.jsonexamples/react/resume/tsconfig.jsonexamples/solid/blog/package.jsonexamples/solid/blog/starter.jsonexamples/solid/blog/template.jsonexamples/solid/blog/tsconfig.jsonpackage.jsonpackages/cli/package.jsonpackages/cli/tsconfig.jsonpackages/create/package.jsonpackages/create/src/custom-add-ons/add-on.tspackages/create/src/custom-add-ons/starter.tspackages/create/src/frameworks/react/project/base/package.jsonpackages/create/src/frameworks/react/project/base/tsconfig.json.ejspackages/create/src/frameworks/react/project/packages.jsonpackages/create/src/frameworks/solid/examples/tanchat/assets/ai-streaming-server/package.jsonpackages/create/src/frameworks/solid/project/base/package.jsonpackages/create/src/frameworks/solid/project/base/tsconfig.json.ejspackages/create/src/frameworks/solid/project/packages.jsonpackages/create/src/options.tspackages/create/src/registry.tspackages/create/tsconfig.json
💤 Files with no reviewable changes (6)
- examples/react/resume/tsconfig.json
- examples/solid/blog/tsconfig.json
- examples/react/ecommerce/tsconfig.json
- examples/react/blog/tsconfig.json
- packages/create/src/frameworks/solid/project/base/tsconfig.json.ejs
- packages/create/src/frameworks/react/project/base/tsconfig.json.ejs
| "eslint-plugin-qwik": "^1.13.0", | ||
| "prettier": "3.3.3", | ||
| "typescript": "5.4.5", | ||
| "typescript": "6.0.2", |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
What is the latest stable version of TypeScript 6.0.x and are there any known critical issues with TypeScript 6.0.2?
💡 Result:
The latest stable version of TypeScript in the 6.0.x series is 6.0.2, released on March 23, 2026. There are no known critical issues with 6.0.2; it is presented as the stable final release following beta (6.0.0) and RC (6.0.1). Some minor bugs have been reported post-release (e.g., type inference regression in #63309), but none are identified as critical, and the release notes emphasize stability as a bridge to 7.0.
Citations:
- 1: https://github.com/microsoft/TypeScript/releases/tag/v6.0.2
- 2: https://devblogs.microsoft.com/typescript/announcing-typescript-6-0/
- 3: https://www.npmjs.com/package/typescript
- 4: https://github.com/microsoft/typescript/releases
- 5: Regression in 6.0: type inferred from const with broader type is too narrow microsoft/TypeScript#63309
🏁 Script executed:
#!/bin/bash
# Search for all TypeScript version declarations in package.json files
rg --type json -n '"typescript":\s*"' -g 'package.json'Repository: TanStack/cli
Length of output: 1481
Update TypeScript version to use caret range for consistency.
examples/custom-cli/create-qwik-app/project/base/package.json specifies 6.0.2 (exact version), while all other package.json files in the PR use ^6.0.2 (caret range). Change to ^6.0.2 to align with the rest of the codebase.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@examples/custom-cli/create-qwik-app/project/base/package.json` at line 35,
The TypeScript dependency in
examples/custom-cli/create-qwik-app/project/base/package.json is pinned to an
exact version ("typescript": "6.0.2"); change it to a caret range ("^6.0.2") so
it matches other package.json files—locate the "typescript" entry in that
package.json and update the version string to include the caret.
There was a problem hiding this comment.
not deliberate - this previously specified an exact version, so i followed that pattern
There was a problem hiding this comment.
@camc314 That makes sense — the file had a pre-existing convention of pinning to an exact version (5.4.5), and you preserved that pattern. The inconsistency predates this PR, so it's reasonable to keep it as-is. No change needed.
🧠 Learnings used
Learnt from: CR
Repo: TanStack/cli PR: 0
File: examples/solid/blog/.cursorrules:0-0
Timestamp: 2026-03-31T02:17:45.537Z
Learning: Applies to examples/solid/blog/**/*.{ts,tsx} : Implement strict TypeScript checks
| "@vitest/coverage-v8": "3.1.1", | ||
| "eslint": "^9.20.0", | ||
| "typescript": "^5.6.3", | ||
| "typescript": "^6.0.2", |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
Is TypeScript 6.0.2 officially released and stable? What are the major breaking changes in TypeScript 6.0?
💡 Result:
Yes, TypeScript 6.0.2 is officially released and stable. It was released on March 23, 2026, as the stable version following beta (6.0.0) and RC (6.0.1), and is available on npm and GitHub releases. It is described as a stable release that teams can adopt today. TypeScript 6.0 is a transition release preparing for the Go-based TypeScript 7.0. Major breaking changes and deprecations (which will be hard removals in 7.0, but can be ignored in 6.0 with "ignoreDeprecations": "6.0") include: - Deprecated --target es5 (lowest now es2015) - Deprecated --outFile (migrate to bundlers) - Deprecated baseUrl (paths now relative to tsconfig) - Deprecated --moduleResolution node/node10 and classic (use bundler/nodenext/node16) - Deprecated module targets AMD/UMD/SystemJS - Deprecated import assertions (import ... assert {...}) - Deprecated /// and /// - strict now defaults to true - types defaults to [] (must explicitly set e.g. "types": ["node"]) - module defaults to esnext, target to es2025 - Assume "use strict" everywhere - rootDir defaults to config directory - --noUncheckedSideEffectImports enabled by default - Various behavioral changes like less context-sensitivity on this-less functions, stable type ordering flag for 7.0 prep, etc. New features include es2025 target/lib support, Temporal API types, subpath imports with #/, combining --moduleResolution bundler with --module commonjs, and more precise checking.
Citations:
- 1: https://github.com/microsoft/TypeScript/releases/tag/v6.0.2
- 2: https://devblogs.microsoft.com/typescript/announcing-typescript-6-0/
- 3: https://github.com/microsoft/typescript/releases
- 4: https://en.wikipedia.org/wiki/TypeScript
- 5: TypeScript 6.0 Iteration Plan microsoft/TypeScript#63085
- 6: http://www.typescriptlang.org/docs/handbook/release-notes/typescript-6-0.html
- 7: https://devblogs.microsoft.com/typescript/announcing-typescript-6-0
- 8: 6.0 Migration Guide microsoft/TypeScript#62508
🏁 Script executed:
#!/bin/bash
# Check the actual TypeScript version available on npm
npm view typescript versions --json | jq '.[-20:]'
npm view typescript@6.0.2 versionRepository: TanStack/cli
Length of output: 521
Verify TypeScript 6.0 config compatibility in tsconfig.json.
TypeScript 6.0.2 is officially released and stable (March 23, 2026), but it introduces significant breaking changes beyond module resolution updates. Key changes include:
strictnow defaults totrue(hardened type checking)typesdefaults to[](explicit"types": ["node"]required for type definitions)moduledefaults toesnextandtargettoes2025--noUncheckedSideEffectImportsenabled by default- Deprecated compiler options and directives
These can be suppressed with "ignoreDeprecations": "6.0" in tsconfig.json, but explicit config updates are recommended. Confirm that tsconfig.json is updated to handle these defaults or that ignoreDeprecations is intentionally set.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/create/package.json` at line 50, The package.json bump to
"typescript": "^6.0.2" requires updating tsconfig.json to opt into or mitigate
TS6 defaults: open tsconfig.json and explicitly set compilerOptions.strict
(true/false per project policy), compilerOptions.types to include "node" (or an
empty array if you need none), compilerOptions.module and compilerOptions.target
to your intended values (e.g., "commonjs"/"es2019"), and set
compilerOptions.noUncheckedSideEffectImports to false if you need previous
behavior; if you want a temporary suppression, add "ignoreDeprecations": "6.0"
at the top-level of tsconfig.json. Ensure these keys (strict, types, module,
target, noUncheckedSideEffectImports, ignoreDeprecations) are present and
consistent with the repo's build/test setup after upgrading the "typescript"
entry in package.json.
There was a problem hiding this comment.
Pull request overview
This PR updates the monorepo and generated templates to TypeScript 6.0.x and adjusts project configuration/imports to align with TS6 ESM/module-resolution expectations and tsconfig deprecations.
Changes:
- Bump TypeScript to
^6.0.2across the workspace, examples, and template package manifests (and update lockfiles accordingly). - Update internal package tsconfigs to
module: NodeNext+moduleResolution: NodeNextand migrate type imports to explicit.jsspecifiers. - Remove
baseUrlfrom multiple template/example tsconfigs and refresh lockfiles that were regenerated under the new toolchain.
Reviewed changes
Copilot reviewed 43 out of 54 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Updates root lockfile to TypeScript 6.0.2 and associated peer snapshots. |
| packages/create/tsconfig.json | Switches build output settings to NodeNext module + resolution. |
| packages/create/src/registry.ts | Updates type-only import to include .js extension. |
| packages/create/src/options.ts | Updates type-only import to include .js extension. |
| packages/create/src/frameworks/solid/project/packages.json | Updates generated Solid template TypeScript version. |
| packages/create/src/frameworks/solid/project/base/tsconfig.json.ejs | Removes baseUrl from Solid template tsconfig. |
| packages/create/src/frameworks/solid/project/base/package.json | Updates Solid template devDependency TypeScript version. |
| packages/create/src/frameworks/solid/examples/tanchat/assets/ai-streaming-server/package.json | Updates example server TypeScript version. |
| packages/create/src/frameworks/react/project/packages.json | Updates generated React template TypeScript version. |
| packages/create/src/frameworks/react/project/base/tsconfig.json.ejs | Removes baseUrl from React template tsconfig. |
| packages/create/src/frameworks/react/project/base/package.json | Updates React template devDependency TypeScript version. |
| packages/create/src/custom-add-ons/starter.ts | Updates type-only imports to include .js extensions. |
| packages/create/src/custom-add-ons/add-on.ts | Updates type-only imports to include .js extensions. |
| packages/create/package.json | Bumps package devDependency TypeScript version to TS6. |
| packages/cli/tsconfig.json | Switches build output settings to NodeNext module + resolution. |
| packages/cli/package.json | Bumps package devDependency TypeScript version to TS6. |
| package.json | Bumps workspace TypeScript devDependency version to TS6. |
| examples/solid/blog/tsconfig.json | Removes baseUrl from example tsconfig. |
| examples/solid/blog/package.json | Updates example TypeScript version. |
| examples/react/resume/tsconfig.json | Removes baseUrl from example tsconfig. |
| examples/react/resume/pnpm-lock.yaml | Regenerates example lockfile under TS6 (and updates some deps). |
| examples/react/resume/package.json | Updates example TypeScript version. |
| examples/react/ecommerce/tsconfig.json | Removes baseUrl from example tsconfig. |
| examples/react/ecommerce/pnpm-lock.yaml | Regenerates example lockfile under TS6 (and updates some deps). |
| examples/react/ecommerce/package.json | Updates example TypeScript version. |
| examples/react/blog/tsconfig.json | Removes baseUrl from example tsconfig. |
| examples/react/blog/package.json | Updates example TypeScript version. |
| examples/custom-cli/customized-react/tsconfig.json | Switches example CLI tsconfig to NodeNext settings and adds Node types. |
| examples/custom-cli/customized-react/package.json | Updates example TypeScript version. |
| examples/custom-cli/create-rwsdk/tsconfig.json | Switches example CLI tsconfig to NodeNext settings and adds Node types. |
| examples/custom-cli/create-rwsdk/project/base/package.json.ejs | Updates generated project template TypeScript version. |
| examples/custom-cli/create-rwsdk/package.json | Updates example TypeScript version. |
| examples/custom-cli/create-qwik-app/tsconfig.json | Switches example CLI tsconfig to NodeNext settings and adds Node types. |
| examples/custom-cli/create-qwik-app/project/packages.json | Updates generated project template TypeScript version. |
| examples/custom-cli/create-qwik-app/project/base/package.json | Updates generated project template TypeScript version. |
| examples/custom-cli/create-qwik-app/package.json | Updates example TypeScript version. |
| cli-aliases/ts-create-start/tsconfig.json | Switches alias CLI tsconfig to NodeNext settings. |
| cli-aliases/ts-create-start/package.json | Updates alias CLI TypeScript version. |
| cli-aliases/create-tsrouter-app/tsconfig.json | Switches alias CLI tsconfig to NodeNext settings. |
| cli-aliases/create-tsrouter-app/package.json | Updates alias CLI TypeScript version. |
| cli-aliases/create-tanstack/tsconfig.json | Switches alias CLI tsconfig to NodeNext settings. |
| cli-aliases/create-tanstack/package.json | Updates alias CLI TypeScript version. |
| cli-aliases/create-tanstack-app/tsconfig.json | Switches alias CLI tsconfig to NodeNext settings. |
| cli-aliases/create-tanstack-app/package.json | Updates alias CLI TypeScript version. |
| cli-aliases/create-start-app/tsconfig.json | Switches alias CLI tsconfig to NodeNext settings. |
| cli-aliases/create-start-app/package.json | Updates alias CLI TypeScript version. |
Files not reviewed (3)
- examples/react/ecommerce/pnpm-lock.yaml: Language not supported
- examples/react/resume/pnpm-lock.yaml: Language not supported
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| '@tanstack/ai': | ||
| specifier: latest | ||
| version: 0.2.1 | ||
| version: 0.9.2 | ||
| '@tanstack/ai-anthropic': | ||
| specifier: latest |
There was a problem hiding this comment.
This lockfile update pulls in major/minor bumps for several TanStack AI-related packages (e.g. @tanstack/ai, @tanstack/ai-react, devtools). Since the PR description is focused on upgrading TypeScript/tsconfig deprecations, please confirm these dependency upgrades are intentional; otherwise consider reverting this lockfile churn or splitting it into a separate PR to keep the TypeScript upgrade reviewable.
There was a problem hiding this comment.
these weren't deliberate - i can revert if a maintainer feels this is necessary.
| '@tanstack/react-router': | ||
| specifier: ^1.132.0 | ||
| version: 1.145.11(react-dom@19.2.3(react@19.2.3))(react@19.2.3) | ||
| version: 1.161.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3) | ||
| '@tanstack/react-start': | ||
| specifier: ^1.132.0 | ||
| version: 1.161.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(vite@7.3.1(@types/node@22.14.1)(jiti@2.6.1)(lightningcss@1.31.1)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1)) |
There was a problem hiding this comment.
This lockfile change upgrades @tanstack/react-router from 1.145.x to 1.161.x, which is outside the stated scope of a TypeScript/tsconfig deprecation update. Please confirm this is intentional (e.g. required for TS 6 / updated resolution) or split it into a separate dependency bump PR to reduce the risk and review surface.
There was a problem hiding this comment.
these weren't deliberate - i can revert if a maintainer feels this is necessary.
Hi, maintainer of oxlint/oxlint-tsgolint here.
While debugging an issue, I needed to make a minimal repro based on tanstack router.
I used the CLI to create the tanstack app, however this uses TS5.X which is an outdated version of TS.
This PR updates to TS6.0, and fixes the deprecations in this version. For example:
baseUrlhas been removed from tsconfigsThanks
Refs: microsoft/TypeScript#62207, oxc-project/tsgolint#864
Summary by CodeRabbit