Skip to content

Conversation

cjen1-msft
Copy link
Contributor

Typescript 5.9 made ArrayBufferLike = ArrayBuffer | SharedArrayBuffer, which causes typescript to output many errors as our code has previously assumed that the input is always an ArrayBuffer.

This PR removes the pins, and by adding toArrayBuffer(b : ArrayBufferLike | Uint8Array | Buffer) : ArrayBuffer and toUint8ArrayBuffer(b : Uint8Array<ArrayBufferLike>) : Uint8Array<ArrayBuffer> to a utils.ts module in ccf-app, fixes the corresponding errors with typescript 5.9.

These in theory could live in maybe converters.ts, however that would add an import on converters.ts to both polyfill.ts and crypto.ts which seems inadvisable, instead of a direct import of just utils.ts.

@cjen1-msft cjen1-msft requested a review from a team as a code owner August 8, 2025 16:27
@eddyashton eddyashton added this pull request to the merge queue Aug 12, 2025
@eddyashton
Copy link
Member

We should backport this to release/6.x, to fix the docs build.

@eddyashton eddyashton removed this pull request from the merge queue due to a manual request Aug 12, 2025
@achamayou achamayou added this pull request to the merge queue Aug 12, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 12, 2025
@achamayou achamayou added auto-backport Automatically backport this PR to LTS branch 6.x-todo PRs which should be backported to 6.x labels Aug 14, 2025
@achamayou achamayou changed the title Stop pining for typescript 5.8.3 Compatibility with TypeScript 5.9 Aug 14, 2025
@achamayou achamayou enabled auto-merge August 14, 2025 10:44
@achamayou achamayou added this pull request to the merge queue Aug 14, 2025
Merged via the queue into microsoft:main with commit f9a7e51 Aug 14, 2025
17 checks passed
achamayou pushed a commit to achamayou/CCF that referenced this pull request Aug 14, 2025
Co-authored-by: Max <[email protected]>
Co-authored-by: Amaury Chamayou <[email protected]>
(cherry picked from commit f9a7e51)

# Conflicts:
#	CHANGELOG.md
#	js/ccf-app/package.json
#	tests/js-interpreter-reuse/package.json
#	tests/npm-app/package.json
@achamayou achamayou added the backported This PR was successfully backported to LTS branch label Aug 14, 2025
@cjen1-msft cjen1-msft deleted the typescript-fun branch August 15, 2025 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.x-todo PRs which should be backported to 6.x auto-backport Automatically backport this PR to LTS branch backported This PR was successfully backported to LTS branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants