From b6ee9de6632af535a685b1a49501faecdc01bf67 Mon Sep 17 00:00:00 2001 From: Clankmaxxing Clod <287268959+clankmaxxing-clod@users.noreply.github.com> Date: Tue, 30 Jun 2026 17:31:17 +0000 Subject: [PATCH] build(js-legacy): upgrade TypeScript to 6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- clients/js-legacy/package.json | 2 +- clients/js-legacy/tsconfig.base.json | 4 +++- clients/js-legacy/tsconfig.cjs.json | 3 ++- clients/js-legacy/tsconfig.esm.json | 3 ++- clients/js-legacy/tsconfig.json | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/clients/js-legacy/package.json b/clients/js-legacy/package.json index 360d1fe..9d391f4 100644 --- a/clients/js-legacy/package.json +++ b/clients/js-legacy/package.json @@ -72,7 +72,7 @@ "ts-node": "^10.9.2", "tslib": "^2.8.1", "typedoc": "^0.28.19", - "typescript": "^5.7.2" + "typescript": "^6.0.3" }, "prettier": "@solana/prettier-config-solana" } diff --git a/clients/js-legacy/tsconfig.base.json b/clients/js-legacy/tsconfig.base.json index 90620c4..2aca5f8 100644 --- a/clients/js-legacy/tsconfig.base.json +++ b/clients/js-legacy/tsconfig.base.json @@ -9,6 +9,8 @@ "noEmitOnError": true, "resolveJsonModule": true, "strict": true, - "stripInternal": true + "stripInternal": true, + "ignoreDeprecations": "6.0", + "types": ["node"] } } diff --git a/clients/js-legacy/tsconfig.cjs.json b/clients/js-legacy/tsconfig.cjs.json index 4dce4e8..ab04817 100644 --- a/clients/js-legacy/tsconfig.cjs.json +++ b/clients/js-legacy/tsconfig.cjs.json @@ -5,6 +5,7 @@ "outDir": "dist/cjs", "target": "ES2016", "module": "CommonJS", - "sourceMap": true + "sourceMap": true, + "rootDir": "./src" } } diff --git a/clients/js-legacy/tsconfig.esm.json b/clients/js-legacy/tsconfig.esm.json index d7790b5..f3bf58e 100644 --- a/clients/js-legacy/tsconfig.esm.json +++ b/clients/js-legacy/tsconfig.esm.json @@ -8,6 +8,7 @@ "module": "ES2020", "sourceMap": true, "declaration": true, - "declarationMap": true + "declarationMap": true, + "rootDir": "./src" } } diff --git a/clients/js-legacy/tsconfig.json b/clients/js-legacy/tsconfig.json index 2f9b239..cd3f3f8 100644 --- a/clients/js-legacy/tsconfig.json +++ b/clients/js-legacy/tsconfig.json @@ -3,6 +3,7 @@ "include": ["src", "test"], "compilerOptions": { "noEmit": true, - "skipLibCheck": true + "skipLibCheck": true, + "types": ["node", "mocha"] } }