build: upgrade to typescript 6#1424
Conversation
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/browser size report |
|
@launchdarkly/js-client-sdk size report |
5a372d8 to
afad83f
Compare
7cdd3b4 to
85454a3
Compare
85454a3 to
6e50860
Compare
|
@launchdarkly/js-client-sdk-common size report |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 462a5a2. Configure here.
This PR will update all of the configuration files (
package.json,jest.config.js, andtsconfig.json) to use typescript 6.There shouldn't be any implementation changes here as all implementation at this point should conform nicely with the new typescript version.
Note
Medium Risk
Wide toolchain change across every package can alter emitted declarations, module resolution, and CI
check/buildbehavior even without application code edits; verify full monorepo build and tests.Overview
Upgrades the monorepo from TypeScript 5.1.6 to 6.0.3 across the root and workspace packages, with matching updates to Jest/ts-jest and tsconfig settings so
tsc, tests, and bundlers still work under TS 6.Compiler config is adjusted for TS 6 defaults and stricter resolution:
moduleResolutionmoves from legacynodetobundler(most browser/edge/tsup packages) ornode16(Node CJS packages likeserver-node, stores, and several examples). Several packages switchmodulefromcommonjstoESNextornode16, bumplibtowardes2020, and addignoreDeprecations:"6.0"where needed. Explicittypesfor Jest/Node are added in many tsconfigs.Jest: root
jest.config.jsconfigures ts-jest withmodule: 'CommonJS'for tests. Package jest configs are mostly reformatted; React-related jest ts-jest options are simplified.Build tooling: React SDK adds
tsconfig.build.json(extends main config with deprecation ignores) and points tsup at it for DTS generation. Shopify Oxygen contract-tests set tsupdts: false. Server-AI example tsconfigs gainrootDir/outDirand bundler resolution. The hello-react example bumps@types/react/@types/react-domto v19.Reviewed by Cursor Bugbot for commit 462a5a2. Bugbot is set up for automated code reviews on this repo. Configure here.