Skip to content

feat(deps): update typescript to v6 and peer ranges#1553

Merged
Timeless0911 merged 4 commits intomainfrom
david/typescript-v6
Mar 24, 2026
Merged

feat(deps): update typescript to v6 and peer ranges#1553
Timeless0911 merged 4 commits intomainfrom
david/typescript-v6

Conversation

@Timeless0911
Copy link
Copy Markdown
Contributor

@Timeless0911 Timeless0911 commented Mar 24, 2026

Summary

Upgrade the workspace TypeScript version to v6 and align the repo with TypeScript 6 behavior across packages, templates, examples, and integration fixtures.

This removes redundant tsconfig entries where TS 6 now provides the intended default, keeps explicit settings where a floating default would make output less stable, and updates declaration fixtures to match TS 6 ESM output.

TypeScript 6 Default Changes

Change TypeScript 6 default Repo handling
types [] Added explicit "types": ["node"] in Node-side tsconfig files so built-in modules like node:fs continue to resolve during type-checking.
strict true Removed redundant "strict": true from templates/examples that already expect strict mode, and kept "strictNullChecks": true explicit in the shared internal base tsconfig so the current rslint typed rules can resolve the setting reliably.
module esnext Removed redundant "module": "ESNext" where ESM was already the intended behavior.
target current-year ES target (es2025 at the time of TS 6.0) Kept explicit targets where output/runtime stability matters, instead of relying on a floating default.
noUncheckedSideEffectImports true No repo-wide override was added; current configs and fixtures are compatible with the stricter default.
libReplacement false No repo-wide override was added; the repo does not rely on the previous default behavior.

Peer Changes

  • Widen the TypeScript peer range in @rslib/core and rsbuild-plugin-dts from ^5 to ^5 || ^6 so package consumers can adopt TS 6 without a peer warning from Rslib itself.

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings March 24, 2026 12:02
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 24, 2026

Deploying rslib with  Cloudflare Pages  Cloudflare Pages

Latest commit: e2c4676
Status: ✅  Deploy successful!
Preview URL: https://2d5bf9fa.rslib.pages.dev
Branch Preview URL: https://david-typescript-v6.rslib.pages.dev

View logs

Copy link
Copy Markdown
Contributor

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

Upgrades the workspace to TypeScript 6 and adjusts tsconfig/templates/tests/fixtures to match TS 6 defaults and declaration output behavior across the monorepo.

Changes:

  • Bump TypeScript to ^6.0.2 across root, packages, templates, examples, docs, and integration fixtures.
  • Update many tsconfig.json files to reflect TS 6 defaults (notably adding types: ["node"] where needed and removing redundant options).
  • Refresh redirect/dts integration fixtures and snapshots to match TS 6 declaration emission.

Reviewed changes

