Skip to content

Conversation

@devin-ai-integration
Copy link

Upgrade Angular from 9.0.1 to 12

Summary

This PR upgrades the Angular application from version 9.0.1 to 12.2.17 through three sequential major version upgrades (9→10→11→12). This is a substantial upgrade that brings the application up to date with improved Ivy rendering engine, Webpack 5, and better tree-shaking.

Key Changes:

  • Angular Core: 9.0.1 → 12.2.17
  • Angular CLI: 9.0.2 → 12.2.18
  • TypeScript: 3.7.5 → 4.3.5
  • zone.js: 0.10.2 → 0.11.4
  • RxJS: Fixed deprecated imports in 3 files, removed rxjs-compat package
  • Build Configuration: Removed deprecated extractCss and aot options, Ivy now mandatory
  • Routing: Added relativeLinkResolution: 'legacy' to preserve old behavior (should be updated to 'corrected' in future)

Files Modified:

  • Fixed RxJS imports in user.component.ts, item-details.component.ts, and hackernews-api.service.ts
  • Updated angular.json with Angular 12 build configuration
  • Updated package.json and yarn.lock with new dependency versions
  • Updated zone.js import paths in polyfills.ts and src/test.ts

Review & Testing Checklist for Human

This is a high-risk change due to the scope of the upgrade. The build succeeds, but comprehensive end-to-end testing is required:

  • Run the application locally - Verify all pages load correctly (home, stories, item details, user profiles)
  • Test navigation - Ensure routing works correctly between different views
  • Test service worker - Verify offline functionality works (run npm run build && npm run precache && npm run static-serve)
  • Test production build - Run npm run build and verify bundle sizes are acceptable (currently ~2.33 MB ES2015, ~3.24 MB ES5)
  • Spot check for runtime errors - Open browser console and ensure no errors appear during normal usage

Notes

  • The build completes successfully with no errors, only pre-existing Sass deprecation warnings (unrelated to this upgrade)
  • Git tags created at each phase: angular-10-stable, angular-11-stable, angular-12-stable for easy rollback if needed
  • The Angular 11 migration added relativeLinkResolution: 'legacy' to maintain old routing behavior - consider updating to 'corrected' in a future PR
  • All three Angular CLI migrations ran automatically and updated configurations as needed
  • Ivy is now mandatory (no longer AOT flag needed) and Webpack 5 is in use

Link to Devin run: https://app.devin.ai/sessions/0132ad5569d24294b30cc6a4e424ffd7
Requested by: Kevin Tang (@kevintang513)

devin-ai-integration bot and others added 4 commits October 28, 2025 20:18
- Updated Angular from 9.1.13 to 10.2.5
- Updated Angular CLI from 9.1.15 to 10.2.4
- Updated TypeScript from 3.7.5 to 4.0.8
- Fixed deprecated RxJS imports (rxjs/Observable -> rxjs, rxjs/Subscription -> rxjs)
- Updated tslint to version 6
- Renamed browserslist to .browserslistrc
- Updated tslib to version 2

Co-Authored-By: Kevin Tang <kevin.tang513@gmail.com>
- Updated Angular from 10.2.5 to 11.2.14
- Updated Angular CLI from 10.2.4 to 11.2.19
- Updated TypeScript from 4.0.8 to 4.1.6
- Removed deprecated extractCss option from angular.json
- Updated relativeLinkResolution in RouterModule to use 'legacy' explicitly
- Updated various testing and build dependencies

Co-Authored-By: Kevin Tang <kevin.tang513@gmail.com>
- Updated Angular from 11.2.14 to 12.2.17
- Updated Angular CLI from 11.2.19 to 12.2.18
- Updated TypeScript from 4.1.6 to 4.3.5
- Updated zone.js from 0.10.3 to 0.11.8
- Ivy is now mandatory (enabled by default)
- Webpack 5 is now used by default
- Removed emitDecoratorMetadata TypeScript compiler option
- Updated zone.js imports in polyfills
- Replaced deprecated '--prod' flag in package.json scripts
- Various migrations for Angular 12 compatibility

Co-Authored-By: Kevin Tang <kevin.tang513@gmail.com>
All deprecated RxJS imports have been fixed to use modern import paths.
The rxjs-compat compatibility package is no longer needed.

Co-Authored-By: Kevin Tang <kevin.tang513@gmail.com>
@devin-ai-integration
Copy link
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

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.

1 participant