Skip to content

Update to Typescript 6 / Jest 29 - #202

Merged
alexdunae merged 17 commits into
mainfrom
alex/typescript6
May 29, 2026
Merged

Update to Typescript 6 / Jest 29#202
alexdunae merged 17 commits into
mainfrom
alex/typescript6

Conversation

@alexdunae

@alexdunae alexdunae commented May 13, 2026

Copy link
Copy Markdown
Contributor

Prep for adding Stratakit components and general modernization.

Stratakit's optional render prop was being seen as required in TS 4, which is what prompted me to start this update.

  • Update to Typescript 6 / Jest 29
  • extracted a tsconfig.base.json to simplify config
  • moved Jest TS config into jest.config.js - this lets us remove types: [node, jest] from the browser-targeting tsconfig files
  • switched to moduleResolution: "bundler" since the previous node option is deprecated
  • updated a few SVG imports to handle moduleResolution: "bundler"
  • disabled Storybook's reactDogen for now (this shows TS types on Storybook) - it is not compatible with TS 6 but can be re-enabled when we update Storybook in Upgrade to Storybook 7 #108 - Storybook still shows props, just not with the full TS typings

This PR is based on #203 so CI isn't running automatically. Here are the manual runs... https://github.com/iTwin/admin-components-react/actions?query=branch%3Aalex%2Ftypescript6

alexdunae added 2 commits May 15, 2026 09:22
It is pinned to @typescript-eslint/parser 5.x and blocks us from upgrading Typescript.

The whole CRA project is deprecated anyways

https://github.com/react/create-react-app/blob/main/packages/eslint-config-react-app/package.json

We also remove eslint-plugin-flowtype since we don't use Flow at all
@alexdunae
alexdunae changed the base branch from main to alex/eslint-cra May 15, 2026 16:38
@alexdunae
alexdunae marked this pull request as ready for review May 15, 2026 20:27
@veekeys

veekeys commented May 18, 2026

Copy link
Copy Markdown
Member

What do you mean by "adding stratakit components"?
If you plan to replace whole iTwinUI with StrataKit, that cannot be done as these components are used in BIC.

Comment thread packages/modules/create-imodel/package.json Outdated
Comment thread common/changes/@itwin/create-imodel-react/alex-typescript6_2026-05-13-20-55.json Outdated
@alexdunae

Copy link
Copy Markdown
Contributor Author

What do you mean by "adding stratakit components"? If you plan to replace whole iTwinUI with StrataKit, that cannot be done as these components are used in BIC.

The plan is to add MUI components in parallel to existing iTwinUI components. So consumers will be able to import something like @itwin/admin-components-react/mui/iTwinGrid

@alexdunae alexdunae mentioned this pull request May 20, 2026
2 tasks
Base automatically changed from alex/eslint-cra to main May 27, 2026 07:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Modernizes the repo tooling to unblock Stratakit integration by upgrading the TypeScript/Jest toolchain and aligning tsconfig/module resolution with TypeScript 6.

Changes:

  • Upgraded to TypeScript 6.x, Jest 29.x, and ts-jest 29 across packages (plus related eslint/types updates).
  • Extracted shared compiler settings into a new tsconfig.base.json and updated package-level tsconfigs to extend it (using moduleResolution: "bundler").
  • Updated Jest configs to inline TS settings for tests and adjusted a few imports/settings for compatibility (e.g., icon imports; Storybook docgen disabled for TS6).

Reviewed changes

