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

@mswilkison mswilkison commented Jul 27, 2026

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.

Summary by CodeRabbit

  • Chores
    • Updated TypeScript tooling for improved compatibility across Solidity projects.
    • Streamlined type-checking by skipping validation of external library declaration files.
    • Preserved existing iteration support settings.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: db0abff3-dd54-4870-ba24-9ca283995934

📥 Commits

Reviewing files that changed from the base of the PR and between a7ac898 and 0072a3c.

⛔ Files ignored due to path filters (2)
  • solidity/ecdsa/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • solidity/random-beacon/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (4)
  • solidity/ecdsa/package.json
  • solidity/ecdsa/tsconfig.json
  • solidity/random-beacon/package.json
  • solidity/random-beacon/tsconfig.json

📝 Walkthrough

Walkthrough

The ECDSA and random-beacon Solidity workspaces upgrade their TypeScript development dependency to 5.9.3 and enable skipLibCheck in their TypeScript configurations.

Changes

Solidity TypeScript configuration

Layer / File(s) Summary
TypeScript tooling and compiler checks
solidity/ecdsa/package.json, solidity/ecdsa/tsconfig.json, solidity/random-beacon/package.json, solidity/random-beacon/tsconfig.json
Both workspaces use TypeScript 5.9.3 and enable skipLibCheck. Existing compiler options remain configured.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Mergeability Score: ⚪ Minimal · up to 0072a

This is a localized build-tooling update with unchanged passing test suites and no actionable merge-blocking risk remaining after normal checks and review.

Possibly related PRs

Suggested reviewers: piotr-roslaniec

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the TypeScript upgrade in both Solidity packages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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.

@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
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>
@piotr-roslaniec
piotr-roslaniec force-pushed the chore/solidity-typescript-5 branch from 0f869ea to 0072a3c Compare August 13, 2026 18:36
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