Skip to content

refactor(@angular/build): unify configuration loading and option transformations in TypeScriptCompilation - #34007

Merged
clydin merged 1 commit into
angular:mainfrom
clydin:refactor/unify-configuration-loading
Sep 3, 2026
Merged

refactor(@angular/build): unify configuration loading and option transformations in TypeScriptCompilation#34007
clydin merged 1 commit into
angular:mainfrom
clydin:refactor/unify-configuration-loading

Conversation

@clydin

@clydin clydin commented Sep 3, 2026

Copy link
Copy Markdown
Member

Both AotCompilation and JitCompilation previously executed identical logic during initialization to read tsconfig.json using readConfiguration and immediately pass the options to transformCompilerOptions.

The loadConfiguration method on TypeScriptCompilation now accepts optional compilerOptionOverrides and applies transformCompilerOptions directly. This unifies configuration reading and option transformations into a single cohesive step, eliminates duplicate setup boilerplate across AotCompilation and JitCompilation, and reduces unnecessary direct imports of transformCompilerOptions.

…sformations in TypeScriptCompilation

Both AotCompilation and JitCompilation previously executed identical logic during initialization to read tsconfig.json using readConfiguration and immediately pass the options to transformCompilerOptions.

The loadConfiguration method on TypeScriptCompilation now accepts optional compilerOptionOverrides and applies transformCompilerOptions directly. This unifies configuration reading and option transformations into a single cohesive step, eliminates duplicate setup boilerplate across AotCompilation and JitCompilation, and reduces unnecessary direct imports of transformCompilerOptions.
@clydin clydin added the target: minor This PR is targeted for the next minor release label Sep 3, 2026

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request refactors the TypeScript compilation process by centralizing the compiler option transformation logic inside the base TypeScriptCompilation class's loadConfiguration method. This simplifies the AotCompilation and JitCompilation subclasses, which previously handled this transformation separately. Additionally, a new unit test has been added to verify that configuration loading and compiler option transformations function correctly. I have no feedback to provide as the changes are clean and well-tested.

@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Sep 3, 2026
@clydin
clydin merged commit 14c54b3 into angular:main Sep 3, 2026
42 checks passed
@clydin

clydin commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

This PR was merged into the repository. The changes were merged into the following branches:

@clydin
clydin deleted the refactor/unify-configuration-loading branch September 3, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/build target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants