Upgrade project to Angular 18
- upgrade to Angular 18
- browserlist updated
- migrated to esbuild
- stricter budgets
- warning messages in console resolved
Summary by CodeRabbit
-
Chores
- Upgraded the app and library to Angular 18.2, with updated CLI/build tools and dependencies (RxJS, Zone.js, tslib, ng-packagr).
- Updated browser support targets to modern browsers; Internet Explorer 11 is no longer supported.
- Aligned build configuration with Angular 18 (new target naming, updated entry points, tightened bundle budgets).
-
Refactor
- Streamlined build settings across environments for consistency with the latest Angular tooling.
-
Notes
- No user-facing feature changes or API changes; behavior remains the same.
Walkthrough
Upgrades Angular-related dependencies from 17.x to 18.2.x, updates rxjs/tslib/zone.js versions, revises Browserslist targets, and migrates Angular CLI configuration: switches builder to application, renames targets from browserTarget to buildTarget, updates entry points and polyfills, and adjusts build budgets and flags.
Changes
| Cohort / File(s) | Summary |
|---|---|
Angular deps bump (library)packages/ngx/package.json |
Bumps Angular packages to 18.2.14; updates rxjs (~7.8.1), tslib (^2.6.3), zone.js (0.14.10); aligns dev tooling (@angular-devkit, @angular/cli, @angular/compiler-cli, @angular/language-service, ng-packagr) to 18.2.x. |
Angular deps bump (test app)testapps/ngx/package.json |
Mirrors Angular 18.x upgrades and runtime/tooling version bumps; no non-Angular dependency changes beyond listed updates. |
Browserslist updatetestapps/ngx/.browserslistrc |
Replaces broad queries with explicit modern browser versions; maintains not-dead and Firefox ESR; drops IE 11/IE_Mob 11. |
Angular CLI config migrationtestapps/ngx/angular.json |
Switches builder to @angular-devkit/build-angular:application; renames main→browser, polyfills string→array; replaces browserTarget→buildTarget across configs; tightens budgets; removes vendorChunk/buildOptimizer in prod; updates serve/extract-i18n/test/server/prerender sections accordingly. |
Sequence Diagram(s)
sequenceDiagram
participant Dev as Developer
participant CLI as Angular CLI
participant Builder as Build System (application)
participant Browser as Browser
Dev->>CLI: ng serve / ng build (Angular 18)
CLI->>Builder: buildTarget (application) with browser entry & polyfills[]
Note over Builder: Uses updated budgets and flags
Builder-->>CLI: Build artifacts
CLI-->>Browser: Serve application
Note over Browser: Targets per updated .browserslistrc
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
I thump my paws—new versions bloom,
Angular 18 sweeps the room.
Browsers list a fresher sky,
Targets switch and budgets fly.
RxJS hops, zone.js tunes—
Carrots cached in build cocoons.
🥕✨ shipping soon!
Pre-merge checks and finishing touches
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Docstring Coverage | ✅ Passed | No functions found in the changes. Docstring coverage check skipped. |
| Title Check | ✅ Passed | The title “Upgrade project to Angular 18” directly captures the primary intent of the pull request, which is bumping the Angular framework and related dependencies to version 18. It is concise, specific, and omits extraneous detail, making it easy for team members to understand the main change at a glance. |
✨ Finishing touches
- [ ] 📝 Generate docstrings
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.