Skip to content

Update to Angular v21#37

Merged
lukasmatta merged 13 commits into
masterfrom
36-update-to-angular-21
May 6, 2026
Merged

Update to Angular v21#37
lukasmatta merged 13 commits into
masterfrom
36-update-to-angular-21

Conversation

@lukasmatta
Copy link
Copy Markdown
Collaborator

@lukasmatta lukasmatta commented Apr 27, 2026

This pull request updates the project to Angular 21 and Node.js 22, modernizes build tooling, and improves configuration for testing and markdown sanitization. The main focus is on dependency upgrades, workflow improvements, and compatibility updates.

Dependency and Compatibility Upgrades:

  • Upgraded all Angular packages and related dependencies (including cps-ui-kit, ngx-markdown, and marked) to versions compatible with Angular 21 in both package.json and projects/cps-mdoc-viewer/package.json. [1] [2]
  • Updated zone.js and other dev dependencies (e.g., jest, @angular-builders/jest, @angular-eslint/*) to latest compatible versions.

GitHub Actions Workflow Modernization:

  • Updated all workflows to use actions/checkout@v5, actions/setup-node@v5, and Node.js v22.x; replaced manual cache steps with the built-in cache: 'npm' option. [1] [2] [3] [4]

Testing and Build Configuration:

  • Added "zoneless": false to the Jest test builder options in angular.json to ensure compatibility with Angular 21's testing requirements. [1] [2]
  • Updated example app bootstrap to use provideZoneChangeDetection() for compatibility with Angular 21's zone handling.

Markdown and Security Handling:

  • Updated markdown provider configuration to use the new SANITIZE injection token in projects/cps-mdoc-viewer/src/lib/lib.provider.ts, reflecting changes in ngx-markdown v21. [1] [2]

Other Improvements:

  • Added omit-lockfile-registry-resolved=true to .npmrc for improved lockfile handling.
  • Cleaned up unused event parameter in @HostListener for scroll handling.

@lukasmatta lukasmatta linked an issue Apr 27, 2026 that may be closed by this pull request
@lukasmatta lukasmatta force-pushed the 36-update-to-angular-21 branch from 5221524 to 1b11943 Compare April 28, 2026 07:24
@lukasmatta lukasmatta force-pushed the 36-update-to-angular-21 branch from 1b11943 to a7220b7 Compare April 28, 2026 07:43
lukasmatta and others added 2 commits April 28, 2026 10:04
Co-authored-by: Copilot <copilot@github.com>
@lukasmatta lukasmatta force-pushed the 36-update-to-angular-21 branch from af639b1 to f5d0dea Compare April 28, 2026 08:31
@lukasmatta lukasmatta marked this pull request as ready for review May 6, 2026 12:04
}

@HostListener('window:scroll', ['$event'])
@HostListener('window:scroll')
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe in the future we can use host instead of @HostListener as that's the recommended approach :)

@lukasmatta lukasmatta merged commit b6ee376 into master May 6, 2026
1 check passed
@lukasmatta lukasmatta deleted the 36-update-to-angular-21 branch May 6, 2026 13:20
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.

Update to Angular 21

2 participants