CDP-5980: upgrade TypeScript to 6.0 and modernize tsconfig#207
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
There was a problem hiding this comment.
Pull request overview
Toolchain-only upgrade that moves TypeScript from 5.9.3 to 6.0.3, modernizes tsconfig.json for Node16 module resolution, bumps @typescript-eslint to 8.60.0, and aligns CI action versions in main.yml with publish.yml. No lib/ runtime source is changed, so risk is confined to compile/lint/test/CI behavior; the published artifact remains CommonJS (no "type" field; module: node16 falls back to CJS emit when package.json is not ESM).
Changes:
- Upgrade TypeScript and related
@typescript-eslintpackages; regenerate lockfile. - Modernize
tsconfig.json: switchmodule/moduleResolutiontonode16, drop deprecated/unusedalwaysStrict/baseUrl/paths, and add explicittypes: ["node"]. - Bump
actions/checkoutandactions/setup-nodetov6in.github/workflows/main.ymlto matchpublish.yml.
Reviewed changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
tsconfig.json |
Switches to node16 module/resolution, removes legacy options, pins explicit types: ["node"]. |
package.json |
Bumps typescript to ^6.0.3 and @typescript-eslint/* to ^8.60.0. |
package-lock.json |
Regenerated lockfile reflecting the dependency bumps and transitive updates. |
.github/workflows/main.yml |
Updates actions/checkout and actions/setup-node from v4 to v6. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@senechko can we go even further to typescript 7 here? |
|
TypeScript 7 doesn't exist on npm yet — 6.0.3 is the latest major version. It's the one with the native Go compiler (tsgo) that the ticket references. We'll bump again when 7 lands. |
Upgrade from TypeScript 5.9 to 6.0.3 for stricter checks and access to the native Go-based compiler (tsgo). Modernize tsconfig to replace deprecated options: switch module/moduleResolution from commonjs/node to node16, remove unused baseUrl/paths, and add explicit types: ["node"] since TS 6 no longer auto-includes @types packages. Also bumps @typescript-eslint to 8.60.0 and aligns CI action versions to v6 in main.yml. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
a708967 to
bb30cba
Compare
Summary
tsconfig.json: replace deprecatedmoduleResolution: "node"withnode16, remove unusedbaseUrl/paths, add explicittypes: ["node"](TS 6 no longer auto-includes@types/*)@typescript-eslint/parserand@typescript-eslint/eslint-pluginto 8.60.0main.ymlto v6 (matchingpublish.yml)nycwithc8for code coverage (merged from CDP-5980: replace nyc with c8 for code coverage #209) — c8 uses V8 native coverage; includesyargs@18override for Node 26 compatibilityTest plan
npm run build— tsc compiles without errors, output is CJSnpm run lint— ESLint type-aware rules passnpm test— all 163 tests pass with 100% coverage (c8)dist/index.js— still emits CommonJS format🤖 Generated with Claude Code