Copilot reviewed 29 out of 31 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tsconfig.json Switches to extending the new shared base config; keeps outDir override.
tsconfig.base.json New shared TS6 compiler configuration (target/lib/module/moduleResolution/etc.).
packages/modules/storybook-auth-addon/tsconfig.eslint.json Adjusts eslint TS config to allow JS parsing.
packages/modules/storybook-auth-addon/package.json Upgrades TypeScript + @typescript-eslint/* versions (but eslint range needs alignment).
packages/modules/manage-versions/tsconfig.json Extends base config; sets rootDir/outDir and expands excludes.
packages/modules/manage-versions/package.json Upgrades Jest/ts-jest/TypeScript/eslint toolchain deps.
packages/modules/manage-versions/jest.config.js Moves ts-jest config inline (CommonJS + Node10 resolution + explicit types).
packages/modules/imodel-browser/tsconfig.json Extends base config; sets rootDir/outDir and excludes tests/output dirs.
packages/modules/imodel-browser/package.json Upgrades Jest/ts-jest/TypeScript/eslint toolchain deps.
packages/modules/imodel-browser/jest.config.js Moves ts-jest config inline (CommonJS + Node10 resolution + explicit types).
packages/modules/delete-itwin/tsconfig.json Extends base config; sets rootDir/outDir and excludes tests/output dirs.
packages/modules/delete-itwin/src/components/DeleteITwin.tsx Updates icon import path for bundler-style resolution compatibility.
packages/modules/delete-itwin/package.json Upgrades Jest/ts-jest/TypeScript/eslint toolchain deps.
packages/modules/delete-itwin/jest.config.js Moves ts-jest config inline (CommonJS + Node10 resolution + explicit types).
packages/modules/delete-imodel/tsconfig.json Extends base config; sets rootDir/outDir and excludes tests/output dirs.
packages/modules/delete-imodel/src/components/DeleteIModel.tsx Updates icon import path for bundler-style resolution compatibility.
packages/modules/delete-imodel/package.json Upgrades Jest/ts-jest/TypeScript/eslint toolchain deps.
packages/modules/delete-imodel/jest.config.js Moves ts-jest config inline (CommonJS + Node10 resolution + explicit types).
packages/modules/create-imodel/tsconfig.json Extends base config; sets rootDir/outDir and excludes tests/output dirs.
packages/modules/create-imodel/src/components/base-imodel/BaseIModel.tsx Removes invalid nullish-coalescing pattern flagged by newer TS (keeps same runtime result).
packages/modules/create-imodel/package.json Upgrades Jest/ts-jest/TypeScript/eslint toolchain deps.
packages/modules/create-imodel/jest.config.js Moves ts-jest config inline (CommonJS + Node10 resolution + explicit types).
packages/apps/storybook/package.json Adds TypeScript 6 and upgrades @typescript-eslint/* versions (but eslint range needs alignment).
packages/apps/storybook/.storybook/main.js Disables reactDocgen due to Storybook 6 + TS6 incompatibility.
common/scripts/package.json Upgrades TypeScript + @typescript-eslint/* versions (but eslint range needs alignment).
common/config/rush/pnpm-lock.yaml Lockfile updates reflecting TypeScript/Jest/eslint ecosystem upgrades.
common/changes/@itwin/manage-versions-react/alex-typescript6_2026-05-13-20-55.json Records a “none” change entry for the package upgrade work.
common/changes/@itwin/imodel-browser-react/alex-typescript6_2026-05-13-20-55.json Records a “none” change entry for the package upgrade work.
common/changes/@itwin/delete-itwin-react/alex-typescript6_2026-05-13-20-55.json Records a “none” change entry for the package upgrade work.
common/changes/@itwin/delete-imodel-react/alex-typescript6_2026-05-13-20-55.json Records a “none” change entry for the package upgrade work.
common/changes/@itwin/create-imodel-react/alex-typescript6_2026-05-13-20-55.json Records a “none” change entry for the package upgrade work.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread common/scripts/package.json
Comment thread packages/apps/storybook/package.json
Comment thread packages/modules/storybook-auth-addon/package.json
@alexdunae alexdunae mentioned this pull request May 28, 2026
@alexdunae
alexdunae merged commit 17e158e into main May 29, 2026
5 checks passed
@alexdunae
alexdunae deleted the alex/typescript6 branch May 29, 2026 14:29
alexdunae added a commit that referenced this pull request May 29, 2026
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.

5 participants