chore: migrate to typescript 6 - #102
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d6425fe53f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 442c5893eb
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 826cae4abb
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a9fdd3c7ed
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "@commitlint/config-conventional": "^12.1.4", | ||
| "@microsoft/api-documenter": "^7.13.33", | ||
| "@microsoft/api-extractor": "^7.18.4", | ||
| "@microsoft/api-documenter": "^7.30.10", |
There was a problem hiding this comment.
Keep API Documenter compatible with Node 18.18
On Node 18.18.x, which the package still advertises via engines.node, a Yarn 1 install remains blocked because this API Documenter upgrade locks @rushstack/node-core-library@5.23.3, whose engine range starts at Node 18.20.3. The minimatch override from the earlier fix does not address this fresh lockfile dependency, so either retain a Documenter graph compatible with 18.18 or raise the declared Node minimum.
Useful? React with 👍 / 👎.
Description
Migrates the project to TypeScript 6.0.3 while keeping production runtime behavior unchanged. Supporting tools that consume TypeScript syntax, types, or compiler APIs were upgraded, while broader source and module-resolution cleanup is deferred to a follow-up PR.
Changes by file
package.jsontypescriptfrom 5.5 to 6.0.3.karma-typescriptandkarma-typescript-es6-transformwithkarma-esbuild,esbuild, and Istanbul instrumentation.--localtodocs:extractbecause the documentation workflow regenerates its API report on each run.Rollup and unrelated dependencies remain unchanged because the existing production build works with TypeScript 6.
yarn.lockRegenerated with Yarn 1.22.22 to lock TypeScript 6.0.3 and the compatible Jest, ESLint, API documentation, esbuild, and Karma dependency graphs.
tsconfig.jsonAdded
ignoreDeprecations: "6.0"to preserve the existingmoduleResolution: "node"andbaseUrlbehavior.Switching directly to
moduleResolution: "bundler"exposed declaration-resolution failures in existing Webex dependencies whoseexportsmaps do not expose their type files. Modern module resolution and removal ofbaseUrlare deferred to a follow-up PR to keep this migration focused.jest.config.jsChanged the configuration JSDoc type from a ts-jest internal type to Jest's public
Configtype. The old internal type path is not part of the ts-jest 29 public API.The existing
ts-jestpreset and test behavior remain unchanged..eslintrc.jsjest/allpreset that would otherwise require unrelated test-style rewrites.jest/unbound-methodbecause it requires type-aware ESLint parser services, which this repository does not currently configure.These compatibility exceptions allow the parser and plugins to support TypeScript 6 without expanding this PR into a lint-policy cleanup.
karma.conf.jskarma-esbuild.This was required because
karma-typescriptproduced CommonJS output under TypeScript 6 that failed in Chrome withexports is not defined.src/peer-connection.spec.tsReplaced
MockedObjectDeepimported from ts-jest with the repository's existingMaybeMockedDeeptype.ts-jest 29 no longer exports the old type, and using the local helper removes coupling to ts-jest internals without changing mock behavior.
src/peer-connection-utils.spec.tsUpdated the fake
RTCSessionDescriptionso itstoJSON()method returns a validRTCSessionDescriptionInit.TypeScript 6's DOM declarations reject the previous
undefinedreturn value. This change only corrects the test stub contract.Deferred follow-up
bundlermodule resolution.baseUrlconfiguration.Validation
yarn install --frozen-lockfileyarn tsc --versionreports 6.0.3yarn transpile:validateyarn test:lintyarn test:prettieryarn test:unit --runInBand(8 suites, 134 tests)yarn test:coverage --runInBand(8 suites, 134 tests)yarn buildyarn docsyarn test:integration:chrome(5 tests)The build generated the ESM, CommonJS, UMD, minified UMD, and declaration outputs successfully. Chrome integration coverage remained mapped to the production TypeScript source files.
API Extractor still reports the repository's existing TSDoc warnings. Its latest release also advises that its bundled TypeScript 5.9 engine is older than the project compiler. Both warnings are non-fatal.
This change implements...
Is this a breaking change?
I certify that...
Generative AI (GAI) Usage Disclosure
Reference: Cisco GAI Coding Guidelines
If a GAI tool/IDE was used then select the category that best describes GAI usage in this PR:
Additional GAI Usage Details (Optional):
GitHub Copilot was used to draft and validate the TypeScript and supporting toolchain migration.