Migrate EOL Angular 9 stack to Angular 20 LTS toolchain#409
Open
devin-ai-integration[bot] wants to merge 2 commits into
Open
Migrate EOL Angular 9 stack to Angular 20 LTS toolchain#409devin-ai-integration[bot] wants to merge 2 commits into
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
Upgrade Angular 9 -> 20, RxJS 6 -> 7, zone.js, TypeScript 3.7 -> 5.9, @types/node 12 -> 20; switch to the @angular/build application builder; replace TSLint+codelyzer with ESLint (@angular-eslint) and Protractor with Playwright; modernize Karma; remove Travis CI. Co-Authored-By: Yubin Jee <yubinjee0310@gmail.com>
Author
🤖 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:
|
Co-Authored-By: Yubin Jee <yubinjee0310@gmail.com>
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.
Summary
The entire toolchain was End-of-Life (Angular 9, TypeScript 3.7, Node 12 types, TSLint/codelyzer, Protractor, RxJS 6). This migrates the app to the current Angular 20 LTS stack and modern, supported tooling. The app builds, lints, and unit-tests clean on Node 20.
Dependency bumps (
package.json)@angular/*(incl. devkit/cli/compiler-cli/language-service)~9.0.x→^20.3.xtypescript~3.7.5→~5.9.2,rxjs~6.5.4→~7.8.0,zone.js~0.10→~0.15,tslib^1.10→^2.3,@types/node^12→^20.19rxjs-compat,node-fetch(unused insrc/),ts-node,@types/jasminewd2,jasmine-spec-reporter,karma-coverage-istanbul-reporterBuild system
@angular-devkit/build-angular:browserbuilder to the modern esbuild-based@angular/build:applicationbuilder (angular.jsonrewritten). Polyfills moved intoangular.json(["zone.js"]);src/polyfills.tsandsrc/test.tsremoved (handled by the new builders). Service worker now configured viaserviceWorker: "ngsw-config.json"on the production config. Output is nowdist/angular-hnpwa/browser/and still emitsngsw-worker.js.Lint: TSLint + codelyzer → ESLint (
@angular-eslint)tslint.json; addedeslint.config.js(flat config) and switched thelintbuilder to@angular-eslint/builder:lint. A few opinionated rules are intentionally disabled to preserve this app's existing architecture (prefer-standalone,prefer-inject,prefer-control-flow) and two template a11y rules (click-events-have-key-events,interactive-supports-focus) left for a separate a11y pass. All other recommended rules pass.E2E: Protractor → Playwright
e2e/protractor.conf.js+ the Protractor spec/PO/tsconfig; addedplaywright.config.ts(bootsnpm startviawebServer) and migrated the smoke test toe2e/app.spec.ts(asserts the app shell + header nav render).e2escript is nowplaywright test.Unit tests / Karma
karma.conf.jsrewritten for the@angular/build:karmabuilder, dropping the old@angular-devkit/.../plugins/karmarequire). Added aChromeHeadlessNoSandboxlauncher for CI. Added a smallcomment.pipe.spec.tsso the harness exercises a real test (3 passing).Required Angular 20 code changes
standalone: falsewas added to every@Component/@Pipedecorator.rxjs/Observableandrxjs/Subscription→rxjs(this is whyrxjs-compatis gone).gaglobal, dropped unused imports/any,let→const, removed empty lifecycle stubs, renamed theitemselector →app-item(and its template usage) to satisfy the component-selector prefix rule.Other
README.md: removed the deadtravis-ci.orgbuild badge; refreshed build/lint/test/e2e instructions and Node 20 requirement. Deleted.travis.yml. Standardized on npm (removedyarn.lock, committedpackage-lock.json); added.nvmrc(Node 20) and ignored.angular/cache+ Playwright artifacts.Verification
npm run build✅ (service worker generated)npm run lint✅ (all files pass)npm test✅ (3/3 specs, ChromeHeadless)Notes / follow-ups
@import,darken()); the SCSS theme migration is out of scope here.firebase.jsonhosting.public(dist) already didn't match the build output path before this change; deployment config was left as-is.Link to Devin session: https://app.devin.ai/sessions/a0f3b34a7f4b486c9d89067ee0649840
Requested by: @yubin-jee
Devin Review