Skip to content

ROX-33304: Fix prerequisites to upgrade TypeScript 6.0#19161

Merged
pedrottimark merged 1 commit intomasterfrom
ROX-33304-tsconfig-TypeScript-6
Feb 24, 2026
Merged

ROX-33304: Fix prerequisites to upgrade TypeScript 6.0#19161
pedrottimark merged 1 commit intomasterfrom
ROX-33304-tsconfig-TypeScript-6

Conversation

@pedrottimark
Copy link
Contributor

Description

Objective: Because breaking changes for TypeScript 6.0 are compatible with TypeScript 5.9 and especially because no compile errors, fix prerequisites now so upgrade contribution in a few weeks will be easy.

https://devblogs.microsoft.com/typescript/announcing-typescript-6-0-beta/

TypeScript 6.0 is a unique release in that we intend for it to be the last release based on the current JavaScript codebase.

Most changes in TypeScript 6.0 are meant to help align and prepare for adopting TypeScript 7.0.

Configuration errors

tsconfig.json:9:5 - error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.

9     "baseUrl": "src",

tsconfig.json:20:25 - error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.

20     "moduleResolution": "node",

Configuration changes

https://devblogs.microsoft.com/typescript/announcing-typescript-6-0-beta/#breaking-changes-and-deprecations-in-typescript-6.0

  1. Delete deprecated baseUrl property.

    The baseUrl option is most-commonly used in conjunction with paths, and is typically used as a prefix for every value in paths. Unfortunately, baseUrl is also considered a look-up root for module resolution.

    In the best case, this also often leads to "worse-looking" paths that bundlers would ignore; but it often meant that that many import paths that would never have worked at runtime are considered "just fine" by TypeScript.

  2. Add paths property as declarative replacement for what baseUrl had done.

    Path mappings have not required specifying baseUrl for a long time, and in practice, most projects that use baseUrl only use it as a prefix for their paths entries. In TypeScript 6.0, baseUrl is deprecated and will no longer be considered a look-up root for module resolution.

    Developers who used baseUrl as a prefix for path-mapping entries can simply remove baseUrl and add the prefix to their paths entries.

  3. Replace module and moduleResolution properties to fix 36 occurrences of TS2307 error for dynamic import paths in Body.tsx file.

    Cannot find module 'x' or its corresponding type declarations

    improperly configured tsconfig.json path aliases

    Specifically, "moduleResolution": "bundler" which is accurate.

    Bonus "module": "es2020" is specific to what this project assumes.

  4. Add rootDir property.

    rootDir controls the directory structure of your output files relative to the output directory. Previously, if you did not specify a rootDir, it was inferred based on the common directory of all non-declaration input files. But this often meant that it was impossible to know if a file belonged to a project without trying to load and parse that project. It also meant that TypeScript had to spend more time inferring that common source directory by analyzing every file path in the program.

    Set "rootDir": "./src" if you were previously relying on this being inferred.

    Although TypeScript does not output files in this project, if I understand correctly, it might waste time inferring.

  5. Edit include property to simplify the path.

    Follow examples in documentation that I read to understand other changes.

User-facing documentation

  • CHANGELOG.md update is not needed
  • documentation PR is not needed

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

  1. npm run tsc in ui/apps/platform folder.
  2. npm run lint:fast-dev in ui/apps/platform folder.
  3. npm run start in ui/apps/platform folder with staging demo as central.
  4. npm build in ui/apps/platform folder.

@pedrottimark pedrottimark requested a review from a team as a code owner February 24, 2026 15:44
@rhacs-bot
Copy link
Contributor

Images are ready for the commit at f01e7b6.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-132-gf01e7b6f9b.

@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.52%. Comparing base (64a4705) to head (f01e7b6).
⚠️ Report is 37 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #19161    +/-   ##
========================================
  Coverage   49.52%   49.52%            
========================================
  Files        2670     2672     +2     
  Lines      201549   201667   +118     
========================================
+ Hits        99809    99875    +66     
- Misses      94289    94335    +46     
- Partials     7451     7457     +6     
Flag Coverage Δ
go-unit-tests 49.52% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pedrottimark
Copy link
Contributor Author

/test gke-ui-e2e-tests

Copy link
Contributor

@sachaudh sachaudh left a comment

Choose a reason for hiding this comment

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

LGTM

@pedrottimark pedrottimark merged commit 6645070 into master Feb 24, 2026
92 checks passed
@pedrottimark pedrottimark deleted the ROX-33304-tsconfig-TypeScript-6 branch February 24, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants