chore: upgrade Angular to v22.0.2 - #60
Conversation
Run ng update from v21 to v22. Bumps all @angular packages, the CLI, build-angular, and TypeScript to 6.0.3. Migrations add withXhr() to provideHttpClient calls to retain the pre-v22 XHR backend (v22 defaults to fetch), and suppress the nullishCoalescing/optionalChain extended diagnostics in the app and spec tsconfigs. TypeScript 6 changes that needed handling: - strict now defaults to on; set "strict": false explicitly to preserve the project's prior (non-strict) posture. - baseUrl is deprecated; add "ignoreDeprecations": "6.0" since the 'config' import still relies on it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughUpgrades Angular dependencies from v21.2.x to v22.0.x and TypeScript from 5.9.3 to 6.0.3. Adds ChangesAngular v22 / TypeScript v6 Upgrade
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Angular 22 requires Node ^22.22.3 || ^24.15.0 || >=26.0.0, and its devkit packages declare optional peer deps (chokidar/readdirp) that the npm 11 lockfile records in a form npm 10 (bundled with Node 22) rejects during `npm ci`. Node 24 bundles a compatible npm. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
tsconfig.app.json (1)
18-25: 🏗️ Heavy liftTreat these extended-diagnostic suppressions as temporary migration debt.
Please time-box these suppressions and track removal after fixing call sites; leaving both checks suppressed indefinitely weakens null-safety signal quality in app builds.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tsconfig.app.json` around lines 18 - 25, The extendedDiagnostics suppressions for nullishCoalescingNotNullable and optionalChainNotNullable checks are being flagged as temporary migration debt that needs tracking. Create a tracking mechanism (such as a GitHub issue, TODO comment with a deadline, or documentation entry) that documents when these suppressions in the checks object were added and sets a specific timeframe for their removal. Identify and document the call sites that currently require these suppressions so they can be fixed and the suppressions can be removed to restore full null-safety signal quality in the Angular compiler options.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@package.json`:
- Around line 14-38: Add an engines field to the root level of package.json to
explicitly document the Node.js version requirements for this project. The
engines field should be placed alongside the existing dependencies and
devDependencies objects and should specify the compatible Node.js versions that
Angular 22.0.2 requires. This will help local developers identify version
mismatches early without needing to run CI.
---
Nitpick comments:
In `@tsconfig.app.json`:
- Around line 18-25: The extendedDiagnostics suppressions for
nullishCoalescingNotNullable and optionalChainNotNullable checks are being
flagged as temporary migration debt that needs tracking. Create a tracking
mechanism (such as a GitHub issue, TODO comment with a deadline, or
documentation entry) that documents when these suppressions in the checks object
were added and sets a specific timeframe for their removal. Identify and
document the call sites that currently require these suppressions so they can be
fixed and the suppressions can be removed to restore full null-safety signal
quality in the Angular compiler options.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: ed007c8c-04f9-4a02-8e7e-766d998cd35c
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (7)
package.jsonsrc/app/app.component.spec.tssrc/app/app.service.spec.tssrc/main.tstsconfig.app.jsontsconfig.jsontsconfig.spec.json
| "@angular/animations": "22.0.2", | ||
| "@angular/common": "22.0.2", | ||
| "@angular/compiler": "22.0.2", | ||
| "@angular/core": "22.0.2", | ||
| "@angular/forms": "22.0.2", | ||
| "@angular/platform-browser": "22.0.2", | ||
| "@angular/platform-browser-dynamic": "22.0.2", | ||
| "@angular/router": "22.0.2", | ||
| "bootstrap": "5.3.5", | ||
| "bootswatch": "5.3.5", | ||
| "rxjs": "6.6.7", | ||
| "serialize-javascript": "3.1.0", | ||
| "tslib": "2.0.0", | ||
| "tslib": "2.8.1", | ||
| "zone.js": "0.15.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@angular-devkit/build-angular": "21.2.16", | ||
| "@angular/cli": "21.2.16", | ||
| "@angular/compiler-cli": "21.2.17", | ||
| "@angular/language-service": "21.2.17", | ||
| "@angular-devkit/build-angular": "22.0.3", | ||
| "@angular/cli": "22.0.3", | ||
| "@angular/compiler-cli": "22.0.2", | ||
| "@angular/language-service": "22.0.2", | ||
| "@types/jasmine": "3.6.0", | ||
| "@types/jasminewd2": "2.0.3", | ||
| "@types/node": "22.14.0", | ||
| "codelyzer": "6.0.0", | ||
| "istanbul-lib-instrument": "^6.0.3", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== package.json engines =="
cat package.json | jq '.engines // "NO_ENGINES_FIELD"'
echo
echo "== Node version pins in common toolchain files =="
fd -HI '(^\.nvmrc$|^\.node-version$|^\.tool-versions$|^Dockerfile$|^Dockerfile\..*$|^package\.json$|^.*\.yml$|^.*\.yaml$)'
echo
echo "== Node version references in repo (CI/Docker/tooling) =="
rg -n --hidden --glob '!node_modules/**' --glob '!.git/**' \
'node-version|setup-node|FROM node|\"engines\"|\"node\"'Repository: azerothcore/server-status
Length of output: 439
🏁 Script executed:
cat -n package.json | head -60Repository: azerothcore/server-status
Length of output: 1825
🏁 Script executed:
cat -n .github/workflows/tests.ymlRepository: azerothcore/server-status
Length of output: 815
🌐 Web query:
Angular 22.0.2 Node.js version requirements compatibility
💡 Result:
For Angular 22.0.2, the supported Node.js version requirement is given by Angular’s “engines.node” range for the Angular 22 line: ^22.22.3 || ^24.15.0 || >=26.0.0. [1] So, to be compatible with Angular 22.0.2, use: - Node.js 22 >= 22.22.3 - or Node.js 24 >= 24.15.0 - or Node.js 26.0.0+ [1] Angular 22 also reflects that Node.js v20 is no longer supported (minimum bumped to the Node 22/24 versions above). [2] Confidence: High (the Node.js range is directly sourced from Angular’s compatibility table update/engines metadata in the Angular repo). [1][2]
Citations:
- 1: angular/angular@a97d5ec
- 2: https://github.com/angular/angular/blob/06c0faecb134d4efe79456048e93c8eed5194c15/CHANGELOG.md
🌐 Web query:
TypeScript 6.0.3 release version exists official
💡 Result:
Yes, TypeScript 6.0.3 is an official release [1][2]. It was published to the npm registry on April 16, 2026 [2]. As of June 20, 2026, it is listed as a stable release within the official Microsoft TypeScript GitHub repository [3][1].
Citations:
- 1: https://github.com/microsoft/TypeScript/releases/tag/v6.0.3
- 2: https://registry.npmjs.org/typescript
- 3: https://github.com/microsoft/TypeScript/releases
🏁 Script executed:
rg -n "typescript" package.jsonRepository: azerothcore/server-status
Length of output: 98
Add engines field to package.json to document Node.js compatibility for local development.
Angular 22.0.2 requires Node.js ^22.22.3, ^24.15.0, or >=26.0.0. While your CI workflow correctly pins Node.js 24, adding an explicit engines constraint in package.json will help local developers detect version mismatches without running CI first.
"engines": {
"node": "^22.22.3 || ^24.15.0 || >=26.0.0"
}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@package.json` around lines 14 - 38, Add an engines field to the root level of
package.json to explicitly document the Node.js version requirements for this
project. The engines field should be placed alongside the existing dependencies
and devDependencies objects and should specify the compatible Node.js versions
that Angular 22.0.2 requires. This will help local developers identify version
mismatches early without needing to run CI.
Upgrades Angular from v21 to v22.0.2 via
ng update, on top of #59.Changes
@angular/*packages, the CLI, and@angular-devkit/build-angularbumped to v22.withXhr()toprovideHttpClient(...)calls (main.tsand specs) to keep the pre-v22 XHR backend (v22 defaults the backend to fetch).tsconfig.app.json/tsconfig.spec.json: suppress thenullishCoalescingNotNullable/optionalChainNotNullableextended diagnostics (applied by the v22 migration).TypeScript 6 fallout handled in
tsconfig.jsonstrictnow defaults to on; set"strict": falseexplicitly to preserve the project's prior non-strict posture (the data-model classes have uninitialized properties).baseUrlis deprecated; added"ignoreDeprecations": "6.0"since the'config'import still resolves through it.Verification
ng buildpasses (only pre-existing Sass@importdeprecation warnings).ng testpasses (4/4, ChromeHeadless).🤖 Generated with Claude Code
Summary by CodeRabbit
tslib).