chore: upgrade to Angular 22 + TypeScript 6.0, extend compat matrix to 18–22#1621
Merged
Conversation
- ng update @angular/* @angular/cli @angular/build @angular/compiler-cli
ng-packagr angular-eslint to v22; pin typescript ~6.0, typescript-eslint
^8.61, zone.js ~0.16
- keep the v22 schematic migrations but make them cross-version safe so the
shared source still compiles under Angular 18-21 in the compat matrix:
- demo components use ChangeDetectionStrategy.Default (identical to the
schematic's v22-only Eager, value 1) to preserve eager rendering
- keep withXhr() only in the test-app bootstrap (real backend); drop it from
the http-loader specs, where provideHttpClientTesting() makes it inert and
the symbol does not exist on older Angular
- drop the migration's extendedDiagnostics suppressions; library source builds
clean with nullishCoalescing/optionalChain diagnostics on
- block-directive spec: signal-drive the property-change test so it passes under
the v22 OnPush default
- honor the ^_ unused-var convention in eslint config (removes one inline
disable in translate.store)
- add a best-effort lint target + config for test-app
- compat/latest bumped to Angular 22 / TS 6.0 / zone.js 0.16 / typescript-eslint 8.61; new compat/a21 snapshots the previous Angular 21 latest - drop compat/a16 (below the published >=18 peer floor) - test-and-build-for-all.sh: split 21 from latest, add a21 to the matrix, make lint best-effort + non-fatal (skipped where no lint target exists), and restore the latest config unconditionally via 'trap restore_latest EXIT' - pin a Node-compatible packageManager in a19/a20 (were unpinned, so corepack fell back to pnpm@latest, which crashes under Node 18); reproducible-toolchain rework remains the deferred backlog item - add compat/consume: an artifact-consumability gate that type-checks the packed v22/TS6 .d.ts against TS 5.5-5.9 with skipLibCheck:false (a18-a21), proving the single source line is consumable down to the >=18 peer floor Full matrix green (build + test) on Angular 18/19/20/21/22; consumability gate green for all four older toolchains. Lint best-effort: a21/latest clean, a20 fails on a typescript-eslint 8.2.0 rule-loading skew (documented, non-fatal).
Angular 22's CLI requires Node >=22.22.3, so the Latest build matrix can never pass on Node 20.x; its failure fail-fast-cancelled the healthy 22.x and 24.x legs. Drop 20.x from the Latest matrix. The compat 'Angular 21' entry still copied compat/latest, which is now Angular 22 — so 21 was untested and 22 ran twice. Point it at the new compat/a21 dir, giving a true 18-21 compat sweep plus 22 via Latest.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the dev workspace (library build toolchain +
test-app) from Angular 21.2.8 → 22.0.0 and extends the cross-version compat matrix to cover Angular 18–22. The published libraryversion(18.0.0-rc.3) and the@angular/core >=18peer floor are unchanged — this is a toolchain upgrade, not a release.Workspace upgrade
ng updateto@angular/* ^22,@angular/cli/@angular/build/@angular/compiler-cli/ng-packagr ^22,angular-eslint ^22; pinnedtypescript ~6.0,typescript-eslint ^8.61,zone.js ~0.16.ChangeDetectionStrategy.Default(identical to v22'sEager, but exists in all versions) instead of the v22-onlyEager;withXhr()kept only in the test-app bootstrap; dropped from the http-loader specs (inert there underprovideHttpClientTesting(), and the symbol doesn't exist on older Angular).extendedDiagnosticssuppressions — the library builds clean withnullishCoalescing/optionalChaindiagnostics on.^_unused-var convention in eslint config (removed one inline disable). Added a best-effort lint target + config fortest-app.Compat matrix
a16(below the>=18floor).test-and-build-for-all.sh: lint is best-effort/non-fatal and skipped where no lint target exists; config restored unconditionally viatrap restore_latest EXIT.compat/consume/— an artifact-consumability gate that type-checks the packed v22/TS6.d.tsagainst TS 5.5–5.9 withskipLibCheck:false.Verification (all green)
build-all+test-ci(448 tests) +lint+ng build test-appon Angular 22..d.tsis consumable down to the>=18peer floor.typescript-eslint@8.2.0rule-loading skew (non-fatal, documented).Follow-up (not in this PR)
Matrix-script reproducibility (
corepack prepare pnpm@latest+ lockfile deletion) is tracked separately; this PR addspackageManagerpins to a19/a20 as the minimal unblock.🤖 Generated with Claude Code