build(solidity): raise TypeScript to 5.9.3 in both packages - #4206
Open
mswilkison wants to merge 1 commit into
Open
build(solidity): raise TypeScript to 5.9.3 in both packages#4206mswilkison wants to merge 1 commit into
mswilkison wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
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
force-pushed
the
chore/solidity-typescript-5
branch
from
July 27, 2026 17:56
0d15f45 to
0f869ea
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #4204. Raises TypeScript in both solidity packages to 5.9.3,
and adds
skipLibCheck.ecdsawas on^4.5.4andrandom-beaconon^4.4.3— 4.5.5 and 4.4.3resolved, both from 2022. Neither had
skipLibCheck, so both were type-checkingtheir dependencies' declarations as well as their own.
Measured
ecdsarandom-beaconNo new errors in either.
random-beacondrops twelve: the newer compilerresolves inference the old one gave up on, and
skipLibChecktakes threelibrary 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-beaconecdsaWhy now
Same reason as threshold-network/tbtc-v2#1068 — it is a prerequisite for
replacing waffle, whichever replacement is chosen:
abitypeandoxdeclaretypescript >= 5.0.4and their declarationsdo not parse on 4.x at all
TypedContractMethod, and a 4.x compiler cannot resolve a conditional typeagainst 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 Goport 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.1dev-depends ontypescript: ~6.0.3), so TypeScript 6 is the version to pair with a Hardhat 3 move — notsomething to take early and not 7.