Skip to content

build: support TypeScript 6 (typescript 6.0.3, tsup ^7.3.0, ts-jest ^29.4.11)#55

Merged
frosty00 merged 2 commits into
ccxt:masterfrom
carlotestor:bump-typescript-6.0.3
Jul 9, 2026
Merged

build: support TypeScript 6 (typescript 6.0.3, tsup ^7.3.0, ts-jest ^29.4.11)#55
frosty00 merged 2 commits into
ccxt:masterfrom
carlotestor:bump-typescript-6.0.3

Conversation

@carlotestor

@carlotestor carlotestor commented Jul 9, 2026

Copy link
Copy Markdown

What

Upgrades the pinned typescript 4.9.5 to 6.0.3 and makes the toolchain compatible:

  • tsconfig: drop deprecated baseUrl (unused — all imports are relative; hard error TS5101 under TS 6); make pre-6.0 defaults explicit ("strict": false) and declare "types": ["node", "jest"] since TS 6 no longer auto-includes @types/* packages. tsconfig.json is fully deprecation-free — no ignoreDeprecations anywhere in it.
  • tsup.config.ts (new): build flags moved unchanged from the build script CLI into config. The TS6 deprecation suppression is scoped here to tsup's dts program only (dts.compilerOptions.ignoreDeprecations: "6.0"): tsup unconditionally injects baseUrl into the compiler options it hands to its bundled rollup-plugin-dts (node_modules/tsup/dist/rollup.js: baseUrl: compilerOptions.baseUrl || ".", still present as of tsup 8.5.1), which TS 6 rejects with TS5101. tsc --noEmit, ts-jest (359 tests) and eslint all run with no suppression; dist output verified byte-identical.
  • src/transpiler.ts: narrow the CompilerHost override key type to the three methods actually overridden (getSourceFile / readFile / fileExists) — since TS 5.3 CompilerHost includes the non-function jsDocParsingMode member, so an assignment through keyof ts.CompilerHost can no longer satisfy the resulting intersection type
  • devDeps: tsup 6.4.0 → ^7.3.0 (its typescript@"^4.1.0" optional peer conflicted with typescript@6; 7.x allows >=4.5.0), ts-jest^29.4.11 (supports typescript <7)

Verification

  • npx tsc --noEmit — clean
  • npm test359/359 tests, 8/8 suites pass
  • npm run build — lint 0 errors; ESM + CJS + DTS emit succeed
  • generated dist/ and tests/integration/ outputs intentionally left untouched

frosty00 added 2 commits July 9, 2026 13:58
…29.4.11)

- tsconfig: drop deprecated baseUrl (unused), set ignoreDeprecations '6.0'
  (tsup's dts build injects baseUrl internally, a hard error TS5101 under TS6),
  make pre-6.0 defaults explicit (strict: false) and declare types [node, jest]
  since TS6 no longer auto-includes @types packages
- transpiler.ts: narrow the CompilerHost override key type to the three methods
  actually overridden - since TS 5.3 CompilerHost includes the non-function
  jsDocParsingMode member, so keyof-wide assignment cannot satisfy the intersection
- devDeps: tsup ^7.3.0 (typescript peer >=4.5.0, fixes ERESOLVE vs typescript@6),
  ts-jest ^29.4.11 (supports typescript <7)

tsc --noEmit clean; 359/359 tests pass; lint 0 errors; ESM/CJS/DTS build verified
tsconfig.json no longer sets ignoreDeprecations: our own deprecated option
(baseUrl) was already removed in the TypeScript 6 migration, and tsc --noEmit,
ts-jest (359 tests) and eslint are all clean without the flag.

The flag was only load-bearing for tsup --dts: tsup unconditionally injects
baseUrl into the compiler options it passes to its bundled rollup-plugin-dts
(node_modules/tsup/dist/rollup.js: baseUrl: compilerOptions.baseUrl || ".",
still present as of tsup 8.5.1), which TypeScript 6 rejects with TS5101.
The suppression now lives in tsup.config.ts under dts.compilerOptions, scoped
to that one generated program. Build flags moved from the build script into
tsup.config.ts unchanged; dist output verified byte-identical.
@frosty00
frosty00 merged commit 1e1c304 into ccxt:master Jul 9, 2026
1 check passed
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.

2 participants