refactor(@angular/build): default tsConfig option in unit-test builder #31361
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.
The unit-test builder is updated to streamline the initial configuration by intelligently defaulting the
tsConfig
option.If the
tsConfig
option is not provided in the project's configuration, the builder now checks for the existence of atsconfig.spec.json
file in the project's root. If found, it is used automatically. This removes the need for boilerplatetsConfig
configuration inangular.json
for the majority of projects.Additionally, a validation check has been added to ensure that if a
tsConfig
path is specified, the file must exist. An actionable error is thrown if it is not found, preventing downstream build failures.The builder's schema has been updated to reflect these changes, making the
tsConfig
option optional and documenting the new behavior.