Skip to content

feat(custom-webpack)!: remove Karma builder and tests (Angular 22 removes Karma)#2260

Draft
just-jeb wants to merge 1 commit into
masterfrom
feat/remove-karma-v22
Draft

feat(custom-webpack)!: remove Karma builder and tests (Angular 22 removes Karma)#2260
just-jeb wants to merge 1 commit into
masterfrom
feat/remove-karma-v22

Conversation

@just-jeb
Copy link
Copy Markdown
Owner

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[x] Documentation content changes
[x] Other... Please describe: Removal of a deprecated/unsupported builder ahead of Angular 22

What is the current behavior?

@angular-builders/custom-webpack ships a :karma builder that wraps
@angular-devkit/build-angular:karma. The package also carries Karma/Jasmine
example-app test fixtures (karma.conf.js / karma.conf.cjs, test targets in
angular.json, karma/jasmine devDependencies, puppeteer), Karma integration
tests, an e2e schema spec, and Karma documentation.

Issue Number: N/A

What is the new behavior?

The Karma builder and everything supporting it in custom-webpack are removed:

  • Deleted src/karma/ (builder + schema extension), removed the karma entry
    from builders.json, the karma scheme from src/schemes.ts, and the
    export * from './karma' from src/index.ts.
  • Deleted the e2e/custom-webpack-karma-schema.spec.ts schema test and the
    Karma documentation section from the package README.md.
  • Removed the karma-specific .gitignore line.
  • For the three custom-webpack example apps (sanity-app, sanity-app-esm,
    full-cycle-app): deleted karma.conf.*, removed the test (karma) target
    from angular.json, removed the karma/jasmine devDependencies plus
    puppeteer (these apps only used puppeteer for Karma), removed the karma
    test npm script, and removed Karma mentions from their READMEs.
  • Removed the custom-webpack: Karma ... integration tests from
    packages/custom-webpack/tests/integration.js.
  • Updated intent-layer docs (packages/custom-webpack/AGENTS.md,
    examples/AGENTS.md) to drop Karma references.

The custom-esbuild apps are untouched (they keep puppeteer and their unit-test
builder), and the CI PUPPETEER_SKIP_DOWNLOAD env / runner pinning from #2259 is
left as-is.

Verification: yarn install --immutable passes, yarn workspace @angular-builders/custom-webpack build succeeds (tsc + merge-schemes produce
only browser/server/dev-server/extract-i18n schemas, no karma), and
node scripts/discover-tests.js lists no custom-webpack: Karma tests.

Does this PR introduce a breaking change?

[x] Yes
[ ] No

The @angular-builders/custom-webpack:karma builder is removed. Angular 22 no
longer ships a Karma builder (@angular-devkit/build-angular:karma is gone), so
the wrapper cannot continue to exist. Users on a test target using
@angular-builders/custom-webpack:karma must 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.

…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`).
just-jeb added a commit that referenced this pull request Jun 2, 2026
- 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
@just-jeb
Copy link
Copy Markdown
Owner Author

just-jeb commented Jun 2, 2026

Holding this PR — Angular 22 does not remove Karma

Re-checked against the actual Angular 22.0.0-rc.3 install and Angular's published roadmap, and the premise behind this PR ("Angular 22 removes Karma") doesn't hold:

  • The karma builder still ships in both @angular/build and @angular-devkit/build-angular in v22 — not flagged deprecated/hidden in builders.json. ng new flips the default runner to Vitest but still offers --test-runner karma; the Vitest unit-test builder is still [EXPERIMENTAL].
  • ng update to v22 keeps existing Karma users on Karma (migrates the test builder to @angular/build:karma; does not delete karma.conf/test.ts or switch to Vitest). Vitest is opt-in via ng generate @angular/core:karma-to-vitest.
  • Karma is deprecated, with security-only support continuing ~12 months after Vitest is marked stable (that clock hasn't started — still experimental). Angular's deprecation policy is a minimum of two majors, so full removal is ≈v24+, not v22.
  • Our own v22 matrix confirms it: custom-webpack Karma+Chrome integration tests pass green on 22.0.0-rc.2.

Removing @angular-builders/custom-webpack's :karma builder in v22 would therefore strand Karma users that Angular itself still supports — a gratuitous breaking change, not a forced consequence.

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 ng-add only, no Karma-removal @22 migration; the v22 breaking set is now #2191 + #2212).

Sources: angular.dev/guide/testing/migrating-to-vitest · angular.dev/reference/releases · angular-cli commit 8654b3f.

@just-jeb just-jeb marked this pull request as draft June 2, 2026 12:13
just-jeb added a commit that referenced this pull request Jun 3, 2026
- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant