Repository navigation
feat: update TypeScript support to 5.8 - 6.0 - #18332
Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe pull request expands TypeScript CI coverage, upgrades the development compiler to TypeScript 6.0.2, removes obsolete suppressions, and refactors ChangesTypeScript compatibility and constraint checking
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Merge Risk: ⚪ Minimal · up to The TypeScript support update and constraint-checking refactor are ready to merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
04bd9ba to
0b1b706
Compare
7b11666 to
e223edd
Compare
0b1b706 to
7ba51de
Compare
e223edd to
44cda1a
Compare
29e1c8d to
92e4bc1
Compare
44cda1a to
5a0b25c
Compare
92e4bc1 to
70a18e0
Compare
5a0b25c to
a74d1e6
Compare
70a18e0 to
a2f6e3c
Compare
09453a2 to
bb3309c
Compare
Move the supported range up to 5.8, 5.9 and 6.0, and build on 6.0.2. TypeScript 6.0 rejects `ConstraintChecking.DEFERRED` and `IMMEDIATE` as they were written, with "Property '#constraints' of exported anonymous class type may not be private or protected" (TS4094). Both were class expressions passed straight to `classToInvokable` inside a static property initializer, so the type they produce has no name to refer to, and a private field cannot be described in the emitted declarations without one. Give them named declarations outside the class body and keep the static accessors as the documented entry points, so the class names, and the descriptions the documentation points at, are preserved. Note that this turns `DEFERRED` and `IMMEDIATE` from enumerable static data properties into accessors, so they no longer show up in `Object.keys` or a spread of `ConstraintChecking`. Both are still reached the same way. Cover the two with unit tests in `packages/core/test/unit/deferrable.test.ts`: accessor identity, name preservation, construction with and without `new`, frozen constraints, and `isEqual`, including that the two are never equal to each other. Drop the `@ts-ignore` comments that newer compilers no longer need, and turn the two in the data types test into `@ts-expect-error`, which is what they were waiting to become. The CLS test gains an explicit `id` declaration, which 6.0 needs to infer the model's creation attributes. TypeDoc must have moved to 0.28 first; 0.27 refuses to run on TypeScript 6.0. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01EgPPfqYYk6PFGbanp5mAFh
Co-authored-by: Rik Smale <[email protected]>
bb3309c to
73d63b9
Compare
Pull Request Checklist
Description of Changes
Top of the stack, stacked on #18331.
Moves the supported TypeScript range up from
5.5–5.8to5.8,5.9and6.0, and builds on6.0.2.ConstraintChecking had to be restructured
TypeScript 6.0 rejects
ConstraintChecking.DEFERREDandIMMEDIATEas they were written:Both were class expressions passed straight to
classToInvokableinside a static property initializer, so the type they produce has no name to refer to, and a private field cannot be described in the emitted declarations without one. They now have named declarations outside the class body, with the static accessors kept as the documented entry points — which preserves both the class names and the descriptions the generated docs point at.cls.test.tsalso gains an explicitdeclare id: CreationOptional<number>, which 6.0 needs to infer the model's creation attributes.This is the one non-mechanical change in the PR, so it is covered by new unit tests in
packages/core/test/unit/deferrable.test.ts: accessor identity, name preservation, construction with and withoutnew, frozen constraints, andisEqual(including thatDEFERREDandIMMEDIATEare never equal to each other).Everything else is mechanical
The
@ts-ignorecomments that newer compilers no longer need are dropped, and the two in the data types test become@ts-expect-error— which is what their own comments said they were waiting to be:Ordering
TypeDoc had to reach 0.28 first (#18331); 0.27 refuses to run on TypeScript 6.0 and
docsis a required CI job.Verification
yarn build,yarn test-unit(2220 passing),yarn test-typingsacross all 13 projects, andyarn docswith no warnings — all on TypeScript 6.0.2.🤖 Generated with Claude Code
https://claude.ai/code/session_01EgPPfqYYk6PFGbanp5mAFh
Summary by CodeRabbit
Compatibility
Bug Fixes
Tests