fix(tsconfig): silence TS 7.0 baseUrl + rootDir deprecation warnings#472
Open
roiizchak wants to merge 1 commit intoheygen-com:mainfrom
Open
fix(tsconfig): silence TS 7.0 baseUrl + rootDir deprecation warnings#472roiizchak wants to merge 1 commit intoheygen-com:mainfrom
roiizchak wants to merge 1 commit intoheygen-com:mainfrom
Conversation
57f10a4 to
32995b5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TypeScript 7.0 deprecates the
baseUrlcompiler option unlessignoreDeprecations: "6.0"is set, and also flags tsconfigs whose computed common source directory differs from an explicitrootDir. Both conditions currently trigger warnings inpackages/cli/tsconfig.jsonandpackages/studio/tsconfig.json:packages/cli/tsconfig.json—baseUrldeprecation and "common source directory is '..'" becausepathsmaps@hyperframes/producerto../producer/src/index.ts, pulling the compiler's root above./src.packages/studio/tsconfig.json—baseUrldeprecation only (rootDir is already"..").The other six package tsconfigs (
core,engine,player,player/tests/perf,producer,shader-transitions) setrootDirexplicitly and don't usebaseUrl, so they don't trip either warning.Changes
packages/cli/tsconfig.json— addignoreDeprecations: "6.0"androotDir: ".."(matches studio's pattern; covers bothcli/srcand the resolvedpathstarget underpackages/):packages/studio/tsconfig.json— addignoreDeprecations: "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 leavesbaseUrl/pathsbehavior unchanged while silencing the warning until a future refactor is ready to droppathsin favor of bun workspace resolution.rootDir: ".."on the CLI matches the existing pattern inpackages/studio/tsconfig.json, and keeps the resolved@hyperframes/producerfile underrootDirso 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.No runtime changes. No output layout changes (CLI's actual emit is already relative to
./srcvia include pattern;rootDir: ".."only affects how TS computes error paths and does not alter emitted file locations when combined withinclude: ["src"]).