build(js-legacy): upgrade TypeScript to 6.0#104
Merged
joncinque merged 1 commit intoJun 30, 2026
Merged
Conversation
Bump typescript to ^6.0.3 in clients/js-legacy and adjust the tsc-based build for TS6: - tsconfig.base.json: add "ignoreDeprecations": "6.0" (the node10/"Node" module resolution is deprecated in TS6, TS5107) and "types": ["node"] so Buffer/http/https globals from @types/node resolve (TS2591 under the classic resolver). - tsconfig.cjs.json / tsconfig.esm.json: add "rootDir": "./src" — TS6 requires an explicit rootDir for these composite projects (TS5011). - tsconfig.json: set "types": ["node", "mocha"] so the test build still sees mocha's globals after the base "types" narrowing. Module resolution is left as-is and no lib override is added; only the options TS6 actually requires were changed. Verified locally with typescript@6.0.3: `pnpm build` (tsc --build), `pnpm lint` (eslint), and `pnpm test` (mocha, 7 passing) all pass. 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 the
clients/js-legacyclient to TypeScript 6.0. This client uses thetsc --build(project references) setup, so the changes differ from the modernclients/jsclients.Changes
typescript^5.7.2→^6.0.3.tsconfig.base.json: add"ignoreDeprecations": "6.0"and"types": ["node"].tsconfig.cjs.json/tsconfig.esm.json: add"rootDir": "./src".tsconfig.json: set"types": ["node", "mocha"].Why each change (the actual TS6 breaks)
Building unmodified under
typescript@6.0.3fails with:node10/"Node"module resolution is deprecated →ignoreDeprecations: "6.0".cjs/esmcomposite projects need an explicitrootDir→rootDir: "./src".Buffer/http/httpsglobals can't be found (@types/node@26doesn't auto-resolve under the classic resolver) →types: ["node"]in the base.Narrowing the base
typesto["node"]then hides mocha's globals from the test build, sotsconfig.json(which includestest) re-adds["node", "mocha"].Module resolution is intentionally left as
Nodeand noliboverride is added — only the options TS6 actually requires were touched.Verification
Locally with
typescript@6.0.3:pnpm build(tsc --build tsconfig.all.json) — cjs/esm/types all emitpnpm lint(eslint, clean tree) — cleanpnpm test(mocha) — 7 passing🤖 Generated with Claude Code