Skip to content

Commit c1ee5c1

Browse files
build(js-legacy): upgrade TypeScript to 6.0 (#104)
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>
1 parent 0dc0940 commit c1ee5c1

5 files changed

Lines changed: 10 additions & 5 deletions

File tree

clients/js-legacy/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"ts-node": "^10.9.2",
7373
"tslib": "^2.8.1",
7474
"typedoc": "^0.28.19",
75-
"typescript": "^5.7.2"
75+
"typescript": "^6.0.3"
7676
},
7777
"prettier": "@solana/prettier-config-solana"
7878
}

clients/js-legacy/tsconfig.base.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
"noEmitOnError": true,
1010
"resolveJsonModule": true,
1111
"strict": true,
12-
"stripInternal": true
12+
"stripInternal": true,
13+
"ignoreDeprecations": "6.0",
14+
"types": ["node"]
1315
}
1416
}

clients/js-legacy/tsconfig.cjs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"outDir": "dist/cjs",
66
"target": "ES2016",
77
"module": "CommonJS",
8-
"sourceMap": true
8+
"sourceMap": true,
9+
"rootDir": "./src"
910
}
1011
}

clients/js-legacy/tsconfig.esm.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"module": "ES2020",
99
"sourceMap": true,
1010
"declaration": true,
11-
"declarationMap": true
11+
"declarationMap": true,
12+
"rootDir": "./src"
1213
}
1314
}

clients/js-legacy/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"include": ["src", "test"],
44
"compilerOptions": {
55
"noEmit": true,
6-
"skipLibCheck": true
6+
"skipLibCheck": true,
7+
"types": ["node", "mocha"]
78
}
89
}

0 commit comments

Comments
 (0)