-
Notifications
You must be signed in to change notification settings - Fork 2.3k
TINY-12682: Upgrade TypeScript to 5.9.3 #10575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Note
|
| Cohort / File(s) | Summary |
|---|---|
HTTP download chunk conversion modules/jax/src/main/ts/ephox/jax/core/Http.ts |
Added Arr import; in fetchDownload, map accumulated chunks to new Uint8Array(chunk) (stored in properChunks) and construct the Blob from those Uint8Array instances with the same MIME type. |
Mock client buffer handling modules/agar/src/main/ts/ephox/agar/http/MockClient.ts |
Replaced direct buffer slicing with guarded logic: derive sliced from chunk.buffer, detect SharedArrayBuffer usage and, if present, copy into a non-shared ArrayBuffer via Uint8Array(sliced).slice().buffer; otherwise reuse sliced. |
Dev dependency bumps package.json |
Bumped devDependencies: ts-loader ^9.5.2 → ^9.5.4 and typescript ^5.7.3 → ^5.9.3. |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
- Inspect
fetchDownloadconversion to ensure all chunk shapes (ArrayBuffer, TypedArray, etc.) are handled correctly. - Verify SharedArrayBuffer detection and the copy-to-non-shared-ArrayBuffer path in
MockClient.tspreserves byte contents and performance considerations. - Run build/tests with updated TypeScript and ts-loader to confirm no toolchain regressions.
Pre-merge checks
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title 'TINY-12682: Upgrade TypeScript to 5.9.3' accurately reflects the primary change in the pull request - upgrading TypeScript from 5.7.3 to 5.9.3, which is the main objective documented in the PR description. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
📜 Recent review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (1)
modules/agar/src/main/ts/ephox/agar/http/MockClient.ts(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- modules/agar/src/main/ts/ephox/agar/http/MockClient.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyze (javascript)
Comment @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (2)
modules/jax/src/main/ts/ephox/jax/core/Http.ts (1)
168-170: Avoid full-buffer copy on completion; type the chunk array as BlobPart[] insteadCopying each chunk doubles memory/time for large downloads. Prefer a typing fix so Blob accepts the parts without runtime copies.
Apply this minimal change:
@@ - const chunks: Array<Uint8Array> = []; + const chunks: BlobPart[] = []; @@ - if (result.done) { - // TINY-12744: We can potentially remove this once when we upgrade to "target": "es2022" - const properChunks = chunks.map((chunk) => new Uint8Array(chunk)); - resolve(Result.value(new Blob(properChunks, { type: mime.getOr('') }))); + if (result.done) { + // TINY-12744: Temporary until we can rely on newer lib.dom types / "target": "es2022" + resolve(Result.value(new Blob(chunks, { type: mime.getOr('') })));If TS still complains pre-#10546, use a localized cast instead of copying:
resolve(Result.value(new Blob(chunks as BlobPart[], { type: mime.getOr('') })));Also consider adding a TODO referencing PR #10546 alongside TINY-12744 to make removal criteria explicit.
modules/oxide-components/eslint.config.ts (1)
34-47: Targeted rule override is reasonable; add removal guardDisabling @stylistic/indent only for TSX and enforcing 2-space for TS is a pragmatic workaround for TS 5.9. Keep a TODO with the upstream issue and revisit once fixed.
Optional: add a dated TODO so it’s easy to prune later:
-// TINY-12801: Temporary workaround until issue with @stylistic/indent rule introduced in TypeScript 5.9.2 is resolved. -// See https://github.com/microsoft/TypeScript/issues/62188 +// TINY-12801: Temporary workaround for @stylistic/indent + TS 5.9.2 (2025-09-01). +// Upstream: https://github.com/microsoft/TypeScript/issues/62188 — remove when resolved and propagated.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Knowledge Base: Disabled due to Reviews > Disable Knowledge Base setting
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (3)
modules/jax/src/main/ts/ephox/jax/core/Http.ts(1 hunks)modules/oxide-components/eslint.config.ts(1 hunks)package.json(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyze (javascript)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (1)
modules/oxide-components/eslint.config.ts (1)
34-41: Scoped TSX-only disable looks good and matches the linked TS 5.9 regression.Good temporary workaround with clear references (TINY-12801, TS#62188). This leaves .ts unaffected, which answers the earlier question about broader scope.
🧹 Nitpick comments (1)
modules/oxide-components/eslint.config.ts (1)
37-41: Nit: align quotes with local style.Use single quotes for consistency with the rest of this file.
- files: ["**/*.tsx"], + files: [ '**/*.tsx' ], - "@stylistic/indent": "off" + '@stylistic/indent': 'off'
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Knowledge Base: Disabled due to Reviews > Disable Knowledge Base setting
📒 Files selected for processing (1)
modules/oxide-components/eslint.config.ts(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyze (javascript)
8819e7e to
f060e74
Compare
f060e74 to
567a9a4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (3)
modules/agar/src/main/ts/ephox/agar/http/MockClient.ts(1 hunks)modules/jax/src/main/ts/ephox/jax/core/Http.ts(2 hunks)modules/oxide-components/eslint.config.ts(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- modules/oxide-components/eslint.config.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
modules/jax/src/main/ts/ephox/jax/core/Http.ts (1)
1-1: LGTM: Import addition for Arr utility.The
Arrimport is appropriately added to support the functional array mapping introduced in the chunk handling logic.
…orkaround in eslint config
Related Ticket: TINY-12682
Description of Changes:
typescriptto5.9.3Http.tsto explicitly convert each chunk to a newUint8Arrayto ensure we are always ending up with anArrayBufferrather thanSharedArrayBufferand behaviour remains consistent.Pre-checks:
feature/,hotfix/orspike/Review:
GitHub issues (if applicable):
Summary by CodeRabbit
Bug Fixes
Dependencies
✏️ Tip: You can customize this high-level summary in your review settings.