Skip to content

Commit 500249d

Browse files
build(js): upgrade TypeScript to 6.0 (both clients) (#346)
build(js): upgrade TypeScript to 6.0 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>
1 parent 8b10f78 commit 500249d

9 files changed

Lines changed: 467 additions & 460 deletions

File tree

clients/js-legacy/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"mocha": "^11.7.6",
5858
"prettier": "^3.8.3",
5959
"shx": "^0.4.0",
60-
"typescript": "^5.7.2",
60+
"typescript": "^6.0.3",
6161
"start-server-and-test": "^3.0.5",
6262
"ts-node": "^10.9.2",
6363
"typescript-eslint": "^8.60.0"

clients/js-legacy/pnpm-lock.yaml

Lines changed: 54 additions & 54 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/js-legacy/tsconfig.base.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
"noEmitOnError": true,
1010
"resolveJsonModule": true,
1111
"strict": true,
12-
"stripInternal": true
12+
"stripInternal": true,
13+
"ignoreDeprecations": "6.0",
14+
"lib": ["ES2020", "DOM"],
15+
"types": ["node"]
1316
}
1417
}

clients/js-legacy/tsconfig.cjs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"outDir": "lib/cjs",
88
"target": "ES2016",
99
"module": "CommonJS",
10-
"sourceMap": true
10+
"sourceMap": true,
11+
"rootDir": "./src"
1112
}
1213
}

clients/js-legacy/tsconfig.esm.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"module": "ES2020",
1111
"sourceMap": true,
1212
"declaration": true,
13-
"declarationMap": true
13+
"declarationMap": true,
14+
"rootDir": "./src"
1415
}
1516
}

clients/js-legacy/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
],
77
"compilerOptions": {
88
"noEmit": true,
9-
"skipLibCheck": true
9+
"skipLibCheck": true,
10+
"types": ["node", "mocha"]
1011
}
1112
}

clients/js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"rimraf": "^6.1.3",
5858
"tsup": "^8.5.1",
5959
"typedoc": "^0.28.19",
60-
"typescript": "^5.9.3",
60+
"typescript": "^6.0.3",
6161
"vitest": "^4.0.15"
6262
},
6363
"peerDependencies": {

0 commit comments

Comments
 (0)