Skip to content

chore: upgrade to TypeScript 6 - #11347

Open
erwanMarmelab wants to merge 12 commits into
nextfrom
feat/typescript-v7/main
Open

erwanMarmelab wants to merge 12 commits into
nextfrom
feat/typescript-v7/main

Conversation

@erwanMarmelab

@erwanMarmelab erwanMarmelab commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Problem

TypeScript v6 is out, but RA is still on TypeScript v5.

Solution

Upgrade to TypeScript v6.

We deliberately choose not to upgrade to TypeScript V7 because the entire toolchain (eslint, VSCode) isn't yet ready to support it out of the box.

Additional Checks

  • The PR targets master for a bugfix or a documentation fix, or next for a feature
  • The PR includes unit tests (if not possible, describe why)
  • The PR includes one or several stories (if not possible, describe why)
  • The documentation is up to date

@erwanMarmelab erwanMarmelab added the WIP Work In Progress label Aug 26, 2026
@erwanMarmelab erwanMarmelab changed the title chore: upgrade to TypeScript 7 chore: upgrade to TypeScript 6 Aug 27, 2026
@erwanMarmelab erwanMarmelab added RFR Ready For Review and removed WIP Work In Progress labels Aug 28, 2026
@fzaninotto

Copy link
Copy Markdown
Member

needs rebase...

Comment thread .github/workflows/test.yml Outdated
Comment thread examples/simple/tsconfig.json
Comment thread examples/simple/tsconfig.json Outdated
Comment thread packages/ra-ui-materialui/src/field/RichTextField.tsx Outdated
Comment thread tsconfig.json Outdated
/* Basic Options */
"target": "ES2020" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */,
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
"module": "esnext" /* Specify module code generation. zshy overrides this per output format (commonjs for .cjs, esnext for .js). */,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why does this need changing if zshy overrides it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You're right, it doesn't. Reverted to commonjs (and moduleResolution back to node)n build, typecheck and the full test suite pass. The jest module: 'commonjs' override is gone too

Comment thread tsconfig.json Outdated
Comment thread yarn.lock Outdated
linkType: hard

"@rollup/pluginutils@npm:^5.0.1, @rollup/pluginutils@npm:^5.0.2, @rollup/pluginutils@npm:^5.3.0":
"@rollup/pluginutils@npm:^5.0.1, @rollup/pluginutils@npm:^5.3.0":

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't understand this change

@erwanMarmelab erwanMarmelab Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Leftover from rollup-preserve-directives, which this PR added to demo/crm but nothing imports. Removed, the lockfile entry is gone.

Comment thread yarn.lock Outdated
languageName: node
linkType: hard

"react-dom@npm:^19.0.0":

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't understand this changes, which leads to a duplicate react in the repo

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Lockfile drift from a stale install. Regenerated from the branch baseline: the diff is now only typescript, typescript-eslint, ts-jest and their transitive deps. No duplicate react.

Comment thread yarn.lock Outdated
Comment thread yarn.lock
languageName: node
linkType: hard

"typescript@patch:typescript@npm%3A>=3 < 6#optional!builtin<compat/typescript>":

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

so we still bundle typescript 5?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Only under node_modules/lerna/node_modules/typescript, lerna hard-depends on typescript@>=3 <6. The workspace root is 6.0.3. Same situation on next, except lerna shared the hoisted TS 5 there.

@fzaninotto

Copy link
Copy Markdown
Member

needs rebase

erwanMarmelab and others added 3 commits September 17, 2026 15:37
The merge of next into this branch resolved the lockfile conflict in
favor of next, dropping the entries for the upgraded typescript,
ts-jest, typescript-eslint and @types/node. Every CI job then failed at
the install step with YN0028 ("the lockfile would have been modified by
this install").
@erwanMarmelab
erwanMarmelab force-pushed the feat/typescript-v7/main branch from 42ad953 to 8e1f6ed Compare September 17, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RFR Ready For Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants