Skip to content

fix(tsconfig): silence TS 7.0 baseUrl + rootDir deprecation warnings#472

Open
roiizchak wants to merge 1 commit intoheygen-com:mainfrom
roiizchak:fix/tsconfig-ts7-deprecations
Open

fix(tsconfig): silence TS 7.0 baseUrl + rootDir deprecation warnings#472
roiizchak wants to merge 1 commit intoheygen-com:mainfrom
roiizchak:fix/tsconfig-ts7-deprecations

Conversation

@roiizchak
Copy link
Copy Markdown
Contributor

Summary

TypeScript 7.0 deprecates the baseUrl compiler option unless ignoreDeprecations: "6.0" is set, and also flags tsconfigs whose computed common source directory differs from an explicit rootDir. Both conditions currently trigger warnings in packages/cli/tsconfig.json and packages/studio/tsconfig.json:

  • packages/cli/tsconfig.jsonbaseUrl deprecation and "common source directory is '..'" because paths maps @hyperframes/producer to ../producer/src/index.ts, pulling the compiler's root above ./src.
  • packages/studio/tsconfig.jsonbaseUrl deprecation only (rootDir is already "..").

The other six package tsconfigs (core, engine, player, player/tests/perf, producer, shader-transitions) set rootDir explicitly and don't use baseUrl, so they don't trip either warning.

Changes

packages/cli/tsconfig.json — add ignoreDeprecations: "6.0" and rootDir: ".." (matches studio's pattern; covers both cli/src and the resolved paths target under packages/):

     "moduleResolution": "bundler",
+    "ignoreDeprecations": "6.0",
     "baseUrl": ".",
     "paths": {
       "@hyperframes/producer": ["../producer/src/index.ts"]
     },
     ...
     "outDir": "./dist",
-    "declaration": true
+    "declaration": true,
+    "rootDir": ".."
   },

packages/studio/tsconfig.json — add ignoreDeprecations: "6.0" only:

     "moduleResolution": "bundler",
+    "ignoreDeprecations": "6.0",
     "baseUrl": ".",
     "paths": {
       "@hyperframes/player": ["../player/src/hyperframes-player.ts"]
     },

Rationale

  • ignoreDeprecations: "6.0" is the canonical TypeScript escape valve suggested by the compiler itself in the deprecation message. It leaves baseUrl/paths behavior unchanged while silencing the warning until a future refactor is ready to drop paths in favor of bun workspace resolution.
  • Setting rootDir: ".." on the CLI matches the existing pattern in packages/studio/tsconfig.json, and keeps the resolved @hyperframes/producer file under rootDir so no TS6059 is introduced.

Test plan

  • bun install — clean.
  • bun run build — builds successfully with no new errors.
  • bunx oxlint packages/cli/tsconfig.json packages/studio/tsconfig.json — clean.
  • bunx oxfmt --check packages/cli/tsconfig.json packages/studio/tsconfig.json — clean.
  • Editor verification: both deprecation warnings disappear in VS Code / Cursor / any editor running TS ≥ 5.5 LS.

No runtime changes. No output layout changes (CLI's actual emit is already relative to ./src via include pattern; rootDir: ".." only affects how TS computes error paths and does not alter emitted file locations when combined with include: ["src"]).

@roiizchak roiizchak force-pushed the fix/tsconfig-ts7-deprecations branch from 57f10a4 to 32995b5 Compare April 24, 2026 09:52
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.

2 participants