Copilot reviewed 103 out of 104 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
website/tsconfig.json Adds explicit Node types for website TS config.
website/docs/zh/guide/migration/modernjs-module.mdx Updates TS version in docs snippet.
website/docs/en/guide/migration/modernjs-module.mdx Updates TS version in docs snippet.
tests/tsconfig.json Adds explicit Node types for tests.
tests/scripts/tsconfig.json Adds explicit Node types for test scripts.
tests/integration/tsconfig/tsconfig.custom.json Adjusts path mapping for TS 6 behavior.
tests/integration/transform-import/lodash/tsconfig.json Removes redundant baseUrl config.
tests/integration/transform-import/arco-design/tsconfig.json Removes redundant baseUrl config.
tests/integration/syntax/fixtures/tsconfig.json Removes redundant baseUrl config.
tests/integration/style/style-inject/fixtures/basic/tsconfig.json Removes redundant baseUrl config.
tests/integration/style/css/fixtures/basic/tsconfig.json Removes redundant baseUrl config.
tests/integration/style/css-modules/fixtures/basic/tsconfig.json Removes redundant baseUrl config.
tests/integration/style/css-modules-named/fixtures/basic/tsconfig.json Removes redundant baseUrl config.
tests/integration/sourcemap/fixtures/tsconfig.json Removes redundant baseUrl config.
tests/integration/redirect/style/tsconfig.json Removes redundant baseUrl config.
tests/integration/redirect/js/tsconfig.json Removes redundant baseUrl config.
tests/integration/redirect/dts/tsconfig.json Updates dts fixture compiler options/paths.
tests/integration/redirect/dts/src/index.ts Updates fixture import/export typing pattern.
tests/integration/redirect/dts/package.json Bumps TS in fixture deps.
tests/integration/redirect/dts.test.ts Updates snapshots for TS 6 output.
tests/integration/redirect/dts-tsgo/tsconfig.json Aligns tsgo dts fixture config with TS 6.
tests/integration/redirect/dts-tsgo/package.json Bumps TS in fixture deps.
tests/integration/preserve-jsx/preserve-jsx-with-environment/tsconfig.json Updates moduleResolution and removes redundant opts.
tests/integration/preserve-jsx/forbid-bundle/tsconfig.json Updates moduleResolution and removes redundant opts.
tests/integration/preserve-jsx/default/tsconfig.json Updates moduleResolution and removes redundant opts.
tests/integration/node-polyfill/bundle/tsconfig.json Removes redundant baseUrl config.
tests/integration/node-polyfill/bundle-false/tsconfig.json Removes redundant baseUrl config.
tests/integration/json/tsconfig.json Removes redundant baseUrl config.
tests/integration/external-helpers/fixtures/tsconfig.json Removes redundant baseUrl config.
tests/integration/dts/other-features/copy/tsconfig.json Removes redundant baseUrl config.
tests/integration/dts/composite/process-files/tsconfig.json Removes redundant baseUrl config.
tests/integration/dts/composite/dist-path/tsconfig.json Removes redundant baseUrl config.
tests/integration/dts/composite/declaration-map/tsconfig.json Removes redundant baseUrl config.
tests/integration/dts/composite/clean/tsconfig.json Removes redundant baseUrl config.
tests/integration/dts/composite/basic/tsconfig.json Removes redundant baseUrl config.
tests/integration/dts/composite/auto-extension/tsconfig.json Removes redundant baseUrl config.
tests/integration/dts/composite/abort-on-error/tsconfig.json Removes redundant baseUrl config.
tests/integration/dts/check/outside-root/tsconfig.json Removes redundant baseUrl config.
tests/integration/dts/bundle/rootdir/tsconfig.json Sets rootDir explicitly for TS 6.
tests/integration/dts/bundle/bundled-packages/tsconfig.json Sets rootDir explicitly for TS 6.
tests/integration/dts/bundle/abort-on-error/tsconfig.json Sets rootDir explicitly for TS 6.
tests/integration/dts/bundle/fixtures/tsconfig.json Sets rootDir explicitly for TS 6.
tests/integration/dts/bundle-false/declaration-map/tsconfig.json Sets rootDir explicitly for TS 6.
tests/integration/dts/bundle-false/declaration-dir/tsconfig.json Sets rootDir explicitly for TS 6.
tests/integration/dts/bundle-false/alias/tsconfig.json Updates rootDir/strict options for TS 6.
tests/integration/dts/bundle-false/abort-on-error/tsconfig.json Sets rootDir explicitly for TS 6.
tests/integration/dts/bundle-false/fixtures/tsconfig.json Sets rootDir explicitly for TS 6.
tests/integration/dts/build/tsconfig/tsconfig.json Removes redundant baseUrl config.
tests/integration/dts/build/process-files/tsconfig.json Removes redundant baseUrl config.
tests/integration/dts/build/dist-path/tsconfig.json Removes redundant baseUrl config.
tests/integration/dts/build/declaration-map/tsconfig.esm.json Removes redundant baseUrl config.
tests/integration/dts/build/declaration-map/tsconfig.cjs.json Removes redundant baseUrl config.
tests/integration/dts/build/clean/tsconfig.esm.json Removes redundant baseUrl config.
tests/integration/dts/build/clean/tsconfig.cjs.json Removes redundant baseUrl config.
tests/integration/dts/build/basic/tsconfig.json Removes redundant baseUrl config.
tests/integration/dts/build/auto-extension/tsconfig.json Removes redundant baseUrl config.
tests/integration/dts/build/abort-on-error/tsconfig.json Removes redundant baseUrl config.
tests/integration/dts/build/references/tsconfig.json Removes redundant baseUrl config.
tests/integration/dts-tsgo/bundle-false/alias/tsconfig.json Removes redundant strict config.
tests/integration/decorators/fixtures/tsconfig.json Removes redundant baseUrl config.
tests/integration/decorators/fixtures/tsconfig.decorators.json Removes redundant baseUrl config.
tests/integration/cli/build/options/tsconfig.json Sets rootDir explicitly for TS 6.
tests/integration/cli/build-watch/tsconfig.json Removes redundant baseUrl config.
tests/integration/bundle-false/single-file/tsconfig.json Removes redundant baseUrl config.
tests/integration/bundle-false/js-extension/tsconfig.json Removes redundant baseUrl config.
tests/integration/bundle-false/basic/tsconfig.json Removes redundant baseUrl config.
tests/integration/auto-external/false/tsconfig.json Sets rootDir explicitly for TS 6.
tests/integration/auto-external/default/tsconfig.json Sets rootDir explicitly for TS 6.
tests/integration/auto-external/bundle-false/tsconfig.json Removes redundant baseUrl config.
tests/integration/alias/tsconfig.json Removes redundant baseUrl config.
tests/e2e/react-component/tsconfig.json Removes redundant module/strict config.
scripts/tsconfig/base.json Updates base TS config options for TS 6.
pnpm-lock.yaml Locks updated dependency graph with TS 6.
packages/plugin-dts/tsconfig.json Adds Node types; aligns module settings.
packages/plugin-dts/package.json Bumps TS; broadens TS peer range.
packages/create-rslib/tsconfig.json Adds Node types; aligns module settings.
packages/create-rslib/template-vue-ts/tsconfig.json Removes redundant module/strict in template.
packages/create-rslib/template-vue-ts/package.json Bumps TS in template deps.
packages/create-rslib/template-rspress/react-ts/tsconfig.json Removes redundant module/strict in template.
packages/create-rslib/template-react-ts/tsconfig.json Removes redundant module/strict in template.
packages/create-rslib/template-react-ts/package.json Bumps TS in template deps.
packages/create-rslib/template-node-esm-ts/tsconfig.json Removes redundant module/strict in template.
packages/create-rslib/template-node-esm-ts/package.json Bumps TS in template deps.
packages/create-rslib/template-node-dual-ts/tsconfig.json Removes redundant module/strict in template.
packages/create-rslib/template-node-dual-ts/package.json Bumps TS in template deps.
packages/create-rslib/package.json Bumps TS in package deps.
packages/core/tsconfig.json Adds Node types; aligns module settings.
packages/core/tests/tsconfig.json Adds explicit Node types for core tests.
packages/core/package.json Bumps TS; broadens TS peer range.
package.json Bumps workspace TypeScript to v6.
examples/vue-component-bundleless/tsconfig.json Aligns config (rootDir, module/strict) for TS 6.
examples/vue-component-bundleless/package.json Bumps TS in example deps.
examples/vue-component-bundle/tsconfig.json Aligns config (rootDir, module/strict) for TS 6.
examples/vue-component-bundle/package.json Bumps TS in example deps.
examples/solid-component-bundle/tsconfig.json Aligns config (rootDir, resolution, paths) for TS 6.
examples/solid-component-bundle/package.json Bumps TS in example deps.
examples/react-component-umd/tsconfig.json Aligns moduleResolution and removes redundant opts.
examples/react-component-bundle/tsconfig.json Aligns moduleResolution and removes redundant opts.
examples/react-component-bundle-false/tsconfig.json Aligns moduleResolution and removes redundant opts.
examples/preact-component-bundle-false/tsconfig.json Aligns moduleResolution and removes redundant opts.
examples/module-federation/mf-remote/tsconfig.json Aligns config (rootDir, module/strict) for TS 6.
examples/module-federation/mf-remote/package.json Bumps TS in example deps.
examples/module-federation/mf-react-component/tsconfig.json Aligns config (rootDir/strict) for TS 6.
examples/module-federation/mf-host/tsconfig.json Aligns config (rootDir, module/strict) for TS 6.
examples/module-federation/mf-host/package.json Bumps TS in example deps.
examples/express-plugin/tsconfig.json Aligns config (rootDir/strict) for TS 6.
examples/express-plugin/package.json Bumps TS in example deps.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)

scripts/tsconfig/base.json:12

  • Re-adding/removing strict here changes the default type-checking mode for every project extending @rslib/tsconfig/base. In the current base config there’s no other option enabling strict mode, so dropping strict: true disables noImplicitAny, strictNullChecks, etc. If the repo still expects strict type-checking, put strict: true back in the base config (or explicitly enable the specific strict flags you want) so templates/examples don’t silently lose checks.

@Timeless0911 Timeless0911 changed the title feat(deps): update typescript to v6 feat(deps): update typescript to v6 and peer ranges Mar 24, 2026
@Timeless0911 Timeless0911 enabled auto-merge (squash) March 24, 2026 12:33
@Timeless0911 Timeless0911 merged commit 502f799 into main Mar 24, 2026
7 checks passed
@Timeless0911 Timeless0911 deleted the david/typescript-v6 branch March 24, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants