feat(deps): update typescript to v6 and peer ranges#1553
Merged
Timeless0911 merged 4 commits intomainfrom Mar 24, 2026
Merged
Conversation
Deploying rslib with
|
| Latest commit: |
e2c4676
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2d5bf9fa.rslib.pages.dev |
| Branch Preview URL: | https://david-typescript-v6.rslib.pages.dev |
Contributor
There was a problem hiding this comment.
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.2across root, packages, templates, examples, docs, and integration fixtures. - Update many
tsconfig.jsonfiles to reflect TS 6 defaults (notably addingtypes: ["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
stricthere 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 droppingstrict: truedisablesnoImplicitAny,strictNullChecks, etc. If the repo still expects strict type-checking, putstrict: trueback in the base config (or explicitly enable the specific strict flags you want) so templates/examples don’t silently lose checks.
fi3ework
reviewed
Mar 24, 2026
fi3ework
approved these changes
Mar 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
types[]"types": ["node"]in Node-side tsconfig files so built-in modules likenode:fscontinue to resolve during type-checking.stricttrue"strict": truefrom templates/examples that already expect strict mode, and kept"strictNullChecks": trueexplicit in the shared internal base tsconfig so the currentrslinttyped rules can resolve the setting reliably.moduleesnext"module": "ESNext"where ESM was already the intended behavior.targetes2025at the time of TS 6.0)noUncheckedSideEffectImportstruelibReplacementfalsePeer Changes
@rslib/coreandrsbuild-plugin-dtsfrom^5to^5 || ^6so package consumers can adopt TS 6 without a peer warning from Rslib itself.Related Links
Checklist