Skip to content

chore: update to TS6.0, fix deprecated tsconfig options#421

Open
camc314 wants to merge 2 commits intoTanStack:mainfrom
camc314:c/update-ts-fix-deprecated-base-url
Open

chore: update to TS6.0, fix deprecated tsconfig options#421
camc314 wants to merge 2 commits intoTanStack:mainfrom
camc314:c/update-ts-fix-deprecated-base-url

Conversation

@camc314
Copy link
Copy Markdown

@camc314 camc314 commented Apr 3, 2026

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:

  • baseUrl has been removed from tsconfigs
  • deprecated module resolution settings have been updated
  • missing file extension imports have been updated.

Thanks

Refs: microsoft/TypeScript#62207, oxc-project/tsgolint#864

Summary by CodeRabbit

  • Chores
    • Upgraded TypeScript to 6.0.2 across the project
    • Updated module system configuration to support modern Node.js ECMAScript module semantics

Copilot AI review requested due to automatic review settings April 3, 2026 11:59
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 3, 2026

📝 Walkthrough

Walkthrough

This pull request upgrades TypeScript from version 5.x to 6.0.2 across the entire monorepo and updates TypeScript compiler options to use NodeNext module system. Additionally, some baseUrl configuration settings are removed from select tsconfig files, and type import paths are updated with explicit .js extensions.

Changes

Cohort / File(s) Summary
TypeScript version upgrades
package.json, cli-aliases/*/package.json, packages/cli/package.json, packages/create/package.json, examples/custom-cli/*/package.json, examples/custom-cli/*/project/*/package.json, examples/react/*/package.json, examples/solid/*/package.json
Updated development dependency typescript from various 5.x versions to ^6.0.2 (or fixed 6.0.2).
tsconfig.json module configuration
cli-aliases/*/tsconfig.json, packages/cli/tsconfig.json, packages/create/tsconfig.json, examples/custom-cli/*/tsconfig.json
Updated compilerOptions.module from ES2020 to NodeNext and compilerOptions.moduleResolution from node to NodeNext.
tsconfig.json baseUrl removal
examples/react/blog/tsconfig.json, examples/react/ecommerce/tsconfig.json, examples/react/resume/tsconfig.json, examples/solid/blog/tsconfig.json, packages/create/src/frameworks/react/project/base/tsconfig.json.ejs, packages/create/src/frameworks/solid/project/base/tsconfig.json.ejs
Removed compilerOptions.baseUrl setting from tsconfig configurations.
tsconfig.json bundler to NodeNext
examples/custom-cli/create-qwik-app/tsconfig.json, examples/custom-cli/create-rwsdk/tsconfig.json, examples/custom-cli/customized-react/tsconfig.json
Updated compilerOptions.moduleResolution from bundler to NodeNext and added compilerOptions.types: ["node"] to include Node.js type definitions.
Type import path updates
packages/create/src/custom-add-ons/add-on.ts, packages/create/src/custom-add-ons/starter.ts, packages/create/src/options.ts, packages/create/src/registry.ts
Updated type-only import specifiers to include explicit .js file extensions (e.g., ./types./types.js).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Poem

🐰 TypeScript six hops into view,
Module systems bundled anew,
.js imports clear and bright,
NodeNext paths set just right,
Our code compiles strong and true!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: upgrading TypeScript to version 6.0 and addressing deprecated tsconfig options.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 4cd8184 and 2665f58.

⛔ Files ignored due to path filters (3)
  • examples/react/ecommerce/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • examples/react/resume/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (51)
  • cli-aliases/create-start-app/package.json
  • cli-aliases/create-start-app/tsconfig.json
  • cli-aliases/create-tanstack-app/package.json
  • cli-aliases/create-tanstack-app/tsconfig.json
  • cli-aliases/create-tanstack/package.json
  • cli-aliases/create-tanstack/tsconfig.json
  • cli-aliases/create-tsrouter-app/package.json
  • cli-aliases/create-tsrouter-app/tsconfig.json
  • cli-aliases/ts-create-start/package.json
  • cli-aliases/ts-create-start/tsconfig.json
  • examples/custom-cli/create-qwik-app/package.json
  • examples/custom-cli/create-qwik-app/project/base/package.json
  • examples/custom-cli/create-qwik-app/project/packages.json
  • examples/custom-cli/create-qwik-app/tsconfig.json
  • examples/custom-cli/create-rwsdk/package.json
  • examples/custom-cli/create-rwsdk/project/base/package.json.ejs
  • examples/custom-cli/create-rwsdk/tsconfig.json
  • examples/custom-cli/customized-react/package.json
  • examples/custom-cli/customized-react/tsconfig.json
  • examples/react/blog/package.json
  • examples/react/blog/starter.json
  • examples/react/blog/template.json
  • examples/react/blog/tsconfig.json
  • examples/react/ecommerce/package.json
  • examples/react/ecommerce/starter.json
  • examples/react/ecommerce/template.json
  • examples/react/ecommerce/tsconfig.json
  • examples/react/resume/package.json
  • examples/react/resume/starter.json
  • examples/react/resume/template.json
  • examples/react/resume/tsconfig.json
  • examples/solid/blog/package.json
  • examples/solid/blog/starter.json
  • examples/solid/blog/template.json
  • examples/solid/blog/tsconfig.json
  • package.json
  • packages/cli/package.json
  • packages/cli/tsconfig.json
  • packages/create/package.json
  • packages/create/src/custom-add-ons/add-on.ts
  • packages/create/src/custom-add-ons/starter.ts
  • packages/create/src/frameworks/react/project/base/package.json
  • packages/create/src/frameworks/react/project/base/tsconfig.json.ejs
  • packages/create/src/frameworks/react/project/packages.json
  • packages/create/src/frameworks/solid/examples/tanchat/assets/ai-streaming-server/package.json
  • packages/create/src/frameworks/solid/project/base/package.json
  • packages/create/src/frameworks/solid/project/base/tsconfig.json.ejs
  • packages/create/src/frameworks/solid/project/packages.json
  • packages/create/src/options.ts
  • packages/create/src/registry.ts
  • packages/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",
Copy link
Copy Markdown

@coderabbitai coderabbitai bot Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 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:


🏁 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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not deliberate - this previously specified an exact version, so i followed that pattern

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 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:


🏁 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 version

Repository: 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:

  • strict now defaults to true (hardened type checking)
  • types defaults to [] (explicit "types": ["node"] required for type definitions)
  • module defaults to esnext and target to es2025
  • --noUncheckedSideEffectImports enabled 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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.2 across the workspace, examples, and template package manifests (and update lockfiles accordingly).
  • Update internal package tsconfigs to module: NodeNext + moduleResolution: NodeNext and migrate type imports to explicit .js specifiers.
  • Remove baseUrl from 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.

Comment on lines 14 to 18
'@tanstack/ai':
specifier: latest
version: 0.2.1
version: 0.9.2
'@tanstack/ai-anthropic':
specifier: latest
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these weren't deliberate - i can revert if a maintainer feels this is necessary.

Comment on lines 26 to 31
'@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))
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these weren't deliberate - i can revert if a maintainer feels this is necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants