Skip to content

Migrate Angular 21 → Angular 22 (TypeScript 6) across the core-web Nx workspace #35930

Description

@nicobytes

Description

Upgrade the core-web Nx workspace from Angular 21 to Angular 22, including the bump to TypeScript 6. The workspace is currently on Angular 21, so this work is unblocked.

Scope is the entire workspace: the dotcms-ui app, all internal libraries, and the published @dotcms/* SDK packages.

Angular migrations are driven through the standard Nx flow:

# 1. Confirm the Nx CLI version
nvm use
nx --version

# 2. Let Nx update package.json + migrations.json to the latest compatible versions
nx migrate latest

# 3. Install the updated dependencies
pnpm install

# 4. Run the generated migrations
nx migrate --run-migrations

After running the schematics, validate that the Angular automated migrations applied cleanly:
https://angular.dev/reference/migrations

TypeScript 6 note

Angular 22 moves to TypeScript 6. To smooth the transition over removed/renamed APIs, the temporary ignoreDeprecations flag may be required in the relevant tsconfig:

{ "compilerOptions": { "ignoreDeprecations": "6.0" } }

This should be treated as a transitional measure and removed once the deprecated usages are migrated.

Reference material

Resource Link
Nx changelog https://nx.dev/changelog
Angular v22 announcement https://blog.angular.dev/announcing-angular-v22-c52bb83a4664
Angular CHANGELOG https://github.com/angular/angular/blob/main/CHANGELOG.md
Angular migrations reference https://angular.dev/reference/migrations

Acceptance Criteria

Preconditions / setup

  • Confirm the workspace is on Angular 21 before starting (nx report)
  • Nx is migrated to the latest version compatible with Angular 22 via nx migrate latest

Migration (behavior unchanged)

  • All Angular packages in package.json (app, internal libs, and published @dotcms/* SDKs) are on Angular 22.x
  • TypeScript is upgraded to 6.x and the project compiles (tsc / Nx type-check passes)
  • yarn nx migrate --run-migrations completes with all schematics applied, no pending entries left in migrations.json
  • Angular automated migrations report success per https://angular.dev/reference/migrations (no skipped/failed migrations)

Verification — no regressions

  • pnpm nx run-many -t build succeeds for all affected projects
  • pnpm nx run-many -t test passes for all affected projects
  • pnpm nx run-many -t lint passes for all affected projects
  • All published @dotcms/* SDK packages build and pass their existing tests/type-checks
  • dotcms-ui runs and core admin flows render without runtime/console errors

Cleanup

  • Any transitional ignoreDeprecations: \"6.0\" flags are documented and tracked for removal (removed where deprecated usages were already migrated)
  • package.json / lockfile (yarn.lock) changes committed and reproducible from a clean install

Priority

Low

Additional Context

Standard Nx-driven Angular upgrade. The bulk of the work is automated by the Nx + Angular schematics; manual effort is expected mainly around deprecated API usages surfaced by TypeScript 6 and any breaking changes called out in the Angular v22 changelog.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions