Skip to content

feat: add Angular 22 support (non-breaking, keeps 18–21)#212

Merged
JohannesHoppe merged 4 commits into
mainfrom
feat/angular-22-keep-18-19
Jun 8, 2026
Merged

feat: add Angular 22 support (non-breaking, keeps 18–21)#212
JohannesHoppe merged 4 commits into
mainfrom
feat/angular-22-keep-18-19

Conversation

@JohannesHoppe
Copy link
Copy Markdown
Member

@JohannesHoppe JohannesHoppe commented Jun 8, 2026

Summary

Adds Angular 22 to the supported range without breaking changes β€” the existing v3 line keeps supporting Angular 18–21 and now also 22. Released as a minor bump (3.0.3 β†’ 3.1.0).

Note: This is the additive alternative to #211, which drops Angular 18 & 19 (breaking, min v20). The two are mutually exclusive.

What changed

  • src/package.json β€” extended upper bounds only:
    • @angular-devkit/architect: <0.2200.0 β†’ <0.2300.0
    • @angular-devkit/core / @angular-devkit/schematics: <22.0.0 β†’ <23.0.0
    • peer @angular/cli: <22.0.0 β†’ <23.0.0
    • version β†’ 3.1.0
    • devDependencies stay pinned at 18 (the floor), so the build keeps verifying against the minimum supported version.
  • README.md β€” supported range "18 to 21" β†’ "18 to 22".
  • .github/workflows/main.yml β€” added an Angular 22 ng new / ng add / ng deploy smoke test alongside the 18–21 steps.
  • src/test-fixtures/angular-22.json + angular-versions.spec.ts β€” new fixture (the real ng new output from @angular/cli@v22.0.0, verified against the schematic source) plus an Angular 22 compatibility block and extended cross-version assertions.

Why no engine changes

Angular 22's generated angular.json is structurally identical to 21 (@angular/build:application, browser: src/main.ts, no outputPath). actions.ts already resolves the default dist/<project>/browser for the undefined-outputPath case, so no builder logic changes were needed.

Testing

  • npm run build β€” clean
  • npm test β€” all suites pass, including the new Angular 22 fixture tests
  • The CI workflow exercises a real ng new/ng deploy against Angular 18–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.
#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 JohannesHoppe marked this pull request as ready for review June 8, 2026 14:28
@JohannesHoppe JohannesHoppe requested a review from fmalcher June 8, 2026 14:28
@JohannesHoppe
Copy link
Copy Markdown
Member Author

FYI @d-koppenhagen

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).
@fmalcher
Copy link
Copy Markdown
Member

fmalcher commented Jun 8, 2026

I see no reason at all to support a horribly outdated version of Angular. But since there are no changes in the logic (string outputpath is still possible), I'm okay with this!
However, I think we should not support each and every Angular version forever since it bloats tests and logic.

@JohannesHoppe
Copy link
Copy Markdown
Member Author

Fully agree. And the day a version actually costs us logic or workarounds, it's gone. But here it's zero added logic and the tests run themselves, so I'd rather keep the late-upgrading enterprise crowd happy for free than field "my build broke" issues. πŸ˜…

@JohannesHoppe JohannesHoppe merged commit 4820980 into main Jun 8, 2026
2 checks passed
@JohannesHoppe JohannesHoppe deleted the feat/angular-22-keep-18-19 branch June 8, 2026 16:40
@JohannesHoppe JohannesHoppe mentioned this pull request Jun 8, 2026
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.

2 participants