Skip to content

Upgrade to Angular 19: align all packages and fix deprecated APIs#63

Merged
mariohmol merged 5 commits into
masterfrom
upgrade/angular-19-complete
Apr 13, 2026
Merged

Upgrade to Angular 19: align all packages and fix deprecated APIs#63
mariohmol merged 5 commits into
masterfrom
upgrade/angular-19-complete

Conversation

@mariohmol

Copy link
Copy Markdown
Collaborator

Summary

Completes the Angular 19 upgrade started in #58 (which updated only @angular/compiler and @angular/core). Brings the entire dependency tree to a consistent Angular 19 state and removes the CI workaround that was patching versions to Angular 11 at build time.

Package changes

Runtime deps — upgraded to 19.2.18:

  • @angular/common 10.0.8 → 19.2.18
  • @angular/forms 10.0.8 → 19.2.18
  • @angular/platform-browser 10.0.8 → 19.2.18
  • @angular/platform-browser-dynamic 10.0.8 → 19.2.18
  • @angular/router 10.0.8 → 19.2.18
  • zone.js ^0.10.3 → ~0.16.0

Removed deprecated/unused deps:

  • @angular/http — removed in Angular 5; replaced with HttpClientModule from @angular/common/http
  • webpack — not a direct dependency (managed by Angular CLI internally)
  • rxjs: "*" → pinned to ^7.4.0 (Angular 19 compatible)
  • core-js — not needed for evergreen browsers with Angular 19
  • tsickle, tslint, protractor, awesome-typescript-loader, rollup — all deprecated/unused

Dev tooling — upgraded to Angular 19 compatible versions:

  • @angular/cli 10.0.5 → ~19.2.24
  • @angular-devkit/build-angular ~0.900.2 → ~19.2.24
  • @angular-devkit/schematics ^9.0.2 → ~19.2.24
  • @angular/compiler-cli 10.0.8 → 19.2.18
  • ng-packagr ^9.0.0 → ~19.2.2
  • typescript 3.9.7 → ~5.7.0
  • ts-node ~7.0.0 → ~10.9.0

Code changes

  • src/app/app.module.ts: Replace removed HttpModule (@angular/http) with HttpClientModule (@angular/common/http)
  • src/polyfills.ts: Update zone.js import zone.js/dist/zonezone.js
  • tsconfig.json: Target ES2022, add useDefineForClassFields: false (required for Angular decorators)
  • angular.json: Remove deprecated build options (extractCss, aot, buildOptimizer) and drop removed tslint/protractor architect sections

CI changes

Removes the Angular 11 version-patching workaround that was necessary due to inconsistent versions. The CI now does a straightforward install + build against the actual package.json versions. Also upgrades to Node 20 and uses --configuration production instead of the deprecated --prod flag.

Test plan

  • npm run build:lib — library builds with ng-packagr 19
  • npx ng build --configuration production — demo app builds
  • CI passes on this PR

🤖 Generated with Claude Code

- Upgrade remaining @angular/* packages to 19.2.18 (@angular/common, forms,
  platform-browser, platform-browser-dynamic, router)
- Replace removed @angular/http with @angular/common/http (HttpClientModule)
- Drop deprecated deps: @angular/http, webpack, tsickle, tslint, protractor,
  core-js, awesome-typescript-loader, rollup
- Update tooling: @angular/cli, @angular-devkit/build-angular, ng-packagr,
  typescript 3.9 → 5.7, zone.js 0.10 → 0.16
- Remove deprecated build options from angular.json (extractCss, aot,
  buildOptimizer) and drop tslint/protractor architect sections
- Update tsconfig: target ES2022, add useDefineForClassFields: false
- Update zone.js polyfills import path (zone.js/dist/zone → zone.js)
- Simplify CI: remove Angular 11 version-patching workaround, use Node 20,
  use --configuration production instead of deprecated --prod flag

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
mariohmol and others added 4 commits April 14, 2026 00:11
ng-packagr 19 validates the entire file passed via -p against its schema,
so embedding the config in package.json via the ngPackage key causes
"must NOT have additional properties (name)" errors. Extract to a separate
ng-package.json and point the build:lib script at it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Angular 19 defaults components to standalone: true when no flag is set.
GanttEditorComponent is declared in NgGanttEditorModule so it must be
explicitly marked standalone: false to keep the NgModule-based API.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Angular 17+ removed defaultProject from the workspace config. With multiple
projects (dev, packages) Angular 19 refuses to guess which one to build.
Remove defaultProject from angular.json and pass 'dev' explicitly to all
ng build invocations in CI and package.json scripts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Angular 19 defaults standalone to true. AppComponent and DemoComponent
are declared in AppModule so they need explicit standalone: false.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mariohmol
mariohmol merged commit 281f4d5 into master Apr 13, 2026
3 checks passed
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