Skip to content

feat!: support Angular 22, drop Angular 18 and 19#211

Closed
fmalcher wants to merge 1 commit into
mainfrom
feat/angular-22-support
Closed

feat!: support Angular 22, drop Angular 18 and 19#211
fmalcher wants to merge 1 commit into
mainfrom
feat/angular-22-support

Conversation

@fmalcher
Copy link
Copy Markdown
Member

@fmalcher fmalcher commented Jun 7, 2026

Closes #209. I went a step further and think we can safely drop support for unsupported Angular versions.

Summary

  • Bump peer/dep ranges to >=20.0.0 <23.0.0 (devkit architect to <0.2300.0); package now installs cleanly against Angular 22.0.0.
  • Drop Angular 18 and 19. Angular 20 is the minimum supported version; v20 LTS runs through 2026-11-28.
  • Bump engines.node to match Angular 20+ (^20.19.0 || ^22.12.0 || >=24.0.0).
  • Bump TypeScript dev dep to ~5.9.3 — Angular 22's devkit .d.ts uses MapIterator<string> (introduced in TS 5.6), which the previous TS 5.2 couldn't resolve and produced Type 'unknown' is not assignable to type 'string' in ng-add.ts.
  • Bump dev @angular-devkit/* to v22 and @types/node to v22.
  • Add test-fixtures/angular-22.json (generated via ng new with Angular CLI 22.0.0); drop the now-unsupported angular-18.json / angular-19.json fixtures and their tests.
  • Update README and a few stale comments mentioning Angular 17-19.

Compatibility notes

Reviewed the Angular CLI 22 changelog. None of the breaking changes affect APIs this package uses:

  • We use only stable BuilderContext, targetFromTargetString, logging, workspaces, schematic types.
  • We don't use the webpack builders (deprecated), @angular-devkit/architect-cli (removed), @angular/build:jest/web-test-runner (removed), @angular/ssr, or @angular/build:dev-server PORT behavior.

Test plan

  • npm run build passes against @angular-devkit/*@22.0.0
  • npm test — all 426 tests pass against @angular-devkit/*@22.0.0
  • Smoke test ng add angular-cli-ghpages against a fresh ng new workspace on Angular 22
  • Smoke test ng deploy --dry-run against an Angular 22 project

Closes #209.

BREAKING CHANGE: Angular 18 and 19 are no longer supported. The minimum
supported Angular version is now 20.0.0; LTS for v20 runs through
2026-11-28.

- Bump peer/dep ranges to >=20.0.0 <23.0.0 (devkit architect to <0.2300.0)
- Bump engines.node to match Angular 20+ requirements
- Bump TypeScript to ~5.9.3 so devkit 22 MapIterator types resolve
- Bump @types/node and dev devkit packages to v22
- Add angular-22.json fixture, drop angular-18/19 fixtures and tests
- Update README to reflect new supported range
Comment thread src/package.json
@JohannesHoppe
Copy link
Copy Markdown
Member

Ich reviewe, sobald ich Zuhause bin.

@JohannesHoppe
Copy link
Copy Markdown
Member

Thanks for putting this together, Ferdinand! 🙏 After a closer look, there's no technical forcing function for a breaking change here: Angular 22's generated angular.json is structurally identical to 21, and the builder API the package relies on is stable across 18–22, so the engine works unchanged. #212 adds Angular 22 support with a minimal, non-breaking bump and keeps 18–21 working (CI deploys against all of them). I'd rather not drop 18/19 until something actually breaks — happy to revisit a breaking change the moment there's a concrete reason. Closing in favor of #212.

@JohannesHoppe JohannesHoppe deleted the feat/angular-22-support branch June 8, 2026 14:22
JohannesHoppe added a commit that referenced this pull request Jun 8, 2026
#211 rightly flagged that engines.node ">=18.0.0" is stale — no supported
Angular actually runs on Node 18.0–18.18 (Angular 18's real floor is
18.19.1). It set "^20.19.0 || ^22.12.0 || >=24.0.0", but that is Angular
20/21's requirement and is too narrow here: it locks out Node 18/19 needed
by the Angular 18/19 users this PR still supports, plus odd majors.

Bump to a wide lower bound at the true floor of the oldest supported
Angular (18 → 18.19.1). Angular CLI enforces its own stricter per-version
Node gate, so we only need a sane floor, not a duplicate of it.
JohannesHoppe added a commit that referenced this pull request Jun 8, 2026
* feat: add support for Angular 22

Extends the supported Angular range from 18–21 to 18–22.

- package.json: bump devkit upper bounds (architect <0.2300.0,
  core/schematics <23.0.0) and the @angular/cli peer to <23.0.0; v3.1.0
- README: update supported range to "Angular 18 to 22"
- CI: add an Angular 22 ng new / ng add / ng deploy smoke test
- tests: add angular-22.json fixture (real ng new v22.0.0 output) plus
  Angular 22 compatibility assertions

No engine/builder changes needed: Angular 22's generated angular.json is
structurally identical to 21 (@angular/build:application, no outputPath),
which actions.ts already handles.

* chore: port Node version range improvement from #211

#211 rightly flagged that engines.node ">=18.0.0" is stale — no supported
Angular actually runs on Node 18.0–18.18 (Angular 18's real floor is
18.19.1). It set "^20.19.0 || ^22.12.0 || >=24.0.0", but that is Angular
20/21's requirement and is too narrow here: it locks out Node 18/19 needed
by the Angular 18/19 users this PR still supports, plus odd majors.

Bump to a wide lower bound at the true floor of the oldest supported
Angular (18 → 18.19.1). Angular CLI enforces its own stricter per-version
Node gate, so we only need a sane floor, not a duplicate of it.

* ci: run "Build and test" on pull requests + enable manual dispatch

The workflow only triggered on push to main/big-update, so pull requests
(including this one) received no CI at all. Add a pull_request trigger
(targeting main) so PRs are validated before merge, plus workflow_dispatch
for on-demand runs (becomes usable once this lands on the default branch).

* ci: drop completed big-update branch from push triggers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Angular 22

3 participants