Skip to content

Phase 1: Upgrade Angular 16 to 17#12

Open
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1776939207-phase1-angular-16-to-17
Open

Phase 1: Upgrade Angular 16 to 17#12
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1776939207-phase1-angular-16-to-17

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot commented Apr 23, 2026

Summary

Upgrades the Angular framework from v16 to v17 via ng update schematics, along with companion dependency updates and cleanup of deprecated tooling.

Angular & tooling upgrades (via ng update):

  • @angular/core, @angular/cli, and all @angular/* packages: 16.2.x → 17.3.x
  • @angular/material and @angular/cdk: 16.2.1 → 17.3.10
  • @angular-eslint/*: 16.1.x → 17.5.3
  • typescript: 4.9.5 → 5.4.5
  • browserTargetbuildTarget migration in angular.json (applied by schematic)

Manual dependency updates:

  • rxjs: ^6.3.1 → ^7.8.0
  • zone.js: ~0.13.1 → ~0.14.10
  • @types/node: ^12.11.1 → ^20.0.0
  • tsconfig.json: lib and module updated from es2017/es2020 to es2022

Removals:

  • protractor + protractor.conf.js + e2e project in angular.json + e2e npm script
  • codelyzer (deprecated, replaced by angular-eslint)
  • @types/jasminewd2 (Protractor types)
  • core-js (unnecessary with modern browsers + Angular 17)

Code fixes:

  • error.service.ts: throwError(message)throwError(() => message) (RxJS 7 breaking change)
  • 4 spec files: from 'rxjs/index'from 'rxjs' (path not exported in RxJS 7)

Production build (ng build --configuration production) and all 43 unit tests pass.

Review & Testing Checklist for Human

  • Visually inspect Angular Material components — Material 16→17 finalized the MDC migration. Datepickers (src/app/pets/, src/app/visits/) and mat-select (src/app/vets/vet-edit/) may have subtle styling regressions that unit tests cannot catch. Run ng serve and check these forms.
  • Verify RxJS 7 runtime behavior — The throwError factory fix and import path fixes were applied, but confirm error handling works at runtime by triggering a backend error (e.g., start the app without the Spring backend running and verify error messages display correctly).
  • Confirm core-js removal is safe — If the app must support older browsers (e.g., IE11), this removal would be a problem. Angular 17 dropped IE11 support, so this should be fine, but verify there are no specific browser support requirements.
  • Orphaned e2e/ directory — The Protractor config and angular.json e2e project were removed, but the e2e/ folder with test files still exists on disk. Consider deleting it or keeping it for reference during a future Playwright/Cypress migration.

Notes

  • The build builder remains @angular-devkit/build-angular:browser (not migrated to the new application builder). This is deprecated but still functional in Angular 17 and avoids additional config churn in this phase.
  • useDefineForClassFields: false is preserved in tsconfig.json as required by this codebase.
  • This is Phase 1 of a multi-phase Angular migration (16 → 17 → 18 → 19). Phase 0 (Dockerfile infrastructure) is in PR Phase 0: Update Node to 20-alpine and Nginx to 1.27-alpine #10.

Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/010af0d2621c4376ac0819869f987cf9


Open in Devin Review

- Run ng update schematics for @angular/core, @angular/cli, @angular/cdk, @angular/material, @angular-eslint
- Update rxjs from ^6.3.1 to ^7.8.0 and fix throwError to use factory function
- Update zone.js to ~0.14.10, typescript to 5.4.5, @types/node to ^20.0.0
- Remove codelyzer, protractor, @types/jasminewd2, core-js
- Remove e2e project from angular.json and delete protractor.conf.js
- Update tsconfig.json lib and module to es2022
- Fix rxjs/index imports in spec files for RxJS 7 compatibility
- Migrate browserTarget to buildTarget in angular.json (via ng update schematic)
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown
Contributor Author

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

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.

0 participants