Skip to content

build: upgrade to typescript 6#1424

Open
joker23 wants to merge 4 commits into
mainfrom
skz/sdk-2193/typescript-6
Open

build: upgrade to typescript 6#1424
joker23 wants to merge 4 commits into
mainfrom
skz/sdk-2193/typescript-6

Conversation

@joker23

@joker23 joker23 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

This PR will update all of the configuration files (package.json, jest.config.js, and tsconfig.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 monorepo compiler and module-resolution changes can shift emitted JS/types and break CI builds even without source edits; risk is tooling/regression across many packages rather than product logic.

Overview
Upgrades the entire monorepo from TypeScript 5.1.6 to 6.0.3 by pinning typescript in the root and workspace package.json files. There are no SDK implementation changes—only toolchain configuration.

tsconfig.json updates align with TS 6’s stricter module rules: many browser/edge/bundler packages move from moduleResolution: "node" to bundler, while Node-oriented packages (server-node, sdk-server, stores, telemetry, etc.) adopt module: "node16" with moduleResolution: "node16". Several configs add ignoreDeprecations: "6.0", explicit types for Jest/Node, and lib bumps (e.g. es6es2020).

Jest / build tweaks: root jest.config.js passes ts-jest a tsconfig override with module: CommonJS for tests; many jest.config.json files are reformatted only. @launchdarkly/react-sdk adds tsconfig.build.json with ignoreDeprecations and points tsup at it for DTS generation. Shopify Oxygen contract-tests disable dts in tsup. hello-react bumps @types/react to v19 (types only).

Examples: server-ai example tsconfigs gain rootDir/outDir and bundler resolution; Next.js examples use node16 resolution and drop baseUrl where shown in the diff.

Reviewed by Cursor Bugbot for commit b34e511. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 26365 bytes
Compressed size limit: 29000
Uncompressed size: 129044 bytes

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 179504 bytes
Compressed size limit: 200000
Uncompressed size: 831427 bytes

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 32027 bytes
Compressed size limit: 34000
Uncompressed size: 114248 bytes

@joker23 joker23 force-pushed the skz/sdk-2193/typescript-6 branch from 5a372d8 to afad83f Compare June 9, 2026 14:09
@joker23 joker23 force-pushed the skz/sdk-2193/typescript-6 branch 3 times, most recently from 85454a3 to 6e50860 Compare June 24, 2026 16:18
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 38781 bytes
Compressed size limit: 39000
Uncompressed size: 212361 bytes

@joker23

joker23 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

@joker23 joker23 marked this pull request as ready for review June 25, 2026 20:37
@joker23 joker23 requested a review from a team as a code owner June 25, 2026 20:37

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

@joker23 joker23 force-pushed the skz/sdk-2193/typescript-6 branch from 462a5a2 to d5e8b12 Compare July 6, 2026 13:38
devin-ai-integration[bot]

This comment was marked as resolved.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 4 new potential issues.

View 6 additional findings in Devin Review.

Open in Devin Review

"lib": ["es6", "dom"],
"module": "ES6",
"moduleResolution": "node",
"moduleResolution": "node16",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Module resolution setting is incompatible with module format in several test and example configs, likely breaking compilation

The module resolution strategy is set to node16 (moduleResolution: "node16" at packages/sdk/react-native/tsconfig.test.json:7) while the module format remains ES6, so TypeScript will reject the configuration because node16 resolution requires the module format to also be node16 or nodenext.

Impact: TypeScript compilation will fail for React Native tests with a configuration error.

Inconsistent migration across the PR — some configs were updated correctly, others were not

The PR correctly pairs module: "node16" with moduleResolution: "node16" in several configs (e.g., packages/sdk/server-node/tsconfig.json:8, packages/shared/sdk-server/tsconfig.json:7, packages/sdk/electron/contract-tests/entity/tsconfig.json:4). However, the following configs were changed to moduleResolution: "node16" without updating module to match:

  • packages/sdk/react-native/tsconfig.test.jsonmodule: "ES6"
  • packages/sdk/react-native/example/e2e/tsconfig.jsonmodule: "ES6"
  • packages/sdk/svelte/tsconfig.test.jsonmodule: "ES6"
  • packages/sdk/akamai-edgekv/example/tsconfig.jsonmodule: "es2015"
  • packages/sdk/vercel/examples/complete/tsconfig.jsonmodule: "esnext"
  • packages/sdk/vercel/examples/route-handler/tsconfig.jsonmodule: "esnext"
  • packages/tooling/contract-test-utils/tsconfig.jsonmodule: "ESNext"
Prompt for agents
Seven tsconfig.json files were changed to use moduleResolution: node16 without also updating the module setting to be compatible. The moduleResolution: node16 option requires module to be node16 or nodenext. Either change module to node16/nodenext in these files, or use moduleResolution: bundler instead (as was done in many other configs in this same PR). The affected files are:

1. packages/sdk/react-native/tsconfig.test.json (module: ES6)
2. packages/sdk/react-native/example/e2e/tsconfig.json (module: ES6)
3. packages/sdk/svelte/tsconfig.test.json (module: ES6)
4. packages/sdk/akamai-edgekv/example/tsconfig.json (module: es2015)
5. packages/sdk/vercel/examples/complete/tsconfig.json (module: esnext)
6. packages/sdk/vercel/examples/route-handler/tsconfig.json (module: esnext)
7. packages/tooling/contract-test-utils/tsconfig.json (module: ESNext)

For test configs that are only used by ts-jest, moduleResolution: bundler may be the better choice. For the Vercel Next.js examples, either bundler or updating module to nodenext would work.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

"rootDir": ".",
"sourceMap": false,
"moduleResolution": "node"
"moduleResolution": "node16"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Module resolution setting is incompatible with module format in the Akamai EdgeKV example, likely breaking compilation

The module resolution strategy is set to node16 (moduleResolution: "node16" at packages/sdk/akamai-edgekv/example/tsconfig.json:9) while the module format remains es2015, so TypeScript will reject the configuration because node16 resolution requires the module format to also be node16 or nodenext.

Impact: TypeScript compilation will fail for the Akamai EdgeKV example project with a configuration error.

The original config used moduleResolution: node which was compatible with module: es2015

The base commit had moduleResolution: "node" paired with module: "es2015", which is a valid combination. The PR changed only moduleResolution to "node16" without updating module, breaking the pairing.

Suggested change
"moduleResolution": "node16"
"moduleResolution": "bundler"
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "node16",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Module resolution setting is incompatible with module format in the Vercel complete example, likely breaking compilation

The module resolution strategy is set to node16 (moduleResolution: "node16" at packages/sdk/vercel/examples/complete/tsconfig.json:12) while the module format remains esnext, so TypeScript will reject the configuration because node16 resolution requires the module format to also be node16 or nodenext.

Impact: TypeScript compilation will fail for the Vercel complete example project with a configuration error.

The original config used moduleResolution: node which was compatible with module: esnext

The base commit had moduleResolution: "node" paired with module: "esnext", which is a valid combination. The PR changed only moduleResolution to "node16" without updating module, breaking the pairing.

Suggested change
"moduleResolution": "node16",
"moduleResolution": "bundler",
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

"module": "ESNext",
"moduleResolution": "node",
"types": ["node"],
"moduleResolution": "node16",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Module resolution setting is incompatible with module format in the contract-test-utils, likely breaking compilation

The module resolution strategy is set to node16 (moduleResolution: "node16" at packages/tooling/contract-test-utils/tsconfig.json:9) while the module format remains ESNext, so TypeScript will reject the configuration because node16 resolution requires the module format to also be node16 or nodenext.

Impact: TypeScript compilation will fail for the contract test utilities with a configuration error.

The original config used moduleResolution: node which was compatible with module: ESNext

The base commit had moduleResolution: "node" paired with module: "ESNext", which is a valid combination. The PR changed only moduleResolution to "node16" without updating module, breaking the pairing.

Suggested change
"moduleResolution": "node16",
"moduleResolution": "bundler",
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant