feature: upgrade Angular 9 → 17 (stepwise, one major at a time)#434
feature: upgrade Angular 9 → 17 (stepwise, one major at a time)#434devin-ai-integration[bot] wants to merge 9 commits into
Conversation
Co-Authored-By: Stephen Cornwell <stephen@cognition.ai>
Co-Authored-By: Stephen Cornwell <stephen@cognition.ai>
Co-Authored-By: Stephen Cornwell <stephen@cognition.ai>
Co-Authored-By: Stephen Cornwell <stephen@cognition.ai>
Co-Authored-By: Stephen Cornwell <stephen@cognition.ai>
Co-Authored-By: Stephen Cornwell <stephen@cognition.ai>
Co-Authored-By: Stephen Cornwell <stephen@cognition.ai>
Co-Authored-By: Stephen Cornwell <stephen@cognition.ai>
Co-Authored-By: Stephen Cornwell <stephen@cognition.ai>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
UI test — Angular 17 upgrade verified end-to-endRan the upgraded app locally on Angular 17 ( Results
🔴 User profile page (pre-existing failure, unrelated to this PR)The app calls Tested via Devin. |
Summary
Upgrades this HackerNews PWA from Angular 9 → Angular 17, done rigorously one major at a time via the official
ng updateschematics (no skipped versions). The app stays NgModule-based (not converted to standalone). All@angular/*packages now on^17.3.12,typescript~5.4.5,zone.js^0.14,tslib^2.8.ng build,ng lint, andng test(headless Chrome) all pass.The history tells the migration story — one commit per major:
Node versions used per stage
Older Angular needs older Node; each major was run under the Node it supports (switched via
nvm):Notable breaking changes handled
tslint.json+codelyzer; added@angular-eslint/*and@typescript-eslint/*.tslint.jsondeleted,.eslintrc.jsonadded,angular.jsonlint builder switched to@angular-eslint/builder.src/polyfills.ts:zone.js/dist/zone→zone.jssrc/test.ts:zone.js/dist/zone-testing→zone.js/testingsrc/test.ts: replacedrequire.context(...)test discovery withimport.meta.webpackContext(...)for webpack 5.error =>→() =>) and deadObservableimport infeed.component.ts,item-details.component.ts,user.component.ts, and several core components;let→constwhere flagged.src/smoke.spec.tsso the Karma/Jasmine suite has a passing spec after the testing-stack updates.typescriptbumped to 5.4.x (required by v17),zone.jsto 0.14.x,tslibto 2.8.x.rxjskept on 6.6.x (Angular 17 supports it; no RxJS 7 forcing needed to build).Verification
npm run build✅npm run lint✅npm test -- --watch=false --browsers=ChromeHeadless✅ (run against the Chrome binary directly)Build still emits pre-existing Sass/CommonJS deprecation warnings but completes successfully.
UI testing
Running the upgraded app on Angular 17 and exercising the real UI (feeds, comments, user profiles) with a screen recording — will attach the recording/screenshots as a follow-up.
Link to Devin session: https://app.devin.ai/sessions/f8500ff4e0e747f2a5a4ae9c6edc00d3
Requested by: @stephencornwell
Devin Review