feat: upgrade to typescript 5.9 - #1847
Conversation
There was a problem hiding this comment.
Pull request overview
Upgrades the monorepo’s TypeScript toolchain to TS 5.9.3 and updates typescript-eslint to v8 to maintain lint/typecheck compatibility, alongside small code adjustments needed to satisfy new typings/lint rules.
Changes:
- Bump TypeScript from 5.1.6 → 5.9.3 and update
@typescript-eslint/*to v8 (plus related lockfile updates). - Add targeted type assertions and eslint rule suppressions where new TS/ESLint rules flag existing patterns.
- Minor async/Promise refactors and small type tightening to satisfy updated inference/overload resolution.
Reviewed changes
Copilot reviewed 23 out of 24 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/wallet-sdk/src/models/account.ts | Adjust overload signature and add eslint suppression for throwing non-Error. |
| packages/transactions/src/clarity/parser.ts | Add eslint suppressions around non-Error throws in parsing helpers. |
| packages/transactions/src/builders.ts | Suppress no-empty-object-type for a deprecated alias interface. |
| packages/storage/src/hub.ts | Cast upload body to BodyInit to satisfy updated fetch typings. |
| packages/storage/src/fileContentLoader.ts | Suppress promise rejection lint rule in FileReader error handler. |
| packages/stacking/src/index.ts | Simplify Promise.all usage with await destructuring. |
| packages/profile/src/profile.ts | Suppress promise rejection lint rule in multiple reject paths. |
| packages/encryption/src/sha2Hash.ts | Add any cast for WebCrypto digest input typing. |
| packages/encryption/src/pbkdf2.ts | Add any casts for WebCrypto PBKDF2/HMAC argument typing. |
| packages/encryption/src/ec.ts | Suppress only-throw-error when throwing a validation object. |
| packages/encryption/src/cryptoUtils.ts | Update eslint suppression rule name for require usage. |
| packages/encryption/src/aesCipher.ts | Add any casts for WebCrypto AES encrypt/decrypt argument typing. |
| packages/common/src/utils.ts | Add eslint suppressions for stringification/throwing non-Error values. |
| packages/common/src/fetch.ts | Slightly tighten RequestInit optional parameter typing. |
| packages/cli/src/utils.ts | Update eslint suppression rule name; tighten Object → object. |
| packages/cli/src/network.ts | Refactor JSON + tuple return to avoid Promise.all misuse/typing friction. |
| packages/cli/src/keys.ts | Update eslint suppression rule name for require. |
| packages/cli/src/data.ts | Update eslint suppression rule name for require. |
| packages/cli/src/cli.ts | Tighten fetch response typing, add rejection lint suppressions, and use Buffer.isBuffer. |
| packages/cli/src/auth.ts | Tighten Object → object in an interface field. |
| packages/auth/src/verification.ts | Refactor async/Promise.all usage to direct boolean evaluation wrapped in a Promise. |
| packages/auth/src/messages.ts | Align payload typing with jsontokens Json type and tighten profile param type. |
| package.json | Bump TypeScript/ESLint-related devDependencies to new versions. |
| package-lock.json | Lockfile updates for TS/ESLint dependency tree changes. |
Comments suppressed due to low confidence (1)
packages/encryption/src/pbkdf2.ts:83
- Several WebCrypto calls are coerced with
as any(e.g.,importKeyinput andderiveBitssalt). Prefer updating the helper signatures/types to use the WebCrypto-expected types (BufferSource,AlgorithmIdentifier, etc.) so the code remains type-safe withoutany.
const passwordBytes = utf8ToBytes(password);
try {
const key = await this.subtleCrypto.importKey('raw', passwordBytes as any, 'PBKDF2', false, [
'deriveBits',
]);
const result = await this.subtleCrypto.deriveBits(
{
name: 'PBKDF2',
salt: salt as any,
iterations,
hash: { name: algo },
},
key,
keyLength * 8
);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
love this effort, but i've also been thinking about moving to oxlint or similar faster tooling (biome?). have you tried any of them? i have used oxlint in another project and will test out the switch in another branch. eslint configs have become painful and the migration to v9 is also a bit clunky |
|
@jannik-stacks I've tried both tools and I prefer oxlint/oxfmt, since they can be used with existing ESLint plugins if needed. |
Pull request was closed
Description
Upgrade TypeScript from 5.1.6 to 5.9.3 across the monorepo, along with updating typescript-eslint to v8 for compatibility. In this pr I tried to keep the same code as before to avoid any breaking changes.
Breaking change?
No
Checklist