Skip to content

chore: upgrade to Angular 22 - #660

Open
agrahari-himanshu wants to merge 8 commits into
vlio20:masterfrom
agrahari-himanshu:upgrade/angular-22
Open

agrahari-himanshu wants to merge 8 commits into
vlio20:masterfrom
agrahari-himanshu:upgrade/angular-22

Conversation

@agrahari-himanshu

@agrahari-himanshu agrahari-himanshu commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Closes #659

Summary

  • Bump Angular core, CLI, CDK, and ng-packagr to v22
  • Migrate ESLint to flat config for @angular-eslint v22
  • Adapt to TypeScript 6.0 defaults and remove ComponentFactoryResolver usage
  • Bump library peer deps to Angular 22, add engines field, and cleanup
  • Fix test:ci:lib to run non-interactively
  • Fix CI npm ci failure by bumping @types/node to satisfy vite's peer range

Test plan

  • Reviewed diff for behavioral regressions (no findings)
  • CI passes on this PR
  • Manual smoke test of demo app against Angular 22

🤖 Generated with Claude Code

agrahari-himanshu and others added 8 commits September 17, 2026 08:57
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…quisites

Angular 22's compiler-cli requires TypeScript >=6.0 <6.1, and
@angular-eslint v22 only supports ESLint 9 flat config. Bumping these
first, ahead of the Angular package update, satisfies peer dependency
checks so `ng update` can proceed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Runs `ng update`'s automated migrations: annotates existing
components with ChangeDetectionStrategy.Eager to preserve pre-v22
change detection defaults, and suppresses the new strict template
extended diagnostics to keep prior compile behavior.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…olver

TypeScript 6.0 flips the "strict" default to true; explicitly set
strict: false to preserve this project's pre-upgrade (non-strict)
compiler behavior instead of chasing strictness errors across the
whole codebase. Also silence the now-blocking baseUrl deprecation
warning, exclude e2e/** and enable skipLibCheck in the demo's
tsconfig.spec.json (its root-level "**/*.spec.ts" include was
accidentally pulling in Playwright e2e specs and playwright-core's
type declarations).

Angular 22 removes ComponentFactoryResolver; DatePickerDirective
now creates DatePickerComponent directly via
ViewContainerRef.createComponent(), which Ivy has supported since
Angular 13 and is behavior-equivalent to the old factory-based API.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
--watch=true made this script hang forever instead of exiting after
a single run, so it never actually verified anything in CI.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@angular-eslint v22 only supports ESLint 9 flat config; the legacy
.eslintrc.json format is no longer read. Ported the existing rules
1:1 into eslint.config.js using the angular-eslint/typescript-eslint
umbrella packages (dp-prefixed selectors, no-output-native/on-prefix
off, prefer-standalone warn, no-console/no-debugger, single quotes).

angular-eslint v22's tsRecommended preset newly includes
prefer-inject and prefer-on-push-component-change-detection as
errors; disabled both to keep lint at its pre-upgrade baseline
(0 errors) rather than force a DI/change-detection style rewrite
across the whole library as a side effect of this upgrade.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…leanup

- Bump ng2-date-picker library version and peerDependencies
  (@angular/common, @angular/core, @angular/cdk) to ^22.0.0.
- Add engines.node >=22.0.0 to package.json to make the new
  Angular 22 floor explicit.
- Bump the stale rxjs devDependency from ^6.5.3 to ^7.8.0 to match
  the version Angular's own deps already resolve to.
- Remove the orphaned ng2-date-picker-demo-e2e project from
  angular.json: it used the removed protractor builder with no
  protractor.conf.js on disk, dead since the v17 Playwright
  migration, and wasn't exercised by any npm script.
- Update README's stale "Supports latest (Angular 15)" line and add
  a CHANGELOG entry for the 22.0.0 release.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
vite@8.1.5 (pulled in transitively via @angular/build) requires
@types/node "^20.19.0 || >=22.12.0" as a peer dependency, but the
root package.json still pinned ^18.15.3. npm 11 tolerated the
mismatch, but npm 10 (bundled with actions/setup-node's Node 22)
resolves a separate @types/node@26.6.1 to satisfy the peer that
never made it into the committed lock file, causing `npm ci` to
fail with EUSAGE in CI.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

Support for Angular 22

1 participant