Repository navigation
chore(deps): upgrade to Angular 22 - #58
Merged
Merged
Conversation
- 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
There was a problem hiding this comment.
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()) forprovideHttpClient()(app + relevant specs) and setsOnPushchange 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.
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.
What
Upgrades the app from Angular 21 to Angular 22, including the required toolchain updates.
Changes
22.1.1, CLI/@angular-devkit/build-angular22.1.3,tslib2.8.16.0.3: removed the now hard-erroring deprecated optionsbaseUrlanddownlevelIteration; path aliases are./-prefixed accordingly and the duplicatedpathsblock intsconfig.spec.jsonnow inherits from the root config@angular-builders/jest22.0.1,jest-preset-angular17.0.0,ts-jest29.4.12;isolatedModules: trueadded totsconfig.spec.json(documented jest-preset-angular 17 setup)@babel/core7.29.7devDependency — 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)angular-eslint22.1.0@fortawesome/angular-fontawesome5.1.0(Angular 22 compatible)withXhr()added toprovideHttpClient— Angular 22 defaults to the fetch backend; this keeps the existing XHR backend. TryingwithFetch()is a possible follow-up.AppComponentand a spec mock component now declareChangeDetectionStrategy.OnPush(Angular 22's new default; the migration insertedEager, which the repo'sprefer-on-push-component-change-detectionrule rejects — both templates are static, soOnPushis safe)nullishCoalescingNotNullable/optionalChainNotNullableare suppressed by the migration intsconfig.app.json/tsconfig.spec.json; un-suppressing them is a possible follow-up$safeNavigationMigrationwrappers the migration added inapartments.page.htmlwere removed again — the values are only used in truthiness checks, where the null-vs-undefined semantics change is irrelevantVerification
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
npm auditdrops from 19 to 8 findings; the remainder live in the@ionic/cli/@capawesome/capverdependency trees, which have no fixed upstream releases yet.use-application-builder(build system switch) and Karma→Vitest (not applicable, Jest is used).