Skip to content

chore: Upgrade to TypeScript 6.0#19435

Draft
logaretm wants to merge 8 commits intodevelopfrom
awad/upgrade-to-TS-6
Draft

chore: Upgrade to TypeScript 6.0#19435
logaretm wants to merge 8 commits intodevelopfrom
awad/upgrade-to-TS-6

Conversation

@logaretm
Copy link
Member

@logaretm logaretm commented Feb 19, 2026

Upgrades the SDK's TypeScript version from ~5.8.0 to ^6.0.0-beta. TypeScript 6 surfaces all the deprecations that will become hard errors in TypeScript 7 (the Go-compiled rewrite), so fixing them now gives us a smooth migration path when v7 ships.

You can check the official migration guide that I followed here.

Changes

base tsconfig (packages/typescript/tsconfig.json)

  • Remove deprecated options: alwaysStrict, downlevelIteration
  • Add "DOM" to lib and "node" to types

rootDir across all packages

  • Add explicit rootDir to every tsconfig that has outDir. TS 6 requires this to be set explicitly
  • Most packages use "./src", dev-packages with source outside src/ use "."

baseDir deprecation

baseDir is deprecated, but it doesn't affect us much. The only affected package is ember and was fixed by converting the paths to relative paths.

Several Type Fixes

  • A few types have become stricter like the BodyInit.
  • Several @ts-expect-error are no longer necessary.

Set moduleResolution to bundler

Since node has been deprecated, we needed to switch to another resolution strategy that fits what we do here. The best value that fits is bundler but it means we can't import from src like we did.

So I updated some packages to export the types that other packages need, which is nice because it means we no longer depend on the output folder structure of the packages, but rather what the modules export.

Angular compatibility

  • Inline all compiler options into tsconfig.ngc.json (removing extends chain) because ng-packagr ships its own older TypeScript that rejects "moduleResolution": "bundler" when parsing the base config

@github-actions
Copy link
Contributor

github-actions bot commented Feb 19, 2026

size-limit report 📦

Path Size % Change Change
@sentry/browser 25.61 kB - -
@sentry/browser - with treeshaking flags 24.12 kB - -
@sentry/browser (incl. Tracing) 42.42 kB - -
@sentry/browser (incl. Tracing, Profiling) 47.08 kB - -
@sentry/browser (incl. Tracing, Replay) 81.24 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 70.86 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 85.93 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 98.09 kB - -
@sentry/browser (incl. Feedback) 42.33 kB - -
@sentry/browser (incl. sendFeedback) 30.28 kB - -
@sentry/browser (incl. FeedbackAsync) 35.28 kB - -
@sentry/browser (incl. Metrics) 26.78 kB - -
@sentry/browser (incl. Logs) 26.92 kB - -
@sentry/browser (incl. Metrics & Logs) 27.6 kB - -
@sentry/react 27.37 kB - -
@sentry/react (incl. Tracing) 44.76 kB - -
@sentry/vue 30.06 kB - -
@sentry/vue (incl. Tracing) 44.26 kB - -
@sentry/svelte 25.64 kB - -
CDN Bundle 28.16 kB - -
CDN Bundle (incl. Tracing) 43.25 kB - -
CDN Bundle (incl. Logs, Metrics) 29 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 44.09 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 68.08 kB - -
CDN Bundle (incl. Tracing, Replay) 80.12 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 80.99 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 85.56 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 86.46 kB - -
CDN Bundle - uncompressed 82.33 kB - -
CDN Bundle (incl. Tracing) - uncompressed 128.05 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 85.17 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 130.88 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 208.83 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 244.93 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 247.75 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 257.73 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 260.54 kB - -
@sentry/nextjs (client) 47.17 kB - -
@sentry/sveltekit (client) 42.88 kB - -
@sentry/node-core 52.18 kB +0.02% +8 B 🔺
@sentry/node 166.54 kB +0.01% +7 B 🔺
@sentry/node - without tracing 93.97 kB +0.02% +10 B 🔺
@sentry/aws-serverless 109.47 kB +0.01% +8 B 🔺

View base workflow run

@github-actions
Copy link
Contributor

github-actions bot commented Feb 19, 2026

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 8,846 - 11,549 -23%
GET With Sentry 1,576 18% 1,938 -19%
GET With Sentry (error only) 6,066 69% 7,584 -20%
POST Baseline 1,178 - 1,183 -0%
POST With Sentry 568 48% 591 -4%
POST With Sentry (error only) 1,048 89% 1,052 -0%
MYSQL Baseline 3,178 - 3,994 -20%
MYSQL With Sentry 427 13% 563 -24%
MYSQL With Sentry (error only) 2,575 81% 3,251 -21%

View base workflow run

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

Comments