Skip to content

feat(@schematics/angular): add migration to remove default Karma configurations #30896

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 13, 2025

Conversation

clydin
Copy link
Member

@clydin clydin commented Aug 13, 2025

Introduces a new migration that removes karma.conf.js files from projects if they contain only the default generated configuration. When a file is removed, the corresponding karmaConfig option in angular.json is also removed from the project's test target.

The Angular CLI now provides a default Karma configuration internally, making explicit configuration files unnecessary for projects that do not require customization. This migration helps to clean up and simplify existing projects by removing these now redundant files.

The migration will safely skip any karma.conf.js file that has been modified or contains values that cannot be reliably analyzed.

…igurations

Introduces a new migration that removes `karma.conf.js` files from projects if they contain only the default generated configuration. When a file is removed, the corresponding `karmaConfig` option in `angular.json` is also removed from the project's test target.

The Angular CLI now provides a default Karma configuration internally, making explicit configuration files unnecessary for projects that do not require customization. This migration helps to clean up and simplify existing projects by removing these now redundant files.

The migration will safely skip any `karma.conf.js` file that has been modified or contains values that cannot be reliably analyzed.
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release labels Aug 13, 2025
@alan-agius4 alan-agius4 merged commit 2e3cfd5 into angular:main Aug 13, 2025
31 checks passed
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: @schematics/angular detected: feature PR contains a feature commit 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