Skip to content

build(solidity): raise TypeScript to 5.9.3 in both packages - #4206

Open
mswilkison wants to merge 1 commit into
mainfrom
chore/solidity-typescript-5
Open

build(solidity): raise TypeScript to 5.9.3 in both packages#4206
mswilkison wants to merge 1 commit into
mainfrom
chore/solidity-typescript-5

Conversation

@mswilkison

Copy link
Copy Markdown
Contributor

Stacked on #4204. Raises TypeScript in both solidity packages to 5.9.3,
and adds skipLibCheck.

ecdsa was on ^4.5.4 and random-beacon on ^4.4.3 — 4.5.5 and 4.4.3
resolved, both from 2022. Neither had skipLibCheck, so both were type-checking
their dependencies' declarations as well as their own.

Measured

before after
ecdsa TS 4.5.5 — 1 error TS 5.9.3 — 1 error
random-beacon TS 4.4.3 — 33 errors TS 5.9.3 — 21 errors

No new errors in either. random-beacon drops twelve: the newer compiler
resolves inference the old one gave up on, and skipLibCheck takes three
library declarations out of scope (21 of the 24 without it are ours). The 21
that remain are pre-existing and untouched here.

Suites unchanged:

random-beacon 955 passing / 0 pending / 0 failing
ecdsa 673 passing / 44 pending / 0 failing

Why now

Same reason as threshold-network/tbtc-v2#1068 — it is a prerequisite for
replacing waffle, whichever replacement is chosen:

  • viem, abitype and ox declare typescript >= 5.0.4 and their declarations
    do not parse on 4.x at all
  • ethers v6 with typechain v8 needs it too: typechain types a contract method as
    TypedContractMethod, and a 4.x compiler cannot resolve a conditional type
    against it

Why 5.9 and not 6 or 7

Not 7. It is the native Go port, and yarn 4.12.0 cannot install it here at
all — yarn applies a builtin compat patch expecting lib/_tsc.js, which the Go
port does not ship, so the install aborts in the fetch step. (Yarn 4.17.1
installs it fine, so that is a yarn bump rather than a TypeScript wait.)

Not 6 yet, but that is the one to watch. 6.0.3 is stable and is what
Hardhat 3 develops against (hardhat@3.11.1 dev-depends on typescript: ~6.0.3), so TypeScript 6 is the version to pair with a Hardhat 3 move — not
something to take early and not 7.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4bed186e-b1c5-4535-abb6-ae19491e73be

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/solidity-typescript-5

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

ecdsa was on ^4.5.4 and random-beacon on ^4.4.3 -- 4.5.5 and 4.4.3 resolved,
both from 2022. Neither package had `skipLibCheck`, so both were type-checking
their dependencies' declarations as well as their own.

  ecdsa           TS 4.5.5   1 error      TS 5.9.3   1 error
  random-beacon   TS 4.4.3  33 errors     TS 5.9.3  21 errors

No new errors in either. random-beacon drops twelve because the newer compiler
resolves inference the old one gave up on, and because `skipLibCheck` takes
three library declarations out of scope. The 21 that remain are pre-existing
and untouched here.

Suites unchanged:

  random-beacon   955 passing /  0 pending / 0 failing
  ecdsa           673 passing / 44 pending / 0 failing

Doing it here for the same reason as threshold-network/tbtc-v2#1068: it is a
prerequisite for replacing waffle, whichever replacement is chosen. viem,
abitype and ox all declare typescript >= 5.0.4, and ethers v6 with typechain v8
needs it too -- typechain types a contract method as `TypedContractMethod`, and
a 4.x compiler cannot resolve a conditional type against it.

Not TypeScript 7, which is the native port. Yarn 4.12.0 cannot install it at
all: yarn applies a builtin compat patch expecting lib/_tsc.js, which the Go
port does not ship. Not TypeScript 6 either, yet -- 6.0.3 is stable and is what
Hardhat 3 develops against, so that is the version to pair with a Hardhat 3
move rather than something to take early.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mswilkison
mswilkison force-pushed the chore/solidity-typescript-5 branch from 0d15f45 to 0f869ea Compare July 27, 2026 17:56
Base automatically changed from chore/solidity-hardhat-2.29-node-24 to main July 27, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant