chore: upgrade to TypeScript 6 - #11347
erwanMarmelab wants to merge 15 commits into
Conversation
|
needs rebase... |
| /* 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). */, |
There was a problem hiding this comment.
why does this need changing if zshy overrides it?
There was a problem hiding this comment.
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
| 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": |
There was a problem hiding this comment.
I don't understand this change
There was a problem hiding this comment.
Leftover from rollup-preserve-directives, which this PR added to demo/crm but nothing imports. Removed, the lockfile entry is gone.
| languageName: node | ||
| linkType: hard | ||
|
|
||
| "react-dom@npm:^19.0.0": |
There was a problem hiding this comment.
I don't understand this changes, which leads to a duplicate react in the repo
There was a problem hiding this comment.
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.
| languageName: node | ||
| linkType: hard | ||
|
|
||
| "typescript@patch:typescript@npm%3A>=3 < 6#optional!builtin<compat/typescript>": |
There was a problem hiding this comment.
so we still bundle typescript 5?
There was a problem hiding this comment.
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.
|
needs rebase |
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").
42ad953 to
8e1f6ed
Compare
- Drop the .vscode/settings.json added by mistake. - Keep unmatched nested filters in buildVariables instead of dropping them: the list query would have run unfiltered while the UI still showed the filter as active, with no error. This matches what the non-nested branch already does for filters that are not resource fields. - Restore the root typecheck script to CI=true lerna run build. Packages resolve cross-package imports through dist/*.d.ts, which lerna run typecheck never builds, so it failed with TS2307 on a fresh clone and checked against stale declarations otherwise. The per-package typecheck scripts stay, they are useful inside a single package.
|
Nit (non-blocking): with TS 6 defaulting If that file is removed or stops importing jest-dom, every spec file in the repo will lose its jest types in the editor. Suggest making it explicit: "types": ["node", "jest"] |
| "allowSyntheticDefaultImports": true, | ||
| "esModuleInterop": true, | ||
| "skipLibCheck": true, | ||
| "ignoreDeprecations": "6.0", |
There was a problem hiding this comment.
Why is this necessary since it uses TypeScript 6?
There was a problem hiding this comment.
It wasn't needed: it only silenced the TS 6 deprecation warnings for baseUrl and moduleResolution: "node". I removed baseUrl, which wasn't used, and switched to moduleResolution: "bundler".
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
masterfor a bugfix or a documentation fix, ornextfor a feature