Skip to content

Conversation

clydin
Copy link
Member

@clydin clydin commented Sep 11, 2025

The main application_builder.ts file was becoming too large and difficult to navigate. This change extracts several logical components into their own dedicated files:

  • Karma asset middleware
  • Karma polyfills plugin
  • Karma progress reporter
  • Code coverage utilities
  • Karma configuration helpers
  • General utility functions

This improves the overall code structure, making it easier to understand, test, and maintain.

…ler modules

The main `application_builder.ts` file was becoming too large and difficult to navigate. This change extracts several logical components into their own dedicated files:

- Karma asset middleware
- Karma polyfills plugin
- Karma progress reporter
- Code coverage utilities
- Karma configuration helpers
- General utility functions

This improves the overall code structure, making it easier to understand, test, and maintain.
The main `initializeApplication` function within the Karma builder was overly large and handled several distinct responsibilities. This change refactors the function by breaking it down into three smaller, more focused functions:

- `setupBuildOptions`: Gathers and configures the esbuild build options.
- `runEsbuild`: Executes the esbuild build process.
- `configureKarma`: Sets up the Karma configuration based on the build output.

This decomposition improves the readability, testability, and maintainability of the Karma builder's application initialization process.
@clydin clydin added the target: major This PR is targeted for the next major release label Sep 11, 2025
@clydin clydin marked this pull request as ready for review September 11, 2025 18:28
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Sep 11, 2025
@clydin clydin added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Sep 11, 2025
@clydin clydin merged commit d47386e into angular:main Sep 11, 2025
36 checks passed
@clydin clydin deleted the karma/builder-refactor branch September 11, 2025 19:12
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: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants