Skip to content

Conversation

clydin
Copy link
Member

@clydin clydin commented Feb 13, 2025

An application only variant of the karma builder found within the @angular-devkit/build-angular package is now available within the @angular/build package as @angular/build:karma. This builder will only use the application builder found within @angular/build and does not provide the builderMode option as application would be the only valid value. Testing behavior is effectively equivalent to using the @angular-devkit/build-angular:karma builder with the builderMode option set to application. However, several options have been adjusted:

  • builderMode was removed
  • fileReplacements legacy structure (src/replaceWith) removed
  • polyfills only accepts an array of strings
  • loader has been added
  • define has been added
  • externalDependencies has been added
  • sass sub-option for stylePreprocessorOptions has been added

From an implementation perspective, the test finding logic and the application builder integration have been moved to the @angular/build package and reused by the @angular-devkit/build-angular package via the private export of @angular/build.

Closes: #28809
Closes: #28321
Closes: #29185

@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: @angular/build labels Feb 13, 2025
@clydin clydin force-pushed the karma/build-package branch 6 times, most recently from 73f9331 to 2b0ad1a Compare February 14, 2025 16:45
@clydin clydin marked this pull request as ready for review February 14, 2025 18:48
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Feb 14, 2025
@clydin clydin force-pushed the karma/build-package branch 3 times, most recently from 63aebf3 to aee3fb5 Compare February 14, 2025 19:39
@alan-agius4
Copy link
Collaborator

alan-agius4 commented Feb 14, 2025

The new builder should be added in https://github.com/angular/angular-cli/blob/main/packages/angular/cli/lib/config/workspace-schema.json as well.

An `application` only variant of the `karma` builder found within the
`@angular-devkit/build-angular` package is now available within the
`@angular/build` package as `@angular/build:karma`. This builder will
only use the `application` builder found within `@angular/build` and
does not provide the `builderMode` option as `application` would be the
only valid value. Testing behavior is effectively equivalent to using the
`@angular-devkit/build-angular:karma` builder with the `builderMode`
option set to `application`. However, several options have been adjusted:
* `builderMode` was removed
* `fileReplacements` legacy structure (`src`/`replaceWith`) removed
* `polyfills` only accepts an array of strings
* `loader` has been added
* `define` has been added
* `externalDependencies` has been added
@clydin clydin force-pushed the karma/build-package branch from aee3fb5 to a7ade01 Compare February 14, 2025 22:36
@clydin clydin added the target: minor This PR is targeted for the next minor release label Feb 14, 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 Feb 18, 2025
@clydin clydin merged commit 11fab9c into angular:main Feb 18, 2025
32 checks passed
@clydin clydin deleted the karma/build-package branch February 18, 2025 11:28
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

3 participants