build(js): upgrade TypeScript to 6.0 (both clients)#346
Merged
joncinque merged 1 commit intoJun 30, 2026
Merged
Conversation
Upgrade both JS clients to typescript@^6.0.3. clients/js (modern, tsup): - Add "rootDir": "./src" to tsconfig.declarations.json (TS6 requires an explicit rootDir for declaration emit; TS5011). clients/js-legacy (tsc --build): - tsconfig.base.json: add "ignoreDeprecations": "6.0" (node10/"Node" resolution is deprecated, TS5107), "lib": ["ES2020", "DOM"] (the cjs project targets ES2016 and the source uses BigInt, TS2583), and "types": ["node"] (so Buffer/http/https resolve, TS2591). - tsconfig.cjs.json / tsconfig.esm.json: add "rootDir": "./src" (TS5011). - tsconfig.json: "types": ["node", "mocha"] so the test build sees mocha's globals after the base "types" narrowing. Each change corresponds to an actual TS6 compiler error observed when building unmodified; no extra options were added. Verified locally with typescript@6.0.3: - clients/js: `pnpm build` + `pnpm lint` pass. - clients/js-legacy: `pnpm build`, `pnpm lint`, and `pnpm test:exports` pass. The mocha integration tests (basic/longRecord) require a local validator and were not run here. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
joncinque
approved these changes
Jun 30, 2026
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.
Upgrades both JS clients in this repo to
typescript@^6.0.3. The two clients use different build systems, so the required changes differ — each was verified by building under TS6, not by copying a template.clients/js(modern, tsup + vitest)"rootDir": "./src"totsconfig.declarations.json.tscdeclaration-emit step fails with TS5011 without it. No-op layout change otherwise; the client already usesmoduleResolution: "bundler".clients/js-legacy(tsc--build, mocha)tsconfig.base.json:"ignoreDeprecations": "6.0","lib": ["ES2020", "DOM"],"types": ["node"]tsconfig.cjs.json/tsconfig.esm.json:"rootDir": "./src"tsconfig.json:"types": ["node", "mocha"]Each maps to a real TS6 error seen on an unmodified build:
node10/"Node"resolution deprecated →ignoreDeprecations.BigIntnot found (the cjs project targets ES2016 and the source usesBigInt) →lib: ["ES2020", "DOM"].Buffer/http/httpsglobals unresolved (@types/nodeunder the classic resolver) →types: ["node"].cjs/esmcomposite projects need an explicitrootDir.typesnarrowing then hides mocha's globals from the test build →tsconfig.jsonre-adds["node", "mocha"].Verification (local,
typescript@6.0.3)clients/js: ✅pnpm build(tsup + tsc declarations), ✅pnpm lintclients/js-legacy: ✅pnpm build(tsc --build, cjs/esm/types emit), ✅pnpm lint, ✅pnpm test:exports. The mocha integration tests (basic/longRecord) connect to a local validator (127.0.0.1:8899) and weren't run here; they compiled and ran (failing only on the missing RPC), so the types fix is confirmed — CI will run them against a validator.🤖 Generated with Claude Code