Skip to content

chore(deps): upgrade to Angular 22 - #58

Merged
robingenz merged 2 commits into
mainfrom
chore/upgrade-angular-22
Aug 14, 2026
Merged

robingenz merged 2 commits into
mainfrom
chore/upgrade-angular-22

Conversation

@robingenz

Copy link
Copy Markdown
Member

What

Upgrades the app from Angular 21 to Angular 22, including the required toolchain updates.

Changes

  • Framework: Angular 22.1.1, CLI/@angular-devkit/build-angular 22.1.3, tslib 2.8.1
  • TypeScript 6.0.3: removed the now hard-erroring deprecated options baseUrl and downlevelIteration; path aliases are ./-prefixed accordingly and the duplicated paths block in tsconfig.spec.json now inherits from the root config
  • Jest toolchain: @angular-builders/jest 22.0.1, jest-preset-angular 17.0.0, ts-jest 29.4.12; isolatedModules: true added to tsconfig.spec.json (documented jest-preset-angular 17 setup)
  • Babel: explicit @babel/core 7.29.7 devDependency — Angular 22's build tooling uses Babel 8 while the Jest ecosystem peers on Babel 7; the root pin lets both coexist (Babel 8 nests under the Angular build)
  • Lint: angular-eslint 22.1.0
  • FontAwesome: @fortawesome/angular-fontawesome 5.1.0 (Angular 22 compatible)
  • Migrations (behavior-preserving):
    • withXhr() added to provideHttpClient — Angular 22 defaults to the fetch backend; this keeps the existing XHR backend. Trying withFetch() is a possible follow-up.
    • AppComponent and a spec mock component now declare ChangeDetectionStrategy.OnPush (Angular 22's new default; the migration inserted Eager, which the repo's prefer-on-push-component-change-detection rule rejects — both templates are static, so OnPush is safe)
    • New extended template diagnostics nullishCoalescingNotNullable/optionalChainNotNullable are suppressed by the migration in tsconfig.app.json/tsconfig.spec.json; un-suppressing them is a possible follow-up
    • The $safeNavigationMigration wrappers the migration added in apartments.page.html were removed again — the values are only used in truthiness checks, where the null-vs-undefined semantics change is irrelevant

Verification

  • npm run build -- --configuration production ✅
  • npm run test:ci — 46/46 suites, 101 passed / 5 skipped ✅
  • npm run lint ✅
  • npx patch-package — both patches apply cleanly ✅

Notes

  • The lockfile was regenerated from scratch to resolve the coordinated major-version hop.
  • npm audit drops from 19 to 8 findings; the remainder live in the @ionic/cli/@capawesome/capver dependency trees, which have no fixed upstream releases yet.
  • Optional migrations deliberately skipped: use-application-builder (build system switch) and Karma→Vitest (not applicable, Jest is used).

- Angular 22.1.1, CLI/build-angular 22.1.3, TypeScript 6.0.3
- angular-eslint 22.1.0, @angular-builders/jest 22.0.1,
  jest-preset-angular 17.0.0, ts-jest 29.4.12,
  @fortawesome/angular-fontawesome 5.1.0, tslib 2.8.1
- pin @babel/core 7 at root (Angular 22 build uses Babel 8,
  Jest ecosystem still requires Babel 7)
- add `withXhr()` to keep the XHR backend (fetch is the new default)
- switch `AppComponent` to `OnPush` (Angular 22 default, enforced by lint)
- drop deprecated `baseUrl`/`downlevelIteration` (hard errors under TS 6),
  prefix `paths` with `./`, deduplicate spec tsconfig paths,
  add `isolatedModules` for jest-preset-angular 17
Copilot AI lite review requested due to automatic review settings August 14, 2026 08:26
@robingenz robingenz added build Build system or external dependencies dependencies labels Aug 14, 2026
@robingenz robingenz self-assigned this Aug 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Upgrades the app’s Angular/tooling stack to Angular 22 and aligns TypeScript/Jest configuration and HTTP client provisioning with Angular 22 defaults while preserving the existing XHR-based behavior expected by the app’s interceptor setup.

Changes:

  • Bumped Angular framework/CLI/build tooling and related ecosystem packages (Jest toolchain, angular-eslint, FontAwesome Angular binding, tslib, TypeScript).
  • Updated TypeScript configs to remove deprecated/now-hard-erroring options, adjust path mappings, and align Angular extended template diagnostics configuration.
  • Explicitly opts into the XHR backend (withXhr()) for provideHttpClient() (app + relevant specs) and sets OnPush change detection where required by updated defaults/rules.

Reviewed changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tsconfig.spec.json Removes duplicated paths, enables isolatedModules, and adds Angular extended diagnostics suppression for specs.
tsconfig.json Drops deprecated compiler options and updates path alias targets to ./-prefixed values.
tsconfig.app.json Adds Angular extended diagnostics suppression for the app compilation target.
src/app/modules/dualis/services/dualis-page/dualis-page.service.spec.ts Uses withXhr() in provideHttpClient() to keep test HTTP behavior aligned with app defaults.
src/app/modules/dualis/services/dualis-auth/dualis-auth.service.spec.ts Uses withXhr() in provideHttpClient() to keep test HTTP behavior aligned with app defaults.
src/app/core/services/dialog/dialog.service.spec.ts Sets mock component change detection to OnPush to match updated Angular defaults/lint expectations.
src/app/app.module.ts Forces XHR HTTP backend via provideHttpClient(withXhr(), ...) while keeping DI interceptors.
src/app/app.component.ts Declares ChangeDetectionStrategy.OnPush on the root component.
package.json Updates Angular/tooling dependency versions and pins @babel/core for Jest ecosystem compatibility.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

TS 6 no longer infers `rootDir` when `outDir` is set (TS5011), which
broke Cypress spec compilation via the inherited tsconfig.
@robingenz
robingenz merged commit 616776e into main Aug 14, 2026
5 checks passed
@robingenz
robingenz deleted the chore/upgrade-angular-22 branch August 14, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Build system or external dependencies dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants