feat(custom-webpack)!: remove Karma builder and tests (Angular 22 removes Karma)#2260
feat(custom-webpack)!: remove Karma builder and tests (Angular 22 removes Karma)#2260just-jeb wants to merge 1 commit into
Conversation
…oves Karma) Angular 22 removes the Karma test builder entirely. The custom-webpack `:karma` builder wraps `@angular-devkit/build-angular:karma`, which will not exist in v22, so it is removed here along with its example-app test fixtures, integration tests, and documentation. BREAKING CHANGE: The `@angular-builders/custom-webpack:karma` builder has been removed. Angular 22 no longer ships a Karma builder. Migrate your `ng test` target to a supported test runner (e.g. Vitest / Web Test Runner or `@angular-builders/jest`).
- spec §12: Karma deprecated-not-removed in v22; drop custom-webpack @22 migration + hold #2260; add jest Vitest→Jest path; add custom-esbuild webpack-build guard; fix e2e fixtures - spec §4.3/§5: custom-webpack ng-add-only; v22 breaking set = #2191+#2212 - 2c/2d checklist: #2260 off the v22 holds, Karma fixture via ng new, e2e cases
Holding this PR — Angular 22 does not remove KarmaRe-checked against the actual Angular
Removing Action: converting to draft and holding until the major where Angular actually removes Karma (re-evaluate at that cut). The v22 schematics design has been amended accordingly (custom-webpack ships Sources: angular.dev/guide/testing/migrating-to-vitest · angular.dev/reference/releases · angular-cli commit 8654b3f. |
- spec §12: Karma deprecated-not-removed in v22; drop custom-webpack @22 migration + hold #2260; add jest Vitest→Jest path; add custom-esbuild webpack-build guard; fix e2e fixtures - spec §4.3/§5: custom-webpack ng-add-only; v22 breaking set = #2191+#2212 - 2c/2d checklist: #2260 off the v22 holds, Karma fixture via ng new, e2e cases
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
@angular-builders/custom-webpackships a:karmabuilder that wraps@angular-devkit/build-angular:karma. The package also carries Karma/Jasmineexample-app test fixtures (
karma.conf.js/karma.conf.cjs,testtargets inangular.json, karma/jasmine devDependencies, puppeteer), Karma integrationtests, an
e2eschema spec, and Karma documentation.Issue Number: N/A
What is the new behavior?
The Karma builder and everything supporting it in
custom-webpackare removed:src/karma/(builder + schema extension), removed thekarmaentryfrom
builders.json, the karma scheme fromsrc/schemes.ts, and theexport * from './karma'fromsrc/index.ts.e2e/custom-webpack-karma-schema.spec.tsschema test and theKarma documentation section from the package
README.md..gitignoreline.sanity-app,sanity-app-esm,full-cycle-app): deletedkarma.conf.*, removed thetest(karma) targetfrom
angular.json, removed the karma/jasmine devDependencies pluspuppeteer(these apps only used puppeteer for Karma), removed the karmatestnpm script, and removed Karma mentions from their READMEs.custom-webpack: Karma ...integration tests frompackages/custom-webpack/tests/integration.js.packages/custom-webpack/AGENTS.md,examples/AGENTS.md) to drop Karma references.The
custom-esbuildapps are untouched (they keep puppeteer and their unit-testbuilder), and the CI
PUPPETEER_SKIP_DOWNLOADenv / runner pinning from #2259 isleft as-is.
Verification:
yarn install --immutablepasses,yarn workspace @angular-builders/custom-webpack buildsucceeds (tsc + merge-schemes produceonly browser/server/dev-server/extract-i18n schemas, no karma), and
node scripts/discover-tests.jslists nocustom-webpack: Karmatests.Does this PR introduce a breaking change?
The
@angular-builders/custom-webpack:karmabuilder is removed. Angular 22 nolonger ships a Karma builder (
@angular-devkit/build-angular:karmais gone), sothe wrapper cannot continue to exist. Users on a
testtarget using@angular-builders/custom-webpack:karmamust migrate to a supported test runner(Vitest / Web Test Runner, or
@angular-builders/jest).Other information
This is a v22-targeted breaking change to be merged only once Angular 22 is
released. Karma is removed upstream in Angular 22. A Vitest / Web Test Runner
replacement is tracked in #1928.