Angular CDK 22 code changes

Proprietary

The @angular/cdk source changes of the version 22 migration: renames ContextMenuTracker to MenuTracker, removes the super(...) arguments that CDK constructors no longer accept, rewrites the boolean overload of ConfigurableFocusTrapFactory.create, and finds the removed AriaDescriber constants and the calls missing a now-required Injector or event argument. UpgradeToAngular22 includes this recipe.

org.openrewrite.angular.cdk.UpgradeToCdk22CodeChanges
mod run . --recipe=org.openrewrite.angular.cdk.UpgradeToCdk22CodeChanges

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Change import
  2. Remove the super(...) arguments of CDK subclasses
  3. Pass a config object to ConfigurableFocusTrapFactory.create
  4. Find APIs removed in Angular CDK 22
  5. Find focus traps constructed without an Injector
  6. Find DropListRef.drop calls without an event