Skip to content

Conversation

@devin-ai-integration
Copy link

@devin-ai-integration devin-ai-integration bot commented Oct 13, 2025

Upgrade Angular from 9.0.1 to 10.2.5

Summary

This PR upgrades the Angular framework from version 9.0.1 to 10.2.5 as the first step in an incremental modernization effort. The upgrade includes:

  • All Angular packages: ~9.0.1~10.2.5 (core, common, router, service-worker, etc.)
  • Angular CLI & DevKit: ~9.0.2~10.2.4 and ~0.900.2~0.1002.4
  • TypeScript: ~3.7.5~3.9.7 (required for Angular 10)
  • Node.js requirement in Travis CI: 6.912 (minimum for Angular 10)
  • Testing dependencies: Updated karma, jasmine, protractor, tslint to Angular 10-compatible versions
  • RxJS: ~6.5.4~6.6.7
  • Package manager: Switched from yarn to npm (yarn.lock deleted, package-lock.json created)
  • Browserslist: Renamed from browserslist to .browserslistrc (Angular 10 convention)

⚠️ IMPORTANT LIMITATIONS:

  • Manual upgrade - Environment issues prevented using ng update CLI tool, so package.json was updated manually. Automated code migrations were NOT applied.
  • Testing incomplete - Environment issues prevented running unit tests, production builds, and service worker verification locally.
  • Basic build verified - npm run build succeeds with NODE_OPTIONS=--openssl-legacy-provider flag.

Review & Testing Checklist for Human

This PR requires thorough manual testing due to incomplete verification during development. Please test:

  • Run the development build locally - export NODE_OPTIONS=--openssl-legacy-provider && npm run build completes successfully
  • Run the development server - npm start and verify the app loads at localhost:4200 without console errors
  • Test all routes and features - Navigate through stories, comments, user profiles, all three themes (Default, Night, Black/AMOLED)
  • Production build with service worker - Try to generate a production build and verify the service worker works (this is a PWA!)
  • Review Angular 10 breaking changes - Check Angular 10 migration guide for breaking changes that might affect this codebase:
    • Input fields of type number now fire valueChanges only once per change
    • Templates with unknown properties now log errors instead of warnings
    • TypeScript 3.9 required (3.6-3.8 no longer supported)
  • Check for automated migration opportunities - Since ng update couldn't run, there may be code patterns that need manual updates (missing decorators, ModuleWithProviders types, etc.)

Notes

Environment Issues Encountered:

  1. Production builds fail - WASM error with source-map library when building with --configuration=production. Basic builds succeed.
  2. Tests cannot run locally - ChromeHeadless browser fails to start (environment setup issue)
  3. 31 pre-existing lint errors - These existed before the upgrade and are unrelated to this PR

Scripts from README don't exist:

  • npm run precache (for service worker generation) - not in package.json
  • npm run static-serve (for testing with service worker) - not in package.json

The README/CONTRIBUTING.md appear to reference an older setup. In Angular 10, service workers should be generated automatically during production builds when configured in angular.json.

Next Steps:
After this PR is merged and tested, the next incremental upgrade would be Angular 10 → 11, which requires TypeScript 4.0 and drops IE 9/10 support.


Link to Devin run: https://app.devin.ai/sessions/fbf23d7e6b6d4992ad007f8c836a975c
Requested by: @kevintang513

- Updated all Angular core packages from ~9.0.1 to ~10.2.5
- Updated Angular CLI from ~9.0.2 to ~10.2.4
- Updated Angular DevKit from ~0.900.2 to ~0.1002.4
- Updated TypeScript from ~3.7.5 to ~3.9.11 (required for Angular 10)
- Updated RxJS from ~6.5.4 to ~6.6.7
- Updated Zone.js from ~0.10.2 to ~0.10.3
- Updated tslib from ^1.10.0 to ^2.0.0 (Angular 10 uses tslib 2.x)
- Updated all dev dependencies to Angular 10 compatible versions:
  - codelyzer: ^5.1.2 → ^6.0.0
  - karma: ~4.1.0 → ~5.0.0
  - protractor: ~5.4.0 → ~7.0.0
  - tslint: ~5.15.0 → ~6.1.0
  - jasmine-core: ~3.4.0 → ~3.6.0
  - ts-node: ~7.0.0 → ~8.3.0
- Updated Node.js requirement from 6.9 to 12 in .travis.yml (required for Angular 10)
- Renamed browserslist to .browserslistrc (Angular 10 convention)

Note: Manual package.json update due to local environment Node.js version incompatibility.
CI will handle package installation and testing.

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

- Updated TypeScript from ~3.9.11 to ~3.9.7 (version that exists in npm registry)
- Updated jasmine-core from ~3.6.0 to ~3.8.0 (required by karma-jasmine-html-reporter@1.7.0)
- Switched from yarn.lock to package-lock.json (npm install successful with Node.js 14.21.3)
- Basic build succeeds with Angular 10
- Environment issues prevent full test verification (ChromeHeadless, WASM for production builds)

Co-Authored-By: Kevin Tang <kevin.tang513@gmail.com>
@kevintang513
Copy link

Fix the WASM error

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.

2 participants